function isArrayContains(e, t) { return -1 < e.indexOf(t) } function y185(e, t) { e.cacheCanvas = t.cacheCanvas; e.cacheID = t.cacheID; e._cacheWidth = t._cacheWidth; e._cacheHeight = t._cacheHeight; e._cacheOffsetX = t._cacheOffsetX; e._cacheOffsetY = t._cacheOffsetY; e._cacheScale = t._cacheScale } function y96(e) { isLevelEditor && console.log(e) } function y506(e) { e.scaleX = e.scaleY = 1.2 * y164 * (e.defaultScale ? e.defaultScale : 1) } function y380(e) { e.scaleX = e.scaleY = y164 * (e.defaultScale ? e.defaultScale : 1) } function y206(e) { e.parent && e.parent.removeChild(e) } function y110(e, t) { y206(e); t && t.addChild(e) } function y110WithIndex(e, t, n) { y206(e); t && t.addChildAt(e, n) } function setSpriteScale(e, t) { e.scaleX = e.scaleY = t } function y124(e, t, n, r) { r.text != n && (r.text = n, n = r.getBounds(), r.x = e - (n.width >> 1) * r.scaleX, t && (r.y = t - (40 >> 1) * r.scaleY)) } function setAnimationSpeed(e, t) { e._animation.speed = t } function setNextAnimation(e, t) { e._animation.next = t } function randomizeAnimFrame(e) { e.currentAnimationFrame = Math.floor(30 * Math.random()) } function createReverseAnim(e, t) { var n = REVERSE_y287 + t; if (!e.getAnimation(n)) { for (var r = e.getAnimation(t), i = { name: n, next: r.next, speed: r.speed, frames: [] }, s = r.frames.length - 1; 0 <= s; s--) i.frames.push(r.frames[s]); e._animations.push(n); e._data[n] = i } } function playReverseAnim(e, t) { e.gotoAndPlay(REVERSE_y287 + t) } function y306() { y328 = y481(160, 322, .8, sponsorLogoFrame, y254, null, null) } function y379(e, t, n, r, i, s, o, u, a) { y328 || y306(); y110(y328, r); n *= .7; y139 = t; y502 = e + 10; y83 = s; y108 = o; y328.scaleX = y328.scaleY = n; y328.alpha = i ? i : 1; y78 = u; y147(); (e = y355.getAnimation(sponsorLogoFrame)) && e.frames && 0 < e.frames.length && (e = y355.getFrameBounds(e.frames[0]), y328.setBoundingBox(e.x * n, e.y * n, e.width * n, e.height * n)) } function y147() { y328 && (y328.x = y502, y328.y = y139, y83 === y93 ? y328.x += y170() : y83 === y232 && (y328.x -= y170()), y108 === y280 ? y328.y += y199() / y78 : y108 === y73 && (y328.y -= y199() / y78)) } function startSponsorAds() { sponsorApi && (isAdPauseSoundMuted = isMute, sponsorApi.GameBreak.request(onAdBeginPause, onAdEndUnpause)) } function onAdBeginPause() { y96("ad pause, , sound is muted: " + isMute); isAdPauseSoundMuted = isMute; isMute = !0; stopBgMusic() } function onAdEndUnpause() { y96("ad unpause, sound was muted: " + isAdPauseSoundMuted); (isMute = isAdPauseSoundMuted) || y452() } function initParticleManager() { y497.addChild(y262) } function setParticlesToFront() { y110(y262, y497) } function y53Explode(e, t, n, r, i, s) { for (var o, u = 0; u < n; u++) { o = u * (2 * Math.PI / n); partSin = Math.cos(o); partCos = Math.sin(o); o = y53(r, e, t, 1, i ? i : y262); if (!o) break; setParticleParamsByIndex(o, s ? s : 0) } } function setParticleParamsByIndex(e, t) { var n = 1.3; e.y14 = 0; e.y11 = 20 * Math.random(); 0 === t ? (e.maxScale = .7, e.y37 = .2 * FPS, partScale = .2 + .2 * Math.random()) : 1 === t ? (n = 4, e.maxScale = 1.3, e.y37 = .3 * FPS, e.y14 = 0, e.y11lpha = .05, e.y11 = 20 * Math.random(), partScale = .4 + .6 * Math.random()) : 2 === t && (n = 2, e.maxScale = 1.3, e.vis.alpha = 1, e.y37 = .3 * FPS, e.y11 = 20 * Math.random(), partScale = .4 + .6 * Math.random()); e.vis.scaleX = e.vis.scaleY = partScale; e.y9 = (n + Math.random() * n) * partCos; e.y10 = (n + Math.random() * n) * partSin } function createDiePart(e, t) { var n = y53(y509, e, t, 1, y262); n && (n.y38(11), n.y39("deathanimv", !0), n.y11lpha = .05, n.y37 = 1.5 * FPS, n.y9 = 0, n.y10 = -1, n.y11 = 0) } function createGoodPlayExplode(e, t) { for (var n, r = 0 == t ? 90 : -120, i = 0; 8 > i; i++) { var s = i * (Math.PI / 2 / 8) - Math.PI / 4; 0 < t && (s += Math.PI); var o = Math.cos(s), s = Math.sin(s); n = .2 + .2 * Math.random(); n = y53(y160, r, 0, n, monsterCont); if (!n) break; n.y39("particle1v"); n.y11lpha = .1; n.y34 = .02; n.vis.visible = !1; n.y37 = .5 * FPS; n.maxScale = .6; n.y9 = (1.5 + 1.5 * Math.random()) * o; n.y10 = (1.5 + 1.5 * Math.random()) * s; n.y11 = 20 * Math.random() } } function y292(e, t, n) { if (e = y53(y509, e, t, .8, y262)) e.y38(n), e.y37 = .2 * FPS, e.y9 = 0, e.y10 = -.8, e.y11 = 0 } function createGlassExplode(e, t) { for (var n, r = e, i = t, s = 0; 4 > s; s++) { switch (s) { case 0: r = e - 10; i = t - 30; break; case 1: r = e + 10; i = t - 30; break; case 2: r = e - 10; i = t - 10; break; case 3: r = e + 10, i = t - 10 } n = y53(PART_GLASS_TYPE, r, i, 1, y262); if (!n) break; n.y14 = 0; n.maxScale = 0; n.y14 = 0; n.y11lpha = .08; n.y34 = -.08; n.isReverse = !0; partScale = 1; n.vis.scaleX = n.vis.scaleY = partScale; n.y11 = 30 * Math.random() - 15; n.y9 = 1.3 - 2.6 * Math.random(); n.y10 = 1.3 - 2.6 * Math.random() } } function y456() { var e = y53(y509, 160, topVisionLine + y52 / 2, 1, y262); e && (e.y38(11), e.y11lpha = 1, e.y37 = 1.5 * FPS, e.y9 = 0, e.y10 = 0, e.y11 = 0, e.vis.rotation = -360, e.vis.scaleX = e.vis.scaleY = .1, createjs.Tween.get(e.vis, { override: !0 }).to({ rotation: 0, scaleX: 1, scaleY: 1 }, 600).wait(600).to({ alpha: 0 }, 200)) } function createAchievPart(e) { for (var t = 210, n = 10, r = 0, i, s = 0; s < y311.length; s++) i = y311[s], i.type === PART_ACHIEV_TYPE && (t = i.vis.y - 50, n += 200, r++); if (i = y53(PART_ACHIEV_TYPE, -130, t, .8, y497)) i.y39("achievdesc" + e), i.y11lpha = 1, i.y37 = 3.2 * FPS + .2 * r, i.y9 = 0, i.y10 = 0, i.y11 = 0, i.vis.rotation = 0, i.vis.scaleX = i.vis.scaleY = .7, i.vis.alpha = 1, createjs.Tween.get(i.vis, { override: !0 }).wait(n).to({ x: 5 }, 600, y244).wait(2e3).to({ x: -130 }, 400, createjs.Ease.sineIn) } function y53(e, t, n, r, i) { var s; y311Lenght = y311.length; if (y311Lenght > y454) { for (var o = 0; o < y311Lenght; o++) if (y311[o].type === y160) { s = y311[o]; break } s || (s = y311[0]); s.reset(e, i, r) } else s = y453(e, i, r); s.setPos(t, n); isArrayContains(y311, s) || y311.push(s); return s } function y134(e) { isArrayContains(disposedParts, e) || disposedParts.push(e) } function y453(e, t, n) { if (0 < disposedParts.length) { var r = disposedParts.pop(); r.reset(e, t, n); return r } return new y513(e, t, n) } function y195() { y56 = y311.length; for (var e = 0; e < y56; e++) y342 = y311[e], y342.tick(), y342.isNeedDispose && disposeNeededParts.push(y342); for (; 0 < disposeNeededParts.length;) disposeNeededParts.pop().dispose() } function initField() { ROW_FIELD_END = FIELD_ROWS - ROWS_MARGIN - 1; CELL_FIELD_END = FIELD_CELLS - CELLS_MARGIN - 1; shadowContainer = new createjs.Container; y497.addChild(shadowContainer); y390 = new createjs.Container; y497.addChild(y390); for (var e = 0; e < FIELD_CELLS; e++) { for (var t = [], n = 0; n < FIELD_ROWS; n++) t.push(BLOCK_SPACE_TYPE); map.push(t) } } function createBlock(e, t, n, r) { disposeBlockAt(t, n); e == BLOCK_SPACE_TYPE ? map[t][n] = BLOCK_SPACE_TYPE : (r || (r = "defB" + t + "r" + n), e = getBlockFromPool(e, y390, r), e.setPos(getXByCell(t), getYByRow(n)), e.setIndex(t, n), e.rememberPos(), isArrayContains(allBlocks, e) || allBlocks.push(e), map[t][n] = e, isHero(e) && (findFriends(e), allHeroes.push(e))) } function getBlockFromPool(e, t, n) { if (0 < disposedBlocks.length) { var r = disposedBlocks.pop(); r.reset(e, t, n); return r } return new BaseBlock(e, t, n) } function disposeBlockAt(e, t) { var n = getBlockAt(e, t); n && n != BLOCK_SPACE_TYPE && n.dispose() } function y201(e) { isArrayContains(disposedBlocks, e) || disposedBlocks.push(e) } function deleteBlockFromMap(e) { map[e.cell][e.row] == e && (map[e.cell][e.row] = BLOCK_SPACE_TYPE) } function getXByCell(e) { return (e + 1 - CELLS_MARGIN) * CELL_SIZE + MARGIN_LEFT - CELL_SIZE / 2 } function getYByRow(e) { return (e + 1 - ROWS_MARGIN) * CELL_SIZE + MARGIN_TOP } function getLevelCode() { for (var e = [], t = 0; t < FIELD_CELLS; t++) { for (var n = [], r = 0; r < FIELD_ROWS; r++) { var i = map[t][r]; i == BLOCK_SPACE_TYPE ? n.push(BLOCK_SPACE_TYPE) : n.push(i.type) } e.push(n) } e.push(getBonusCode()); return e } function y192ByCode(e) { isLevelLoading = !0; disposeLevel(); addInstructions(); lightsV.visible = !0; isShadowDisabled || (shadowContainer.visible = !0); for (var t = 0; t < FIELD_CELLS; t++) for (var n = e[t], r = 0; r < FIELD_ROWS; r++) { var i = n[r]; - 1 < i && createBlock(i, t, r) } loadBonusesByCode(e[FIELD_CELLS]); y275(); isLevelLoading = !1; setCloudsVisibility(!0) } function disposeLevel() { disposeMinigame(); disposeInstructions(); for (var e = allBlocks.length, t = 0; t < e; t++) allBlocks.pop().dispose(); allHeroes = []; headHero = null; isDangerCollided = isLevelCompleted = isHeroMoving = !1; levelCollectedStarsNum = levelTotalStarsNum = 0; disposeBonuses(); isOldButtonActivated = !1 } function y192(e) { y50 = e; y50 >= y115.length && (y50 = y115.length - 1); setBgByLevel(y50, !1); IsMinigameLevel(y50) ? loadMinigame(y50) : y192ByCode(y115[y50]); setParticlesToFront(); showIngameSponsorLogo(); isGamePaused = !1 } function y507() { isDisableWin ? rey192FromEditor() : y192(y50) } function y131() { y50++; y50 >= y115.length && (y50 = 0); y192(y50) } function y275() { y390.sortChildren(zOrderSortFunction) } function zOrderSortFunction(e, t) { if (e.isFullTop && !t.isFullTop) return 1; if (!e.isFullTop && t.isFullTop) return -1; if (e.isFullTop && t.isFullTop) { if (e.zIndex > t.zIndex) return 1; if (e.zIndex < t.zIndex) return -1 } return e.baseBlock.row < t.baseBlock.row ? -1 : e.baseBlock.row > t.baseBlock.row ? 1 : e.isOnBottom && !t.isOnBottom ? -1 : !e.isOnBottom && t.isOnBottom ? 1 : !e.isOnTop && t.isOnTop ? -1 : e.isOnTop && !t.isOnTop ? 1 : 0 } function SearchMovePath(e, t) { var n = 100, r, i; lastDir = t; e.oldFriendsNum = e.friends.length; if (t == DIR_LEFT || t == DIR_RIGHT) { for (var n = SearchMininumStepsHoriz(e, t, n), s = 0; s < e.friends.length; s++) r = e.friends[s], n = SearchMininumStepsHoriz(r, t, n); i = StepHorizByDir(e.cell, t, n); updateStarsCollectionStatus(n); if (0 > i || i > FIELD_CELLS - 1) { e.deadMove(t); return } if (i == e.cell) lastDir = -1, isHeroMoving = !1, e.restorePosWithFriends(); else { for (s = 0; s < e.friends.length; s++) { r = e.friends[s]; var o = StepHorizByDir(r.cell, t, n); relocate(r, o, r.row) } e.move(i, e.row, getXByCell(i), getYByRow(e.row)); playLaunchSound() } } else if (t == DIR_UP || t == DIR_BOTTOM) { n = SearchMininumStepsVert(e, t, n); for (s = 0; s < e.friends.length; s++) r = e.friends[s], n = SearchMininumStepsVert(r, t, n); i = StepVertByDir(e.row, t, n); updateStarsCollectionStatus(n); if (0 > i || i > FIELD_ROWS - 1) { e.deadMove(t); return } if (i == e.row) lastDir = -1, isHeroMoving = !1, e.restorePosWithFriends(); else { for (s = 0; s < e.friends.length; s++) r = e.friends[s], o = StepVertByDir(r.row, t, n), relocate(r, r.cell, o); e.move(e.cell, i, getXByCell(e.cell), getYByRow(i)); playLaunchSound() } } resetStarsCollectionSteps() } function SearchMininumStepsVert(e, t, n) { if (!isNextVertAreFriend(e, t)) { t = SearchLastFreeRow(e, t); e = Math.abs(t - e.row); if (t < ROWS_MARGIN || t > ROW_FIELD_END) e = 100; if (e < n) return e } return n } function isNextVertAreFriend(e, t) { var n = StepVertByDir(e.row, t, 1); return (n = getBlockAt(e.cell, n)) ? isHero(n) : !1 } function SearchLastFreeRow(e, t) { var n = StepVertByDir(e.row, t, 1), r = 1; for (checkStarCollide(r, e.cell, n); IsFreeOrFriend(e, e.cell, n);) n = StepVertByDir(n, t, 1), r += 1, checkStarCollide(r, e.cell, n); - 1 < n && n < FIELD_ROWS && (n = StepVertByDir(n, t, -1)); return n } function SearchMininumStepsHoriz(e, t, n) { if (!isNextHorizAreFriend(e, t)) { t = SearchLastFreeCell(e, t); e = Math.abs(t - e.cell); if (t < CELLS_MARGIN || t > CELL_FIELD_END) e = 100; if (e < n) return e } return n } function isNextHorizAreFriend(e, t) { var n = StepHorizByDir(e.cell, t, 1); return (n = getBlockAt(n, e.row)) ? isHero(n) : !1 } function isHero(e) { return e.type == BLOCK_HERO_TYPE || e.type == BLOCK_SLEEP_TYPE } function isBrick(e) { return e.type == BLOCK_BRICK_TYPE || e.type == BLOCK_HIDE_TYPE || e.type == BLOCK_ICE_TYPE } function SearchLastFreeCell(e, t) { var n = StepHorizByDir(e.cell, t, 1), r = 1; for (checkStarCollide(r, n, e.row); IsFreeOrFriend(e, n, e.row);) n = StepHorizByDir(n, t, 1), r += 1, checkStarCollide(r, n, e.row); - 1 < n && n < FIELD_CELLS && (n = StepHorizByDir(n, t, -1)); return n } function StepHorizByDir(e, t, n) { return t == DIR_LEFT ? e - n : t == DIR_RIGHT ? e + n : e } function StepVertByDir(e, t, n) { return t == DIR_UP ? e - n : t == DIR_BOTTOM ? e + n : e } function IsFreeOrFriend(e, t, n) { return (t = getBlockAt(t, n)) ? t == BLOCK_SPACE_TYPE || t.type == BLOCK_HIDE_TYPE && t.isHided || isArrayContains(e.friends, t) ? !0 : !1 : !1 } function getBlockAt(e, t) { return e > FIELD_CELLS - 1 || 0 > e || t > FIELD_ROWS - 1 || 0 > t ? null : map[e][t] } function relocate(e, t, n) { getBlockAt(e.cell, e.row) == e && (map[e.cell][e.row] = BLOCK_SPACE_TYPE); 0 < t && t < FIELD_CELLS && 0 < n && n < FIELD_ROWS && (map[t][n] = e); e.oldCell = e.cell; e.oldRow = e.row; e.setIndex(t, n) } function findFriends(e) { var t = [e], n, r, i; for (i = 0; i < e.friends.length; i++) n = e.friends[i], addFriendIfNew(1, 0, n, t), addFriendIfNew(-1, 0, n, t), addFriendIfNew(0, 1, n, t), addFriendIfNew(0, -1, n, t); addFriendIfNew(1, 0, e, t); addFriendIfNew(-1, 0, e, t); addFriendIfNew(0, 1, e, t); addFriendIfNew(0, -1, e, t); for (r = 0; r < t.length; r++) for (e = t[r], i = 0; i < t.length; i++) if (n = t[i], n != e) { e.addFriend(n); for (var s = 0; s < n.friends.length; s++) e.addFriend(n.friends[s]) } for (r = 0; r < t.length; r++) e = t[r], e.updateVisionByFriendsPos(); isLevelLoading || y275() } function addFriendIfNew(e, t, n, r) { if ((n = getBlockAt(n.cell + e, n.row + t)) && n.type) if (isHero(n)) { if (!isArrayContains(r, n)) for (r.push(n), e = 0; e < n.friends.length; e++) t = n.friends[e], isArrayContains(r, t) || r.push(t) } else n.type == BLOCK_ICE_TYPE ? (lastDir == DIR_BOTTOM && 1 == t || lastDir == DIR_UP && -1 == t || lastDir == DIR_RIGHT && 1 == e || lastDir == DIR_LEFT && -1 == e) && n.iceBreak() : n.type == BLOCK_DANGER_TYPE && (isDangerCollided = !0, n.startShock()) } function updateBlocksByActivator() { for (var e = 0; e < allBlocks.length; e++) allBlocks[e].setActivationStatus(isButtonActivated) } function y241() { y345 = 0; if (isStorageSupported = isSupportshtml5storage()) if (localStorage[y287 + "y345"]) { y345 = parseInt(localStorage[y287 + "y345"]); for (e = 0; e < y208; e++) levely4s.push(parseInt(localStorage[y287 + "levely4" + e])); for (e = 0; e < y369; e++) y200.push(parseInt(localStorage[y287 + "achiev" + e])); isMute = "1" == localStorage[y287 + "ismute"]; isLowQuality = "1" == localStorage[y287 + "islowq"]; isShadowDisabled = "1" == localStorage[y287 + "isshadowsdisabled"] } else { y96("saves not found!"); for (e = 0; e < y208; e++) levely4s.push(y70); for (e = 0; e < y369; e++) y200.push(y322); y283() } else { y96("storage not supported"); for (var e = 0; e < y208; e++) levely4s.push(y70); for (e = 0; e < y369; e++) y200.push(y322) } } function y101(e) { y345 <= y50 && (y345 = y50 + 1); levely4s[y50] < e && (levely4s[y50] = e); y283() } function y283() { if (y345 > 0) updateShareScore(y345); //Play68.setRankingScoreDesc(y345,Play68.rankingShowType.RANKING_SHOW_NO); if (isStorageSupported) { localStorage[y287 + "y345"] = y345; for (var e = 0; e < y208; e++) localStorage[y287 + "levely4" + e] = levely4s[e]; for (e = 0; e < y369; e++) localStorage[y287 + "achiev" + e] = y200[e]; localStorage[y287 + "islowq"] = isLowQuality ? "1" : "0"; localStorage[y287 + "isshadowsdisabled"] = isShadowDisabled ? "1" : "0"; y301() } } function y301() { isStorageSupported && (localStorage[y287 + "ismute"] = isMute ? "1" : "0") } function isSupportshtml5storage() { try { var e = "localStorage" in window && null !== window.localStorage; e && (localStorage.setItem("storage", ""), localStorage.removeItem("storage")); return e } catch (t) { return !1 } } function saveLevelToEditor() { savedLevel = getLevelCode(); localStorage["savedLevel" + savesHistoryCount] = JSON.stringify(savedLevel) } function rey192FromEditor() { savedLevel ? y192ByCode(savedLevel) : y192(y50) } function y191(e) { return levely4s[e] } function y289(e, t, n, r, i, s) { e = y481(e, t, r ? r : .8, n, null, null, null); s ? y110(e, y262) : y497.addChildAt(e, 2); e.rotation = i ? i : 0; y375.push(e); return e } function addInstructions() { if (0 === y50) { y289(240, 124, "arrowhelpv", .9, 90); y289(70, 160, "levelinstruction1"); var e = y289(230, 100, "tutorhandv1", .6, 30, !0); e.alpha = 0; var t = createjs.Ease.sineIn; createjs.Tween.get(e, { override: !0, loop: !0 }).to({ alpha: 1 }, 500, t).wait(500).to({ y: 200 }, 1e3, t).to({ alpha: 0 }, 300, t).wait(1e3) } else 2 == y50 ? y289(80, 323, "levelinstruction3") : 4 == y50 ? y289(200, 80, "levelinstruction5") : 5 == y50 ? y289(160, 80, "levelinstruction6") : 8 == y50 ? (y289(45, 10, "levelinstruction9"), y289(96, 300, "levelinstruction91")) : 11 == y50 ? y289(0, 217, "levelinstruction11") : 14 == y50 && y289(90, 80, "levelinstruction13") } function disposeInstructions() { for (; 0 < y375.length;) { var e = y375.pop(); createjs.Tween.removeTweens(e); y206(e) } } function loadMinigame(e) { disposeLevel(); addInstructions(); setCloudsVisibility(!1); isMinigame = !0; lightsV.visible = !0; isShadowDisabled || (shadowContainer.visible = !0); hitObj = getBlockFromPool(BLOCK_BRICK_TYPE, y390); hitObj.setPos(0, 0); y206(hitObj.y30); y206(hitObj.eye); y206(hitObj.shadowVis); hitObj.y30.scaleX = 4; hitObj.y30.scaleY = 3; launchWaitTimer = -1; createLauncher(); showMinigameInterface(); coinsCounter = 0; lastUpdate = 1e4; setMinigameParamsByLevel(); updateTimerTxt(); updateMinigameTxt(); y96("minigame start"); isMinigameFinished = !1; y303() } function setMinigameParamsByLevel() { var e = 1; BLACK_CHANCE = .1; switch (y50) { case 5: e = 30; BLACK_CHANCE = .1; break; case 10: e = 45; BLACK_CHANCE = .15; break; case 15: e = 40, BLACK_CHANCE = .25 } minigameTimer = 1200; levelTotalStarsNum = e } function disposeMinigame() { isMinigameFinished = isMinigame = !1; launcher && launcher.dispose(); launcher = null; hideMinigameInterface() } function createLauncher() { launcher = getBlockFromPool(BLOCK_HERO_TYPE, y390); launcher.setIndex(0, 0); allBlocks.push(launcher); launcher.y30.removeAllEventListeners(); launcher.y30.addEventListener("mousedown", onLauncherMouseDown); launcher.y30.addEventListener("pressmove", onLauncherMouseMove); launcher.y30.addEventListener("pressup", onLauncherMouseUp); var e = oh - y199() / 3 - 10; launcher.setPos(ow / 2, e + 50); launcher.y30.alpha = 0; createjs.Tween.get(launcher.y30, { override: !0 }).to({ alpha: 1, y: e }, 200); launcher.y30.hitArea = hitObj.y30; isLaunched = !1 } function IsMinigameLevel(e) { return 5 === e || 10 === e || 15 === e } function minigameUpdate() { if (isMinigame && !isMinigameFinished && !(0 > minigameTimer)) { if (14 < Math.abs(lastUpdate - y87)) { lastUpdate = y87; var e = Math.random(), t = !1; Math.random() < BLACK_CHANCE ? (t = !0, e = .5 < e ? DIR_RIGHT : DIR_LEFT) : e = .9 < e ? DIR_BOTTOM : .8 < e ? DIR_UP : .4 < e ? DIR_RIGHT : DIR_LEFT; e = createMiniGameCoin(e); t && e && (e.isBlackStar = !0, e.y30.gotoAndStop("starsblack")) } launchWaitTimer -= y327; 0 >= launchWaitTimer && isLaunched && (isHeroMoving = !1, createLauncher()); var n, r; isCoinsChanged = !1; for (var i = 0; i < allBlocks.length; i++) for (var t = allBlocks[i], s = 0; s < allBonuses.length; s++) r = allBonuses[s], r.isStarCollected || (e = Math.abs(r.y30.x - t.y30.x), n = Math.abs(r.y30.y - t.y30.y), 45 > e && 45 > n && (r.isStarCollected = !0, r.isBlackStar ? (y246(!1, 10), coinsCounter -= 1, coinsCounter = Math.max(0, coinsCounter), y141("lose")) : (coinsCounter += 1, playCoinSound()), levelCollectedStarsNum = coinsCounter, isCoinsChanged = !0, createjs.Tween.removeTweens(r), createjs.Tween.get(r.y30, { override: !0 }).to({ alpha: 0, y: r.y30.y - 30 }, 400).call(coinMoveEnd))); isCoinsChanged && updateMinigameTxt(); isGamePaused || (isDisableWin || (minigameTimer -= y327), updateTimerTxt(), 0 > minigameTimer && (y487(), isMinigameFinished = !0)) } } function updateMinigameFinishInterface() { isMinigameFinished && updateMinigameTxt("/" + levelTotalStarsNum) } function updateTimerTxt() { for (var e = Math.max(0, Math.floor(minigameTimer / 30)) + "", t = e.length, n = 0; n < 2 - t; n++) e = "0" + e; txtMinigameTimer.text = e } function updateMinigameTxt(e) { for (var t = coinsCounter + "", n = t.length, r = 0; r < 3 - n; r++) t = "0" + t; txtMinigameCoins.text = t + (e ? e : "") } function createMiniGameCoin(e) { var t = getBonusFromPool(STAR_TYPE, y390); allBonuses.push(t); t.y30.alpha = 0; var n, r, i, s, o = 40; e == DIR_LEFT && (n = ow + o, r = 40 + Math.random() * (oh - 100), i = 0, o = -o); e == DIR_RIGHT && (n = getMaxLeft() - 70 - o, r = 40 + Math.random() * (oh - 100), i = ow); e == DIR_UP && (r = oh - y199() / 2 + o, n = 20 + Math.random() * (ow - 40), s = y199() / 2, o = -o); e == DIR_BOTTOM && (r = y199() / 2 - o, n = 20 + Math.random() * (ow - 40), s = oh - y199() / 2); t.setPos(n, r); e == DIR_LEFT || e == DIR_RIGHT ? createjs.Tween.get(t.y30).to({ x: n + o, alpha: 1 }, 200).to({ x: i }, 3e3).to({ x: i + o, alpha: 0 }, 200).call(coinMoveEnd) : createjs.Tween.get(t.y30).to({ y: r + o, alpha: 1 }, 200).to({ y: s }, 3e3).to({ y: s + o, alpha: 0 }, 200).call(coinMoveEnd); return t } function coinMoveEnd(e) { e.target.baseBlock.dispose() } function onLauncherMouseDown(e) { if (!isHeroMoving && !isGamePaused) { var t = e.target.baseBlock; if (!t.isDrag) { t.isDrag = !0; var n = e.target, r = n.localToGlobal(0, -25); t.startStageX = r.x; t.startStageY = r.y; t.rememberPos(); t.offsetX = n.x * scaleFactor - e.stageX + y497.x; t.offsetY = n.y * scaleFactor - e.stageY + y497.y; isHeroMoving = !0 } } } function onLauncherMouseMove(e) { if (!isGamePaused) { var t = e.target.baseBlock; t.deltaMove(t.y12 + (y497.x - e.stageX) / scaleFactor, t.y13 + (y497.y - e.stageY) / scaleFactor) } } function onLauncherMouseUp(e) { if (!isGamePaused) { var t = e.target.baseBlock, n = e.target, t = Math.atan2(e.stageY - t.startStageY, e.stageX - t.startStageX); isLaunched = !0; launchWaitTimer = 15; e = n.x + 600 * Math.cos(t); t = n.y + 600 * Math.sin(t); createjs.Tween.get(n).to({ x: e, y: t }, 1e3).to({ alpha: 0 }, 100).call(coinMoveEnd); playLaunchSound() } } function initSoundManager() { isDesktop() || createjs.Sound.registerPlugins([createjs.WebAudioPlugin]); (isAudioSupported = createjs.Sound.initializeDefaultPlugins()) && y286.push({ src: "button-36.ogg|button-36.mp3", id: "clickSound", data: 1 }, { src: "gamemusic.ogg|gamemusic.mp3", id: "y135", data: 1 }, { src: "launch.ogg|launch.mp3", id: "launch0", data: 1 }, { src: "launch2.ogg|launch2.mp3", id: "launch1", data: 1 }, { src: "launch3.ogg|launch3.mp3", id: "launch2", data: 1 }, { src: "launch4.ogg|launch4.mp3", id: "launch3", data: 1 }, { src: "bonuspick.ogg|bonuspick.mp3", id: "bonuspick", data: 1 }, { src: "icebreak.ogg|icebreak.mp3", id: "icebreak", data: 1 }, { src: "lose.ogg|lose.mp3", id: "lose", data: 1 }, { src: "electrodead.ogg|electrodead.mp3", id: "electrodead", data: 1 }, { src: "coin5.ogg|coin5.mp3", id: "coin", data: 1 }, { src: "buttonClick.ogg|buttonClick.mp3", id: "activator", data: 1 }, { src: "levelcomplete.ogg|levelcomplete.mp3", id: "levelcomplete", data: 1 }, { src: "star1sound.ogg|star1sound.mp3", id: "star1sound", data: 1 }, { src: "star2sound.ogg|star2sound.mp3", id: "star2sound", data: 1 }, { src: "star3sound.ogg|star3sound.mp3", id: "star3sound", data: 1 }) } function y141(e, t) { if (!isMute && isAudioSupported) return createjs.Sound.play(e, { interrupt: createjs.Sound.INTERRUPT_EARLY, loop: t ? -1 : 0 }) } function playInflateSound() { !isMute && isAudioSupported && (inflateSound ? inflateSound.play() : inflateSound = y141("inflateSound", !0)) } function stopInflateSound() { isAudioSupported && inflateSound && inflateSound.stop() } function y91() { (isMute = !isMute) ? stopBgMusic(): y452(); y301() } function y90() { y135 || y452() } function y452() { !isMute && isAudioSupported && (y135 ? y135.resume() : y135 = y141("y135", !0)) } function stopBgMusic() { isAudioSupported && y135 && y135.pause() } function playLaunchSound() { y141("launch" + Math.floor(4 * Math.random())) } function playConnectSound() { y141("bonuspick") } function playCoinSound() { y141("coin") } function initBonusField() { for (var e = 0; e < FIELD_CELLS; e++) { for (var t = [], n = 0; n < FIELD_ROWS; n++) t.push(BLOCK_SPACE_TYPE); bonusMap.push(t) } } function createBonus(e, t, n, r) { r || (r = "bonus" + t + "r" + n); e = getBonusFromPool(e, y390, r); e.setPos(getXByCell(t), getYByRow(n)); e.setIndex(t, n); isArrayContains(allBonuses, e) || (allBonuses.push(e), bonusMap[t][n] = e) } function updateActivators() { for (var e = 0; e < allBonuses.length; e++) allBonuses[e].checkActivating() } function getBonusCode() { for (var e = [], t = 0; t < allBonuses.length; t++) { var n = allBonuses[t], r = []; r.push(n.type); r.push(n.cell); r.push(n.row); e.push(r) } return e } function loadBonusesByCode(e) { if (e) for (var t = 0; t < e.length; t++) { var n = e[t]; createBonus(n[0], n[1], n[2]) } } function disposeBonuses() { var e = allBonuses.length, t; for (t = 0; t < e; t++) allBonuses.pop().dispose(); for (t = 0; t < FIELD_CELLS; t++) for (e = 0; e < FIELD_ROWS; e++) bonusMap[t][e] = BLOCK_SPACE_TYPE } function disposeBonusAt(e, t) { for (var n, r = 0; r < allBonuses.length; r++) { var i = allBonuses[r]; i.cell == e && i.row == t && (n = i) } n && n.dispose() } function y201Bonuses(e) { isArrayContains(disposedBonuses, e) || disposedBonuses.push(e) } function getBonusFromPool(e, t, n) { if (0 < disposedBonuses.length) { var r = disposedBonuses.pop(); r.reset(e, t, n); return r } return new BlockBonus(e, t, n) } function checkStarCollide(e, t, n) { 0 > t || t > FIELD_CELLS - 1 || 0 > n || n > FIELD_ROWS - 1 || (currentBon = bonusMap[t][n], currentBon != BLOCK_SPACE_TYPE && currentBon.type == STAR_TYPE && currentBon.setCollectChance(e)) } function updateStarsCollectionStatus(e) { for (var t = 0; t < allBonuses.length; t++) { var n = allBonuses[t]; n.type == STAR_TYPE && n.checkCollect(e) } } function resetStarsCollectionSteps() { for (var e = 0; e < allBonuses.length; e++) { var t = allBonuses[e]; t.type == STAR_TYPE && (t.collectSteps = 999, t.isNeedCollect = !1) } } function startStarCollection(e) { for (var t = 0; t < allBonuses.length; t++) { var n = allBonuses[t]; n.type === STAR_TYPE && n.startCollectAnim(e) } } function updateBonusManager() { for (var e = 0; e < allBonuses.length; e++) allBonuses[e].tick() } function initInterface() { y213 = y481(25, 25, .6, "pausebtn", onPressStandartHandler, null, onPauseUp); y213.alpha = .7; y244 = createjs.Ease.getElasticOut(1, .35); y58(); y81(); y148(); y270(); createMinigameInterface(); createBgForMenus(); createSky(); createBlinkWin(); createComix(); createSettingsWin(); y167(); y258(); isGamePaused = !0; isSkipMenus ? y231() : y245(!1) } function createSky() { skyCont = new createjs.Container; allClouds = []; currCloud = y481(500, 40, 1, "tuchka1", null, skyCont, null); currCloud.speed = 1; currCloud.posIndex = 0; currCloud.animName = "tuchka2"; allClouds.push(currCloud); currCloud = y481(500, 240, 1, "tuchka2", null, skyCont, null); currCloud.speed = 2; currCloud.posIndex = 1; currCloud.animName = "tuchka2"; allClouds.push(currCloud); currCloud = y481(500, 170, .7, "tuchka2", null, skyCont, null); currCloud.speed = 2; currCloud.posIndex = 2; currCloud.animName = "tuchka2"; allClouds.push(currCloud); lightsV = y481(getMaxLeft(), 0, 1.2, "lightsv", null, skyCont, null); lightsV.rotation = -90; y497.addChild(skyCont) } function updateCloudsSprite() { for (var e = 0; e < allClouds.length; e++) currCloud = allClouds[e], currCloud.gotoAndStop(currCloud.animName + BG_POSTFIX) } function updateSky() { lightsV.y = 20 * Math.cos(y87 / 100); for (var e = 0; e < allClouds.length; e++) if (currCloud = allClouds[e], currCloud.x += currCloud.speed * y327, 450 < currCloud.x) { currCloud.x = -200 - 100 * Math.random(); currCloud.speed = .5 + 2 * Math.random(); currCloud.y = y52 / 3 * currCloud.posIndex + y199() / 2 + 10 + 100 * Math.random(); setSpriteScale(currCloud, .7 * Math.random() + .4); var t = .5 < Math.random() ? "tuchka1" : "tuchka2"; currCloud.animName = t; currCloud.gotoAndStop(t + BG_POSTFIX) } } function setCloudsVisibility(e) { for (var t = 0; t < allClouds.length; t++) allClouds[t].visible = e } function createBgForMenus() {} function showBgForMenus(e) {} function hideBgForMenus(e) {} function showFPSMeter() { isNeedFpsMeter && y110(y356, y497) } function y231() { y213.parent || y497.addChild(y213); showFPSMeter(); showIngameSponsorLogo() } function y181() { y213.parent && y497.removeChild(y213) } function onPauseUp(e) { isGamePaused || isLevelCompleted || (y380(e.target), isCursorOutMoved(e) || (y141("clickSound"), y173())) } function y100() { y348 = new createjs.Container; y503 = y481(-1, 0, 10, "tintbg", null, y348, null); y503.scaleY = 9.8; y257 = y481(160, 172, 1, "playbtnup", y475, y348, y305); y106 = y481(160, 250, 1, "notcollidegrow", null, y348, null); y106.visible = !1; y227 = new y514(y230, "level", 1, 5, 9, 160, 60, "#FAEE97", "#981623", 34, "center", y348, !1, !0) } function y475(e) { isGamePaused && (e.target.gotoAndStop("downplaybtn"), e.target.scaleX = e.target.scaleY = 1.1) } function y305(e) { isGamePaused && (e.target.gotoAndStop("playbtnup"), e.target.scaleX = e.target.scaleY = 1, isCursorOutMoved(e) || (y353(), isGamePaused = !1, y141("clickSound"))) } function y489() { isGamePaused = !0; y503.mouseEnabled = !0; y227.setText("level", (y50 + 1).toString()); createjs.Tween.removeTweens(y348); y348.alpha = 1; isInstructionExist ? (y257.y = 172, y227.setPos(160, 60)) : (y257.y = 222, y227.setPos(160, 110)); y348.parent || y497.addChild(y348) } function y353() { y503.mouseEnabled = !1; createjs.Tween.removeTweens(y348); y348.alpha = 1; createjs.Tween.get(y348, { override: !0 }).to({ alpha: 0 }, 250).call(y411) } function y334() { y367 = new createjs.Container; y481(-1, 0, 10, "tint2", null, y367).scaleY = 9.8; y68 = new y514(y230, "tryagain", 2, 6, 13, 160, 193, "#FAEE97", "#981623", 40, "center", y367, !1, !1); y45 = new y514(y230, "lostallfish", 2, 6, y259, 160, 125, "#FAEE97", "#981623", 20, "center", y367, !1, !0); y97 = y481(160, 283, 1, "restartbtn", y112, y367, y309); y95 = y481(160, 49, 1, "moreeasybtn", onMoreEasyPress, y367, onMoreEasyUp) } function onMoreEasyPress(e) { e.target.scaleX = e.target.scaleY = 1.1 } function onMoreEasyUp(e) { e.target.scaleX = e.target.scaleY = 1; isCursorOutMoved(e) || (MORE_EASY_MULT += .5, y425(), y507(), y92(), y141("clickSound")) } function y112(e) { e.target.scaleX = e.target.scaleY = 1.1 } function y309(e) { e.target.scaleX = e.target.scaleY = 1; isCursorOutMoved(e) || (y425(), y507(), y92(), y141("clickSound")) } function y117() { y367.parent || y497.addChild(y367); isLevelRestarted = !0; disposeInstructions(); y68.updateCache(); y45.updateCache(); y92(); createjs.Tween.removeTweens(y367); y367.alpha = 0; createjs.Tween.get(y367, { override: !0 }).to({ alpha: 1 }, 300); var e = createjs.Ease.bounceOut; y97.scaleX = y97.scaleY = 1; createjs.Tween.get(y97, { override: !0, loop: !0 }).to({ scaleX: 1.2, scaleY: 1.2 }, 3e3, e).wait(1e3).to({ scaleX: 1, scaleY: 1 }, 3e3, e); y141("restartSound") } function y425() { y206(y367); createjs.Tween.removeTweens(y97) } function y58() { y234 = new createjs.Container; y347Btn = y481(160, 330, .5, "moregamesbtn", y254, y234, null); y210 = y481(161, 300, 1, "playbtnup", null, y234, y365); y428 = y481(240, 228, .8, "btnbaseup", onPressStandartHandler, y234, y71); settingsBtn = y481(240, 228, .7, "settingsicon", onPressStandartHandler, y234, onSettingsUp); y267 = y481(80, 228, .5, "musiconbtn", onPressStandartHandler, y234, y125); isAudioSupported || (y267.visible = !1) } function onMainMenuPlayPress(e) { y506(e.target) } function y125(e) { y380(e.target); isCursorOutMoved(e) || (y91(), y399(e.target), y141("clickSound")) } function y399(e) { e.gotoAndStop(isMute ? y184 : UNy184) } function y245(e) { setCloudsVisibility(!1); setBgByLevel(0, !0, 2); y497.addChild(y234); y399(y267); y210.scaleX = y210.scaleY = .7; showFPSMeter(); y379(160, 378, 1, y234, 1, y496, y73, 2, 0); e ? (y234.x = -400, y234.alpha = 0, createjs.Tween.removeTweens(y234), createjs.Tween.get(y234, { override: !0 }).to({ alpha: 1, x: 0 }, 1300, y244).call(y245TweenComplete)) : y58Tweens() } function y245TweenComplete(e) { y58Tweens() } function y203() { disposeMainMenuTweens(); createjs.Tween.get(y234, { override: !0 }).to({ alpha: 0, x: -400 }, 200).call(y203TweenComplete) } function y203TweenComplete(e) { e = e.target; e.alpha = 1; y210.scaleX = y210.scaleY = 1; e.parent && y497.removeChild(e) } function y443(e, t) { return y481(e + ow / 2, t + oh / 2, 1, "bigbgwindow", null, null, null) } function y58Tweens() { y210.scaleX = y210.scaleY = .7; createjs.Tween.get(y210, { override: !0, loop: !0 }).to({ scaleX: .8, scaleY: .8 }, 1500, createjs.Ease.sineIn).to({ scaleX: .7, scaleY: .7 }, 1500, createjs.Ease.sineIn) } function disposeMainMenuTweens() { createjs.Tween.removeTweens(y210) } function y88(e) {} function y365(e) { isCursorOutMoved(e) || (y141("clickSound"), y203(), y337(), y90()) } function onAchievGalleryPress(e) { y506(e.target) } function onAchievGalleryUp(e) { y380(e.target); isCursorOutMoved(e) || y141("clickSound") } function y417(e) { y506(e.target); y96("play credits!") } function onSettingsUp(e) { y380(e.target); isCursorOutMoved(e) || (y141("clickSound"), y203(), showSettingsWin()) } function y71(e) { y380(e.target); isCursorOutMoved(e) || (y141("clickSound"), y203(), y247()) } function y481(e, t, n, r, i, s, o) { var u = new createjs.Sprite(y355); u.x = e; u.y = t; u.scaleX = u.scaleY = n; u.gotoAndStop(r); u.defaultScale = n; o && u.addEventListener("pressup", o, !1); i && u.addEventListener("mousedown", i, !1); i || o ? (u.cursor = "pointer", (e = y355.getAnimation(r)) && e.frames && 0 < e.frames.length && (e = y355.getFrameBounds(e.frames[0]), u.setBoundingBox(e.x * n, e.y * n, e.width * n, e.height * n))) : u.mouseEnabled = !1; s && s.addChild(u); return u } function y81() { y284 = new createjs.Container; y284.name = "levelselcont"; y343 = new createjs.Container; y343.name = "y343"; y253 = new createjs.Container; y316 = y481(30, 270, .6, "backbtn", onPressStandartHandler, y343, y217); y421(); y284.addChild(y343); y284.y = 30; y481(240, 335, .5, "moregamesbtn", y254, y343, null) } function y427(e, t, n, r) { return new createjs.Shadow(n, e, t, r) } function y196(e) { y85.push(e) } function y377(e) { e.cache(-10, -10, ow + 20, oh + 20) } function uny196(e) { e.uncache() } function onPressStandartHandler(e) { y506(e.target) } function y421() { for (var e = 0; e < y208; e++) { var t = Math.floor(e / 4), t = y481(60 + 10 * t + 60 * (e % 4), 33 + 60 * t, .8, "lvlLabelStar0", onPressStandartHandler, y343, y294); t.levelNum = e; y113.push(t); var n = new createjs.BitmapText("", y355); n.scaleX = n.scaleY = .6; n.letterSpacing = 0; n.x = t.x; n.postfix = "i"; y124(t.x, t.y - 18, (e + 1).toString(), n); n.y = t.y - 18; n.mouseEnabled = !1; t.txtNum = n } } function y504() { for (var e = 0; e < y208; e++) { var t = e <= y345; isOpenAllLevels && (t = !0); var n; n = t ? "lvlLabelStar" + y191(e) : "levelbuttonlocked"; var r = y113[e]; r.gotoAndStop(n); (r.isOpened = t) ? r.txtNum.parent || r.parent.addChild(r.txtNum): r.txtNum.parent && r.parent.removeChild(r.txtNum) } } function y294(e) { var t = e.target; y380(e.target); isCursorOutMoved(e) || (t.isOpened ? (y389 = 0, y291(), 1 > t.levelNum ? showComix() : (y192(t.levelNum), y187(), y231(), hideBgForMenus(!0))) : y141("clickSound")) } function y265(e) {} function y217(e) { y380(e.target); isCursorOutMoved(e) || (y291(), y245(!0), startBlink(700, "tint2"), y141("clickSound")) } function y493(e) { isTweened(y343) || (e = e.target, e.scaleX = e.scaleY = 1.2, y343.updateCache()) } function y224(e) { var t = e.target; t.scaleX = t.scaleY = 1; isCursorOutMoved(e) ? y343.updateCache() : (y343.x = 0, y343.alpha = 1, createjs.Tween.get(y343, { override: !0 }).to({ alpha: 0, x: -400 }, 300).call(y411), y284.addChild(y253), y253.x = 200, y253.updateCache(), y253.alpha = 0, createjs.Tween.get(y253, { override: !0 }).to({ alpha: 1, x: 0 }, 700, createjs.Ease.bounceOut), y141("clickSound")) } function y239(e) { isTweened(y253) || (e = e.target, e.scaleX = e.scaleY = 1.2, y253.updateCache()) } function y426(e) { var t = e.target; t.scaleX = t.scaleY = 1; isCursorOutMoved(e) ? y253.updateCache() : (y253.x = 0, y253.alpha = 1, createjs.Tween.get(y253, { override: !0 }).to({ alpha: 0, x: 400 }, 300).call(y411), y343.x = -200, y284.addChild(y343), y343.updateCache(), y343.alpha = 0, createjs.Tween.get(y343, { override: !0 }).to({ alpha: 1, x: 0 }, 700, createjs.Ease.bounceOut), y141("clickSound")) } function y337() { y497.addChild(y284); setBgByLevel(0, !0, 0); y504(); y343.parent || y284.addChild(y343); y343.x = 0; y343.alpha = 1; y284.x = 400; y284.alpha = 0; createjs.Tween.get(y284, { override: !0 }).to({ alpha: 1, x: 0 }, 1300, y244); startBlink(400, "tint2"); y379(120, 338, .8, y284, 1, y496, y444, 2, 0) } function y291() { createjs.Tween.removeTweens(y284); createjs.Tween.get(y284, { override: !0 }).to({ alpha: 0, x: 400 }, 200).call(y411) } function y187() { createjs.Tween.removeTweens(y390); y390.parent || y497.addChild(y390); y390.alpha = 0; y390.visible = !0; createjs.Tween.get(y390, { override: !0 }).to({ alpha: 1 }, 400); showIngameSponsorLogo() } function y438(e, t) { isGamePaused = !0; createjs.Tween.removeTweens(y390); createjs.Tween.get(y390, { override: !0 }).to({ alpha: 0, visible: !1 }, t ? t : 50).call(y206) } function y148() { y136 = new createjs.Container; y136.x = 160; y136.y = 192; levelCompleteBg = y481(0, 0, 1, "lvlcompletebgnew", null, y136); y121 = y481(65, 60, .8, "backbtn", onPressStandartHandler, y136, y197); y121.rotation = -180; y481(-65, 60, .6, "restartbtn", onPressStandartHandler, y136, y248); star1 = y481(-71, -29, 1, "completestar"); star2 = y481(0, -60, 1, "completestar"); star3 = y481(71, -29, 1, "completestar"); y256 = new y514(y230, "nothing", 1, 5, 10, 140, 65, "#DAFFEE", "#FB69FF", 70, "center", y136, !1, !1); y256 = new createjs.BitmapText("0", y355); y256.scaleX = y256.scaleY = .8; y256.y = -5; y256.mouseEnabled = !1; y136.addChild(y256); moreGamesLvlCompleteBtn = y481(-95, 145, .6, "moregamesbtn", y254, y136, null) } function y248(e) { y380(e.target); isCursorOutMoved(e) || (y141("clickSound"), MORE_EASY_MULT = 1, y507(), y389 = 0, y187(), y384()) } function y197(e) { y380(e.target); isCursorOutMoved(e) || (y141("clickSound"), y384(), e = y240(), -1 < e ? y467(e) : y50 >= y208 - 1 ? (y181(), disposeLevel(), y174()) : (y131(), y390.alpha = 1, y390.visible = !0, startBlink(700, "tint2"))) } function y487() { isLevelCompleted || (y181(), y124(0, null, (y50 + 1).toString(), y256), createjs.Tween.get(y390, { override: !0 }).wait(600).call(startLevelCompleteScreen), y50StarsNum = y126, levelCollectedStarsNum >= levelTotalStarsNum ? y50StarsNum = y94 : 0 < levelCollectedStarsNum && (y50StarsNum = y138), y101(y50StarsNum), y141("winSound")) } function startLevelCompleteScreen(e) { disposeInstructions(); createjs.Tween.removeTweens(y136); y206(star1); y206(star2); y206(star3); setBgByLevel(0, !0, 3); setCloudsVisibility(!1); lightsV.visible = !1; y390.visible = !1; shadowContainer.visible = !1; y110(y136, y497); setParticlesToFront(); y136.scaleX = y136.scaleY = .6; y136.alpha = 0; createjs.Tween.get(y136, { override: !0 }).wait(500).to({ alpha: 1, scaleX: 1, scaleY: 1 }, 1e3, y244).call(y166); startBlink(700, "tint2"); y141("levelcomplete"); isMinigame ? (y379(160, 378, .8, y497, 1, y496, y73, 2), timerIcon.visible = txtMinigameTimer.visible = !1) : y379(160, 378, .8, y497, 1, y496, y73, 2); updateMinigameFinishInterface(); y303(); startSponsorAds() } function y166(e) { y205(star1, 20, 1, "star1sound"); y50StarsNum >= y138 && y205(star2, 600, 1, "star2sound"); y50StarsNum >= y94 && y205(star3, 1200, 1, "star3sound") } function y205(e, t, n, r) { y136.addChild(e); e.alpha = 0; e.scaleX = e.scaleY = .2; e.rotation = 0; createjs.Tween.get(e, { override: !0 }).wait(t).call(function() { y141(r) }).to({ alpha: 1, rotation: 360, scaleX: n, scaleY: n }, 400).call(function() { y53Explode(e.x + 160, e.y + 190, 8, y160, null, 1) }) } function y384() { createjs.Tween.removeTweens(star1); createjs.Tween.removeTweens(star2); createjs.Tween.removeTweens(star3); createjs.Tween.removeTweens(y136); y206(y136); y231() } function y270() { y162 = new createjs.Container; y481(78, 210, .8, "quitbtn", onPressStandartHandler, y162, y372); y288 = y481(160, 210, .8, "musiconbtn", onPressStandartHandler, y162, y80); isAudioSupported || (y288.visible = !1); y481(243, 210, .8, "restartbtn", onPressStandartHandler, y162, y490); y448 = y481(162, 122, 1, "playbtnup", onPressStandartHandler, y162, y158); y481(160, 300, .7, "moregamesbtn", y254, y162, null) } function y80(e) { y380(e.target); isCursorOutMoved(e) || (y91(), y399(e.target), isMute || y141("clickSound")) } function y490(e) { y380(e.target); isCursorOutMoved(e) || (y141("clickSound"), y119(!1, !1), y187(), y507(), hideBgForMenus()) } function y372(e) { y380(e.target); isCursorOutMoved(e) || (y141("clickSound"), isGamePaused = !0, disposeLevel(), y438(!0, 1), y119(!1, !0), y245(!0), startBlink(700, "tint2")) } function y158(e) { y380(e.target); isCursorOutMoved(e) || (y141("clickSound"), y119(!1, !1), showIngameSponsorLogo()) } function showIngameSponsorLogo() { if (isMinigame) y379(160, 23, .8, y497, 1, y496, y280, 2); else switch (y115LogoPos[y50]) { default: y379(160, 378, .8, y497, 1, y496, y73, 2) } } function y173() { isGamePaused || isLevelCompleted || (isGamePaused = !0, stopInflateSound(), y181(), y399(y288), showBgForMenus(), y497.addChild(y162), y162.x = -400, y162.y = -250, y162.alpha = 0, createjs.Tween.get(y162).to({ alpha: 1, x: 0, y: 0 }, 1300, y244), y379(160, 30, .9, y162, 1, y496, y280, 2, 0)) } function y119(e, t) { isGamePaused = !1; createjs.Tween.removeTweens(y162); createjs.Tween.get(y162).to({ alpha: 0, x: 400, y: 700 }, 300).call(y411); t || y231() } function y430() { y212 = new createjs.Container; y481(-1, 0, 10, "tintbg", null, y212).scaleY = 9.8; y508 = new y514(y230, "newachiev", 3, 6, 16, 160, 30, "#E44959", "#981422", 34, "center", y212, !1, !1); y481(160, 313, 1, "nextlevelwin", y480, y212); y66 = y481(160, 162, 1.34, "y66v", null, y212); y481(160, 172, 1, "achievbtn", null, y212).rotation = 10; y469 = new y514(y230, "nothing", 1, 4, 30, 160, 253, "#FAEE97", "#981623", 20, "center", y212, !1, !1) } function y480(e) { y447(); y50 >= y208 - 1 ? (y181(), disposeLevel(), y174()) : (y231(), y131(), y187()) } function y467(e) { y212.parent || y497.addChild(y212); disposeLevel(); y92(); y181(); y508.updateCache(); y66.rotation = 0; createjs.Tween.get(y66, { override: !0, loop: !0 }).to({ rotation: 180 }, 4e3); y96("achiev" + Math.round(e)); y469.setText("achiev" + Math.round(e)); y200[e] = y371; y283(); createjs.Tween.removeTweens(y212); y212.alpha = 0; createjs.Tween.get(y212, { override: !0 }).to({ alpha: 1 }, 300).call(function() { y141("achievSound") }) } function y447() { createjs.Tween.removeTweens(y66); y206(y212) } function y240() { return -1 } function isAlreadyAchieved(e) { return y200[e] == y371 } function y398() { y176 = new createjs.Container; y176.addChild(y443(0, 0)); y481(32, 41, .45, "achievbtn", null, y176).rotation = -14; y481(290, 41, .45, "achievbtn", null, y176).rotation = 12; y424 = new y514(y230, "achievements", 3, 6, 12, 160, 22, "#E44959", "#981422", 32, "center", y176, !0, !1); y61(); y120 = y481(32, 322, 1, "backbtn", y129, y176, y242) } function y61() { for (var e = 0; e < y369; e++) { var t = 30 * e; if (0 != e % 2) { var n = y481(5, 53 + t, 1, "tintbg", null, y176, null); n.scaleX = 9.8; n.scaleY = .75 } n = y481(160, 66 + t, 1, "achievclosed", null, y176, null); t = new y514(y230, "achiev" + e.toString(), 1, 4, 30, 160, 66 + t, "#FAEE97", "#981623", 20, "center", y176, !1, !1); n.txt = t; y378.push(n) } } function y260() { for (var e = 0; e < y369; e++) { var t, n = y378[e]; y200[e] == y371 ? (n.visible = !1, n.txt.setVisibility(!0), n.txt.updateCache()) : (n.txt.setVisibility(!1), n.visible = !0, t = "achievclosed"); n.gotoAndStop(t) } } function y129(e) { e = e.target; e.scaleX = e.scaleY = 1.2; y176.updateCache() } function y242(e) { var t = e.target; t.scaleX = t.scaleY = 1; isCursorOutMoved(e) ? y176.updateCache() : (y141("clickSound"), y432(), y245(!0)) } function y219() { y497.addChild(y176); y260(); y424.updateCache(); y196(y176); y176.x = 400; y176.alpha = 0; createjs.Tween.get(y176, { override: !0 }).to({ alpha: 1, x: 0 }, 1300, y244) } function y432() { createjs.Tween.removeTweens(y176); createjs.Tween.get(y176, { override: !0 }).to({ alpha: 0, x: 400 }, 200).call(y285) } function y167() { y67 = new createjs.Container; y481(160, 311, .7, "backbtn", onPressStandartHandler, y67, y154); y481(160, 150, 1, "biglimetxt", null, y67) } function y363(e) { window.open("http://porubov.com", "_blank") } function y161(e) { window.location = "mailto:seddas@gmail.com?subject=BattleFish" } function y154(e) { y380(e.target); isCursorOutMoved(e) || (y141("clickSound"), y435(), y245(!0)) } function y247() { setBgByLevel(0, !0, 1); y497.addChild(y67); y67.x = 400; y67.alpha = 0; createjs.Tween.get(y67, { override: !0 }).to({ alpha: 1, x: 0 }, 1300, y244); startBlink(700, "tint2"); y379(160, 378, 1, y67, 1, y496, y73, 2, 0) } function y435() { y206(y67); startBlink(500, "tint2") } function y258() { y341 = new createjs.Container; y481(160, 260, .7, "quitbtn", onPressStandartHandler, y341, y243); y481(160, 130, 1, "thanksv", null, y341); y341.addChild(y405); y481(160, 325, .5, "moregamesbtn", y254, y341, null) } function y243(e) { y380(e.target); isCursorOutMoved(e) || (y393(), y245(!0), startBlink(700, "tint2"), y141("clickSound")) } function y174() { isGameCompleteScreenShow = !0; y110(y341, y497); y341.x = 400; y341.alpha = 0; createjs.Tween.get(y341, { override: !0 }).to({ alpha: 1, x: 0 }, 1300, createjs.Ease.elasticOut); y379(160, 378, .8, y341, 1, y496, y73, 2) } function y393() { isGameCompleteScreenShow = !1; y415(); createjs.Tween.removeTweens(y341); y206(y341) } function y285(e) { e = e.target; uny196(e); e.parent && e.parent.removeChild(e) } function y411(e) { e = e.target; e.parent && e.parent.removeChild(e) } function isTweened(e) { return createjs.Tween.hasActiveTweens(e) } function isCursorOutMoved(e) { if (!isDesktop()) return !1; y150 = e.target.globalToLocal(e.stageX, e.stageY); return !e.target.hitTest(y150.x, y150.y) } function createMinigameInterface() { minigameContainer = new createjs.Container; minigameContainer.winscope = this; timerIcon = y481(23, 335, .8, "timerv", null, minigameContainer); coinsIcon = y481(232, 335, .8, "coininterface", null, minigameContainer); txtMinigameTimer = new createjs.BitmapText("0", y355); txtMinigameTimer.scaleX = txtMinigameTimer.scaleY = .5; txtMinigameTimer.mouseEnabled = !1; minigameContainer.addChild(txtMinigameTimer); txtMinigameCoins = new createjs.BitmapText("0", y355); txtMinigameCoins.scaleX = txtMinigameCoins.scaleY = .4; txtMinigameCoins.mouseEnabled = !1; minigameContainer.addChild(txtMinigameCoins) } function showMinigameInterface() { minigameContainer.parent || y497.addChild(minigameContainer); timerIcon.visible = txtMinigameTimer.visible = !0; showIngameSponsorLogo() } function hideMinigameInterface() { minigameContainer.parent && y497.removeChild(minigameContainer) } function y303() { y213.x = 24 + y170(); y213.y = 25 + y199() / 2; timerIcon.x = 23 + y170(); timerIcon.y = 379 - y199() / 2; coinsIcon.x = 242 - y170(); coinsIcon.y = 379 - y199() / 2; moreGamesLvlCompleteBtn.x = 0; isMinigameFinished && (coinsIcon.x = 200 - y170(), coinsIcon.y = 335 - y199() / 2, moreGamesLvlCompleteBtn.x = -102 + y170()); txtMinigameTimer.y = timerIcon.y - 14; txtMinigameTimer.x = timerIcon.x + 24; txtMinigameCoins.y = coinsIcon.y - 11; txtMinigameCoins.x = coinsIcon.x + 22; moreGamesLvlCompleteBtn.y = 135 - y199() / 2; y428.x = 293 - y170(); y428.y = 316 - y199() / 2; settingsBtn.x = 293 - y170(); settingsBtn.y = 369 - y199() / 2; y347Btn.x = 50 + y170(); y347Btn.y = 371 - y199() / 2; y267.x = 30 + y170(); y267.y = 324 - y199() / 2; isNeedFpsMeter && (y356.x = ow - 27 - y170(), y356.y = y199() / 2); y147() } function createBlinkWin() { blinkWin = y481(-18, -122, 7, "tint2"); blinkWin.scaleX = 4 } function startBlink(e, t) { y110(blinkWin, y497); blinkWin.alpha = 1; blinkWin.gotoAndStop(t); createjs.Tween.get(blinkWin, { override: !0 }).to({ alpha: 0 }, e).call(y411) } function createComix() { comixCont = new createjs.Container; comixFrame1 = y481(0, 0, 1, "comixv1", null, comixCont); comixFrame2 = y481(0, 0, 1, "comixv2", null, comixCont); comixFrame3 = y481(0, 0, 1, "comixv3", null, comixCont); comixFrame3.rotation = -90; comixNextBtn = y481(0, 0, .6, "backbtn", onPressStandartHandler, comixCont, onNextComixPress); comixNextBtn.rotation = 180 } function showComix() { setBgByLevel(0, !0, 3); startBlink(700, "tint2"); comixIndex = 0; lightsV.visible = !1; y497.addChild(comixCont); comixNextBtn.x = 160; comixNextBtn.y = 240; comixNextBtn.alpha = 0; comixFrame2.visible = comixFrame3.visible = !1; comixFrame1.visible = !0; comixFrame1.alpha = 0; createjs.Tween.get(comixFrame1, { override: !0 }).wait(800).to({ alpha: 1 }, 1e3); createjs.Tween.get(comixNextBtn, { override: !0 }).wait(1800).to({ alpha: 1 }, 1e3); y379(160, 378, .9, comixCont, 1, y496, y73, 2) } function onNextComixPress(e) { y380(e.target); isCursorOutMoved(e) || (0 === comixIndex ? (comixIndex++, comixFrame2.y = 178, comixFrame2.visible = !0, comixFrame2.alpha = 0, createjs.Tween.get(comixFrame2, { override: !0 }).to({ alpha: 1 }, 1e3), comixNextBtn.alpha = 0, comixNextBtn.x = 270, comixNextBtn.y = 310, createjs.Tween.get(comixNextBtn, { override: !0 }).wait(1e3).to({ alpha: 1 }, 1e3)) : 1 === comixIndex ? (comixIndex++, comixFrame1.visible = !1, comixFrame2.visible = !1, comixFrame3.visible = !0, comixFrame3.alpha = 0, createjs.Tween.get(comixFrame3, { override: !0 }).to({ alpha: 1 }, 1e3), comixNextBtn.alpha = 0, comixNextBtn.x = 270, comixNextBtn.y = 310, createjs.Tween.get(comixNextBtn, { override: !0 }).wait(1e3).to({ alpha: 1 }, 1e3)) : 2 === comixIndex && (y206(comixCont), y192(0), y187(), y231(), startBlink(400, "tint2")), y141("clickSound")) } function createSettingsWin() { settingsContainer = new createjs.Container; y481(160, 311, .7, "backbtn", onPressStandartHandler, settingsContainer, onSettingsQuitUp); settingsQualityBtn = y481(160, 140, 1, "qualityhigh", onPressStandartHandler, settingsContainer, onQualityUp); settingsShadowsBtn = y481(160, 230, 1, "shadowson", onPressStandartHandler, settingsContainer, onShadowsUp) } function onQualityUp(e) { y380(e.target); isCursorOutMoved(e) || (isLowQuality = !isLowQuality, updateQualityState(!0), y141("clickSound")) } function updateQualityState(e) { settingsQualityBtn.gotoAndStop(isLowQuality ? "qualitylow" : "qualityhigh"); e && (y69(), y283()) } function onShadowsUp(e) { y380(e.target); isCursorOutMoved(e) || (isShadowDisabled = !isShadowDisabled, y209sState(!0), y141("clickSound")) } function y209sState(e) { settingsShadowsBtn.gotoAndStop(isShadowDisabled ? "shadowsoff" : "shadowson"); isShadowDisabled && (shadowContainer.visible = !1); e && y283() } function onSettingsQuitUp(e) { y380(e.target); isCursorOutMoved(e) || (hideSettingsWin(), y245(!0), y141("clickSound")) } function showSettingsWin() { y209sState(!1); updateQualityState(!1); y110(settingsContainer, y497); settingsContainer.x = 400; settingsContainer.alpha = 0; createjs.Tween.get(settingsContainer, { override: !0 }).to({ alpha: 1, x: 0 }, 1300, y244); startBlink(700, "tint2"); y379(160, 378, 1, settingsContainer, 1, y496, y73, 2, 0) } function hideSettingsWin() { y206(settingsContainer); startBlink(500, "tint2") } function y254(e) { window.open(y431, "_blank") } function initResizeManager() { window.addEventListener("resize", y510); canvas.addEventListener("touchstart", y211); window.onorientationchange = y364; y69() } function y69() { try { var e = window.innerWidth, t = window.innerHeight; zoomFactor = 1; if (isLowQuality) { var n = Math.min(e / minW, t / minH); zoomFactor = Math.max(1, Math.min(2, n * n)); e /= zoomFactor; t /= zoomFactor } n = "scale(" + zoomFactor + "," + zoomFactor + ")"; canvas.style.transform = n; canvas.style.msTransform = n; canvas.style.MozTransform = n; canvas.style.WebkitTransform = n; canvas.style.OTransform = n; scaleFactor = Math.min(e / minW, t / minH); stage.scaleX = 1; stage.scaleY = 1; stage.canvas.width = Math.min(e, maxW * scaleFactor); stage.canvas.height = Math.min(t, maxH * scaleFactor); if (isDesktop() && !isMobileResizeOnly) { var n = 10, r = y373("scale"); r && (n = parseFloat(r)); scaleFactor = Math.min(e / y308, t / y463); scaleFactor = Math.min(scaleFactor, n / zoomFactor); stage.canvas.width = Math.min(e, y308 * scaleFactor); stage.canvas.height = Math.min(t, y463 * scaleFactor) } stage.canvas.style.marginTop = "0px"; stage.canvas.style.marginLeft = "0px"; stage.canvas.style.left = Math.floor((e * zoomFactor - stage.canvas.width) / 2) + "px"; stage.canvas.style.top = Math.floor((t * zoomFactor - stage.canvas.height) / 2) + "px"; y52 = stage.canvas.height / scaleFactor; y332 = stage.canvas.width / scaleFactor; topVisionLine = -(y52 - oh); stage.autoClear = !1; y497.scaleX = scaleFactor; y497.scaleY = scaleFactor; y497.x = Math.round((stage.canvas.width - ow * scaleFactor) / 2); y497.y = Math.round((stage.canvas.height - oh * scaleFactor) / 2); y464 && (y464.scaleX = y497.scaleX, y464.scaleY = y497.scaleY, y464.x = y497.x, y464.y = y497.y); y494 = e; y366 = t; timer = null; isAllFilesLoaded && isGameInited && (y303(), mainBg.y = 2 === mainBgIndex || 3 === mainBgIndex ? y199() / 2 : -150); y420 && (y420.y = Math.floor((y497.height - y163) / 2)); stage.update() } catch (i) { window.alert(i.name + ":" + i.message) } } function isNeedCanvasZoom(e, t) { return 1.2 <= Math.min(e / minW, t / minH) } function y470() { return -(y52 - oh) / 2 } function y199() { return -(y52 - oh) } function y170() { return -(y332 - ow) / 2 } function getMaxLeft() { return -(maxW - ow) / 2 } function getMaxRight() { return maxW + getMaxLeft() } function getMaxTop() { return -(maxH - oh) } function y364(e) { setTimeout(y140, 50); y510(null) } function y140() { window.scrollTo(0, 1) } function y211(e) { window.innerHeight != y366 && y510(null); e.preventDefault(); e.stopPropagation(); e.cancelBubble = !0; return e.returnValue = !1 } function y510(e) { clearTimeout(timer); setTimeout(y69, 100); y96("on Win Resize") } function y319() { if (isHiDPI()) { var e = document.createElement("meta"); e.name = "viewport"; e.content = "target-densitydpi=device-dpi, user-scalable=0, initial-scale=0.5, maximum-scale=0.5, minimum-scale=0.5"; document.getElementsByTagName("head")[0].appendChild(e) } } function isHiDPI() { return !window.hasOwnProperty("devicePixelRatio") || -1 == navigator.userAgent.indexOf("iPhone") && -1 == navigator.userAgent.indexOf("iPad") || 2 != window.devicePixelRatio ? !1 : !0 } function y373(e) { return decodeURIComponent((RegExp("[?|&]" + e + "=([^&;]+?)(&|#|;|$)").exec(location.search) || [, ""])[1].replace(/\+/g, "%20")) || null } function isMobileDetected(e) { return /(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|android|ipad|playbook|silk|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od|ad)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(e) || /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(e.substr(0, 4)) } function initSpilApi() { try { GameAPI.loadAPI(function(e) { sponsorApi = e }) } catch (e) { isSponsorLogoError = !0, y96("error init!"), isAllFilesLoaded && startGame() } } function y339Error(e) { y96("Logo loading error!"); isSponsorLogoError = !0 } function handleSponsorLogoComplete(e) { if (!isSponsorLogoError) try { y328 || y306(); y96("logo loaded!"); var t = y388.sponsorLogoImg, n = sponsorLogoDefWidth = t.width, r = sponsorLogoDefHeight = t.height, i = sponsorLogoBitmap = (new createjs.Bitmap(t)).set({ scaleX: 1, scaleY: 1, regX: 0, regY: 0, cursor: "pointer", x: 0, y: 0 }); i.isOnlyBoundsCheck = !0; i.setBoundingBox(0, 0, 1 * n, 1 * r); i.addEventListener("mousedown", y254); y328.addChild(i); y420 && y379(160, 80, 1, y420, 1, y496, y444, 2); isLogoReady = !0 } catch (s) { isSponsorLogoError = !0, y96("logo error!") } isAllFilesLoaded && startGame() } function isDesktop() { return isDesktopBrowser } function y415() { y454 = isDesktopBrowser ? 50 : 30 } function y318() { isDesktopBrowser = !isMobileDetected(navigator.userAgent || navigator.vendor || window.opera); var e = y373("mobile"); e && 1 == parseInt(e) && (isDesktopBrowser = !1); y415() } function initLoaders() { loaderColor = createjs.Graphics.getRGB(247, 247, 247); y420 = new createjs.Container; bar = new createjs.Shape; bar.graphics.beginFill(loaderColor).drawRect(0, 0, 1, y163).endFill(); y152 = 300; var e = new createjs.Shape; e.graphics.setStrokeStyle(2).beginStroke(loaderColor).drawRect(-3, -3, y152 + 6, y163 + 6); y420.x = y497.width - y152 >> 1; y420.y = y497.height - y163 >> 1; y420.addChild(bar, e); y497.addChild(y420); initSoundManager(); y252 = new createjs.LoadQueue(!0, "assets/"); y252.installPlugin(createjs.Sound); y252.addEventListener("progress", handleProgress); y252.addEventListener("complete", y346); y252.addEventListener("fileload", y339); y252.loadManifest(y286); createjs.Ticker.timingMode = createjs.Ticker.RAF_SYNCHED; isDefaultAndroid() && (createjs.Ticker.timingMode = createjs.Ticker.TIMEOUT); createjs.Ticker.setFPS(FPS) } function isDefaultAndroid() { var e = navigator.userAgent; return -1 < e.indexOf("Mozilla/5.0") && -1 < e.indexOf("Android ") && -1 < e.indexOf("AppleWebKit") && !(-1 < e.indexOf("Chrome")) } function handleProgress(e) { 0 != e.total && (bar.scaleX = e.loaded / e.total * y152, stage.update()) } function y339(e) { "image" == e.item.type && (images[e.item.id] = e.result); y388[e.item.id] = e.result; if (!isPreloaderLogoReady && "y252erlogo" == e.item.id) { isPreloaderLogoReady = !0; var t = e.result; e = t.width; var n = t.height, t = (new createjs.Bitmap(t)).set({ scaleX: .75, scaleY: .75, regX: e / 2, regY: n / 2, cursor: "pointer", x: ow / 2, y: 20 + .75 * n }); t.setBoundingBox(-e / 2, -n / 2, e, n); t.addEventListener("mousedown", y254); y420.addChild(t) } } function startGame() { y96("game start!"); isGameInited || (isGameInited = !0, y206(y420), y420 = null, configureCoinsSpritesheet(), y457(), y230 = new y515, isDefaultAndroid() && (isShadowDisabled = isLowQuality = !0), y241(), initField(), initBonusField(), initParticleManager(), y58(), createFrontBg(), isNeedFpsMeter && (y356 = new createjs.BitmapText("0", y355), setSpriteScale(y356, .3), y356.x = ow - 30, y497.addChild(y356)), initInterface(), isLogoReady && (y352(), y222()), stage.addEventListener("stagemousedown", y178), isSkipMenus && y192(y255), y128(), stage.update(), createjs.Ticker.addEventListener("tick", tick), initEditorHandlers(), y209sState(!0), y69()) } function y346(e) { isAllFilesLoaded || (isLogoReady = isAllFilesLoaded = !0) && startGame(); } function y128() { var e = y481(ow / 2, oh / 2 - 30, 1, "rotatedevv", null, rotationContainer); rotationContainer.addChild(e) } function y352() { var e = new createjs.Sprite(y355); e.gotoAndStop("splashlogo"); e.x = ow / 2; e.y = oh / 2; e.scaleX = e.scaleY = .8; e.mouseEnabled = !0; y464.addChild(e) } function y222() { !y464 || y464.parent || rotationContainer.parent || (y206(y497), stage.addChild(y464), createjs.Tween.get(y464).wait(isSkipSplash ? 1 : 1e3).call(y118).to({ alpha: 0 }, isSkipSplash ? 2 : 500).call(disposeSplash), y96("splash"), stage.autoClear = !0) } function y118(e) { stage.addChildAt(y497, 0); y399(y267) } function disposeSplash(e) { y206(y464); y464 = null; stage.autoClear = !1; canvas.style.backgroundColor = "#111111" } function initEditorHandlers() { isLevelEditor && (y512.on("l", null, onSaveLevelPress), y512.on("r", null, onRey192Press), y512.on("o", null, onClearLevelPress), stage.addEventListener("stagemousedown", y401, !1)) } function y178(e) { y464 && y464.parent && y254(e) } function onSaveLevelPress() { saveLevelToEditor(); y96("save level press!") } function onRey192Press() { rey192FromEditor(); y96("reload from saved press!") } function onClearLevelPress() { disposeLevel() } function y457() { mainBg = new createjs.Sprite(y355); mainBg.gotoAndStop("mainbgv"); setSpriteScale(mainBg, .9); mainBg.rotation = -90; y497.addChild(mainBg) } function createFrontBg() {} function y401(e) { if (isLevelEditor) { var t = -1, n = !1, r = !1; y512.isPressed("a") && (t = BLOCK_HERO_TYPE); y512.isPressed("f") && (t = BLOCK_BRICK_TYPE); y512.isPressed("s") && (t = BLOCK_SLEEP_TYPE); y512.isPressed("i") && (t = BLOCK_ICE_TYPE); y512.isPressed("h") && (t = BLOCK_HIDE_TYPE); y512.isPressed("z") && (t = BLOCK_DANGER_TYPE); y512.isPressed("j") && (t = HIDE_ACTIVATOR_TYPE, r = !0); y512.isPressed("k") && (t = STAR_TYPE, r = !0); y512.isPressed("l") && y487(); y512.isPressed("n") && y131(); y512.isPressed("d") && (t = 99, n = !0); y512.isPressed("w") && (t = -1, startBlink(700, "tint2")); if (-1 < t) { var i = Math.floor(((e.stageX - y497.x) / scaleFactor - MARGIN_LEFT) / CELL_SIZE), i = i + CELLS_MARGIN; 0 > i || i > FIELD_CELLS - 1 || (e = Math.floor(((e.stageY - y497.y) / scaleFactor - MARGIN_TOP) / CELL_SIZE), e += ROWS_MARGIN, 0 > e || e > FIELD_ROWS - 1 || (r ? createBonus(t, i, e, "a" + nameCounter) : n ? (disposeBlockAt(i, e), disposeBonusAt(i, e)) : createBlock(t, i, e, "b" + nameCounter), nameCounter++)) } } } function configureCoinsSpritesheet() { isLoadAnimFromJSON && (y402 = eval(y388.anim_json)); y75(y402, "zoespritesheet", !0, 2); y355 = new createjs.SpriteSheet(y402) } function y75(e, t, n, r) { var i = images[t].width; t = images[t].height; e = e.frames; for (var s = e.length, o, u = 0; u < s; u++) o = e[u], n && (o[2] -= 2 * r, o[3] -= 2 * r), o[0] + o[2] > i && (o[2] = i - o[0]), o[1] + o[3] > t && (o[3] = t - o[1]), 0 > o[0] && (o[0] = 0), 0 > o[1] && (o[1] = 0) } function tick(e) { y327 = e.delta / defaultDelta; if (!y327 || 0 >= y327) y327 = 1; y501++; y87 += y327; updateSky(); for (e = 0; e < allBlocks.length; e++) allBlocks[e].tick(); updateBonusManager(); minigameUpdate(); for (y230.update(); 0 < y85.length;) y377(y85.pop()); isNeedFpsMeter && (y356.text = Math.floor(createjs.Ticker.getMeasuredFPS()) + ""); 0 < y249 && y331(); y512.isPressed("g") && y96(JSON.stringify(getLevelCode())); y195(); shadowContainer.alpha = y390.alpha; isGameCompleteScreenShow && 1 > y87 % 5 && y53Explode(Math.random() * ow, Math.random() * oh, 6, y160, y341); stage.update() } function y246(e, t) { y249 = t; y300 = (isGrowningShake = e) ? 2 * scaleFactor : y445 * scaleFactor } function y331() { y249 -= y327; y300 *= isGrowningShake ? 1.1 : .9; 0 < y249 ? (y497.x = 2 * Math.random() * y300 - y300 + Math.round((stage.canvas.width - ow * scaleFactor) / 2), y497.y = 2 * Math.random() * y300 - y300 + Math.round((stage.canvas.height - oh * scaleFactor) / 2)) : (y497.x = Math.round((stage.canvas.width - ow * scaleFactor) / 2), y497.y = Math.round((stage.canvas.height - oh * scaleFactor) / 2), isMinigame || (y507(), y187())) } function setBgByLevel(e, t, n) { var r = isLowQuality ? "mainbgvsmall" : "mainbgv"; e = y304[e]; e = t ? n : e; BG_POSTFIX = ""; setSpriteScale(mainBg, isLowQuality ? 2 : .9); mainBg.x = -53; mainBg.y = -150; mainBgIndex = e; 1 == e ? (r = isLowQuality ? "mainbgv2small" : "mainbgv2", BG_POSTFIX = "_bg2") : 2 == e ? (r = "mainmenubg", setSpriteScale(mainBg, 1), mainBg.x = getMaxLeft(), mainBg.y = y199() / 2) : 3 == e && (r = "comixbg", setSpriteScale(mainBg, 1.25), mainBg.x = getMaxLeft(), mainBg.y = getMaxTop() / 2); updateCloudsSprite(); mainBg.gotoAndStop(r) } var isNeedFpsMeter = !1, isLevelEditor = !1, isMobileResizeOnly = !1, isSkipMenus = !1, y255 = 19, isBlockLabels = !1, isDisableWin = !1, isOpenAllLevels = !1, isGetAllProperties = !1, isLoadAnimFromJSON = !1, isShadowDisabled = !1, isLowQuality = !1, y431 = "http://play68.com", y233 = "logo_spele.png", isSkipSplash = !1, isHD = !1, y164 = isHD ? .5 : 1, isDesktopBrowser = !1, y115 = [ [ [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1,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 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [ [2, 6, 12], [2, 6, 11], [2, 6, 10], [2, 6, 9], [2, 6, 8], [2, 7, 8], [2, 8, 8], [2, 9, 8], [2, 10, 8], [2, 10, 9], [2, 10, 10], [2, 10, 11], [2, 10, 12], [2, 9, 12], [2, 8, 12], [2, 8, 11], [2, 8, 10] ] ] ]; this.createjs = this.createjs || {}; (function() { var e = function(e, t, n) { this.initialize(e, t, n) }, t = e.prototype; t.type = null; t.target = null; t.currentTarget = null; t.eventPhase = 0; t.bubbles = !1; t.cancelable = !1; t.timeStamp = 0; t.defaultPrevented = !1; t.propagationStopped = !1; t.immediatePropagationStopped = !1; t.removed = !1; t.initialize = function(e, t, n) { this.type = e; this.bubbles = t; this.cancelable = n; this.timeStamp = (new Date).getTime() }; t.preventDefault = function() { this.defaultPrevented = !0 }; t.stopPropagation = function() { this.propagationStopped = !0 }; t.stopImmediatePropagation = function() { this.immediatePropagationStopped = this.propagationStopped = !0 }; t.remove = function() { this.removed = !0 }; t.clone = function() { return new e(this.type, this.bubbles, this.cancelable) }; t.toString = function() { return "[Event (type=" + this.type + ")]" }; createjs.Event = e })(); this.createjs = this.createjs || {}; (function() { var e = function() {}, t = e.prototype; e.initialize = function(e) { e.addEventListener = t.addEventListener; e.on = t.on; e.removeEventListener = e.off = t.removeEventListener; e.removeAllEventListeners = t.removeAllEventListeners; e.hasEventListener = t.hasEventListener; e.dispatchEvent = t.dispatchEvent; e._dispatchEvent = t._dispatchEvent }; t._listeners = null; t._captureListeners = null; t.initialize = function() {}; t.addEventListener = function(e, t, n) { var r; r = n ? this._captureListeners = this._captureListeners || {} : this._listeners = this._listeners || {}; var i = r[e]; i && this.removeEventListener(e, t, n); (i = r[e]) ? i.push(t): r[e] = [t]; return t }; t.on = function(e, t, n, r, i, s) { t.handleEvent && (n = n || t, t = t.handleEvent); n = n || this; return this.addEventListener(e, function(e) { t.call(n, e, i); r && e.remove() }, s) }; t.removeEventListener = function(e, t, n) { if (n = n ? this._captureListeners : this._listeners) { var r = n[e]; if (r) for (var i = 0, s = r.length; i < s; i++) if (r[i] == t) { 1 == s ? delete n[e] : r.splice(i, 1); break } } }; t.off = t.removeEventListener; t.removeAllEventListeners = function(e) { e ? (this._listeners && delete this._listeners[e], this._captureListeners && delete this._captureListeners[e]) : this._listeners = this._captureListeners = null }; t.dispatchEvent = function(e, t) { if ("string" == typeof e) { var n = this._listeners; if (!n || !n[e]) return !1; e = new createjs.Event(e) } e.target = t || this; if (e.bubbles && this.parent) { for (var r = this, n = [r]; r.parent;) n.push(r = r.parent); for (var i = n.length, r = i - 1; 0 <= r && !e.propagationStopped; r--) n[r]._dispatchEvent(e, 1 + (0 == r)); for (r = 1; r < i && !e.propagationStopped; r++) n[r]._dispatchEvent(e, 3) } else this._dispatchEvent(e, 2); return e.defaultPrevented }; t.hasEventListener = function(e) { var t = this._listeners, n = this._captureListeners; return !!(t && t[e] || n && n[e]) }; t.toString = function() { return "[EventDispatcher]" }; t._dispatchEvent = function(e, t) { var n, r = 1 == t ? this._captureListeners : this._listeners; if (e && r && (r = r[e.type]) && (n = r.length)) { e.currentTarget = this; e.eventPhase = t; e.removed = !1; for (var r = r.slice(), i = 0; i < n && !e.immediatePropagationStopped; i++) { var s = r[i]; s.handleEvent ? s.handleEvent(e) : s(e); e.removed && (this.off(e.type, s, 1 == t), e.removed = !1) } } }; createjs.EventDispatcher = e })(); this.createjs = this.createjs || {}; (function() { createjs.indexOf = function(e, t) { for (var n = 0, r = e.length; n < r; n++) if (t === e[n]) return n; return -1 } })(); this.createjs = this.createjs || {}; (function() { var e = function() { throw "UID cannot be instantiated" }; e._nextID = 0; e.get = function() { return e._nextID++ }; createjs.UID = e })(); this.createjs = this.createjs || {}; (function() { var e = function() { throw "Ticker cannot be instantiated." }; e.RAF_SYNCHED = "synched"; e.RAF = "raf"; e.TIMEOUT = "timeout"; e.useRAF = !1; e.timingMode = null; e.maxDelta = 60; e.removeEventListener = null; e.removeAllEventListeners = null; e.dispatchEvent = null; e.hasEventListener = null; e._listeners = null; createjs.EventDispatcher.initialize(e); e._addEventListener = e.addEventListener; e.addEventListener = function() { !e._inited && e.init(); return e._addEventListener.apply(e, arguments) }; e._paused = !1; e._inited = !1; e._startTime = 0; e._pausedTime = 0; e._ticks = 0; e._pausedTicks = 0; e._interval = 50; e._lastTime = 0; e._times = []; e._tickTimes = []; e._timerId = null; e._raf = !0; e._isFirstInit = !0; e.init = function() { e._inited || (e._timerId = null, e._inited = !0, e._isFirstInit = !1, e._times = [], e._tickTimes = [], e._startTime = e._getTime(), e._times.push(e._lastTime = 0), e.setInterval(e._interval)) }; e.reset = function() { e._inited = !1; if (e._raf) { var t = window.cancelAnimationFrame || window.webkitCancelAnimationFrame || window.mozCancelAnimationFrame || window.oCancelAnimationFrame || window.msCancelAnimationFrame; t && t(e._timerId) } else clearTimeout(e._timerId) }; e.setInterval = function(t) { e._interval = t; e._inited && e._setupTick() }; e.getInterval = function() { return e._interval }; e.setFPS = function(t) { e.setInterval(1e3 / t) }; e.getFPS = function() { return 1e3 / e._interval }; e.getMeasuredTickTime = function(t) { var n = 0, r = e._tickTimes; if (1 > r.length) return -1; t = Math.min(r.length, t || e.getFPS() | 0); for (var i = 0; i < t; i++) n += r[i]; return n / t }; e.getMeasuredFPS = function(t) { var n = e._times; if (2 > n.length) return -1; t = Math.min(n.length - 1, t || e.getFPS() | 0); return 1e3 / ((n[0] - n[t]) / t) }; e.setPaused = function(t) { e._paused = t }; e.getPaused = function() { return e._paused }; e.getTime = function(t) { return e._getTime() - e._startTime - (t ? e._pausedTime : 0) }; e.getEventTime = function(t) { return (e._lastTime || e._startTime) - (t ? e._pausedTime : 0) }; e.getTicks = function(t) { return e._ticks - (t ? e._pausedTicks : 0) }; e._handleSynch = function() { var t = e._getTime() - e._startTime; e._timerId = null; e._setupTick(); t - e._lastTime >= .97 * (e._interval - 1) && e._tick() }; e._handleRAF = function() { e._timerId = null; e._setupTick(); e._tick() }; e._handleTimeout = function() { e._timerId = null; e._setupTick(); e._tick() }; e._setupTick = function() { if (null != e._timerId) y96("duplicate"); else { var t = e.timingMode || e.useRAF && e.RAF_SYNCHED; if (t == e.RAF_SYNCHED || t == e.RAF) { var n = window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame; if (n) { e._timerId = n(t == e.RAF ? e._handleRAF : e._handleSynch); e._raf = !0; return } } e._raf = !1; e._timerId = setTimeout(e._handleTimeout, e._interval) } }; e._tick = function() { var t = e._getTime() - e._startTime, n = t - e._lastTime, r = e._paused; e._ticks++; r && (e._pausedTicks++, e._pausedTime += n); e._lastTime = t; if (e.hasEventListener("tick")) { var i = new createjs.Event("tick"), s = e.maxDelta; i.delta = s && n > s ? s : n; i.paused = r; i.time = t; i.runTime = t - e._pausedTime; e.dispatchEvent(i) } for (e._tickTimes.unshift(e._getTime() - t); 100 < e._tickTimes.length;) e._tickTimes.pop(); for (e._times.unshift(t); 100 < e._times.length;) e._times.pop() }; var t = window.performance && (performance.now || performance.mozNow || performance.msNow || performance.oNow || performance.webkitNow); e._getTime = function() { return t && t.call(performance) || (new Date).getTime() }; createjs.Ticker = e })(); this.createjs = this.createjs || {}; (function() { var e = function(e, t, n, r, i, s, o, u, a, f) { this.initialize(e, t, n, r, i, s, o, u, a, f) }, t = e.prototype = new createjs.Event; t.stageX = 0; t.stageY = 0; t.rawX = 0; t.rawY = 0; t.nativeEvent = null; t.pointerID = 0; t.primary = !1; t.addEventListener = null; t.removeEventListener = null; t.removeAllEventListeners = null; t.dispatchEvent = null; t.hasEventListener = null; t._listeners = null; createjs.EventDispatcher.initialize(t); t.Event_initialize = t.initialize; t.initialize = function(e, t, n, r, i, s, o, u, a, f) { this.Event_initialize(e, t, n); this.stageX = r; this.stageY = i; this.nativeEvent = s; this.pointerID = o; this.primary = u; this.rawX = null == a ? r : a; this.rawY = null == f ? i : f }; t.clone = function() { return new e(this.type, this.bubbles, this.cancelable, this.stageX, this.stageY, this.target, this.nativeEvent, this.pointerID, this.primary, this.rawX, this.rawY) }; t.toString = function() { return "[MouseEvent (type=" + this.type + " stageX=" + this.stageX + " stageY=" + this.stageY + ")]" }; createjs.MouseEvent = e })(); this.createjs = this.createjs || {}; (function() { var e = function(e, t, n, r, i, s) { this.initialize(e, t, n, r, i, s) }, t = e.prototype; e.identity = null; e.DEG_TO_RAD = Math.PI / 180; t.a = 1; t.b = 0; t.c = 0; t.d = 1; t.tx = 0; t.ty = 0; t.alpha = 1; t.shadow = null; t.compositeOperation = null; t.initialize = function(e, t, n, r, i, s) { this.a = null == e ? 1 : e; this.b = t || 0; this.c = n || 0; this.d = null == r ? 1 : r; this.tx = i || 0; this.ty = s || 0; return this }; t.prepend = function(e, t, n, r, i, s) { var o = this.tx; if (1 != e || 0 != t || 0 != n || 1 != r) { var u = this.a, a = this.c; this.a = u * e + this.b * n; this.b = u * t + this.b * r; this.c = a * e + this.d * n; this.d = a * t + this.d * r } this.tx = o * e + this.ty * n + i; this.ty = o * t + this.ty * r + s; return this }; t.append = function(e, t, n, r, i, s) { var o = this.a, u = this.b, a = this.c, f = this.d; this.a = e * o + t * a; this.b = e * u + t * f; this.c = n * o + r * a; this.d = n * u + r * f; this.tx = i * o + s * a + this.tx; this.ty = i * u + s * f + this.ty; return this }; t.prependMatrix = function(e) { this.prepend(e.a, e.b, e.c, e.d, e.tx, e.ty); this.prependProperties(e.alpha, e.shadow, e.compositeOperation); return this }; t.appendMatrix = function(e) { this.append(e.a, e.b, e.c, e.d, e.tx, e.ty); this.appendProperties(e.alpha, e.shadow, e.compositeOperation); return this }; t.prependTransform = function(t, n, r, i, s, o, u, a, f) { if (s % 360) { var l = s * e.DEG_TO_RAD; s = Math.cos(l); l = Math.sin(l) } else s = 1, l = 0; if (a || f) this.tx -= a, this.ty -= f; o || u ? (o *= e.DEG_TO_RAD, u *= e.DEG_TO_RAD, this.prepend(s * r, l * r, -l * i, s * i, 0, 0), this.prepend(Math.cos(u), Math.sin(u), -Math.sin(o), Math.cos(o), t, n)) : this.prepend(s * r, l * r, -l * i, s * i, t, n); return this }; t.appendTransform = function(t, n, r, i, s, o, u, a, f) { if (s % 360) { var l = s * e.DEG_TO_RAD; s = Math.cos(l); l = Math.sin(l) } else s = 1, l = 0; o || u ? (o *= e.DEG_TO_RAD, u *= e.DEG_TO_RAD, this.append(Math.cos(u), Math.sin(u), -Math.sin(o), Math.cos(o), t, n), this.append(s * r, l * r, -l * i, s * i, 0, 0)) : this.append(s * r, l * r, -l * i, s * i, t, n); if (a || f) this.tx -= a * this.a + f * this.c, this.ty -= a * this.b + f * this.d; return this }; t.rotate = function(e) { var t = Math.cos(e); e = Math.sin(e); var n = this.a, r = this.c, i = this.tx; this.a = n * t - this.b * e; this.b = n * e + this.b * t; this.c = r * t - this.d * e; this.d = r * e + this.d * t; this.tx = i * t - this.ty * e; this.ty = i * e + this.ty * t; return this }; t.skew = function(t, n) { t *= e.DEG_TO_RAD; n *= e.DEG_TO_RAD; this.append(Math.cos(n), Math.sin(n), -Math.sin(t), Math.cos(t), 0, 0); return this }; t.scale = function(e, t) { this.a *= e; this.d *= t; this.c *= e; this.b *= t; this.tx *= e; this.ty *= t; return this }; t.translate = function(e, t) { this.tx += e; this.ty += t; return this }; t.identity = function() { this.alpha = this.a = this.d = 1; this.b = this.c = this.tx = this.ty = 0; this.shadow = this.compositeOperation = null; return this }; t.invert = function() { var e = this.a, t = this.b, n = this.c, r = this.d, i = this.tx, s = e * r - t * n; this.a = r / s; this.b = -t / s; this.c = -n / s; this.d = e / s; this.tx = (n * this.ty - r * i) / s; this.ty = -(e * this.ty - t * i) / s; return this }; t.isIdentity = function() { return 0 == this.tx && 0 == this.ty && 1 == this.a && 0 == this.b && 0 == this.c && 1 == this.d }; t.transformPoint = function(e, t, n) { n = n || {}; n.x = e * this.a + t * this.c + this.tx; n.y = e * this.b + t * this.d + this.ty; return n }; t.decompose = function(t) { null == t && (t = {}); t.x = this.tx; t.y = this.ty; t.scaleX = Math.sqrt(this.a * this.a + this.b * this.b); t.scaleY = Math.sqrt(this.c * this.c + this.d * this.d); var n = Math.atan2(-this.c, this.d), r = Math.atan2(this.b, this.a); n == r ? (t.rotation = r / e.DEG_TO_RAD, 0 > this.a && 0 <= this.d && (t.rotation += 0 >= t.rotation ? 180 : -180), t.skewX = t.skewY = 0) : (t.skewX = n / e.DEG_TO_RAD, t.skewY = r / e.DEG_TO_RAD); return t }; t.reinitialize = function(e, t, n, r, i, s, o, u, a) { this.initialize(e, t, n, r, i, s); this.alpha = null == o ? 1 : o; this.shadow = u; this.compositeOperation = a; return this }; t.copy = function(e) { return this.reinitialize(e.a, e.b, e.c, e.d, e.tx, e.ty, e.alpha, e.shadow, e.compositeOperation) }; t.appendProperties = function(e, t, n) { this.alpha *= e; this.shadow = t || this.shadow; this.compositeOperation = n || this.compositeOperation; return this }; t.prependProperties = function(e, t, n) { this.alpha *= e; this.shadow = this.shadow || t; this.compositeOperation = this.compositeOperation || n; return this }; t.clone = function() { return (new e).copy(this) }; t.toString = function() { return "[Matrix2D (a=" + this.a + " b=" + this.b + " c=" + this.c + " d=" + this.d + " tx=" + this.tx + " ty=" + this.ty + ")]" }; e.identity = new e; createjs.Matrix2D = e })(); this.createjs = this.createjs || {}; (function() { var e = function(e, t) { this.initialize(e, t) }, t = e.prototype; t.x = 0; t.y = 0; t.initialize = function(e, t) { this.x = null == e ? 0 : e; this.y = null == t ? 0 : t; return this }; t.copy = function(e) { return this.initialize(e.x, e.y) }; t.clone = function() { return new e(this.x, this.y) }; t.toString = function() { return "[Point (x=" + this.x + " y=" + this.y + ")]" }; createjs.Point = e })(); this.createjs = this.createjs || {}; (function() { var e = function(e, t, n, r) { this.initialize(e, t, n, r) }, t = e.prototype; t.x = 0; t.y = 0; t.width = 0; t.height = 0; t.initialize = function(e, t, n, r) { this.x = e || 0; this.y = t || 0; this.width = n || 0; this.height = r || 0; return this }; t.copy = function(e) { return this.initialize(e.x, e.y, e.width, e.height) }; t.clone = function() { return new e(this.x, this.y, this.width, this.height) }; t.toString = function() { return "[Rectangle (x=" + this.x + " y=" + this.y + " width=" + this.width + " height=" + this.height + ")]" }; createjs.Rectangle = e })(); this.createjs = this.createjs || {}; (function() { var e = function(e, t, n, r, i, s, o) { this.initialize(e, t, n, r, i, s, o) }, t = e.prototype; t.target = null; t.overLabel = null; t.outLabel = null; t.downLabel = null; t.play = !1; t._isPressed = !1; t._isOver = !1; t.initialize = function(e, t, n, r, i, s, o) { e.addEventListener && (this.target = e, e.cursor = "pointer", this.overLabel = null == n ? "over" : n, this.outLabel = null == t ? "out" : t, this.downLabel = null == r ? "down" : r, this.play = i, this.setEnabled(!0), this.handleEvent({}), s && (o && (s.actionsEnabled = !1, s.gotoAndStop && s.gotoAndStop(o)), e.hitArea = s)) }; t.setEnabled = function(e) { var t = this.target; e ? (t.addEventListener("rollover", this), t.addEventListener("rollout", this), t.addEventListener("mousedown", this), t.addEventListener("pressup", this)) : (t.removeEventListener("rollover", this), t.removeEventListener("rollout", this), t.removeEventListener("mousedown", this), t.removeEventListener("pressup", this)) }; t.toString = function() { return "[ButtonHelper]" }; t.handleEvent = function(e) { var t = this.target; e = e.type; "mousedown" == e ? (this._isPressed = !0, e = this.downLabel) : "pressup" == e ? (this._isPressed = !1, e = this._isOver ? this.overLabel : this.outLabel) : "rollover" == e ? (this._isOver = !0, e = this._isPressed ? this.downLabel : this.overLabel) : (this._isOver = !1, e = this._isPressed ? this.overLabel : this.outLabel); this.play ? t.gotoAndPlay && t.gotoAndPlay(e) : t.gotoAndStop && t.gotoAndStop(e) }; createjs.ButtonHelper = e })(); this.createjs = this.createjs || {}; (function() { var e = function(e, t, n, r) { this.initialize(e, t, n, r) }, t = e.prototype; e.identity = null; t.color = null; t.offsetX = 0; t.offsetY = 0; t.blur = 0; t.initialize = function(e, t, n, r) { this.color = e; this.offsetX = t; this.offsetY = n; this.blur = r }; t.toString = function() { return "[Shadow]" }; t.clone = function() { return new e(this.color, this.offsetX, this.offsetY, this.blur) }; e.identity = new e("transparent", 0, 0, 0); createjs.Shadow = e })(); this.createjs = this.createjs || {}; (function() { var e = function(e) { this.initialize(e) }, t = e.prototype = new createjs.EventDispatcher; t.complete = !0; t.framerate = 0; t._animations = null; t._frames = null; t._images = null; t._data = null; t._loadCount = 0; t._frameHeight = 0; t._frameWidth = 0; t._numFrames = 0; t._regX = 0; t._regY = 0; t.initialize = function(e) { var t, n, r; if (null != e) { this.framerate = e.framerate || 0; if (e.images && 0 < (n = e.images.length)) for (r = this._images = [], t = 0; t < n; t++) { var i = e.images[t]; if ("string" == typeof i) { var s = i, i = document.createElement("img"); i.src = s } r.push(i); i.getContext || i.complete || (this._loadCount++, this.complete = !1, function(e) { i.onload = function() { e._handleImageLoad() } }(this)) } if (null != e.frames) if (e.frames instanceof Array) for (this._frames = [], r = e.frames, t = 0, n = r.length; t < n; t++) s = r[t], this._frames.push({ image: this._images[s[4] ? s[4] : 0], rect: new createjs.Rectangle(s[0], s[1], s[2], s[3]), regX: s[5] || 0, regY: s[6] || 0 }); else n = e.frames, this._frameWidth = n.width, this._frameHeight = n.height, this._regX = n.regX || 0, this._regY = n.regY || 0, this._numFrames = n.count, 0 == this._loadCount && this._calculateFrames(); this._animations = []; if (null != (n = e.animations)) { this._data = {}; for (var o in n) { e = { name: o }; s = n[o]; if ("number" == typeof s) r = e.frames = [s]; else if (s instanceof Array) if (1 == s.length) e.frames = [s[0]]; else for (e.speed = s[3], e.next = s[2], r = e.frames = [], t = s[0]; t <= s[1]; t++) r.push(t); else e.speed = s.speed, e.next = s.next, t = s.frames, r = e.frames = "number" == typeof t ? [t] : t.slice(0); if (!0 === e.next || void 0 === e.next) e.next = o; if (!1 === e.next || 2 > r.length && e.next == o) e.next = null; e.speed || (e.speed = 1); this._animations.push(o); this._data[o] = e } } } }; t.getNumFrames = function(e) { if (null == e) return this._frames ? this._frames.length : this._numFrames; e = this._data[e]; return null == e ? 0 : e.frames.length }; t.getAnimations = function() { return this._animations.slice(0) }; t.getAnimation = function(e) { return this._data[e] }; t.getFrame = function(e) { var t; return this._frames && (t = this._frames[e]) ? t : null }; t.getFrameBounds = function(e, t) { var n = this.getFrame(e); return n ? (t || new createjs.Rectangle).initialize(-n.regX, -n.regY, n.rect.width, n.rect.height) : null }; t.toString = function() { return "[SpriteSheet]" }; t.clone = function() { var t = new e; t.complete = this.complete; t._animations = this._animations; t._frames = this._frames; t._images = this._images; t._data = this._data; t._frameHeight = this._frameHeight; t._frameWidth = this._frameWidth; t._numFrames = this._numFrames; t._loadCount = this._loadCount; return t }; t._handleImageLoad = function() { 0 == --this._loadCount && (this._calculateFrames(), this.complete = !0, this.dispatchEvent("complete")) }; t._calculateFrames = function() { if (!this._frames && 0 != this._frameWidth) { this._frames = []; for (var e = 0, t = this._frameWidth, n = this._frameHeight, r = 0, i = this._images; r < i.length; r++) { for (var s = i[r], o = (s.width + 1) / t | 0, u = (s.height + 1) / n | 0, u = 0 < this._numFrames ? Math.min(this._numFrames - e, o * u) : o * u, a = 0; a < u; a++) this._frames.push({ image: s, rect: new createjs.Rectangle(a % o * t, (a / o | 0) * n, t, n), regX: this._regX, regY: this._regY }); e += u } this._numFrames = e } }; createjs.SpriteSheet = e })(); this.createjs = this.createjs || {}; (function() { function e(e, t, n) { this.f = e; this.params = t; this.path = null == n ? !0 : n } e.prototype.exec = function(e) { this.f.apply(e, this.params) }; var t = function() { this.initialize() }, n = t.prototype; t.getRGB = function(e, t, n, r) { null != e && null == n && (r = t, n = e & 255, t = e >> 8 & 255, e = e >> 16 & 255); return null == r ? "rgb(" + e + "," + t + "," + n + ")" : "rgba(" + e + "," + t + "," + n + "," + r + ")" }; t.getHSL = function(e, t, n, r) { return null == r ? "hsl(" + e % 360 + "," + t + "%," + n + "%)" : "hsla(" + e % 360 + "," + t + "%," + n + "%," + r + ")" }; t.Command = e; t.BASE_64 = { A: 0, B: 1, C: 2, D: 3, E: 4, F: 5, G: 6, H: 7, I: 8, J: 9, K: 10, L: 11, M: 12, N: 13, O: 14, P: 15, Q: 16, R: 17, S: 18, T: 19, U: 20, V: 21, W: 22, X: 23, Y: 24, Z: 25, a: 26, b: 27, c: 28, d: 29, e: 30, f: 31, g: 32, h: 33, i: 34, j: 35, k: 36, l: 37, m: 38, n: 39, o: 40, p: 41, q: 42, r: 43, s: 44, t: 45, u: 46, v: 47, w: 48, x: 49, y: 50, z: 51, 0: 52, 1: 53, 2: 54, 3: 55, 4: 56, 5: 57, 6: 58, 7: 59, 8: 60, 9: 61, "+": 62, "/": 63 }; t.STROKE_CAPS_MAP = ["butt", "round", "square"]; t.STROKE_JOINTS_MAP = ["miter", "round", "bevel"]; var r = createjs.createCanvas ? createjs.createCanvas() : document.createElement("canvas"); if (r.getContext) { var i = t._ctx = r.getContext("2d"); t.beginCmd = new e(i.beginPath, [], !1); t.fillCmd = new e(i.fill, [], !1); t.strokeCmd = new e(i.stroke, [], !1); r.width = r.height = 1 } n._strokeInstructions = null; n._strokeStyleInstructions = null; n._strokeIgnoreScale = !1; n._fillInstructions = null; n._fillMatrix = null; n._instructions = null; n._oldInstructions = null; n._activeInstructions = null; n._active = !1; n._dirty = !1; n.initialize = function() { this.clear(); this._ctx = t._ctx }; n.isEmpty = function() { return !(this._instructions.length || this._oldInstructions.length || this._activeInstructions.length) }; n.draw = function(e) { this._dirty && this._updateInstructions(); for (var t = this._instructions, n = 0, r = t.length; n < r; n++) t[n].exec(e) }; n.drawAsPath = function(e) { this._dirty && this._updateInstructions(); for (var t, n = this._instructions, r = 0, i = n.length; r < i; r++)((t = n[r]).path || 0 == r) && t.exec(e) }; n.moveTo = function(t, n) { this._activeInstructions.push(new e(this._ctx.moveTo, [t, n])); return this }; n.lineTo = function(t, n) { this._dirty = this._active = !0; this._activeInstructions.push(new e(this._ctx.lineTo, [t, n])); return this }; n.arcTo = function(t, n, r, i, s) { this._dirty = this._active = !0; this._activeInstructions.push(new e(this._ctx.arcTo, [t, n, r, i, s])); return this }; n.arc = function(t, n, r, i, s, o) { this._dirty = this._active = !0; null == o && (o = !1); this._activeInstructions.push(new e(this._ctx.arc, [t, n, r, i, s, o])); return this }; n.quadraticCurveTo = function(t, n, r, i) { this._dirty = this._active = !0; this._activeInstructions.push(new e(this._ctx.quadraticCurveTo, [t, n, r, i])); return this }; n.bezierCurveTo = function(t, n, r, i, s, o) { this._dirty = this._active = !0; this._activeInstructions.push(new e(this._ctx.bezierCurveTo, [t, n, r, i, s, o])); return this }; n.rect = function(t, n, r, i) { this._dirty = this._active = !0; this._activeInstructions.push(new e(this._ctx.rect, [t, n, r, i])); return this }; n.closePath = function() { this._active && (this._dirty = !0, this._activeInstructions.push(new e(this._ctx.closePath, []))); return this }; n.clear = function() { this._instructions = []; this._oldInstructions = []; this._activeInstructions = []; this._strokeStyleInstructions = this._strokeInstructions = this._fillInstructions = this._fillMatrix = null; this._active = this._dirty = this._strokeIgnoreScale = !1; return this }; n.beginFill = function(t) { this._active && this._newPath(); this._fillInstructions = t ? [new e(this._setProp, ["fillStyle", t], !1)] : null; this._fillMatrix = null; return this }; n.beginLinearGradientFill = function(t, n, r, i, s, o) { this._active && this._newPath(); r = this._ctx.createLinearGradient(r, i, s, o); i = 0; for (s = t.length; i < s; i++) r.addColorStop(n[i], t[i]); this._fillInstructions = [new e(this._setProp, ["fillStyle", r], !1)]; this._fillMatrix = null; return this }; n.beginRadialGradientFill = function(t, n, r, i, s, o, u, a) { this._active && this._newPath(); r = this._ctx.createRadialGradient(r, i, s, o, u, a); i = 0; for (s = t.length; i < s; i++) r.addColorStop(n[i], t[i]); this._fillInstructions = [new e(this._setProp, ["fillStyle", r], !1)]; this._fillMatrix = null; return this }; n.beginBitmapFill = function(t, n, r) { this._active && this._newPath(); t = this._ctx.createPattern(t, n || ""); this._fillInstructions = [new e(this._setProp, ["fillStyle", t], !1)]; this._fillMatrix = r ? [r.a, r.b, r.c, r.d, r.tx, r.ty] : null; return this }; n.endFill = function() { return this.beginFill() }; n.setStrokeStyle = function(n, r, i, s, o) { this._active && this._newPath(); this._strokeStyleInstructions = [new e(this._setProp, ["lineWidth", null == n ? "1" : n], !1), new e(this._setProp, ["lineCap", null == r ? "butt" : isNaN(r) ? r : t.STROKE_CAPS_MAP[r]], !1), new e(this._setProp, ["lineJoin", null == i ? "miter" : isNaN(i) ? i : t.STROKE_JOINTS_MAP[i]], !1), new e(this._setProp, ["miterLimit", null == s ? "10" : s], !1)]; this._strokeIgnoreScale = o; return this }; n.beginStroke = function(t) { this._active && this._newPath(); this._strokeInstructions = t ? [new e(this._setProp, ["strokeStyle", t], !1)] : null; return this }; n.beginLinearGradientStroke = function(t, n, r, i, s, o) { this._active && this._newPath(); r = this._ctx.createLinearGradient(r, i, s, o); i = 0; for (s = t.length; i < s; i++) r.addColorStop(n[i], t[i]); this._strokeInstructions = [new e(this._setProp, ["strokeStyle", r], !1)]; return this }; n.beginRadialGradientStroke = function(t, n, r, i, s, o, u, a) { this._active && this._newPath(); r = this._ctx.createRadialGradient(r, i, s, o, u, a); i = 0; for (s = t.length; i < s; i++) r.addColorStop(n[i], t[i]); this._strokeInstructions = [new e(this._setProp, ["strokeStyle", r], !1)]; return this }; n.beginBitmapStroke = function(t, n) { this._active && this._newPath(); var r = this._ctx.createPattern(t, n || ""); this._strokeInstructions = [new e(this._setProp, ["strokeStyle", r], !1)]; return this }; n.endStroke = function() { this.beginStroke(); return this }; n.curveTo = n.quadraticCurveTo; n.drawRect = n.rect; n.drawRoundRect = function(e, t, n, r, i) { this.drawRoundRectComplex(e, t, n, r, i, i, i, i); return this }; n.drawRoundRectComplex = function(t, n, r, i, s, o, u, a) { var f = (r < i ? r : i) / 2, l = 0, h = 0, p = 0, d = 0; 0 > s && (s *= l = -1); s > f && (s = f); 0 > o && (o *= h = -1); o > f && (o = f); 0 > u && (u *= p = -1); u > f && (u = f); 0 > a && (a *= d = -1); a > f && (a = f); this._dirty = this._active = !0; var f = this._ctx.arcTo, v = this._ctx.lineTo; this._activeInstructions.push(new e(this._ctx.moveTo, [t + r - o, n]), new e(f, [t + r + o * h, n - o * h, t + r, n + o, o]), new e(v, [t + r, n + i - u]), new e(f, [t + r + u * p, n + i + u * p, t + r - u, n + i, u]), new e(v, [t + a, n + i]), new e(f, [t - a * d, n + i + a * d, t, n + i - a, a]), new e(v, [t, n + s]), new e(f, [t - s * l, n - s * l, t + s, n, s]), new e(this._ctx.closePath)); return this }; n.drawCircle = function(e, t, n) { this.arc(e, t, n, 0, 2 * Math.PI); return this }; n.drawEllipse = function(t, n, r, i) { this._dirty = this._active = !0; var s = .5522848 * (r / 2), o = .5522848 * (i / 2), u = t + r, a = n + i; r = t + r / 2; i = n + i / 2; this._activeInstructions.push(new e(this._ctx.moveTo, [t, i]), new e(this._ctx.bezierCurveTo, [t, i - o, r - s, n, r, n]), new e(this._ctx.bezierCurveTo, [r + s, n, u, i - o, u, i]), new e(this._ctx.bezierCurveTo, [u, i + o, r + s, a, r, a]), new e(this._ctx.bezierCurveTo, [r - s, a, t, i + o, t, i])); return this }; n.inject = function(t, n) { this._dirty = this._active = !0; this._activeInstructions.push(new e(t, [n])); return this }; n.drawPolyStar = function(t, n, r, i, s, o) { this._dirty = this._active = !0; null == s && (s = 0); s = 1 - s; o = null == o ? 0 : o / (180 / Math.PI); var u = Math.PI / i; this._activeInstructions.push(new e(this._ctx.moveTo, [t + Math.cos(o) * r, n + Math.sin(o) * r])); for (var a = 0; a < i; a++) o += u, 1 != s && this._activeInstructions.push(new e(this._ctx.lineTo, [t + Math.cos(o) * r * s, n + Math.sin(o) * r * s])), o += u, this._activeInstructions.push(new e(this._ctx.lineTo, [t + Math.cos(o) * r, n + Math.sin(o) * r])); return this }; n.decodePath = function(e) { for (var n = [this.moveTo, this.lineTo, this.quadraticCurveTo, this.bezierCurveTo, this.closePath], r = [2, 2, 4, 6, 0], i = 0, s = e.length, o = [], u = 0, f = 0, l = t.BASE_64; i < s;) { var c = e.charAt(i), h = l[c], p = h >> 3, d = n[p]; if (!d || h & 3) throw "bad path data (@" + i + "): " + c; c = r[p]; p || (u = f = 0); o.length = 0; i++; h = (h >> 2 & 1) + 2; for (p = 0; p < c; p++) { var v = l[e.charAt(i)], m = v >> 5 ? -1 : 1, v = (v & 31) << 6 | l[e.charAt(i + 1)]; 3 == h && (v = v << 6 | l[e.charAt(i + 2)]); v = m * v / 10; p % 2 ? u = v += u : f = v += f; o[p] = v; i += h } d.apply(this, o) } return this }; n.clone = function() { var e = new t; e._instructions = this._instructions.slice(); e._activeInstructions = this._activeInstructions.slice(); e._oldInstructions = this._oldInstructions.slice(); this._fillInstructions && (e._fillInstructions = this._fillInstructions.slice()); this._strokeInstructions && (e._strokeInstructions = this._strokeInstructions.slice()); this._strokeStyleInstructions && (e._strokeStyleInstructions = this._strokeStyleInstructions.slice()); e._active = this._active; e._dirty = this._dirty; e._fillMatrix = this._fillMatrix; e._strokeIgnoreScale = this._strokeIgnoreScale; return e }; n.toString = function() { return "[Graphics]" }; n.mt = n.moveTo; n.lt = n.lineTo; n.at = n.arcTo; n.bt = n.bezierCurveTo; n.qt = n.quadraticCurveTo; n.a = n.arc; n.r = n.rect; n.cp = n.closePath; n.c = n.clear; n.f = n.beginFill; n.lf = n.beginLinearGradientFill; n.rf = n.beginRadialGradientFill; n.bf = n.beginBitmapFill; n.ef = n.endFill; n.ss = n.setStrokeStyle; n.s = n.beginStroke; n.ls = n.beginLinearGradientStroke; n.rs = n.beginRadialGradientStroke; n.bs = n.beginBitmapStroke; n.es = n.endStroke; n.dr = n.drawRect; n.rr = n.drawRoundRect; n.rc = n.drawRoundRectComplex; n.dc = n.drawCircle; n.de = n.drawEllipse; n.dp = n.drawPolyStar; n.p = n.decodePath; n._updateInstructions = function() { this._instructions = this._oldInstructions.slice(); this._instructions.push(t.beginCmd); this._appendInstructions(this._fillInstructions); this._appendInstructions(this._strokeInstructions); this._appendInstructions(this._strokeInstructions && this._strokeStyleInstructions); this._appendInstructions(this._activeInstructions); this._fillInstructions && this._appendDraw(t.fillCmd, this._fillMatrix); this._strokeInstructions && this._appendDraw(t.strokeCmd, this._strokeIgnoreScale && [1, 0, 0, 1, 0, 0]) }; n._appendInstructions = function(e) { e && this._instructions.push.apply(this._instructions, e) }; n._appendDraw = function(t, n) { n ? this._instructions.push(new e(this._ctx.save, [], !1), new e(this._ctx.transform, n, !1), t, new e(this._ctx.restore, [], !1)) : this._instructions.push(t) }; n._newPath = function() { this._dirty && this._updateInstructions(); this._oldInstructions = this._instructions; this._activeInstructions = []; this._active = this._dirty = !1 }; n._setProp = function(e, t) { this[e] = t }; createjs.Graphics = t })(); this.createjs = this.createjs || {}; (function() { var e = function() { this.initialize() }, t = e.prototype = new createjs.EventDispatcher; e.suppressCrossDomainErrors = !1; var n = createjs.createCanvas ? createjs.createCanvas() : document.createElement("canvas"); n.getContext && (e._hitTestCanvas = n, e._hitTestContext = n.getContext("2d"), n.width = n.height = 1); e._nextCacheID = 1; t.alpha = 1; t.cacheCanvas = null; t.id = -1; t.mouseEnabled = !0; t.name = null; t.parent = null; t.regX = 0; t.regY = 0; t.rotation = 0; t.scaleX = 1; t.scaleY = 1; t.skewX = 0; t.skewY = 0; t.shadow = null; t.visible = !0; t.x = 0; t.y = 0; t.compositeOperation = null; t.snapToPixel = !1; t.filters = null; t.cacheID = 0; t.mask = null; t.hitArea = null; t.cursor = null; t._cacheOffsetX = 0; t._cacheOffsetY = 0; t._cacheScale = 1; t._cacheDataURLID = 0; t._cacheDataURL = null; t._matrix = null; t._rectangle = null; t._y15 = null; t.initialize = function() { this.id = createjs.UID.get(); this._matrix = new createjs.Matrix2D; this._rectangle = new createjs.Rectangle }; t.isVisible = function() { return !!(this.visible && 0 < this.alpha && 0 != this.scaleX && 0 != this.scaleY) }; t.draw = function(e, t) { var n = this.cacheCanvas; if (t || !n) return !1; var r = this._cacheScale, i = this._cacheOffsetX, s = this._cacheOffsetY, o; if (o = this._applyFilterBounds(i, s, 0, 0)) i = o.x, s = o.y; e.drawImage(n, i, s, n.width / r, n.height / r); return !0 }; t.updateContext = function(e) { var t, n = this.mask; n && n.graphics && !n.graphics.isEmpty() && (t = n.getMatrix(n._matrix), e.transform(t.a, t.b, t.c, t.d, t.tx, t.ty), n.graphics.drawAsPath(e), e.clip(), t.invert(), e.transform(t.a, t.b, t.c, t.d, t.tx, t.ty)); t = this._matrix.identity().appendTransform(this.x, this.y, this.scaleX, this.scaleY, this.rotation, this.skewX, this.skewY, this.regX, this.regY); createjs.Stage._snapToPixelEnabled && this.snapToPixel ? e.transform(t.a, t.b, t.c, t.d, t.tx + .5 | 0, t.ty + .5 | 0) : e.transform(t.a, t.b, t.c, t.d, t.tx, t.ty); e.globalAlpha *= this.alpha; this.compositeOperation && (e.globalCompositeOperation = this.compositeOperation); this.shadow && this._applyShadow(e, this.shadow) }; t.cache = function(e, t, n, r, i) { i = i || 1; this.cacheCanvas || (this.cacheCanvas = createjs.createCanvas ? createjs.createCanvas() : document.createElement("canvas")); this._cacheWidth = n; this._cacheHeight = r; this._cacheOffsetX = e; this._cacheOffsetY = t; this._cacheScale = i; this.updateCache() }; t.updateCache = function(t) { var n = this.cacheCanvas, r = this._cacheScale, i = this._cacheOffsetX * r, s = this._cacheOffsetY * r, o = this._cacheWidth, u = this._cacheHeight, a; if (!n) throw "cache() must be called before updateCache()"; var f = n.getContext("2d"); if (a = this._applyFilterBounds(i, s, o, u)) i = a.x, s = a.y, o = a.width, u = a.height; o = Math.ceil(o * r); u = Math.ceil(u * r); o != n.width || u != n.height ? (n.width = o, n.height = u) : t || f.clearRect(0, 0, o + 1, u + 1); f.save(); f.globalCompositeOperation = t; f.setTransform(r, 0, 0, r, -i, -s); this.draw(f, !0); this._applyFilters(); f.restore(); this.cacheID = e._nextCacheID++ }; t.uncache = function() { this._cacheDataURL = this.cacheCanvas = null; this.cacheID = this._cacheOffsetX = this._cacheOffsetY = 0; this._cacheScale = 1 }; t.getCacheDataURL = function() { if (!this.cacheCanvas) return null; this.cacheID != this._cacheDataURLID && (this._cacheDataURL = this.cacheCanvas.toDataURL()); return this._cacheDataURL }; t.getStage = function() { for (var e = this; e.parent;) e = e.parent; return e instanceof createjs.Stage ? e : null }; t.localToGlobal = function(e, t) { var n = this.getConcatenatedMatrix(this._matrix); if (null == n) return null; n.append(1, 0, 0, 1, e, t); return new createjs.Point(n.tx, n.ty) }; t.globalToLocal = function(e, t) { var n = this.getConcatenatedMatrix(this._matrix); if (null == n) return null; n.invert(); n.append(1, 0, 0, 1, e, t); return new createjs.Point(n.tx, n.ty) }; t.localToLocal = function(e, t, n) { e = this.localToGlobal(e, t); return n.globalToLocal(e.x, e.y) }; t.setTransform = function(e, t, n, r, i, s, o, u, a) { this.x = e || 0; this.y = t || 0; this.scaleX = null == n ? 1 : n; this.scaleY = null == r ? 1 : r; this.rotation = i || 0; this.skewX = s || 0; this.skewY = o || 0; this.regX = u || 0; this.regY = a || 0; return this }; t.getMatrix = function(e) { return (e ? e.identity() : new createjs.Matrix2D).appendTransform(this.x, this.y, this.scaleX, this.scaleY, this.rotation, this.skewX, this.skewY, this.regX, this.regY).appendProperties(this.alpha, this.shadow, this.compositeOperation) }; t.getConcatenatedMatrix = function(e) { e ? e.identity() : e = new createjs.Matrix2D; for (var t = this; null != t;) e.prependTransform(t.x, t.y, t.scaleX, t.scaleY, t.rotation, t.skewX, t.skewY, t.regX, t.regY).prependProperties(t.alpha, t.shadow, t.compositeOperation), t = t.parent; return e }; t.hitTest = function(t, n) { var r = e._hitTestContext; r.setTransform(1, 0, 0, 1, -t, -n); this.draw(r); var i = this._testHit(r); r.setTransform(1, 0, 0, 1, 0, 0); r.clearRect(0, 0, 2, 2); return i }; t.set = function(e) { for (var t in e) this[t] = e[t]; return this }; t.getBounds = function() { if (this._y15) return this._rectangle.copy(this._y15); var e = this.cacheCanvas; if (e) { var t = this._cacheScale; return this._rectangle.initialize(this._cacheOffsetX, this._cacheOffsetY, e.width / t, e.height / t) } return null }; t.getTransformedBounds = function() { return this._getBounds() }; t.setBounds = function(e, t, n, r) { null == e && (this._y15 = e); this._y15 = (this._y15 || new createjs.Rectangle).initialize(e, t, n, r) }; t.clone = function() { var t = new e; this.cloneProps(t); return t }; t.toString = function() { return "[DisplayObject (name=" + this.name + ")]" }; t.cloneProps = function(e) { e.alpha = this.alpha; e.name = this.name; e.regX = this.regX; e.regY = this.regY; e.rotation = this.rotation; e.scaleX = this.scaleX; e.scaleY = this.scaleY; e.shadow = this.shadow; e.skewX = this.skewX; e.skewY = this.skewY; e.visible = this.visible; e.x = this.x; e.y = this.y; e._y15 = this._y15; e.mouseEnabled = this.mouseEnabled; e.compositeOperation = this.compositeOperation }; t._applyShadow = function(e, t) { t = t || Shadow.identity; e.shadowColor = t.color; e.shadowOffsetX = t.offsetX; e.shadowOffsetY = t.offsetY; e.shadowBlur = t.blur }; t._tick = function(e) { var t = this._listeners; t && t.tick && (t = new createjs.Event("tick"), t.params = e, this._dispatchEvent(t, this, 2)) }; t._testHit = function(t) { try { var n = 1 < t.getImageData(0, 0, 1, 1).data[3] } catch (r) { if (!e.suppressCrossDomainErrors) throw "An error has occurred. This is most likely due to security restrictions on reading canvas pixel data with local or cross-domain images." } return n }; t._applyFilters = function() { if (this.filters && 0 != this.filters.length && this.cacheCanvas) for (var e = this.filters.length, t = this.cacheCanvas.getContext("2d"), n = this.cacheCanvas.width, r = this.cacheCanvas.height, i = 0; i < e; i++) this.filters[i].applyFilter(t, 0, 0, n, r) }; t._applyFilterBounds = function(e, t, n, r) { var i, s, o = this.filters; if (o && (s = o.length)) { for (o = 0; o < s; o++) { var u = this.filters[o]; if (u = u.getBounds && u.getBounds()) i || (i = this._rectangle.initialize(e, t, n, r)), i.x += u.x, i.y += u.y, i.width += u.width, i.height += u.height } return i } }; t._getBounds = function(e, t) { return this._transformBounds(this.getBounds(), e, t) }; t._transformBounds = function(e, t, n) { if (!e) return e; var r = e.x, i = e.y, s = e.width, o = e.height, u = n ? this._matrix.identity() : this.getMatrix(this._matrix); (r || i) && u.appendTransform(0, 0, 1, 1, 0, 0, 0, -r, -i); t && u.prependMatrix(t); t = s * u.a; s *= u.b; n = o * u.c; var o = o * u.d, a = u.tx, u = u.ty, f = a, l = a, c = u, h = u; (r = t + a) < f ? f = r : r > l && (l = r); (r = t + n + a) < f ? f = r : r > l && (l = r); (r = n + a) < f ? f = r : r > l && (l = r); (i = s + u) < c ? c = i : i > h && (h = i); (i = s + o + u) < c ? c = i : i > h && (h = i); (i = o + u) < c ? c = i : i > h && (h = i); return e.initialize(f, c, l - f, h - c) }; t.isRoot = !1; t.bounding_box = null; t.isCheckMouseWithDraw = !1; t.isOnlyBoundsCheck = !1; t.setBoundingBox = function(e, t, n, r) { return this.bounding_box = new createjs.Rectangle(e, t, n, r) }; createjs.DisplayObject = e })(); this.createjs = this.createjs || {}; (function() { var e = function() { this.initialize() }, t = e.prototype = new createjs.DisplayObject; t.children = null; t.mouseChildren = !0; t.DisplayObject_initialize = t.initialize; t.initialize = function() { this.DisplayObject_initialize(); this.children = [] }; t.isVisible = function() { var e = this.cacheCanvas || this.children.length; return !!(this.visible && 0 < this.alpha && 0 != this.scaleX && 0 != this.scaleY && e) }; t.DisplayObject_draw = t.draw; t.draw = function(e, t) { if (this.DisplayObject_draw(e, t)) return !0; for (var n = this.children.slice(0), r = 0, i = n.length; r < i; r++) { var s = n[r]; s.isVisible() && (e.save(), s.updateContext(e), s.draw(e), e.restore()) } return !0 }; t.addChild = function(e) { if (null == e) return e; var t = arguments.length; if (1 < t) { for (var n = 0; n < t; n++) this.addChild(arguments[n]); return arguments[t - 1] } e.parent && e.parent.removeChild(e); e.parent = this; this.children.push(e); return e }; t.addChildAt = function(e, t) { var n = arguments.length, r = arguments[n - 1]; if (0 > r || r > this.children.length) return arguments[n - 2]; if (2 < n) { for (var i = 0; i < n - 1; i++) this.addChildAt(arguments[i], r + i); return arguments[n - 2] } e.parent && e.parent.removeChild(e); e.parent = this; this.children.splice(t, 0, e); return e }; t.removeChild = function(e) { var t = arguments.length; if (1 < t) { for (var n = !0, r = 0; r < t; r++) n = n && this.removeChild(arguments[r]); return n } return this.removeChildAt(createjs.indexOf(this.children, e)) }; t.removeChildAt = function(e) { var t = arguments.length; if (1 < t) { for (var n = [], r = 0; r < t; r++) n[r] = arguments[r]; n.sort(function(e, t) { return t - e }); for (var i = !0, r = 0; r < t; r++) i = i && this.removeChildAt(n[r]); return i } if (0 > e || e > this.children.length - 1) return !1; if (t = this.children[e]) t.parent = null; this.children.splice(e, 1); return !0 }; t.removeAllChildren = function() { for (var e = this.children; e.length;) e.pop().parent = null }; t.getChildAt = function(e) { return this.children[e] }; t.getChildByName = function(e) { for (var t = this.children, n = 0, r = t.length; n < r; n++) if (t[n].name == e) return t[n]; return null }; t.sortChildren = function(e) { this.children.sort(e) }; t.getChildIndex = function(e) { return createjs.indexOf(this.children, e) }; t.getNumChildren = function() { return this.children.length }; t.swapChildrenAt = function(e, t) { var n = this.children, r = n[e], i = n[t]; r && i && (n[e] = i, n[t] = r) }; t.swapChildren = function(e, t) { for (var n = this.children, r, i, s = 0, o = n.length; s < o && (n[s] == e && (r = s), n[s] == t && (i = s), null == r || null == i); s++); s != o && (n[r] = t, n[i] = e) }; t.setChildIndex = function(e, t) { var n = this.children, r = n.length; if (!(e.parent != this || 0 > t || t >= r)) { for (var i = 0; i < r && n[i] != e; i++); i != r && i != t && (n.splice(i, 1), n.splice(t, 0, e)) } }; t.contains = function(e) { for (; e;) { if (e == this) return !0; e = e.parent } return !1 }; t.hitTest = function(e, t) { return null != this.getObjectUnderPoint(e, t) }; t.getObjectsUnderPoint = function(e, t) { var n = [], r = this.localToGlobal(e, t); this._getObjectsUnderPoint(r.x, r.y, n); return n }; t.getObjectUnderPoint = function(e, t) { var n = this.localToGlobal(e, t); return this._getObjectsUnderPoint(n.x, n.y) }; t.DisplayObject_getBounds = t.getBounds; t.getBounds = function() { return this._getBounds(null, !0) }; t.getTransformedBounds = function() { return this._getBounds() }; t.clone = function(t) { var n = new e; this.cloneProps(n); if (t) for (var r = n.children = [], i = 0, s = this.children.length; i < s; i++) { var o = this.children[i].clone(t); o.parent = n; r.push(o) } return n }; t.toString = function() { return "[Container (name=" + this.name + ")]" }; t.DisplayObject__tick = t._tick; t._tick = function(e) { for (var t = this.children.length - 1; 0 <= t; t--) { var n = this.children[t]; n._tick && n._tick(e) } this.DisplayObject__tick(e) }; t._getObjectsUnderPoint = function(t, n, r, i) { var s, o; s = this.children.length; if (!isDesktopBrowser) { var u, a; for (s -= 1; 0 <= s; s--) if (o = this.children[s], o.visible && o.mouseEnabled && !(0 >= o.alpha)) { if (u = o.bounding_box) { if (a = o.isRoot ? o.x + u.x <= t && t < o.x + u.x + u.width && o.y + u.y <= n && n < o.y + u.y + u.height : (o.x + u.x) * scaleFactor <= t && t < scaleFactor * (o.x + u.x + u.width) && (o.y + u.y) * scaleFactor <= n && n < scaleFactor * (o.y + u.y + u.height)) if (r) { r.push(o); continue } else return o } else if (o.isCheckMouseWithDraw) { a = createjs.DisplayObject._hitTestContext; var f = this._matrix; u = i && o.hitArea; o.getConcatenatedMatrix(f); u && (f.appendTransform(u.x, u.y, u.scaleX, u.scaleY, u.rotation, u.skewX, u.skewY, u.regX, u.regY), f.alpha = u.alpha); a.globalAlpha = f.alpha; a.setTransform(f.a, f.b, f.c, f.d, f.tx - t, f.ty - n); (u || o).draw(a); if (!this._testHit(a)) continue; a.setTransform(1, 0, 0, 1, 0, 0); a.clearRect(0, 0, 2, 2); if (r) r.push(o); else return i && !this.mouseChildren ? this : o } if (o instanceof e && (o = o.isRoot ? o._getObjectsUnderPoint(t - (o.x + o.regX), n - (o.y + o.regY), r, i) : o._getObjectsUnderPoint(t - (o.x + o.regX) * scaleFactor, n - (o.y + o.regY) * scaleFactor, r, i))) if (r) r.push(o); else return o } return null } a = createjs.DisplayObject._hitTestContext; f = this._matrix; for (s -= 1; 0 <= s; s--) if (o = this.children[s], u = i && o.hitArea, o.visible && (u || o.isVisible()) && (!i || o.mouseEnabled)) if (!u && o instanceof e) { if (o = o._getObjectsUnderPoint(t, n, r, i), !r && o) return i && !this.mouseChildren ? this : o } else { o.getConcatenatedMatrix(f); u && (f.appendTransform(u.x, u.y, u.scaleX, u.scaleY, u.rotation, u.skewX, u.skewY, u.regX, u.regY), f.alpha = u.alpha); if (o.isOnlyBoundsCheck) { if ((u = o.bounding_box) && !((t - f.tx) / scaleFactor >= u.x && (t - f.tx) / scaleFactor <= u.x + u.width && (n - f.ty) / scaleFactor >= u.y && (n - f.ty) / scaleFactor <= u.y + u.height)) continue } else { a.globalAlpha = f.alpha; a.setTransform(f.a, f.b, f.c, f.d, f.tx - t, f.ty - n); (u || o).draw(a); if (!this._testHit(a)) continue; a.setTransform(1, 0, 0, 1, 0, 0); a.clearRect(0, 0, 2, 2) } if (r) r.push(o); else return i && !this.mouseChildren ? this : o } return null }; t._getBounds = function(e, t) { var n = this.DisplayObject_getBounds(); if (n) return this._transformBounds(n, e, t); var r, i, s, o, u = t ? this._matrix.identity() : this.getMatrix(this._matrix); e && u.prependMatrix(e); for (var a = this.children.length, f = 0; f < a; f++) { var l = this.children[f]; if (l.visible && (n = l._getBounds(u))) { var l = n.x, c = n.y, h = l + n.width, p = c + n.height; if (l < r || null == r) r = l; if (h > i || null == i) i = h; if (c < s || null == s) s = c; if (p > o || null == o) o = p } } return null == i ? null : this._rectangle.initialize(r, s, i - r, o - s) }; createjs.Container = e })(); this.createjs = this.createjs || {}; (function() { var e = function(e) { this.initialize(e) }, t = e.prototype = new createjs.Container; e._snapToPixelEnabled = !1; t.autoClear = !0; t.canvas = null; t.mouseX = 0; t.mouseY = 0; t.snapToPixelEnabled = !1; t.mouseInBounds = !1; t.tickOnUpdate = !0; t.mouseMoveOutside = !1; t.nextStage = null; t._pointerData = null; t._pointerCount = 0; t._primaryPointerID = null; t._mouseOverIntervalID = null; t.Container_initialize = t.initialize; t.initialize = function(e) { this.Container_initialize(); this.canvas = "string" == typeof e ? document.getElementById(e) : e; this._pointerData = {}; this.enableDOMEvents(!0) }; t.update = function(t) { if (this.canvas) { this.tickOnUpdate && (this.dispatchEvent("tickstart"), this._tick(arguments.length ? arguments : null), this.dispatchEvent("tickend")); this.dispatchEvent("drawstart"); e._snapToPixelEnabled = this.snapToPixelEnabled; this.autoClear && this.clear(); var n = this.canvas.getContext("2d"); n.save(); this.updateContext(n); this.draw(n, !1); n.restore(); this.dispatchEvent("drawend") } }; t.handleEvent = function(e) { "tick" == e.type && this.update(e) }; t.clear = function() { if (this.canvas) { var e = this.canvas.getContext("2d"); e.setTransform(1, 0, 0, 1, 0, 0); e.clearRect(0, 0, this.canvas.width + 1, this.canvas.height + 1) } }; t.toDataURL = function(e, t) { t || (t = "image/png"); var n = this.canvas.getContext("2d"), r = this.canvas.width, i = this.canvas.height, s; if (e) { s = n.getImageData(0, 0, r, i); var o = n.globalCompositeOperation; n.globalCompositeOperation = "destination-over"; n.fillStyle = e; n.fillRect(0, 0, r, i) } var u = this.canvas.toDataURL(t); e && (n.clearRect(0, 0, r + 1, i + 1), n.putImageData(s, 0, 0), n.globalCompositeOperation = o); return u }; t.enableMouseOver = function(e) { this._mouseOverIntervalID && (clearInterval(this._mouseOverIntervalID), this._mouseOverIntervalID = null, 0 == e && this._testMouseOver(!0)); if (null == e) e = 20; else if (0 >= e) return; var t = this; this._mouseOverIntervalID = setInterval(function() { t._testMouseOver() }, 1e3 / Math.min(50, e)) }; t.enableDOMEvents = function(e) { null == e && (e = !0); var t, n = this._eventListeners; if (!e && n) { for (t in n) e = n[t], e.t.removeEventListener(t, e.f, !1); this._eventListeners = null } else if (e && !n && this.canvas) { e = window.addEventListener ? window : document; var r = this, n = this._eventListeners = {}; n.mouseup = { t: e, f: function(e) { r._handleMouseUp(e) } }; n.mousemove = { t: e, f: function(e) { r._handleMouseMove(e) } }; n.dblclick = { t: e, f: function(e) { r._handleDoubleClick(e) } }; n.mousedown = { t: this.canvas, f: function(e) { r._handleMouseDown(e) } }; for (t in n) e = n[t], e.t.addEventListener(t, e.f, !1) } }; t.clone = function() { var t = new e(null); this.cloneProps(t); return t }; t.toString = function() { return "[Stage (name=" + this.name + ")]" }; t._getElementRect = function(e) { var t; try { t = e.getBoundingClientRect() } catch (n) { t = { top: e.offsetTop, left: e.offsetLeft, width: e.offsetWidth, height: e.offsetHeight } } var r = (window.pageXOffset || document.scrollLeft || 0) - (document.clientLeft || document.body.clientLeft || 0), i = (window.pageYOffset || document.scrollTop || 0) - (document.clientTop || document.body.clientTop || 0), s = window.getComputedStyle ? getComputedStyle(e) : e.currentStyle; e = parseInt(s.paddingLeft) + parseInt(s.borderLeftWidth); var o = parseInt(s.paddingTop) + parseInt(s.borderTopWidth), u = parseInt(s.paddingRight) + parseInt(s.borderRightWidth), s = parseInt(s.paddingBottom) + parseInt(s.borderBottomWidth); return { left: t.left + r + e, right: t.right + r - u, top: t.top + i + o, bottom: t.bottom + i - s } }; t._getPointerData = function(e) { var t = this._pointerData[e]; t || (t = this._pointerData[e] = { x: 0, y: 0 }, null == this._primaryPointerID && (this._primaryPointerID = e)); return t }; t._handleMouseMove = function(e) { e || (e = window.event); this._handlePointerMove(-1, e, e.pageX, e.pageY) }; t._handlePointerMove = function(e, t, n, r) { if (this.canvas) { var i = this._getPointerData(e), s = i.inBounds; this._updatePointerPosition(e, t, n, r); if (s || i.inBounds || this.mouseMoveOutside) - 1 == e && i.inBounds == !s && this._dispatchMouseEvent(this, s ? "mouseleave" : "mouseenter", !1, e, i, t), this._dispatchMouseEvent(this, "stagemousemove", !1, e, i, t), this._dispatchMouseEvent(i.target, "pressmove", !0, e, i, t), (s = i.event) && s.hasEventListener("mousemove") && s.dispatchEvent(new createjs.MouseEvent("mousemove", !1, !1, i.x, i.y, t, e, e == this._primaryPointerID, i.rawX, i.rawY), oTarget), this.nextStage && this.nextStage._handlePointerMove(e, t, n, r) } }; t._updatePointerPosition = function(e, t, n, r) { var i = this._getElementRect(this.canvas); n -= i.left; r -= i.top; var s = this.canvas.width, o = this.canvas.height; n /= (i.right - i.left) / s; r /= (i.bottom - i.top) / o; i = this._getPointerData(e); (i.inBounds = 0 <= n && 0 <= r && n <= s - 1 && r <= o - 1) ? (i.x = n, i.y = r) : this.mouseMoveOutside && (i.x = 0 > n ? 0 : n > s - 1 ? s - 1 : n, i.y = 0 > r ? 0 : r > o - 1 ? o - 1 : r); i.posEvtObj = t; i.rawX = n; i.rawY = r; e == this._primaryPointerID && (this.mouseX = i.x, this.mouseY = i.y, this.mouseInBounds = i.inBounds) }; t._handleMouseUp = function(e) { this._handlePointerUp(-1, e, !1) }; t._handlePointerUp = function(e, t, n) { var r = this._getPointerData(e), i = r.target; i && (i.hasEventListener("pressup") || i.hasEventListener("click")) ? (i.hasEventListener("click") && this._getObjectsUnderPoint(r.x, r.y, null, !0) == i && this._dispatchMouseEvent(i, "click", !0, e, r, t), this._dispatchMouseEvent(i, "pressup", !0, e, r, t)) : this._dispatchMouseEvent(this, "stagemouseup", !1, e, r, t); n ? (e == this._primaryPointerID && (this._primaryPointerID = null), delete this._pointerData[e]) : r.event = r.target = null; this.nextStage && this.nextStage._handlePointerUp(e, t, n) }; t._handleMouseDown = function(e) { this._handlePointerDown(-1, e, e.pageX, e.pageY) }; t._handlePointerDown = function(e, t, n, r) { null != r && this._updatePointerPosition(e, t, n, r); var i = this._getPointerData(e); i.target = this._getObjectsUnderPoint(i.x, i.y, null, !0); this._dispatchMouseEvent(i.target, "mousedown", !0, e, i, t); i.target && i.target.hasEventListener("mousedown") || this._dispatchMouseEvent(this, "stagemousedown", !1, e, i, t); this.nextStage && this.nextStage._handlePointerDown(e, t, n, r) }; t._testMouseOver = function(e) { if (-1 == this._primaryPointerID && (e || this.mouseX != this._mouseOverX || this.mouseY != this._mouseOverY || !this.mouseInBounds)) { var t = this._getPointerData(-1), n = t.posEvtObj, r, i = -1, s = "", o; if (e || this.mouseInBounds && n && n.target == this.canvas) r = this._getObjectsUnderPoint(this.mouseX, this.mouseY, null, !0), this._mouseOverX = this.mouseX, this._mouseOverY = this.mouseY; e = this._mouseOverTarget || []; var u = e[e.length - 1], a = this._mouseOverTarget = []; for (o = r; o;) a.unshift(o), null != o.cursor && (s = o.cursor), o = o.parent; this.canvas.style.cursor = s; s = 0; for (o = a.length; s < o && a[s] == e[s]; s++) i = s; u != r && this._dispatchMouseEvent(u, "mouseout", !0, -1, t, n); for (s = e.length - 1; s > i; s--) this._dispatchMouseEvent(e[s], "rollout", !1, -1, t, n); for (s = a.length - 1; s > i; s--) this._dispatchMouseEvent(a[s], "rollover", !1, -1, t, n); u != r && this._dispatchMouseEvent(r, "mouseover", !0, -1, t, n) } }; t._handleDoubleClick = function(e) { var t = this._getPointerData(-1), n = this._getObjectsUnderPoint(t.x, t.y, null, !0); this._dispatchMouseEvent(n, "dblclick", !0, -1, t, e); this.nextStage && this.nextStage._handleDoubleClick(e) }; t._dispatchMouseEvent = function(e, t, n, r, i, s) { e && (n || e.hasEventListener(t)) && (t = new createjs.MouseEvent(t, n, !1, i.x, i.y, s, r, r == this._primaryPointerID, i.rawX, i.rawY), e.dispatchEvent(t)) }; createjs.Stage = e })(); this.createjs = this.createjs || {}; (function() { var e = function(e) { this.initialize(e) }, t = e.prototype = new createjs.DisplayObject; t.image = null; t.snapToPixel = !0; t.sourceRect = null; t.DisplayObject_initialize = t.initialize; t.initialize = function(e) { this.DisplayObject_initialize(); "string" == typeof e ? (this.image = document.createElement("img"), this.image.src = e) : this.image = e }; t.isVisible = function() { var e = this.cacheCanvas || this.image && (this.image.complete || this.image.getContext || 2 <= this.image.readyState); return !!(this.visible && 0 < this.alpha && 0 != this.scaleX && 0 != this.scaleY && e) }; t.DisplayObject_draw = t.draw; t.draw = function(e, t) { if (this.DisplayObject_draw(e, t)) return !0; var n = this.sourceRect; n ? e.drawImage(this.image, n.x, n.y, n.width, n.height, 0, 0, n.width, n.height) : e.drawImage(this.image, 0, 0); return !0 }; t.DisplayObject_getBounds = t.getBounds; t.getBounds = function() { var e = this.DisplayObject_getBounds(); if (e) return e; e = this.sourceRect || this.image; return this.image && (this.image.complete || this.image.getContext || 2 <= this.image.readyState) ? this._rectangle.initialize(0, 0, e.width, e.height) : null }; t.clone = function() { var t = new e(this.image); this.sourceRect && (t.sourceRect = this.sourceRect.clone()); this.cloneProps(t); return t }; t.toString = function() { return "[Bitmap (name=" + this.name + ")]" }; createjs.Bitmap = e })(); this.createjs = this.createjs || {}; (function() { var e = function(e, t) { this.initialize(e, t) }, t = e.prototype = new createjs.DisplayObject; t.currentFrame = 0; t.currentAnimation = null; t.paused = !0; t.spriteSheet = null; t.snapToPixel = !0; t.isLoop = !0; t.offset = 0; t.currentAnimationFrame = 0; t.framerate = 0; t._advanceCount = 0; t._animation = null; t._currentFrame = null; t.rectMask = null; t.DisplayObject_initialize = t.initialize; t.initialize = function(e, t) { this.DisplayObject_initialize(); this.spriteSheet = e; t && this.gotoAndPlay(t) }; t.isVisible = function() { var e = this.cacheCanvas || this.spriteSheet.complete; return !!(this.visible && 0 < this.alpha && 0 != this.scaleX && 0 != this.scaleY && e) }; t.DisplayObject_draw = t.draw; t.draw = function(e, t) { if (this.DisplayObject_draw(e, t)) return !0; this._normalizeFrame(); var n = this.spriteSheet.getFrame(this._currentFrame | 0); if (!n) return !1; var r = n.rect; this.rectMask ? e.drawImage(n.image, r.x + this.rectMask.x, r.y + this.rectMask.y, r.width + this.rectMask.width, r.height + this.rectMask.height, -n.regX + this.rectMask.x, -n.regY + this.rectMask.y, r.width + this.rectMask.width, r.height + this.rectMask.height) : e.drawImage(n.image, r.x, r.y, r.width, r.height, -n.regX, -n.regY, r.width, r.height); return !0 }; t.play = function() { this.paused = !1 }; t.stop = function() { this.paused = !0 }; t.gotoAndPlay = function(e) { this.paused = !1; this._goto(e) }; t.gotoAndStop = function(e) { this.paused = !0; this._goto(e) }; t.advance = function(e) { var t = this._animation && this._animation.speed || 1, n = this.framerate || this.spriteSheet.framerate; e = n && null != e ? e / (1e3 / n) : 1; this._animation ? this.currentAnimationFrame += e * t : this._currentFrame += e * t; this._normalizeFrame() }; t.DisplayObject_getBounds = t.getBounds; t.getBounds = function() { return this.DisplayObject_getBounds() || this.spriteSheet.getFrameBounds(this.currentFrame, this._rectangle) }; t.clone = function() { var t = new e(this.spriteSheet); this.cloneProps(t); return t }; t.toString = function() { return "[Sprite (name=" + this.name + ")]" }; t.DisplayObject__tick = t._tick; t._tick = function(e) { this.paused || this.advance(e && e[0] && e[0].delta); this.DisplayObject__tick(e) }; t._normalizeFrame = function() { var e = this._animation, t = this.paused, n = this._currentFrame, r = this.currentAnimationFrame, i; if (e) if (i = e.frames.length, (r | 0) >= i) { var s = e.next; if (!this._dispatchAnimationEnd(e, n, t, s, i - 1)) { if (s && this.isLoop) return this._goto(s, r - i); this.paused = !0; r = this.currentAnimationFrame = e.frames.length - 1; this._currentFrame = e.frames[r] } } else this._currentFrame = e.frames[r | 0]; else if (i = this.spriteSheet.getNumFrames(), n >= i && !this._dispatchAnimationEnd(e, n, t, i - 1) && (this._currentFrame -= i) >= i) return this._normalizeFrame(); this.currentFrame = this._currentFrame | 0 }; t._dispatchAnimationEnd = function(e, t, n, r, i) { var s = e ? e.name : null; if (this.hasEventListener("animationend")) { var o = new createjs.Event("animationend"); o.name = s; o.next = r; this.dispatchEvent(o) } e = this._animation != e || this._currentFrame != t; e || n || !this.paused || (this.currentAnimationFrame = i, e = !0); return e }; t.DisplayObject_cloneProps = t.cloneProps; t.cloneProps = function(e) { this.DisplayObject_cloneProps(e); e.currentFrame = this.currentFrame; e._currentFrame = this._currentFrame; e.currentAnimation = this.currentAnimation; e.paused = this.paused; e._animation = this._animation; e.currentAnimationFrame = this.currentAnimationFrame; e.framerate = this.framerate }; t._goto = function(e, t) { if (isNaN(e)) { var n = this.spriteSheet.getAnimation(e); n && (this.currentAnimationFrame = t || 0, this._animation = n, this.currentAnimation = e, this._normalizeFrame()) } else this.currentAnimationFrame = 0, this.currentAnimation = this._animation = null, this._currentFrame = e, this._normalizeFrame() }; createjs.Sprite = e })(); this.createjs = this.createjs || {}; (function() { if (!createjs.Sprite) throw "BitmapAnimation is deprecated in favour of Sprite. See VERSIONS file for info on changes."; (createjs.BitmapAnimation = function(e) { console.log("BitmapAnimation is deprecated in favour of Sprite. See VERSIONS file for info on changes."); this.initialize(e) }).prototype = new createjs.Sprite })(); this.createjs = this.createjs || {}; (function() { var e = function(e) { this.initialize(e) }, t = e.prototype = new createjs.DisplayObject; t.graphics = null; t.DisplayObject_initialize = t.initialize; t.initialize = function(e) { this.DisplayObject_initialize(); this.graphics = e ? e : new createjs.Graphics }; t.isVisible = function() { var e = this.cacheCanvas || this.graphics && !this.graphics.isEmpty(); return !!(this.visible && 0 < this.alpha && 0 != this.scaleX && 0 != this.scaleY && e) }; t.DisplayObject_draw = t.draw; t.draw = function(e, t) { if (this.DisplayObject_draw(e, t)) return !0; this.graphics.draw(e); return !0 }; t.clone = function(t) { t = new e(t && this.graphics ? this.graphics.clone() : this.graphics); this.cloneProps(t); return t }; t.toString = function() { return "[Shape (name=" + this.name + ")]" }; createjs.Shape = e })(); this.createjs = this.createjs || {}; (function() { var e = function(e, t, n) { this.initialize(e, t, n) }, t = e.prototype = new createjs.DisplayObject, n = createjs.createCanvas ? createjs.createCanvas() : document.createElement("canvas"); n.getContext && (e._workingContext = n.getContext("2d"), n.width = n.height = 1); e.H_OFFSETS = { start: 0, left: 0, center: -.5, end: -1, right: -1 }; e.V_OFFSETS = { top: 0, hanging: -.01, middle: -.4, alphabetic: -.8, ideographic: -.85, bottom: -1 }; t.text = ""; t.font = null; t.color = null; t.textAlign = "left"; t.textBaseline = "top"; t.maxWidth = null; t.outline = 0; t.lineHeight = 0; t.lineWidth = null; t.DisplayObject_initialize = t.initialize; t.initialize = function(e, t, n) { this.DisplayObject_initialize(); this.text = e; this.font = t; this.color = n }; t.isVisible = function() { var e = this.cacheCanvas || null != this.text && "" !== this.text; return !!(this.visible && 0 < this.alpha && 0 != this.scaleX && 0 != this.scaleY && e) }; t.DisplayObject_draw = t.draw; t.draw = function(e, t) { if (this.DisplayObject_draw(e, t)) return !0; var n = this.color || "#000"; this.outline ? (e.strokeStyle = n, e.lineWidth = 1 * this.outline) : e.fillStyle = n; this._drawText(this._prepContext(e)); return !0 }; t.getMeasuredWidth = function() { return this._prepContext(e._workingContext).measureText(this.text).width }; t.getMeasuredLineHeight = function() { return 1.2 * this._prepContext(e._workingContext).measureText("M").width }; t.getMeasuredHeight = function() { return this._drawText(null, {}).height }; t.DisplayObject_getBounds = t.getBounds; t.getBounds = function() { var t = this.DisplayObject_getBounds(); if (t) return t; if (null == this.text || "" == this.text) return null; var t = this._drawText(null, {}), n = this.maxWidth && this.maxWidth < t.width ? this.maxWidth : t.width, r = n * e.H_OFFSETS[this.textAlign || "left"], i = (this.lineHeight || this.getMeasuredLineHeight()) * e.V_OFFSETS[this.textBaseline || "top"]; return this._rectangle.initialize(r, i, n, t.height) }; t.clone = function() { var t = new e(this.text, this.font, this.color); this.cloneProps(t); return t }; t.toString = function() { return "[Text (text=" + (20 < this.text.length ? this.text.substr(0, 17) + "..." : this.text) + ")]" }; t.DisplayObject_cloneProps = t.cloneProps; t.cloneProps = function(e) { this.DisplayObject_cloneProps(e); e.textAlign = this.textAlign; e.textBaseline = this.textBaseline; e.maxWidth = this.maxWidth; e.outline = this.outline; e.lineHeight = this.lineHeight; e.lineWidth = this.lineWidth }; t._prepContext = function(e) { e.font = this.font; e.textAlign = this.textAlign || "left"; e.textBaseline = this.textBaseline || "top"; return e }; t._drawText = function(t, n) { var r = !!t; r || (t = this._prepContext(e._workingContext)); for (var i = this.lineHeight || this.getMeasuredLineHeight(), s = 0, o = 0, u = String(this.text).split(/(?:\r\n|\r|\n)/), a = 0, f = u.length; a < f; a++) { var l = u[a], h = null; if (null != this.lineWidth && (h = t.measureText(l).width) > this.lineWidth) for (var p = l.split(/(\s)/), l = p[0], h = t.measureText(l).width, d = 1, v = p.length; d < v; d += 2) { var m = t.measureText(p[d] + p[d + 1]).width; h + m > this.lineWidth ? (r && this._drawTextLine(t, l, o * i), h > s && (s = h), l = p[d + 1], h = t.measureText(l).width, o++) : (l += p[d] + p[d + 1], h += m) } r && this._drawTextLine(t, l, o * i); n && null == h && (h = t.measureText(l).width); h > s && (s = h); o++ } n && (n.count = o, n.width = s, n.height = o * i); return n }; t._drawTextLine = function(e, t, n) { this.outline ? e.strokeText(t, 0, n, this.maxWidth || 65535) : e.fillText(t, 0, n, this.maxWidth || 65535) }; createjs.Text = e })(); this.createjs = this.createjs || {}; (function() { function e(e, t) { this.initialize(e, t) } var t = e.prototype = new createjs.DisplayObject; t.text = ""; t.spriteSheet = null; t.lineHeight = 0; t.letterSpacing = 0; t.isNeedCenter = !1; t.centerX = 0; t.centerY = 0; t.textBounds; t.spaceWidth = 0; t.postfix = ""; t.DisplayObject_initialize = t.initialize; t.initialize = function(e, n) { this.DisplayObject_initialize(); this.text = e; this.spriteSheet = n; t.textBounds = new createjs.Rectangle }; t.DisplayObject_draw = t.draw; t.draw = function(e, t) { if (this.DisplayObject_draw(e, t)) return !0; this._drawText(e) }; t.isVisible = function() { var e = this.cacheCanvas || this.spriteSheet && this.spriteSheet.complete && this.text; return !!(this.visible && 0 < this.alpha && 0 != this.scaleX && 0 != this.scaleY && e) }; t.getBounds = function() { var e = this._rectangle; this._drawText(null, e); return e.width ? e : null }; t._getFrame = function(e, t) { var n, r = t.getAnimation(e + this.postfix); r || (e != (n = e.toUpperCase()) || e != (n = e.toLowerCase()) || (n = null), n && (r = t.getAnimation(n + this.postfix))); return r && t.getFrame(r.frames[0]) }; t._getLineHeight = function(e) { return (e = this._getFrame("1", e) || this._getFrame("T", e) || this._getFrame("L", e) || e.getFrame(0)) ? e.rect.height : 1 }; t._getSpaceWidth = function(e) { return (e = this._getFrame("1", e) || this._getFrame("l", e) || this._getFrame("e", e) || this._getFrame("a", e) || e.getFrame(0)) ? e.rect.width : 1 }; t._drawText = function(e, t) { var n, r, i, s = 0, o = 0, u = this.spaceWidth, a = this.lineHeight, f = this.spriteSheet; 0 == u && (u = this._getSpaceWidth(f)); 0 == a && (a = this._getLineHeight(f)); for (var l = 0, c = 0, h = this.text.length; c < h; c++) if (n = this.text.charAt(c), " " == n) s += u; else if ("\n" == n || "\r" == n) "\r" == n && "\n" == this.text.charAt(c + 1) && c++, s - i > l && (l = s - i), s = 0, o += a; else { var p = this._getFrame(n, f); if (p) { var d = p.rect; i = p.regX; n = d.width; e && e.drawImage(p.image, d.x, d.y, n, r = d.height, s - i, o - p.regY, n, r); s += n + this.letterSpacing } } s - i > l && (l = s - i); t && (t.width = l - this.letterSpacing, t.height = o + a); this.textBounds.width = l - this.letterSpacing; this.textBounds.height = o + a }; createjs.BitmapText = e })(); this.createjs = this.createjs || {}; (function() { var e = function() { throw "SpriteSheetUtils cannot be instantiated" }, t = createjs.createCanvas ? createjs.createCanvas() : document.createElement("canvas"); t.getContext && (e._workingCanvas = t, e._workingContext = t.getContext("2d"), t.width = t.height = 1); e.addFlippedFrames = function(t, n, r, i) { if (n || r || i) { var s = 0; n && e._flip(t, ++s, !0, !1); r && e._flip(t, ++s, !1, !0); i && e._flip(t, ++s, !0, !0) } }; e.extractFrame = function(t, n) { isNaN(n) && (n = t.getAnimation(n).frames[0]); var r = t.getFrame(n); if (!r) return null; var i = r.rect, s = e._workingCanvas; s.width = i.width; s.height = i.height; e._workingContext.drawImage(r.image, i.x, i.y, i.width, i.height, 0, 0, i.width, i.height); r = document.createElement("img"); r.src = s.toDataURL("image/png"); return r }; e.mergeAlpha = function(e, t, n) { n || (n = createjs.createCanvas ? createjs.createCanvas() : document.createElement("canvas")); n.width = Math.max(t.width, e.width); n.height = Math.max(t.height, e.height); var r = n.getContext("2d"); r.save(); r.drawImage(e, 0, 0); r.globalCompositeOperation = "destination-in"; r.drawImage(t, 0, 0); r.restore(); return n }; e._flip = function(t, n, r, i) { for (var s = t._images, o = e._workingCanvas, u = e._workingContext, a = s.length / n, f = 0; f < a; f++) { var l = s[f]; l.__tmp = f; u.setTransform(1, 0, 0, 1, 0, 0); u.clearRect(0, 0, o.width + 1, o.height + 1); o.width = l.width; o.height = l.height; u.setTransform(r ? -1 : 1, 0, 0, i ? -1 : 1, r ? l.width : 0, i ? l.height : 0); u.drawImage(l, 0, 0); var h = document.createElement("img"); h.src = o.toDataURL("image/png"); h.width = l.width; h.height = l.height; s.push(h) } u = t._frames; o = u.length / n; for (f = 0; f < o; f++) { var l = u[f], p = l.rect.clone(), h = s[l.image.__tmp + a * n], d = { image: h, rect: p, regX: l.regX, regY: l.regY }; r && (p.x = h.width - p.x - p.width, d.regX = p.width - l.regX); i && (p.y = h.height - p.y - p.height, d.regY = p.height - l.regY); u.push(d) } r = "_" + (r ? "h" : "") + (i ? "v" : ""); i = t._animations; t = t._data; s = i.length / n; for (f = 0; f < s; f++) { u = i[f]; l = t[u]; a = { name: u + r, frequency: l.frequency, next: l.next, frames: [] }; l.next && (a.next += r); u = l.frames; l = 0; for (h = u.length; l < h; l++) a.frames.push(u[l] + o * n); t[a.name] = a; i.push(a.name) } }; createjs.SpriteSheetUtils = e })(); this.createjs = this.createjs || {}; (function() { var e = function() { this.initialize() }, t = e.prototype = new createjs.EventDispatcher; e.ERR_DIMENSIONS = "frame dimensions exceed max spritesheet dimensions"; e.ERR_RUNNING = "a build is already running"; t.maxWidth = 2048; t.maxHeight = 2048; t.spriteSheet = null; t.scale = 1; t.padding = 1; t.timeSlice = .3; t.progress = -1; t._frames = null; t._animations = null; t._data = null; t._nextFrameIndex = 0; t._index = 0; t._timerID = null; t._scale = 1; t.initialize = function() { this._frames = []; this._animations = {} }; t.addFrame = function(t, n, r, i, s, o) { if (this._data) throw e.ERR_RUNNING; n = n || t.y15 || t.nominalBounds; !n && t.getBounds && (n = t.getBounds()); if (!n) return null; r = r || 1; return this._frames.push({ source: t, sourceRect: n, scale: r, funct: i, params: s, scope: o, index: this._frames.length, height: n.height * r }) - 1 }; t.addAnimation = function(t, n, r, i) { if (this._data) throw e.ERR_RUNNING; this._animations[t] = { frames: n, next: r, frequency: i } }; t.addMovieClip = function(t, n, r) { if (this._data) throw e.ERR_RUNNING; var i = t.frameBounds, s = n || t.y15 || t.nominalBounds; !s && t.getBounds && (s = t.getBounds()); if (!s && !i) return null; n = this._frames.length; for (var o = t.timeline.duration, u = 0; u < o; u++) this.addFrame(t, i && i[u] ? i[u] : s, r, function(e) { var t = this.actionsEnabled; this.actionsEnabled = !1; this.gotoAndStop(e); this.actionsEnabled = t }, [u], t); u = t.timeline._labels; t = []; for (var a in u) t.push({ index: u[a], label: a }); if (t.length) for (t.sort(function(e, t) { return e.index - t.index }), u = 0, a = t.length; u < a; u++) { r = t[u].label; for (var i = n + (u == a - 1 ? o : t[u + 1].index), s = [], f = n + t[u].index; f < i; f++) s.push(f); this.addAnimation(r, s, !0) } }; t.build = function() { if (this._data) throw e.ERR_RUNNING; for (this._startBuild(); this._drawNext();); this._endBuild(); return this.spriteSheet }; t.buildAsync = function(t) { if (this._data) throw e.ERR_RUNNING; this.timeSlice = t; this._startBuild(); var n = this; this._timerID = setTimeout(function() { n._run() }, 50 - 50 * Math.max(.01, Math.min(.99, this.timeSlice || .3))) }; t.stopAsync = function() { clearTimeout(this._timerID); this._data = null }; t.clone = function() { throw "SpriteSheetBuilder cannot be cloned." }; t.toString = function() { return "[SpriteSheetBuilder]" }; t._startBuild = function() { var t = this.padding || 0; this.progress = 0; this.spriteSheet = null; this._index = 0; this._scale = this.scale; var n = []; this._data = { images: [], frames: n, animations: this._animations }; var r = this._frames.slice(); r.sort(function(e, t) { return e.height <= t.height ? -1 : 1 }); if (r[r.length - 1].height + 2 * t > this.maxHeight) throw e.ERR_DIMENSIONS; for (var i = 0, s = 0, o = 0; r.length;) { var u = this._fillRow(r, i, o, n, t); u.w > s && (s = u.w); i += u.h; if (!u.h || !r.length) { var a = createjs.createCanvas ? createjs.createCanvas() : document.createElement("canvas"); a.width = this._getSize(s, this.maxWidth); a.height = this._getSize(i, this.maxHeight); this._data.images[o] = a; u.h || (s = i = 0, o++) } } }; t._getSize = function(e, t) { for (var n = 4; Math.pow(2, ++n) < e;); return Math.min(t, Math.pow(2, n)) }; t._fillRow = function(t, n, r, i, s) { var o = this.maxWidth, u = this.maxHeight; n += s; for (var u = u - n, a = s, f = 0, l = t.length - 1; 0 <= l; l--) { var h = t[l], p = this._scale * h.scale, d = h.sourceRect, v = h.source, m = Math.floor(p * d.x - s), g = Math.floor(p * d.y - s), y = Math.ceil(p * d.height + 2 * s), d = Math.ceil(p * d.width + 2 * s); if (d > o) throw e.ERR_DIMENSIONS; y > u || a + d > o || (h.img = r, h.rect = new createjs.Rectangle(a, n, d, y), f = f || y, t.splice(l, 1), i[h.index] = [a, n, d, y, r, Math.round(-m + p * v.regX - s), Math.round(-g + p * v.regY - s)], a += d) } return { w: a, h: f } }; t._endBuild = function() { this.spriteSheet = new createjs.SpriteSheet(this._data); this._data = null; this.progress = 1; this.dispatchEvent("complete") }; t._run = function() { for (var e = 50 * Math.max(.01, Math.min(.99, this.timeSlice || .3)), t = (new Date).getTime() + e, n = !1; t > (new Date).getTime();) if (!this._drawNext()) { n = !0; break } if (n) this._endBuild(); else { var r = this; this._timerID = setTimeout(function() { r._run() }, 50 - e) } e = this.progress = this._index / this._frames.length; this.hasEventListener("progress") && (t = new createjs.Event("progress"), t.progress = e, this.dispatchEvent(t)) }; t._drawNext = function() { var e = this._frames[this._index], t = e.scale * this._scale, n = e.rect, r = e.sourceRect, i = this._data.images[e.img].getContext("2d"); e.funct && e.funct.apply(e.scope, e.params); i.save(); i.beginPath(); i.rect(n.x, n.y, n.width, n.height); i.clip(); i.translate(Math.ceil(n.x - r.x * t), Math.ceil(n.y - r.y * t)); i.scale(t, t); e.source.draw(i); i.restore(); return ++this._index < this._frames.length }; createjs.SpriteSheetBuilder = e })(); this.createjs = this.createjs || {}; (function() { var e = function(e) { this.initialize(e) }, t = e.prototype = new createjs.DisplayObject; t.htmlElement = null; t._oldMtx = null; t._visible = !1; t.DisplayObject_initialize = t.initialize; t.initialize = function(e) { "string" == typeof e && (e = document.getElementById(e)); this.DisplayObject_initialize(); this.mouseEnabled = !1; this.htmlElement = e; e = e.style; e.position = "absolute"; e.transformOrigin = e.WebkitTransformOrigin = e.msTransformOrigin = e.MozTransformOrigin = e.OTransformOrigin = "0% 0%" }; t.isVisible = function() { return null != this.htmlElement }; t.draw = function(e, t) { this.visible && (this._visible = !0); return !0 }; t.cache = function() {}; t.uncache = function() {}; t.updateCache = function() {}; t.hitTest = function() {}; t.localToGlobal = function() {}; t.globalToLocal = function() {}; t.localToLocal = function() {}; t.clone = function() { throw "DOMElement cannot be cloned." }; t.toString = function() { return "[DOMElement (name=" + this.name + ")]" }; t.DisplayObject__tick = t._tick; t._tick = function(e) { var t = this.getStage(); this._visible = !1; t && t.on("drawend", this._handleDrawEnd, this, !0); this.DisplayObject__tick(e) }; t._handleDrawEnd = function(e) { if (e = this.htmlElement) { e = e.style; var t = this._visible ? "visible" : "hidden"; t != e.visibility && (e.visibility = t); if (this._visible) { var t = this.getConcatenatedMatrix(this._matrix), n = this._oldMtx; n && n.alpha == t.alpha || (e.opacity = "" + (1e4 * t.alpha | 0) / 1e4, n && (n.alpha = t.alpha)); if (!n || n.tx != t.tx || n.ty != t.ty || n.a != t.a || n.b != t.b || n.c != t.c || n.d != t.d) { var r = "matrix(" + (1e4 * t.a | 0) / 1e4 + "," + (1e4 * t.b | 0) / 1e4 + "," + (1e4 * t.c | 0) / 1e4 + "," + (1e4 * t.d | 0) / 1e4 + "," + (t.tx + .5 | 0); e.transform = e.WebkitTransform = e.OTransform = e.msTransform = r + "," + (t.ty + .5 | 0) + ")"; e.MozTransform = r + "px," + (t.ty + .5 | 0) + "px)"; this._oldMtx = n ? n.copy(t) : t.clone() } } } }; createjs.DOMElement = e })(); this.createjs = this.createjs || {}; (function() { var e = function() { this.initialize() }, t = e.prototype; t.initialize = function() {}; t.getBounds = function() { return null }; t.applyFilter = function(e, t, n, r, i, s, o, u) {}; t.toString = function() { return "[Filter]" }; t.clone = function() { return new e }; createjs.Filter = e })(); this.createjs = this.createjs || {}; (function() { var e = function(e, t, n) { this.initialize(e, t, n) }, t = e.prototype = new createjs.Filter; t.initialize = function(e, t, n) { if (isNaN(e) || 0 > e) e = 0; this.blurX = e | 0; if (isNaN(t) || 0 > t) t = 0; this.blurY = t | 0; if (isNaN(n) || 1 > n) n = 1; this.quality = n | 0 }; t.blurX = 0; t.blurY = 0; t.quality = 1; t.mul_table = [1, 171, 205, 293, 57, 373, 79, 137, 241, 27, 391, 357, 41, 19, 283, 265, 497, 469, 443, 421, 25, 191, 365, 349, 335, 161, 155, 149, 9, 278, 269, 261, 505, 245, 475, 231, 449, 437, 213, 415, 405, 395, 193, 377, 369, 361, 353, 345, 169, 331, 325, 319, 313, 307, 301, 37, 145, 285, 281, 69, 271, 267, 263, 259, 509, 501, 493, 243, 479, 118, 465, 459, 113, 446, 55, 435, 429, 423, 209, 413, 51, 403, 199, 393, 97, 3, 379, 375, 371, 367, 363, 359, 355, 351, 347, 43, 85, 337, 333, 165, 327, 323, 5, 317, 157, 311, 77, 305, 303, 75, 297, 294, 73, 289, 287, 71, 141, 279, 277, 275, 68, 135, 67, 133, 33, 262, 260, 129, 511, 507, 503, 499, 495, 491, 61, 121, 481, 477, 237, 235, 467, 232, 115, 457, 227, 451, 7, 445, 221, 439, 218, 433, 215, 427, 425, 211, 419, 417, 207, 411, 409, 203, 202, 401, 399, 396, 197, 49, 389, 387, 385, 383, 95, 189, 47, 187, 93, 185, 23, 183, 91, 181, 45, 179, 89, 177, 11, 175, 87, 173, 345, 343, 341, 339, 337, 21, 167, 83, 331, 329, 327, 163, 81, 323, 321, 319, 159, 79, 315, 313, 39, 155, 309, 307, 153, 305, 303, 151, 75, 299, 149, 37, 295, 147, 73, 291, 145, 289, 287, 143, 285, 71, 141, 281, 35, 279, 139, 69, 275, 137, 273, 17, 271, 135, 269, 267, 133, 265, 33, 263, 131, 261, 130, 259, 129, 257, 1]; t.shg_table = [0, 9, 10, 11, 9, 12, 10, 11, 12, 9, 13, 13, 10, 9, 13, 13, 14, 14, 14, 14, 10, 13, 14, 14, 14, 13, 13, 13, 9, 14, 14, 14, 15, 14, 15, 14, 15, 15, 14, 15, 15, 15, 14, 15, 15, 15, 15, 15, 14, 15, 15, 15, 15, 15, 15, 12, 14, 15, 15, 13, 15, 15, 15, 15, 16, 16, 16, 15, 16, 14, 16, 16, 14, 16, 13, 16, 16, 16, 15, 16, 13, 16, 15, 16, 14, 9, 16, 16, 16, 16, 16, 16, 16, 16, 16, 13, 14, 16, 16, 15, 16, 16, 10, 16, 15, 16, 14, 16, 16, 14, 16, 16, 14, 16, 16, 14, 15, 16, 16, 16, 14, 15, 14, 15, 13, 16, 16, 15, 17, 17, 17, 17, 17, 17, 14, 15, 17, 17, 16, 16, 17, 16, 15, 17, 16, 17, 11, 17, 16, 17, 16, 17, 16, 17, 17, 16, 17, 17, 16, 17, 17, 16, 16, 17, 17, 17, 16, 14, 17, 17, 17, 17, 15, 16, 14, 16, 15, 16, 13, 16, 15, 16, 14, 16, 15, 16, 12, 16, 15, 16, 17, 17, 17, 17, 17, 13, 16, 15, 17, 17, 17, 16, 15, 17, 17, 17, 16, 15, 17, 17, 14, 16, 17, 17, 16, 17, 17, 16, 15, 17, 16, 14, 17, 16, 15, 17, 16, 17, 17, 16, 17, 15, 16, 17, 14, 17, 16, 15, 17, 16, 17, 13, 17, 16, 17, 17, 16, 17, 14, 17, 16, 17, 16, 17, 16, 17, 9]; t.getBounds = function() { var e = .5 * Math.pow(this.quality, .6); return new createjs.Rectangle(-this.blurX * e, -this.blurY * e, 2 * this.blurX * e, 2 * this.blurY * e) }; t.applyFilter = function(e, t, n, r, i, s, o, u) { s = s || e; null == o && (o = t); null == u && (u = n); try { var a = e.getImageData(t, n, r, i) } catch (f) { return !1 } e = this.blurX / 2; if (isNaN(e) || 0 > e) return !1; e |= 0; var l = this.blurY / 2; if (isNaN(l) || 0 > l) return !1; l |= 0; if (0 == e && 0 == l) return !1; var c = this.quality; if (isNaN(c) || 1 > c) c = 1; c |= 0; 3 < c && (c = 3); 1 > c && (c = 1); var h = a.data, p, d, v, m, g, y, b, w, E, S, x, T, N = e + e + 1; m = l + l + 1; var C = r - 1, k = i - 1, L = e + 1, A = l + 1, O = { r: 0, b: 0, g: 0, a: 0, next: null }; t = O; for (p = 1; p < N; p++) t = t.next = { r: 0, b: 0, g: 0, a: 0, next: null }; t.next = O; n = N = { r: 0, b: 0, g: 0, a: 0, next: null }; for (p = 1; p < m; p++) n = n.next = { r: 0, b: 0, g: 0, a: 0, next: null }; n.next = N; for (p = null; 0 < c--;) { g = m = 0; var M = this.mul_table[e], _ = this.shg_table[e]; for (n = i; - 1 < --n;) { y = L * (S = h[m]); b = L * (x = h[m + 1]); w = L * (T = h[m + 2]); E = L * (v = h[m + 3]); t = O; for (p = L; - 1 < --p;) t.r = S, t.g = x, t.b = T, t.a = v, t = t.next; for (p = 1; p < L; p++) d = m + ((C < p ? C : p) << 2), y += t.r = h[d], b += t.g = h[d + 1], w += t.b = h[d + 2], E += t.a = h[d + 3], t = t.next; p = O; for (t = 0; t < r; t++) h[m++] = y * M >>> _, h[m++] = b * M >>> _, h[m++] = w * M >>> _, h[m++] = E * M >>> _, d = g + ((d = t + e + 1) < C ? d : C) << 2, y -= p.r - (p.r = h[d]), b -= p.g - (p.g = h[d + 1]), w -= p.b - (p.b = h[d + 2]), E -= p.a - (p.a = h[d + 3]), p = p.next; g += r } M = this.mul_table[l]; _ = this.shg_table[l]; for (t = 0; t < r; t++) { m = t << 2; y = A * (S = h[m]); b = A * (x = h[m + 1]); w = A * (T = h[m + 2]); E = A * (v = h[m + 3]); n = N; for (p = 0; p < A; p++) n.r = S, n.g = x, n.b = T, n.a = v, n = n.next; v = r; for (p = 1; p <= l; p++) m = v + t << 2, y += n.r = h[m], b += n.g = h[m + 1], w += n.b = h[m + 2], E += n.a = h[m + 3], n = n.next, p < k && (v += r); m = t; p = N; if (0 < c) for (n = 0; n < i; n++) d = m << 2, h[d + 3] = v = E * M >>> _, 0 < v ? (h[d] = y * M >>> _, h[d + 1] = b * M >>> _, h[d + 2] = w * M >>> _) : h[d] = h[d + 1] = h[d + 2] = 0, d = t + ((d = n + A) < k ? d : k) * r << 2, y -= p.r - (p.r = h[d]), b -= p.g - (p.g = h[d + 1]), w -= p.b - (p.b = h[d + 2]), E -= p.a - (p.a = h[d + 3]), p = p.next, m += r; else for (n = 0; n < i; n++) d = m << 2, h[d + 3] = v = E * M >>> _, 0 < v ? (v = 255 / v, h[d] = (y * M >>> _) * v, h[d + 1] = (b * M >>> _) * v, h[d + 2] = (w * M >>> _) * v) : h[d] = h[d + 1] = h[d + 2] = 0, d = t + ((d = n + A) < k ? d : k) * r << 2, y -= p.r - (p.r = h[d]), b -= p.g - (p.g = h[d + 1]), w -= p.b - (p.b = h[d + 2]), E -= p.a - (p.a = h[d + 3]), p = p.next, m += r } } s.putImageData(a, o, u); return !0 }; t.clone = function() { return new e(this.blurX, this.blurY, this.quality) }; t.toString = function() { return "[BlurFilter]" }; createjs.BlurFilter = e })(); this.createjs = this.createjs || {}; (function() { var e = function(e) { this.initialize(e) }, t = e.prototype = new createjs.Filter; t.initialize = function(e) { this.alphaMap = e }; t.alphaMap = null; t._alphaMap = null; t._mapData = null; t.applyFilter = function(e, t, n, r, i, s, o, u) { if (!this.alphaMap) return !0; if (!this._prepAlphaMap()) return !1; s = s || e; null == o && (o = t); null == u && (u = n); try { var a = e.getImageData(t, n, r, i) } catch (f) { return !1 } e = a.data; t = this._mapData; n = e.length; for (r = 0; r < n; r += 4) e[r + 3] = t[r] || 0; a.data = e; s.putImageData(a, o, u); return !0 }; t.clone = function() { return new e(this.alphaMap) }; t.toString = function() { return "[AlphaMapFilter]" }; t._prepAlphaMap = function() { if (!this.alphaMap) return !1; if (this.alphaMap == this._alphaMap && this._mapData) return !0; this._mapData = null; var e = this._alphaMap = this.alphaMap, t = e; e instanceof HTMLCanvasElement ? t = t.getContext("2d") : (t = createjs.createCanvas ? createjs.createCanvas() : document.createElement("canvas"), t.width = e.width, t.height = e.height, t = t.getContext("2d"), t.drawImage(e, 0, 0)); try { var n = t.getImageData(0, 0, e.width, e.height) } catch (r) { return !1 } this._mapData = n.data; return !0 }; createjs.AlphaMapFilter = e })(); this.createjs = this.createjs || {}; (function() { var e = function(e) { this.initialize(e) }, t = e.prototype = new createjs.Filter; t.initialize = function(e) { this.mask = e }; t.mask = null; t.applyFilter = function(e, t, n, r, i, s, o, u) { if (!this.mask) return !0; s = s || e; null == o && (o = t); null == u && (u = n); s.save(); s.globalCompositeOperation = "destination-in"; s.drawImage(this.mask, o, u); s.restore(); return !0 }; t.clone = function() { return new e(this.mask) }; t.toString = function() { return "[AlphaMaskFilter]" }; createjs.AlphaMaskFilter = e })(); this.createjs = this.createjs || {}; (function() { var e = function(e, t, n, r, i, s, o, u) { this.initialize(e, t, n, r, i, s, o, u) }, t = e.prototype = new createjs.Filter; t.redMultiplier = 1; t.greenMultiplier = 1; t.blueMultiplier = 1; t.alphaMultiplier = 1; t.redOffset = 0; t.greenOffset = 0; t.blueOffset = 0; t.alphaOffset = 0; t.initialize = function(e, t, n, r, i, s, o, u) { this.redMultiplier = null != e ? e : 1; this.greenMultiplier = null != t ? t : 1; this.blueMultiplier = null != n ? n : 1; this.alphaMultiplier = null != r ? r : 1; this.redOffset = i || 0; this.greenOffset = s || 0; this.blueOffset = o || 0; this.alphaOffset = u || 0 }; t.applyFilter = function(e, t, n, r, i, s, o, u) { s = s || e; null == o && (o = t); null == u && (u = n); try { var a = e.getImageData(t, n, r, i) } catch (f) { return !1 } e = a.data; t = e.length; for (n = 0; n < t; n += 4) e[n] = e[n] * this.redMultiplier + this.redOffset, e[n + 1] = e[n + 1] * this.greenMultiplier + this.greenOffset, e[n + 2] = e[n + 2] * this.blueMultiplier + this.blueOffset, e[n + 3] = e[n + 3] * this.alphaMultiplier + this.alphaOffset; s.putImageData(a, o, u); return !0 }; t.toString = function() { return "[ColorFilter]" }; t.clone = function() { return new e(this.redMultiplier, this.greenMultiplier, this.blueMultiplier, this.alphaMultiplier, this.redOffset, this.greenOffset, this.blueOffset, this.alphaOffset) }; createjs.ColorFilter = e })(); this.createjs = this.createjs || {}; (function() { var e = function(e, t, n, r) { this.initialize(e, t, n, r) }, t = e.prototype = []; e.DELTA_INDEX = [0, .01, .02, .04, .05, .06, .07, .08, .1, .11, .12, .14, .15, .16, .17, .18, .2, .21, .22, .24, .25, .27, .28, .3, .32, .34, .36, .38, .4, .42, .44, .46, .48, .5, .53, .56, .59, .62, .65, .68, .71, .74, .77, .8, .83, .86, .89, .92, .95, .98, 1, 1.06, 1.12, 1.18, 1.24, 1.3, 1.36, 1.42, 1.48, 1.54, 1.6, 1.66, 1.72, 1.78, 1.84, 1.9, 1.96, 2, 2.12, 2.25, 2.37, 2.5, 2.62, 2.75, 2.87, 3, 3.2, 3.4, 3.6, 3.8, 4, 4.3, 4.7, 4.9, 5, 5.5, 6, 6.5, 6.8, 7, 7.3, 7.5, 7.8, 8, 8.4, 8.7, 9, 9.4, 9.6, 9.8, 10]; e.IDENTITY_MATRIX = [1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1]; e.LENGTH = e.IDENTITY_MATRIX.length; t.initialize = function(e, t, n, r) { this.reset(); this.adjustColor(e, t, n, r); return this }; t.reset = function() { return this.copyMatrix(e.IDENTITY_MATRIX) }; t.adjustColor = function(e, t, n, r) { this.adjustHue(r); this.adjustContrast(t); this.adjustBrightness(e); return this.adjustSaturation(n) }; t.adjustBrightness = function(e) { if (0 == e || isNaN(e)) return this; e = this._cleanValue(e, 255); this._multiplyMatrix([1, 0, 0, 0, e, 0, 1, 0, 0, e, 0, 0, 1, 0, e, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1]); return this }; t.adjustContrast = function(t) { if (0 == t || isNaN(t)) return this; t = this._cleanValue(t, 100); var n; 0 > t ? n = 127 + 127 * (t / 100) : (n = t % 1, n = 0 == n ? e.DELTA_INDEX[t] : e.DELTA_INDEX[t << 0] * (1 - n) + e.DELTA_INDEX[(t << 0) + 1] * n, n = 127 * n + 127); this._multiplyMatrix([n / 127, 0, 0, 0, .5 * (127 - n), 0, n / 127, 0, 0, .5 * (127 - n), 0, 0, n / 127, 0, .5 * (127 - n), 0, 0, 0, 1, 0, 0, 0, 0, 0, 1]); return this }; t.adjustSaturation = function(e) { if (0 == e || isNaN(e)) return this; e = this._cleanValue(e, 100); e = 1 + (0 < e ? 3 * e / 100 : e / 100); this._multiplyMatrix([.3086 * (1 - e) + e, .6094 * (1 - e), .082 * (1 - e), 0, 0, .3086 * (1 - e), .6094 * (1 - e) + e, .082 * (1 - e), 0, 0, .3086 * (1 - e), .6094 * (1 - e), .082 * (1 - e) + e, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1]); return this }; t.adjustHue = function(e) { if (0 == e || isNaN(e)) return this; e = this._cleanValue(e, 180) / 180 * Math.PI; var t = Math.cos(e); e = Math.sin(e); this._multiplyMatrix([.213 + .787 * t + -.213 * e, .715 + -.715 * t + -.715 * e, .072 + -.072 * t + .928 * e, 0, 0, .213 + -.213 * t + .143 * e, .715 + t * (1 - .715) + .14 * e, .072 + -.072 * t + -.283 * e, 0, 0, .213 + -.213 * t + -.787 * e, .715 + -.715 * t + .715 * e, .072 + .928 * t + .072 * e, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1]); return this }; t.concat = function(t) { t = this._fixMatrix(t); if (t.length != e.LENGTH) return this; this._multiplyMatrix(t); return this }; t.clone = function() { return new e(this) }; t.toArray = function() { return this.slice(0, e.LENGTH) }; t.copyMatrix = function(t) { for (var n = e.LENGTH, r = 0; r < n; r++) this[r] = t[r]; return this }; t._multiplyMatrix = function(e) { for (var t = [], n = 0; 5 > n; n++) { for (var r = 0; 5 > r; r++) t[r] = this[r + 5 * n]; for (r = 0; 5 > r; r++) { for (var i = 0, s = 0; 5 > s; s++) i += e[r + 5 * s] * t[s]; this[r + 5 * n] = i } } }; t._cleanValue = function(e, t) { return Math.min(t, Math.max(-t, e)) }; t._fixMatrix = function(t) { t instanceof e && (t = t.slice(0)); t.length < e.LENGTH ? t = t.slice(0, t.length).concat(e.IDENTITY_MATRIX.slice(t.length, e.LENGTH)) : t.length > e.LENGTH && (t = t.slice(0, e.LENGTH)); return t }; createjs.ColorMatrix = e })(); this.createjs = this.createjs || {}; (function() { var e = function(e) { this.initialize(e) }, t = e.prototype = new createjs.Filter; t.matrix = null; t.initialize = function(e) { this.matrix = e }; t.applyFilter = function(e, t, n, r, i, s, o, u) { s = s || e; null == o && (o = t); null == u && (u = n); try { var a = e.getImageData(t, n, r, i) } catch (f) { return !1 } e = a.data; t = e.length; var l, c, h, p; l = this.matrix; n = l[0]; r = l[1]; i = l[2]; for (var d = l[3], v = l[4], m = l[5], g = l[6], y = l[7], b = l[8], w = l[9], E = l[10], S = l[11], x = l[12], T = l[13], N = l[14], C = l[15], k = l[16], L = l[17], A = l[18], O = l[19], M = 0; M < t; M += 4) l = e[M], c = e[M + 1], h = e[M + 2], p = e[M + 3], e[M] = l * n + c * r + h * i + p * d + v, e[M + 1] = l * m + c * g + h * y + p * b + w, e[M + 2] = l * E + c * S + h * x + p * T + N, e[M + 3] = l * C + c * k + h * L + p * A + O; s.putImageData(a, o, u); return !0 }; t.toString = function() { return "[ColorMatrixFilter]" }; t.clone = function() { return new e(this.matrix) }; createjs.ColorMatrixFilter = e })(); this.createjs = this.createjs || {}; (function() { var e = function() { throw "Touch cannot be instantiated" }; e.isSupported = function() { return "ontouchstart" in window || window.navigator.msPointerEnabled && 0 < window.navigator.msMaxTouchPoints }; e.enable = function(t, n, r) { if (!t || !t.canvas || !e.isSupported()) return !1; t.__touch = { pointers: {}, multitouch: !n, preventDefault: !r, count: 0 }; "ontouchstart" in window ? e._IOS_enable(t) : window.navigator.msPointerEnabled && e._IE_enable(t); return !0 }; e.disable = function(t) { t && ("ontouchstart" in window ? e._IOS_disable(t) : window.navigator.msPointerEnabled && e._IE_disable(t)) }; e._IOS_enable = function(t) { var n = t.canvas, r = t.__touch.f = function(n) { e._IOS_handleEvent(t, n) }; n.addEventListener("touchstart", r, !1); n.addEventListener("touchmove", r, !1); n.addEventListener("touchend", r, !1); n.addEventListener("touchcancel", r, !1) }; e._IOS_disable = function(e) { var t = e.canvas; t && (e = e.__touch.f, t.removeEventListener("touchstart", e, !1), t.removeEventListener("touchmove", e, !1), t.removeEventListener("touchend", e, !1), t.removeEventListener("touchcancel", e, !1)) }; e._IOS_handleEvent = function(e, t) { if (e) { e.__touch.preventDefault && t.preventDefault && t.preventDefault(); for (var n = t.changedTouches, r = t.type, i = 0, s = n.length; i < s; i++) { var o = n[i], u = o.identifier; o.target == e.canvas && ("touchstart" == r ? this._handleStart(e, u, t, o.pageX, o.pageY) : "touchmove" == r ? this._handleMove(e, u, t, o.pageX, o.pageY) : "touchend" != r && "touchcancel" != r || this._handleEnd(e, u, t)) } } }; e._IE_enable = function(t) { var n = t.canvas, r = t.__touch.f = function(n) { e._IE_handleEvent(t, n) }; n.addEventListener("MSPointerDown", r, !1); window.addEventListener("MSPointerMove", r, !1); window.addEventListener("MSPointerUp", r, !1); window.addEventListener("MSPointerCancel", r, !1); t.__touch.preventDefault && (n.style.msTouchAction = "none"); t.__touch.activeIDs = {} }; e._IE_disable = function(e) { var t = e.__touch.f; window.removeEventListener("MSPointerMove", t, !1); window.removeEventListener("MSPointerUp", t, !1); window.removeEventListener("MSPointerCancel", t, !1); e.canvas && e.canvas.removeEventListener("MSPointerDown", t, !1) }; e._IE_handleEvent = function(e, t) { if (e) { e.__touch.preventDefault && t.preventDefault && t.preventDefault(); var n = t.type, r = t.pointerId, i = e.__touch.activeIDs; if ("MSPointerDown" == n) t.srcElement == e.canvas && (i[r] = !0, this._handleStart(e, r, t, t.pageX, t.pageY)); else if (i[r]) if ("MSPointerMove" == n) this._handleMove(e, r, t, t.pageX, t.pageY); else if ("MSPointerUp" == n || "MSPointerCancel" == n) delete i[r], this._handleEnd(e, r, t) } }; e._handleStart = function(e, t, n, r, i) { var s = e.__touch; if (s.multitouch || !s.count) { var o = s.pointers; o[t] || (o[t] = !0, s.count++, e._handlePointerDown(t, n, r, i)) } }; e._handleMove = function(e, t, n, r, i) { e.__touch.pointers[t] && e._handlePointerMove(t, n, r, i) }; e._handleEnd = function(e, t, n) { var r = e.__touch, i = r.pointers; i[t] && (r.count--, e._handlePointerUp(t, n, !0), delete i[t]) }; createjs.Touch = e })(); this.createjs = this.createjs || {}; (function() { var e = createjs.EaselJS = createjs.EaselJS || {}; e.version = "NEXT"; e.buildDate = "Sun, 06 Oct 2013 10:56:52 GMT" })(); (function() { var e = createjs.Stage.prototype._handlePointerDown, t = createjs.Stage.prototype._handlePointerUp, n = !1; - 1 < navigator.userAgent.indexOf("Android") && (createjs.Stage.prototype._handlePointerDown = function(t, r, i, s) { r.touches && (n = !0, this.enableDOMEvents(!1)); n ? r.touches && "undefined" != typeof r.touches[0].pageX && (r.screenX = r.touches[0].pageX, r.screenY = r.touches[0].pageY, e.call(this, t, r, i, s)) : (r.screenX = r.x, r.screenY = r.y, e.call(this, t, r, i, s)) }, createjs.Stage.prototype._handlePointerUp = function(e, r, i) { r.changedTouches && (n = !0); n ? r.changedTouches && "undefined" != typeof r.changedTouches[0].pageX && (r.screenX = r.changedTouches[0].pageX, r.screenY = r.changedTouches[0].pageY, t.call(this, e, r, i)) : (r.screenX = r.x, r.screenY = r.y, t.call(this, e, r, i)) }) })(); this.createjs = this.createjs || {}; (function() { var e = createjs.PreloadJS = createjs.PreloadJS || {}; e.version = "0.4.0"; e.buildDate = "Wed, 25 Sep 2013 17:09:35 GMT" })(); this.createjs = this.createjs || {}; (function() { var e = function(e, t, n) { this.initialize(e, t, n) }, t = e.prototype; t.type = null; t.target = null; t.currentTarget = null; t.eventPhase = 0; t.bubbles = !1; t.cancelable = !1; t.timeStamp = 0; t.defaultPrevented = !1; t.propagationStopped = !1; t.immediatePropagationStopped = !1; t.removed = !1; t.initialize = function(e, t, n) { this.type = e; this.bubbles = t; this.cancelable = n; this.timeStamp = (new Date).getTime() }; t.preventDefault = function() { this.defaultPrevented = !0 }; t.stopPropagation = function() { this.propagationStopped = !0 }; t.stopImmediatePropagation = function() { this.immediatePropagationStopped = this.propagationStopped = !0 }; t.remove = function() { this.removed = !0 }; t.clone = function() { return new e(this.type, this.bubbles, this.cancelable) }; t.toString = function() { return "[Event (type=" + this.type + ")]" }; createjs.Event = e })(); this.createjs = this.createjs || {}; (function() { var e = function() {}, t = e.prototype; e.initialize = function(e) { e.addEventListener = t.addEventListener; e.on = t.on; e.removeEventListener = e.off = t.removeEventListener; e.removeAllEventListeners = t.removeAllEventListeners; e.hasEventListener = t.hasEventListener; e.dispatchEvent = t.dispatchEvent; e._dispatchEvent = t._dispatchEvent }; t._listeners = null; t._captureListeners = null; t.initialize = function() {}; t.addEventListener = function(e, t, n) { var r; r = n ? this._captureListeners = this._captureListeners || {} : this._listeners = this._listeners || {}; var i = r[e]; return i && this.removeEventListener(e, t, n), i = r[e], i ? i.push(t) : r[e] = [t], t }; t.on = function(e, t, n, r, i, s) { return t.handleEvent && (n = n || t, t = t.handleEvent), n = n || this, this.addEventListener(e, function(e) { t.call(n, e, i); r && e.remove() }, s) }; t.removeEventListener = function(e, t, n) { if (n = n ? this._captureListeners : this._listeners) { var r = n[e]; if (r) for (var i = 0, s = r.length; s > i; i++) if (r[i] == t) { 1 == s ? delete n[e] : r.splice(i, 1); break } } }; t.off = t.removeEventListener; t.removeAllEventListeners = function(e) { e ? (this._listeners && delete this._listeners[e], this._captureListeners && delete this._captureListeners[e]) : this._listeners = this._captureListeners = null }; t.dispatchEvent = function(e, t) { if ("string" == typeof e) { var n = this._listeners; if (!n || !n[e]) return !1; e = new createjs.Event(e) } if (e.target = t || this, e.bubbles && this.parent) { for (var r = this, n = [r]; r.parent;) n.push(r = r.parent); for (var i = n.length, r = i - 1; 0 <= r && !e.propagationStopped; r--) n[r]._dispatchEvent(e, 1 + (0 == r)); for (r = 1; i > r && !e.propagationStopped; r++) n[r]._dispatchEvent(e, 3) } else this._dispatchEvent(e, 2); return e.defaultPrevented }; t.hasEventListener = function(e) { var t = this._listeners, n = this._captureListeners; return !!(t && t[e] || n && n[e]) }; t.toString = function() { return "[EventDispatcher]" }; t._dispatchEvent = function(e, t) { var n, r = 1 == t ? this._captureListeners : this._listeners; if (e && r && (r = r[e.type]) && (n = r.length)) { e.currentTarget = this; e.eventPhase = t; e.removed = !1; for (var r = r.slice(), i = 0; n > i && !e.immediatePropagationStopped; i++) { var s = r[i]; s.handleEvent ? s.handleEvent(e) : s(e); e.removed && (this.off(e.type, s, 1 == t), e.removed = !1) } } }; createjs.EventDispatcher = e })(); this.createjs = this.createjs || {}; (function() { createjs.indexOf = function(e, t) { for (var n = 0, r = e.length; r > n; n++) if (t === e[n]) return n; return -1 } })(); this.createjs = this.createjs || {}; (function() { createjs.proxy = function(e, t) { var n = Array.prototype.slice.call(arguments, 2); return function() { return e.apply(t, Array.prototype.slice.call(arguments, 0).concat(n)) } } })(); this.createjs = this.createjs || {}; (function() { var e = function() { this.init() }; e.prototype = {}; var t = e.prototype; e.FILE_PATTERN = /^(?:(\w+:)\/{2}(\w+(?:\.\w+)*\/?))?([/.]*?(?:[^?]+)?\/)?((?:[^/?]+)\.(\w+))(?:\?(\S+)?)?$/; t.loaded = !1; t.canceled = !1; t.progress = 0; t._item = null; t._basePath = null; t.addEventListener = null; t.removeEventListener = null; t.removeAllEventListeners = null; t.dispatchEvent = null; t.hasEventListener = null; t._listeners = null; createjs.EventDispatcher.initialize(t); t.getItem = function() { return this._item }; t.init = function() {}; t.load = function() {}; t.close = function() {}; t._sendLoadStart = function() { this._isCanceled() || this.dispatchEvent("loadstart") }; t._sendProgress = function(e) { if (!this._isCanceled()) { var t = null; "number" == typeof e ? (this.progress = e, t = new createjs.Event("progress"), t.loaded = this.progress, t.total = 1) : (t = e, this.progress = e.loaded / e.total, (isNaN(this.progress) || 1 / 0 == this.progress) && (this.progress = 0)); t.progress = this.progress; this.hasEventListener("progress") && this.dispatchEvent(t) } }; t._sendComplete = function() { this._isCanceled() || this.dispatchEvent("complete") }; t._sendError = function(e) { !this._isCanceled() && this.hasEventListener("error") && (null == e && (e = new createjs.Event("error")), this.dispatchEvent(e)) }; t._isCanceled = function() { return null == window.createjs || this.canceled ? !0 : !1 }; t._parseURI = function(t) { return t ? t.match(e.FILE_PATTERN) : null }; t._formatQueryString = function(e, t) { if (null == e) throw Error("You must specify data."); var n = [], r; for (r in e) n.push(r + "=" + escape(e[r])); return t && (n = n.concat(t)), n.join("&") }; t.buildPath = function(e, t, n) { if (null != t) { var r = this._parseURI(e); null != r && null != r[1] && "" != r[1] || (e = t + e) } if (null == n) return e; t = []; r = e.indexOf("?"); if (-1 != r) { var i = e.slice(r + 1); t = t.concat(i.split("&")) } return -1 != r ? e.slice(0, r) + "?" + this._formatQueryString(n, t) : e + "?" + this._formatQueryString(n, t) }; t.toString = function() { return "[PreloadJS AbstractLoader]" }; createjs.AbstractLoader = e })(); this.createjs = this.createjs || {}; (function() { var e = function(e, t) { this.init(e, t) }, t = e.prototype = new createjs.AbstractLoader; e.LOAD_TIMEOUT = 8e3; e.BINARY = "binary"; e.CSS = "css"; e.IMAGE = "image"; e.JAVASCRIPT = "javascript"; e.JSON = "json"; e.JSONP = "jsonp"; e.SOUND = "sound"; e.SVG = "svg"; e.TEXT = "text"; e.XML = "xml"; e.POST = "POST"; e.GET = "GET"; t.useXHR = !0; t.stopOnError = !1; t.maintainScriptOrder = !0; t.next = null; t._typeCallbacks = null; t._extensionCallbacks = null; t._loadStartWasDispatched = !1; t._maxConnections = 1; t._currentlyLoadingScript = null; t._currentLoads = null; t._loadQueue = null; t._loadQueueBackup = null; t._loadItemsById = null; t._loadItemsBySrc = null; t._loadedResults = null; t._loadedRawResults = null; t._numItems = 0; t._numItemsLoaded = 0; t._scriptOrder = null; t._loadedScripts = null; t.init = function(e, t) { this._numItems = this._numItemsLoaded = 0; this._loadStartWasDispatched = this._paused = !1; this._currentLoads = []; this._loadQueue = []; this._loadQueueBackup = []; this._scriptOrder = []; this._loadedScripts = []; this._loadItemsById = {}; this._loadItemsBySrc = {}; this._loadedResults = {}; this._loadedRawResults = {}; this._typeCallbacks = {}; this._extensionCallbacks = {}; this._basePath = t; this.setUseXHR(e) }; t.setUseXHR = function(e) { return this.useXHR = 0 != e && null != window.XMLHttpRequest, this.useXHR }; t.removeAll = function() { this.remove() }; t.remove = function(e) { var t = null; if (!e || e instanceof Array) if (e) t = e; else { if (0 < arguments.length) return } else t = [e]; var n = !1; if (t) { for (; t.length;) { for (var r = t.pop(), i = this.getResult(r), s = this._loadQueue.length - 1; 0 <= s; s--) if (o = this._loadQueue[s].getItem(), o.id == r || o.src == r) { this._loadQueue.splice(s, 1)[0].cancel(); break } for (s = this._loadQueueBackup.length - 1; 0 <= s; s--) if (o = this._loadQueueBackup[s].getItem(), o.id == r || o.src == r) { this._loadQueueBackup.splice(s, 1)[0].cancel(); break } if (i) delete this._loadItemsById[i.id], delete this._loadItemsBySrc[i.src], this._disposeItem(i); else for (var s = this._currentLoads.length - 1; 0 <= s; s--) { var o = this._currentLoads[s].getItem(); if (o.id == r || o.src == r) { this._currentLoads.splice(s, 1)[0].cancel(); n = !0; break } } } n && this._loadNext() } else { this.close(); for (r in this._loadItemsById) this._disposeItem(this._loadItemsById[r]); this.init(this.useXHR) } }; t.reset = function() { this.close(); for (var e in this._loadItemsById) this._disposeItem(this._loadItemsById[e]); e = []; i = 0; for (l = this._loadQueueBackup.length; l > i; i++) e.push(this._loadQueueBackup[i].getItem()); this.loadManifest(e, !1) }; e.isBinary = function(e) { switch (e) { case createjs.LoadQueue.IMAGE: case createjs.LoadQueue.BINARY: return !0; default: return !1 } }; t.installPlugin = function(e) { if (null != e && null != e.getPreloadHandlers) { e = e.getPreloadHandlers(); if (null != e.types) for (var t = 0, n = e.types.length; n > t; t++) this._typeCallbacks[e.types[t]] = e.callback; if (null != e.extensions) for (t = 0, n = e.extensions.length; n > t; t++) this._extensionCallbacks[e.extensions[t]] = e.callback } }; t.setMaxConnections = function(e) { this._maxConnections = e; !this._paused && 0 < this._loadQueue.length && this._loadNext() }; t.loadFile = function(e, t, n) { if (null == e) return e = new createjs.Event("error"), e.text = "PRELOAD_NO_FILE", this._sendError(e), void 0; this._addItem(e, n); !1 !== t ? this.setPaused(!1) : this.setPaused(!0) }; t.loadManifest = function(e, t, n) { var r = null; if (e instanceof Array) { if (0 == e.length) return t = new createjs.Event("error"), t.text = "PRELOAD_MANIFEST_EMPTY", this._sendError(t), void 0; r = e } else { if (null == e) return t = new createjs.Event("error"), t.text = "PRELOAD_MANIFEST_NULL", this._sendError(t), void 0; r = [e] } e = 0; for (var i = r.length; i > e; e++) this._addItem(r[e], n); !1 !== t ? this.setPaused(!1) : this.setPaused(!0) }; t.load = function() { this.setPaused(!1) }; t.getItem = function(e) { return this._loadItemsById[e] || this._loadItemsBySrc[e] }; t.getResult = function(e, t) { var n = this._loadItemsById[e] || this._loadItemsBySrc[e]; if (null == n) return null; n = n.id; return t && this._loadedRawResults[n] ? this._loadedRawResults[n] : this._loadedResults[n] }; t.setPaused = function(e) { (this._paused = e) || this._loadNext() }; t.close = function() { for (; this._currentLoads.length;) this._currentLoads.pop().cancel(); this._scriptOrder.length = 0; this._loadedScripts.length = 0; this.loadStartWasDispatched = !1 }; t._addItem = function(e, t) { var n = this._createLoadItem(e); if (null != n) { var r = this._createLoader(n, t); null != r && (this._loadQueue.push(r), this._loadQueueBackup.push(r), this._numItems++, this._updateProgress(), this.maintainScriptOrder && n.type == createjs.LoadQueue.JAVASCRIPT && r instanceof createjs.XHRLoader && (this._scriptOrder.push(n), this._loadedScripts.push(null))) } }; t._createLoadItem = function(e) { var t = null; switch (typeof e) { case "string": t = { src: e }; break; case "object": t = window.HTMLAudioElement && e instanceof HTMLAudioElement ? { tag: e, src: t.tag.src, type: createjs.LoadQueue.SOUND } : e; break; default: return null } e = this._parseURI(t.src); if (null != e && (t.ext = e[5]), null == t.type && (t.type = this._getTypeByExtension(t.ext)), t.type == createjs.LoadQueue.JSON && null != t.callback && (t.type = createjs.LoadQueue.JSONP), t.type == createjs.LoadQueue.JSONP && null == t.callback) throw Error("callback is required for loading JSONP requests."); null == t.tag && (t.tag = this._createTag(t.type)); null != t.id && "" != t.id || (t.id = t.src); if (e = this._typeCallbacks[t.type] || this._extensionCallbacks[t.ext]) { e = e(t.src, t.type, t.id, t.data); if (!1 === e) return null; !0 === e || (null != e.src && (t.src = e.src), null != e.id && (t.id = e.id), null != e.tag && e.tag.load instanceof Function && (t.tag = e.tag), null != e.completeHandler && (t.completeHandler = e.completeHandler)); e.type && (t.type = e.type); e = this._parseURI(t.src); null != e && null != e[5] && (t.ext = e[5].toLowerCase()) } return this._loadItemsById[t.id] = t, this._loadItemsBySrc[t.src] = t, t }; t._createLoader = function(e, t) { var n = this.useXHR; switch (e.type) { case createjs.LoadQueue.JSON: case createjs.LoadQueue.XML: case createjs.LoadQueue.TEXT: n = !0; break; case createjs.LoadQueue.SOUND: case createjs.LoadQueue.JSONP: n = !1; break; case null: return null } return null == t && (t = this._basePath), n ? new createjs.XHRLoader(e, t) : new createjs.TagLoader(e, t) }; t._loadNext = function() { if (!this._paused) { this._loadStartWasDispatched || (this._sendLoadStart(), this._loadStartWasDispatched = !0); this._numItems == this._numItemsLoaded ? (this.loaded = !0, this._sendComplete(), this.next && this.next.load && this.next.load()) : this.loaded = !1; for (var e = 0; e < this._loadQueue.length && !(this._currentLoads.length >= this._maxConnections); e++) { var t = this._loadQueue[e]; if (this.maintainScriptOrder && t instanceof createjs.TagLoader && t.getItem().type == createjs.LoadQueue.JAVASCRIPT) { if (this._currentlyLoadingScript) continue; this._currentlyLoadingScript = !0 } this._loadQueue.splice(e, 1); e--; this._loadItem(t) } } }; t._loadItem = function(e) { e.addEventListener("progress", createjs.proxy(this._handleProgress, this)); e.addEventListener("complete", createjs.proxy(this._handleFileComplete, this)); e.addEventListener("error", createjs.proxy(this._handleFileError, this)); this._currentLoads.push(e); this._sendFileStart(e.getItem()); e.load() }; t._handleFileError = function(e) { var t = e.target; this._numItemsLoaded++; this._updateProgress(); e = new createjs.Event("error"); e.text = "FILE_LOAD_ERROR"; e.item = t.getItem(); this._sendError(e); this.stopOnError || (this._removeLoadItem(t), this._loadNext()) }; t._handleFileComplete = function(e) { e = e.target; var t = e.getItem(); if (this._loadedResults[t.id] = e.getResult(), e instanceof createjs.XHRLoader && (this._loadedRawResults[t.id] = e.getResult(!0)), this._removeLoadItem(e), this.maintainScriptOrder && t.type == createjs.LoadQueue.JAVASCRIPT) { if (!(e instanceof createjs.TagLoader)) return this._loadedScripts[createjs.indexOf(this._scriptOrder, t)] = t, this._checkScriptLoadOrder(e), void 0; this._currentlyLoadingScript = !1 } this._processFinishedLoad(t, e) }; t._processFinishedLoad = function(e, t) { this._numItemsLoaded++; this._updateProgress(); this._sendFileComplete(e, t); this._loadNext() }; t._checkScriptLoadOrder = function() { for (var e = this._loadedScripts.length, t = 0; e > t; t++) { var n = this._loadedScripts[t]; if (null === n) break; !0 !== n && (this._processFinishedLoad(n), this._loadedScripts[t] = !0, t--, e--) } }; t._removeLoadItem = function(e) { for (var t = this._currentLoads.length, n = 0; t > n; n++) if (this._currentLoads[n] == e) { this._currentLoads.splice(n, 1); break } }; t._handleProgress = function(e) { e = e.target; this._sendFileProgress(e.getItem(), e.progress); this._updateProgress() }; t._updateProgress = function() { var e = this._numItemsLoaded / this._numItems, t = this._numItems - this._numItemsLoaded; if (0 < t) { for (var n = 0, r = 0, i = this._currentLoads.length; i > r; r++) n += this._currentLoads[r].progress; e += n / t * (t / this._numItems) } this._sendProgress(e) }; t._disposeItem = function(e) { delete this._loadedResults[e.id]; delete this._loadedRawResults[e.id]; delete this._loadItemsById[e.id]; delete this._loadItemsBySrc[e.src] }; t._createTag = function(e) { var t = null; switch (e) { case createjs.LoadQueue.IMAGE: return document.createElement("img"); case createjs.LoadQueue.SOUND: return t = document.createElement("audio"), t.autoplay = !1, t; case createjs.LoadQueue.JSONP: case createjs.LoadQueue.JAVASCRIPT: return t = document.createElement("script"), t.type = "text/javascript", t; case createjs.LoadQueue.CSS: return t = this.useXHR ? document.createElement("style") : document.createElement("link"), t.rel = "stylesheet", t.type = "text/css", t; case createjs.LoadQueue.SVG: return this.useXHR ? t = document.createElement("svg") : (t = document.createElement("object"), t.type = "image/svg+xml"), t } return null }; t._getTypeByExtension = function(e) { if (null == e) return createjs.LoadQueue.TEXT; switch (e.toLowerCase()) { case "jpeg": case "jpg": case "gif": case "png": case "webp": case "bmp": return createjs.LoadQueue.IMAGE; case "ogg": case "mp3": case "wav": return createjs.LoadQueue.SOUND; case "json": return createjs.LoadQueue.JSON; case "xml": return createjs.LoadQueue.XML; case "css": return createjs.LoadQueue.CSS; case "js": return createjs.LoadQueue.JAVASCRIPT; case "svg": return createjs.LoadQueue.SVG; default: return createjs.LoadQueue.TEXT } }; t._sendFileProgress = function(e, t) { if (this._isCanceled()) return this._cleanUp(), void 0; if (this.hasEventListener("fileprogress")) { var n = new createjs.Event("fileprogress"); n.progress = t; n.loaded = t; n.total = 1; n.item = e; this.dispatchEvent(n) } }; t._sendFileComplete = function(e, t) { if (!this._isCanceled()) { var n = new createjs.Event("fileload"); n.loader = t; n.item = e; n.result = this._loadedResults[e.id]; n.rawResult = this._loadedRawResults[e.id]; e.completeHandler && e.completeHandler(n); this.hasEventListener("fileload") && this.dispatchEvent(n) } }; t._sendFileStart = function(e) { var t = new createjs.Event("y388tart"); t.item = e; this.hasEventListener("y388tart") && this.dispatchEvent(t) }; t.toString = function() { return "[PreloadJS LoadQueue]" }; createjs.LoadQueue = e; var n = function() {}; n.init = function() { var e = navigator.userAgent; n.isFirefox = -1 < e.indexOf("Firefox"); n.isOpera = null != window.opera; n.isChrome = -1 < e.indexOf("Chrome"); n.isIOS = -1 < e.indexOf("iPod") || -1 < e.indexOf("iPhone") || -1 < e.indexOf("iPad") }; n.init(); createjs.LoadQueue.BrowserDetect = n })(); this.createjs = this.createjs || {}; (function() { var e = function(e, t) { this.init(e, t) }, t = e.prototype = new createjs.AbstractLoader; t._loadTimeout = null; t._tagCompleteProxy = null; t._isAudio = !1; t._tag = null; t._jsonResult = null; t.init = function(e, t) { this._item = e; this._basePath = t; this._tag = e.tag; this._isAudio = window.HTMLAudioElement && e.tag instanceof HTMLAudioElement; this._tagCompleteProxy = createjs.proxy(this._handleLoad, this) }; t.getResult = function() { return this._item.type == createjs.LoadQueue.JSONP ? this._jsonResult : this._tag }; t.cancel = function() { this.canceled = !0; this._clean(); this.getItem() }; t.load = function() { var e = this._item, t = this._tag; clearTimeout(this._loadTimeout); this._loadTimeout = setTimeout(createjs.proxy(this._handleTimeout, this), createjs.LoadQueue.LOAD_TIMEOUT); this._isAudio && (t.src = null, t.y252 = "auto"); t.onerror = createjs.proxy(this._handleError, this); this._isAudio ? (t.onstalled = createjs.proxy(this._handleStalled, this), t.addEventListener("canplaythrough", this._tagCompleteProxy, !1)) : (t.onload = createjs.proxy(this._handleLoad, this), t.onreadyy4change = createjs.proxy(this._handleReadyStateChange, this)); var n = this.buildPath(e.src, this._basePath, e.values); switch (e.type) { case createjs.LoadQueue.CSS: t.href = n; break; case createjs.LoadQueue.SVG: t.data = n; break; default: t.src = n } if (e.type == createjs.LoadQueue.JSONP) { if (null == e.callback) throw Error("callback is required for loading JSONP requests."); if (null != window[e.callback]) throw Error('JSONP callback "' + e.callback + '" already exists on window. You need to specify a different callback. Or re-name the current one.'); window[e.callback] = createjs.proxy(this._handleJSONPLoad, this) } e.type != createjs.LoadQueue.SVG && e.type != createjs.LoadQueue.JSONP && e.type != createjs.LoadQueue.JSON && e.type != createjs.LoadQueue.JAVASCRIPT && e.type != createjs.LoadQueue.CSS || (this._startTagVisibility = t.style.visibility, t.style.visibility = "hidden", (document.body || document.getElementsByTagName("body")[0]).appendChild(t)); null != t.load && t.load() }; t._handleJSONPLoad = function(e) { this._jsonResult = e }; t._handleTimeout = function() { this._clean(); var e = new createjs.Event("error"); e.text = "PRELOAD_TIMEOUT"; this._sendError(e) }; t._handleStalled = function() {}; t._handleError = function() { this._clean(); var e = new createjs.Event("error"); this._sendError(e) }; t._handleReadyStateChange = function() { clearTimeout(this._loadTimeout); var e = this.getItem().tag; "loaded" != e.readyState && "complete" != e.readyState || this._handleLoad() }; t._handleLoad = function() { if (!this._isCanceled()) { var e = this.getItem(), t = e.tag; if (!(this.loaded || this.isAudio && 4 !== t.readyState)) { switch (this.loaded = !0, e.type) { case createjs.LoadQueue.SVG: case createjs.LoadQueue.JSONP: t.style.visibility = this._startTagVisibility, (document.body || document.getElementsByTagName("body")[0]).removeChild(t) } this._clean(); this._sendComplete() } } }; t._clean = function() { clearTimeout(this._loadTimeout); var e = this.getItem().tag; e.onload = null; e.removeEventListener && e.removeEventListener("canplaythrough", this._tagCompleteProxy, !1); e.onstalled = null; e.onprogress = null; e.onerror = null; e.parentNode && e.parentNode.removeChild(e); e = this.getItem(); e.type == createjs.LoadQueue.JSONP && (window[e.callback] = null) }; t.toString = function() { return "[PreloadJS TagLoader]" }; createjs.TagLoader = e })(); this.createjs = this.createjs || {}; (function() { var e = function(e, t) { this.init(e, t) }, t = e.prototype = new createjs.AbstractLoader; t._request = null; t._loadTimeout = null; t._xhrLevel = 1; t._response = null; t._rawResponse = null; t.init = function(e, t) { this._item = e; this._basePath = t; !this._createXHR(e) }; t.getResult = function(e) { return e && this._rawResponse ? this._rawResponse : this._response }; t.cancel = function() { this.canceled = !0; this._clean(); this._request.abort() }; t.load = function() { if (null == this._request) return this._handleError(), void 0; this._request.onloadstart = createjs.proxy(this._handleLoadStart, this); this._request.onprogress = createjs.proxy(this._handleProgress, this); this._request.onabort = createjs.proxy(this._handleAbort, this); this._request.onerror = createjs.proxy(this._handleError, this); this._request.ontimeout = createjs.proxy(this._handleTimeout, this); 1 == this._xhrLevel && (this._loadTimeout = setTimeout(createjs.proxy(this._handleTimeout, this), createjs.LoadQueue.LOAD_TIMEOUT)); this._request.onload = createjs.proxy(this._handleLoad, this); this._request.onreadyy4change = createjs.proxy(this._handleReadyStateChange, this); try { this._item.values && this._item.method != createjs.LoadQueue.GET ? this._item.method == createjs.LoadQueue.POST && this._request.send(this._formatQueryString(this._item.values)) : this._request.send() } catch (e) { var t = new createjs.Event("error"); t.error = e; this._sendError(t) } }; t.getAllResponseHeaders = function() { return this._request.getAllResponseHeaders instanceof Function ? this._request.getAllResponseHeaders() : null }; t.getResponseHeader = function(e) { return this._request.getResponseHeader instanceof Function ? this._request.getResponseHeader(e) : null }; t._handleProgress = function(e) { if (e && !(0 < e.loaded && 0 == e.total)) { var t = new createjs.Event("progress"); t.loaded = e.loaded; t.total = e.total; this._sendProgress(t) } }; t._handleLoadStart = function() { clearTimeout(this._loadTimeout); this._sendLoadStart() }; t._handleAbort = function(e) { this._clean(); e = new createjs.Event("error"); e.text = "XHR_ABORTED"; this._sendError(e) }; t._handleError = function() { this._clean(); var e = new createjs.Event("error"); this._sendError(e) }; t._handleReadyStateChange = function() { 4 == this._request.readyState && this._handleLoad() }; t._handleLoad = function() { if (!this.loaded) { if (this.loaded = !0, !this._checkError()) return this._handleError(), void 0; this._response = this._getResponse(); this._clean(); this._generateTag() && this._sendComplete() } }; t._handleTimeout = function(e) { this._clean(); (new createjs.Event("error")).text = "PRELOAD_TIMEOUT"; this._sendError(e) }; t._checkError = function() { switch (parseInt(this._request.status)) { case 404: case 0: return !1 } return !0 }; t._getResponse = function() { if (null != this._response) return this._response; if (null != this._request.response) return this._request.response; try { if (null != this._request.responseText) return this._request.responseText } catch (e) {} try { if (null != this._request.responseXML) return this._request.responseXML } catch (t) {} return null }; t._createXHR = function(e) { var t = document.createElement("a"); t.href = this.buildPath(e.src, this._basePath); var n = document.createElement("a"); n.href = location.href; t = "" != t.hostname && (t.port != n.port || t.protocol != n.protocol || t.hostname != n.hostname); n = null; if (t && window.XDomainRequest) n = new XDomainRequest; else if (window.XMLHttpRequest) n = new XMLHttpRequest; else try { n = new ActiveXObject("Msxml2.XMLHTTP.6.0") } catch (r) { try { n = new ActiveXObject("Msxml2.XMLHTTP.3.0") } catch (i) { try { n = new ActiveXObject("Msxml2.XMLHTTP") } catch (s) { return !1 } } } e.type == createjs.LoadQueue.TEXT && n.overrideMimeType && n.overrideMimeType("text/plain; charset=x-user-defined"); this._xhrLevel = "string" == typeof n.responseType ? 2 : 1; var o = null; return o = e.method == createjs.LoadQueue.GET ? this.buildPath(e.src, this._basePath, e.values) : this.buildPath(e.src, this._basePath), n.open(e.method || createjs.LoadQueue.GET, o, !0), t && n instanceof XMLHttpRequest && 1 == this._xhrLevel && n.setRequestHeader("Origin", location.origin), e.values && e.method == createjs.LoadQueue.POST && n.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"), createjs.LoadQueue.isBinary(e.type) && (n.responseType = "arraybuffer"), this._request = n, !0 }; t._clean = function() { clearTimeout(this._loadTimeout); var e = this._request; e.onloadstart = null; e.onprogress = null; e.onabort = null; e.onerror = null; e.onload = null; e.ontimeout = null; e.onloadend = null; e.onreadyy4change = null }; t._generateTag = function() { var e = this._item.tag; switch (this._item.type) { case createjs.LoadQueue.IMAGE: return e.onload = createjs.proxy(this._handleTagReady, this), e.src = this.buildPath(this._item.src, this._basePath, this._item.values), this._rawResponse = this._response, this._response = e, !1; case createjs.LoadQueue.JAVASCRIPT: return e = document.createElement("script"), e.text = this._response, this._rawResponse = this._response, this._response = e, !0; case createjs.LoadQueue.CSS: if (document.getElementsByTagName("head")[0].appendChild(e), e.styleSheet) e.styleSheet.cssText = this._response; else { var t = document.createTextNode(this._response); e.appendChild(t) } return this._rawResponse = this._response, this._response = e, !0; case createjs.LoadQueue.XML: return t = this._parseXML(this._response, "text/xml"), this._response = t, !0; case createjs.LoadQueue.SVG: return t = this._parseXML(this._response, "image/svg+xml"), this._rawResponse = this._response, null != t.documentElement ? (e.appendChild(t.documentElement), this._response = e) : this._response = t, !0; case createjs.LoadQueue.JSON: e = {}; try { e = JSON.parse(this._response) } catch (n) { e = n } return this._rawResponse = this._response, this._response = e, !0 } return !0 }; t._parseXML = function(e, t) { var n = null; window.DOMParser ? n = (new DOMParser).parseFromString(e, t) : (n = new ActiveXObject("Microsoft.XMLDOM"), n.async = !1, n.loadXML(e)); return n }; t._handleTagReady = function() { this._sendComplete() }; t.toString = function() { return "[PreloadJS XHRLoader]" }; createjs.XHRLoader = e })(); "object" != typeof JSON && (JSON = {}); (function() { function c(e) { return 10 > e ? "0" + e : e } function a(e) { return f.lastIndex = 0, f.test(e) ? '"' + e.replace(f, function(e) { var t = g[e]; return "string" == typeof t ? t : "\\u" + ("0000" + e.charCodeAt(0).toString(16)).slice(-4) }) + '"' : '"' + e + '"' } function b(t, n) { var r, i, s, o, u, f = d, l = n[t]; switch (l && "object" == typeof l && "function" == typeof l.toJSON && (l = l.toJSON(t)), "function" == typeof k && (l = k.call(n, t, l)), typeof l) { case "string": return a(l); case "number": return isFinite(l) ? String(l) : "null"; case "boolean": case "null": return String(l); case "object": if (!l) return "null"; if (d += e, u = [], "[object Array]" === Object.prototype.toString.apply(l)) { o = l.length; for (r = 0; o > r; r += 1) u[r] = b(r, l) || "null"; return s = 0 === u.length ? "[]" : d ? "[\n" + d + u.join(",\n" + d) + "\n" + f + "]" : "[" + u.join(",") + "]", d = f, s } if (k && "object" == typeof k) for (o = k.length, r = 0; o > r; r += 1) "string" == typeof k[r] && (i = k[r], s = b(i, l), s && u.push(a(i) + (d ? ": " : ":") + s)); else for (i in l) Object.prototype.hasOwnProperty.call(l, i) && (s = b(i, l), s && u.push(a(i) + (d ? ": " : ":") + s)); return s = 0 === u.length ? "{}" : d ? "{\n" + d + u.join(",\n" + d) + "\n" + f + "}" : "{" + u.join(",") + "}", d = f, s } } "function" != typeof Date.prototype.toJSON && (Date.prototype.toJSON = function() { return isFinite(this.valueOf()) ? this.getUTCFullYear() + "-" + c(this.getUTCMonth() + 1) + "-" + c(this.getUTCDate()) + "T" + c(this.getUTCHours()) + ":" + c(this.getUTCMinutes()) + ":" + c(this.getUTCSeconds()) + "Z" : null }, String.prototype.toJSON = Number.prototype.toJSON = Boolean.prototype.toJSON = function() { return this.valueOf() }); var h = /[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g, f = /[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g, d, e, g = { "\b": "\\b", " ": "\\t", "\n": "\\n", "\f": "\\f", "\r": "\\r", '"': '\\"', "\\": "\\\\" }, k; "function" != typeof JSON.stringify && (JSON.stringify = function(t, n, r) { var i; if (d = "", e = "", "number" == typeof r) for (i = 0; r > i; i += 1) e += " "; else "string" == typeof r && (e = r); if (k = n, n && "function" != typeof n && ("object" != typeof n || "number" != typeof n.length)) throw Error("JSON.stringify"); return b("", { "": t }) }); "function" != typeof JSON.parse && (JSON.parse = function(b, a) { function c(e, t) { var n, r, i = e[t]; if (i && "object" == typeof i) for (n in i) Object.prototype.hasOwnProperty.call(i, n) && (r = c(i, n), void 0 !== r ? i[n] = r : delete i[n]); return a.call(e, t, i) } var f; if (b = String(b), h.lastIndex = 0, h.test(b) && (b = b.replace(h, function(e) { return "\\u" + ("0000" + e.charCodeAt(0).toString(16)).slice(-4) })), /^[\],:{}\s]*$/.test(b.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g, "@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, "]").replace(/(?:^|:|,)(?:\s*\[)+/g, ""))) return f = eval("(" + b + ")"), "function" == typeof a ? c({ "": f }, "") : f; throw new SyntaxError("JSON.parse") }) })(); this.createjs = this.createjs || {}; (function() { var e = function(e, t, n) { this.initialize(e, t, n) }, t = e.prototype; t.type = null; t.target = null; t.currentTarget = null; t.eventPhase = 0; t.bubbles = !1; t.cancelable = !1; t.timeStamp = 0; t.defaultPrevented = !1; t.propagationStopped = !1; t.immediatePropagationStopped = !1; t.removed = !1; t.initialize = function(e, t, n) { this.type = e; this.bubbles = t; this.cancelable = n; this.timeStamp = (new Date).getTime() }; t.preventDefault = function() { this.defaultPrevented = !0 }; t.stopPropagation = function() { this.propagationStopped = !0 }; t.stopImmediatePropagation = function() { this.immediatePropagationStopped = this.propagationStopped = !0 }; t.remove = function() { this.removed = !0 }; t.clone = function() { return new e(this.type, this.bubbles, this.cancelable) }; t.toString = function() { return "[Event (type=" + this.type + ")]" }; createjs.Event = e })(); this.createjs = this.createjs || {}; (function() { var e = function() { this.initialize() }, t = e.prototype; e.initialize = function(e) { e.addEventListener = t.addEventListener; e.on = t.on; e.removeEventListener = e.off = t.removeEventListener; e.removeAllEventListeners = t.removeAllEventListeners; e.hasEventListener = t.hasEventListener; e.dispatchEvent = t.dispatchEvent; e._dispatchEvent = t._dispatchEvent }; t._listeners = null; t._captureListeners = null; t.initialize = function() {}; t.addEventListener = function(e, t, n) { var r; r = n ? this._captureListeners = this._captureListeners || {} : this._listeners = this._listeners || {}; var i = r[e]; return i && this.removeEventListener(e, t, n), i = r[e], i ? i.push(t) : r[e] = [t], t }; t.on = function(e, t, n, r, i, s) { return t.handleEvent && (n = n || t, t = t.handleEvent), n = n || this, this.addEventListener(e, function(e) { t.call(n, e, i); r && e.remove() }, s) }; t.removeEventListener = function(e, t, n) { if (n = n ? this._captureListeners : this._listeners) { var r = n[e]; if (r) for (var i = 0, s = r.length; s > i; i++) if (r[i] == t) { 1 == s ? delete n[e] : r.splice(i, 1); break } } }; t.off = t.removeEventListener; t.removeAllEventListeners = function(e) { e ? (this._listeners && delete this._listeners[e], this._captureListeners && delete this._captureListeners[e]) : this._listeners = this._captureListeners = null }; t.dispatchEvent = function(e, t) { if ("string" == typeof e) { var n = this._listeners; if (!n || !n[e]) return !1; e = new createjs.Event(e) } if (e.target = t || this, e.bubbles && this.parent) { for (var r = this, n = [r]; r.parent;) n.push(r = r.parent); for (var i = n.length, r = i - 1; 0 <= r && !e.propagationStopped; r--) n[r]._dispatchEvent(e, 1 + (0 == r)); for (r = 1; i > r && !e.propagationStopped; r++) n[r]._dispatchEvent(e, 3) } else this._dispatchEvent(e, 2); return e.defaultPrevented }; t.hasEventListener = function(e) { var t = this._listeners, n = this._captureListeners; return !!(t && t[e] || n && n[e]) }; t.toString = function() { return "[EventDispatcher]" }; t._dispatchEvent = function(e, t) { var n, r = 1 == t ? this._captureListeners : this._listeners; if (e && r && (r = r[e.type]) && (n = r.length)) { e.currentTarget = this; e.eventPhase = t; e.removed = !1; for (var r = r.slice(), i = 0; n > i && !e.immediatePropagationStopped; i++) { var s = r[i]; s.handleEvent ? s.handleEvent(e) : s(e); e.removed && (this.off(e.type, s, 1 == t), e.removed = !1) } } }; createjs.EventDispatcher = e })(); this.createjs = this.createjs || {}; (function() { var e = function(e, t, n) { this.initialize(e, t, n) }, t = e.prototype = new createjs.EventDispatcher; e.NONE = 0; e.LOOP = 1; e.REVERSE = 2; e.IGNORE = {}; e._tweens = []; e._plugins = {}; e.get = function(t, n, r, i) { return i && e.removeTweens(t), new e(t, n, r) }; e.tick = function(t, n) { for (var r = e._tweens.slice(), i = r.length - 1; 0 <= i; i--) { var s = r[i]; n && !s.ignoreGlobalPause || s._paused || s.tick(s._useTicks ? 1 : t) } }; e.handleEvent = function(e) { "tick" == e.type && this.tick(e.delta, e.paused) }; e.removeTweens = function(t) { if (t.tweenjs_count) { for (var n = e._tweens, r = n.length - 1; 0 <= r; r--) n[r]._target == t && (n[r]._paused = !0, n.splice(r, 1)); t.tweenjs_count = 0 } }; e.removeAllTweens = function() { for (var t = e._tweens, n = 0, r = t.length; r > n; n++) { var i = t[n]; i.paused = !0; i.target.tweenjs_count = 0 } t.length = 0 }; e.hasActiveTweens = function(t) { return t ? t.tweenjs_count : e._tweens && !!e._tweens.length }; e.installPlugin = function(t, n) { var r = t.priority; null == r && (t.priority = r = 0); for (var i = 0, s = n.length, o = e._plugins; s > i; i++) { var u = n[i]; if (o[u]) { for (var a = o[u], f = 0, l = a.length; l > f && !(r < a[f].priority); f++); o[u].splice(f, 0, t) } else o[u] = [t] } }; e._register = function(t, n) { var r = t._target, i = e._tweens; if (n) r && (r.tweenjs_count = r.tweenjs_count ? r.tweenjs_count + 1 : 1), i.push(t), !e._inited && createjs.Ticker && (createjs.Ticker.addEventListener("tick", e), e._inited = !0); else for (r && r.tweenjs_count--, r = i.length; r--;) if (i[r] == t) return i.splice(r, 1), void 0 }; t.ignoreGlobalPause = !1; t.loop = !1; t.duration = 0; t.pluginData = null; t.target = null; t.position = null; t.passive = !1; t._paused = !1; t._curQueueProps = null; t._initQueueProps = null; t._steps = null; t._actions = null; t._prevPosition = 0; t._stepPosition = 0; t._prevPos = -1; t._target = null; t._useTicks = !1; t._inited = !1; t.initialize = function(t, n, r) { this.target = this._target = t; n && (this._useTicks = n.useTicks, this.ignoreGlobalPause = n.ignoreGlobalPause, this.loop = n.loop, n.onChange && this.addEventListener("change", n.onChange), n.override && e.removeTweens(t)); this.pluginData = r || {}; this._curQueueProps = {}; this._initQueueProps = {}; this._steps = []; this._actions = []; n && n.paused ? this._paused = !0 : e._register(this, !0); n && null != n.position && this.setPosition(n.position, e.NONE) }; t.wait = function(e, t) { if (null == e || 0 >= e) return this; var n = this._cloneProps(this._curQueueProps); return this._addStep({ d: e, p0: n, e: this._linearEase, p1: n, v: t }) }; t.to = function(e, t, n) { return (isNaN(t) || 0 > t) && (t = 0), this._addStep({ d: t || 0, p0: this._cloneProps(this._curQueueProps), e: n, p1: this._cloneProps(this._appendQueueProps(e)) }) }; t.call = function(e, t, n) { return this._addAction({ f: e, p: t ? t : [this], o: n ? n : this._target }) }; t.set = function(e, t) { return this._addAction({ f: this._set, o: this, p: [e, t ? t : this._target] }) }; t.play = function(e) { return e || (e = this), this.call(e.setPaused, [!1], e) }; t.pause = function(e) { return e || (e = this), this.call(e.setPaused, [!0], e) }; t.setPosition = function(e, t) { 0 > e && (e = 0); null == t && (t = 1); var n = e, r = !1; if (n >= this.duration && (this.loop ? n %= this.duration : (n = this.duration, r = !0)), n == this._prevPos) return r; var i = this._prevPos; if (this.position = this._prevPos = n, this._prevPosition = e, this._target) if (r) this._updateTargetProps(null, 1); else if (0 < this._steps.length) { for (var s = 0, o = this._steps.length; o > s && !(this._steps[s].t > n); s++); s = this._steps[s - 1]; this._updateTargetProps(s, (this._stepPosition = n - s.t) / s.d) } return 0 != t && 0 < this._actions.length && (this._useTicks ? this._runActions(n, n) : 1 == t && i > n ? (i != this.duration && this._runActions(i, this.duration), this._runActions(0, n, !0)) : this._runActions(i, n)), r && this.setPaused(!0), this.dispatchEvent("change"), r }; t.tick = function(e) { this._paused || this.setPosition(this._prevPosition + e) }; t.setPaused = function(t) { return this._paused = !!t, e._register(this, !t), this }; t.w = t.wait; t.t = t.to; t.c = t.call; t.s = t.set; t.toString = function() { return "[Tween]" }; t.clone = function() { throw "Tween can not be cloned." }; t._updateTargetProps = function(t, n) { var r, i, s, o; if (t || 1 != n) { if (this.passive = !!t.v, this.passive) return; t.e && (n = t.e(n, 0, 1, 1)); r = t.p0; i = t.p1 } else this.passive = !1, r = i = this._curQueueProps; for (var u in this._initQueueProps) { null == (s = r[u]) && (r[u] = s = this._initQueueProps[u]); null == (o = i[u]) && (i[u] = o = s); s = s == o || 0 == n || 1 == n || "number" != typeof s ? 1 == n ? o : s : s + (o - s) * n; var a = !1; if (o = e._plugins[u]) for (var f = 0, l = o.length; l > f; f++) { var h = o[f].tween(this, u, s, r, i, n, !!t && r == i, !t); h == e.IGNORE ? a = !0 : s = h } a || (this._target[u] = s) } }; t._runActions = function(e, t, n) { var r = e, i = t, s = -1, o = this._actions.length, u = 1; for (e > t && (r = t, i = e, s = o, o = u = -1); (s += u) != o;) { t = this._actions[s]; var a = t.t; (a == i || a > r && i > a || n && a == e) && t.f.apply(t.o, t.p) } }; t._appendQueueProps = function(t) { var n, r, i, s, o, u; for (u in t) if (void 0 === this._initQueueProps[u]) { if (r = this._target[u], n = e._plugins[u]) for (i = 0, s = n.length; s > i; i++) r = n[i].init(this, u, r); this._initQueueProps[u] = this._curQueueProps[u] = void 0 === r ? null : r } for (u in t) { if (r = this._curQueueProps[u], n = e._plugins[u]) for (o = o || {}, i = 0, s = n.length; s > i; i++) n[i].step && n[i].step(this, u, r, t[u], o); this._curQueueProps[u] = t[u] } return o && this._appendQueueProps(o), this._curQueueProps }; t._cloneProps = function(e) { var t = {}, n; for (n in e) t[n] = e[n]; return t }; t._addStep = function(e) { return 0 < e.d && (this._steps.push(e), e.t = this.duration, this.duration += e.d), this }; t._addAction = function(e) { return e.t = this.duration, this._actions.push(e), this }; t._set = function(e, t) { for (var n in e) t[n] = e[n] }; createjs.Tween = e })(); this.createjs = this.createjs || {}; (function() { var e = function(e, t, n) { this.initialize(e, t, n) }, t = e.prototype = new createjs.EventDispatcher; t.ignoreGlobalPause = !1; t.duration = 0; t.loop = !1; t.position = null; t._paused = !1; t._tweens = null; t._labels = null; t._labelList = null; t._prevPosition = 0; t._prevPos = -1; t._useTicks = !1; t.initialize = function(e, t, n) { this._tweens = []; n && (this._useTicks = n.useTicks, this.loop = n.loop, this.ignoreGlobalPause = n.ignoreGlobalPause, n.onChange && this.addEventListener("change", n.onChange)); e && this.addTween.apply(this, e); this.setLabels(t); n && n.paused ? this._paused = !0 : createjs.Tween._register(this, !0); n && null != n.position && this.setPosition(n.position, createjs.Tween.NONE) }; t.addTween = function(e) { var t = arguments.length; if (1 < t) { for (var n = 0; t > n; n++) this.addTween(arguments[n]); return arguments[0] } return 0 == t ? null : (this.removeTween(e), this._tweens.push(e), e.setPaused(!0), e._paused = !1, e._useTicks = this._useTicks, e.duration > this.duration && (this.duration = e.duration), 0 <= this._prevPos && e.setPosition(this._prevPos, createjs.Tween.NONE), e) }; t.removeTween = function(e) { var t = arguments.length; if (1 < t) { for (var n = !0, r = 0; t > r; r++) n = n && this.removeTween(arguments[r]); return n } if (0 == t) return !1; t = this._tweens; for (r = t.length; r--;) if (t[r] == e) return t.splice(r, 1), e.duration >= this.duration && this.updateDuration(), !0; return !1 }; t.addLabel = function(e, t) { this._labels[e] = t; var n = this._labelList; if (n) { for (var r = 0, i = n.length; i > r && !(t < n[r].position); r++); n.splice(r, 0, { label: e, position: t }) } }; t.setLabels = function(e) { this._labels = e ? e : {} }; t.getLabels = function() { var e = this._labelList; if (!e) { var e = this._labelList = [], t = this._labels, n; for (n in t) e.push({ label: n, position: t[n] }); e.sort(function(e, t) { return e.position - t.position }) } return e }; t.getCurrentLabel = function() { var e = this.getLabels(), t = this.position, n = e.length; if (n) { for (var r = 0; n > r && !(t < e[r].position); r++); return 0 == r ? null : e[r - 1].label } return null }; t.gotoAndPlay = function(e) { this.setPaused(!1); this._goto(e) }; t.gotoAndStop = function(e) { this.setPaused(!0); this._goto(e) }; t.setPosition = function(e, t) { 0 > e && (e = 0); var n = this.loop ? e % this.duration : e, r = !this.loop && e >= this.duration; if (n == this._prevPos) return r; this._prevPosition = e; this.position = this._prevPos = n; for (var i = 0, s = this._tweens.length; s > i; i++) if (this._tweens[i].setPosition(n, t), n != this._prevPos) return !1; return r && this.setPaused(!0), this.dispatchEvent("change"), r }; t.setPaused = function(e) { this._paused = !!e; createjs.Tween._register(this, !e) }; t.updateDuration = function() { for (var e = this.duration = 0, t = this._tweens.length; t > e; e++) { var n = this._tweens[e]; n.duration > this.duration && (this.duration = n.duration) } }; t.tick = function(e) { this.setPosition(this._prevPosition + e) }; t.resolve = function(e) { var t = parseFloat(e); return isNaN(t) && (t = this._labels[e]), t }; t.toString = function() { return "[Timeline]" }; t.clone = function() { throw "Timeline can not be cloned." }; t._goto = function(e) { e = this.resolve(e); null != e && this.setPosition(e) }; createjs.Timeline = e })(); this.createjs = this.createjs || {}; (function() { var e = function() { throw "Ease cannot be instantiated." }; e.linear = function(e) { return e }; e.none = e.linear; e.get = function(e) { return -1 > e && (e = -1), 1 < e && (e = 1), function(t) { return 0 == e ? t : 0 > e ? t * (t * -e + 1 + e) : t * ((2 - t) * e + (1 - e)) } }; e.getPowIn = function(e) { return function(t) { return Math.pow(t, e) } }; e.getPowOut = function(e) { return function(t) { return 1 - Math.pow(1 - t, e) } }; e.getPowInOut = function(e) { return function(t) { return 1 > (t *= 2) ? .5 * Math.pow(t, e) : 1 - .5 * Math.abs(Math.pow(2 - t, e)) } }; e.quadIn = e.getPowIn(2); e.quadOut = e.getPowOut(2); e.quadInOut = e.getPowInOut(2); e.cubicIn = e.getPowIn(3); e.cubicOut = e.getPowOut(3); e.cubicInOut = e.getPowInOut(3); e.quartIn = e.getPowIn(4); e.quartOut = e.getPowOut(4); e.quartInOut = e.getPowInOut(4); e.quintIn = e.getPowIn(5); e.quintOut = e.getPowOut(5); e.quintInOut = e.getPowInOut(5); e.sineIn = function(e) { return 1 - Math.cos(e * Math.PI / 2) }; e.sineOut = function(e) { return Math.sin(e * Math.PI / 2) }; e.sineInOut = function(e) { return -.5 * (Math.cos(Math.PI * e) - 1) }; e.getBackIn = function(e) { return function(t) { return t * t * ((e + 1) * t - e) } }; e.backIn = e.getBackIn(1.7); e.getBackOut = function(e) { return function(t) { return --t * t * ((e + 1) * t + e) + 1 } }; e.backOut = e.getBackOut(1.7); e.getBackInOut = function(e) { return e *= 1.525, function(t) { return 1 > (t *= 2) ? .5 * t * t * ((e + 1) * t - e) : .5 * ((t -= 2) * t * ((e + 1) * t + e) + 2) } }; e.backInOut = e.getBackInOut(1.7); e.circIn = function(e) { return -(Math.sqrt(1 - e * e) - 1) }; e.circOut = function(e) { return Math.sqrt(1 - --e * e) }; e.circInOut = function(e) { return 1 > (e *= 2) ? -.5 * (Math.sqrt(1 - e * e) - 1) : .5 * (Math.sqrt(1 - (e -= 2) * e) + 1) }; e.bounceIn = function(t) { return 1 - e.bounceOut(1 - t) }; e.bounceOut = function(e) { return 1 / 2.75 > e ? 7.5625 * e * e : 2 / 2.75 > e ? 7.5625 * (e -= 1.5 / 2.75) * e + .75 : 2.5 / 2.75 > e ? 7.5625 * (e -= 2.25 / 2.75) * e + .9375 : 7.5625 * (e -= 2.625 / 2.75) * e + .984375 }; e.bounceInOut = function(t) { return .5 > t ? .5 * e.bounceIn(2 * t) : .5 * e.bounceOut(2 * t - 1) + .5 }; e.getElasticIn = function(e, t) { var n = 2 * Math.PI; return function(r) { if (0 == r || 1 == r) return r; var i = t / n * Math.asin(1 / e); return -(e * Math.pow(2, 10 * (r -= 1)) * Math.sin((r - i) * n / t)) } }; e.elasticIn = e.getElasticIn(1, .3); e.getElasticOut = function(e, t) { var n = 2 * Math.PI; return function(r) { if (0 == r || 1 == r) return r; var i = t / n * Math.asin(1 / e); return e * Math.pow(2, -10 * r) * Math.sin((r - i) * n / t) + 1 } }; e.elasticOut = e.getElasticOut(1, .3); e.getElasticInOut = function(e, t) { var n = 2 * Math.PI; return function(r) { var i = t / n * Math.asin(1 / e); return 1 > (r *= 2) ? -.5 * e * Math.pow(2, 10 * (r -= 1)) * Math.sin((r - i) * n / t) : .5 * e * Math.pow(2, -10 * (r -= 1)) * Math.sin((r - i) * n / t) + 1 } }; e.elasticInOut = e.getElasticInOut(1, .3 * 1.5); createjs.Ease = e })(); this.createjs = this.createjs || {}; (function() { var e = function() { throw "MotionGuidePlugin cannot be instantiated." }; e.priority = 0; e._rotOffS; e._rotOffE; e._rotNormS; e._rotNormE; e.install = function() { return createjs.Tween.installPlugin(e, ["guide", "x", "y", "rotation"]), createjs.Tween.IGNORE }; e.init = function(e, t, n) { var r = e.target; return r.hasOwnProperty("x") || (r.x = 0), r.hasOwnProperty("y") || (r.y = 0), r.hasOwnProperty("rotation") || (r.rotation = 0), "rotation" == t && (e.__needsRot = !0), "guide" == t ? null : n }; e.step = function(t, n, r, i, s) { if ("rotation" == n && (t.__rotGlobalS = r, t.__rotGlobalE = i, e.testRotData(t, s)), "guide" != n) return i; var o; i.hasOwnProperty("path") || (i.path = []); n = i.path; if (i.hasOwnProperty("end") || (i.end = 1), i.hasOwnProperty("start") || (i.start = r && r.hasOwnProperty("end") && r.path === n ? r.end : 0), i.hasOwnProperty("_segments") && i._length) return i; r = n.length; if (!(6 <= r && 0 == (r - 2) % 4)) throw "invalid 'path' data, please see documentation for valid paths"; i._segments = []; i._length = 0; for (var u = 2; r > u; u += 4) { for (var a, f, l = n[u - 2], h = n[u - 1], p = n[u + 0], d = n[u + 1], v = n[u + 2], m = n[u + 3], g = l, y = h, b = 0, w = [], E = 1; 10 >= E; E++) { f = E / 10; var S = 1 - f; a = S * S * l + 2 * S * f * p + f * f * v; f = S * S * h + 2 * S * f * d + f * f * m; b += w[w.push(Math.sqrt((o = a - g) * o + (o = f - y) * o)) - 1]; g = a; y = f } i._segments.push(b); i._segments.push(w); i._length += b } o = i.orient; i.orient = !0; n = {}; return e.calc(i, i.start, n), t.__rotPathS = Number(n.rotation.toFixed(5)), e.calc(i, i.end, n), t.__rotPathE = Number(n.rotation.toFixed(5)), i.orient = !1, e.calc(i, i.end, s), i.orient = o, i.orient ? (t.__guideData = i, e.testRotData(t, s), i) : i }; e.testRotData = function(e, t) { if (void 0 === e.__rotGlobalS || void 0 === e.__rotGlobalE) { if (e.__needsRot) return; e.__rotGlobalS = e.__rotGlobalE = void 0 !== e._curQueueProps.rotation ? e._curQueueProps.rotation : t.rotation = e.target.rotation || 0 } if (void 0 !== e.__guideData) { var n = e.__guideData, r = e.__rotGlobalE - e.__rotGlobalS, i = e.__rotPathE - e.__rotPathS, s = r - i; if ("auto" == n.orient) 180 < s ? s -= 360 : -180 > s && (s += 360); else if ("cw" == n.orient) { for (; 0 > s;) s += 360; 0 == s && 0 < r && 180 != r && (s += 360) } else if ("ccw" == n.orient) { for (s = r - (180 < i ? 360 - i : i); 0 < s;) s -= 360; 0 == s && 0 > r && -180 != r && (s -= 360) } n.rotDelta = s; n.rotOffS = e.__rotGlobalS - e.__rotPathS; e.__rotGlobalS = e.__rotGlobalE = e.__guideData = e.__needsRot = void 0 } }; e.tween = function(t, n, r, i, s, o, u) { s = s.guide; if (void 0 == s || s === i.guide) return r; if (s.lastRatio != o) { switch (e.calc(s, (s.end - s.start) * (u ? s.end : o) + s.start, t.target), s.orient) { case "cw": case "ccw": case "auto": t.target.rotation += s.rotOffS + s.rotDelta * o; break; default: t.target.rotation += s.rotOffS } s.lastRatio = o } return "rotation" != n || s.orient && "false" != s.orient ? t.target[n] : r }; e.calc = function(t, n, r) { void 0 == t._segments && e.validate(t); void 0 == r && (r = { x: 0, y: 0, rotation: 0 }); var i = t._segments, s = t.path, o = t._length * n, u = i.length - 2; for (n = 0; o > i[n] && u > n;) o -= i[n], n += 2; for (var i = i[n + 1], a = 0, u = i.length - 1; o > i[a] && u > a;) o -= i[a], a++; o = a / ++u + o / (u * i[a]); n = 2 * n + 2; u = 1 - o; return r.x = u * u * s[n - 2] + 2 * u * o * s[n + 0] + o * o * s[n + 2], r.y = u * u * s[n - 1] + 2 * u * o * s[n + 1] + o * o * s[n + 3], t.orient && (r.rotation = 57.2957795 * Math.atan2((s[n + 1] - s[n - 1]) * u + (s[n + 3] - s[n + 1]) * o, (s[n + 0] - s[n - 2]) * u + (s[n + 2] - s[n + 0]) * o)), r }; createjs.MotionGuidePlugin = e })(); this.createjs = this.createjs || {}; (function() { var e = createjs.TweenJS = createjs.TweenJS || {}; e.version = "0.5.0"; e.buildDate = "Wed, 25 Sep 2013 17:09:35 GMT" })(); this.createjs = this.createjs || {}; (function() { var e = createjs.SoundJS = createjs.SoundJS || {}; e.version = "0.5.0"; e.buildDate = "Wed, 25 Sep 2013 17:09:35 GMT" })(); this.createjs = this.createjs || {}; (function() { var e = function() {}, t = e.prototype; e.initialize = function(e) { e.addEventListener = t.addEventListener; e.on = t.on; e.removeEventListener = e.off = t.removeEventListener; e.removeAllEventListeners = t.removeAllEventListeners; e.hasEventListener = t.hasEventListener; e.dispatchEvent = t.dispatchEvent; e._dispatchEvent = t._dispatchEvent }; t._listeners = null; t._captureListeners = null; t.initialize = function() {}; t.addEventListener = function(e, t, n) { var r; r = n ? this._captureListeners = this._captureListeners || {} : this._listeners = this._listeners || {}; var i = r[e]; return i && this.removeEventListener(e, t, n), i = r[e], i ? i.push(t) : r[e] = [t], t }; t.on = function(e, t, n, r, i, s) { return t.handleEvent && (n = n || t, t = t.handleEvent), n = n || this, this.addEventListener(e, function(e) { t.call(n, e, i); r && e.remove() }, s) }; t.removeEventListener = function(e, t, n) { if (n = n ? this._captureListeners : this._listeners) { var r = n[e]; if (r) for (var i = 0, s = r.length; s > i; i++) if (r[i] == t) { 1 == s ? delete n[e] : r.splice(i, 1); break } } }; t.off = t.removeEventListener; t.removeAllEventListeners = function(e) { e ? (this._listeners && delete this._listeners[e], this._captureListeners && delete this._captureListeners[e]) : this._listeners = this._captureListeners = null }; t.dispatchEvent = function(e, t) { if ("string" == typeof e) { var n = this._listeners; if (!n || !n[e]) return !1; e = new createjs.Event(e) } if (e.target = t || this, e.bubbles && this.parent) { for (var r = this, n = [r]; r.parent;) n.push(r = r.parent); for (var i = n.length, r = i - 1; 0 <= r && !e.propagationStopped; r--) n[r]._dispatchEvent(e, 1 + (0 == r)); for (r = 1; i > r && !e.propagationStopped; r++) n[r]._dispatchEvent(e, 3) } else this._dispatchEvent(e, 2); return e.defaultPrevented }; t.hasEventListener = function(e) { var t = this._listeners, n = this._captureListeners; return !!(t && t[e] || n && n[e]) }; t.toString = function() { return "[EventDispatcher]" }; t._dispatchEvent = function(e, t) { var n, r = 1 == t ? this._captureListeners : this._listeners; if (e && r && (r = r[e.type]) && (n = r.length)) { e.currentTarget = this; e.eventPhase = t; e.removed = !1; for (var r = r.slice(), i = 0; n > i && !e.immediatePropagationStopped; i++) { var s = r[i]; s.handleEvent ? s.handleEvent(e) : s(e); e.removed && (this.off(e.type, s, 1 == t), e.removed = !1) } } }; createjs.EventDispatcher = e })(); this.createjs = this.createjs || {}; (function() { var e = function(e, t, n) { this.initialize(e, t, n) }, t = e.prototype; t.type = null; t.target = null; t.currentTarget = null; t.eventPhase = 0; t.bubbles = !1; t.cancelable = !1; t.timeStamp = 0; t.defaultPrevented = !1; t.propagationStopped = !1; t.immediatePropagationStopped = !1; t.removed = !1; t.initialize = function(e, t, n) { this.type = e; this.bubbles = t; this.cancelable = n; this.timeStamp = (new Date).getTime() }; t.preventDefault = function() { this.defaultPrevented = !0 }; t.stopPropagation = function() { this.propagationStopped = !0 }; t.stopImmediatePropagation = function() { this.immediatePropagationStopped = this.propagationStopped = !0 }; t.remove = function() { this.removed = !0 }; t.clone = function() { return new e(this.type, this.bubbles, this.cancelable) }; t.toString = function() { return "[Event (type=" + this.type + ")]" }; createjs.Event = e })(); this.createjs = this.createjs || {}; (function() { createjs.indexOf = function(e, t) { for (var n = 0, r = e.length; r > n; n++) if (t === e[n]) return n; return -1 } })(); this.createjs = this.createjs || {}; (function() { createjs.proxy = function(e, t) { var n = Array.prototype.slice.call(arguments, 2); return function() { return e.apply(t, Array.prototype.slice.call(arguments, 0).concat(n)) } } })(); this.createjs = this.createjs || {}; (function() { function e() { throw "Sound cannot be instantiated" } function t(e, t) { this.init(e, t) } function n() {} e.DELIMITER = "|"; e.AUDIO_TIMEOUT = 8e3; e.INTERRUPT_ANY = "any"; e.INTERRUPT_EARLY = "early"; e.INTERRUPT_LATE = "late"; e.INTERRUPT_NONE = "none"; e.PLAY_INITED = "playInited"; e.PLAY_SUCCEEDED = "playSucceeded"; e.PLAY_INTERRUPTED = "playInterrupted"; e.PLAY_FINISHED = "playFinished"; e.PLAY_FAILED = "playFailed"; e.SUPPORTED_EXTENSIONS = "mp3 ogg mpeg wav m4a mp4 aiff wma mid".split(" "); e.EXTENSION_MAP = { m4a: "mp4" }; e.FILE_PATTERN = /^(?:(\w+:)\/{2}(\w+(?:\.\w+)*\/?))?([/.]*?(?:[^?]+)?\/)?((?:[^/?]+)\.(\w+))(?:\?(\S+)?)?$/; e.defaultInterruptBehavior = e.INTERRUPT_NONE; e.lastId = 0; e.activePlugin = null; e.pluginsRegistered = !1; e.masterVolume = 1; e.masterMute = !1; e.instances = []; e.idHash = {}; e.y252Hash = {}; e.defaultSoundInstance = null; e.addEventListener = null; e.removeEventListener = null; e.removeAllEventListeners = null; e.dispatchEvent = null; e.hasEventListener = null; e._listeners = null; createjs.EventDispatcher.initialize(e); e.sendFileLoadEvent = function(t) { if (e.y252Hash[t]) for (var n = 0, r = e.y252Hash[t].length; r > n; n++) { var i = e.y252Hash[t][n]; if (e.y252Hash[t][n] = !0, e.hasEventListener("fileload")) { var s = new createjs.Event("fileload"); s.src = i.src; s.id = i.id; s.data = i.data; e.dispatchEvent(s) } } }; e.getPreloadHandlers = function() { return { callback: createjs.proxy(e.initLoad, e), types: ["sound"], extensions: e.SUPPORTED_EXTENSIONS } }; e.registerPlugin = function(t) { return e.pluginsRegistered = !0, null == t ? !1 : t.isSupported() ? (e.activePlugin = new t, !0) : !1 }; e.registerPlugins = function(t) { for (var n = 0, r = t.length; r > n; n++) if (e.registerPlugin(t[n])) return !0; return !1 }; e.initializeDefaultPlugins = function() { return null != e.activePlugin ? !0 : e.pluginsRegistered ? !1 : e.registerPlugins([createjs.WebAudioPlugin, createjs.HTMLAudioPlugin]) ? !0 : !1 }; e.isReady = function() { return null != e.activePlugin }; e.getCapabilities = function() { return null == e.activePlugin ? null : e.activePlugin.capabilities }; e.getCapability = function(t) { return null == e.activePlugin ? null : e.activePlugin.capabilities[t] }; e.initLoad = function(t, n, r, i, s) { t = e.registerSound(t, r, i, !1, s); return null == t ? !1 : t }; e.registerSound = function(n, r, i, s, o) { if (!e.initializeDefaultPlugins()) return !1; n instanceof Object && (o = r, r = n.id, i = n.data, n = n.src); var u = e.parsePath(n, "sound", r, i); if (null == u) return !1; null != r && (e.idHash[r] = u.src); var f = null; null != i && (isNaN(i.channels) ? isNaN(i) || (f = parseInt(i)) : f = parseInt(i.channels)); var l = e.activePlugin.register(u.src, f); if (null != l && (null != l.numChannels && (f = l.numChannels), t.create(u.src, f), null != i && isNaN(i) ? i.channels = u.data.channels = f || t.maxPerChannel() : i = u.data = f || t.maxPerChannel(), null != l.tag ? u.tag = l.tag : l.src && (u.src = l.src), null != l.completeHandler && (u.completeHandler = l.completeHandler), l.type && (u.type = l.type)), 0 != s) if (e.y252Hash[u.src] || (e.y252Hash[u.src] = []), e.y252Hash[u.src].push({ src: n, id: r, data: i }), 1 == e.y252Hash[u.src].length) null == o && (o = ""), e.activePlugin.y252(u.src, l, o); else if (1 == e.y252Hash[u.src][0]) return !0; return u }; e.registerManifest = function(e, t) { for (var n = [], r = 0, i = e.length; i > r; r++) n[r] = createjs.Sound.registerSound(e[r].src, e[r].id, e[r].data, e[r].y252, t); return n }; e.removeSound = function(n) { if (null == e.activePlugin) return !1; n instanceof Object && (n = n.src); n = e.getSrcById(n); n = e.parsePath(n); if (null == n) return !1; n = n.src; for (var r in e.idHash) e.idHash[r] == n && delete e.idHash[r]; return t.removeSrc(n), delete e.y252Hash[n], e.activePlugin.removeSound(n), !0 }; e.removeManifest = function(e) { for (var t = [], n = 0, r = e.length; r > n; n++) t[n] = createjs.Sound.removeSound(e[n].src); return t }; e.removeAllSounds = function() { e.idHash = {}; e.y252Hash = {}; t.removeAll(); e.activePlugin.removeAllSounds() }; e.loadComplete = function(t) { var n = e.parsePath(t, "sound"); return t = n ? e.getSrcById(n.src) : e.getSrcById(t), 1 == e.y252Hash[t][0] }; e.parsePath = function(t, n, r, i) { "string" != typeof t && (t = t.toString()); t = t.split(e.DELIMITER); n = { type: n || "sound", id: r, data: i }; r = e.getCapabilities(); i = 0; for (var s = t.length; s > i; i++) { var o = t[i], u = o.match(e.FILE_PATTERN); if (null == u) return !1; var a = u[4], u = u[5]; if (r[u] && -1 < createjs.indexOf(e.SUPPORTED_EXTENSIONS, u)) return n.name = a, n.src = o, n.extension = u, n } return null }; e.play = function(t, n, r, i, s, o, u) { t = e.createInstance(t); return e.playInstance(t, n, r, i, s, o, u) || t.playFailed(), t }; e.createInstance = function(n) { if (!e.initializeDefaultPlugins()) return e.defaultSoundInstance; n = e.getSrcById(n); n = e.parsePath(n, "sound"); var r = null; return null != n && null != n.src ? (t.create(n.src), r = e.activePlugin.create(n.src)) : r = e.defaultSoundInstance, r.uniqueId = e.lastId++, r }; e.setVolume = function(t) { if (null == Number(t)) return !1; if (t = Math.max(0, Math.min(1, t)), e.masterVolume = t, !this.activePlugin || !this.activePlugin.setVolume || !this.activePlugin.setVolume(t)) for (var n = this.instances, r = 0, i = n.length; i > r; r++) n[r].setMasterVolume(t) }; e.getVolume = function() { return e.masterVolume }; e.setMute = function(e) { if (null == e || void 0 == e) return !1; if (this.masterMute = e, !this.activePlugin || !this.activePlugin.setMute || !this.activePlugin.setMute(e)) for (var t = this.instances, n = 0, r = t.length; r > n; n++) t[n].setMasterMute(e); return !0 }; e.getMute = function() { return this.masterMute }; e.stop = function() { for (var e = this.instances, t = e.length; t--;) e[t].stop() }; e.playInstance = function(t, n, r, i, s, o, u) { if (n instanceof Object && (r = n.delay, i = n.offset, s = n.loop, o = n.volume, u = n.pan), n = n || e.defaultInterruptBehavior, null == r && (r = 0), null == i && (i = t.getPosition()), null == s && (s = 0), null == o && (o = t.volume), null == u && (u = t.pan), 0 == r) { if (!e.beginPlaying(t, n, i, s, o, u)) return !1 } else r = setTimeout(function() { e.beginPlaying(t, n, i, s, o, u) }, r), t.delayTimeoutId = r; return this.instances.push(t), !0 }; e.beginPlaying = function(e, n, r, i, s, o) { return t.add(e, n) ? e.beginPlaying(r, i, s, o) ? !0 : (e = createjs.indexOf(this.instances, e), -1 < e && this.instances.splice(e, 1), !1) : !1 }; e.getSrcById = function(t) { return null == e.idHash || null == e.idHash[t] ? t : e.idHash[t] }; e.playFinished = function(e) { t.remove(e); e = createjs.indexOf(this.instances, e); - 1 < e && this.instances.splice(e, 1) }; createjs.Sound = e; t.channels = {}; t.create = function(e, n) { return null == t.get(e) ? (t.channels[e] = new t(e, n), !0) : !1 }; t.removeSrc = function(e) { var n = t.get(e); return null == n ? !1 : (n.removeAll(), delete t.channels[e], !0) }; t.removeAll = function() { for (var e in t.channels) t.channels[e].removeAll(); t.channels = {} }; t.add = function(e, n) { var r = t.get(e.src); return null == r ? !1 : r.add(e, n) }; t.remove = function(e) { var n = t.get(e.src); return null == n ? !1 : (n.remove(e), !0) }; t.maxPerChannel = function() { return r.maxDefault }; t.get = function(e) { return t.channels[e] }; var r = t.prototype; r.src = null; r.max = null; r.maxDefault = 100; r.length = 0; r.init = function(e, t) { this.src = e; this.max = t || this.maxDefault; - 1 == this.max && this.max == this.maxDefault; this.instances = [] }; r.get = function(e) { return this.instances[e] }; r.add = function(e, t) { return this.getSlot(t, e) ? (this.instances.push(e), this.length++, !0) : !1 }; r.remove = function(e) { e = createjs.indexOf(this.instances, e); return -1 == e ? !1 : (this.instances.splice(e, 1), this.length--, !0) }; r.removeAll = function() { for (var e = this.length - 1; 0 <= e; e--) this.instances[e].stop() }; r.getSlot = function(t) { for (var n, r, i = 0, s = this.max; s > i; i++) { if (n = this.get(i), null == n) return !0; (t != e.INTERRUPT_NONE || n.playState == e.PLAY_FINISHED) && (0 != i ? n.playState == e.PLAY_FINISHED || n.playState == e.PLAY_INTERRUPTED || n.playState == e.PLAY_FAILED ? r = n : (t == e.INTERRUPT_EARLY && n.getPosition() < r.getPosition() || t == e.INTERRUPT_LATE && n.getPosition() > r.getPosition()) && (r = n) : r = n) } return null != r ? (r.interrupt(), this.remove(r), !0) : !1 }; r.toString = function() { return "[Sound SoundChannel]" }; e.defaultSoundInstance = new function() { this.isDefault = !0; this.addEventListener = this.removeEventListener = this.removeAllEventListener = this.dispatchEvent = this.hasEventListener = this._listeners = this.interrupt = this.playFailed = this.pause = this.resume = this.play = this.beginPlaying = this.cleanUp = this.stop = this.setMasterVolume = this.setVolume = this.mute = this.setMute = this.getMute = this.setPan = this.getPosition = this.setPosition = function() { return !1 }; this.getVolume = this.getPan = this.getDuration = function() { return 0 }; this.playState = e.PLAY_FAILED; this.toString = function() { return "[Sound Default Sound Instance]" } }; null == createjs.proxy && (createjs.proxy = function() { throw "Proxy has been moved to an external file, and must be included separately." }); n.init = function() { var e = window.navigator.userAgent; n.isFirefox = -1 < e.indexOf("Firefox"); n.isOpera = null != window.opera; n.isChrome = -1 < e.indexOf("Chrome"); n.isIOS = -1 < e.indexOf("iPod") || -1 < e.indexOf("iPhone") || -1 < e.indexOf("iPad"); n.isAndroid = -1 < e.indexOf("Android"); n.isBlackberry = -1 < e.indexOf("Blackberry") }; n.init(); createjs.Sound.BrowserDetect = n })(); this.createjs = this.createjs || {}; (function() { function e() { this.init() } e.capabilities = null; e.isSupported = function() { var t = createjs.Sound.BrowserDetect.isIOS || createjs.Sound.BrowserDetect.isAndroid || createjs.Sound.BrowserDetect.isBlackberry; return "file:" != location.protocol || t || this.isFileXHRSupported() ? (e.generateCapabilities(), null == e.context ? !1 : !0) : !1 }; e.isFileXHRSupported = function() { var e = !0, t = new XMLHttpRequest; try { t.open("GET", "fail.fail", !1) } catch (n) { return e = !1 } t.onerror = function() { e = !1 }; t.onload = function() { e = 404 == this.status || 200 == this.status || 0 == this.status && "" != this.response }; try { t.send() } catch (r) { e = !1 } return e }; e.generateCapabilities = function() { if (null == e.capabilities) { var t = document.createElement("audio"); if (null == t.canPlayType) return null; if (window.webkitAudioContext) e.context = new webkitAudioContext; else { if (!window.AudioContext) return null; e.context = new AudioContext } e.compatibilitySetUp(); e.playEmptySound(); e.capabilities = { panning: !0, volume: !0, tracks: -1 }; for (var n = createjs.Sound.SUPPORTED_EXTENSIONS, r = createjs.Sound.EXTENSION_MAP, i = 0, s = n.length; s > i; i++) { var o = n[i], u = r[o] || o; e.capabilities[o] = "no" != t.canPlayType("audio/" + o) && "" != t.canPlayType("audio/" + o) || "no" != t.canPlayType("audio/" + u) && "" != t.canPlayType("audio/" + u) } 2 > e.context.destination.numberOfChannels && (e.capabilities.panning = !1); e.dynamicsCompressorNode = e.context.createDynamicsCompressor(); e.dynamicsCompressorNode.connect(e.context.destination); e.gainNode = e.context.createGain(); e.gainNode.connect(e.dynamicsCompressorNode) } }; e.compatibilitySetUp = function() { if (!e.context.createGain) { e.context.createGain = e.context.createGainNode; var t = e.context.createBufferSource(); t.__proto__.start = t.__proto__.noteGrainOn; t.__proto__.stop = t.__proto__.noteOff; this.panningModel = 0 } }; e.playEmptySound = function() { var e = this.context.createBuffer(1, 1, 22050), t = this.context.createBufferSource(); t.buffer = e; t.connect(this.context.destination); t.start(0, 0, 0) }; var t = e.prototype; t.capabilities = null; t.volume = 1; t.context = null; t.panningModel = "equalpower"; t.dynamicsCompressorNode = null; t.gainNode = null; t.arrayBuffers = null; t.init = function() { this.capabilities = e.capabilities; this.arrayBuffers = {}; this.context = e.context; this.gainNode = e.gainNode; this.dynamicsCompressorNode = e.dynamicsCompressorNode }; t.register = function(e) { this.arrayBuffers[e] = !0; return { tag: new createjs.WebAudioPlugin.Loader(e, this) } }; t.isPreloadStarted = function(e) { return null != this.arrayBuffers[e] }; t.isPreloadComplete = function(e) { return !(null == this.arrayBuffers[e] || 1 == this.arrayBuffers[e]) }; t.removeFromPreload = function(e) { delete this.arrayBuffers[e] }; t.removeSound = function(e) { delete this.arrayBuffers[e] }; t.removeAllSounds = function() { this.arrayBuffers = {} }; t.addPreloadResults = function(e, t) { this.arrayBuffers[e] = t }; t.handlePreloadComplete = function() { createjs.Sound.sendFileLoadEvent(this.src) }; t.y252 = function(e, t, n) { this.arrayBuffers[e] = !0; e = new createjs.WebAudioPlugin.Loader(e, this); e.onload = this.handlePreloadComplete; null != n && (e.src = n + e.src); e.load() }; t.create = function(e) { return this.isPreloadStarted(e) || this.y252(e), new createjs.WebAudioPlugin.SoundInstance(e, this) }; t.setVolume = function(e) { return this.volume = e, this.updateVolume(), !0 }; t.updateVolume = function() { var e = createjs.Sound.masterMute ? 0 : this.volume; e != this.gainNode.gain.value && (this.gainNode.gain.value = e) }; t.getVolume = function() { return this.volume }; t.setMute = function() { return this.updateVolume(), !0 }; t.toString = function() { return "[WebAudioPlugin]" }; createjs.WebAudioPlugin = e })(); (function() { function e(e, t) { this.init(e, t) } var t = e.prototype; t.src = null; t.uniqueId = -1; t.playState = null; t.owner = null; t.offset = 0; t.delay = 0; t._volume = 1; Object.defineProperty(t, "volume", { get: function() { return this._volume }, set: function(e) { return null == Number(e) ? !1 : (e = Math.max(0, Math.min(1, e)), this._volume = e, this.updateVolume(), void 0) } }); t._pan = 0; Object.defineProperty(t, "pan", { get: function() { return this._pan }, set: function(e) { return this.owner.capabilities.panning && null != Number(e) ? (e = Math.max(-1, Math.min(1, e)), this._pan = e, this.panNode.setPosition(e, 0, -.5), void 0) : !1 } }); t.duration = 0; t.remainingLoops = 0; t.delayTimeoutId = null; t.soundCompleteTimeout = null; t.panNode = null; t.gainNode = null; t.sourceNode = null; t.sourceNodeNext = null; t.muted = !1; t.paused = !1; t.startTime = 0; t.addEventListener = null; t.removeEventListener = null; t.removeAllEventListeners = null; t.dispatchEvent = null; t.hasEventListener = null; t._listeners = null; t.endedHandler = null; t.readyHandler = null; t.stalledHandler = null; t.sendEvent = function(e) { e = new createjs.Event(e); this.dispatchEvent(e) }; t.init = function(e, t) { this.owner = t; this.src = e; this.panNode = this.owner.context.createPanner(); this.panNode.panningModel = this.owner.panningModel; this.gainNode = this.owner.context.createGain(); this.gainNode.connect(this.panNode); this.owner.isPreloadComplete(this.src) && (this.duration = 1e3 * this.owner.arrayBuffers[this.src].duration); this.endedHandler = createjs.proxy(this.handleSoundComplete, this); this.readyHandler = createjs.proxy(this.handleSoundReady, this); this.stalledHandler = createjs.proxy(this.handleSoundStalled, this) }; t.cleanUp = function() { this.sourceNode && this.sourceNode.playbackState != this.sourceNode.UNSCHEDULED_STATE && (this.sourceNode = this.cleanUpAudioNode(this.sourceNode), this.sourceNodeNext = this.cleanUpAudioNode(this.sourceNodeNext)); 0 != this.panNode.numberOfOutputs && this.panNode.disconnect(0); clearTimeout(this.delayTimeoutId); clearTimeout(this.soundCompleteTimeout); this.startTime = 0; null != window.createjs && createjs.Sound.playFinished(this) }; t.cleanUpAudioNode = function(e) { return e && (e.stop(0), e.disconnect(this.gainNode), e = null), e }; t.interrupt = function() { this.playState = createjs.Sound.PLAY_INTERRUPTED; this.cleanUp(); this.paused = !1; this.sendEvent("interrupted") }; t.handleSoundStalled = function() { this.sendEvent("failed") }; t.handleSoundReady = function() { if (null != window.createjs) { if (1e3 * this.offset > this.getDuration()) return this.playFailed(), void 0; 0 > this.offset && (this.offset = 0); this.playState = createjs.Sound.PLAY_SUCCEEDED; this.paused = !1; this.panNode.connect(this.owner.gainNode); var e = this.owner.arrayBuffers[this.src].duration; this.sourceNode = this.createAndPlayAudioNode(this.owner.context.currentTime - e, this.offset); this.duration = 1e3 * e; this.startTime = this.sourceNode.startTime - this.offset; this.soundCompleteTimeout = setTimeout(this.endedHandler, 1e3 * (e - this.offset)); 0 != this.remainingLoops && (this.sourceNodeNext = this.createAndPlayAudioNode(this.startTime, 0)) } }; t.createAndPlayAudioNode = function(e, t) { var n = this.owner.context.createBufferSource(); return n.buffer = this.owner.arrayBuffers[this.src], n.connect(this.gainNode), this.owner.context.currentTime, n.startTime = e + n.buffer.duration, n.start(n.startTime, t, n.buffer.duration - t), n }; t.play = function(e, t, n, r, i, s) { this.cleanUp(); createjs.Sound.playInstance(this, e, t, n, r, i, s) }; t.beginPlaying = function(e, t, n, r) { return null != window.createjs && this.src ? (this.offset = e / 1e3, this.remainingLoops = t, this.volume = n, this.pan = r, this.owner.isPreloadComplete(this.src) ? (this.handleSoundReady(null), this.sendEvent("succeeded"), 1) : (this.playFailed(), void 0)) : void 0 }; t.pause = function() { return this.paused || this.playState != createjs.Sound.PLAY_SUCCEEDED ? !1 : (this.paused = !0, this.offset = this.owner.context.currentTime - this.startTime, this.cleanUpAudioNode(this.sourceNode), this.cleanUpAudioNode(this.sourceNodeNext), 0 != this.panNode.numberOfOutputs && this.panNode.disconnect(), clearTimeout(this.delayTimeoutId), clearTimeout(this.soundCompleteTimeout), !0) }; t.resume = function() { return this.paused ? (this.handleSoundReady(null), !0) : !1 }; t.stop = function() { return this.playState = createjs.Sound.PLAY_FINISHED, this.cleanUp(), this.offset = 0, !0 }; t.setVolume = function(e) { return this.volume = e, !0 }; t.updateVolume = function() { var e = this.muted ? 0 : this._volume; return e != this.gainNode.gain.value ? (this.gainNode.gain.value = e, !0) : !1 }; t.getVolume = function() { return this.volume }; t.setMute = function(e) { return null == e || void 0 == e ? !1 : (this.muted = e, this.updateVolume(), !0) }; t.getMute = function() { return this.muted }; t.setPan = function(e) { return this.pan = e, this.pan != e ? !1 : void 0 }; t.getPan = function() { return this.pan }; t.getPosition = function() { return 1e3 * (this.paused || null == this.sourceNode ? this.offset : this.owner.context.currentTime - this.startTime) }; t.setPosition = function(e) { return this.offset = e / 1e3, this.sourceNode && this.sourceNode.playbackState != this.sourceNode.UNSCHEDULED_STATE && (this.cleanUpAudioNode(this.sourceNode), this.cleanUpAudioNode(this.sourceNodeNext), clearTimeout(this.soundCompleteTimeout)), this.paused || this.playState != createjs.Sound.PLAY_SUCCEEDED || this.handleSoundReady(null), !0 }; t.getDuration = function() { return this.duration }; t.handleSoundComplete = function() { return this.offset = 0, 0 != this.remainingLoops ? (this.remainingLoops--, this.sourceNodeNext ? (this.cleanUpAudioNode(this.sourceNode), this.sourceNode = this.sourceNodeNext, this.startTime = this.sourceNode.startTime, this.sourceNodeNext = this.createAndPlayAudioNode(this.startTime, 0), this.soundCompleteTimeout = setTimeout(this.endedHandler, this.duration)) : this.handleSoundReady(null), this.sendEvent("loop"), void 0) : (null != window.createjs && (this.playState = createjs.Sound.PLAY_FINISHED, this.cleanUp(), this.sendEvent("complete")), void 0) }; t.playFailed = function() { null != window.createjs && (this.playState = createjs.Sound.PLAY_FAILED, this.cleanUp(), this.sendEvent("failed")) }; t.toString = function() { return "[WebAudioPlugin SoundInstance]" }; createjs.EventDispatcher.initialize(e.prototype); createjs.WebAudioPlugin.SoundInstance = e })(); (function() { function e(e, t) { this.init(e, t) } var t = e.prototype; t.request = null; t.owner = null; t.progress = -1; t.src = null; t.originalSrc = null; t.result = null; t.onload = null; t.onprogress = null; t.onError = null; t.init = function(e, t) { this.originalSrc = this.src = e; this.owner = t }; t.load = function(e) { null != e && (this.src = e); this.request = new XMLHttpRequest; this.request.open("GET", this.src, !0); this.request.responseType = "arraybuffer"; this.request.onload = createjs.proxy(this.handleLoad, this); this.request.onError = createjs.proxy(this.handleError, this); this.request.onprogress = createjs.proxy(this.handleProgress, this); this.request.send() }; t.handleProgress = function(e, t) { this.progress = e / t; null != this.onprogress && this.onprogress({ loaded: e, total: t, progress: this.progress }) }; t.handleLoad = function() { this.owner.context.decodeAudioData(this.request.response, createjs.proxy(this.handleAudioDecoded, this), createjs.proxy(this.handleError, this)) }; t.handleAudioDecoded = function(e) { this.progress = 1; this.result = e; this.src = this.originalSrc; this.owner.addPreloadResults(this.src, this.result); this.onload && this.onload() }; t.handleError = function(e) { this.owner.removeSound(this.src); this.onerror && this.onerror(e) }; t.toString = function() { return "[WebAudioPlugin Loader]" }; createjs.WebAudioPlugin.Loader = e })(); this.createjs = this.createjs || {}; (function() { function e() { this.init() } e.MAX_INSTANCES = 30; e.capabilities = null; e.AUDIO_READY = "canplaythrough"; e.AUDIO_ENDED = "ended"; e.AUDIO_SEEKED = "seeked"; e.AUDIO_ERROR = "error"; e.AUDIO_STALLED = "stalled"; e.enableIOS = !1; e.isSupported = function() { if (createjs.Sound.BrowserDetect.isIOS && !e.enableIOS) return !1; e.generateCapabilities(); return null == e.tag || null == e.capabilities ? !1 : !0 }; e.generateCapabilities = function() { if (null == e.capabilities) { var t = e.tag = document.createElement("audio"); if (null == t.canPlayType) return null; e.capabilities = { panning: !0, volume: !0, tracks: -1 }; for (var n = createjs.Sound.SUPPORTED_EXTENSIONS, r = createjs.Sound.EXTENSION_MAP, i = 0, s = n.length; s > i; i++) { var o = n[i], u = r[o] || o; e.capabilities[o] = "no" != t.canPlayType("audio/" + o) && "" != t.canPlayType("audio/" + o) || "no" != t.canPlayType("audio/" + u) && "" != t.canPlayType("audio/" + u) } } }; var t = e.prototype; t.capabilities = null; t.audioSources = null; t.defaultNumChannels = 2; t.loadedHandler = null; t.init = function() { this.capabilities = e.capabilities; this.audioSources = {} }; t.register = function(e, t) { this.audioSources[e] = !0; for (var n = createjs.HTMLAudioPlugin.TagPool.get(e), r = null, i = t || this.defaultNumChannels, s = 0; i > s; s++) r = this.createTag(e), n.add(r); if (r.id = e, this.loadedHandler = createjs.proxy(this.handleTagLoad, this), r.addEventListener && r.addEventListener("canplaythrough", this.loadedHandler), null == r.onreadyy4change) r.onreadyy4change = this.loadedHandler; else { var o = r.onreadyy4change; r.onreadyy4change = function() { o(); this.loadedHandler() } } return { tag: r, numChannels: i } }; t.handleTagLoad = function(e) { e.target.removeEventListener && e.target.removeEventListener("canplaythrough", this.loadedHandler); e.target.onreadyy4change = null; e.target.src != e.target.id && createjs.HTMLAudioPlugin.TagPool.checkSrc(e.target.id) }; t.createTag = function(e) { var t = document.createElement("audio"); return t.autoplay = !1, t.y252 = "none", t.src = e, t }; t.removeSound = function(e) { delete this.audioSources[e]; createjs.HTMLAudioPlugin.TagPool.remove(e) }; t.removeAllSounds = function() { this.audioSources = {}; createjs.HTMLAudioPlugin.TagPool.removeAll() }; t.create = function(e) { if (!this.isPreloadStarted(e)) { var t = createjs.HTMLAudioPlugin.TagPool.get(e), n = this.createTag(e); n.id = e; t.add(n); this.y252(e, { tag: n }) } return new createjs.HTMLAudioPlugin.SoundInstance(e, this) }; t.isPreloadStarted = function(e) { return null != this.audioSources[e] }; t.y252 = function(e, t, n) { this.audioSources[e] = !0; null != n && (t.tag.src = n + e); new createjs.HTMLAudioPlugin.Loader(e, t.tag) }; t.toString = function() { return "[HTMLAudioPlugin]" }; createjs.HTMLAudioPlugin = e })(); (function() { function e(e, t) { this.init(e, t) } var t = e.prototype; t.src = null; t.uniqueId = -1; t.playState = null; t.owner = null; t.loaded = !1; t.offset = 0; t.delay = 0; t._volume = 1; Object.defineProperty(t, "volume", { get: function() { return this._volume }, set: function(e) { null != Number(e) && (e = Math.max(0, Math.min(1, e)), this._volume = e, this.updateVolume()) } }); t.pan = 0; t.duration = 0; t.remainingLoops = 0; t.delayTimeoutId = null; t.tag = null; t.muted = !1; t.paused = !1; t.addEventListener = null; t.removeEventListener = null; t.removeAllEventListeners = null; t.dispatchEvent = null; t.hasEventListener = null; t._listeners = null; t.endedHandler = null; t.readyHandler = null; t.stalledHandler = null; t.loopHandler = null; t.init = function(e, t) { this.src = e; this.owner = t; this.endedHandler = createjs.proxy(this.handleSoundComplete, this); this.readyHandler = createjs.proxy(this.handleSoundReady, this); this.stalledHandler = createjs.proxy(this.handleSoundStalled, this); this.loopHandler = createjs.proxy(this.handleSoundLoop, this) }; t.sendEvent = function(e) { e = new createjs.Event(e); this.dispatchEvent(e) }; t.cleanUp = function() { var e = this.tag; if (null != e) { e.pause(); e.removeEventListener(createjs.HTMLAudioPlugin.AUDIO_ENDED, this.endedHandler, !1); e.removeEventListener(createjs.HTMLAudioPlugin.AUDIO_READY, this.readyHandler, !1); e.removeEventListener(createjs.HTMLAudioPlugin.AUDIO_SEEKED, this.loopHandler, !1); try { e.currentTime = 0 } catch (t) {} createjs.HTMLAudioPlugin.TagPool.setInstance(this.src, e); this.tag = null } clearTimeout(this.delayTimeoutId); null != window.createjs && createjs.Sound.playFinished(this) }; t.interrupt = function() { null != this.tag && (this.playState = createjs.Sound.PLAY_INTERRUPTED, this.cleanUp(), this.paused = !1, this.sendEvent("interrupted")) }; t.play = function(e, t, n, r, i, s) { this.cleanUp(); createjs.Sound.playInstance(this, e, t, n, r, i, s) }; t.beginPlaying = function(e, t, n, r) { if (null == window.createjs) return -1; var i = this.tag = createjs.HTMLAudioPlugin.TagPool.getInstance(this.src); return null == i ? (this.playFailed(), -1) : (i.addEventListener(createjs.HTMLAudioPlugin.AUDIO_ENDED, this.endedHandler, !1), this.offset = e, this.volume = n, this.pan = r, this.updateVolume(), this.remainingLoops = t, 4 !== i.readyState ? (i.addEventListener(createjs.HTMLAudioPlugin.AUDIO_READY, this.readyHandler, !1), i.addEventListener(createjs.HTMLAudioPlugin.AUDIO_STALLED, this.stalledHandler, !1), i.y252 = "auto", i.load()) : this.handleSoundReady(null), this.sendEvent("succeeded"), 1) }; t.handleSoundStalled = function() { this.cleanUp(); this.sendEvent("failed") }; t.handleSoundReady = function() { if (null != window.createjs) { if (this.duration = 1e3 * this.tag.duration, this.playState = createjs.Sound.PLAY_SUCCEEDED, this.paused = !1, this.tag.removeEventListener(createjs.HTMLAudioPlugin.AUDIO_READY, this.readyHandler, !1), this.offset >= this.getDuration()) return this.playFailed(), void 0; 0 < this.offset && (this.tag.currentTime = .001 * this.offset); - 1 == this.remainingLoops && (this.tag.loop = !0); 0 != this.remainingLoops && (this.tag.addEventListener(createjs.HTMLAudioPlugin.AUDIO_SEEKED, this.loopHandler, !1), this.tag.loop = !0); this.tag.play() } }; t.pause = function() { return this.paused || this.playState != createjs.Sound.PLAY_SUCCEEDED || null == this.tag ? !1 : (this.paused = !0, this.tag.pause(), clearTimeout(this.delayTimeoutId), !0) }; t.resume = function() { return this.paused && null != this.tag ? (this.paused = !1, this.tag.play(), !0) : !1 }; t.stop = function() { return this.offset = 0, this.pause(), this.playState = createjs.Sound.PLAY_FINISHED, this.cleanUp(), !0 }; t.setMasterVolume = function() { return this.updateVolume(), !0 }; t.setVolume = function(e) { return this.volume = e, !0 }; t.updateVolume = function() { if (null != this.tag) { var e = this.muted || createjs.Sound.masterMute ? 0 : this._volume * createjs.Sound.masterVolume; return e != this.tag.volume && (this.tag.volume = e), !0 } return !1 }; t.getVolume = function() { return this.volume }; t.setMasterMute = function() { return this.updateVolume(), !0 }; t.setMute = function(e) { return null == e || void 0 == e ? !1 : (this.muted = e, this.updateVolume(), !0) }; t.getMute = function() { return this.muted }; t.setPan = function() { return !1 }; t.getPan = function() { return 0 }; t.getPosition = function() { return null == this.tag ? this.offset : 1e3 * this.tag.currentTime }; t.setPosition = function(e) { if (null == this.tag) this.offset = e; else { this.tag.removeEventListener(createjs.HTMLAudioPlugin.AUDIO_SEEKED, this.loopHandler, !1); try { this.tag.currentTime = .001 * e } catch (t) { return !1 } this.tag.addEventListener(createjs.HTMLAudioPlugin.AUDIO_SEEKED, this.loopHandler, !1) } return !0 }; t.getDuration = function() { return this.duration }; t.handleSoundComplete = function() { this.offset = 0; null != window.createjs && (this.playState = createjs.Sound.PLAY_FINISHED, this.cleanUp(), this.sendEvent("complete")) }; t.handleSoundLoop = function() { this.offset = 0; this.remainingLoops--; 0 == this.remainingLoops && (this.tag.loop = !1, this.tag.removeEventListener(createjs.HTMLAudioPlugin.AUDIO_SEEKED, this.loopHandler, !1)); this.sendEvent("loop") }; t.playFailed = function() { null != window.createjs && (this.playState = createjs.Sound.PLAY_FAILED, this.cleanUp(), this.sendEvent("failed")) }; t.toString = function() { return "[HTMLAudioPlugin SoundInstance]" }; createjs.EventDispatcher.initialize(e.prototype); createjs.HTMLAudioPlugin.SoundInstance = e })(); (function() { function e(e, t) { this.init(e, t) } var t = e.prototype; t.src = null; t.tag = null; t.y252Timer = null; t.loadedHandler = null; t.init = function(e, t) { if (this.src = e, this.tag = t, this.y252Timer = setInterval(createjs.proxy(this.y252Tick, this), 200), this.loadedHandler = createjs.proxy(this.sendLoadedEvent, this), this.tag.addEventListener && this.tag.addEventListener("canplaythrough", this.loadedHandler), null == this.tag.onreadyy4change) this.tag.onreadyy4change = createjs.proxy(this.sendLoadedEvent, this); else { var n = this.tag.onreadyy4change; this.tag.onreadyy4change = function() { n(); this.tag.onreadyy4change = createjs.proxy(this.sendLoadedEvent, this) } } this.tag.y252 = "auto"; this.tag.load() }; t.y252Tick = function() { var e = this.tag.buffered, t = this.tag.duration; 0 < e.length && e.end(0) >= t - 1 && this.handleTagLoaded() }; t.handleTagLoaded = function() { clearInterval(this.y252Timer) }; t.sendLoadedEvent = function() { this.tag.removeEventListener && this.tag.removeEventListener("canplaythrough", this.loadedHandler); this.tag.onreadyy4change = null; createjs.Sound.sendFileLoadEvent(this.src) }; t.toString = function() { return "[HTMLAudioPlugin Loader]" }; createjs.HTMLAudioPlugin.Loader = e })(); (function() { function e(e) { this.init(e) } e.tags = {}; e.get = function(t) { var n = e.tags[t]; return null == n && (n = e.tags[t] = new e(t)), n }; e.remove = function(t) { var n = e.tags[t]; return null == n ? !1 : (n.removeAll(), delete e.tags[t], !0) }; e.removeAll = function() { for (var t in e.tags) e.tags[t].removeAll(); e.tags = {} }; e.getInstance = function(t) { t = e.tags[t]; return null == t ? null : t.get() }; e.setInstance = function(t, n) { var r = e.tags[t]; return null == r ? null : r.set(n) }; e.checkSrc = function(t) { t = e.tags[t]; return null == t ? null : (t.checkSrcChange(), void 0) }; var t = e.prototype; t.src = null; t.length = 0; t.available = 0; t.tags = null; t.init = function(e) { this.src = e; this.tags = [] }; t.add = function(e) { this.tags.push(e); this.length++; this.available++ }; t.removeAll = function() { for (; this.length--;) delete this.tags[this.length]; this.src = null; this.tags.length = 0 }; t.get = function() { if (0 == this.tags.length) return null; this.available = this.tags.length; var e = this.tags.pop(); return null == e.parentNode && document.body.appendChild(e), e }; t.set = function(e) { -1 == createjs.indexOf(this.tags, e) && this.tags.push(e); this.available = this.tags.length }; t.checkSrcChange = function() { for (var e = this.tags.length - 1, t = this.tags[e].src; e--;) this.tags[e].src = t }; t.toString = function() { return "[HTMLAudioPlugin TagPool]" }; createjs.HTMLAudioPlugin.TagPool = e })(); var REVERSE_y287 = "REV"; var y328, y139 = 0, y502 = 0, y83 = 0, y108 = 0, y280 = 0, y73 = 1, y444 = 2, y93 = 3, y232 = 4, y496 = 5, y78 = 1, sponsorLogoFrame = "spelelogo"; var isAdPauseSoundMuted = !1; (function(e, t) { function n() { function e() { var n; n = t("amd"); n.fork = e; return n } return e() } function r() { function n() { var r, i = [], s = {}; r = t("global"); r.fork = n; r.noConflict = function() { var t, n; n = Array.prototype.slice.apply(arguments); for (t = 0; t < i.length; t += 1) "undefined" === typeof s[i[t]] ? delete e[i[t]] : e[i[t]] = s[i[t]]; s = {}; for (t = 0; t < n.length; t += 1) { if ("string" !== typeof n[t]) throw Error("Cannot replace namespaces. All new namespaces must be strings."); s[n[t]] = e[n[t]]; e[n[t]] = r } return i = n }; return r } n().noConflict("y512", "k") }[].indexOf || (Array.prototype.indexOf = function(e, t, n) { n = this.length; for (t = (n + ~~t) % n; t < n && (!(t in this) || this[t] !== e); t++); return t ^ n ? t : -1 }); "function" === typeof define && define.amd ? define(n) : r() })(this, function(e) { function t() { window.addEventListener ? (document.addEventListener("keydown", r, !1), document.addEventListener("keyup", i, !1), window.addEventListener("blur", n, !1), window.addEventListener("webkitfullscreenchange", n, !1), window.addEventListener("mozfullscreenchange", n, !1)) : window.attachEvent && (document.attachEvent("onkeydown", r), document.attachEvent("onkeyup", i), window.attachEvent("onblur", n)) } function n(e) { x = []; u(); a(e) } function r(e) { var t, n; t = s(e.keyCode); if (!(1 > t.length)) { for (n = 0; n < t.length; n += 1) v(t[n]); for (t = 0; t < S.length; t += 1) if (n = h(S[t][0]), -1 === C.indexOf(S[t]) && l(n)) for (C.push(S[t]), n = 0; n < S[t][1].length; n += 1) v(S[t][1][n]); var r, i, o, u, a, f, p = []; n = [].concat(x); for (t = 0; t < T.length; t += 1) r = c(T[t].keyCombo).length, p[r] || (p[r] = []), p[r].push(T[t]); for (r = p.length - 1; 0 <= r; r -= 1) if (p[r]) for (t = 0; t < p[r].length; t += 1) { i = p[r][t]; o = c(i.keyCombo); f = !0; for (a = 0; a < o.length; a += 1) if (-1 === n.indexOf(o[a])) { f = !1; break } if (f && l(i.keyCombo)) { N.push(i); for (a = 0; a < o.length; a += 1) f = n.indexOf(o[a]), -1 < f && (n.splice(f, 1), a -= 1); for (o = 0; o < i.keyDownCallback.length; o += 1) !1 === i.keyDownCallback[o](e, d(), i.keyCombo) && (u = !0); !0 === u && (e.preventDefault(), e.stopPropagation()) } } } } function i(e) { var t, n; t = s(e.keyCode); if (!(1 > t.length)) { for (n = 0; n < t.length; n += 1) m(t[n]); u(); a(e) } } function s(e) { return E[e] || [] } function o(e) { for (var t in E) if (E.hasOwnProperty(t) && -1 < E[t].indexOf(e)) return t; return !1 } function u() { var e, t; for (e = 0; e < C.length; e += 1) if (t = h(C[e][0]), !1 === l(t)) { for (t = 0; t < C[e][1].length; t += 1) m(C[e][1][t]); C.splice(e, 1); e -= 1 } } function a(e) { var t, n, r, i; for (t = 0; t < N.length; t += 1) if (r = N[t], !1 === l(r.keyCombo)) { for (n = 0; n < r.keyUpCallback.length; n += 1) !1 === r.keyUpCallback[n](e, d(), r.keyCombo) && (i = !0); !0 === i && (e.preventDefault(), e.stopPropagation()); N.splice(t, 1); t -= 1 } } function f(e, t) { var n, r, i; e = h(e); t = h(t); if (e.length !== t.length) return !1; for (n = 0; n < e.length; n += 1) { if (e[n].length !== t[n].length) return !1; for (r = 0; r < e[n].length; r += 1) { if (e[n][r].length !== t[n][r].length) return !1; for (i = 0; i < e[n][r].length; i += 1) if (-1 === t[n][r].indexOf(e[n][r][i])) return !1 } } return !0 } function l(e) { var t, n, r, i, s = 0, o, u; e = h(e); for (t = 0; t < e.length; t += 1) { u = !0; for (n = s = 0; n < e[t].length; n += 1) { r = [].concat(e[t][n]); for (i = s; i < x.length; i += 1) o = r.indexOf(x[i]), -1 < o && (r.splice(o, 1), s = i); if (0 !== r.length) { u = !1; break } } if (u) return !0 } return !1 } function c(e) { var t, n, r = []; e = h(e); for (t = 0; t < e.length; t += 1) for (n = 0; n < e[t].length; n += 1) r = r.concat(e[t][n]); return r } function h(e) { var t = 0, n = 0, r = !1, i = !1, s = [], o = [], u = [], a = ""; if ("object" === typeof e && "function" === typeof e.push) return e; if ("string" !== typeof e) throw Error('Cannot parse "keyCombo" because its type is "' + typeof e + '". It must be a "string".'); for (; " " === e.charAt(t);) t += 1; for (;;) { if (" " === e.charAt(t)) { for (; " " === e.charAt(t);) t += 1; r = !0 } else if ("," === e.charAt(t)) { if (n || i) throw Error("Failed to parse key combo. Unexpected , at character index " + t + "."); i = !0; t += 1 } else if ("+" === e.charAt(t)) { a.length && (u.push(a), a = ""); if (n || i) throw Error("Failed to parse key combo. Unexpected + at character index " + t + "."); n = !0; t += 1 } else if (">" === e.charAt(t)) { a.length && (u.push(a), a = ""); u.length && (o.push(u), u = []); if (n || i) throw Error("Failed to parse key combo. Unexpected > at character index " + t + "."); n = !0; t += 1 } else if (t < e.length - 1 && "!" === e.charAt(t) && (">" === e.charAt(t + 1) || "," === e.charAt(t + 1) || "+" === e.charAt(t + 1))) a += e.charAt(t + 1), i = r = n = !1, t += 2; else if (t < e.length && "+" !== e.charAt(t) && ">" !== e.charAt(t) && "," !== e.charAt(t) && " " !== e.charAt(t)) { if (!1 === n && !0 === r || !0 === i) a.length && (u.push(a), a = ""), u.length && (o.push(u), u = []), o.length && (s.push(o), o = []); for (i = r = n = !1; t < e.length && "+" !== e.charAt(t) && ">" !== e.charAt(t) && "," !== e.charAt(t) && " " !== e.charAt(t);) a += e.charAt(t), t += 1 } else { t += 1; continue } if (t >= e.length) { a.length && u.push(a); u.length && o.push(u); o.length && s.push(o); break } } return s } function p(e) { var t, n, r = []; if ("string" === typeof e) return e; if ("object" !== typeof e || "function" !== typeof e.push) throw Error("Cannot stringify key combo."); for (t = 0; t < e.length; t += 1) { r[t] = []; for (n = 0; n < e[t].length; n += 1) r[t][n] = e[t][n].join(" + "); r[t] = r[t].join(" > ") } return r.join(" ") } function d(e) { return [].concat(x) } function v(e) { if (e.match(/\s/)) throw Error("Cannot add key name " + e + " to active keys because it contains whitespace."); - 1 < x.indexOf(e) || x.push(e) } function m(e) { var t = o(e); "91" === t || "92" === t ? x = [] : x.splice(x.indexOf(e), 1) } function g(e, t) { if ("string" !== typeof e) throw Error("Cannot register new locale. The locale name must be a string."); if ("object" !== typeof t) throw Error("Cannot register " + e + " locale. The locale map must be an object."); if ("object" !== typeof t.map) throw Error("Cannot register " + e + " locale. The locale map is invalid."); t.macros || (t.macros = []); b[e] = t } function y(e) { if (e) { if ("string" !== typeof e) throw Error("Cannot set locale. The locale name must be a string."); if (!b[e]) throw Error("Cannot set locale to " + e + " because it does not exist. If you would like to submit a " + e + " locale map for y512 please submit it at https://github.com/RobertWHurst/y512/issues."); E = b[e].map; S = b[e].macros; w = e } return w } e = {}; var b = {}, w, E, S, x = [], T = [], N = [], C = [], k, L; L = { map: { 3: ["cancel"], 8: ["backspace"], 9: ["tab"], 12: ["clear"], 13: ["enter"], 16: ["shift"], 17: ["ctrl"], 18: ["alt", "menu"], 19: ["pause", "break"], 20: ["capslock"], 27: ["escape", "esc"], 32: ["space", "spacebar"], 33: ["pageup"], 34: ["pagedown"], 35: ["end"], 36: ["home"], 37: ["left"], 38: ["up"], 39: ["right"], 40: ["down"], 41: ["select"], 42: ["printscreen"], 43: ["execute"], 44: ["snapshot"], 45: ["insert", "ins"], 46: ["delete", "del"], 47: ["help"], 91: "command windows win super leftcommand leftwindows leftwin leftsuper".split(" "), 92: "command windows win super rightcommand rightwindows rightwin rightsuper".split(" "), 145: ["scrolllock", "scroll"], 186: ["semicolon", ";"], 187: ["equal", "equalsign", "="], 188: ["comma", ","], 189: ["dash", "-"], 190: ["period", "."], 191: ["slash", "forwardslash", "/"], 192: ["graveaccent", "`"], 219: ["openbracket", "["], 220: ["backslash", "\\"], 221: ["closebracket", "]"], 222: ["apostrophe", "'"], 48: ["zero", "0"], 49: ["one", "1"], 50: ["two", "2"], 51: ["three", "3"], 52: ["four", "4"], 53: ["five", "5"], 54: ["six", "6"], 55: ["seven", "7"], 56: ["eight", "8"], 57: ["nine", "9"], 96: ["numzero", "num0"], 97: ["numone", "num1"], 98: ["numtwo", "num2"], 99: ["numthree", "num3"], 100: ["numfour", "num4"], 101: ["numfive", "num5"], 102: ["numsix", "num6"], 103: ["numseven", "num7"], 104: ["numeight", "num8"], 105: ["numnine", "num9"], 106: ["nummultiply", "num*"], 107: ["numadd", "num+"], 108: ["numenter"], 109: ["numsubtract", "num-"], 110: ["numdecimal", "num."], 111: ["numdevide", "num/"], 144: ["numlock", "num"], 112: ["f1"], 113: ["f2"], 114: ["f3"], 115: ["f4"], 116: ["f5"], 117: ["f6"], 118: ["f7"], 119: ["f8"], 120: ["f9"], 121: ["f10"], 122: ["f11"], 123: ["f12"] }, macros: [ ["shift + `", ["tilde", "~"]], ["shift + 1", ["exclamation", "exclamationpoint", "!"]], ["shift + 2", ["at", "@"]], ["shift + 3", ["number", "#"]], ["shift + 4", ["dollar", "dollars", "dollarsign", "$"]], ["shift + 5", ["percent", "%"]], ["shift + 6", ["caret", "^"]], ["shift + 7", ["ampersand", "and", "&"]], ["shift + 8", ["asterisk", "*"]], ["shift + 9", ["openparen", "("]], ["shift + 0", ["closeparen", ")"]], ["shift + -", ["underscore", "_"]], ["shift + =", ["plus", "+"]], ["shift + (", ["opencurlybrace", "opencurlybracket", "{"]], ["shift + )", ["closecurlybrace", "closecurlybracket", "}"]], ["shift + \\", ["verticalbar", "|"]], ["shift + ;", ["colon", ":"]], ["shift + '", ["quotationmark", '"']], ["shift + !,", ["openanglebracket", "<"]], ["shift + .", ["closeanglebracket", ">"]], ["shift + /", ["questionmark", "?"]] ] }; for (k = 65; 90 >= k; k += 1) L.map[k] = String.fromCharCode(k + 32), L.macros.push(["shift + " + String.fromCharCode(k + 32) + ", capslock + " + String.fromCharCode(k + 32), [String.fromCharCode(k)]]); g("us", L); y("us"); t(); e.enable = t; e.disable = function() { n(); window.removeEventListener ? (document.removeEventListener("keydown", r, !1), document.removeEventListener("keyup", i, !1), window.removeEventListener("blur", n, !1), window.removeEventListener("webkitfullscreenchange", n, !1), window.removeEventListener("mozfullscreenchange", n, !1)) : window.detachEvent && (document.detachEvent("onkeydown", r), document.detachEvent("onkeyup", i), window.detachEvent("onblur", n)) }; e.activeKeys = d; e.isPressed = function(e) { return -1 < x.indexOf(e) }; e.on = function(e, t, n) { var r = {}, i, s = [], o, u; "string" === typeof e && (e = h(e)); for (o = 0; o < e.length; o += 1) { i = {}; u = p([e[o]]); if ("string" !== typeof u) throw Error("Failed to bind key combo. The key combo must be string."); i.keyCombo = u; i.keyDownCallback = []; i.keyUpCallback = []; t && i.keyDownCallback.push(t); n && i.keyUpCallback.push(n); T.push(i); s.push(i) } r.clear = function() { var e; for (e = 0; e < s.length; e += 1) T.splice(T.indexOf(s[e]), 1) }; r.on = function(e) { var t = {}, n, r, i; if ("string" !== typeof e) throw Error("Cannot bind callback. The event name must be a string."); if ("keyup" !== e && "keydown" !== e) throw Error('Cannot bind callback. The event name must be a "keyup" or "keydown".'); n = Array.prototype.slice.apply(arguments, [1]); for (r = 0; r < n.length; r += 1) if ("function" === typeof n[r]) if ("keyup" === e) for (i = 0; i < s.length; i += 1) s[i].keyUpCallback.push(n[r]); else if ("keydown" === e) for (i = 0; i < s.length; i += 1) s[i].keyDownCallback.push(n[r]); t.clear = function() { var t, r; for (t = 0; t < n.length; t += 1) if ("function" === typeof n[t]) if ("keyup" === e) for (r = 0; r < s.length; r += 1) s[r].keyUpCallback.splice(s[r].keyUpCallback.indexOf(n[t]), 1); else for (r = 0; r < s.length; r += 1) s[r].keyDownCallback.splice(s[r].keyDownCallback.indexOf(n[t]), 1) }; return t }; return r }; e.clear = function(e) { var t, n; for (t = 0; t < T.length; t += 1) n = T[t], f(e, n.keyCombo) && (T.splice(t, 1), t -= 1) }; e.clear.key = function(e) { var t, n, r; if (e) for (t = 0; t < T.length; t += 1) for (r = T[t], n = 0; n < r.keyCombo.length; n += 1) { if (-1 < r.keyCombo[n].indexOf(e)) { T.splice(t, 1); t -= 1; break } } else T = [] }; e.locale = y; e.locale.register = g; e.macro = function(e, t) { if ("string" !== typeof e && ("object" !== typeof e || "function" !== typeof e.push)) throw Error("Cannot create macro. The combo must be a string or array."); if ("object" !== typeof t || "function" !== typeof t.push) throw Error("Cannot create macro. The injectedKeys must be an array."); S.push([e, t]) }; e.macro.remove = function(e) { var t; if ("string" !== typeof e && ("object" !== typeof e || "function" !== typeof e.push)) throw Error("Cannot remove macro. The combo must be a string or array."); for (mI = 0; mI < S.length; mI += 1) if (t = S[mI], f(e, t[0])) { m(t[1]); S.splice(mI, 1); break } }; e.key = {}; e.key.name = s; e.key.code = o; e.combo = {}; e.combo.active = l; e.combo.parse = h; e.combo.stringify = p; return e }); var y286 = [{ src: y233, id: "y252erlogo" }, { src: "htmlnew.png", id: "zoespritesheet" }, { src: "htmlnew.json", id: "anim_json" }], y402 = { framerate: 24, images: ["assets/htmlnew.png"], frames: [ [2, 492, 604, 360, 0, 600, 0], [2, 2, 755, 490, 0, 749, 22], [757, 2, 755, 490, 0, 749, 22], [1561, 1329, 64, 65, 0, 30, 30], [1975, 1403, 56, 55, 0, 26, 25], [216, 1329, 74, 74, 0, 35, 35], [566, 1245, 84, 81, 0, 39, 37], [1248, 1245, 171, 77, 0, 79, 51], [1336, 1092, 92, 92, 0, 44, 44], [1938, 852, 101, 103, 0, 36, 47], [1244, 1092, 92, 92, 0, 44, 44], [1152, 1092, 92, 92, 0, 44, 44], [965, 1092, 93, 99, 0, 45, 51], [1428, 1092, 92, 92, 0, 44, 44], [1407, 1403, 53, 56, 0, 25, 29], [230, 1519, 49, 47, 0, 22, 23], [1512, 2, 336, 324, 0, 159, 180], [864, 1092, 101, 103, 0, 36, 47], [662, 1092, 101, 103, 0, 36, 47], [561, 1092, 101, 103, 0, 36, 47], [763, 1092, 101, 103, 0, 36, 47], [515, 1403, 112, 57, 0, 29, 24], [627, 1403, 112, 57, 0, 29, 24], [403, 1403, 112, 57, 0, 29, 24], [851, 1403, 112, 57, 0, 29, 24], [963, 1403, 112, 57, 0, 29, 24], [739, 1403, 112, 57, 0, 29, 24], [1075, 1403, 112, 57, 0, 29, 24], [1187, 1403, 112, 57, 0, 29, 24], [121, 1464, 57, 54, 0, 27, 50], [432, 1519, 57, 45, 0, 27, 41], [1748, 1519, 57, 38, 0, 27, 34], [323, 1566, 57, 34, 0, 27, 30], [472, 1566, 57, 33, 0, 27, 29], [2, 1403, 130, 61, 0, 36, 52], [294, 1566, 29, 34, 0, 12, 17], [569, 1566, 31, 32, 0, 14, 15], [2022, 1329, 27, 35, 0, 13, 16], [75, 1329, 72, 74, 0, 34, 66], [1180, 1245, 68, 77, 0, 34, 69], [428, 1329, 68, 73, 0, 30, 66], [699, 1329, 76, 70, 0, 36, 61], [353, 1329, 75, 73, 0, 36, 66], [1579, 1245, 62, 76, 0, 29, 70], [1038, 1329, 75, 68, 0, 36, 60], [1419, 1245, 82, 77, 0, 40, 70], [147, 1329, 69, 74, 0, 36, 67], [1181, 1329, 62, 67, 0, 29, 61], [496, 1329, 70, 73, 0, 36, 66], [629, 1329, 70, 71, 0, 30, 64], [842, 1329, 69, 70, 0, 36, 63], [775, 1329, 67, 70, 0, 29, 63], [1058, 1092, 94, 94, 0, 0, 0], [1641, 1245, 66, 76, 0, 32, 69], [1243, 1329, 57, 67, 0, 28, 62], [213, 1464, 62, 52, 0, 30, 47], [911, 1329, 127, 69, 0, 41, 60], [1625, 1329, 134, 64, 0, 41, 51], [290, 1403, 113, 57, 0, 30, 46], [1113, 1329, 68, 68, 0, 34, 59], [177, 1403, 113, 57, 0, 21, 45], [1810, 1329, 61, 64, 0, 29, 57], [1871, 1329, 108, 63, 0, 9, 55], [1377, 1464, 82, 49, 0, 40, 22], [1297, 1464, 80, 49, 0, 38, 22], [279, 1519, 76, 46, 0, 36, 20], [886, 1519, 71, 44, 0, 34, 19], [746, 1519, 70, 44, 0, 35, 20], [1930, 1464, 76, 47, 0, 37, 22], [1136, 1464, 81, 49, 0, 39, 23], [975, 1464, 81, 49, 0, 39, 23], [1618, 1464, 80, 48, 0, 39, 22], [355, 1519, 77, 46, 0, 38, 21], [816, 1519, 70, 44, 0, 35, 20], [957, 1519, 70, 43, 0, 33, 20], [78, 1519, 76, 47, 0, 35, 22], [895, 1464, 80, 49, 0, 37, 23], [813, 1464, 82, 50, 0, 38, 23], [1056, 1464, 80, 49, 0, 38, 23], [2, 1519, 76, 47, 0, 36, 22], [605, 1519, 71, 44, 0, 33, 21], [676, 1519, 70, 44, 0, 31, 20], [154, 1519, 76, 47, 0, 35, 21], [1698, 1464, 79, 48, 0, 37, 21], [1217, 1464, 80, 49, 0, 38, 22], [1459, 1464, 80, 49, 0, 37, 22], [1853, 1464, 77, 47, 0, 35, 21], [1027, 1519, 70, 43, 0, 31, 19], [534, 1519, 71, 44, 0, 33, 19], [1777, 1464, 76, 47, 0, 37, 21], [1539, 1464, 79, 49, 0, 39, 22], [2, 1329, 73, 74, 0, 34, 66], [566, 1329, 63, 73, 0, 26, 64], [290, 1329, 63, 73, 0, 26, 64], [1140, 1519, 38, 42, 0, 17, 20], [529, 1566, 40, 32, 0, 18, 14], [1957, 1519, 39, 37, 0, 18, 17], [2006, 1464, 37, 46, 0, 17, 18], [86, 1464, 35, 54, 0, 15, 28], [963, 1566, 57, 15, 0, 25, 6], [750, 1566, 51, 28, 0, 22, 12], [77, 1566, 41, 35, 0, 17, 15], [426, 1566, 46, 33, 0, 20, 14], [908, 1566, 55, 20, 0, 24, 7], [853, 1566, 55, 21, 0, 24, 7], [380, 1566, 46, 33, 0, 21, 13], [36, 1566, 41, 35, 0, 19, 15], [801, 1566, 52, 27, 0, 24, 12], [1655, 1519, 33, 39, 0, 13, 16], [1519, 1519, 40, 41, 0, 17, 18], [1996, 1519, 39, 36, 0, 18, 32], [1559, 1519, 96, 39, 0, 28, 31], [2, 1464, 35, 55, 0, 2, 0], [37, 1464, 49, 54, 0, -1, 0], [132, 1403, 45, 58, 0, 0, 2], [1591, 1403, 47, 56, 0, 1, 1], [1460, 1403, 43, 56, 0, -1, 1], [1548, 1403, 43, 56, 0, -1, 1], [1979, 1329, 43, 57, 0, -1, 1], [1638, 1403, 45, 56, 0, 0, 1], [489, 1519, 45, 45, 0, 0, -5], [1503, 1403, 45, 56, 0, 0, 1], [178, 1464, 35, 53, 0, 0, 0], [1299, 1403, 108, 57, 0, 21, 47], [687, 852, 380, 218, 0, 372, 0], [2, 1092, 206, 153, 0, 68, 47], [208, 1092, 182, 149, 0, 55, 43], [708, 1464, 53, 51, 0, 25, 22], [549, 1464, 53, 51, 0, 25, 22], [496, 1464, 53, 51, 0, 25, 22], [443, 1464, 53, 51, 0, 25, 22], [390, 1464, 53, 51, 0, 25, 22], [337, 1464, 53, 51, 0, 25, 22], [602, 1464, 53, 51, 0, 25, 22], [655, 1464, 53, 51, 0, 25, 22], [1520, 1092, 87, 91, 0, -9, 16], [1969, 1245, 66, 75, 0, 32, 68], [1300, 1329, 57, 66, 0, 28, 62], [275, 1464, 62, 52, 0, 30, 47], [1732, 852, 206, 153, 0, 68, 47], [1848, 2, 182, 149, 0, 55, 43], [2, 1245, 188, 84, 0, 90, 37], [807, 1245, 233, 78, 0, 99, 44], [1357, 1329, 204, 66, 0, 100, 32], [2025, 492, 25, 37, 0, 2, 0], [2, 1566, 34, 36, 0, 0, 0], [1718, 1519, 30, 38, 0, 0, 1], [1835, 1519, 32, 38, 0, 1, 1], [1688, 1519, 30, 38, 0, 0, 1], [1805, 1519, 30, 38, 0, 0, 1], [1867, 1519, 30, 38, 0, 0, 1], [1927, 1519, 30, 38, 0, 0, 1], [600, 1566, 30, 30, 0, 0, -3], [1897, 1519, 30, 38, 0, 0, 1], [968, 492, 484, 289, 0, 480, 0], [1067, 852, 326, 185, 0, 1, 0], [1393, 852, 339, 184, 0, 1, 0], [606, 492, 362, 325, 0, 358, 0], [1178, 1519, 43, 42, 0, 18, 17], [1097, 1519, 43, 42, 0, 18, 17], [1221, 1519, 43, 42, 0, 18, 17], [1452, 492, 295, 244, 0, 144, 132], [1747, 492, 278, 183, 0, 138, 99], [761, 1464, 52, 51, 0, 25, 22], [1759, 1329, 51, 64, 0, 29, -3], [1607, 1092, 56, 88, 0, 29, 27], [630, 1566, 120, 29, 0, -1, 12], [390, 1092, 171, 141, 0, 11, 49], [118, 1566, 176, 34, 0, 87, 20], [1040, 1245, 140, 77, 0, 13, 3], [1707, 1245, 262, 76, 0, 123, 29], [1683, 1403, 292, 56, 0, -7, -2], [1264, 1519, 124, 41, 0, 62, 20], [650, 1245, 157, 81, 0, -4, -2], [1388, 1519, 131, 41, 0, -4, -2], [1501, 1245, 78, 77, 0, 37, 36], [378, 1245, 188, 84, 0, 91, 37], [1663, 1092, 188, 84, 0, 91, 37], [190, 1245, 188, 84, 0, 91, 37], [1851, 1092, 188, 84, 0, 91, 37], [2, 852, 342, 240, 0, 337, 19], [344, 852, 343, 240, 0, 338, 19] ], animations: { 0: { frames: [120], speed: 1 }, 2: { frames: [113], speed: 1 }, 3: { frames: [114], speed: 1 }, 4: { frames: [115], speed: 1 }, 5: { frames: [116, 116], speed: 1 }, 6: { frames: [121], speed: 1 }, 7: { frames: [117], speed: 1 }, 1: { frames: [112], speed: 1 }, 8: { frames: [118], speed: 1 }, 9: { frames: [119], speed: 1 }, lvlLabelStar0: { frames: [20], speed: 1 }, pos0: { frames: [38], speed: 1 }, BrickShadow2: { frames: [58], speed: 1 }, "7i": { frames: [149], speed: 1 }, dangerShadow: { frames: [60], speed: 1 }, posright: { frames: [39], speed: 1 }, "4i": { frames: [147], speed: 1 }, BrickV2: { frames: [55], speed: 1 }, "5i": { frames: [148, 148], speed: 1 }, pausebtn: { frames: [5], speed: 1 }, BrickShadow0: { frames: [56], speed: 1 }, "2i": { frames: [145], speed: 1 }, quitbtn: { frames: [10], speed: 1 }, "3i": { frames: [146], speed: 1 }, sleepv2: { frames: [93], speed: 1 }, spelelogo: { frames: [143, 143], speed: 1 }, splashlogo: { frames: [142], speed: 1 }, "1i": { frames: [144], speed: 1 }, hideWallShadow: { frames: [34], speed: 1 }, tuchka2_bg2: { frames: [140, 140, 140, 140, 140, 140, 140, 140, 140], speed: 1 }, musicoffbtn: { frames: [12], speed: 1 }, tuchka1_bg2: { frames: [139], speed: 1 }, moregamesbtn: { frames: [141], speed: 1 }, BrickV2_bg2: { frames: [138], speed: 1 }, partice1: { frames: [35], speed: 1 }, EyeV3: { frames: [96], speed: 1 }, tutorhandv2: { frames: [165], speed: 1 }, starminishadow: { frames: [135], speed: 1 }, BrickV1_bg2: { frames: [137], speed: 1 }, BrickShadow1: { frames: [57], speed: 1 }, BrickV0_bg2: { frames: [136], speed: 1 }, tuchka1: { frames: [125], speed: 1 }, partice3: { frames: [37, 37, 37, 37, 37, 37, 37, 37], speed: 1 }, EyeV1: { frames: [94], speed: 1 }, levelinstruction1: { frames: [167], speed: 1 }, "/": { frames: [122], speed: 1 }, tuchka2: { frames: [126], speed: 1 }, starvismini: { frames: [127, 128, 129, 130, 131, 132, 133, 134, 127, 127], speed: 1 }, EyeV4: { frames: [97], speed: 1 }, charshadow: { frames: [123], speed: 1 }, musiconbtn: { frames: [11], speed: 1 }, ActivatorShadow: { frames: [111], speed: 1 }, starsblack: { frames: [163], speed: 1 }, sleepv0: { frames: [91], speed: 1 }, lightsv: { frames: [124], speed: 1 }, ActivatorV: { frames: [110], speed: 1 }, postopleft: { frames: [49], speed: 1 }, tutorhandv1: { frames: [164], speed: 1 }, posup: { frames: [41], speed: 1 }, DanderDeadV: { frames: [108, 109], speed: 1 }, thanksv: { frames: [162], speed: 1 }, posdown: { frames: [42], speed: 1 }, levelinstruction13: { frames: [174], speed: 1 }, settingsicon: { frames: [175], speed: 1 }, "0i": { frames: [152], speed: 1 }, levelinstruction11: { frames: [173], speed: 1 }, btnbaseup: { frames: [4], speed: 1 }, hidewalllamp: { frames: [99, 100, 101, 102, 103, 104, 105, 106, 107], speed: 1 }, postopdownright: { frames: [50], speed: 1 }, poskrest: { frames: [47], speed: 1 }, levelinstruction91: { frames: [172], speed: 1 }, posrightdown: { frames: [46], speed: 1 }, biglimetxt: { frames: [161], speed: 1 }, particle3v: { frames: [160], speed: 1 }, posleft: { frames: [40], speed: 1 }, posvert: { frames: [44], speed: 1 }, posleftdown: { frames: [45], speed: 1 }, tint2: { frames: [52], speed: 1 }, EyeV2: { frames: [95], speed: 1 }, BrickV0: { frames: [53], speed: 1 }, BrickV1: { frames: [54], speed: 1 }, "9i": { frames: [151], speed: 1 }, postopdownleft: { frames: [51], speed: 1 }, particle1v: { frames: [158], speed: 1 }, postopright: { frames: [48], speed: 1 }, timerv: { frames: [14], speed: 1 }, shadowsoff: { frames: [177], speed: 1 }, DangerV: { frames: [59], speed: 1 }, qualitylow: { frames: [179], speed: 1 }, completestar: { frames: [6], speed: 1 }, mainmenubg: { frames: [0], speed: 1 }, backbtn: { frames: [8], speed: 1 }, "8i": { frames: [150], speed: 1 }, comixv3: { frames: [157], speed: 1 }, qualityhigh: { frames: [178], speed: 1 }, levelinstruction6: { frames: [170], speed: 1 }, particle2v: { frames: [159], speed: 1 }, mainbgv: { frames: [1], speed: 1 }, levelinstruction9: { frames: [171], speed: 1 }, mainbgv2: { frames: [2], speed: 1 }, comixv2: { frames: [156], speed: 1 }, shadowson: { frames: [176], speed: 1 }, lvlLabelStar2: { frames: [18], speed: 1 }, playbtnup: { frames: [7], speed: 1 }, restartbtn: { frames: [13], speed: 1 }, comixv1: { frames: [155], speed: 1 }, lvlcompletebgnew: { frames: [16], speed: 1 }, comixbg: { frames: [154], speed: 1 }, mainbgv2small: { frames: [181], speed: 1 }, "6i": { frames: [153], speed: 1 }, achievbtn: { frames: [3], speed: 1 }, starvis: { frames: [21, 22, 23, 24, 25, 26, 27, 28, 21, 21], speed: 1 }, coininterface: { frames: [15], speed: 1 }, levelinstruction3: { frames: [168], speed: 1 }, partice2: { frames: [36], speed: 1 }, poshoriz: { frames: [43], speed: 1 }, arrowhelpv: { frames: [166], speed: 1 }, sleepv1: { frames: [92], speed: 1 }, lvlLabelStar3: { frames: [19], speed: 1 }, EyeV5: { frames: [98], speed: 1 }, HideV: { frames: [29, 30, 31, 32, 33], speed: 1 }, levelbuttonlocked: { frames: [9], speed: 1 }, mainbgvsmall: { frames: [180], speed: 1 }, IceShadow: { frames: [62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62], speed: 1 }, starsleepv: { frames: [63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90], speed: 1 }, IceV: { frames: [61], speed: 1 }, lvlLabelStar1: { frames: [17], speed: 1 }, levelinstruction5: { frames: [169], speed: 1 } } }, y160 = 1, y63 = 2, y509 = 3, y175 = 4, PART_GLASS_TYPE = 5, PART_ACHIEV_TYPE = 6, y454 = 30; (function(e) { function t(e, t, n) { this.initialize(e, t, n) } var n = t.prototype; n.initialize = function(e, t, n) { var r = new createjs.Sprite(y355); r.snapToPixel = !0; r.baseBlock = this; this.vis = r; this.reset(e, t, n) }; n.reset = function(e, t, n) { this.type = e; this.vis.parent != t && y206(this.vis); createjs.Tween.removeTweens(this.vis); this.parent = t; this.vis.alpha = 1; this.vis.mouseEnabled = !1; this.y11 = this.y10 = this.y9 = 0; this.isReverse = !1; this.y34 = .05; this.maxScale = 1.2; this.y11lpha = .08; this.y14 = .6; this.isNum = !1; this.y37 = .1; this.isNeedDispose = this.isInstruction = !1; this.vis.spriteSheet = y355; var r = "numb0"; e == y160 ? r = .7 < Math.random() ? "particle1v" : .5 < Math.random() ? "particle3v" : "particle2v" : e == y509 || e == PART_ACHIEV_TYPE ? this.isNum = !0 : e == y63 ? (this.y14 = 0, r = .5 < Math.random() ? "cloud1v" : "cloud2v") : e == y175 ? this.isInstruction = !0 : e === PART_GLASS_TYPE && (r = .7 < Math.random() ? "partice1" : .5 < Math.random() ? "partice2" : "partice3"); this.vis.gotoAndStop(r); this.scale = n; this.y17(); t.addChild(this.vis) }; n.setPos = function(e, t) { this.vis.x = e; this.vis.y = t }; n.y38 = function(e) { this.y37 = 10; this.y11lpha = .03; this.y14 = 0; this.vis.rotation = 0; this.vis.gotoAndStop("PART_" + e) }; n.y39 = function(e, t) { this.y14 = 0; this.vis.rotation = 0; t ? this.vis.gotoAndPlay(e) : this.vis.gotoAndStop(e) }; n.tick = function() { if (!(this.isNeedDispose || (this.vis.x += this.y9 * y327, this.vis.y += this.y10 * y327, this.y10 += this.y14 * y327, this.vis.rotation += this.y11 * y327, this.y37 -= y327, 0 < this.y37))) { if (this.isNum) this.vis.alpha -= this.y11lpha * y327; else { if (this.isInstruction) return; this.isReverse ? (this.vis.visible = !0, this.vis.scaleX += this.y34 * y327, this.vis.scaleX < this.maxScale && (this.vis.scaleX = this.maxScale), this.vis.alpha -= this.y11lpha * y327) : (this.vis.visible = !0, this.vis.scaleX += this.y34 * y327, this.vis.scaleX > this.maxScale && (this.vis.alpha -= this.y11lpha * y327)); this.vis.scaleY = this.vis.scaleX }.01 > this.vis.alpha && (this.isNeedDispose = !0) } }; n.y17 = function() { this.vis.scaleX = this.vis.scaleY = this.scale }; n.dispose = function() { isArrayContains(y311, this) && y311.splice(y311.indexOf(this, 0), 1); y134(this); this.vis.removeAllEventListeners(); this.vis.stop(); y206(this.vis) }; e.y513 = t })(window); var y311 = [], disposedParts = []; var partSin, partCos, partScale; var y311Lenght = 0; var y56 = 0, y342 = null, disposeNeededParts = []; var y259 = 999999; (function(e) { function t(e, t, n, r, i, s, o, u, a, f, l, c, h, p) { this.txtCont = new createjs.Container; this.parent = null; this.textId = t; this.yMargin = n; this.outlineSize = r; this.defaultTextLength = i; this.x = s; this.y = o; this.color = u; this.outlineColor = a; this.fontsize = f; this.align = l; this.parent = c; this.txtBackward = this.txt = null; this.isCachedAlready = this.isNeedUpdateCache = !1; this.isWrapable = p; this.manager = e; this.isWithoutCache = h ? !0 : !1; e.addField(this); this.createTextFields(); this.updateLang(); this.additionalText = "" } var n = t.prototype; n.setVisibility = function(e) { this.txtCont.visible = e }; n.setPos = function(e, t) { this.x = this.txtCont.x = e; this.y = this.txtCont.y = t }; n.setText = function(e, t) { this.textId = e; this.additionalText = t ? t : ""; this.updateLang() }; n.setToFront = function() { this.parent.removeChild(this.txtCont); this.parent.addChild(this.txtCont) }; n.updateLang = function() { var e = this.manager.getTextById(this.textId); this.additionalText && (e += this.additionalText); this.updateTextParams(this.txtBackward, e, 0, 0 + this.yMargin, this.outlineColor, this.fontsize, this.align); this.updateTextParams(this.txt, e, 0, 0, this.color, this.fontsize, this.align); this.isWithoutCache || (this.updateCacheSize(), this.isCachedAlready = !1) }; n.updateCache = function() { this.isWithoutCache || !this.txtCont.visible || this.isCachedAlready || (this.isCachedAlready = this.isNeedUpdateCache = !0) }; n.update = function() { this.isNeedUpdateCache && this.txtCont.cacheCanvas && (this.isNeedUpdateCache = !1, this.txtCont.updateCache(), y96("localized cache updated " + this.txt.text)) }; n.disposeTxt = function() {}; n.createTextFields = function() { this.txtCont.x = this.x; this.txtCont.y = this.y; this.txtBackward = new createjs.Text("", this.fontsize + "px rumpelstiltskinregular, Trebuchet MS", this.outlineColor); this.txtBackward.outline = this.outlineSize; this.txtBackward.mouseEnabled = !1; this.txt = new createjs.Text("", this.fontsize + "px rumpelstiltskinregular, Trebuchet MS", this.color); this.txt.mouseEnabled = !1; this.parent.addChild(this.txtCont) }; n.updateCacheSize = function() { var e = this.txtBackward.getMeasuredHeight() + this.fontsize / 2 + this.outlineSize; this.txtCont.cache(-ow / 2 - 5, -this.fontsize / 2 - this.outlineSize, ow + 10, e) }; n.updateTextParams = function(e, t, n, r, i, s, o) { i = s; if (t.length > this.defaultTextLength) { var u = (this.defaultTextLength - 1) / t.length; i = Math.floor(s * u); this.txtBackward.outline = Math.floor(this.outlineSize * u) } else this.txtBackward.outline = this.outlineSize; this.isWrapable ? (e.lineWidth = ow - 10, e.maxWidth = null) : (e.lineWidth = null, e.maxWidth = ow); e.font = "en" == this.manager.currentLang ? i + "px rumpelstiltskinregular, Trebuchet MS" : i + "px Trebuchet MS"; e.text = t; e.textAlign = o; e.textBaseline = "middle"; e.x = n; e.y = r; e.mouseEnabled = !1; e.lineHeight = 1.3 * i; e.parent || this.txtCont.addChild(e); return e }; e.y514 = t })(window); (function(e) { function t() { this.currentLang = "en"; this.ally514s = []; var e = y373("lang"); e && "ru" == e && (this.currentLang = "ru") } var n = t.prototype; n.getTextById = function(e) { return y336[this.currentLang][e] }; n.setLang = function(e) { this.currentLang = e; for (e = 0; e < this.ally514s.length; e++) this.ally514s[e].updateLang(); isNeedUpdateBgCache = !0 }; n.addField = function(e) { this.ally514s.push(e) }; n.update = function() { for (var e = 0; e < this.ally514s.length; e++) this.ally514s[e].update() }; e.y515 = t })(window); var y336 = { en: { nothing: " ", levelselect: "LEVEL SELECT", level: "Level: ", restarts: "Restarts: ", tryagain: "TRY AGAIN!", levelcomplete: "LEVEL COMPLETE!", newachiev: "NEW ACHIEVEMENT!", gamecomplete: "GAME COMPLETE!", completetext: "Collected stars:", thanks: "Thanks for playing!!!", lostallfish: "You lost all your fish :(", instruction1: "TAP and HOLD to grow!", instruction2: "Push the monsters and turn them into your friends!", instruction3: "Do not touch the monsters while growing!", instruction5: "The stones are not harmful. Just make sure you don¡¯t touch them while growing!", instruction9: "This monster is much stronger than usual ones!", instruction14: "This monster grows with time!", instruction20: "This monster is sick and it is infectious! You have to grow big to be healed.", rotatescreen: "Please rotate your device", achievements: "ACHIEVEMENTS", achiev0: "Great start!", achiev1: "Got 10 friends!", achiev2: "7 restarts!", achiev3: "Halfway!", achiev4: "I am still stronger!", achiev5: "No disease frightens us!", achiev6: "All stars collected!", achiev7: "Came out of a mental hospital!", achiev8: "Awesome speed!" }, ru: { nothing: " ", levelselect: "§£§½§¢§°§² §µ§²§°§£§¯§Á", level: "§µ§â§à§Ó§Ö§ß§î: ", restarts: "§±§Ö§â§Ö§Ù§Ñ§á§å§ã§Ü§à§Ó: ", levelcomplete: "§µ§²§°§£§¦§¯§¾ §±§²§°§«§¥§¦§¯!", newachiev: "§¯§°§£§°§¦ §¥§°§³§´§ª§¨§¦§¯§ª§¦!", tryagain: "§±§°§±§²§°§¢§µ§« §³§¯§°§£§¡!", gamecomplete: "§ª§¤§²§¡ §±§²§°§«§¥§¦§¯§¡!", completetext: "§©§Ó§Ö§Ù§Õ §ã§à§Ò§â§Ñ§ß§à:", thanks: "§³§á§Ñ§ã§Ú§Ò§à §Ù§Ñ §Ú§Ô§â§å!!!", lostallfish: "§´§í §á§à§ä§Ö§â§ñ§Ý §Ó§ã§Ö§ç §â§í§Ò§à§Ü §ï§ä§à §à§é§Ö§ß§î §à§é§Ö§ß§î §á§Ö§é§Ñ§Ý§î§ß§à :(", instruction1: "§¯§¡§¨§®§ª §Ú §¥§¦§²§¨§ª §é§ä§à§Ò§í §â§Ñ§ã§ä§Ú!", instruction2: "§´§à§Ý§Ü§Ñ§Û§ã§ñ §ã §Þ§à§ß§ã§ä§â§Ñ§Þ§Ú §Ú §á§â§Ö§Ó§â§Ñ§ë§Ñ§Û §Ú§ç §Ó §ã§Ó§à§Ú§ç §Õ§â§å§Ù§Ö§Û!", instruction3: "§¯§Ö §ã§ä§Ñ§Ý§Ü§Ú§Ó§Ñ§Û§ã§ñ §ã §Þ§à§ß§ã§ä§â§Ñ§Þ§Ú §Ü§à§Ô§Õ§Ñ §â§Ñ§ã§ä§Ö§ê§î!", instruction5: "§¿§ä§Ú §Ü§Ñ§Þ§ß§Ú §ß§Ö §à§á§Ñ§ã§ß§í! §á§â§à§ã§ä§à §ß§Ö §Ù§Ñ§Õ§Ö§Ó§Ñ§Û §Ú§ç §Ú §Ó§ã§Ö §Ò§å§Õ§Ö§ä §ç§à§â§à§ê§à!", instruction9: "§¿§ä§à§ä §Þ§à§ß§ã§ä§â §ß§Ñ§Þ§ß§à§Ô§à §ã§Ú§Ý§î§ß§Ö§Ö §é§Ö§Þ §à§Ò§í§é§ß§í§Ö!", instruction14: "§¿§ä§à§ä §Þ§à§ß§ã§ä§â §â§Ñ§ã§ä§Ö§ä §ã§à §Ó§â§Ö§Þ§Ö§ß§Ö§Þ!", instruction20: "§¿§ä§à§ä §Þ§à§ß§ã§ä§â §Ù§Ñ§â§Ñ§Ù§ß§í§Û! §´§í §Õ§à§Ý§Ø§Ö§ß §Ó§í§â§Ñ§ã§ä§Ú §Ò§à§Ý§î§ê§Ú§Þ §Ú §ã§Ú§Ý§î§ß§í§Þ §é§ä§à§Ò§í §Ó§í§Ý§Ö§é§Ú§ä§î§ã§ñ!", rotatescreen: "§±§à§Ø§Ñ§Ý§å§Û§ã§ä§Ñ, §á§à§Ó§Ö§â§ß§Ú§ä§Ö §å§ã§ä§â§à§Û§ã§ä§Ó§à!", achievements: "§¥§°§³§´§ª§¨§¦§¯§ª§Á", achiev0: "§¥§à§ã§ä§Ú§Ø§Ö§ß§Ú§Ö 0", achiev1: "§¥§à§ã§ä§Ú§Ø§Ö§ß§Ú§Ö 1", achiev2: "§¥§à§ã§ä§Ú§Ø§Ö§ß§Ú§Ö 2", achiev3: "§¥§à§ã§ä§Ú§Ø§Ö§ß§Ú§Ö 3", achiev4: "§¥§à§ã§ä§Ú§Ø§Ö§ß§Ú§Ö 4", achiev5: "§¥§à§ã§ä§Ú§Ø§Ö§ß§Ú§Ö 5", achiev6: "§¥§à§ã§ä§Ú§Ø§Ö§ß§Ú§Ö 6", achiev7: "§¥§à§ã§ä§Ú§Ø§Ö§ß§Ú§Ö 7", achiev8: "§¥§à§ã§ä§Ú§Ø§Ö§ß§Ú§Ö 8" } }, BLOCK_SPACE_TYPE = 1, BLOCK_HERO_TYPE = 2, BLOCK_BRICK_TYPE = 3, BLOCK_SLEEP_TYPE = 4, BLOCK_ICE_TYPE = 5, BLOCK_HIDE_TYPE = 6, BLOCK_DANGER_TYPE = 7, DIR_UP = 1, DIR_RIGHT = 2, DIR_BOTTOM = 3, DIR_LEFT = 4, HIDE_FIELD_BORDER = 100; (function(e) { function t(e, t, n) { this.initialize(e, t, n) } var n = t.prototype; n.initialize = function(e, t, n) { if (e != BLOCK_SPACE_TYPE) { var r = new createjs.Sprite(y355); r.isOnTop = !1; r.isOnBottom = !1; r.baseBlock = this; r.isFullTop = !1; r.stop(); this.y30 = r; r = new createjs.Sprite(y355); r.mouseEnabled = !1; r.baseBlock = this; this.eye = r; r = new createjs.Sprite(y355); r.mouseEnabled = !1; r.baseBlock = this; this.shadowVis = r; isBlockLabels && (this.txtLabel = new createjs.Text(this.name, "11px Arial", "#FFF"), y497.addChild(this.txtLabel)); this.y30.setBoundingBox(-30, -60, 60, 70); this.reset(e, t, n) } }; n.reset = function(t, n, r) { createjs.Tween.removeTweens(this.y30); this.friends = []; this.isDrag = !1; this.offsetY = this.offsetX = 0; this.animOffset = 50 * Math.random(); this.oldRow = this.oldCell = 0; this.isDisposed = !1; this.y13 = this.y12 = this.startStageY = this.startStageX = 0; this.winscope = e; this.row = this.cell = -1; this.isWakeUp = this.isMoveTween = !1; this.type = t; this.name = r ? r : "BaseBlock"; this.parent = n; this.isBrick = !1; this.y30.mouseEnabled = !0; this.y30.isOnTop = !1; this.y30.isOnBottom = !1; this.y30.isFullTop = !1; this.y30.zIndex = 0; this.y30.alpha = 1; this.eye.alpha = 1; this.ticks = 0; this.isHided = !1; this.y30.hitArea = null; this.eye.stop(); this.y30.scaleX = this.y30.scaleY = .8; this.eye.scaleX = y164; this.eye.isOnTop = !0; this.eye.isFullTop = !0; this.eye.isOnBottom = !1; this.eye.zIndex = 1; this.y30.cursor = null; this.shadowIndex = 1; this.shadowYScale = .8; this.oldFriendsNum = 0; this.tickerMargin = Math.floor(30 * Math.random()); this.y30.parent || this.parent.addChild(this.y30); t == BLOCK_HERO_TYPE ? (this.setRandomEye(), this.parent.addChild(this.eye), this.y30.gotoAndStop("pos0"), this.setupMouseEventListeners(), this.setupShadow("charshadow")) : t == BLOCK_SLEEP_TYPE ? (this.eye.gotoAndPlay("starsleepv"), this.parent.addChild(this.eye), setSpriteScale(this.eye, .8), this.setupShadow("charshadow")) : t == BLOCK_BRICK_TYPE ? (n = Math.round(2 * Math.random()), this.y30.gotoAndStop("BrickV" + n + BG_POSTFIX), this.setupShadow("BrickShadow" + n)) : t == BLOCK_ICE_TYPE ? (this.y30.gotoAndStop("IceV"), this.setupShadow("IceShadow")) : t == BLOCK_HIDE_TYPE ? (this.y30.gotoAndStop("HideV"), setNextAnimation(this.y30, ""), createReverseAnim(y355, "HideV"), playReverseAnim(this.y30, "HideV"), this.eye.gotoAndPlay("hidewalllamp"), this.parent.addChild(this.eye), randomizeAnimFrame(this.eye), this.setupShadow("hideWallShadow")) : t == BLOCK_DANGER_TYPE && (this.y30.gotoAndStop("DangerV"), this.setupShadow("dangerShadow")); if (t == BLOCK_BRICK_TYPE || t == BLOCK_HIDE_TYPE || t == BLOCK_ICE_TYPE || t == BLOCK_DANGER_TYPE) this.y30.isOnTop = !0, this.y30.mouseEnabled = !1, this.isBrick = !0 }; n.setupShadow = function(e) { this.shadowVis.alpha = 1; this.shadowVis.gotoAndStop(e); setSpriteScale(this.shadowVis, .8); y110(this.shadowVis, shadowContainer) }; n.setRandomEye = function() { var e = Math.floor(4 * Math.random() + 1); this.eye.gotoAndStop("EyeV" + e) }; n.setupMouseEventListeners = function() { this.y30.cursor = "pointer"; this.y30.addEventListener("mousedown", this.onMouseDown); this.y30.addEventListener("pressmove", this.y29); this.y30.addEventListener("pressup", this.onMouseUp) }; n.setPos = function(e, t) { this.y30.x = e; this.y30.y = t; this.y209Pos(); this.isBrick || (this.eye.x = this.y30.x, this.eye.y = this.y30.y - 28, this.eyeStartX = this.eye.x, this.eyeStartY = this.eye.y, this.eyeAimX = this.eye.x, this.eyeAimY = this.eye.y); this.setEyePosByBody(); this.updateVisibility() }; n.y209Pos = function() { this.shadowVis.x = this.y30.x; this.shadowVis.y = this.y30.y; this.shadowVis.y = this.y30.y + CELL_SIZE * (this.shadowIndex - 1) }; n.updateVisibility = function() {}; n.onMouseUp = function(e) { var t = e.target.baseBlock; if (t.isDrag) { var n = t.startStageX - e.stageX; e = t.startStageY - e.stageY; var r = !1; Math.abs(n) > Math.abs(e) ? 40 < n ? t.searchMovePath(DIR_LEFT) : -40 > n ? t.searchMovePath(DIR_RIGHT) : r = !0 : 40 < e ? t.searchMovePath(DIR_UP) : -40 > e ? t.searchMovePath(DIR_BOTTOM) : r = !0; r && (t.restorePosWithFriends(), isHeroMoving = !1); t.isDrag = !1; y275() } }; n.restorePosWithFriends = function(e) { this.restorePos(); this.setupZPos(!1); for (e = 0; e < this.friends.length; e++) this.friends[e].restorePos(), this.friends[e].setupZPos(!1) }; n.y29 = function(e) { var t = e.target.baseBlock; if (t.isDrag) { var n = t.y12 + (y497.x - e.stageX) / scaleFactor; e = t.y13 + (y497.y - e.stageY) / scaleFactor; t.deltaMove(n, e); for (var r = 0; r < t.friends.length; r++) t.friends[r].deltaMove(n, e) } }; n.onMouseDown = function(e) { isLevelEditor && y401(e); if (!isHeroMoving && !isGamePaused) { var t = e.target.baseBlock; t.isDrag = !0; var n = e.target; t.startStageX = e.stageX; t.startStageY = e.stageY; t.rememberPos(); t.setupZPos(!0); t.offsetX = n.x * scaleFactor - e.stageX + y497.x; t.offsetY = n.y * scaleFactor - e.stageY + y497.y; for (e = 0; e < t.friends.length; e++) n = t.friends[e], n.rememberPos(), n.setupZPos(!0); isHeroMoving = !0; y275() } }; n.setupZPos = function(e) { this.y30.isFullTop = e; this.eye.isFullTop = e; e || (this.eye.isFullTop = this.isFriendAt(this.cell, this.row + 1)) }; n.setOffsetBy = function(e) { this.offsetX = (e.cell - this.cell) * CELL_SIZE; this.offsetY = (e.row - this.row) * CELL_SIZE }; n.rememberPos = function() { this.y12 = this.y30.x; this.y13 = this.y30.y }; n.deltaMove = function(e, t) { this.y30.x = this.y12 + Math.max(-10, Math.min(10, -e / 15)); this.y30.y = this.y13 + Math.max(-10, Math.min(10, -t / 15)); this.y209Pos() }; n.restorePos = function() { this.y30.x = this.y12; this.y30.y = this.y13 }; n.setIndex = function(e, t) { this.cell = e; this.row = t }; n.searchMovePath = function(e) { this.isDrag = !1; SearchMovePath(this, e) }; n.tick = function() { isGamePaused || (this.type === BLOCK_HIDE_TYPE && (this.isHided ? (this.eye.y = this.y30.y - 24 + 3 * (this.y30.currentAnimationFrame + 1), this.shadowVis.alpha = (3 - this.y30.currentAnimationFrame) / 4) : (this.eye.y = this.y30.y - 24 + 15 - 3 * (this.y30.currentAnimationFrame + 1), this.shadowVis.alpha = this.y30.currentAnimationFrame / 4)), this.isBrick || (isBlockLabels && (this.txtLabel.x = this.y30.x - 29, this.txtLabel.y = this.y30.y - 29), this.ticks = y87, 1 > this.friends.length && (this.ticks += this.animOffset), this.y30.scaleY = .81 + (Math.cos(this.ticks / 5) / 2 + .5) / 15, this.y30.scaleX = .81 + (Math.cos(this.ticks / 5 + Math.PI) / 2 + .5) / 20, this.type !== BLOCK_SLEEP_TYPE && (this.eye.scaleY = this.y30.scaleY, this.eye.scaleX = this.y30.scaleX, this.eye.rotation = 0), this.shadowVis.scaleY = this.shadowYScale + (this.y30.scaleY - .81) * this.shadowYScale, this.shadowVis.scaleX = this.y30.scaleX, this.setEyePosByBody(), isMinigame && this.y209Pos())) }; n.move = function(e, t, n, r) { headHero = this; var i = Math.abs(this.cell - e), s = Math.abs(this.row - t), i = Math.max(300, 100 * Math.max(s, i)); startStarCollection(i); relocate(this, e, t); this.setupZPos(!1); for (e = 0; e < this.friends.length; e++) this.friends[e].rememberPos(), this.friends[e].setupZPos(!1); createjs.Tween.get(this.y30).to({ x: n, y: r }, i, createjs.Ease.getBackIn(1.5)).call(this.tweenComplete).addEventListener("change", this.tweenChange); this.isMoveTween = !0 }; n.tweenChange = function(e) { e = e.target.target.baseBlock; var t, n; for (t = 0; t < e.friends.length; t++) n = e.friends[t], n.setPos(e.y30.x + (n.cell - e.cell) * CELL_SIZE, e.y30.y + (n.row - e.row) * CELL_SIZE); e.y209Pos(); e.updateVisibility(); if (!e.isMoveTween) if (isButtonActivated = !1, updateActivators(), updateBlocksByActivator(), !isOldButtonActivated && isButtonActivated && y141("activator"), isOldButtonActivated = isButtonActivated, e.setEyePosByBody(), findFriends(e), e.rememberPos(), isDangerCollided) { for (t = 0; t < e.friends.length; t++) n = e.friends[t], n.startShock(); e.startShock(); e.shockRestart(); y141("electrodead") } else isHeroMoving = !1, headHero = null, e.levelWinCheck(), e.oldFriendsNum !== e.friends.length && playConnectSound() }; n.setEyePosByBody = function() { this.eye.x = this.y30.x; this.eye.y = this.y30.y - 22; this.type == BLOCK_SLEEP_TYPE ? this.eye.y = this.y30.y - 40 : this.type === BLOCK_HIDE_TYPE && (this.eye.y = this.y30.y - 24, this.eye.x = this.y30.x - (24 * Math.random() - 12)); this.eyeStartX = this.eye.x; this.eyeStartY = this.eye.y; this.eyeAimX = this.eye.x; this.eyeAimY = this.eye.y }; n.tweenComplete = function(e) { e.target.baseBlock.isMoveTween = !1 }; n.levelWinCheck = function() { isDisableWin || this.friends.length != allHeroes.length - 1 || (y487(), isHeroMoving = isLevelCompleted = !0, y96("level complete!")) }; n.addFriend = function(e) { e == this || isArrayContains(this.friends, e) || (this.friends.push(e), this.type != BLOCK_SLEEP_TYPE || this.isWakeUp || (this.type = BLOCK_HERO_TYPE, this.isWakeUp = !0, this.setRandomEye(), this.setEyePosByBody(), this.parent.addChild(this.eye), this.setupMouseEventListeners())) }; n.updateVisionByFriendsPos = function() { var e = "pos0"; if (this.type != BLOCK_SLEEP_TYPE || this.isWakeUp) { var t = this.cell, n = this.row, r = this.isFriendAt(t - 1, n + 0), i = this.isFriendAt(t + 1, n + 0), s = this.isFriendAt(t + 0, n - 1), o = this.isFriendAt(t + 0, n + 1); this.isFriendAt(t + 1, n - 1); this.isFriendAt(t + 1, n + 1); s && (e = "posup"); o && (e = "posdown"); r && (e = "posleft"); i && (e = "posright"); r && o && (e = "posleftdown"); i && o && (e = "posrightdown"); i && s && (e = "postopright"); r && s && (e = "postopleft"); s && o && (e = "posvert"); r && i && (e = "poshoriz"); r && o && s && (e = "postopdownleft"); i && o && s && (e = "postopdownright"); i && s && r && (e = "poskrest"); this.eye.isFullTop = o; if (!s) { for (r = 1; this.isFriendAt(t, n + r);) r++; this.shadowYScale = 1 < r ? 1 * r : .8; this.shadowVis.scaleY = this.shadowYScale; this.shadowIndex = r; this.y209Pos() } s ? y206(this.shadowVis) : y110(this.shadowVis, shadowContainer) } else e = "sleepv0"; isBlockLabels && (this.txtLabel.text = e); this.y30.gotoAndStop(e) }; n.isFriendAt = function(e, t) { var n = getBlockAt(e, t); return isArrayContains(this.friends, n) }; n.dispose = function() { this.isDisposed = !0; deleteBlockFromMap(this); createjs.Tween.removeTweens(this.y30); isArrayContains(allBlocks, this) && allBlocks.splice(allBlocks.indexOf(this, 0), 1); y201(this); this.y30.removeAllEventListeners(); this.y30.hitArea = null; y206(this.y30); y206(this.eye); y206(this.shadowVis); createjs.Tween.removeTweens(this.y30) }; n.deadMove = function(e) { headHero = this; this.isMoveTween = !0; var t = createjs.Ease.circIn; e == DIR_LEFT || e == DIR_RIGHT ? (e = e == DIR_LEFT ? -500 : 1e3, createjs.Tween.get(this.y30).to({ x: e }, 500, t).call(this.tweenComplete).addEventListener("change", this.deadTweenChange)) : (e = e == DIR_UP ? -500 : 1e3, createjs.Tween.get(this.y30).to({ y: e }, 500, t).call(this.tweenComplete).addEventListener("change", this.deadTweenChange)); y141("lose") }; n.deadTweenChange = function(e) { e = e.target.target.baseBlock; for (var t = 0; t < e.friends.length; t++) { var n = e.friends[t]; n.setPos(e.y30.x + (n.cell - e.cell) * CELL_SIZE, e.y30.y + (n.row - e.row) * CELL_SIZE) } e.y209Pos(); e.updateVisibility(); e.isMoveTween || (isHeroMoving = !1, headHero = null, y246(!1, 15)) }; n.iceBreak = function() { isLevelLoading || (deleteBlockFromMap(this), this.parent.removeChild(this.y30), createGlassExplode(this.y30.x, this.y30.y), y206(this.shadowVis), y141("icebreak")) }; n.setActivationStatus = function(e) { this.type === BLOCK_HIDE_TYPE && this.setHiding(e) }; n.setHiding = function(e) { e ? this.isHided || (deleteBlockFromMap(this), this.y30.gotoAndPlay("HideV"), y110WithIndex(this.eye, shadowContainer, 0), y110WithIndex(this.y30, shadowContainer, 0), this.isHided = !0) : getBlockAt(this.cell, this.row) === BLOCK_SPACE_TYPE && this.isHided && (relocate(this, this.cell, this.row), y110(this.y30, y390), y110(this.eye, y390), playReverseAnim(this.y30, "HideV"), this.isHided = !1) }; n.startShock = function() { this.type != BLOCK_DANGER_TYPE && this.eye.gotoAndPlay("DanderDeadV") }; n.shockRestart = function() { y246(!0, 20) }; e.BaseBlock = t })(window); var HIDE_ACTIVATOR_TYPE = 1, STAR_TYPE = 2, isButtonActivated = !1, isOldButtonActivated = !1; (function(e) { function t(e, t, n) { this.initialize(e, t, n) } var n = t.prototype; n.initialize = function(e, t, n) { var r = new createjs.Sprite(y355); r.mouseEnabled = !1; r.baseBlock = this; this.y30 = r; r = new createjs.Sprite(y355); r.mouseEnabled = !1; r.baseBlock = this; this.shadowVis = r; this.reset(e, t, n) }; n.reset = function(e, t, n) { this.type = e; createjs.Tween.removeTweens(this.y30); this.collectSteps = 999; this.tweenMaxSteps = 0; this.isNeedCollect = !1; this.name = n ? n : "Activator"; this.parent = t; this.isActivated = !1; this.y30.isOnTop = !1; this.y30.isOnBottom = !0; this.y30.isFullTop = !1; this.y30.alpha = 1; this.shadowVis.alpha = 1; this.animRestartCounter = this.animWaitTime = 30 + 30 * Math.random(); this.isStarCollected = !1; this.frame = "0"; this.ticks = 0; this.isBlackStar = !1; this.animOffset = 50 * Math.random(); y206(this.shadowVis); e === HIDE_ACTIVATOR_TYPE ? (this.y30.gotoAndStop("ActivatorV"), setSpriteScale(this.y30, .8), this.shadowVis.gotoAndStop("ActivatorShadow"), setSpriteScale(this.shadowVis, .8), y110(this.shadowVis, shadowContainer)) : e === STAR_TYPE && (this.frame = isShadowDisabled ? "starvismini" : "starvis", isMinigame && (this.shadowVis.gotoAndStop("starminishadow"), setSpriteScale(this.shadowVis, .8), y110(this.shadowVis, shadowContainer), this.frame = "starvismini"), this.y30.gotoAndPlay(this.frame), setNextAnimation(this.y30, ""), setSpriteScale(this.y30, .8), this.y30.currentAnimationFrame = Math.floor(10 * Math.random()), isMinigame || levelTotalStarsNum++); t.addChild(this.y30) }; n.y209Pos = function() { this.shadowVis.x = this.y30.x; this.shadowVis.y = this.y30.y }; n.setPos = function(e, t) { this.type == STAR_TYPE ? (this.y30.x = e, this.y30.y = t - 24) : (this.y30.x = e, this.y30.y = t - 7); this.y209Pos() }; n.setIndex = function(e, t) { this.cell = e; this.row = t }; n.tick = function() { this.type === STAR_TYPE && (this.animRestartCounter--, 0 > this.animRestartCounter && !this.isBlackStar && (this.animRestartCounter = 30 + 30 * Math.random(), this.y30.gotoAndPlay(this.frame)), isMinigame && (this.ticks = y87, this.ticks += this.animOffset, this.y30.scaleX = this.y30.scaleY = .8 + (Math.cos(this.ticks / 3) / 2 + .5) / 7, this.y209Pos(), this.shadowVis.scaleX = this.shadowVis.scaleY = this.y30.scaleX, this.shadowVis.alpha = 1.8 - this.y30.scaleX)) }; n.dispose = function() { isArrayContains(allBonuses, this) && allBonuses.splice(allBonuses.indexOf(this, 0), 1); y201Bonuses(this); this.y30.removeAllEventListeners(); this.y30.stop(); y206(this.y30); y206(this.shadowVis) }; n.checkActivating = function() { this.type !== STAR_TYPE && (getBlockAt(this.cell, this.row) != BLOCK_SPACE_TYPE ? isButtonActivated = this.isActivated = !0 : this.isActivated = !1) }; n.setCollectChance = function(e) { this.collectSteps = e }; n.checkCollect = function(e) { this.collectSteps <= e && (this.tweenMaxSteps = e, this.isNeedCollect = !0) }; n.startCollectAnim = function(e) { this.isNeedCollect && !this.isStarCollected && (this.isStarCollected = !0, levelCollectedStarsNum++, e = e * this.collectSteps / this.tweenMaxSteps + 100, createjs.Tween.get(this.y30).wait(e).call(function(e) { y110(e.target, y262); playCoinSound() }).to({ alpha: 0, y: this.y30.y - 100 }, 500)) }; e.BlockBonus = t })(window); var map = [], FIELD_ROWS = 21, FIELD_CELLS = 18, CELL_SIZE = 45, MARGIN_LEFT = 36, MARGIN_TOP = 26, ROWS_MARGIN = 7, CELLS_MARGIN = 6, ROW_FIELD_END = 0, CELL_FIELD_END = 0, allBlocks = [], allHeroes = [], disposedBlocks = [], isHeroMoving = !1, headHero = null, y390, y50 = 0, isLevelCompleted = !1, isDangerCollided = !1, levelTotalStarsNum = 0, levelCollectedStarsNum = 0, shadowContainer; var isLevelLoading = !1; var lastDir = -1; var y345, levely4s = [], y208 = 20, y70 = 0, y126 = 1, y138 = 2, y94 = 3, y369 = 10, y322 = 0, y371 = 1, y200 = [], y287 = "MonstersUnion211", isStorageSupported = !1; var y389 = 0; var savedLevel, savesHistoryCount = 0; var y375 = []; var isMinigame = !1, hitObj, minigameTimer, isMinigameFinished = !1; var BLACK_CHANCE = .1; var coinsCounter = 0, launcher, launchSpeedX, launchSpeedY, isCoinsChanged, isLaunched = !1, lastUpdate = 0; var minigameTime = 0; var launchWaitTimer = 0; var isAudioSupported = !1, isMute = !1; var inflateSound; var y135; var allBonuses = [], disposedBonuses = [], bonusMap = []; var currentBon; var y213, y210, y428, y394, y284, isGamePaused, y244; var lightsV, skyCont, allClouds, currCloud; var menuBgObj; var y348, y106, y227, y503, y257; var y367, y461, y324, y97, y95, y68, y45; var y234, y267, settingsBtn, y347Btn; var y184 = "musicoffbtn", UNy184 = "musiconbtn"; var y316, y122, y49, y182, y113 = [], y343, y253; var y136, y121, moreGamesLvlCompleteBtn, star1, star2, star3, y256, levelCompleteBg; var y50StarsNum = 0; var y162, y448, y288; var y115LogoPos = [0, 0, 2, 2, 2, 0, 0, 0, 0, 2, 0, 2, 2, 14, 0, 0, 2, 14, 19, 2, 0]; var y212, y66, y469, y508; var y120, y176, y424, y378 = []; var y67; var y341, y405, y282, y142, y333; var isGameCompleteScreenShow = !1; var y150; var minigameContainer, txtMinigameTimer, txtMinigameCoins, timerIcon, coinsIcon; var blinkWin; var comixCont, comixFrame1, comixFrame2, comixFrame3, comixNextBtn; var comixIndex = 0; var settingsContainer, settingsQualityBtn, settingsShadowsBtn; var stage, y143, canvas, rect, y497, y252, rotationContainer, y262, y494, y366, scaleFactor = 1, minW = 320, minH = 400, ow = minW, oh = minH, maxW = 356, maxH = 600, y308 = maxW, y463 = 500, y332 = minW, y52 = minH, y237 = 1; var isWasPaused = null, topVisionLine, zoomFactor = 1; var timer; var MyGame = {}, images, y388; MyGame.init = function() { canvas = document.getElementById("canvas"); images = images || {}; y388 = y388 || {}; stage = new createjs.Stage("canvas"); y497 = new createjs.Container; y497.isRoot = !0; y497.width = ow; y497.height = oh; stage.addChild(y497); y318(); y262 = new createjs.Container; y464 = new createjs.Container; rotationContainer = new createjs.Container; rotationContainer.width = ow; rotationContainer.height = oh; initResizeManager(); createjs.Touch.enable(stage, !0); isDesktop() && stage.enableMouseOver(15); stage.mouseMoveOutside = !0; initLoaders(); stage.update(); var e = document.getElementById("loader"); e && e.parentNode && e.parentNode.removeChild(e); initSpilApi() }; var isSponsorLogoError = !1; var logoConfig, sponsorLogoBitmap, sponsorPreload, sponsorLogoDefWidth = 1, sponsorLogoDefHeight = 1, sponsorApi, isAllFilesLoaded = !1, isLogoReady = !1, isGameInited = !1; var y420, y152, bar, y163 = 20; var y356, y355, y230, isPreloaderLogoReady = !1; var y433; var y464; var mainBg; var nameCounter = 0; var y111 = 0; var y501 = 0, y87 = 0, y85 = [], y327 = 1, FPS = 30, GAME_FPS = 30, defaultDelta = 1e3 / GAME_FPS; var y249 = 0, y445 = 30, isGrowningShake = !1, y300 = y445; var y304 = [0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0], BG_POSTFIX = "", mainBgIndex = 0;