var __extends = this && this.__extends || function(a, b) {
    function c() {
        this.constructor = a
    }
    for (var d in b) b.hasOwnProperty(d) && (a[d] = b[d]);
    a.prototype = null === b ? Object.create(b) : (c.prototype = b.prototype, new c)
};
define("common/audio/AudioPlayer", ["require", "exports", "wcgf/sounds/SoundManager"], function(a, b, c) {
        "use strict";
        var d = function() {
            function a() {
                if (this._baseGameRollupLastPlayed = "", a._audioPlayerInstance) throw new Error("Error: Instantiation failed: Use AudioPlayer.getInstance() instead of new.");
                a._audioPlayerInstance = this
            }
            return a.getInstance = function() {
                return a._audioPlayerInstance
            }, a.playSound = function(a) {
                c.SoundManager.getInstance().execute(a)
            }, a.playBaseGameSpinBubbleSound = function() {
                a.playSound("baseGameSpinMusic"), a.playSound("spinButtonList")
            }, a.playBaseGameBubblesIdleFadeSound = function() {
                a.playSound("idleFade")
            }, a.stopFreeSpinMusic = function() {
                a.playSound("freeSpinsMusicTerm")
            }, a.playBaseGameConchSound = function(b) {
                var c = a.getBubbleCountFromLocsArray(b);
                0 != c && (c >= a.BUBBLE_BOOST_COUNT_TIER_1 && c < a.BUBBLE_BOOST_COUNT_TIER_2 ? a.playSound("conchLow") : c >= a.BUBBLE_BOOST_COUNT_TIER_2 && c < a.BUBBLE_BOOST_COUNT_TIER_3 ? a.playSound("conchMed") : a.playSound("conchHigh"))
            }, a.prototype.playBaseGameRollup = function(b, c) {
                if (0 == c) return void(this._baseGameRollupLastPlayed = "");
                c < a.BIG_WIN_THRESHOLD_1 || b < a.CREDITS_BET_MINIMUM_BIG_WIN_AMOUNT ? c < a.MID_WIN_THRESHOLD ? (a.playSound("baseGameLowRollupLoop"), this._baseGameRollupLastPlayed = "baseGameLowRollup") : (a.playSound("baseGameHighRollupLoop"), this._baseGameRollupLastPlayed = "baseGameHighRollup") : (a.playSound("bigWinRollupLoop"), this._baseGameRollupLastPlayed = "bigWinRollup")
            }, a.prototype.stopBaseGameRollup = function() {
                "" != this._baseGameRollupLastPlayed && (a.playSound(this._baseGameRollupLastPlayed + "Term"), this._baseGameRollupLastPlayed = "")
            }, a.playFreeSpinRollup = function() {
                a.playSound("freeSpinsRollupLoop")
            }, a.stopFreeSpinRollup = function() {
                a.playSound("freeSpinsRollupTerm")
            }, a.getBubbleCountFromLocsArray = function(a) {
                for (var b = 0, c = 0, d = a; c < d.length; c++)
                    for (var e = d[c], f = 0, g = e; f < g.length; f++) {
                        g[f];
                        b++
                    }
                return b
            }, a
        }();
        d._audioPlayerInstance = new d, d.BUBBLE_BOOST_COUNT_TIER_1 = 1, d.BUBBLE_BOOST_COUNT_TIER_2 = 3, d.BUBBLE_BOOST_COUNT_TIER_3 = 5, d.CREDITS_BET_MINIMUM_BIG_WIN_AMOUNT = 1e3, d.MID_WIN_THRESHOLD = 5, d.BIG_WIN_THRESHOLD_1 = 10, b.AudioPlayer = d
    }), define("common/bubbleBoost/button/CustomButtonController", ["require", "exports", "wcgf/coreComponents/BasicButtonController"], function(a, b, c) {
        "use strict";
        var d = function(a) {
            function b(b, c) {
                return a.call(this, b, c) || this
            }
            return __extends(b, a), b.prototype.updateState = function() {
                null != this.skin && (this._enable && this._isOver ? this._isPressed ? this.skin.gotoAndStop("_down") : this.skin.gotoAndStop("_over") : this.skin.gotoAndStop("_up"))
            }, b
        }(c.BasicButtonController);
        b.CustomButtonController = d
    }), define("common/bubbleBoost/button/BubbleBoostButton", ["require", "exports", "wcgf/core/events", "wcgf/coreComponents/BasicButtonController", "wcgf/sequencers/LinearSequencer", "wcgf/gameComponents/MovieClipSequenceItem", "common/audio/AudioPlayer", "common/bubbleBoost/button/CustomButtonController"], function(a, b, c, d, e, f, g, h) {
        "use strict";
        var i;
        ! function(a) {
            a[a.FeatureOn = 0] = "FeatureOn", a[a.FeatureOff = 1] = "FeatureOff"
        }(i = b.AnimationState || (b.AnimationState = {}));
        var j = function(a) {
            function b() {
                return a.call(this) || this
            }
            return __extends(b, a), b.prototype.init = function(a, b, c, d, e, f, g) {
                this._skin = a, this._stage = b, this._bubbleBoostOnButton = new h.CustomButtonController(a[c]), this._bubbleBoostOnButton.init(), this._bubbleBoostOffButton = new h.CustomButtonController(a[d]), this._bubbleBoostOffButton.init(), this._bubbleBoostAnim = a[e], this._defaultToggleState = null != g ? g : i.FeatureOff, this._curButtonState = this._defaultToggleState, this.updateButtonState(this._defaultToggleState), this.updateAnimsForNewState()
            }, b.prototype.startActiveStateAnim = function() {
                if (null == this._bubbleBoostOnAnimSequence) {
                    var a = [];
                    a.push(new f.MovieClipSequenceItem(this._bubbleBoostAnim.animActive, "activated", "activatedDone", 1)), a.push(new f.MovieClipSequenceItem(this._bubbleBoostAnim.animActive, "active", "activeDone", 0)), this._bubbleBoostOnAnimSequence = new e.LinearSequencer(a)
                }
                this._bubbleBoostOnAnimSequence.startSequence()
            }, b.prototype.stopActiveStateAnim = function() {
                null != this._bubbleBoostOnAnimSequence && (this._bubbleBoostOnAnimSequence.stopSequence(!0), this._bubbleBoostOnAnimSequence = null)
            }, b.prototype.updateButtonState = function(a) {
                if (null != a) switch (a) {
                    case i.FeatureOff:
                        this._curButtonState = i.FeatureOff, this.enableButtons(i.FeatureOff);
                        break;
                    case i.FeatureOn:
                        this._curButtonState = i.FeatureOn, this.enableButtons(i.FeatureOn)
                } else switch (this._curButtonState) {
                    case i.FeatureOff:
                        this._curButtonState = i.FeatureOn, this.enableButtons(i.FeatureOn);
                        break;
                    case i.FeatureOn:
                        this._curButtonState = i.FeatureOff, this.enableButtons(i.FeatureOff)
                }
            }, b.prototype.enableButtons = function(a) {
                switch (a) {
                    case i.FeatureOff:
                        this._bubbleBoostOffButton.enable = !0, this._bubbleBoostOffButton.visible = !0, this._bubbleBoostOnButton.enable = !1, this._bubbleBoostOnButton.visible = !1;
                        break;
                    case i.FeatureOn:
                        this._bubbleBoostOffButton.enable = !1, this._bubbleBoostOffButton.visible = !1, this._bubbleBoostOnButton.enable = !0, this._bubbleBoostOnButton.visible = !0
                }
            }, b.prototype.updateAnimsForNewState = function() {
                switch (this._curButtonState) {
                    case i.FeatureOff:
                        this._bubbleBoostAnim.gotoAndStop("off"), this.stopActiveStateAnim();
                        break;
                    case i.FeatureOn:
                        this._bubbleBoostAnim.gotoAndStop("active"), this.startActiveStateAnim(), g.AudioPlayer.playSound("seashellBubbleAppear")
                }
            }, b.prototype.enableButton = function(a) {
                a ? this.addListeners() : (this.removeListeners(), "FreeSpin" == this._stage && (this._bubbleBoostOnButton.skin.mouseEnabled = !1, this._bubbleBoostOnButton.skin.mouseChildren = !1, this._bubbleBoostOffButton.skin.mouseEnabled = !1, this._bubbleBoostOffButton.skin.mouseChildren = !1))
            }, b.prototype.addListeners = function() {
                this._bubbleBoostOnButton.hasEventListener(d.BasicButtonController.MOUSE_CLICK, this.onBubbleBoostOnButtonClick, this) || this._bubbleBoostOnButton.addEventListener(d.BasicButtonController.MOUSE_CLICK, this.onBubbleBoostOnButtonClick, this), this._bubbleBoostOffButton.hasEventListener(d.BasicButtonController.MOUSE_CLICK, this.onBubbleBoostOffButtonClick, this) || this._bubbleBoostOffButton.addEventListener(d.BasicButtonController.MOUSE_CLICK, this.onBubbleBoostOffButtonClick, this)
            }, b.prototype.removeListeners = function() {
                this._bubbleBoostOnButton.removeEventListener(d.BasicButtonController.MOUSE_CLICK, this.onBubbleBoostOnButtonClick, this), this._bubbleBoostOffButton.removeEventListener(d.BasicButtonController.MOUSE_CLICK, this.onBubbleBoostOffButtonClick, this)
            }, b.prototype.onBubbleBoostOnButtonClick = function(a) {
                this._promotionalFreeSpinsEnabled || (this.updateButtonState(), this.updateAnimsForNewState(), this.dispatchEvent(new c.events.Event(b.BUBBLE_BOOST_BUTTON_CLICKED, null, this)))
            }, b.prototype.onBubbleBoostOffButtonClick = function(a) {
                this.updateButtonState(), this.updateAnimsForNewState(), this.dispatchEvent(new c.events.Event(b.BUBBLE_BOOST_BUTTON_CLICKED, null, this))
            }, Object.defineProperty(b.prototype, "curButtonState", {
                get: function() {
                    return this._curButtonState
                },
                enumerable: !0,
                configurable: !0
            }), b.prototype.stopSequences = function() {
                null != this._bubbleBoostOnAnimSequence && (this._bubbleBoostOnAnimSequence.stopSequence(!0), this._bubbleBoostOnAnimSequence = null)
            }, Object.defineProperty(b.prototype, "promotionalFreeSpinsEnabled", {
                set: function(a) {
                    this._promotionalFreeSpinsEnabled = a
                },
                enumerable: !0,
                configurable: !0
            }), b
        }(c.events.EventDispatcher);
        j.BUBBLE_BOOST_BUTTON_CLICKED = "BubbleBoostButtonClicked", b.BubbleBoostButton = j
    }), define("views/baseGame/BaseControlsView", ["require", "exports", "wcgf/core/events", "wcgf/coreComponents/PlayButtonController", "wcgf/coreComponents/LabeledTextFieldController", "wcgf/coreComponents/GenericStepperController", "wcgf/core/AssetManager", "wcgf/core/TextManager", "wcgf/coreComponents/AutoPlayButtonController", "wcgf/gameComponents/RollupIncrementer", "wcgf/sequencers/ISequenceItem", "wcgf/gameComponents/BaseGameBetControls", "wcgf/gameComponents/MobileBetControls", "wcgf/textFormatters/CurrencyTextFormatter", "wcgf/coreComponents/GenericPlaqueController", "wcgf/messageBus/ConsoleBusProxy", "wcgf/messageBus/GameMsgBus", "wcgf/gameComponents/BetManager", "wcgf/core/CurrencyFormatter", "common/bubbleBoost/button/BubbleBoostButton", "common/audio/AudioPlayer"], function(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u) {
        "use strict";
        var v;
        ! function(a) {
            a[a.Spinning = 0] = "Spinning", a[a.Resolving = 1] = "Resolving", a[a.Idle = 2] = "Idle", a[a.Rollup = 3] = "Rollup", a[a.AutoSpinIdle = 4] = "AutoSpinIdle", a[a.BonusIdle = 5] = "BonusIdle", a[a.BonusTransition = 6] = "BonusTransition", a[a.InsufficientFunds = 7] = "InsufficientFunds", a[a.Disable = 8] = "Disable"
        }(v = b.ControlsState || (b.ControlsState = {}));
        var w = function(a) {
            function b() {
                var b = a.call(this) || this;
                return b._rollupIndex = 0, b._isMaxStep = !1, b._totalBalance = 0, b._skipEnable = !0, b._assetManager = g.AssetManager.getInstance(), b._msgBus = q.GameMsgBus.getInstance(), b._consoleProxy = p.ConsoleBusProxy.getInstance(), b._plaqueController = new o.GenericPlaqueController, b._betControls = new l.BaseGameBetControllers(b._plaqueController), b._betControls.soundMap.setValue(l.BetControlSounds.LineBetMeterUpSound, "ControlsButtonBetUp"), b._betControls.soundMap.setValue(l.BetControlSounds.LineBetMeterMaxSound, "ControlsButtonBetMax"), b._betControls.soundMap.setValue(l.BetControlSounds.LineBetMeterDownSound, "ControlsButtonBetDown"), b
            }
            return __extends(b, a), b.prototype.init = function(a, b) {
                void 0 === a && (a = null), void 0 === b && (b = !1), r.BetManager.getInstance().addEventListener(r.BetManager.TOTAL_BET_CHANGE, this.onBetLineValueChange, this), r.BetManager.getInstance().addEventListener(r.BetManager.BALANCE_CHANGE, this.onBalanceChange, this), q.GameMsgBus.getInstance().addEventListener(q.GameMsgBus.START_GAME_INITIAL, this.checkInsufficientFunds, this), q.GameMsgBus.getInstance().addEventListener(q.GameMsgBus.BEGIN_NEW_GAME, this.checkInsufficientFunds, this), this.setMobileBetControls(), this.setLineMeterValue(), this.setBubbleBoostButton(a), this.setDenomination(a), this.setPlayButton(), this.setAutoPlayButton(a), null != a.gameLogicResponse.promotionalFreeSpin ? (this.setPromoFreeSpinMeter(a), this._bubbleBoostButton.promotionalFreeSpinsEnabled = !0) : (this.setBalanceMeter(), this._bubbleBoostButton.promotionalFreeSpinsEnabled = !1), this._betControls.init(a), b && this._betControls.lineBetMeter.setSteps(1, [1]), this.setWinMeter(), this.setPayout(a), this.resetWin(), this.setRollup(), this.setPlaqueController(a), this.updateBalance(a.gameLogicResponse.balances.totalBalance), this.checkInsufficientFunds()
            }, b.prototype.overrideLineBetMeter = function() {}, b.prototype.setBubbleBoostButton = function(a) {
                var d, e = a.gameLogicResponse.patternSliderInput,
                    f = null != a.gameLogicResponse.promotionalFreeSpin;
                d = f ? t.AnimationState.FeatureOn : 50 == e.patternsBet ? t.AnimationState.FeatureOff : t.AnimationState.FeatureOn, this._bubbleBoostButton = new t.BubbleBoostButton, this._bubbleBoostButton.init(this._assetManager.getAsset("bubbleBoostButton"), "BaseGame", "bubbleBoostOnButton", "bubbleBoostOffButton", "bubbleBoostAnims", "hitArea", d), this._bubbleBoostButton.enableButton(!0), this._bubbleBoostButton.addEventListener(t.BubbleBoostButton.BUBBLE_BOOST_BUTTON_CLICKED, this.onBubbleBoostButtonClicked, this), this.addEventListener(b.BUBBLE_BOOST_CHANGE, this.onBubbleBoostChange, this), this.dispatchEvent(new c.events.Event(b.BUBBLE_BOOST_CHANGE, this))
            }, b.prototype.onBubbleBoostButtonClicked = function(a) {
                this.getCurrentBubbleBoostButtonState() == t.AnimationState.FeatureOff ? (r.BetManager.getInstance().patternsBetSelectedIndex = 0, this.dispatchEvent(new c.events.Event(f.GenericStepperController.VALUE_CHANGE_DOWN, r.BetManager.getInstance().patternsBetSelectedIndex, this))) : (r.BetManager.getInstance().patternsBetSelectedIndex = 1, this.dispatchEvent(new c.events.Event(f.GenericStepperController.VALUE_CHANGE_UP, r.BetManager.getInstance().patternsBetSelectedIndex, this))), r.BetManager.getInstance().dispatchEvent(new c.events.Event(r.BetManager.PATTERNS_BET_CHNAGE, this)), this.updateTotalBet(), this.dispatchEvent(new c.events.Event(b.BUBBLE_BOOST_CHANGE, this))
            }, b.prototype.onBubbleBoostChange = function(a) {
                this.updateLineMeterForBubbleBoost(this.getCurrentBubbleBoostButtonState() == t.AnimationState.FeatureOn)
            }, b.prototype.setMobileBetControls = function() {
                this._mobileBetControl = new m.MobileBetControls(this._assetManager.getSkin("MobileBetControls")), this._mobileBetControl.addEventListener(m.MobileBetControls.MOBILE_BET_CONTROLS_OPEN, this.onMobileBetControlsOpen, this), this._mobileBetControl.addEventListener(m.MobileBetControls.MOBILE_BET_CONTROLS_CLOSE, this.onMobileBetControlsClose, this), this._mobileBetControl.init()
            }, b.prototype.onMobileBetControlsOpen = function(a) {
                this._playButton.enable = !1, this._autoPlayButton.enable = !1, u.AudioPlayer.playSound("ControlsButtonOptionsOpen")
            }, b.prototype.onMobileBetControlsClose = function(a) {
                this._state = v.Idle, this.updateState(), u.AudioPlayer.playSound("ControlsButtonOptionsClose")
            }, b.prototype.setPlayButton = function() {
                this._playButton = new d.PlayButtonController(this._assetManager.getAsset("playButton")), this._playButton.init(), this._playButton.state = d.PlayButtonState.Spin, this._playButton.addEventListener(d.PlayButtonController.SKIP_BUTTON_CLICK, this.onSkipButtonClick, this), this._playButton.addEventListener(d.PlayButtonController.SPIN_BUTTON_CLICK, this.onSpinButtonClick, this), this._playButton.addEventListener(d.PlayButtonController.START_BUTTON_CLICK, this.onStartButtonClick, this)
            }, b.prototype.setAutoPlayButton = function(a) {
                this._autoPlayButton = new i.AutoPlayButtonController(this._assetManager.getAsset("autoPlay")), this._autoPlayButton.init(a), this._autoPlayButton.state = i.AutoPlayButtonState.Play, this._autoPlayButton.addEventListener(i.AutoPlayButtonController.AUTO_PLAY_BUTTON_CLICK, this.onAutoPlayButtonClick, this), this._autoPlayButton.addEventListener(i.AutoPlayButtonController.AUTO_PLAY_CHOICES_BUTTON_CLICK, this.onAutoPlayChoicesClick, this), this._autoPlayButton.addEventListener(i.AutoPlayButtonController.AUTO_PLAY_STOP_BUTTON_CLICK, this.onAutoPlayStopButtonClick, this)
            }, b.prototype.setLineMeterValue = function() {
                this._numOfLinesMeter = g.AssetManager.getInstance().getAsset("numOfLinesMeter"), null != this._numOfLinesMeter && (this._numOfLinesOffLabelClip = g.AssetManager.getInstance().getAsset("numOfLinesMeterOffLabelClip"), this._numOfLinesOffLabelClip.linesClip.lines.text = "50", this._numOfLinesOffLabelClip.topLabelClip.label.text = h.TextManager.getInstance().getText("linesText"), this._numOfLinesOffLabelClip.bottomLabelClip.label.text = h.TextManager.getInstance().getText("linesBubbleBoostText"), this._numOfLinesOnLabelClip = g.AssetManager.getInstance().getAsset("numOfLinesMeterOnLabelClip"), this._numOfLinesOnLabelClip.linesClip.lines.text = "50", this._numOfLinesOnLabelClip.topLabelClip.label.text = h.TextManager.getInstance().getText("linesText"), this._numOfLinesOnLabelClip.bottomLabelClip.label.text = h.TextManager.getInstance().getText("linesBubbleBoostText"), this._numOfLinesMeter.textField.text = "")
            }, b.prototype.updateLineMeterForBubbleBoost = function(a) {
                this._numOfLinesOnLabelClip.visible = a, this._numOfLinesOffLabelClip.visible = !a;
                var b = a ? 100 : 50;
                this._numOfLinesMeter.textField.text = b + " " + h.TextManager.getInstance().getText("linesCoinsText")
            }, b.prototype.setBalanceMeter = function() {
                this._assetManager.getAsset("promoFSMeter").visible = !1, this._balanceMeter = new e.LabeledTextFieldController(this._assetManager.getAsset("balanceMeter")), this._balanceMeter.init(), this._balanceMeter.textFormatter = new n.CurrencyTextFormatter({
                    denomination: 1
                }), this._balanceMeter.label = h.TextManager.getInstance().getText("balance")
            }, b.prototype.setPromoFreeSpinMeter = function(a) {
                this._assetManager.getAsset("balanceMeter").visible = !1, this._promoFSMeter = new e.LabeledTextFieldController(this._assetManager.getAsset("promoFSMeter")), this._promoFSMeter.init(), this._promoFSMeter.label = h.TextManager.getInstance().getText("freeSpins");
                var b = a.gameLogicResponse.promotionalFreeSpin.count.toString();
                this.updatePromoFS(b), this.setPromoFSCount(a)
            }, b.prototype.setWinMeter = function() {
                this._winMeter = new e.LabeledTextFieldController(this._assetManager.getAsset("winMeter")), this._winMeter.init(), this._winMeter.setAutoCache(!1), this._winMeter.label = h.TextManager.getInstance().getText("win")
            }, b.prototype.setDenomination = function(a) {
                null != a && null != a.paytableResponse && null != a.paytableResponse.denominationList && a.paytableResponse.denominationList.length > 0 && (this._denomination = a.paytableResponse.denominationList[0].value)
            }, b.prototype.setPlaqueController = function(a) {
                this._plaqueController.init(a)
            }, b.prototype.setRollup = function() {
                this._rollup = new j.RollupIncrementer, this._rollup.denomination = this._denomination, this._rollup.updateSteps(this._totalBet), this._rollup.textField = this._winMeter
            }, b.prototype.skipRollup = function() {
                this.hasPayout() && this._rollup.stopSequence(!0)
            }, b.prototype.setRollupSequence = function() {
                this.hasPayout() && (this._rollup.targetValue = this._payout, this.calculateThreshold(), this._rollup.updateSteps(this._betControls.betManager.totalBet), this._rollup.addEventListener(k.sequencers.SEQUENCE_END, this.onRollupComplete, this), this._rollup.addEventListener(k.sequencers.SEQUENCE_START, this.onRollupStart, this))
            }, b.prototype.onRollupStart = function(a) {
                this._rollup.removeEventListener(k.sequencers.SEQUENCE_START, this.onRollupStart, this), u.AudioPlayer.playSound("onRollUp" + this._rollupIndex + "Start")
            }, b.prototype.onRollupComplete = function(a) {
                this._rollup.removeEventListener(k.sequencers.SEQUENCE_END, this.onRollupComplete, this), u.AudioPlayer.playSound("onRollUp" + this._rollupIndex + "End")
            }, Object.defineProperty(b.prototype, "rollup", {
                get: function() {
                    return this._rollup
                },
                enumerable: !0,
                configurable: !0
            }), b.prototype.calculateThreshold = function() {
                this.thresholdReached(1e3, b.BIG_WIN_MULTIPLIER) ? this._rollupIndex = 2 : this.thresholdReached(100, b.MID_WIN_MULTIPLIER) ? this._rollupIndex = 1 : this._rollupIndex = 0
            }, b.prototype.thresholdReached = function(a, b) {
                return this._payout >= a && this._payout >= this._totalBet * b
            }, b.prototype.onBalanceChange = function(a) {
                this.updateBalance(a.data)
            }, b.prototype.updateBalance = function(a) {
                this._totalBalance = a, null != this._balanceMeter && this._balanceMeter.setText(this._totalBalance.toString())
            }, b.prototype.updatePromoFS = function(a) {
                this._promoFSMeter.setText(a)
            }, b.prototype.setPromoFSCount = function(a) {
                this._promoFSCount = a.gameLogicResponse.promotionalFreeSpin.count
            }, b.prototype.updateTotalBet = function() {
                this._totalBet = r.BetManager.getInstance().totalBet, this.updateTotalBetFieldMobile(this.formatValue(this._totalBet, this._denomination))
            }, b.prototype.updateTotalBetFieldMobile = function(a) {
                null != this._totalBetMeterMobile && this._totalBetMeterMobile.setText(a)
            }, b.prototype.checkInsufficientFunds = function() {
                r.BetManager.getInstance().insufficientFunds && this.autoSpinIsActive() && (this._autoPlayButton.state = i.AutoPlayButtonState.Play, this.dispatchEvent(new c.events.Event(b.AUTO_PLAY_STOP_CLICK, null, this))), this.autoSpinIsActive() || this._mobileBetControl.isOpen || this.updateState()
            }, b.prototype.updateWin = function(a) {
                this.setPayout(a), this.updateWinField(this.formatValue(this._payout, this._denomination))
            }, b.prototype.resetWin = function() {
                this.updateWinField("")
            }, b.prototype.updateWinField = function(a) {
                this._winMeter.setText(a)
            }, b.prototype.onBetLineValueChange = function(a) {
                this.dispatchEvent(new c.events.Event(f.GenericStepperController.VALUE_CHANGE, null, this)), this.updateTotalBet(), this._rollup.updateSteps(this._totalBet), this.checkInsufficientFunds()
            }, b.prototype.setPayout = function(a) {
                b.payoutExists(a) ? this._payout = a.gameLogicResponse.prizeOutcomes.getValue("Game.Total").pay : this._payout = 0
            }, b.prototype.hasPayout = function() {
                return this._payout > 0
            }, b.payoutExists = function(a) {
                return !!a.gameLogicResponse.prizeOutcomes.nElements
            }, b.prototype.handleAutoPlayEnd = function() {
                this._autoPlayButton.handleAutoPlaySpinEnd()
            }, b.prototype.autoSpinIsActive = function() {
                return this._autoPlayButton.state == i.AutoPlayButtonState.Stop
            }, Object.defineProperty(b.prototype, "promoFSCount", {
                get: function() {
                    return this._promoFSCount
                },
                enumerable: !0,
                configurable: !0
            }), Object.defineProperty(b.prototype, "state", {
                get: function() {
                    return this._state
                },
                set: function(a) {
                    this._state != a && (this._state = a, this.updateState())
                },
                enumerable: !0,
                configurable: !0
            }), b.prototype.updateState = function() {
                switch (this._state) {
                    case v.Idle:
                        this._playButton.state = d.PlayButtonState.Spin, this._playButton.enable = !r.BetManager.getInstance().insufficientFunds, this._playButton.sendReceiveEnable = !1, this._betControls.enabled = !this.autoSpinIsActive(), this._mobileBetControl.enable = !0, this._consoleProxy.enableBetControlConsole(), this._autoPlayButton.handleAutoPlaySpinEnd(), this._autoPlayButton.enable = !r.BetManager.getInstance().insufficientFunds, this._bubbleBoostButton.enableButton(!0);
                        break;
                    case v.Rollup:
                        this._playButton.enable = this._skipEnable, this._playButton.state = d.PlayButtonState.Skip, this._betControls.enabled = !1, this._mobileBetControl.enable = !1, this._consoleProxy.disableControlConsole(), this._playButton.sendReceiveEnable = !1, this._bubbleBoostButton.enableButton(!1);
                        break;
                    case v.Spinning:
                        this._playButton.state = d.PlayButtonState.Spin, this._playButton.enable = !1, this._playButton.sendReceiveEnable = !0, this._betControls.enabled = !1, this._mobileBetControl.enable = !1, this._consoleProxy.disableControlConsole(), this._autoPlayButton.handleAutoPlaySpinStart(), this._bubbleBoostButton.enableButton(!1);
                        break;
                    case v.AutoSpinIdle:
                        this._playButton.enable = !0, this._playButton.state = d.PlayButtonState.Spin, this._consoleProxy.disableControlConsole(), this._mobileBetControl.enable = !1, this._playButton.sendReceiveEnable = !1, this._autoPlayButton.handleAutoPlaySpinEnd(), this._bubbleBoostButton.enableButton(!1);
                        break;
                    case v.Resolving:
                        this._playButton.state = d.PlayButtonState.Spin, this._playButton.enable = !1, this._playButton.sendReceiveEnable = !1, this._betControls.enabled = !1, this._mobileBetControl.enable = !1, this._consoleProxy.disableControlConsole();
                        break;
                    case v.BonusIdle:
                        this._playButton.state = d.PlayButtonState.Start, this._playButton.enable = !0, this._consoleProxy.disableControlConsole(), this._mobileBetControl.enable = !1, this._playButton.sendReceiveEnable = !1, this._autoPlayButton.state = i.AutoPlayButtonState.Spin, this._autoPlayButton.enable = !1, this._autoPlayButton.autoPlaySpinning = !1, this._bubbleBoostButton.enableButton(!1);
                        break;
                    case v.BonusTransition:
                        this._playButton.state = d.PlayButtonState.Start, this._playButton.enable = !1, this._consoleProxy.disableControlConsole(), this._mobileBetControl.enable = !1, this._playButton.sendReceiveEnable = !1, this._bubbleBoostButton.enableButton(!1);
                        break;
                    case v.Disable:
                        this._playButton.state = d.PlayButtonState.Spin, this._playButton.enable = !1, this._consoleProxy.disableControlConsole(), this._mobileBetControl.enable = !1, this._playButton.sendReceiveEnable = !1, this._autoPlayButton.state = i.AutoPlayButtonState.Spin, this._autoPlayButton.enable = !1, this._autoPlayButton.autoPlaySpinning = !1, this._bubbleBoostButton.enableButton(!1)
                }
            }, Object.defineProperty(b.prototype, "skipEnable", {
                set: function(a) {
                    this._skipEnable != a && (this._skipEnable = a, this.updateState())
                },
                enumerable: !0,
                configurable: !0
            }), b.prototype.onSkipButtonClick = function(a) {
                this.dispatchEvent(new c.events.Event(b.SKIP_BUTTON_CLICK, null, this))
            }, b.prototype.onStartButtonClick = function(a) {
                this.dispatchEvent(new c.events.Event(b.START_BUTTON_CLICK, null, this))
            }, b.prototype.onSpinButtonClick = function(a) {
                this._isMaxStep ? u.AudioPlayer.playSound("ControlsButtonMaxLineSpin") : u.AudioPlayer.playSound("ControlsButtonSpin"), this.dispatchEvent(new c.events.Event(b.SPIN_BUTTON_CLICK, null, this))
            }, b.prototype.onAutoPlayButtonClick = function(a) {
                u.AudioPlayer.playSound("ControlsButtonAutoPlayOpen"), this.dispatchEvent(new c.events.Event(b.AUTO_PLAY_CLICK, null, this)), this._betControls.enabled = !1
            }, b.prototype.onAutoPlayChoicesClick = function(a) {
                u.AudioPlayer.playSound("ControlsButtonAutoPlaySelect"), this.dispatchEvent(new c.events.Event(b.AUTO_PLAY_CHOICES_CLICK, null, this))
            }, b.prototype.onAutoPlayStopButtonClick = function(a) {
                u.AudioPlayer.playSound("ControlsButtonAutoPlayClose"), this.dispatchEvent(new c.events.Event(b.AUTO_PLAY_STOP_CLICK, null, this)), this.checkInsufficientFunds()
            }, b.prototype.onAutoPlayChoicesCancelClick = function(a) {
                this.dispatchEvent(new c.events.Event(b.AUTO_PLAY_CHOICES_CANCEL_CLICK, null, this))
            }, b.prototype.formatValue = function(a, b) {
                return void 0 === b && (b = this._denomination), s.CurrencyFormatter.getInstance().format(a, b)
            }, b.prototype.getCurrentBubbleBoostButtonState = function() {
                return this._bubbleBoostButton.curButtonState
            }, Object.defineProperty(b.prototype, "bubbleBoostButton", {
                get: function() {
                    return this._bubbleBoostButton
                },
                enumerable: !0,
                configurable: !0
            }), b.prototype.addEventListeners = function() {
                this._playButton.addEventListener(d.PlayButtonController.SKIP_BUTTON_CLICK, this.onSkipButtonClick, this), this._playButton.addEventListener(d.PlayButtonController.SPIN_BUTTON_CLICK, this.onSpinButtonClick, this), this._playButton.addEventListener(d.PlayButtonController.START_BUTTON_CLICK, this.onStartButtonClick, this), this._autoPlayButton.addEventListener(i.AutoPlayButtonController.AUTO_PLAY_BUTTON_CLICK, this.onAutoPlayButtonClick, this), this._autoPlayButton.addEventListener(i.AutoPlayButtonController.AUTO_PLAY_CHOICES_BUTTON_CLICK, this.onAutoPlayChoicesClick, this), this._autoPlayButton.addEventListener(i.AutoPlayButtonController.AUTO_PLAY_STOP_BUTTON_CLICK, this.onAutoPlayStopButtonClick, this), this._autoPlayButton.addEventListener(i.AutoPlayButtonController.AUTO_PLAY_CHOICES_CANCEL_CLICK, this.onAutoPlayChoicesCancelClick, this), this._mobileBetControl.addEventListener(m.MobileBetControls.MOBILE_BET_CONTROLS_OPEN, this.onMobileBetControlsOpen, this), this._mobileBetControl.addEventListener(m.MobileBetControls.MOBILE_BET_CONTROLS_CLOSE, this.onMobileBetControlsClose, this), this._bubbleBoostButton.hasEventListener(t.BubbleBoostButton.BUBBLE_BOOST_BUTTON_CLICKED, this.onBubbleBoostButtonClicked, this) || this._bubbleBoostButton.addEventListener(t.BubbleBoostButton.BUBBLE_BOOST_BUTTON_CLICKED, this.onBubbleBoostButtonClicked, this), this.hasEventListener(b.BUBBLE_BOOST_CHANGE, this.onBubbleBoostChange, this) || this.addEventListener(b.BUBBLE_BOOST_CHANGE, this.onBubbleBoostChange, this)
            }, b.prototype.removeEventListeners = function() {
                this._playButton.removeEventListener(d.PlayButtonController.SKIP_BUTTON_CLICK, this.onSkipButtonClick, this), this._playButton.removeEventListener(d.PlayButtonController.SPIN_BUTTON_CLICK, this.onSpinButtonClick, this), this._playButton.removeEventListener(d.PlayButtonController.START_BUTTON_CLICK, this.onStartButtonClick, this), this._autoPlayButton.removeEventListener(i.AutoPlayButtonController.AUTO_PLAY_BUTTON_CLICK, this.onAutoPlayButtonClick, this), this._autoPlayButton.removeEventListener(i.AutoPlayButtonController.AUTO_PLAY_CHOICES_BUTTON_CLICK, this.onAutoPlayChoicesClick, this), this._autoPlayButton.removeEventListener(i.AutoPlayButtonController.AUTO_PLAY_STOP_BUTTON_CLICK, this.onAutoPlayStopButtonClick, this), this._autoPlayButton.removeEventListener(i.AutoPlayButtonController.AUTO_PLAY_CHOICES_CANCEL_CLICK, this.onAutoPlayChoicesCancelClick, this), this._mobileBetControl.removeEventListener(m.MobileBetControls.MOBILE_BET_CONTROLS_OPEN, this.onMobileBetControlsOpen, this), this._mobileBetControl.removeEventListener(m.MobileBetControls.MOBILE_BET_CONTROLS_CLOSE, this.onMobileBetControlsClose, this), this._bubbleBoostButton.removeEventListener(t.BubbleBoostButton.BUBBLE_BOOST_BUTTON_CLICKED, this.onBubbleBoostButtonClicked, this), this.removeEventListener(b.BUBBLE_BOOST_CHANGE, this.onBubbleBoostChange, this)
            }, b.prototype.addBusListeners = function() {}, b.prototype.removeBusListeners = function() {}, b
        }(c.events.EventDispatcher);
        w.BUBBLE_BOOST_CHANGE = "BubbleBoostChange", w.SPIN_BUTTON_CLICK = "BaseGameControlsViewSpinClick", w.SKIP_BUTTON_CLICK = "BaseGameControlsViewSkipClick", w.START_BUTTON_CLICK = "BaseGameControlsViewStartClick", w.AUTO_PLAY_CLICK = "BaseGameControlsViewAutoPlayClick", w.AUTO_PLAY_CHOICES_CLICK = "BaseGameControlsViewAutoPlayChoicesClick", w.AUTO_PLAY_STOP_CLICK = "BaseGameControlsViewAutoPlayStopClick", w.AUTO_PLAY_CHOICES_CANCEL_CLICK = "BaseGameControlsViewAutoPlayCancelClick", w.BIG_WIN_MULTIPLIER = 10, w.MID_WIN_MULTIPLIER = 5, b.BaseControlsView = w
    }), define("common/wincycle/WinCycleHelper", ["require", "exports"], function(a, b) {
        "use strict";
        var c = function() {
            function a() {}
            return a.prototype.setHighlightOutcomes = function(a) {
                this._highlightOutcomes = a.gameLogicResponse.highlightOutcomes
            }, a.prototype.getHighlightOutcomes = function() {
                return this._highlightOutcomes
            }, a.prototype.setPrizeOutcomes = function(a) {
                this._prizeOutcomes = a.gameLogicResponse.prizeOutcomes
            }, a.prototype.getPrizeOutcomes = function() {
                return this._prizeOutcomes
            }, Object.defineProperty(a.prototype, "prizeNames", {
                get: function() {
                    return this._prizeNames
                },
                set: function(a) {
                    this._prizeNames = a
                },
                enumerable: !0,
                configurable: !0
            }), a.prototype.getOutcomePrizes = function(a, b) {
                void 0 === b && (b = this._prizeNames), this.getPrizes(a, b), this._outcomePrizes = [];
                for (var c in this._prizeOutcome)
                    for (var d in this._prizeOutcome[c].prizes) this._outcomePrizes.push(this._prizeOutcome[c].prizes[d]);
                return this._outcomePrizes
            }, a.prototype.getPrizes = function(a, b) {
                void 0 === b && (b = this._prizeNames), this._prizeOutcome = [], this.setPrizeOutcomes(a);
                for (var c = 0, d = b; c < d.length; c++) {
                    var e = d[c];
                    this._prizeOutcome.push(this._prizeOutcomes.getValue(e))
                }
                return this._prizeOutcome
            }, a.prototype.getOutcomeHighlights = function(a, b) {
                void 0 === b && (b = this._prizeNames), this.getHighlights(a, b), this._outcomeHighlights = [];
                for (var c in this._highlightOutcome)
                    if (null != this._highlightOutcome[c])
                        for (var d in this._highlightOutcome[c].highlights) this._outcomeHighlights.push(this._highlightOutcome[c].highlights[d]);
                return this._outcomeHighlights
            }, a.prototype.getHighlights = function(a, b) {
                void 0 === b && (b = this._prizeNames), this._highlightOutcome = [], this.setHighlightOutcomes(a);
                for (var c = 0, d = b; c < d.length; c++) {
                    var e = d[c];
                    this._highlightOutcome.push(this._highlightOutcomes.getValue(e))
                }
                return this._highlightOutcome
            }, a.prototype.hasPrize = function() {
                for (var a in this._prizeOutcome)
                    if (this._prizeOutcome[a].pay > 0) return !0;
                return !1
            }, a.prototype.hasBonusTrigger = function() {
                for (var a = 0, b = this._highlightPrizeOutcomes; a < b.length; a++) {
                    var c = b[a];
                    if ("Scatter" == c.name && c.symbolCount > 2) return !0
                }
                return !1
            }, a.prototype.getHighlightPrizeOutcome = function(a, b) {
                this._highlightPrizeOutcomes = [];
                for (var c = 0; c < a.length; c++)
                    for (var e = a[c], f = 0, g = b; f < g.length; f++) {
                        var h = g[f];
                        if (h.name == e.name) {
                            var i = new d;
                            i.name = h.name, i.cells = e.cells, i.payName = h.payName, i.multiplier = h.multiplier, i.betMultiplier = h.betMultiplier, i.pay = h.pay, i.totalPay = h.totalPay, i.symbolCount = h.symbolCount, i.position = h.position, i.ways = h.ways, this._highlightPrizeOutcomes.push(i);
                            break
                        }
                    }
                return this._highlightPrizeOutcomes
            }, a.prototype.sortHighlightPrizeOutcome = function(a) {
                void 0 === a && (a = !0), a ? this._highlightPrizeOutcomes.sort(function(a, b) {
                    return b.pay - a.pay
                }) : this._highlightPrizeOutcomes.sort(function(a, b) {
                    return a.pay - b.pay
                })
            }, a.prototype.prioritizePrize = function(a) {
                for (var b = 0, c = this._highlightPrizeOutcomes; b < c.length; b++) {
                    var d = c[b];
                    d.name == a && (this._highlightPrizeOutcomes.splice(this._highlightPrizeOutcomes.indexOf(d), 1), this._highlightPrizeOutcomes.unshift(d))
                }
            }, a
        }();
        b.WinCycleHelper = c;
        var d = function() {
            function a() {}
            return a
        }();
        b.HighlightPrizeOutcome = d
    }), define("common/wincycle/SymbolLocPair", ["require", "exports"], function(a, b) {
        "use strict";
        var c = function() {
            function a(a, b) {
                this._symbolID = a, this._cellName = b
            }
            return Object.defineProperty(a.prototype, "symbolID", {
                get: function() {
                    return this._symbolID
                },
                enumerable: !0,
                configurable: !0
            }), Object.defineProperty(a.prototype, "cellName", {
                get: function() {
                    return this._cellName
                },
                enumerable: !0,
                configurable: !0
            }), a
        }();
        b.SymbolLocPair = c
    }),
    define("common/wincycle/WinCycle", ["require", "exports", "wcgf/vendors/typescript_collections/Dictionary", "wcgf/gameComponents/PaylinesController", "wcgf/gameComponents/WinBoxesController", "wcgf/gameComponents/OnSymbolWinController", "wcgf/core/events", "wcgf/sequencers/ISequenceItem", "wcgf/sequencers/LinearSequencer", "wcgf/sequencers/ParallelSequencer", "wcgf/sequencers/TimerEventSequenceItem", "common/wincycle/SymbolLocPair"], function(a, b, c, d, e, f, g, h, i, j, k, l) {
        "use strict";
        var m = function(a) {
            function b(b) {
                var c = a.call(this) || this;
                return c._lastIndex = 0, c._firstCycleDone = !1, c._firstCycleHit = !1, c._totalpayout = 0, c._bonusPayout = 0, c._hasBonusWinSequence = !1, c._isSequenceDone = !1, c._isSequenceEnded = !1, c._isSequenceStarted = !1, c._payLinesController = new d.PaylinesController, c._winBoxController = new e.WinBoxesController, c._onSymbolWinController = new f.OnSymbolWinController, c._reelSet = b, c._storedSymbols = [], c
            }
            return __extends(b, a), b.prototype.init = function(a) {
                this._payLinesController.init(), this._winBoxController.init(), this._winBoxController.animateWinBoxes = !0, this._onSymbolWinController.init(a)
            }, b.prototype.setHighlights = function(a) {
                this._outcomeHighlightPrizes = a;
                var d = [];
                this._lastIndex = this._outcomeHighlightPrizes.length - 1, this._firstCycleDone = !1, this._firstCycleHit = !1;
                for (var e = 0; e < this._outcomeHighlightPrizes.length; e++) {
                    var f = this._outcomeHighlightPrizes[e],
                        g = new c.default;
                    g = b.getCellAnims(f);
                    var h = new j.ParallelSequencer(this.getSymbolSequences(g)),
                        l = new k.TimerEventSequenceItem(0, this.showWin, [{
                            index: e
                        }], this),
                        m = new k.TimerEventSequenceItem(0, this.hideWins, [e], this),
                        n = new k.TimerEventSequenceItem(300);
                    d.push(l, h, m, n)
                }
                this._winSequencer = new i.LinearSequencer(d, 0)
            }, b.prototype.setBonusHighlights = function(a) {
                this._outcomeHighlightPrizes = a;
                var d = [],
                    e = [];
                this._lastIndex = this._outcomeHighlightPrizes.length - 1, this._firstCycleDone = !1, this._firstCycleHit = !1, this._hasBonusWinSequence = !0;
                for (var f = 0; f < this._outcomeHighlightPrizes.length; f++) {
                    var g = this._outcomeHighlightPrizes[f];
                    if ("Scatter" == g.name) {
                        var h = new c.default;
                        h = b.getCellAnims(g);
                        var l = new j.ParallelSequencer(this.getSymbolSequences(h)),
                            m = new k.TimerEventSequenceItem(300);
                        d.push(l, m), h = b.getCellAnims(g);
                        var n = new j.ParallelSequencer(this.getSymbolSequences(h));
                        e.push(n)
                    }
                }
                var o = new i.LinearSequencer(e, 1),
                    p = new i.LinearSequencer(d, 0),
                    q = [];
                q.push(o, p), this._winSequencer = new i.LinearSequencer(q, 1)
            }, b.getCellAnims = function(a) {
                for (var b = new c.default, d = 0, e = a.cells; d < e.length; d++) {
                    var f = e[d];
                    b.setValue(f.name, "win")
                }
                return b
            }, b.prototype.getSymbolSequences = function(a) {
                var b = [];
                return this._reelSet.reels.forEach(function(c, d) {
                    for (var e = 0, f = d.currentSymbols; e < f.length; e++) {
                        var g = f[e];
                        a.containsKey(g.cellName) && b.push(g.getSymbolSequenceItem(a.getValue(g.cellName), 1))
                    }
                }), b
            }, b.prototype.setPayout = function(a, b) {
                if (this._totalpayout = "BaseGame" == b ? a.gameLogicResponse.prizeOutcomes.getValue("Game.Total").pay : a.gameLogicResponse.prizeOutcomes.getValue("FreeSpin.Total").pay, null != a.gameLogicResponse.prizeOutcomes.getValue("FreeSpin.Total")) {
                    var c = a.gameLogicResponse.prizeOutcomes.getValue("FreeSpin.Total").pay;
                    this._bonusPayout = !isNaN(c) && c > 0 ? c : 0
                } else this._bonusPayout = 0;
                this._storedSymbols.length = 0
            }, b.prototype.showWin = function(a) {
                this._storedSymbols.length > 0 && (this.replaceBonusSymbolsAtLocsWithOriginalSymbols(), this._storedSymbols.length = 0);
                for (var b, c = [], d = 0, e = a; d < e.length; d++) {
                    var f = e[d],
                        g = f.index;
                    g != this._lastIndex || this._firstCycleHit || (this._firstCycleDone = !0);
                    for (var h = this._outcomeHighlightPrizes[g], i = 0, j = h.cells; i < j.length; i++) {
                        var k = j[i];
                        c.push(k.name)
                    }
                    var l = h.name.replace(/\s/g, "");
                    "Line" == l.substring(0, 4) && this._payLinesController.showLine(l, null, c), "Scatter" == h.name && h.symbolCount > 2 ? (b = 0 != this._bonusPayout ? this._bonusPayout : this._totalpayout, this.storeCurrentSymbolsAtLocs(c), this.replaceSymbolsAtLocsWithBonusSymbols()) : b = h.totalPay
                }
                this._winBoxController.showWinBoxes(c), this._onSymbolWinController.showOnSymbolWin(c, b)
            }, b.prototype.storeCurrentSymbolsAtLocs = function(a) {
                this._storedSymbols.length = 0;
                for (var b, c, d = 0, e = a; d < e.length; d++) {
                    var f = e[d];
                    b = parseInt(f.charAt(f.indexOf("C") + 1)), c = this._reelSet.reels.getValue("Reel" + b);
                    for (var g = 0, h = c.currentSymbols; g < h.length; g++) {
                        var i = h[g];
                        i.cellName == f && this._storedSymbols.push(new l.SymbolLocPair(i.symbolId, f))
                    }
                }
                return this._storedSymbols.length
            }, b.prototype.replaceSymbolsAtLocsWithBonusSymbols = function() {
                for (var a, b, c = 0, d = this._storedSymbols; c < d.length; c++) {
                    var e = d[c];
                    a = parseInt(e.cellName.charAt(e.cellName.indexOf("C") + 1)), b = this._reelSet.reels.getValue("Reel" + a);
                    for (var f = 0, g = b.currentSymbols; f < g.length; f++) {
                        var h = g[f];
                        h.cellName == e.cellName && h.swap("b01")
                    }
                }
            }, b.prototype.replaceBonusSymbolsAtLocsWithOriginalSymbols = function() {
                for (var a, b, c = 0, d = this._storedSymbols; c < d.length; c++) {
                    var e = d[c];
                    a = parseInt(e.cellName.charAt(e.cellName.indexOf("C") + 1)), b = this._reelSet.reels.getValue("Reel" + a);
                    for (var f = 0, g = b.currentSymbols; f < g.length; f++) {
                        var h = g[f];
                        h.cellName == e.cellName && h.swap(e.symbolID)
                    }
                }
            }, b.prototype.hideWins = function(a) {
                for (var b = 0, c = a; b < c.length; b++) {
                    var d = c[b],
                        e = this._outcomeHighlightPrizes[d],
                        f = e.name.replace(/\s/g, "");
                    "Line" == f.substring(0, 4) && this._payLinesController.hideLine(f)
                }
                this._winBoxController.hideAllWinBoxes(), this._onSymbolWinController.hideOnSymbolWin(), this.handleFirstCycleDone()
            }, b.prototype.hideAllWins = function() {
                for (var a = [], b = 0; b < this._outcomeHighlightPrizes.length; b++) a.push(b);
                this.hideWins(a)
            }, b.prototype.handleFirstCycleDone = function() {
                this._firstCycleDone && (this._firstCycleDone = !1, this._firstCycleHit = !0, this.dispatchEvent(new g.events.Event(b.FIRST_CYCLE_DONE, null, this)))
            }, b.prototype.onSequenceDone = function(a) {
                this._winSequencer.removeEventListener(h.sequencers.SEQUENCE_END, this.onSequenceDone, this), this._hasBonusWinSequence ? this._hasBonusWinSequence = !1 : this.hideAllWins(), this.dispatchEndEvents()
            }, b.prototype.dispatchEndEvents = function() {
                this.isSequenceDone || (this._isSequenceDone = !0, this.dispatchEvent(new g.events.Event(h.sequencers.SEQUENCE_DONE, null, this))), this._isSequenceStarted = !1, this.isSequenceEnded || (this._isSequenceEnded = !0, this.dispatchEvent(new g.events.Event(h.sequencers.SEQUENCE_END, null, this)))
            }, b.prototype.startSequence = function(a) {
                void 0 === a && (a = !1), !a && this._isSequenceStarted || (this.resetSequence(), this._isSequenceStarted = !0, this.dispatchEvent(new g.events.Event(h.sequencers.SEQUENCE_START, null, this)), null != this._winSequencer ? (this._winSequencer.addEventListener(h.sequencers.SEQUENCE_END, this.onSequenceDone, this), this._winSequencer.startSequence(a)) : this.dispatchEndEvents())
            }, b.prototype.resetSequence = function() {
                this._isSequenceDone = !1, this._isSequenceEnded = !1, this._isSequenceStarted = !1, null != this._winSequencer && this._winSequencer.resetSequence()
            }, b.prototype.stopSequence = function(a) {
                void 0 === a && (a = !1), null != this._winSequencer && this._winSequencer.stopSequence(a)
            }, Object.defineProperty(b.prototype, "isSequenceDone", {
                get: function() {
                    return this._isSequenceDone
                },
                enumerable: !0,
                configurable: !0
            }), Object.defineProperty(b.prototype, "isSequenceEnded", {
                get: function() {
                    return this._isSequenceEnded
                },
                enumerable: !0,
                configurable: !0
            }), Object.defineProperty(b.prototype, "isSequenceStarted", {
                get: function() {
                    return this._isSequenceStarted
                },
                enumerable: !0,
                configurable: !0
            }), b
        }(g.events.EventDispatcher);
        m.FIRST_CYCLE_DONE = "WinCycleFirstCycleDone", b.WinCycle = m
    }), define("common/view/StageView", ["require", "exports", "wcgf/core/AssetManager", "wcgf/messageBus/GameMsgBus", "wcgf/coreComponents/GenericViewController", "wcgf/sounds/SoundManager"], function(a, b, c, d, e, f) {
        "use strict";
        var g = function(a) {
            function b(b, e, g) {
                var h = a.call(this, null) || this;
                return h.skinList = [], h._isInit = !1, h._enabled = !1, h.msgBus = d.GameMsgBus.getInstance(), h.assetManager = c.AssetManager.getInstance(), h.soundManager = f.SoundManager.getInstance(), h._clientConfigData = b, h.skin = h.assetManager.getSkin(e), h.stageName = g, h
            }
            return __extends(b, a), Object.defineProperty(b.prototype, "stageName", {
                get: function() {
                    return this._stageName
                },
                set: function(a) {
                    this._stageName = a
                },
                enumerable: !0,
                configurable: !0
            }), b.prototype.init = function(a) {
                this._isInit || (this._isInit = !0, this.doInit(a)), this.doAdditionalInit(a)
            }, b.prototype.doInit = function(a) {}, b.prototype.doAdditionalInit = function(a) {}, b.prototype.addToStage = function(a) {
                a.addChild(this.skin);
                for (var b = 0, c = this.skinList; b < c.length; b++) {
                    var d = c[b];
                    a.addChild(this.assetManager.getSkin(d))
                }
                this.enable = !0
            }, b.prototype.removeFromStage = function(a) {
                a.removeChild(this.skin);
                for (var b = 0, c = this.skinList; b < c.length; b++) {
                    var d = c[b];
                    a.removeChild(this.assetManager.getSkin(d))
                }
                this.enable = !1
            }, Object.defineProperty(b.prototype, "enable", {
                get: function() {
                    return this._enabled
                },
                set: function(a) {
                    this._enabled != a && (this._enabled = a, a ? this.addBusListeners() : this.removeBusListeners())
                },
                enumerable: !0,
                configurable: !0
            }), b.prototype.addBusListeners = function() {}, b.prototype.removeBusListeners = function() {}, b
        }(e.GenericViewController);
        b.StageView = g
    }), define("common/wincycle/LargeWinsController", ["require", "exports", "wcgf/gameComponents/BigWinController"], function(a, b, c) {
        "use strict";
        var d = function(a) {
            function b(d, e, f) {
                void 0 === e && (e = c.BigWinController.DEFAULT_BIG_WIN_MULTIPLIER), void 0 === f && (f = b.DEFAULT_LARGE_WIN_MULTIPLIER);
                var g = a.call(this, e) || this;
                return g._largeWinMultiplier = f, g._stage = d, g
            }
            return __extends(b, a), b.prototype.largeWinThresholdReached = function() {
                return this._payout >= this._rollupSequencer.totalBet * this._largeWinMultiplier
            }, b.prototype.setPayout = function(a) {
                if (this.payoutExists(a)) {
                    var b = a.gameLogicResponse.patternSliderInput.patternsBet,
                        c = a.gameLogicResponse.patternSliderInput.betPerPattern,
                        d = void 0;
                    this._rollupSequencer.updateSteps(b * c);
                    var e = "BaseGame" == this._stage ? "Game.Total" : "FreeSpin.Lines";
                    return d = a.gameLogicResponse.prizeOutcomes.getValue(e), void(this._payout = null != d ? d.pay : 0)
                }
                this._payout = 0
            }, b
        }(c.BigWinController);
        d.DEFAULT_LARGE_WIN_MULTIPLIER = 10, b.LargeWinsController = d
    }), define("common/wincycle/WinSequencer", ["require", "exports", "wcgf/sequencers/ISequenceItem", "wcgf/sequencers/LinearSequencer", "wcgf/sequencers/ParallelSequencer", "wcgf/core/events", "wcgf/coreComponents/MovieClipShaker", "wcgf/core/AssetManager", "wcgf/sequencers/TimerEventSequenceItem", "common/wincycle/WinCycleHelper", "common/wincycle/WinCycle", "common/wincycle/LargeWinsController"], function(a, b, c, d, e, f, g, h, i, j, k, l) {
        "use strict";
        var m = function(a) {
            function b(c, d) {
                var e = a.call(this) || this;
                return e._isSequenceDone = !1, e._isSequenceEnded = !1, e._isSequenceStarted = !1, e._stageName = d, e.largeWinsController = new l.LargeWinsController(e._stageName, b.OCEAN_MAGIC_MIN_BIG_WIN_MULTIPLIER), e._reelShaker = new g.MovieClipShaker(h.AssetManager.getInstance().getAsset("BaseGame" == e._stageName ? "ReelsContainer" : "FreeSpinReelsContainer")), e._winCycle = new k.WinCycle(c), e._winCycleHelper = new j.WinCycleHelper, e
            }
            return __extends(b, a), b.prototype.init = function(a, b) {
                this.largeWinsController.init(a), this.winCycle.init(a), this._reelShaker.init(), this._reelShaker.minX = 5, this._reelShaker.maxX = 5, this._reelShaker.minY = -10, this._reelShaker.maxY = 10, this._winCycleHelper.prizeNames = b
            }, b.prototype.setWinCelebration = function(a, b) {
                var f, g, h = [],
                    j = [],
                    k = [];
                if (this._winCycle.setHighlights(this._outcomeHighlightPrizes), this._winCycle.setPayout(a.data, this._stageName), this.largeWinsController.setPayout(a.data), "BaseGame" == this._stageName && this.largeWinsController.thresholdReached()) j.push(this.largeWinsController, b), f = new e.ParallelSequencer(j, 1), h.push(this._winCycle);
                else if (f = null, h.push(b, this._winCycle), this.largeWinsController.largeWinThresholdReached()) {
                    var l = new i.TimerEventSequenceItem(500);
                    l.addEventListener(c.sequencers.SEQUENCE_END, this.onTimer_complete, this), h.push(l, this._reelShaker)
                }
                g = new e.ParallelSequencer(h, 1), null != f && k.push(f), null != h && k.push(g), this._winCelebrationSequence = new d.LinearSequencer(k, 1)
            }, b.prototype.setBonusSequence = function() {
                var a = [];
                a.push(this._winCycle), this._winCycle.setBonusHighlights(this._outcomeHighlightPrizes), this._winCelebrationSequence = new d.LinearSequencer(a, 1)
            }, b.prototype.onTimer_complete = function(a) {
                a.target.removeEventListener(c.sequencers.SEQUENCE_END, this.onTimer_complete, this), this._reelShaker.stopSequence()
            }, b.prototype.skipSequence = function() {
                null != this.largeWinsController && this.largeWinsController.skipRollup()
            }, b.prototype.clearEvents = function() {
                null != this._winCelebrationSequence && (this._winCelebrationSequence.stopSequence(!0), this.resetSequence(), this._winCelebrationSequence = null)
            }, b.prototype.setWinOutcome = function(a) {
                this._outcomeHighlights = this._winCycleHelper.getOutcomeHighlights(a.data), this._outcomePrizes = this._winCycleHelper.getOutcomePrizes(a.data), this._outcomeHighlightPrizes = this._winCycleHelper.getHighlightPrizeOutcome(this._outcomeHighlights, this._outcomePrizes), this._winCycleHelper.sortHighlightPrizeOutcome(), this._winCycleHelper.prioritizePrize("Scatter")
            }, Object.defineProperty(b.prototype, "winCycle", {
                get: function() {
                    return this._winCycle
                },
                enumerable: !0,
                configurable: !0
            }), Object.defineProperty(b.prototype, "winCycleHelper", {
                get: function() {
                    return this._winCycleHelper
                },
                enumerable: !0,
                configurable: !0
            }), b.prototype.onSequenceDone = function(a) {
                this._winCelebrationSequence.removeEventListener(c.sequencers.SEQUENCE_END, this.onSequenceDone, this), this.dispatchEndEvents()
            }, b.prototype.dispatchEndEvents = function() {
                this.isSequenceDone || (this._isSequenceDone = !0, this.dispatchEvent(new f.events.Event(c.sequencers.SEQUENCE_DONE, null, this))), this._isSequenceStarted = !1, this.isSequenceEnded || (this._isSequenceEnded = !0, this.dispatchEvent(new f.events.Event(c.sequencers.SEQUENCE_END, null, this)))
            }, b.prototype.startSequence = function(a) {
                void 0 === a && (a = !1), !a && this._isSequenceStarted || (this.resetSequence(), this._isSequenceStarted = !0, this.dispatchEvent(new f.events.Event(c.sequencers.SEQUENCE_START, null, this)), null != this._winCelebrationSequence ? (this._winCelebrationSequence.addEventListener(c.sequencers.SEQUENCE_END, this.onSequenceDone, this), this._winCelebrationSequence.startSequence(a)) : this.dispatchEndEvents())
            }, b.prototype.resetSequence = function() {
                this._isSequenceEnded = !1, this._isSequenceDone = !1, this._isSequenceStarted = !1, null != this._winCelebrationSequence && this._winCelebrationSequence.resetSequence()
            }, b.prototype.stopSequence = function(a) {
                void 0 === a && (a = !1), null != this._winCelebrationSequence && (this._winCycle.stopSequence(a), this._winCelebrationSequence.stopSequence(a), this._winCelebrationSequence = null)
            }, Object.defineProperty(b.prototype, "isSequenceDone", {
                get: function() {
                    return this._isSequenceDone
                },
                enumerable: !0,
                configurable: !0
            }), Object.defineProperty(b.prototype, "isSequenceEnded", {
                get: function() {
                    return this._isSequenceEnded
                },
                enumerable: !0,
                configurable: !0
            }), Object.defineProperty(b.prototype, "isSequenceStarted", {
                get: function() {
                    return this._isSequenceStarted
                },
                enumerable: !0,
                configurable: !0
            }), b
        }(f.events.EventDispatcher);
        m.OCEAN_MAGIC_MIN_BIG_WIN_MULTIPLIER = 20, b.WinSequencer = m
    }), define("common/reels/SpinStrategy", ["require", "exports", "wcgf/gameComponents/reels/spinStrategies"], function(a, b, c) {
        "use strict";
        var d = function() {
            function a() {
                this.spinSpeed = 2, this.symbolPadding = 3, this.stopOffset = {
                    x: 0,
                    y: -100
                }, this.startOffset = {
                    x: 0,
                    y: 250
                }
            }
            return a.prototype.startSpin = function(a, b) {
                c.spinStrategies.quadIn(a, b, 200)
            }, a.prototype.stopSpin = function(a, b) {
                c.spinStrategies.elasticOut(a, b, 550)
            }, a
        }();
        b.SpinStrategy = d
    }), define("common/bubbleBoost/BubbleEntranceAnimsPlayer", ["require", "exports", "wcgf/gameComponents/MovieClipSequenceItem", "wcgf/core/events", "wcgf/core/AssetManager"], function(a, b, c, d, e) {
        "use strict";
        var f = function(a) {
            function b(b, c) {
                var d = a.call(this) || this;
                return d._gameChannel = b, d._stage = c, d._currentOrientation = e.AssetManager.LANDSCAPE_ORIENTATION, d._bubbleEntranceAnimsLandscape = [], d._bubbleEntranceAnimsPortrait = [], d._bubbleEntranceSequenceItems = [], d
            }
            return __extends(b, a), b.prototype.init = function(a, b, c, d) {
                this._assetManager = e.AssetManager.getInstance(), this._assetManager.addEventListener(e.AssetManager.ORIENTATION_CHANGE, this.onOrientationChange_BubbleEntranceAnimsPlayer, this), this._bubbleEntranceIntroAnimLandscape = a, this._bubbleEntranceIntroAnimPortrait = b, this._skinLandscape = c, this._skinPortrait = d, this.initBubbleEntranceAnims(), this.initBubbleEntranceSequenceItems()
            }, Object.defineProperty(b.prototype, "currentOrientationIndex", {
                get: function() {
                    return this._currentOrientation == e.AssetManager.LANDSCAPE_ORIENTATION ? 0 : 1
                },
                enumerable: !0,
                configurable: !0
            }), b.prototype.switchCurrentlyPlayingAnims = function() {
                var a, b, c = this;
                if (c._bubbleEntranceIntroSequenceItemPlaying) null != c._bubbleEntranceIntroSequenceItem && c._bubbleEntranceIntroSequenceItem.isSequenceStarted && !c._bubbleEntranceIntroSequenceItem.mc.paused && (a = c._bubbleEntranceIntroSequenceItem.mc.currentFrame, c._bubbleEntranceIntroSequenceItem.mc.stop(), b = 0 == c.currentOrientationIndex ? c._bubbleEntranceIntroAnimLandscape : c._bubbleEntranceIntroAnimPortrait, b.gotoAndStop(a), c._bubbleEntranceIntroSequenceItem.mc = b, c._bubbleEntranceIntroSequenceItem.mc.visible = !0, c._bubbleEntranceIntroSequenceItem.mc.play());
                else
                    for (var d = 0; d < c._bubbleEntranceSequenceItems.length; d++)
                        for (var e = 0; e < c._bubbleEntranceSequenceItems[d].length; e++) null != c._bubbleEntranceSequenceItems[d][e] && c._bubbleEntranceSequenceItems[d][e].isSequenceStarted && !c._bubbleEntranceSequenceItems[d][e].mc.paused && (a = c._bubbleEntranceSequenceItems[d][e].mc.currentFrame, c._bubbleEntranceSequenceItems[d][e].mc.stop(), b = 0 == c.currentOrientationIndex ? c._bubbleEntranceAnimsLandscape[d][e] : c._bubbleEntranceAnimsPortrait[d][e], b.gotoAndStop(a), c._bubbleEntranceSequenceItems[d][e].mc = b, c._bubbleEntranceSequenceItems[d][e].mc.visible = !0, c._bubbleEntranceSequenceItems[d][e].mc.play())
            }, b.prototype.hideOldAnimsOnOrientationChange = function(a) {
                var b = this;
                if (a != e.AssetManager.PORTRAIT_ORIENTATION || null != b._skinPortrait) {
                    var c = a == e.AssetManager.LANDSCAPE_ORIENTATION ? b._bubbleEntranceIntroAnimLandscape : b._bubbleEntranceIntroAnimPortrait;
                    c.visible = !1, c.gotoAndStop("off");
                    for (var d = a == e.AssetManager.LANDSCAPE_ORIENTATION ? b._bubbleEntranceAnimsLandscape : b._bubbleEntranceAnimsPortrait, f = 0; f < d.length; f++)
                        for (var g = 1; g < d[f].length; g++) d[f][g].visible = !1, d[f][g].gotoAndStop("off")
                }
            }, b.prototype.playEntranceIntroAnim = function() {
                this.createBubbleEntranceIntroSequenceItem(), this._bubbleEntranceIntroSequenceItem.addEventListener("SequencerSequenceDone", this.handleBubbleEntranceIntroSequenceItem, this), this._bubbleEntranceIntroSequenceItem.mc.visible = !0, this._bubbleEntranceIntroSequenceItem.startSequence(), this._bubbleEntranceIntroSequenceItemPlaying = !0
            }, b.prototype.playEntranceAnimsAtLocs = function(a) {
                var c;
                this._longestBubbleEntranceAnimForSequence = this.getFurthestBubbleEntranceAnimLoc(a), null != this._bubbleEntranceIntroSequenceItem && (this._bubbleEntranceIntroSequenceItem.mc.visible = !1, this._bubbleEntranceIntroSequenceItem.mc.gotoAndStop("off"));
                for (var d = 0; d < a.length; d++)
                    for (var e = 0; e < a[d].length; e++) c = a[d][e], this.createBubbleEntranceSequenceItem(d, c), d == this._longestBubbleEntranceAnimForSequence[0] && c == this._longestBubbleEntranceAnimForSequence[1] && this.addEventListener(b.ENTRANCE_BUBBLE_DONE, this.onEntranceBubbleAnimsDone, this), this.playBubbleEntranceSequenceItem(d, c)
            }, b.prototype.getFurthestBubbleEntranceAnimLoc = function(a) {
                for (var c, d = 0, e = 0, f = b.NUM_COLS - 1, g = b.NUM_ROWS, h = 0, i = [], j = 0; j < a.length; j++)
                    for (var k = 0; k < a[j].length; k++) d = j, e = a[j][k], c = 0 == this.currentOrientationIndex ? this._bubbleEntranceAnimsLandscape[d][e] : this._bubbleEntranceAnimsPortrait[d][e], h < c.totalFrames && (f = d, g = e, h = c.totalFrames);
                return i.push(f, g), i
            }, b.prototype.hideAllBubbleEntranceAnims = function() {
                null != this._bubbleEntranceIntroAnimLandscape && (this._bubbleEntranceIntroAnimLandscape.gotoAndStop("off"), this._bubbleEntranceIntroAnimLandscape.visible = !1), null != this._bubbleEntranceIntroAnimPortrait && (this._bubbleEntranceIntroAnimPortrait.gotoAndStop("off"), this._bubbleEntranceIntroAnimPortrait.visible = !1);
                for (var a = 0; a < b.NUM_COLS; a++)
                    for (var c = 1; c <= b.NUM_ROWS; c++) null != this._bubbleEntranceAnimsLandscape[a][c] && (this._bubbleEntranceAnimsLandscape[a][c].gotoAndStop("off"), this._bubbleEntranceAnimsLandscape[a][c].visible = !1), null != this._bubbleEntranceAnimsPortrait[a][c] && (this._bubbleEntranceAnimsPortrait[a][c].gotoAndStop("off"), this._bubbleEntranceAnimsPortrait[a][c].visible = !1)
            }, b.prototype.stopAndDestroyAllBubbleEntranceSequenceItems = function() {
                null != this._bubbleEntranceIntroSequenceItem && (this._bubbleEntranceIntroSequenceItem.stopSequence(!0), this._bubbleEntranceIntroSequenceItem.removeEventListener("SequencerSequenceDone", this.handleBubbleEntranceIntroSequenceItem, this), this._bubbleEntranceIntroSequenceItem = null), this._bubbleEntranceIntroSequenceItemPlaying = !1;
                for (var a = 0; a < b.NUM_COLS; a++)
                    for (var c = 1; c <= b.NUM_ROWS; c++) null != this._bubbleEntranceSequenceItems[a][c] && (this._bubbleEntranceSequenceItems[a][c].stopSequence(!0), this._bubbleEntranceSequenceItems[a][c].removeEventListener("SequencerSequenceDone", this.handleBubbleEntranceSequenceItem, this), this._bubbleEntranceSequenceItems[a][c] = null)
            }, b.prototype.initBubbleEntranceAnims = function() {
                null != this._bubbleEntranceIntroAnimLandscape && (this._bubbleEntranceIntroAnimLandscape.gotoAndStop("off"), this._bubbleEntranceIntroAnimLandscape.visible = !1), null != this._bubbleEntranceIntroAnimPortrait && (this._bubbleEntranceIntroAnimPortrait.gotoAndStop("off"), this._bubbleEntranceIntroAnimPortrait.visible = !1);
                for (var a = 0; a < b.NUM_COLS; a++) {
                    this._bubbleEntranceAnimsLandscape[a] = [], this._bubbleEntranceAnimsPortrait[a] = [];
                    for (var c = 1; c <= b.NUM_ROWS; c++) null != this._skinLandscape["anim_" + a + "_" + c] && (this._bubbleEntranceAnimsLandscape[a][c] = this._skinLandscape["anim_" + a + "_" + c], this._bubbleEntranceAnimsLandscape[a][c].gotoAndStop("off"), this._bubbleEntranceAnimsLandscape[a][c].visible = !1), null != this._skinPortrait && null != this._skinPortrait["anim_" + a + "_" + c] && (this._bubbleEntranceAnimsPortrait[a][c] = this._skinPortrait["anim_" + a + "_" + c], this._bubbleEntranceAnimsPortrait[a][c].gotoAndStop("off"), this._bubbleEntranceAnimsPortrait[a][c].visible = !1)
                }
            }, b.prototype.initBubbleEntranceSequenceItems = function() {
                this._bubbleEntranceIntroSequenceItem = null, this._bubbleEntranceIntroSequenceItemPlaying = !1;
                for (var a = 0; a < b.NUM_COLS; a++) {
                    this._bubbleEntranceSequenceItems[a] = [];
                    for (var c = 1; c <= b.NUM_ROWS; c++) this._bubbleEntranceSequenceItems[a][c] = null
                }
            }, b.prototype.createBubbleEntranceIntroSequenceItem = function() {
                this._bubbleEntranceIntroSequenceItem = null, this._bubbleEntranceIntroSequenceItemPlaying = !1, this._currentOrientation == e.AssetManager.LANDSCAPE_ORIENTATION ? this._bubbleEntranceIntroSequenceItem = new c.MovieClipSequenceItem(this._bubbleEntranceIntroAnimLandscape, "play", "playDone", 1) : this._bubbleEntranceIntroSequenceItem = new c.MovieClipSequenceItem(this._bubbleEntranceIntroAnimPortrait, "play", "playDone", 1)
            }, b.prototype.handleBubbleEntranceIntroSequenceItem = function(a) {
                this._bubbleEntranceIntroSequenceItem.removeEventListener("SequencerSequenceDone", this.handleBubbleEntranceIntroSequenceItem, this), this._bubbleEntranceIntroSequenceItemPlaying = !1, this.dispatchEvent(new d.events.Event(b.ENTRANCE_INTRO_ANIM_DONE, null, this))
            }, b.prototype.createBubbleEntranceSequenceItem = function(a, b) {
                this._bubbleEntranceSequenceItems[a][b] = null;
                var d = 0 == this.currentOrientationIndex ? this._bubbleEntranceAnimsLandscape[a][b] : this._bubbleEntranceAnimsPortrait[a][b],
                    e = new c.MovieClipSequenceItem(d, "play", "playDone", 1);
                e.data = [a, b], this._bubbleEntranceSequenceItems[a][b] = e, this._bubbleEntranceSequenceItems[a][b].addEventListener("SequencerSequenceDone", this.handleBubbleEntranceSequenceItem, this)
            }, b.prototype.handleBubbleEntranceSequenceItem = function(a) {
                var c = a.target.data;
                this._bubbleEntranceSequenceItems[c[0]][c[1]].removeEventListener("SequencerSequenceDone", this.handleBubbleEntranceSequenceItem, this), this._bubbleEntranceSequenceItems[c[0]][c[1]].stopSequence(!0), this._bubbleEntranceSequenceItems[c[0]][c[1]].mc.gotoAndStop("playDone"), this._bubbleEntranceSequenceItems[c[0]][c[1]].mc.visible = !0, c[0] == this._longestBubbleEntranceAnimForSequence[0] && c[1] == this._longestBubbleEntranceAnimForSequence[1] && this.dispatchEvent(new d.events.Event(b.ENTRANCE_BUBBLE_DONE, null, this))
            }, b.prototype.playBubbleEntranceSequenceItem = function(a, b) {
                this._bubbleEntranceSequenceItems[a][b].mc.visible = !0, this._bubbleEntranceSequenceItems[a][b].startSequence()
            }, b.prototype.onOrientationChange_BubbleEntranceAnimsPlayer = function(a) {
                var b = this,
                    c = b._currentOrientation;
                b._currentOrientation = b._assetManager.getOrientation(), c != b._currentOrientation && "mobile" == b._gameChannel && (b.switchCurrentlyPlayingAnims(), b.hideOldAnimsOnOrientationChange(b._currentOrientation == e.AssetManager.LANDSCAPE_ORIENTATION ? e.AssetManager.PORTRAIT_ORIENTATION : e.AssetManager.LANDSCAPE_ORIENTATION))
            }, b.prototype.onEntranceBubbleAnimsDone = function(a) {
                this.removeEventListener(b.ENTRANCE_BUBBLE_DONE, this.onEntranceBubbleAnimsDone, this), this.dispatchEvent(new d.events.Event(b.ENTRANCE_ANIMS_DONE, null, this)), this.hideAllBubbleEntranceAnims()
            }, b.prototype.removeEventListeners = function() {
                this._assetManager.removeEventListener(e.AssetManager.ORIENTATION_CHANGE, this.onOrientationChange_BubbleEntranceAnimsPlayer, this), null != this._bubbleEntranceIntroSequenceItem && (this._bubbleEntranceIntroSequenceItem.stopSequence(!0), this._bubbleEntranceIntroSequenceItem.removeEventListener("SequencerSequenceDone", this.handleBubbleEntranceIntroSequenceItem, this)), this.removeEventListener(b.ENTRANCE_BUBBLE_DONE, this.onEntranceBubbleAnimsDone, this);
                for (var a = 0; a < b.NUM_COLS; a++)
                    for (var c = 1; c < b.NUM_ROWS; c++) null != this._bubbleEntranceSequenceItems[a][c] && (this._bubbleEntranceSequenceItems[a][c].stopSequence(!0), this._bubbleEntranceSequenceItems[a][c].removeEventListener("SequencerSequenceDone", this.handleBubbleEntranceSequenceItem, this))
            }, b
        }(d.events.EventDispatcher);
        f.ENTRANCE_INTRO_ANIM_DONE = "EntranceIntroAnimDone", f.ENTRANCE_ANIMS_DONE = "EntranceAnimsDone", f.ENTRANCE_BUBBLE_DONE = "EntranceBubbleDone", f.NUM_COLS = 5, f.NUM_ROWS = 4, b.BubbleEntranceAnimsPlayer = f
    }), define("common/bubbleBoost/BubbleOverlayAnimsPlayer", ["require", "exports", "wcgf/core/events", "wcgf/core/AssetManager", "wcgf/gameComponents/MovieClipSequenceItem"], function(a, b, c, d, e) {
        "use strict";
        var f = function(a) {
            function b(b) {
                var c = a.call(this) || this;
                return c._currentOrientation = d.AssetManager.LANDSCAPE_ORIENTATION, c._gameChannel = b, c._bubbleFloatAnims = [], c._bubbleFloatSequenceItems = [], c._bubbleExpandAnims = [], c._bubbleExpandSequenceItems = [], c
            }
            return __extends(b, a), b.prototype.init = function(a, b) {
                this._assetManager = a, this._assetManager.addEventListener(d.AssetManager.ORIENTATION_CHANGE, this.onOrientationChange_BubbleOverlayAnimsPlayer, this), this._gameViewSkin = b, this.initBubbleFloatAnims(), this.initBubbleFloatSequenceItems(), this.initBubbleExpandAnims(), this.initBubbleExpandSequenceItems(), this.setReferenceBounds()
            }, b.prototype.showIdleBubbleAnimsAtLocs = function(a) {
                for (var b = 0; b < a.length; b++)
                    for (var c = 0; c < a[b].length; c++) this.createNewBubbleFloatAnim(b, a[b][c]), this.createNewBubbleFloatSequenceItem(b, a[b][c]), this.showBubbleFloatIdleAnim(b, a[b][c])
            }, b.prototype.playFloatUpBubbleAnimsAtLocs = function(a) {
                for (var c, d = !0, e = 0; e < a.length; e++)
                    for (var f = 0; f < a[e].length; f++) c = a[e][f], this.createNewBubbleFloatAnim(e, c), this.createNewBubbleFloatSequenceItem(e, c), d && (this.addEventListener(b.FLOATING_BUBBLE_DONE, this.onFloatUpBubbleAnimsDone, this), d = !1), this.playBubbleFloatUpSequenceItem(e, c)
            }, b.prototype.playExpandBubbleAnimsAtLocs = function(a) {
                for (var c, d = !0, e = 0; e < a.length; e++)
                    for (var f = 0; f < a[e].length; f++) c = a[e][f], this.createNewBubbleExpandAnim(e, c), this.createNewBubbleExpandSequenceItem(e, c), d && (this.addEventListener(b.EXPANDING_BUBBLE_DONE, this.onExpandingBubbleAnimsDone, this), d = !1), this.playBubbleExpandSequenceItem(e, c)
            }, b.prototype.hideAndDestroyAllAnims = function() {
                this.hideAndDestroyAllFloatAnims(), this.hideAndDestroyAllExpandAnims()
            }, b.prototype.hideAndDestroyAllFloatAnims = function() {
                for (var a = 0; a < b.NUM_COLS; a++)
                    for (var c = 0; c < b.NUM_FLOAT_ROWS; c++) null != this._bubbleFloatAnims[a][c] && (this._bubbleFloatAnims[a][c].visible = !1, this._bubbleFloatAnims[a][c].gotoAndStop("off"), this._gameViewSkin[b.OVERLAY_ANIM_LAYER_NAME].contains(this._bubbleFloatAnims[a][c]) && this._gameViewSkin[b.OVERLAY_ANIM_LAYER_NAME].removeChild(this._bubbleFloatAnims[a][c]), this._bubbleFloatAnims[a][c] = null)
            }, b.prototype.hideAndDestroyAllExpandAnims = function() {
                for (var a = 0; a < b.NUM_COLS; a++)
                    for (var c = 0; c < b.NUM_ROWS; c++) null != this._bubbleExpandAnims[a][c] && (this._bubbleExpandAnims[a][c].visible = !1, this._bubbleExpandAnims[a][c].gotoAndStop("off"), this._gameViewSkin[b.OVERLAY_ANIM_LAYER_NAME].contains(this._bubbleExpandAnims[a][c]) && this._gameViewSkin[b.OVERLAY_ANIM_LAYER_NAME].removeChild(this._bubbleExpandAnims[a][c]), this._bubbleExpandAnims[a][c] = null)
            }, b.prototype.stopAndDestroyAllSequences = function() {
                this.stopAndDestroyAllFloatSequences(), this.stopAndDestroyAllExpandSequences()
            }, b.prototype.stopAndDestroyAllFloatSequences = function() {
                for (var a = 0; a < b.NUM_COLS; a++)
                    for (var c = 0; c < b.NUM_FLOAT_ROWS; c++) null != this._bubbleFloatSequenceItems[a][c] && (this._bubbleFloatSequenceItems[a][c].stopSequence(!0), this._bubbleFloatSequenceItems[a][c].mc.visible = !1, this._bubbleFloatSequenceItems[a][c].removeEventListener("SequencerSequenceDone", this.handleBubbleFloatSequenceItem, this), this._bubbleFloatSequenceItems[a][c] = null)
            }, b.prototype.stopAndDestroyAllExpandSequences = function() {
                for (var a = 0; a < b.NUM_COLS; a++)
                    for (var c = 0; c < b.NUM_ROWS; c++) null != this._bubbleExpandSequenceItems[a][c] && (this._bubbleExpandSequenceItems[a][c].stopSequence(!0), this._bubbleExpandSequenceItems[a][c].removeEventListener("SequencerSequenceDone", this.handleBubbleExpandSequenceItem, this), this._bubbleExpandSequenceItems[a][c] = null)
            }, b.prototype.onFloatUpBubbleAnimsDone = function(a) {
                this.removeEventListener(b.FLOATING_BUBBLE_DONE, this.onFloatUpBubbleAnimsDone, this), this.dispatchEvent(new c.events.Event(b.FLOATING_ANIMS_DONE, null, this))
            }, b.prototype.onExpandingBubbleAnimsDone = function(a) {
                this.removeEventListener(b.EXPANDING_BUBBLE_DONE, this.onExpandingBubbleAnimsDone, this), this.dispatchEvent(new c.events.Event(b.EXPANDING_ANIMS_DONE, null, this))
            }, b.prototype.initBubbleFloatAnims = function() {
                for (var a = 0; a < b.NUM_COLS; a++) {
                    this._bubbleFloatAnims[a] = [];
                    for (var c = 0; c < b.NUM_FLOAT_ROWS; c++) this._bubbleFloatAnims[a][c] = null
                }
            }, b.prototype.initBubbleFloatSequenceItems = function() {
                for (var a = 0; a < b.NUM_COLS; a++) {
                    this._bubbleFloatSequenceItems[a] = [];
                    for (var c = 0; c < b.NUM_FLOAT_ROWS; c++) this._bubbleFloatSequenceItems[a][c] = null
                }
            }, b.prototype.initBubbleExpandAnims = function() {
                for (var a = 0; a < b.NUM_COLS; a++) {
                    this._bubbleExpandAnims[a] = [];
                    for (var c = 0; c < b.NUM_ROWS; c++) this._bubbleExpandAnims[a][c] = null
                }
            }, b.prototype.initBubbleExpandSequenceItems = function() {
                for (var a = 0; a < b.NUM_COLS; a++) {
                    this._bubbleExpandSequenceItems[a] = [];
                    for (var c = 0; c < b.NUM_ROWS; c++) this._bubbleExpandSequenceItems[a][c] = null
                }
            }, b.prototype.setReferenceBounds = function() {
                var a = this._gameViewSkin.shakeContainer,
                    b = a.ReelsContainer;
                this._reelsContainerBounds = b.nominalBounds, this._reelsContainerBounds.setValues(b.x, b.y);
                var c = b.Reel0;
                this._reelCol0Bounds = c.nominalBounds, this._reelCol0Bounds.setValues(c.x, c.y);
                var d = b.Reel1;
                this._reelCol1Bounds = d.nominalBounds, this._reelCol1Bounds.setValues(d.x, d.y);
                var e = b.Reel2;
                this._reelCol2Bounds = e.nominalBounds, this._reelCol2Bounds.setValues(e.x, e.y);
                var f = b.Reel3;
                this._reelCol3Bounds = f.nominalBounds, this._reelCol3Bounds.setValues(f.x, f.y);
                var g = b.Reel4;
                this._reelCol4Bounds = g.nominalBounds, this._reelCol4Bounds.setValues(g.x, g.y), this._reelColBounds = [this._reelCol0Bounds, this._reelCol1Bounds, this._reelCol2Bounds, this._reelCol3Bounds, this._reelCol4Bounds];
                var h = this._assetManager.getNewAsset("s02");
                this._symbolBounds = h.nominalBounds
            }, b.prototype.createNewBubbleFloatAnim = function(a, c) {
                if (null == this._bubbleFloatAnims[a][c]) {
                    var e = this._currentOrientation == d.AssetManager.PORTRAIT_ORIENTATION && "mobile" == this._gameChannel;
                    this._bubbleFloatAnims[a][c] = this._assetManager.getNewAsset(b.FLOATING_BUBBLE_ASSET_KEY), this._bubbleFloatAnims[a][c].scaleX = e ? b.PORTRAIT_REELS_SCALE : 1, this._bubbleFloatAnims[a][c].scaleY = e ? b.PORTRAIT_REELS_SCALE : 1;
                    var f = this._symbolBounds.width / 2 + this._reelsContainerBounds.x + this._reelColBounds[a].x;
                    this._bubbleFloatAnims[a][c].x = e ? f * b.PORTRAIT_REELS_SCALE : f;
                    var g = this._symbolBounds.height / 2 + this._reelsContainerBounds.y + c * this._symbolBounds.height;
                    this._bubbleFloatAnims[a][c].y = e ? g * b.PORTRAIT_REELS_SCALE : g, this.showBubbleFloatAnim(!1, a, c), this._bubbleFloatAnims[a][c].gotoAndStop("off"), this._gameViewSkin[b.OVERLAY_ANIM_LAYER_NAME].addChild(this._bubbleFloatAnims[a][c])
                }
            }, b.prototype.showBubbleFloatIdleAnim = function(a, b) {
                null != this._bubbleFloatAnims[a][b] && (this._bubbleFloatAnims[a][b].gotoAndStop("idle"), this.showBubbleFloatAnim(!0, a, b))
            }, b.prototype.showBubbleFloatAnim = function(a, b, c) {
                null != this._bubbleFloatAnims[b][c] && (this._bubbleFloatAnims[b][c].visible = a, a || this._bubbleFloatAnims[b][c].gotoAndStop("off"))
            }, b.prototype.createNewBubbleFloatSequenceItem = function(a, c) {
                null != this._bubbleFloatAnims[a][c] && null == this._bubbleFloatSequenceItems[a][c] && (c == b.NUM_FLOAT_ROWS - 1 ? this._bubbleFloatSequenceItems[a][c] = new e.MovieClipSequenceItem(this._bubbleFloatAnims[a][c], "moveEnter", "moveEnterDone", 1) : this._bubbleFloatSequenceItems[a][c] = 0 == c ? new e.MovieClipSequenceItem(this._bubbleFloatAnims[a][c], "moveExit", "moveExitDone", 1) : new e.MovieClipSequenceItem(this._bubbleFloatAnims[a][c], "moveUp", "moveUpDone", 1), this._bubbleFloatSequenceItems[a][c].data = [a, c])
            }, b.prototype.createNewBubbleExpandSequenceItem = function(a, b) {
                null != this._bubbleExpandAnims[a][b] && null == this._bubbleExpandSequenceItems[a][b] && (this._bubbleExpandSequenceItems[a][b] = new e.MovieClipSequenceItem(this._bubbleExpandAnims[a][b], "expand", "expandDone", 1), this._bubbleExpandSequenceItems[a][b].addEventListener("SequencerSequenceDone", this.handleBubbleExpandSequenceItem, this), this._bubbleExpandSequenceItems[a][b].data = [a, b])
            }, b.prototype.playBubbleFloatUpSequenceItem = function(a, b) {
                null != this._bubbleFloatAnims[a][b] && null != this._bubbleFloatSequenceItems[a][b] && (this._bubbleFloatSequenceItems[a][b].addEventListener("SequencerSequenceDone", this.handleBubbleFloatSequenceItem, this), this.showBubbleFloatAnim(!0, a, b), this._bubbleFloatSequenceItems[a][b].mc.visible = !0, this._bubbleFloatSequenceItems[a][b].startSequence())
            }, b.prototype.handleBubbleFloatSequenceItem = function(a) {
                var d = a.target.data;
                null != this._bubbleFloatSequenceItems[d[0]][d[1]] && (this._bubbleFloatSequenceItems[d[0]][d[1]].stopSequence(!0), this._bubbleFloatSequenceItems[d[0]][d[1]].removeEventListener("SequencerSequenceDone", this.handleBubbleFloatSequenceItem, this)), null != this._bubbleFloatAnims[d[0]][d[1]] && (this.showBubbleFloatAnim(!1, d[0], d[1]), this._bubbleFloatAnims[d[0]][d[1]] = null), this.dispatchEvent(new c.events.Event(b.FLOATING_BUBBLE_DONE, null, this))
            }, b.prototype.createNewBubbleExpandAnim = function(a, c) {
                if (null == this._bubbleExpandAnims[a][c]) {
                    var e = this._currentOrientation == d.AssetManager.PORTRAIT_ORIENTATION && "tablet" != this._gameChannel;
                    this._bubbleExpandAnims[a][c] = this._assetManager.getNewAsset(b.EXPANDING_BUBBLE_ASSET_KEY), this._bubbleExpandAnims[a][c].scaleX = e ? b.PORTRAIT_REELS_SCALE : 1, this._bubbleExpandAnims[a][c].scaleY = e ? b.PORTRAIT_REELS_SCALE : 1;
                    var f = this._symbolBounds.width / 2 + this._reelsContainerBounds.x + this._reelColBounds[a].x;
                    this._bubbleExpandAnims[a][c].x = e ? f * b.PORTRAIT_REELS_SCALE : f;
                    var g = this._symbolBounds.height / 2 + this._reelsContainerBounds.y + c * this._symbolBounds.height;
                    this._bubbleExpandAnims[a][c].y = e ? g * b.PORTRAIT_REELS_SCALE : g, this._bubbleExpandAnims[a][c].visible = !1, this._bubbleExpandAnims[a][c].gotoAndStop("off"), this._gameViewSkin[b.OVERLAY_ANIM_LAYER_NAME].addChild(this._bubbleExpandAnims[a][c])
                }
            }, b.prototype.playBubbleExpandSequenceItem = function(a, b) {
                null != this._bubbleExpandAnims[a][b] && null != this._bubbleExpandSequenceItems[a][b] && (this.setExpandAnimDirectionsToShow(a, b), this._bubbleExpandAnims[a][b].visible = !0, this._bubbleExpandSequenceItems[a][b].startSequence())
            }, b.prototype.handleBubbleExpandSequenceItem = function(a) {
                var d = a.target.data;
                null != this._bubbleExpandSequenceItems[d[0]][d[1]] && this._bubbleExpandSequenceItems[d[0]][d[1]].stopSequence(!0), null != this._bubbleExpandAnims[d[0]][d[1]] && (this._bubbleExpandAnims[d[0]][d[1]].gotoAndStop("off"), this._bubbleExpandAnims[d[0]][d[1]].visible = !1, this._gameViewSkin[b.OVERLAY_ANIM_LAYER_NAME].removeChild(this._bubbleExpandAnims[d[0]][d[1]]), this._bubbleExpandAnims[d[0]][d[1]] = null), this.dispatchEvent(new c.events.Event(b.EXPANDING_BUBBLE_DONE, null, this))
            }, b.prototype.setExpandAnimDirectionsToShow = function(a, c) {
                var d = this._bubbleExpandAnims[a][c];
                d[b.EXPAND_TOP_LEFT].visible = d[b.EXPAND_LEFT].visible = d[b.EXPAND_BOT_LEFT].visible = d[b.EXPAND_TOP].visible = d[b.EXPAND_BOT].visible = d[b.EXPAND_TOP_RIGHT].visible = d[b.EXPAND_RIGHT].visible = d[b.EXPAND_BOT_RIGHT].visible = !0, 0 == a && (d[b.EXPAND_TOP_LEFT].visible = !1, d[b.EXPAND_LEFT].visible = !1, d[b.EXPAND_BOT_LEFT].visible = !1), a == b.NUM_COLS - 1 && (d[b.EXPAND_TOP_RIGHT].visible = !1, d[b.EXPAND_RIGHT].visible = !1, d[b.EXPAND_BOT_RIGHT].visible = !1), 0 == c && (d[b.EXPAND_TOP_LEFT].visible = !1, d[b.EXPAND_TOP].visible = !1, d[b.EXPAND_TOP_RIGHT].visible = !1), c == b.NUM_ROWS - 1 && (d[b.EXPAND_BOT_LEFT].visible = !1, d[b.EXPAND_BOT].visible = !1, d[b.EXPAND_BOT_RIGHT].visible = !1)
            }, b.prototype.adjustAllCurrentlyPlayingBubbleSizes = function(a) {
                for (var c = this, e = a == d.AssetManager.PORTRAIT_ORIENTATION ? 1 / b.PORTRAIT_REELS_SCALE : b.PORTRAIT_REELS_SCALE, f = a == d.AssetManager.PORTRAIT_ORIENTATION ? 1 : b.PORTRAIT_REELS_SCALE, g = 0; g < c._bubbleExpandSequenceItems.length; g++)
                    for (var h = 0; h < c._bubbleExpandSequenceItems[g].length; h++) null != c._bubbleExpandSequenceItems[g][h] && (c._bubbleExpandSequenceItems[g][h].mc.x *= e, c._bubbleExpandSequenceItems[g][h].mc.y *= e, c._bubbleExpandSequenceItems[g][h].mc.scaleX = f, c._bubbleExpandSequenceItems[g][h].mc.scaleY = f);
                for (var g = 0; g < c._bubbleFloatSequenceItems.length; g++)
                    for (var h = 0; h < c._bubbleFloatSequenceItems[g].length; h++) null != c._bubbleFloatSequenceItems[g][h] && (c._bubbleFloatSequenceItems[g][h].mc.x *= e, c._bubbleFloatSequenceItems[g][h].mc.y *= e, c._bubbleFloatSequenceItems[g][h].mc.scaleX = f, c._bubbleFloatSequenceItems[g][h].mc.scaleY = f)
            }, b.prototype.onOrientationChange_BubbleOverlayAnimsPlayer = function(a) {
                var b = this,
                    c = b._currentOrientation;
                b._currentOrientation = b._assetManager.getOrientation(), c != b._currentOrientation && "mobile" == b._gameChannel && b.adjustAllCurrentlyPlayingBubbleSizes(c)
            }, b.prototype.setStartingOrientationOnTransitionIn = function(a) {
                this._currentOrientation = a
            }, b.prototype.removeEventListeners = function() {
                this._assetManager.removeEventListener(d.AssetManager.ORIENTATION_CHANGE, this.onOrientationChange_BubbleOverlayAnimsPlayer, this), this.removeEventListener(b.FLOATING_BUBBLE_DONE, this.onFloatUpBubbleAnimsDone, this), this.removeEventListener(b.EXPANDING_BUBBLE_DONE, this.onExpandingBubbleAnimsDone, this);
                for (var a = 0; a < b.NUM_COLS; a++) {
                    this._bubbleExpandSequenceItems[a] = [];
                    for (var c = 0; c < b.NUM_ROWS; c++) null != this._bubbleExpandSequenceItems[a][c] && (this._bubbleExpandSequenceItems[a][c].stopSequence(!0), this._bubbleExpandSequenceItems[a][c].removeEventListener("SequencerSequenceDone", this.handleBubbleExpandSequenceItem, this))
                }
                for (var a = 0; a < b.NUM_COLS; a++) {
                    this._bubbleFloatSequenceItems[a] = [];
                    for (var c = 0; c < b.NUM_FLOAT_ROWS; c++) null != this._bubbleFloatSequenceItems[a][c] && (this._bubbleFloatSequenceItems[a][c].stopSequence(!0), this._bubbleFloatSequenceItems[a][c].removeEventListener("SequencerSequenceDone", this.handleBubbleFloatSequenceItem, this))
                }
            }, b
        }(c.events.EventDispatcher);
        f.FLOATING_BUBBLE_DONE = "FloatingBubbleDone", f.EXPANDING_BUBBLE_DONE = "ExpandingBubbleDone", f.FLOATING_ANIMS_DONE = "FloatingAnimsDone", f.EXPANDING_ANIMS_DONE = "ExpandingAnimsDone", f.FLOATING_BUBBLE_ASSET_KEY = "floatingBubbleAnim", f.EXPANDING_BUBBLE_ASSET_KEY = "expandingBubbleAnim", f.OVERLAY_ANIM_LAYER_NAME = "bubbleOverlayAnimsLayer", f.EXPAND_TOP_LEFT = "expandTopLeftAnim", f.EXPAND_LEFT = "expandLeftAnim", f.EXPAND_BOT_LEFT = "expandBottomLeftAnim", f.EXPAND_TOP = "expandTopAnim", f.EXPAND_BOT = "expandBottomAnim", f.EXPAND_TOP_RIGHT = "expandTopRightAnim", f.EXPAND_RIGHT = "expandRightAnim", f.EXPAND_BOT_RIGHT = "expandBottomRightAnim", f.NUM_COLS = 5, f.NUM_ROWS = 4, f.NUM_FLOAT_ROWS = 6, f.PORTRAIT_REELS_SCALE = .78, b.BubbleOverlayAnimsPlayer = f
    }), define("common/bubbleBoost/BubbleBoostDataProcessor", ["require", "exports"], function(a, b) {
        "use strict";
        var c = function() {
            function a(a) {
                this._stage = a
            }
            return a.prototype.setNewGLR = function(a) {
                this._gameLogicResponse = a
            }, a.getEmptyLocsArray = function() {
                for (var b = new Array(a.NUM_COLS), c = 0; c < a.NUM_COLS; c++) b[c] = [];
                return b
            }, a.prototype.getCurrentBubbleLocsFromKVP = function(b, c) {
                var d, e, f = a.getEmptyLocsArray(),
                    g = this.getBubbleKeyValuePairInfo(this._stage + c);
                if (null != g) {
                    var h = g.mapping;
                    if (null != h.getValue(b) && "" != h.getValue(b).value)
                        for (var i = 0, j = h.getValue(b).value.split(","); i < j.length; i++) {
                            var k = j[i];
                            d = parseInt(k.charAt(k.indexOf("C") + 1)), e = parseInt(k.charAt(k.indexOf("R") + 1)), f[d].push(e)
                        }
                }
                return f
            }, a.prototype.getBubbleTriggerLocs = function(b) {
                var c = a.getEmptyLocsArray(),
                    d = this.getBubbleTriggerOutcome(b);
                if (null != d)
                    for (var e = 0, f = d.trigger; e < f.length; e++) {
                        var g = f[e];
                        if (g.name != a.NO_BUBBLE_TRIGGER_NAME) {
                            var h = parseInt(g.name.charAt(g.name.indexOf("C") + 1)),
                                i = parseInt(g.name.charAt(g.name.indexOf("R") + 1));
                            c[h].push(i)
                        }
                    }
                return c
            }, a.prototype.getBubbleTriggerLocsAsArray = function(b) {
                var c = [],
                    d = this.getBubbleTriggerOutcome(b);
                if (null != d)
                    for (var e = 0, f = d.trigger; e < f.length; e++) {
                        var g = f[e];
                        g.name != a.NO_BUBBLE_TRIGGER_NAME && c.push(g.name)
                    }
                return c
            }, a.moveAllBubblesInLocArrayDown = function(b) {
                for (var c = a.getEmptyLocsArray(), d = 0; d < b.length; d++)
                    for (var e = 0; e < b[d].length; e++) c[d].push(b[d][e] + 1);
                return c
            }, a.prototype.getBubbleTriggerOutcome = function(a) {
                var b = this._gameLogicResponse.triggerOutcome;
                return null != b.getValue(a) ? b.getValue(a) : null
            }, a.prototype.getBubbleKeyValuePairInfo = function(b) {
                var c = this._gameLogicResponse.keyValuePairInfo;
                return null != c.getValue(b) ? c.getValue(b) : null != c.getValue(this._stage + a.BUBBLE_LOCS_KEY_VALUE_PAIR_SUFFIX) ? c.getValue(this._stage + a.BUBBLE_LOCS_KEY_VALUE_PAIR_SUFFIX) : null
            }, a.prototype.getTransformedCellLocs = function(b) {
                var c = this.getBubbleKeyValuePairInfo(this._stage + a.BUBBLE_LOCS_KEY_VALUE_PAIR_SUFFIX);
                if (null != c) {
                    var d = c.mapping.getValue(b);
                    return "" == d.value ? [] : d.value.split(",")
                }
                return null
            }, a.prototype.getPopulationOutcomes = function() {
                return null != this._gameLogicResponse ? this._gameLogicResponse.populationOutcomes : null
            }, a.getAllValidExpandingWildLocs = function(b) {
                for (var c, d, e, f, g = [], h = 0, i = b; h < i.length; h++) {
                    var j = i[h];
                    c = parseInt(j.charAt(j.indexOf("C") + 1)), d = parseInt(j.charAt(j.indexOf("R") + 1)), f = a.getAllValidExpansionLocsForExpandingBubbleLoc(c, d);
                    for (var k = 0; k < f.length; k++)
                        for (var l = 0; l < f[k].length; l++) e = "L0C" + k + "R" + f[k][l], -1 == g.indexOf(e) && g.push(e)
                }
                return g
            }, a.getAllBubbleLocsOnReels = function(b) {
                for (var c = a.getEmptyLocsArray(), d = 0; d < b.length; d++) {
                    c[d] = [];
                    for (var e = 0; e < b[d].length; e++) b[d][e] < a.NUM_ROWS && (c[d][e] = b[d][e])
                }
                return c
            }, a.getAllValidExpansionLocsForExpandingBubbleLoc = function(b, c) {
                var d = a.getEmptyLocsArray();
                return d[b].push(c), a.isValidCol(b - 1) && a.isValidRow(c + 1) && d[b - 1].push(c + 1), a.isValidCol(b - 1) && a.isValidRow(c) && d[b - 1].push(c), a.isValidCol(b - 1) && a.isValidRow(c - 1) && d[b - 1].push(c - 1), a.isValidCol(b) && a.isValidRow(c - 1) && d[b].push(c - 1), a.isValidCol(b + 1) && a.isValidRow(c - 1) && d[b + 1].push(c - 1), a.isValidCol(b + 1) && a.isValidRow(c) && d[b + 1].push(c), a.isValidCol(b + 1) && a.isValidRow(c + 1) && d[b + 1].push(c + 1), a.isValidCol(b) && a.isValidRow(c + 1) && d[b].push(c + 1), d
            }, a.isValidCol = function(b) {
                return b > -1 && b < a.NUM_COLS
            }, a.isValidRow = function(b) {
                return b > -1 && b < a.NUM_ROWS
            }, a.prototype.outcomeHasNewBoostBubbles = function() {
                var b = this.getBubbleTriggerOutcome(this._stage + a.PRE_BOOST_BUBBLES_TRIGGER_NAME_SUFFIX);
                return null != b && b.trigger.length > 0
            }, a.prototype.getNewBubbleBoostState = function() {
                var b = this.getBubbleTriggerOutcome(a.BUBBLE_BOOST_STATE_TRIGGER_NAME);
                return null != b && b.trigger.length > 0 && "boostOn" == b.trigger[0].name
            }, a.prototype.getAllFloatUpBubbleLocations = function(b) {
                var c = this.getCurrentBubbleLocsFromKVP(b, a.OLD_BUBBLE_LOCS_KEY_VALUE_PAIR_SUFFIX),
                    d = a.moveAllBubblesInLocArrayDown(this.getBubbleTriggerLocs(this._stage + a.NEW_STANDARD_BUBBLES_TRIGGER_NAME_SUFFIX)),
                    e = this.getBubbleTriggerLocs(this._stage + a.PRE_BOOST_BUBBLES_TRIGGER_NAME_SUFFIX);
                return a.getCombinedBubbleLocs(c, d, e)
            }, a.hasBubbleLocs = function(a) {
                for (var b = 0; b < a.length; b++)
                    for (var c = 0; c < a[b].length; c++)
                        if (null != a[b][c]) return !0;
                return !1
            }, a.getCombinedBubbleLocs = function() {
                for (var b = [], c = 0; c < arguments.length; c++) b[c] = arguments[c];
                for (var d, e, f = a.getEmptyLocsArray(), g = 0, h = 0, i = b; h < i.length; h++) {
                    var j = i[h];
                    for (d = 0; d < j.length; d++)
                        for (g = 0; g < j[d].length; g++) e = j[d][g], -1 == f[d].indexOf(e) && f[d].push(e)
                }
                return f
            }, a.getBubbleLocsOnTopReelsRow = function(b) {
                for (var c, d = a.getEmptyLocsArray(), e = 0; e < b.length; e++)
                    for (var f = 0; f < b[e].length; f++) 0 == (c = b[e][f]) && d[e].push(c);
                return d
            }, a.getBubbleLocsBelowReels = function(b) {
                for (var c, d = a.getEmptyLocsArray(), e = 0; e < b.length; e++)
                    for (var f = 0; f < b[e].length; f++)(c = b[e][f]) == a.NUM_ROWS && d[e].push(c);
                return d
            }, a.getBubbleLocsArrayHasBubblesOnReels = function(b) {
                for (var c = 0; c < b.length; c++)
                    for (var d = 0; d < b[c].length; d++)
                        if (null != b[c][d] && b[c][d] < a.NUM_ROWS) return !0;
                return !1
            }, a.convertLocStringsToArray = function(b) {
                for (var c, d, e = a.getEmptyLocsArray(), f = 0, g = b; f < g.length; f++) {
                    var h = g[f];
                    c = parseInt(h.charAt(h.indexOf("C") + 1)), d = parseInt(h.charAt(h.indexOf("R") + 1)), e[c].push(d)
                }
                return e
            }, a.convertLocsArrayToStrings = function(a) {
                for (var b = [], c = 0; c < a.length; c++)
                    for (var d = 0; d < a[c].length; d++) b.push("L0C" + c + "R" + a[c][d]);
                return b
            }, a
        }();
        c.NO_BUBBLE_TRIGGER_NAME = "noBubble", c.BUBBLE_BOOST_STATE_TRIGGER_NAME = "Game.BubbleBoost", c.NEW_STANDARD_BUBBLES_TRIGGER_NAME_SUFFIX = ".NewStandardBubbles", c.PRE_BOOST_BUBBLES_TRIGGER_NAME_SUFFIX = ".PreBubbleBoostBubbles", c.ALL_BUBBLES_TRIGGER_NAME_SUFFIX = ".AllBubbles", c.BUBBLE_TRANSFORM_TRIGGER_NAME_SUFFIX = ".BubbleTransformTrigger", c.OLD_BUBBLE_LOCS_KEY_VALUE_PAIR_SUFFIX = ".OldBubbles", c.BUBBLE_LOCS_KEY_VALUE_PAIR_SUFFIX = ".Bubbles", c.INITIAL_REELS_POPULATION_OUTCOME_NAME_SUFFIX = ".InitialReels", c.NORMAL_REELS_POPULATION_OUTCOME_NAME_SUFFIX = ".Reels", c.INITIAL_FREE_SPIN_REELS_POPULATION_OUTCOME_NAME_SUFFIX = ".Reels", c.WILD_SYMBOL_NAME = "w01", c.TRANSFORM_SYMBOL_NAME = "s01", c.NUM_COLS = 5, c.NUM_ROWS = 4, b.BubbleBoostDataProcessor = c
    }), define("common/bubbleBoost/BubbleReelsHelper", ["require", "exports", "wcgf/core/events", "wcgf/sequencers/ISequenceItem", "wcgf/sequencers/ParallelSequencer", "common/bubbleBoost/BubbleBoostDataProcessor", "common/audio/AudioPlayer"], function(a, b, c, d, e, f, g) {
        "use strict";
        var h = function(a) {
            function b(b) {
                var c = a.call(this) || this;
                return c._stage = b, c._popAnimsCurrentlyPlaying = !1, c._currentPopAnimLocs = [], c
            }
            return __extends(b, a), b.prototype.init = function(a) {
                this._reelSet = a, this._bonusSymbolAnimsSequencer = null
            }, b.prototype.noCurrentBubblesAboveTransformSymbols = function(a) {
                for (var c, d, e, g, h = 0; h < a.length; h++)
                    for (var i = 0; i < a[h].length; i++)
                        if (c = h, !((d = a[h][i]) >= b.NUM_REEL_ROWS)) {
                            e = "L0C" + c + "R" + d, g = this._reelSet.reels.getValue("Reel" + c);
                            for (var j = 0, k = g.currentSymbols; j < k.length; j++) {
                                var l = k[j];
                                if (l.cellName == e && l.symbolId == f.BubbleBoostDataProcessor.TRANSFORM_SYMBOL_NAME) return !1
                            }
                        }
                return !0
            }, b.prototype.swapReelsToWild = function(a) {
                for (var b, c, d = 0, e = a; d < e.length; d++) {
                    var g = e[d];
                    b = parseInt(g.charAt(g.indexOf("C") + 1)), c = this._reelSet.reels.getValue("Reel" + b);
                    for (var h = 0, i = c.currentSymbols; h < i.length; h++) {
                        var j = i[h];
                        if (j.cellName == g) {
                            j.swap(f.BubbleBoostDataProcessor.WILD_SYMBOL_NAME);
                            break
                        }
                    }
                }
            }, b.prototype.swapReels = function(a, b) {
                null != a && this._reelSet.reset(a, b)
            }, b.prototype.getBubbleExpandLocsFromCurrentLocs = function(a) {
                for (var c, d, e, g, h = b.getEmptyLocsArray(), i = 0; i < a.length; i++) {
                    h[i] = [];
                    for (var j = 0; j < a[i].length; j++) {
                        c = i, d = a[i][j], e = "L0C" + c + "R" + d, g = this._reelSet.reels.getValue("Reel" + c);
                        for (var k = 0, l = g.currentSymbols; k < l.length; k++) {
                            var m = l[k];
                            m.cellName == e && m.symbolId == f.BubbleBoostDataProcessor.TRANSFORM_SYMBOL_NAME && h[c].push(d)
                        }
                    }
                }
                return h
            }, b.prototype.getBubbleNoExpandLocsFromCurrentLocs = function(a) {
                for (var c, d, e, g, h = b.getEmptyLocsArray(), i = 0; i < a.length; i++)
                    for (var j = 0; j < a[i].length; j++) {
                        c = i, d = a[i][j], e = "L0C" + c + "R" + d, g = this._reelSet.reels.getValue("Reel" + c);
                        for (var k = 0, l = g.currentSymbols; k < l.length; k++) {
                            var m = l[k];
                            m.cellName == e && m.symbolId != f.BubbleBoostDataProcessor.TRANSFORM_SYMBOL_NAME && h[c].push(d)
                        }
                    }
                return h
            }, b.prototype.playSymbolAnimsOnReels = function(a, b, c, f) {
                var h, i, j = [];
                this._currentPopAnimLocs = a, this._popAnimsCurrentlyPlaying = !1;
                for (var k = 0, l = a; k < l.length; k++) {
                    var m = l[k];
                    i = parseInt(m.charAt(m.indexOf("C") + 1)), h = this._reelSet.reels.getValue("Reel" + i);
                    for (var n = 0, o = h.currentSymbols; n < o.length; n++) {
                        var p = o[n];
                        p.cellName == m && p.symbolId == b && j.push(p.getSymbolSequenceItem(c, f ? 0 : 1))
                    }
                }
                j.length > 0 ? (g.AudioPlayer.playSound("wildSymbol"), this._popAnimsSequencer = new e.ParallelSequencer(j), this._popAnimsSequencer.addEventListener(d.sequencers.SEQUENCE_END, this.popAnimsSequenceDone, this), this._popAnimsSequencer.startSequence(), this._popAnimsCurrentlyPlaying = !0) : this._popAnimsSequencer = null
            }, b.prototype.popAnimsSequenceDone = function(a) {
                null != this._popAnimsSequencer && (this._popAnimsSequencer.removeEventListener(d.sequencers.SEQUENCE_END, this.popAnimsSequenceDone, this), this.stopPopSymbolAnimsPlayingOnReels(), this._popAnimsSequencer = null, this.dispatchEvent(new c.events.Event(b.BUBBLE_POP_ANIMS_COMPLETE, null, this)))
            }, b.prototype.stopPopSymbolAnimsPlayingOnReels = function() {
                var a, b;
                null != this._popAnimsSequencer && (this._popAnimsSequencer.stopSequence(), this._popAnimsSequencer = null);
                for (var c = 0, d = this._currentPopAnimLocs; c < d.length; c++) {
                    var e = d[c];
                    b = parseInt(e.charAt(e.indexOf("C") + 1)), a = this._reelSet.reels.getValue("Reel" + b);
                    for (var f = 0, g = a.currentSymbols; f < g.length; f++) {
                        var h = g[f];
                        h.cellName == e && h.setStatic()
                    }
                }
                this._popAnimsCurrentlyPlaying = !1
            }, b.prototype.replenishBonusSymbolsOnReels = function(a, c, d) {
                for (var f, g, h = a.gameLogicResponse.populationOutcomes.getValue(this._stage + b.ORIGINAL_STAGE_REELS_SUFFIX), i = b.getBonusLocsFromPopulationOutcome(h), j = [], k = 0, l = i; k < l.length; k++) {
                    var m = l[k];
                    g = parseInt(m.charAt(m.indexOf("C") + 1)), f = this._reelSet.reels.getValue("Reel" + g);
                    for (var n = 0, o = f.currentSymbols; n < o.length; n++) {
                        var p = o[n];
                        p.cellName == m && (p.symbolId != b.BONUS_SYMBOL && p.swap(b.BONUS_SYMBOL), j.push(p.getSymbolSequenceItem(c, 0)))
                    }
                }
                this._bonusSymbolAnimsSequencer = new e.ParallelSequencer(j), d && this._bonusSymbolAnimsSequencer.startSequence()
            }, b.getBonusLocsFromPopulationOutcome = function(a) {
                for (var c, d, e = [], f = 0; f < b.NUM_COLS; f++) {
                    c = a.reels.getValue("Reel" + f);
                    for (var g = 0; g < c.cells.length; g++) d = c.cells[g], d.symbolId == b.BONUS_SYMBOL && e.push(d.name)
                }
                return e
            }, b.prototype.stopBonusAnimSequence = function() {
                this._bonusSymbolAnimsSequencer && this._bonusSymbolAnimsSequencer.stopSequence(!0), this._bonusSymbolAnimsSequencer = null
            }, b.prototype.stopAllSymbolAnimsOnReels = function() {
                for (var a, b = 0; b < this._reelSet.reels.size(); b++) {
                    a = this._reelSet.reels.getValue("Reel" + b);
                    for (var c = 0; c < a.currentSymbols.length; c++) a.currentSymbols[c].setStatic()
                }
                this._popAnimsCurrentlyPlaying = !0
            }, b.getEmptyLocsArray = function() {
                for (var a = new Array(b.NUM_COLS), c = 0; c < b.NUM_COLS; c++) a[c] = [];
                return a
            }, b.prototype.removeEventListeners = function() {
                null != this._popAnimsSequencer && (this._popAnimsSequencer.stopSequence(!0), this._popAnimsSequencer.addEventListener(d.sequencers.SEQUENCE_END, this.popAnimsSequenceDone, this)), this._bonusSymbolAnimsSequencer && this._bonusSymbolAnimsSequencer.stopSequence(!0)
            }, b
        }(c.events.EventDispatcher);
        h.ORIGINAL_STAGE_REELS_SUFFIX = ".Reels", h.BUBBLE_POP_ANIMS_COMPLETE = "BubblePopAnimsComplete", h.NUM_COLS = 5, h.NUM_REEL_ROWS = 4, h.BONUS_SYMBOL = "b01", b.BubbleReelsHelper = h
    }), define("common/bubbleBoost/BubbleBoostManager", ["require", "exports", "wcgf/sequencers/TimerEventSequenceItem", "wcgf/core/events", "common/bubbleBoost/BubbleEntranceAnimsPlayer", "common/bubbleBoost/BubbleOverlayAnimsPlayer", "common/bubbleBoost/BubbleBoostDataProcessor", "common/bubbleBoost/button/BubbleBoostButton", "common/audio/AudioPlayer", "common/bubbleBoost/BubbleReelsHelper"], function(a, b, c, d, e, f, g, h, i, j) {
        "use strict";
        var k = function(a) {
            function b(d, h) {
                var i = a.call(this) || this;
                return i._stageName = h, i._boostActive = !1, i._bubbleEntranceAnimsPlayer = new e.BubbleEntranceAnimsPlayer(d, i._stageName), i._bubbleOverlayAnimsPlayer = new f.BubbleOverlayAnimsPlayer(d), i._bubbleBoostDataProcessor = new g.BubbleBoostDataProcessor(h), i._bubbleReelsHelper = new j.BubbleReelsHelper(h), i._noBubblesFloatUpDelayTimer = new c.TimerEventSequenceItem(b.NO_BUBBLES_FLOATUP_EXTRA_DELAY, i.onNoBubblesFloatUpDelayDone, null, i, 1), i
            }
            return __extends(b, a), b.prototype.init = function(a, b, c, d, e, f, g, h) {
                this._bubbleEntranceAnimsPlayer.init(d, e, f, g), this._bubbleOverlayAnimsPlayer.init(b, c), this._bubbleBoostDataProcessor.setNewGLR(a), this._bubbleReelsHelper.init(h)
            }, b.prototype.setBubbleBoostButton = function(a, b) {
                null != a ? this._bubbleBoostButton = a : (this._bubbleBoostButton = null, this._bubbleBoostState = b)
            }, b.prototype.getCurrentBubbleBoostState = function() {
                return null != this._bubbleBoostButton ? this._bubbleBoostButton.curButtonState : this._bubbleBoostState
            }, b.prototype.removeAllBubbleAnimsAndSequences = function() {
                this._bubbleOverlayAnimsPlayer.hideAndDestroyAllAnims(), this._bubbleOverlayAnimsPlayer.stopAndDestroyAllSequences(), this._bubbleEntranceAnimsPlayer.hideAllBubbleEntranceAnims(), this._bubbleEntranceAnimsPlayer.stopAndDestroyAllBubbleEntranceSequenceItems()
            }, b.prototype.updateCurrentLineBet = function(a) {
                var b = null == this._currentLineBet;
                this._currentLineBet != a && (this._currentLineBet = a, b || this.resetGameReels(), this.transformCurrentReelsToWildsNoEvent())
            }, b.prototype.updateCurrentLineBetOnInit = function(a) {
                var b = null == this._currentLineBet;
                this._currentLineBet != a && (this._currentLineBet = a, b || this.resetGameReels(), this.snapCurrentReelsToWildsNoEvent())
            }, b.prototype.showIdleBubblesAfterSpinPressed = function() {
                this.removeAllBubbleAnimsAndSequences();
                var a = this.getAllNewBubbleLocs();
                this._bubbleOverlayAnimsPlayer.showIdleBubbleAnimsAtLocs(a), "BaseGame" == this._stageName && i.AudioPlayer.playBaseGameSpinBubbleSound()
            }, b.prototype.analyzeNewOutcome = function(a) {
                this._bubbleBoostDataProcessor.setNewGLR(a), this.setBoostState()
            }, b.prototype.handleBubblesOnInit = function(a) {
                this.updateCurrentLineBetOnInit(a), this.removeAllBubbleAnimsAndSequences(), this.showNewIdleBubblesBelowReels(!0)
            }, b.prototype.handleBubblesOnBetChange = function(a) {
                this.stopOldPopAnims(), this.updateCurrentLineBet(a), this.removeAllBubbleAnimsAndSequences(), this.resetGameReels(), this.showNewIdleBubblesBelowReels(!0), this.transformCurrentReelsToWildsNoEvent()
            }, b.prototype.replaceTransformedBonusSymbolsOnReels = function(a, b) {
                this._bubbleReelsHelper.replenishBonusSymbolsOnReels(a, "win", b)
            }, b.prototype.stopOldPopAnims = function() {
                this._bubbleReelsHelper.stopPopSymbolAnimsPlayingOnReels()
            }, b.handleBubblesActivatedIdleState = function() {
                i.AudioPlayer.playBaseGameBubblesIdleFadeSound()
            }, b.prototype.showBubbleEntranceAnimsBeforeReelStop = function() {
                var a = this._bubbleBoostDataProcessor.getBubbleTriggerLocs(this._stageName + g.BubbleBoostDataProcessor.PRE_BOOST_BUBBLES_TRIGGER_NAME_SUFFIX);
                this._bubbleEntranceAnimsPlayer.addEventListener(e.BubbleEntranceAnimsPlayer.ENTRANCE_INTRO_ANIM_DONE, this.onBubbleEntranceIntroAnimDone, this), this._bubbleEntranceAnimsPlayer.playEntranceIntroAnim(), i.AudioPlayer.playBaseGameConchSound(a)
            }, b.prototype.onBubbleEntranceIntroAnimDone = function(a) {
                this._bubbleEntranceAnimsPlayer.removeEventListener(e.BubbleEntranceAnimsPlayer.ENTRANCE_INTRO_ANIM_DONE, this.onBubbleEntranceIntroAnimDone, this);
                var b = this._bubbleBoostDataProcessor.getBubbleTriggerLocs(this._stageName + g.BubbleBoostDataProcessor.PRE_BOOST_BUBBLES_TRIGGER_NAME_SUFFIX);
                this._bubbleEntranceAnimsPlayer.addEventListener(e.BubbleEntranceAnimsPlayer.ENTRANCE_ANIMS_DONE, this.onBubbleEntranceAnimsDone, this), this._bubbleEntranceAnimsPlayer.playEntranceAnimsAtLocs(b)
            }, b.prototype.showBubbleFloatAnimsAfterBubbleEntranceAnims = function() {
                this.removeAllBubbleAnimsAndSequences();
                var a = this.getCurrentBubbleBoostState() == h.AnimationState.FeatureOff ? this._currentLineBet.toString() : this._currentLineBet.toString() + "On",
                    b = this._bubbleBoostDataProcessor.getAllFloatUpBubbleLocations(a);
                g.BubbleBoostDataProcessor.hasBubbleLocs(b) ? (this._bubbleOverlayAnimsPlayer.addEventListener(f.BubbleOverlayAnimsPlayer.FLOATING_ANIMS_DONE, this.onBubbleFloatAnimsDone, this), this._bubbleOverlayAnimsPlayer.playFloatUpBubbleAnimsAtLocs(b)) : this._noBubblesFloatUpDelayTimer.startSequence(!0)
            }, b.prototype.showBubbleExpandAnimsAfterReelsStop = function() {
                this.showNewIdleBubblesBelowReels(!0), this._bubbleOverlayAnimsPlayer.addEventListener(f.BubbleOverlayAnimsPlayer.EXPANDING_ANIMS_DONE, this.onBubbleExpandAnimsDone, this);
                var a = this.getAllNewBubbleLocs(),
                    b = this._bubbleReelsHelper.getBubbleExpandLocsFromCurrentLocs(a),
                    c = this._bubbleReelsHelper.getBubbleNoExpandLocsFromCurrentLocs(a);
                this._bubbleOverlayAnimsPlayer.playExpandBubbleAnimsAtLocs(b), this._bubbleOverlayAnimsPlayer.showIdleBubbleAnimsAtLocs(c)
            }, b.prototype.onBubbleBoostButtonClick = function(a) {
                this._boostActive = !this._boostActive
            }, b.prototype.onBubbleEntranceAnimsDone = function(a) {
                this._bubbleEntranceAnimsPlayer.removeEventListener(e.BubbleEntranceAnimsPlayer.ENTRANCE_ANIMS_DONE, this.onBubbleEntranceAnimsDone, this), this.dispatchEvent(new d.events.Event(b.BUBBLE_BOOST_DONE, null, this))
            }, b.prototype.onBubbleFloatAnimsDone = function(a) {
                this._bubbleOverlayAnimsPlayer.removeEventListener(f.BubbleOverlayAnimsPlayer.FLOATING_ANIMS_DONE, this.onBubbleFloatAnimsDone, this), this.removeAllBubbleAnimsAndSequences(), this._bubbleOverlayAnimsPlayer.showIdleBubbleAnimsAtLocs(this.getAllNewBubbleLocs()), this.dispatchEvent(new d.events.Event(b.BUBBLE_FLOATUP_DONE, null, this))
            }, b.prototype.onBubbleExpandAnimsDone = function(a) {
                this._bubbleOverlayAnimsPlayer.removeEventListener(f.BubbleOverlayAnimsPlayer.EXPANDING_ANIMS_DONE, this.onBubbleExpandAnimsDone, this), this.dispatchEvent(new d.events.Event(b.BUBBLE_PRESHOW_DONE, null, this))
            }, b.prototype.showOldIdleBubblesBelowReels = function(a) {
                a && this.removeAllBubbleAnimsAndSequences();
                var b = g.BubbleBoostDataProcessor.getBubbleLocsBelowReels(this.getAllOldBubbleLocs());
                this._bubbleOverlayAnimsPlayer.showIdleBubbleAnimsAtLocs(b)
            }, b.prototype.showNewIdleBubblesBelowReels = function(a) {
                a && this.removeAllBubbleAnimsAndSequences();
                var b = g.BubbleBoostDataProcessor.getBubbleLocsBelowReels(this.getAllNewBubbleLocs());
                this._bubbleOverlayAnimsPlayer.showIdleBubbleAnimsAtLocs(b)
            }, b.prototype.getAllNewBubbleLocs = function() {
                var a = this.getCurrentBubbleBoostState() == h.AnimationState.FeatureOff ? this._currentLineBet.toString() : this._currentLineBet.toString() + "On";
                return this._bubbleBoostDataProcessor.getCurrentBubbleLocsFromKVP(a, g.BubbleBoostDataProcessor.BUBBLE_LOCS_KEY_VALUE_PAIR_SUFFIX)
            }, b.prototype.getAllOldBubbleLocs = function() {
                var a = this.getCurrentBubbleBoostState() == h.AnimationState.FeatureOff ? this._currentLineBet.toString() : this._currentLineBet.toString() + "On";
                return this._bubbleBoostDataProcessor.getCurrentBubbleLocsFromKVP(a, g.BubbleBoostDataProcessor.OLD_BUBBLE_LOCS_KEY_VALUE_PAIR_SUFFIX)
            }, b.prototype.transformCurrentReelsToWildsNoEvent = function() {
                var a = this.getCurrentBubbleBoostState() == h.AnimationState.FeatureOff ? this._currentLineBet.toString() : this._currentLineBet.toString() + "On",
                    b = this._bubbleBoostDataProcessor.getTransformedCellLocs(a);
                this._bubbleReelsHelper.swapReelsToWild(b), this._bubbleReelsHelper.playSymbolAnimsOnReels(b, g.BubbleBoostDataProcessor.WILD_SYMBOL_NAME, "pop", !1)
            }, b.prototype.snapCurrentReelsToWildsNoEvent = function() {
                var a = this.getCurrentBubbleBoostState() == h.AnimationState.FeatureOff ? this._currentLineBet.toString() : this._currentLineBet.toString() + "On",
                    b = this._bubbleBoostDataProcessor.getTransformedCellLocs(a);
                this._bubbleReelsHelper.swapReelsToWild(b)
            }, b.prototype.transformCurrentReelsToWildsWithEvent = function() {
                var a = this.getCurrentBubbleBoostState() == h.AnimationState.FeatureOff ? this._currentLineBet.toString() : this._currentLineBet.toString() + "On",
                    c = this._bubbleBoostDataProcessor.getTransformedCellLocs(a);
                this._bubbleReelsHelper.swapReelsToWild(c), c.length > 0 ? (this._bubbleReelsHelper.addEventListener(j.BubbleReelsHelper.BUBBLE_POP_ANIMS_COMPLETE, this.onBubblePopAnimsDone, this), this._bubbleReelsHelper.playSymbolAnimsOnReels(c, g.BubbleBoostDataProcessor.WILD_SYMBOL_NAME, "pop", !1)) : this.dispatchEvent(new d.events.Event(b.BUBBLE_POP_DONE, null, this))
            }, b.prototype.bubblesExistOnReelsOnCurrentOutcome = function() {
                return g.BubbleBoostDataProcessor.getBubbleLocsArrayHasBubblesOnReels(this.getAllNewBubbleLocs())
            }, b.prototype.changeReelsForExpandedWilds = function() {
                var a = this._bubbleBoostDataProcessor.getBubbleTriggerLocsAsArray(this._stageName + g.BubbleBoostDataProcessor.BUBBLE_TRANSFORM_TRIGGER_NAME_SUFFIX),
                    c = g.BubbleBoostDataProcessor.getAllValidExpandingWildLocs(a),
                    e = g.BubbleBoostDataProcessor.getAllBubbleLocsOnReels(this.getAllNewBubbleLocs()),
                    f = g.BubbleBoostDataProcessor.getCombinedBubbleLocs(g.BubbleBoostDataProcessor.convertLocStringsToArray(c), e),
                    h = g.BubbleBoostDataProcessor.convertLocsArrayToStrings(f);
                this._bubbleReelsHelper.swapReelsToWild(h), h.length > 0 ? (this._bubbleReelsHelper.addEventListener(j.BubbleReelsHelper.BUBBLE_POP_ANIMS_COMPLETE, this.onBubblePopAnimsDone, this), this._bubbleReelsHelper.playSymbolAnimsOnReels(h, g.BubbleBoostDataProcessor.WILD_SYMBOL_NAME, "pop", !1)) : this.dispatchEvent(new d.events.Event(b.BUBBLE_POP_DONE, null, this))
            }, b.prototype.onBubblePopAnimsDone = function(a) {
                this._bubbleReelsHelper.removeEventListener(j.BubbleReelsHelper.BUBBLE_POP_ANIMS_COMPLETE, this.onBubblePopAnimsDone, this), this.dispatchEvent(new d.events.Event(b.BUBBLE_POP_DONE, null, this))
            }, b.prototype.revertCurrentReelsToNormal = function() {
                this._bubbleReelsHelper.stopAllSymbolAnimsOnReels(), this._bubbleReelsHelper.swapReels(this._bubbleBoostDataProcessor.getPopulationOutcomes(), this._stageName + g.BubbleBoostDataProcessor.NORMAL_REELS_POPULATION_OUTCOME_NAME_SUFFIX)
            }, b.prototype.stopBonusTriggerSymbolAnims = function() {
                this._bubbleReelsHelper.stopBonusAnimSequence()
            }, b.prototype.resetGameReels = function() {
                switch (this._bubbleReelsHelper.stopAllSymbolAnimsOnReels(), this._stageName) {
                    case "BaseGame":
                        this._bubbleReelsHelper.swapReels(this._bubbleBoostDataProcessor.getPopulationOutcomes(), this._stageName + g.BubbleBoostDataProcessor.INITIAL_REELS_POPULATION_OUTCOME_NAME_SUFFIX);
                        break;
                    case "FreeSpin":
                        this._bubbleReelsHelper.swapReels(this._bubbleBoostDataProcessor.getPopulationOutcomes(), this._stageName + g.BubbleBoostDataProcessor.INITIAL_FREE_SPIN_REELS_POPULATION_OUTCOME_NAME_SUFFIX)
                }
            }, b.prototype.noExpansionsOnCurrentOutcome = function() {
                return this._bubbleReelsHelper.noCurrentBubblesAboveTransformSymbols(this.getAllNewBubbleLocs())
            }, b.prototype.newBoostBubblesToShow = function() {
                return this._bubbleBoostDataProcessor.outcomeHasNewBoostBubbles()
            }, Object.defineProperty(b.prototype, "boostActive", {
                get: function() {
                    return this._boostActive
                },
                enumerable: !0,
                configurable: !0
            }), b.prototype.setBoostState = function() {
                this._boostActive = this._bubbleBoostDataProcessor.getNewBubbleBoostState()
            }, b.prototype.setCurrentOrientationOnTransitionIn = function(a) {
                this._bubbleOverlayAnimsPlayer.setStartingOrientationOnTransitionIn(a)
            }, b.prototype.removeEventListeners = function() {
                this._bubbleEntranceAnimsPlayer.removeEventListener(e.BubbleEntranceAnimsPlayer.ENTRANCE_INTRO_ANIM_DONE, this.onBubbleEntranceIntroAnimDone, this), this._bubbleEntranceAnimsPlayer.removeEventListener(e.BubbleEntranceAnimsPlayer.ENTRANCE_ANIMS_DONE, this.onBubbleEntranceAnimsDone, this), this._bubbleOverlayAnimsPlayer.removeEventListener(f.BubbleOverlayAnimsPlayer.FLOATING_ANIMS_DONE, this.onBubbleFloatAnimsDone, this), this._bubbleOverlayAnimsPlayer.removeEventListener(f.BubbleOverlayAnimsPlayer.EXPANDING_ANIMS_DONE, this.onBubbleExpandAnimsDone, this), this._bubbleReelsHelper.removeEventListener(j.BubbleReelsHelper.BUBBLE_POP_ANIMS_COMPLETE, this.onBubblePopAnimsDone, this), this._bubbleEntranceAnimsPlayer.removeEventListeners(), this._bubbleOverlayAnimsPlayer.removeEventListeners(), this._bubbleReelsHelper.removeEventListeners(), this._bubbleBoostButton && this._bubbleBoostButton.stopSequences()
            }, b.prototype.onNoBubblesFloatUpDelayDone = function(a) {
                this.dispatchEvent(new d.events.Event(b.BUBBLE_FLOATUP_DONE, null, this))
            }, b
        }(d.events.EventDispatcher);
        k.BUBBLE_BOOST_DONE = "BubbleBoostDone",
            k.BUBBLE_FLOATUP_DONE = "BubbleFloatUpDone", k.BUBBLE_PRESHOW_DONE = "BubblePreshowDone", k.BUBBLE_POP_DONE = "BubblePopDone", k.NO_BUBBLES_FLOATUP_EXTRA_DELAY = 900, b.BubbleBoostManager = k
    }), define("common/reels/ReelsHelper", ["require", "exports", "wcgf/sequencers/ParallelSequencer", "wcgf/vendors/typescript_collections/Dictionary", "common/audio/AudioPlayer"], function(a, b, c, d, e) {
        "use strict";
        var f = function() {
            function a(a) {
                this._anticipationAnimsClip = a, this.hideAnticipationAnims()
            }
            return a.prototype.setNewData = function(a) {
                this._curData = a, this._smartSoundsPlayed = 0
            }, a.prototype.hideAnticipationAnims = function() {
                this._anticipationAnimsClip.gotoAndStop("off")
            }, a.prototype.playAnticipationForReel = function(a) {
                this.hideAnticipationAnims();
                var b = "reel" + a,
                    c = "reel" + a + "Anim";
                this._anticipationAnimsClip[c] && (this._anticipationAnimsClip.gotoAndStop(b), this._anticipationAnimsClip[c].gotoAndPlay(0))
            }, a.prototype.getSpinDurationsForAllReels = function(a) {
                this._landingSymbolCells = null;
                var b = this._curData.gameLogicResponse.outcomeDetail.stage + ".Reels";
                return this.setSpecialSymbolLocs(b), a = this.addAnticipationToSpinDurations(a)
            }, a.prototype.addAnticipationToSpinDurations = function(b) {
                for (var c = 0; c < a.NUM_COLS; c++)
                    if (this.getAnticipationForReel(c))
                        for (var d = c; d < a.NUM_COLS; d++) b[d] += a.ANTICIPATION_DURATION;
                return b
            }, a.prototype.outcomeHasAnticipation = function() {
                for (var b = 2; b < a.NUM_COLS; b++)
                    if (this.getAnticipationForReel(b)) return !0;
                return !1
            }, a.prototype.getAnticipationForReel = function(b) {
                var c = this._curData.gameLogicResponse.populationOutcomes.getValue(this._curData.gameLogicResponse.outcomeDetail.stage + ".Reels");
                return !(b < 2 || b >= a.NUM_COLS) && this.getSymbolCountOnAllPreviousReels(c, b - 1, "b01") >= 2
            }, a.prototype.getPossibleBonusForReel = function(a, b) {
                if (b < 2) return !0;
                var c = this.getSymbolCountOnAllPreviousReels(a, b - 1, "b01");
                return 2 == b && c >= 0 || 3 == b && c >= 1 || 4 == b && c >= 2
            }, a.prototype.getSymbolCountOnAllPreviousReels = function(b, c, d) {
                return 0 == c ? a.getSymbolCountOnReel(b, c, d) : a.getSymbolCountOnReel(b, c, d) + this.getSymbolCountOnAllPreviousReels(b, c - 1, d)
            }, a.getSymbolCountOnReel = function(a, b, c) {
                for (var d = 0, e = a.reels.getValue("Reel" + b), f = 0, g = e.cells; f < g.length; f++) {
                    g[f].symbolId == c && d++
                }
                return d
            }, a.prototype.setSpecialSymbolLocs = function(b) {
                var c, d = [],
                    e = this,
                    f = this._curData.gameLogicResponse.populationOutcomes.getValue(b);
                f.reels.forEach(function(b, g) {
                    c = parseInt(b.charAt(b.length - 1));
                    for (var h in g.cells)
                        for (var i = 0, j = a.LANDING_SYMBOLS; i < j.length; i++) {
                            var k = j[i];
                            g.cells[h].symbolId == k && e.getPossibleBonusForReel(f, c) && d.push(g.cells[h])
                        }
                }), this._landingSymbolCells = d
            }, a.prototype.playReelStopSound = function() {
                var b = this._curData.gameLogicResponse.populationOutcomes.getValue(this._curData.gameLogicResponse.outcomeDetail.stage + ".Reels");
                a.getSymbolCountOnReel(b, this.currentReelIndex, "b01") && this.getPossibleBonusForReel(b, this.currentReelIndex) ? (this._smartSoundsPlayed++, e.AudioPlayer.playSound("smartSound" + Math.min(this._smartSoundsPlayed, a.MIN_BONUS_TRIGGER_SYMBOLS))) : e.AudioPlayer.playSound("reelClick")
            }, a.prototype.handleAnticipation = function() {
                this.getAnticipationForReel(this.currentReelIndex) && e.AudioPlayer.playSound("anticipation")
            }, a.prototype.getLandAnims = function() {
                if (this.landingSymbolCells.length) {
                    for (var a = this._curData.gameLogicResponse.populationOutcomes.getValue(this._curData.gameLogicResponse.outcomeDetail.stage + ".Reels"), b = new d.default, c = 0, e = this.landingSymbolCells; c < e.length; c++) {
                        var f = e[c],
                            g = parseInt(f.name.charAt(f.name.indexOf("C") + 1));
                        this.getPossibleBonusForReel(a, g) && b.setValue(f.name, "land")
                    }
                    return b
                }
                return null
            }, a.prototype.handleLandAnim = function(b) {
                this._landAnimationSequencer = new c.ParallelSequencer(b);
                var d = this._curData.gameLogicResponse.populationOutcomes.getValue(this._curData.gameLogicResponse.outcomeDetail.stage + ".Reels");
                a.getSymbolCountOnReel(d, this.currentReelIndex, "b01") && this.getPossibleBonusForReel(d, this.currentReelIndex) && this._landAnimationSequencer.startSequence()
            }, Object.defineProperty(a.prototype, "hasAnticipation", {
                get: function() {
                    return this.outcomeHasAnticipation()
                },
                enumerable: !0,
                configurable: !0
            }), Object.defineProperty(a.prototype, "landingSymbolCells", {
                get: function() {
                    return this._landingSymbolCells
                },
                enumerable: !0,
                configurable: !0
            }), Object.defineProperty(a.prototype, "currentReelIndex", {
                get: function() {
                    return this._currentReelIndex
                },
                set: function(a) {
                    this._currentReelIndex = a
                },
                enumerable: !0,
                configurable: !0
            }), a.prototype.stopSequences = function() {
                this._landAnimationSequencer && this._landAnimationSequencer.stopSequence(!0)
            }, a
        }();
        f.LANDING_SYMBOLS = ["b01"], f.MIN_BONUS_TRIGGER_SYMBOLS = 3, f.NUM_COLS = 5, f.ANTICIPATION_DURATION = 1600, b.ReelsHelper = f
    }), define("views/baseGame/tutorial/Tutorial", ["require", "exports", "wcgf/core/TextManager", "wcgf/coreComponents/TextFieldController", "wcgf/core/events", "wcgf/gameComponents/tutorial/TutorialManager", "wcgf/core/AssetManager", "wcgf/gameComponents/tutorial/TutorialControls", "wcgf/sequencers/ISequenceItem", "wcgf/gameComponents/tutorial/PageControls", "wcgf/coreComponents/BasicCheckBoxController", "wcgf/sequencers/TimerEventSequenceItem", "common/audio/AudioPlayer"], function(a, b, c, d, e, f, g, h, i, j, k, l, m) {
        "use strict";
        var n = function(a) {
            function b() {
                var b = a.call(this) || this;
                return b._currentLabelIndex = 0, b.tutorialId = "Tutorial", b._landscapeAnimId = "tutorial_landscape", b._portraitAnimId = "tutorial_portrait", b._labels = ["intro", "page1", "page2", "end"], b._delays = [0, 7e3, 9e3, 0], b
            }
            return __extends(b, a), b.prototype.init = function() {
                this._skin = g.AssetManager.getInstance().getAsset(this.tutorialId), this._landscapeAnim = this._skin[this._landscapeAnimId], null != this._landscapeAnim && (this._landscapeAnim.gotoAndStop(this._labels[0] || 0), this._landscapeAnim.visible = !1), this._portraitAnim = this._skin[this._portraitAnimId], null != this._portraitAnim && (this._portraitAnim.gotoAndStop(this._labels[0] || 0), this._portraitAnim.visible = !1), this._tutorialControls = new h.TutorialControls(null != this._landscapeAnim ? this._landscapeAnim.tutorialControls : null, null != this._portraitAnim ? this._portraitAnim.tutorialControls : null), this._tutorialControls.init(null), this._tutorialControls.addEventListener(h.TutorialControls.CLOSE_CLICK, this.onTutorialCloseClick, this), this._tutorialControls.addEventListener(j.PageControls.NEXT_BUTTON_CLICK, this.onNextButtonClick, this), this._tutorialControls.addEventListener(j.PageControls.LAST_BUTTON_CLICK, this.onLastButtonClick, this), this._tutorialControls.addEventListener(k.BasicCheckBoxController.CHECKED_VALUE_CHANGE, this.onCheckBoxValueChange, this), this._tutorialControls.setPage(0, this._labels.length - 1), this.onOrientationChange(null), g.AssetManager.getInstance().addEventListener(g.AssetManager.ORIENTATION_CHANGE, this.onOrientationChange, this);
                var a, b, e, f;
                null != this._landscapeAnim && (a = new d.TextFieldController(this._landscapeAnim.headerClip.textField), a.setText(c.TextManager.getInstance().getText("Tutorial_headerText")), b = new d.TextFieldController(this._landscapeAnim.page1.page1TextClip.textField), b.setText(c.TextManager.getInstance().getText("Tutorial_Page1text")), e = new d.TextFieldController(this._landscapeAnim.page2.page2TextClip.textField), e.setText(c.TextManager.getInstance().getText("Tutorial_Page2text")), f = new d.TextFieldController(this._landscapeAnim.page2.page2TextClip2.textField), f.setText(c.TextManager.getInstance().getText("Tutorial_Page2text2"))), null != this._portraitAnim && (a = new d.TextFieldController(this._portraitAnim.headerClip.textField), a.setText(c.TextManager.getInstance().getText("Tutorial_headerText")), b = new d.TextFieldController(this._portraitAnim.page1.page1TextClip.textField), b.setText(c.TextManager.getInstance().getText("Tutorial_Page1text")), e = new d.TextFieldController(this._portraitAnim.page2.page2TextClip.textField), e.setText(c.TextManager.getInstance().getText("Tutorial_Page2text")), f = new d.TextFieldController(this._portraitAnim.page2.page2TextClip2.textField), f.setText(c.TextManager.getInstance().getText("Tutorial_Page2text2")))
            }, b.prototype.start = function() {
                this._currentLabelIndex = 0, this.playLabel(this._currentLabelIndex), this.startAutoAdvanceDelay(this._currentLabelIndex), this.dispatchEvent(new e.events.Event(f.TutorialManager.TUTORIAL_START)), m.AudioPlayer.playSound("tutorialMusicLoop")
            }, b.prototype.playLabel = function(a) {
                null != this._currentAnim && (null != this._tutorialControls && this._tutorialControls.setPageControlEnable(!1), this._currentAnim.gotoAndStop(this._labels[a + 1]), this.handleAnimEnd())
            }, b.prototype.onAnimationEnd = function(a) {
                a.target.removeEventListener(i.sequencers.SEQUENCE_END, this.onAnimationEnd, this), this._currentSeq = null, this.handleAnimEnd()
            }, b.prototype.handleAnimEnd = function() {
                this._tutorialControls.setPageControlEnable(!0), this._currentLabelIndex >= this._labels.length - 2 ? (this.dispatchEvent(new e.events.Event(f.TutorialManager.TUTORIAL_END)), m.AudioPlayer.playSound("tutorialExitButton")) : this.startAutoAdvanceDelay(this._currentLabelIndex + 1)
            }, b.prototype.startAutoAdvanceDelay = function(a) {
                if (!(a >= this._delays.length)) {
                    var b = this._delays[a];
                    b > 0 && (this._autoAdvanceDelay = new l.TimerEventSequenceItem(b, this.onAutoAdvanceDone, null, this), this._autoAdvanceDelay.startSequence())
                }
            }, b.prototype.onAutoAdvanceDone = function() {
                this._autoAdvanceDelay = null, this.onNextButtonClick(null)
            }, b.prototype.onTutorialCloseClick = function(a) {
                null != this._currentSeq && (this._currentSeq.removeEventListener(i.sequencers.SEQUENCE_END, this.onAnimationEnd, this), this._currentSeq.stopSequence(), this._currentSeq = null), this.stopAutoAdvanceDelay(), null != this._landscapeAnim && this._landscapeAnim.stop(), null != this._portraitAnim && this._portraitAnim.stop(), this.dispatchEvent(new e.events.Event(f.TutorialManager.TUTORIAL_END)), m.AudioPlayer.playSound("tutorialExitButton"), m.AudioPlayer.playSound("spinButtonList")
            }, b.prototype.onNextButtonClick = function(a) {
                this.stopAutoAdvanceDelay(), this._currentLabelIndex++, this._tutorialControls.setPage(this._currentLabelIndex, this._labels.length - 1), this.playLabel(this._currentLabelIndex), m.AudioPlayer.playSound("tutorialPageRight")
            }, b.prototype.stopAutoAdvanceDelay = function() {
                null != this._autoAdvanceDelay && (this._autoAdvanceDelay.stopSequence(!0), this._autoAdvanceDelay = null, this._delays = [])
            }, b.prototype.onLastButtonClick = function(a) {
                this._currentLabelIndex >= 1 && (this.stopAutoAdvanceDelay(), this._currentLabelIndex--, this.playLabel(this._currentLabelIndex), this._tutorialControls.setPage(this._currentLabelIndex, this._labels.length - 1), m.AudioPlayer.playSound("tutorialPageLeft"))
            }, b.prototype.onCheckBoxValueChange = function(a) {
                var b = a.data;
                this.dispatchEvent(new e.events.Event("TutorialManagerTutorialChange", b)), m.AudioPlayer.playSound("tutorialDoNotShowAgain")
            }, b.prototype.stop = function() {}, b.prototype.onOrientationChange = function(a) {
                var b = g.AssetManager.getInstance().getOrientation(),
                    c = this._labels[0] || 0,
                    d = !0;
                null != this._currentAnim && (d = this._currentAnim.paused, c = this._currentAnim.currentFrame, this._currentAnim.stop()), b == g.AssetManager.LANDSCAPE_ORIENTATION && null != this._landscapeAnim ? (null != this._landscapeAnim && (this._landscapeAnim.visible = !0), null != this._portraitAnim && (this._portraitAnim.visible = !1), this._currentAnim = this._landscapeAnim) : null != this._portraitAnim && (null != this._landscapeAnim && (this._landscapeAnim.visible = !1), null != this._portraitAnim && (this._portraitAnim.visible = !0), this._currentAnim = this._portraitAnim), null != this._currentSeq && null != this._currentAnim && (this._currentSeq.mc = this._currentAnim), d ? null != this._currentAnim && this._currentAnim.gotoAndStop(c) : null != this._currentAnim && this._currentAnim.gotoAndPlay(c), this._tutorialControls.setPage(this._currentLabelIndex, this._labels.length - 1)
            }, b
        }(e.events.EventDispatcher);
        b.Tutorial = n
    }), define("common/plaques/BubbleBoostPlaqueController", ["require", "exports", "wcgf/coreComponents/GenericPlaqueController"], function(a, b, c) {
        "use strict";
        var d = function(a) {
            function b() {
                return a.call(this) || this
            }
            return __extends(b, a), b.prototype.init = function(b) {
                a.prototype.init.call(this, b), this._bubbleBoostPromptPlaque = this.setLabeledViewController("bubbleBoostPromptPlaque", "bubbleBoostPromptMessage"), this._pfsBubbleBoostDisabledPlaque = this.setLabeledViewController("pfsBubbleBoostDisabledPlaque", "pfsBubbleBoostDisabledMessage")
            }, Object.defineProperty(b.prototype, "bubbleBoostPromptPlaque", {
                get: function() {
                    return this._bubbleBoostPromptPlaque
                },
                set: function(a) {
                    this._bubbleBoostPromptPlaque = a
                },
                enumerable: !0,
                configurable: !0
            }), b.prototype.displayBubbleBoostPromptPlaque = function(a) {
                null != this._bubbleBoostPromptPlaque && (this._bubbleBoostPromptPlaque.visible = a)
            }, Object.defineProperty(b.prototype, "pfsBubbleBoostDisabledPlaque", {
                get: function() {
                    return this._pfsBubbleBoostDisabledPlaque
                },
                set: function(a) {
                    this._pfsBubbleBoostDisabledPlaque = a
                },
                enumerable: !0,
                configurable: !0
            }), b.prototype.displayPFSBubbleBoostDisabledPlaque = function(a) {
                null != this._pfsBubbleBoostDisabledPlaque && (this._pfsBubbleBoostDisabledPlaque.visible = a)
            }, b
        }(c.GenericPlaqueController);
        b.BubbleBoostPlaqueController = d
    }), define("views/baseGame/BaseGameView", ["require", "exports", "wcgf/messageBus/GameMsgBus", "wcgf/core/AssetManager", "wcgf/core/events", "wcgf/vendors/typescript_collections/Dictionary", "wcgf/gameComponents/reels/slotsReelSet/SlotsReelSet", "wcgf/coreComponents/GenericMessageController", "wcgf/coreComponents/GenericStepperController", "wcgf/sequencers/TimerEventSequenceItem", "wcgf/gameComponents/RollupIncrementer", "wcgf/gameComponents/BetManager", "wcgf/sequencers/ISequenceItem", "wcgf/gameComponents/tutorial/TutorialManager", "wcgf/messageBus/ConsoleBusProxy", "views/baseGame/BaseControlsView", "common/wincycle/WinCycle", "common/view/StageView", "common/wincycle/WinSequencer", "common/reels/SpinStrategy", "common/bubbleBoost/BubbleBoostManager", "common/reels/ReelsHelper", "common/audio/AudioPlayer", "views/baseGame/tutorial/Tutorial", "common/plaques/BubbleBoostPlaqueController", "common/bubbleBoost/button/BubbleBoostButton", "Game"], function(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, A) {
        "use strict";
        var B = function(a) {
            function b(e) {
                var i = a.call(this, e, "GameViewSkin", "BaseGame") || this;
                i._prizeNames = ["BaseGame.Lines", "BaseGame.Scatter", "FreeSpin.Total"], i._tutorialShown = !1, i._enable = !1, i._spinStarted = !1, i._rollupComplete = !1, i._firstCycleComplete = !1, i._beginNewGame = !1, i._exitStage = !1, i._autoSpinPauseSeq = new j.TimerEventSequenceItem(1e3), i._bubbleAudioIdleSeq = new j.TimerEventSequenceItem(15e3), i._skinList = ["Paylines", "WinBoxes", "Messages", "Plaques", "ControlSkin"], i._currentOrientation = d.AssetManager.LANDSCAPE_ORIENTATION, i._gameChannel = e.assetPack, i._msgBus = c.GameMsgBus.getInstance(), i._assetManager = d.AssetManager.getInstance(), i._messageContainer = new createjs.Container, i._tutorialManager = new n.TutorialManager, i._reelSet = new g.SlotsReelSet("Symbols", i._assetManager.getAsset("ReelsContainer"));
                var k = new f.default;
                return k.setValue("s01", 1), k.setValue("w01", 2), i._reelSet.symbolsPriority = k, i._reelSet.addEventListener(g.SlotsReelSet.ALL_REEL_STOP, i.onAllReelStop, i), i._reelSet.addEventListener(g.SlotsReelSet.REEL_STOP_SPIN_BEGIN, i.onReelStopSpinBegin, i), i._reelSet.addEventListener(g.SlotsReelSet.REEL_STOP_SPIN_END, i.onReelStopSpinEnd, i), i._bubbleBoostManager = new u.BubbleBoostManager(i._gameChannel, "BaseGame"), i._baseControlsView = new p.BaseControlsView, i._winSequencer = new s.WinSequencer(i._reelSet, i.stageName), i._messageController = new h.GenericMessageController, i._reelsHelper = new v.ReelsHelper(i._assetManager.getAsset("AnticipationContainer")), i._plaqueController = new y.BubbleBoostPlaqueController, i._playerSessionStartsInBaseGame = !1, i._bubbleBoostPromptPlaqueHideDelayTimer = new j.TimerEventSequenceItem(b.BUBBLE_BOOST_PROMPT_PLAQUE_DISPLAY_DELAY, i.onBubbleBoostPromptPlaqueDelayDone, null, i, 1), i._pfsEnabled = !1, i._tutorialDisabled = !1, i
            }
            return __extends(b, a), b.prototype.doInit = function(a) {
                this._assetManager.addEventListener(d.AssetManager.ORIENTATION_CHANGE, this.onOrientationChange_BaseGameView, this), this._gameStatus = a.gameLogicResponse.outcomeDetail.gameStatus, this._baseControlsView.init(a, this._pfsEnabled), this._tutorialManager.init(this._messageContainer, this._assetManager.getAsset("messageLoader")), this._reelSet.stripInfoName = b.getStripInfoName(a.gameLogicResponse), this._reelSet.populationOutcomeName = this.stageName + ".Reels";
                var c = new f.default;
                c.setValue("s01", 10), c.setValue("s02", 10), c.setValue("s03", 10), c.setValue("s04", 10), c.setValue("s05", 10), c.setValue("s06", 10), c.setValue("s07", 10), c.setValue("s08", 10), c.setValue("s09", 10), c.setValue("b01", 10), c.setValue("w01", 10), this._spinStrategies = b.getSpinStrategies(5), this._reelSet.init(this._spinStrategies, a.paytableResponse.stripsInfo, a.gameLogicResponse.populationOutcomes, c), this._reelsHelper.hideAnticipationAnims(), this._messageController.init(), this._plaqueController.init(a), this.hideBubbleBoostPromptPlaque(), this._winSequencer.init(a, this._prizeNames), this._bubbleBoostManager.setBubbleBoostButton(this._baseControlsView.bubbleBoostButton), this._bubbleBoostManager.init(a.gameLogicResponse, d.AssetManager.getInstance(), this._skin, this._assetManager.getAsset("bubbleEntranceAnimIntroLandscape"), this._assetManager.getAsset("bubbleEntranceAnimIntroPortrait"), this._assetManager.getAsset("bubbleEntranceAnimsLandscape"), this._assetManager.getAsset("bubbleEntranceAnimsPortrait"), this._reelSet), this._pfsEnabled ? this._bubbleBoostManager.handleBubblesOnInit(1) : this._bubbleBoostManager.handleBubblesOnInit(parseInt(a.gameLogicResponse.patternSliderInput.betPerPattern))
            }, b.prototype.doAdditionalInit = function(a) {
                this._baseControlsView.state = p.ControlsState.Disable, this._baseGameBackgroundLandscape = this._assetManager.getAsset("baseGameBackgroundLandscape"), null != this._baseGameBackgroundLandscape && (this._baseGameBackgroundLandscape.gotoAndStop(0), this._baseGameBackgroundLandscape.visible = !1, this._baseGameBackgroundLandscape.loop = !0), this._baseGameBackgroundPortrait = this._assetManager.getAsset("baseGameBackgroundPortrait"), null != this._baseGameBackgroundPortrait && (this._baseGameBackgroundPortrait.gotoAndStop(0), this._baseGameBackgroundPortrait.visible = !1, this._baseGameBackgroundPortrait.loop = !0);
                var b = "FreeSpin" == a.gameLogicResponse.outcomeDetail.stage && "BaseGame" == a.gameLogicResponse.outcomeDetail.nextStage;
                this._baseGameBackgroundPlaying && !b || this.playBaseGameBackground(this._currentOrientation), b && this._bubbleBoostManager.snapCurrentReelsToWildsNoEvent(), this.addEventListeners()
            }, b.getStripInfoName = function(a) {
                var c = a.triggerOutcome;
                if (null != c.getValue(b.RSS_TRIGGER_OUTCOME_NAME)) {
                    var d = c.getValue(b.RSS_TRIGGER_OUTCOME_NAME);
                    if (d.trigger.length > 0) return d.trigger[0].name
                }
                return "BaseGame.ReelSet0"
            }, b.getSpinStrategies = function(a) {
                for (var b = new f.default, c = 0; c < a; c++) b.setValue("Reel" + c, new t.SpinStrategy);
                return b
            }, b.prototype.onBeforeShowStage = function(a) {
                this._plaqueController.displayPFSBubbleBoostDisabledPlaque(!1)
            }, b.prototype.onSpinButtonClick = function(a) {
                this.startSpin(), w.AudioPlayer.playSound("onUiSpin")
            }, b.prototype.showBubbleBoostPromptPlaque = function() {
                this._plaqueController.displayBubbleBoostPromptPlaque(!0), this._bubbleBoostPromptPlaqueHideDelayTimer.startSequence(!0)
            }, b.prototype.hideBubbleBoostPromptPlaque = function() {
                this._plaqueController.displayBubbleBoostPromptPlaque(!1), this._bubbleBoostPromptPlaqueHideDelayTimer.isSequenceStarted && this._bubbleBoostPromptPlaqueHideDelayTimer.stopSequence(!0)
            }, b.prototype.startSpin = function() {
                this.clearEvents(), this._plaqueController.hideCurrentPlaque(), this.hideBubbleBoostPromptPlaque(), this._bubbleBoostManager.revertCurrentReelsToNormal(), this._bubbleBoostManager.showIdleBubblesAfterSpinPressed(), this._baseControlsView.state = p.ControlsState.Spinning, this._baseControlsView.resetWin(), this._reelsHelper.currentReelIndex = 0, this._reelsHelper.hideAnticipationAnims(), this._firstCycleComplete = !1, this._rollupComplete = !1, this._beginNewGame = !1, this.nextStage(), this._bubbleAudioIdleSeq.hasEventListener(m.sequencers.SEQUENCE_END, this.onBubbleIdleDone, this) && (this._bubbleAudioIdleSeq.removeEventListener(m.sequencers.SEQUENCE_END, this.onBubbleIdleDone, this), this._bubbleAudioIdleSeq.resetSequence()), this._spinStarted = !0, this._spinStrategies.forEach(function(a, b) {
                    b.spinSpeed = 2
                }), this._reelSet.spin()
            }, b.prototype.onSkipButtonClick = function(a) {
                this._winSequencer.skipSequence(), this._baseControlsView.skipRollup()
            }, b.prototype.onAutoPlayChoicesClick = function(a) {
                this.startSpin()
            }, b.prototype.onAutoPlayStopClick = function(a) {
                this._autoSpinPauseSeq.hasEventListener(m.sequencers.SEQUENCE_END, this.startSpin, this) && this._autoSpinPauseSeq.removeEventListener(m.sequencers.SEQUENCE_END, this.startSpin, this), this._baseControlsView.state == p.ControlsState.AutoSpinIdle && (this._baseControlsView.state = p.ControlsState.Idle)
            }, b.prototype.onAutoPlayClick = function(a) {
                this._baseControlsView.state = p.ControlsState.Disable
            }, b.prototype.onAutoPlayChoicesCancelClick = function(a) {
                this._baseControlsView.state = p.ControlsState.Idle
            }, b.prototype.onBetLineValueChange = function(a) {
                this._plaqueController.hideCurrentPlaque(), this.clearEvents(), this._baseControlsView.resetWin(), this._bubbleBoostManager.handleBubblesOnBetChange(l.BetManager.getInstance().currentBetPerPattern), this._bubbleAudioIdleSeq.hasEventListener(m.sequencers.SEQUENCE_END, this.onBubbleIdleDone, this) || this._bubbleAudioIdleSeq.addEventListener(m.sequencers.SEQUENCE_END, this.onBubbleIdleDone, this), this._bubbleAudioIdleSeq.startSequence(!0), this.hideBubbleBoostPromptPlaque()
            }, b.prototype.onStartGameInitial = function(a) {}, b.prototype.showTutorial = function() {
                "InProgress" == this._gameStatus || this._tutorialShown ? this.onTutorialEnd(null) : (this._tutorialShown = !0, this._tutorialDisabled || (this._baseControlsView.state = p.ControlsState.Disable, this._tutorialManager.addEventListener(n.TutorialManager.TUTORIAL_END, this.onTutorialEnd, this), this._tutorial = new x.Tutorial, this._tutorial.addEventListener("TutorialManagerTutorialChange", this.onTutorialChange, this), this._tutorialManager.showTutorial(this._tutorial)))
            }, b.prototype.onTutorialEnd = function(a) {
                this._tutorialManager.removeEventListener(n.TutorialManager.TUTORIAL_END, this.onTutorialEnd, this), this._tutorial.removeEventListener("TutorialManagerTutorialChange", this.onTutorialChange, this), this._tutorial = null, w.AudioPlayer.playSound("gameIntro"), o.ConsoleBusProxy.getInstance().enableBetControlConsole(), this._baseControlsView.state = p.ControlsState.Idle, this._baseGameBackgroundPlaying || this.playBaseGameBackground(this._currentOrientation), this._playerSessionStartsInBaseGame && !this._pfsEnabled && this._bubbleBoostManager.getCurrentBubbleBoostState() == z.AnimationState.FeatureOff && this.showBubbleBoostPromptPlaque()
            }, b.prototype.onTutorialChange = function(a) {
                this._msgBus.dispatchEvent(new e.events.Event(c.GameMsgBus.PREFERENCE, {
                    Preference: {
                        Tutorial: a.data ? "Off" : "On"
                    }
                }))
            }, b.prototype.onBeforeRequest = function(a) {
                this.nextStage()
            }, b.prototype.onMakeRequest = function(a) {
                this._pfsEnabled ? this._msgBus.dispatchEvent(new e.events.Event(c.GameMsgBus.PLAY_DATA, {
                    ActionInput: {
                        Action: "play"
                    },
                    PatternSliderInput: {
                        BetPerPattern: 1,
                        PatternsBet: 100
                    }
                })) : l.BetManager.getInstance().playAction(), this.nextStage()
            }, b.prototype.onAccountBalance = function(a) {}, b.prototype.onResolveStage = function(a) {
                if (this._eventData = a, this._baseControlsView.state = p.ControlsState.Resolving, this._bubbleBoostManager.analyzeNewOutcome(a.data.gameLogicResponse), this._reelSet.stripInfoName = b.getStripInfoName(a.data.gameLogicResponse), this._reelSet.populationOutcomeName = this.stageName + ".Reels", this._winSequencer.setWinOutcome(a), a.data.gameLogicResponse.outcomeDetail.nextStage != this.stageName && (this._exitStage = !0), this._reelsHelper.setNewData(a.data), this._baseGameStopSpinPopulationOutcomes = a.data.gameLogicResponse.populationOutcomes, null != a.data.gameLogicResponse.promotionalFreeSpin) {
                    var c = a.data.gameLogicResponse.promotionalFreeSpin.count.toString();
                    this._baseControlsView.updatePromoFS(c), this._baseControlsView.setPromoFSCount(a.data)
                }
                this._spinStarted ? (this._spinStarted = !1, this._bubbleBoostManager.boostActive && this._bubbleBoostManager.newBoostBubblesToShow() ? (this._bubbleBoostManager.addEventListener(u.BubbleBoostManager.BUBBLE_BOOST_DONE, this.onBubbleBoostDone, this), this._bubbleBoostManager.showBubbleEntranceAnimsBeforeReelStop()) : (this._bubbleBoostManager.addEventListener(u.BubbleBoostManager.BUBBLE_FLOATUP_DONE, this.onBubbleFloatUpDone, this), this._bubbleBoostManager.showBubbleFloatAnimsAfterBubbleEntranceAnims())) : this.handleAllReelStop()
            }, b.prototype.onReelStopSpinBegin = function(a) {
                this._reelsHelper.playReelStopSound();
                var b = this._reelsHelper.getLandAnims();
                if (null != b) {
                    var c = this._winSequencer.winCycle.getSymbolSequences(b);
                    this._reelsHelper.handleLandAnim(c)
                }
                this._reelsHelper.currentReelIndex++, this._reelsHelper.hideAnticipationAnims(), this._reelsHelper.handleAnticipation(), this._reelsHelper.hasAnticipation && this._reelsHelper.getAnticipationForReel(this._reelsHelper.currentReelIndex) && (this._spinStrategies.getValue("Reel" + this._reelsHelper.currentReelIndex).spinSpeed = 4, this._reelsHelper.playAnticipationForReel(this._reelsHelper.currentReelIndex))
            }, b.prototype.onReelStopSpinEnd = function(a) {}, b.prototype.onAllReelStop = function(a) {
                this.handleAllReelStop()
            }, b.prototype.handleAllReelStop = function() {
                this._reelsHelper.hideAnticipationAnims(), this._bubbleBoostManager.noExpansionsOnCurrentOutcome() ? (this._bubbleBoostManager.showNewIdleBubblesBelowReels(!0), this._bubbleBoostManager.bubblesExistOnReelsOnCurrentOutcome() ? (this._bubbleBoostManager.addEventListener(u.BubbleBoostManager.BUBBLE_POP_DONE, this.onBubblePopAnimsDone, this), this._bubbleBoostManager.transformCurrentReelsToWildsWithEvent()) : this.handleWinSeq(this._eventData)) : (this._bubbleBoostManager.addEventListener(u.BubbleBoostManager.BUBBLE_PRESHOW_DONE, this.onBubblePreshowDone, this), this._bubbleBoostManager.showBubbleExpandAnimsAfterReelsStop(), w.AudioPlayer.playSound("bubbleExplosion"))
            }, b.prototype.onBubbleBoostDone = function(a) {
                this._bubbleBoostManager.removeEventListener(u.BubbleBoostManager.BUBBLE_BOOST_DONE, this.onBubbleBoostDone, this), this._bubbleBoostManager.addEventListener(u.BubbleBoostManager.BUBBLE_FLOATUP_DONE, this.onBubbleFloatUpDone, this), this._bubbleBoostManager.showBubbleFloatAnimsAfterBubbleEntranceAnims()
            }, b.prototype.onBubbleFloatUpDone = function(a) {
                this._bubbleBoostManager.removeEventListener(u.BubbleBoostManager.BUBBLE_FLOATUP_DONE, this.onBubbleFloatUpDone, this);
                var c = b.DEFAULT_SPIN_DURATION.concat();
                c = this._reelsHelper.getSpinDurationsForAllReels(c), this._reelSet.stopSpin(this._baseGameStopSpinPopulationOutcomes, c)
            }, b.prototype.onBubblePreshowDone = function(a) {
                this._bubbleBoostManager.removeEventListener(u.BubbleBoostManager.BUBBLE_PRESHOW_DONE, this.onBubblePreshowDone, this), this._bubbleBoostManager.showNewIdleBubblesBelowReels(!0), this._bubbleBoostManager.bubblesExistOnReelsOnCurrentOutcome() ? (this._bubbleBoostManager.addEventListener(u.BubbleBoostManager.BUBBLE_POP_DONE, this.onBubblePopAnimsDone, this), this._bubbleBoostManager.changeReelsForExpandedWilds()) : this.nextStage()
            }, b.prototype.onBubblePopAnimsDone = function(a) {
                this._bubbleBoostManager.removeEventListener(u.BubbleBoostManager.BUBBLE_POP_DONE, this.onBubblePopAnimsDone, this), this.handleWinSeq(this._eventData)
            }, b.prototype.onEndGame = function(a) {
                1 == a.data.gameLogicResponse.awardCapOutcome.awardCapExceeded && "FreeSpin" == a.data.gameLogicResponse.outcomeDetail.stage && (this._plaqueController.displayLabeledTextField(this._plaqueController.maxAwardPlaque, a.data.paytableResponse.awardCapInfo.currencyCap.awardCap), this._baseControlsView.state = p.ControlsState.Idle, this._baseControlsView.updateWin(a.data)), this.nextStage()
            }, b.prototype.handleWinSeq = function(a) {
                this._exitStage ? (this._exitStage = !1, this.nextStage()) : ("FreeSpin" == a.data.gameLogicResponse.outcomeDetail.stage && this._winSequencer.setWinOutcome(a), a.data.gameLogicResponse.awardCapOutcome.awardCapExceeded ? (this._plaqueController.displayLabeledTextField(this._plaqueController.maxAwardPlaque, a.data.paytableResponse.awardCapInfo.currencyCap.awardCap), this._baseControlsView.state = p.ControlsState.Idle, this._baseControlsView.updateWin(a.data), this.nextStage()) : (this.handleWinCelebration(a), this._bubbleAudioIdleSeq.addEventListener(m.sequencers.SEQUENCE_END, this.onBubbleIdleDone, this), this._bubbleAudioIdleSeq.startSequence(!0)))
            }, b.prototype.handleIdleControlState = function() {
                this._baseControlsView.handleAutoPlayEnd(), this._baseControlsView.promoFSCount <= 0 ? (this._baseControlsView.state = p.ControlsState.Disable, this._baseControlsView.bubbleBoostButton.promotionalFreeSpinsEnabled = !1) : this._baseControlsView.autoSpinIsActive() ? this._baseControlsView.state = p.ControlsState.AutoSpinIdle : this._baseControlsView.state = p.ControlsState.Idle
            }, b.prototype.handleWinCelebration = function(a) {
                if (this._baseGameBackgroundPlaying || this.playBaseGameBackground(this._currentOrientation), this._winSequencer.winCycleHelper.hasPrize()) {
                    this._baseControlsView.setPayout(a.data), this._baseControlsView.setRollupSequence(), this._baseControlsView.state = p.ControlsState.Rollup, this._baseControlsView.rollup.addEventListener(k.RollupIncrementer.ROLLUP_COMPLETE, this.onRollupComplete, this), this._baseControlsView.skipEnable = !0, this._baseControlsView.autoSpinIsActive() && this._winSequencer.winCycle.addEventListener(q.WinCycle.FIRST_CYCLE_DONE, this.onFirstCycleComplete, this), this._winSequencer.setWinCelebration(a, this._baseControlsView.rollup), this._winSequencer.startSequence();
                    var b = a.data.gameLogicResponse.prizeOutcomes.getValue("Game.Total").pay,
                        c = l.BetManager.getInstance().totalBet;
                    w.AudioPlayer.getInstance().playBaseGameRollup(c, b / c)
                } else this._firstCycleComplete = !0, this._rollupComplete = !0, w.AudioPlayer.getInstance().stopBaseGameRollup(), this.nextStage()
            }, b.prototype.onFirstCycleComplete = function(a) {
                this._firstCycleComplete = !0, this._baseControlsView.autoSpinIsActive() && (this.clearEvents(), this._rollupComplete && this.handleAutoSpin())
            }, b.prototype.onRollupComplete = function(a) {
                this._rollupComplete = !0, w.AudioPlayer.getInstance().stopBaseGameRollup(), this.nextStage()
            }, b.prototype.onBubbleIdleDone = function(a) {
                this._bubbleAudioIdleSeq.removeEventListener(m.sequencers.SEQUENCE_END, this.onBubbleIdleDone, this), u.BubbleBoostManager.handleBubblesActivatedIdleState()
            }, b.prototype.handleAutoSpin = function() {
                this._baseControlsView.autoSpinIsActive() && this._firstCycleComplete && this._beginNewGame && (this._autoSpinPauseSeq.addEventListener(m.sequencers.SEQUENCE_END, this.startSpin, this), this._autoSpinPauseSeq.startSequence())
            }, b.prototype.handlePromoFreeSpin = function() {
                this._baseControlsView.promoFSCount <= 0 && (this._baseControlsView.state = p.ControlsState.Disable, this._baseControlsView.bubbleBoostButton.promotionalFreeSpinsEnabled = !1)
            }, b.prototype.clearEvents = function() {
                this._winSequencer.clearEvents(), this._winSequencer.winCycle.hasEventListener(q.WinCycle.FIRST_CYCLE_DONE, this.onFirstCycleComplete, this) && this._winSequencer.winCycle.removeEventListener(q.WinCycle.FIRST_CYCLE_DONE, this.onFirstCycleComplete, this), this._baseControlsView.rollup.hasEventListener(k.RollupIncrementer.ROLLUP_COMPLETE, this.onRollupComplete, this) && this._baseControlsView.rollup.removeEventListener(k.RollupIncrementer.ROLLUP_COMPLETE, this.onRollupComplete, this), this._autoSpinPauseSeq.hasEventListener(m.sequencers.SEQUENCE_END, this.startSpin, this) && this._autoSpinPauseSeq.removeEventListener(m.sequencers.SEQUENCE_END, this.startSpin, this)
            }, b.prototype.onBeginNewGame = function(a) {
                this._beginNewGame = !0, this.handleIdleControlState(), this.handlePromoFreeSpin(), this.handleAutoSpin()
            }, b.prototype.onEnterNextStage = function(a) {
                a.data.gameLogicResponse.awardCapOutcome.awardCapExceeded ? this.nextStage() : (this._winSequencer.setWinOutcome(a), this.handleWinCelebration(a))
            }, b.prototype.onExitStage = function(a) {
                this._playerSessionStartsInBaseGame = !1, this.transitionOut(a)
            }, b.prototype.onAbortNextStage = function(a) {
                this._baseControlsView.state = p.ControlsState.Disable, this._reelSet.reset(a.data.gameLogicResponse.populationOutcomes), this.nextStage()
            }, b.prototype.onResetNextStage = function(a) {
                this._baseControlsView.state = p.ControlsState.Idle
            }, b.prototype.transitionOut = function(a) {
                this._winSequencer.setBonusSequence(), this._winSequencer.startSequence(),
                    this._bubbleBoostManager.replaceTransformedBonusSymbolsOnReels(a.data, !0), this._plaqueController.displayLabelView(this._plaqueController.pressStartToSpin), this._baseControlsView.state = p.ControlsState.BonusIdle
            }, b.prototype.onStartButtonClick = function(a) {
                this.clearEvents(), this._plaqueController.hideCurrentPlaque(), this._bubbleBoostManager.stopBonusTriggerSymbolAnims(), this._baseControlsView.state = p.ControlsState.BonusTransition, this.stopBaseGameBackground(), w.AudioPlayer.playSound("startButton"), this.dispatchEvent(new e.events.Event(A.Game.TRANSITION_READY))
            }, b.prototype.addBusListeners = function() {
                this._msgBus.addEventListener(c.GameMsgBus.START_GAME_INITIAL, this.onStartGameInitial, this), this._msgBus.addEventListener(c.GameMsgBus.BEFORE_REQUEST, this.onBeforeRequest, this), this._msgBus.addEventListener(c.GameMsgBus.MAKE_REQUEST, this.onMakeRequest, this), this._msgBus.addEventListener(c.GameMsgBus.RESOLVE_STAGE, this.onResolveStage, this), this._msgBus.addEventListener(c.GameMsgBus.END_GAME, this.onEndGame, this), this._msgBus.addEventListener(c.GameMsgBus.BEGIN_NEW_GAME, this.onBeginNewGame, this), this._msgBus.addEventListener(c.GameMsgBus.ACCOUNT_BALANCES, this.onAccountBalance, this), this._msgBus.addEventListener(c.GameMsgBus.BEFORE_SHOW_STAGE, this.onBeforeShowStage, this), this._msgBus.addEventListener(c.GameMsgBus.ENTER_NEXT_STAGE, this.onEnterNextStage, this), this._msgBus.addEventListener(c.GameMsgBus.EXIT_STAGE, this.onExitStage, this), this._msgBus.addEventListener(c.GameMsgBus.ABORT_NEXT_STAGE, this.onAbortNextStage, this), this._msgBus.addEventListener(c.GameMsgBus.RESET_NEXT_STAGE, this.onResetNextStage, this), this._baseControlsView.addBusListeners()
            }, b.prototype.removeBusListeners = function() {
                this._msgBus.removeEventListener(c.GameMsgBus.START_GAME_INITIAL, this.onStartGameInitial, this), this._msgBus.removeEventListener(c.GameMsgBus.BEFORE_REQUEST, this.onBeforeRequest, this), this._msgBus.removeEventListener(c.GameMsgBus.MAKE_REQUEST, this.onMakeRequest, this), this._msgBus.removeEventListener(c.GameMsgBus.RESOLVE_STAGE, this.onResolveStage, this), this._msgBus.removeEventListener(c.GameMsgBus.END_GAME, this.onEndGame, this), this._msgBus.removeEventListener(c.GameMsgBus.BEGIN_NEW_GAME, this.onBeginNewGame, this), this._msgBus.removeEventListener(c.GameMsgBus.ACCOUNT_BALANCES, this.onAccountBalance, this), this._msgBus.removeEventListener(c.GameMsgBus.BEFORE_SHOW_STAGE, this.onBeforeShowStage, this), this._msgBus.removeEventListener(c.GameMsgBus.ENTER_NEXT_STAGE, this.onEnterNextStage, this), this._msgBus.removeEventListener(c.GameMsgBus.EXIT_STAGE, this.onExitStage, this), this._msgBus.removeEventListener(c.GameMsgBus.ABORT_NEXT_STAGE, this.onAbortNextStage, this), this._msgBus.removeEventListener(c.GameMsgBus.RESET_NEXT_STAGE, this.onResetNextStage, this), this._baseControlsView.removeBusListeners()
            }, b.prototype.nextStage = function() {
                this._msgBus.dispatchEvent(new e.events.Event(c.GameMsgBus.NEXT_STAGE))
            }, b.prototype.addToStage = function(a) {
                a.addChild(this.skin);
                for (var b = 0, c = this._skinList; b < c.length; b++) {
                    var d = c[b];
                    a.addChild(this._assetManager.getSkin(d))
                }
                a.addChild(this._messageContainer), this.addBusListeners(), this._enable = !0
            }, b.prototype.removeFromStage = function(a) {
                a.removeChild(this.skin);
                for (var b = 0, c = this._skinList; b < c.length; b++) {
                    var d = c[b];
                    a.removeChild(this._assetManager.getSkin(d))
                }
                this.removeEventListeners(), this.removeBusListeners(), this._enable = !1
            }, b.prototype.removeChild = function(a) {
                this._skin.removeChild(this._assetManager.getSkin(a))
            }, Object.defineProperty(b.prototype, "enable", {
                get: function() {
                    return this._enable
                },
                set: function(a) {
                    this._enable != a && (this._enable = a, a ? this.enableControls(!0) : this.enableControls(!1))
                },
                enumerable: !0,
                configurable: !0
            }), b.prototype.enableControls = function(a) {
                void 0 === a && (a = !0), this._baseControlsView.state = a ? p.ControlsState.Idle : p.ControlsState.Disable
            }, b.prototype.addEventListeners = function() {
                this._isInit && (this._baseControlsView.addEventListener(p.BaseControlsView.SPIN_BUTTON_CLICK, this.onSpinButtonClick, this), this._baseControlsView.addEventListener(p.BaseControlsView.SKIP_BUTTON_CLICK, this.onSkipButtonClick, this), this._baseControlsView.addEventListener(p.BaseControlsView.START_BUTTON_CLICK, this.onStartButtonClick, this), this._baseControlsView.addEventListener(p.BaseControlsView.AUTO_PLAY_CHOICES_CLICK, this.onAutoPlayChoicesClick, this), this._baseControlsView.addEventListener(p.BaseControlsView.AUTO_PLAY_STOP_CLICK, this.onAutoPlayStopClick, this), this._baseControlsView.addEventListener(p.BaseControlsView.AUTO_PLAY_CLICK, this.onAutoPlayClick, this), this._baseControlsView.addEventListener(p.BaseControlsView.AUTO_PLAY_CHOICES_CANCEL_CLICK, this.onAutoPlayChoicesCancelClick, this), this._baseControlsView.addEventListener(i.GenericStepperController.VALUE_CHANGE, this.onBetLineValueChange, this), this._reelSet.addEventListener(g.SlotsReelSet.ALL_REEL_STOP, this.onAllReelStop, this), this._reelSet.addEventListener(g.SlotsReelSet.REEL_STOP_SPIN_BEGIN, this.onReelStopSpinBegin, this), this._reelSet.addEventListener(g.SlotsReelSet.REEL_STOP_SPIN_END, this.onReelStopSpinEnd, this), this._baseControlsView.addEventListeners())
            }, b.prototype.removeEventListeners = function() {
                this._isInit && (this._baseControlsView.removeEventListener(p.BaseControlsView.SPIN_BUTTON_CLICK, this.onSpinButtonClick, this), this._baseControlsView.removeEventListener(p.BaseControlsView.SKIP_BUTTON_CLICK, this.onSkipButtonClick, this), this._baseControlsView.removeEventListener(p.BaseControlsView.START_BUTTON_CLICK, this.onStartButtonClick, this), this._baseControlsView.removeEventListener(p.BaseControlsView.AUTO_PLAY_CHOICES_CLICK, this.onAutoPlayChoicesClick, this), this._baseControlsView.removeEventListener(p.BaseControlsView.AUTO_PLAY_STOP_CLICK, this.onAutoPlayStopClick, this), this._baseControlsView.addEventListener(p.BaseControlsView.AUTO_PLAY_CLICK, this.onAutoPlayClick, this), this._baseControlsView.addEventListener(p.BaseControlsView.AUTO_PLAY_CHOICES_CANCEL_CLICK, this.onAutoPlayChoicesCancelClick, this), this._baseControlsView.removeEventListener(i.GenericStepperController.VALUE_CHANGE, this.onBetLineValueChange, this), this._reelsHelper.stopSequences(), this._reelSet.removeEventListener(g.SlotsReelSet.ALL_REEL_STOP, this.onAllReelStop, this), this._reelSet.removeEventListener(g.SlotsReelSet.REEL_STOP_SPIN_BEGIN, this.onReelStopSpinBegin, this), this._reelSet.removeEventListener(g.SlotsReelSet.REEL_STOP_SPIN_END, this.onReelStopSpinEnd, this), this._baseControlsView.removeEventListeners(), this._bubbleBoostManager.removeEventListeners())
            }, b.prototype.onOrientationChange_BaseGameView = function(a) {
                var b = this,
                    c = b._currentOrientation;
                b._currentOrientation = b._assetManager.getOrientation(), c != b._currentOrientation && "mobile" == b._gameChannel && b._baseGameBackgroundPlaying && b.playBaseGameBackground(b._currentOrientation)
            }, b.prototype.startBaseGameBackgroundOnTransitionIn = function(a) {
                this._baseGameBackgroundPlaying || (this._currentOrientation = a, this.playBaseGameBackground(this._currentOrientation)), this._bubbleBoostManager.setCurrentOrientationOnTransitionIn(a)
            }, b.prototype.playBaseGameBackground = function(a) {
                var b = this,
                    c = -1;
                a == d.AssetManager.LANDSCAPE_ORIENTATION && null != b._baseGameBackgroundLandscape ? (null == b._baseGameBackgroundPortrait || b._baseGameBackgroundPortrait.paused || (b._baseGameBackgroundPortrait.stop(), c = b._baseGameBackgroundPortrait.currentFrame), b._baseGameBackgroundLandscape.visible = !0, b._baseGameBackgroundLandscape.totalFrames > 1 ? b._baseGameBackgroundLandscape.gotoAndPlay(-1 == c ? 0 : c) : b._baseGameBackgroundLandscape.gotoAndStop(0), b._baseGameBackgroundPlaying = !0, null != b._baseGameBackgroundPortrait && (b._baseGameBackgroundPortrait.visible = !1)) : null != b._baseGameBackgroundPortrait && (null == b._baseGameBackgroundLandscape || b._baseGameBackgroundLandscape.paused || (b._baseGameBackgroundLandscape.stop(), c = b._baseGameBackgroundLandscape.currentFrame), b._baseGameBackgroundPortrait.visible = !0, b._baseGameBackgroundPortrait.totalFrames > 1 ? b._baseGameBackgroundPortrait.gotoAndPlay(-1 == c ? 0 : c) : b._baseGameBackgroundPortrait.gotoAndStop(0), b._baseGameBackgroundPlaying = !0, null != b._baseGameBackgroundLandscape && (b._baseGameBackgroundLandscape.visible = !1))
            }, b.prototype.stopBaseGameBackground = function() {
                null != this._baseGameBackgroundLandscape && this._baseGameBackgroundLandscape.stop(), null != this._baseGameBackgroundPortrait && this._baseGameBackgroundPortrait.stop(), this._baseGameBackgroundPlaying = !1
            }, Object.defineProperty(b.prototype, "playerSessionStartsInBaseGame", {
                set: function(a) {
                    this._playerSessionStartsInBaseGame = a
                },
                enumerable: !0,
                configurable: !0
            }), Object.defineProperty(b.prototype, "pfsEnabled", {
                set: function(a) {
                    this._pfsEnabled = a
                },
                enumerable: !0,
                configurable: !0
            }), Object.defineProperty(b.prototype, "tutorialDisabled", {
                set: function(a) {
                    this._tutorialDisabled = a
                },
                enumerable: !0,
                configurable: !0
            }), b.prototype.onBubbleBoostPromptPlaqueDelayDone = function(a) {
                this.hideBubbleBoostPromptPlaque()
            }, b
        }(r.StageView);
        B.POPULATION_OUTCOME_NAME = "Reels", B.RSS_TRIGGER_OUTCOME_NAME = "BaseGame.CurrentReelSetSelect", B.DEFAULT_SPIN_DURATION = [100, 300, 500, 700, 900], B.BUBBLE_BOOST_PROMPT_PLAQUE_DISPLAY_DELAY = 15e3, b.BaseGameView = B
    }), define("views/picker/bubblePicks/BubblePickDataPair", ["require", "exports", "wcgf/core/TextManager"], function(a, b, c) {
        "use strict";
        var d = function() {
            function a(b, d) {
                this._pickType = "picks" == b ? c.TextManager.getInstance().getText("pickerPickAwardText") : "spins" == b ? c.TextManager.getInstance().getText("pickerFreeSpinsAwardText") : b, d == a.NO_PICK_CHAR ? this._value = a.NO_PICK_VALUE : this._value = parseInt(d)
            }
            return Object.defineProperty(a.prototype, "pickType", {
                get: function() {
                    return this._pickType
                },
                enumerable: !0,
                configurable: !0
            }), Object.defineProperty(a.prototype, "value", {
                get: function() {
                    return this._value
                },
                enumerable: !0,
                configurable: !0
            }), a
        }();
        d.NO_PICK_CHAR = "#", d.NO_PICK_VALUE = -1, b.BubblePickDataPair = d
    }), define("views/picker/bubblePicks/BubblePickDataList", ["require", "exports", "views/picker/bubblePicks/BubblePickDataPair"], function(a, b, c) {
        "use strict";
        var d = function() {
            function a() {
                this._pickDataArray = [], this.reset()
            }
            return a.prototype.reset = function() {
                this._pickDataArray.length = 0, this._curIndex = 0
            }, a.prototype.addItem = function(a) {
                this._pickDataArray.push(a)
            }, a.prototype.getItem = function() {
                return this._curIndex < this._pickDataArray.length ? this._pickDataArray[this._curIndex++] : null
            }, a.prototype.getDataAtLoc = function(a) {
                return a < this._pickDataArray.length ? this._pickDataArray[a] : null
            }, a.prototype.curItemIsValidPick = function() {
                return this._pickDataArray[this._curIndex].value != c.BubblePickDataPair.NO_PICK_VALUE
            }, Object.defineProperty(a.prototype, "numItems", {
                get: function() {
                    return this._pickDataArray.length
                },
                enumerable: !0,
                configurable: !0
            }), Object.defineProperty(a.prototype, "numItemsRemaining", {
                get: function() {
                    return 0 == this._pickDataArray.length ? 0 : this._pickDataArray.length - (this._curIndex + 1)
                },
                enumerable: !0,
                configurable: !0
            }), a.prototype.getValidPickList = function() {
                var b = new a;
                if (this._pickDataArray.length > 0)
                    for (var d = 0, e = this._pickDataArray[d]; d < this._pickDataArray.length && e.value != c.BubblePickDataPair.NO_PICK_VALUE;) b.addItem(e), d++, e = this._pickDataArray[d];
                return b
            }, a
        }();
        b.BubblePickDataList = d
    }), define("views/picker/bubblePicks/BubblePickHitboxManager", ["require", "exports", "wcgf/core/events", "wcgf/core/AssetManager"], function(a, b, c, d) {
        "use strict";
        var e = function(a) {
            function b(b) {
                var c = a.call(this) || this;
                return c._pickerActive = !1, c._currentOrientation = d.AssetManager.LANDSCAPE_ORIENTATION, c._assetManager = d.AssetManager.getInstance(), c._gameChannel = b, c
            }
            return __extends(b, a), b.prototype.init = function(a, b, c, d) {
                this._mouseBoundsSkinLandscape = a, this._mouseBoundsSkinPortrait = b, this._bubblePickLayerLandscape = c, this._bubblePickLayerPortrait = d
            }, b.prototype.enable = function(a) {
                this.removeMouseListeners(), this.hideAllMouseBounds(), this.hideAllPickLayers(), a ? (this.addMouseListeners(), this.showCurrentMouseBounds(), this.showCurrentPickLayer(), this._pickerActive = !0) : (this.showCurrentDisabledPickLayer(), this._pickerActive = !1)
            }, b.prototype.hidePickLayerOnTransitionOut = function() {
                this.hideAllPickLayers()
            }, Object.defineProperty(b.prototype, "currentMouseBoundsSkin", {
                get: function() {
                    if (this._currentOrientation == d.AssetManager.LANDSCAPE_ORIENTATION) {
                        if (null != this._mouseBoundsSkinLandscape) return this._mouseBoundsSkinLandscape
                    } else if (null != this._mouseBoundsSkinPortrait) return this._mouseBoundsSkinPortrait;
                    return null
                },
                enumerable: !0,
                configurable: !0
            }), b.prototype.setCurrentMouseBoundsSkin = function(a) {
                this._currentOrientation = a
            }, Object.defineProperty(b.prototype, "currentPickLayerSkin", {
                get: function() {
                    if (this._currentOrientation == d.AssetManager.LANDSCAPE_ORIENTATION) {
                        if (null != this._bubblePickLayerLandscape) return this._bubblePickLayerLandscape
                    } else if (null != this._bubblePickLayerPortrait) return this._bubblePickLayerPortrait;
                    return null
                },
                enumerable: !0,
                configurable: !0
            }), b.prototype.showCurrentMouseBounds = function() {
                null != this._mouseBoundsSkinLandscape && this._currentOrientation == d.AssetManager.LANDSCAPE_ORIENTATION ? this._mouseBoundsSkinLandscape.visible = !0 : null != this._mouseBoundsSkinPortrait && (this._mouseBoundsSkinPortrait.visible = !0)
            }, b.prototype.hideAllMouseBounds = function() {
                null != this._mouseBoundsSkinLandscape && (this._mouseBoundsSkinLandscape.visible = !1), null != this._mouseBoundsSkinPortrait && (this._mouseBoundsSkinPortrait.visible = !1)
            }, b.prototype.showCurrentPickLayer = function() {
                null != this._bubblePickLayerLandscape && this._currentOrientation == d.AssetManager.LANDSCAPE_ORIENTATION ? (this._bubblePickLayerLandscape.visible = !0, this._bubblePickLayerLandscape.mouseEnabled = !0, this._bubblePickLayerLandscape.mouseChildren = !0) : null != this._bubblePickLayerPortrait && (this._bubblePickLayerPortrait.visible = !0, this._bubblePickLayerPortrait.mouseEnabled = !0, this._bubblePickLayerPortrait.mouseChildren = !0)
            }, b.prototype.showCurrentDisabledPickLayer = function() {
                null != this._bubblePickLayerLandscape && this._currentOrientation == d.AssetManager.LANDSCAPE_ORIENTATION ? (this._bubblePickLayerLandscape.visible = !0, this._bubblePickLayerLandscape.mouseEnabled = !1, this._bubblePickLayerLandscape.mouseChildren = !1) : null != this._bubblePickLayerPortrait && (this._bubblePickLayerPortrait.visible = !0, this._bubblePickLayerPortrait.mouseEnabled = !1, this._bubblePickLayerPortrait.mouseChildren = !1)
            }, b.prototype.hideAllPickLayers = function() {
                null != this._bubblePickLayerLandscape && (this._bubblePickLayerLandscape.visible = !1, this._bubblePickLayerLandscape.mouseEnabled = !1, this._bubblePickLayerLandscape.mouseChildren = !1), null != this._bubblePickLayerPortrait && (this._bubblePickLayerPortrait.visible = !1, this._bubblePickLayerPortrait.mouseEnabled = !1, this._bubblePickLayerPortrait.mouseChildren = !1)
            }, b.prototype.addMouseListeners = function() {
                if (null != this._mouseBoundsSkinLandscape && this._currentOrientation == d.AssetManager.LANDSCAPE_ORIENTATION && !this._mouseBoundsSkinLandscape.hasEventListener("mousedown")) {
                    var a = this;
                    this._mouseBoundsSkinLandscape.addEventListener("mousedown", function(d) {
                        a.dispatchEvent(new c.events.Event(b.MOUSE_CLICK, d, a))
                    }), this._mouseBoundsSkinLandscape.mouseEnabled = !0, this._mouseBoundsSkinLandscape.mouseChildren = !0
                }
                if (null != this._mouseBoundsSkinPortrait && this._currentOrientation == d.AssetManager.PORTRAIT_ORIENTATION && !this._mouseBoundsSkinPortrait.hasEventListener("mousedown")) {
                    var e = this;
                    this._mouseBoundsSkinPortrait.addEventListener("mousedown", function(a) {
                        e.dispatchEvent(new c.events.Event(b.MOUSE_CLICK, a, e))
                    }), this._mouseBoundsSkinPortrait.mouseEnabled = !0, this._mouseBoundsSkinPortrait.mouseChildren = !0
                }
            }, b.prototype.removeMouseListeners = function() {
                null != this._mouseBoundsSkinLandscape && (this._mouseBoundsSkinLandscape.removeAllEventListeners("mousedown"), this._mouseBoundsSkinLandscape.mouseEnabled = !1, this._mouseBoundsSkinLandscape.mouseChildren = !1), null != this._mouseBoundsSkinPortrait && (this._mouseBoundsSkinPortrait.removeAllEventListeners("mousedown"), this._mouseBoundsSkinPortrait.mouseEnabled = !1, this._mouseBoundsSkinPortrait.mouseChildren = !1)
            }, b.prototype.removeEventListeners = function() {
                this.removeMouseListeners()
            }, b
        }(c.events.EventDispatcher);
        e.MOUSE_CLICK = "MouseEventClick", b.BubblePickHitboxManager = e
    }), define("views/picker/bubblePicks/BubblePickAnimsPlayer", ["require", "exports", "wcgf/gameComponents/MovieClipSequenceItem", "wcgf/core/events", "wcgf/core/AssetManager", "wcgf/sequencers/TimerEventSequenceItem", "views/picker/bubblePicks/BubblePickHitboxManager", "common/audio/AudioPlayer"], function(a, b, c, d, e, f, g, h) {
        "use strict";
        var i = function(a) {
            function b(c) {
                var d = a.call(this) || this;
                return d._onOriginalPickerOrientation = !0, d._originalPickerOrientation = "NOT SET", d._originalOrientationSet = !1, d._currentOrientation = "NOT SET", d._pickBoundsSet = !1, d._gameChannel = c, d._bubblePickHitboxManager = new g.BubblePickHitboxManager(c), d._bubbleCols = [], d._bubbleFloatUpAnims = [], d._bubbleFloatUpSequenceItems = [], d._bubblePopSequenceItems = [], d._bubblePickAnims = [], d._bubblePickAnimsClicked = [], d._bubblePickSequenceItems = [], d._bubbleFloatUpTimer = new f.TimerEventSequenceItem(b.PICK_BUBBLE_FREQUENCY_DELAY, d.onBubbleFloatUpTimerDone, null, d, 0), d._pickerCompleteDelayTimer = new f.TimerEventSequenceItem(b.PICKS_COMPLETE_DELAY, d.onBubblePicksCompleteDelayDone, null, d, 1), d
            }
            return __extends(b, a), b.prototype.init = function(a, b, c, d, f, g) {
                this._pickingEnabled = !1, this._assetManager = a, this._assetManager.hasEventListener(e.AssetManager.ORIENTATION_CHANGE, this.onOrientationChange_BubblePickAnimsPlayer, this) || this._assetManager.addEventListener(e.AssetManager.ORIENTATION_CHANGE, this.onOrientationChange_BubblePickAnimsPlayer, this);
                var h, i, j = this;
                void 0 !== document.hidden ? (i = "hidden", h = "visibilitychange") : void 0 !== document.msHidden ? (i = "msHidden", h = "msvisibilitychange") : void 0 !== document.webkitHidden && (i = "webkitHidden", h = "webkitvisibilitychange"), document.addEventListener(h, function() {
                    j._pickingEnabled && (document[i] && j._bubbleFloatUpTimer.isSequenceStarted ? (j._bubbleFloatUpTimer.stopSequence(!0), j.destroyAllBubbles()) : document[i] || j._bubbleFloatUpTimer.isSequenceStarted || j._bubbleFloatUpTimer.startSequence(!0))
                }, !1), this._bubblePicks = g, this._bubblePickHitboxManager.init(b, c, d, f), this._totalPicksMade = 0, this._totalPicksCompleted = 0, this._expectedPicksMade = 0, this.addListeners()
            }, b.prototype.setPickBounds = function() {
                if (this._bubblePickHitboxManager.currentMouseBoundsSkin && this._originalOrientationSet && !this._pickBoundsSet) {
                    var a = this._bubblePickHitboxManager.currentMouseBoundsSkin.nominalBounds;
                    this._hitareaLeftBoundX = a.x, this._hitareaRightBoundX = this._hitareaLeftBoundX + a.width, this._hitareaTopBoundY = a.y, this._hitareaBotBoundY = this._hitareaTopBoundY + a.height, this._pickBoundsSet = !0
                }
            }, b.prototype.initPickBubbleAnims = function() {
                this.initBubbleCols(), this.initBubbleFloatUpAnims(), this.initBubbleFloatUpSequenceItems(), this.initBubblePickAnims(), this.initBubblePickSequenceAnims()
            }, b.prototype.setExpectedNumOfPicks = function(a) {
                this._expectedPicksMade = a
            }, b.prototype.initBubbleCols = function() {
                for (var a = 0, b = this._bubblePickHitboxManager.currentPickLayerSkin; null != b["col" + a];) this._bubbleCols[a] = b["col" + a], a++
            }, Object.defineProperty(b.prototype, "numBubbleAnimCols", {
                get: function() {
                    return this._bubbleCols.length
                },
                enumerable: !0,
                configurable: !0
            }), b.prototype.initBubbleFloatUpAnims = function() {
                for (var a = 0; a < this.numBubbleAnimCols; a++) {
                    this._bubbleFloatUpAnims[a] = [];
                    for (var c = 0; c < b.MAX_FLOAT_UP_BUBBLES_PER_COL; c++) this._bubbleFloatUpAnims[a][c] = this._bubbleCols[a]["floatUpAnim" + c], this._bubbleFloatUpAnims[a][c].gotoAndStop(0), this._bubbleFloatUpAnims[a][c].visible = !1
                }
            }, b.prototype.initBubbleFloatUpSequenceItems = function() {
                for (var a = 0; a < this.numBubbleAnimCols; a++) {
                    this._bubbleFloatUpSequenceItems[a] = [];
                    for (var d = 0; d < b.MAX_FLOAT_UP_BUBBLES_PER_COL; d++) this._bubbleFloatUpSequenceItems[a][d] = new c.MovieClipSequenceItem(this._bubbleFloatUpAnims[a][d], "floatUp", "floatUpDone", 1), this._bubbleFloatUpSequenceItems[a][d].data = [a, d], this._bubbleFloatUpSequenceItems[a][d].addEventListener("SequencerSequenceDone", this.handleBubbleFloatUpSequenceItemDone, this)
                }
            }, b.prototype.initBubblePickSequenceAnims = function() {
                for (var a = 0; a < this.numBubbleAnimCols; a++) {
                    this._bubblePickSequenceItems[a] = [];
                    for (var c = 0; c < b.MAX_FLOAT_UP_BUBBLES_PER_COL; c++) this._bubblePickSequenceItems[a][c] = null
                }
            }, b.prototype.initBubblePickAnims = function() {
                for (var a = 0; a < this.numBubbleAnimCols; a++) {
                    this._bubblePickAnims[a] = [], this._bubblePickAnimsClicked[a] = [];
                    for (var c = 0; c < b.MAX_FLOAT_UP_BUBBLES_PER_COL; c++) this._bubblePickAnims[a][c] = null, this._bubblePickAnimsClicked[a][c] = !1
                }
            }, b.prototype.enablePicking = function(a) {
                this._pickingEnabled = a, this._bubblePickHitboxManager.enable(a), a ? (this._firstBubbleOfPicker = !0, this.addListeners(), this.setPickBounds(), this.playFirstBubble(), this._bubbleFloatUpTimer.startSequence(!0)) : this._bubbleFloatUpTimer.stopSequence(!0)
            }, b.prototype.hidePickLayer = function() {
                this._bubblePickHitboxManager.hidePickLayerOnTransitionOut()
            }, b.prototype.playFirstBubble = function() {
                this.initPickBubbleAnims();
                var a = Math.floor(this.numBubbleAnimCols / 2);
                this.substituteDynamicClipInCol(a, 0), this.playBubblePickFloatUpSequenceItem(a, 0), this._lastBubbleColIndexPlayed = a
            }, b.prototype.playBubblePickFloatUpSequenceItem = function(a, b) {
                this._bubbleFloatUpAnims[a][b].visible = !0, this._bubbleFloatUpSequenceItems[a][b].startSequence(!0)
            }, b.prototype.handleBubbleFloatUpSequenceItemDone = function(a) {
                this.dispatchEvent(new d.events.Event(b.BUBBLE_PICK_OFFSCREEN, null, this));
                var c = a.target.data;
                this.destroyBubble(c[0], c[1])
            }, b.prototype.destroyBubble = function(a, b) {
                null != this._bubbleFloatUpSequenceItems[a][b] && this._bubbleFloatUpSequenceItems[a][b].stopSequence(!0), null != this._bubbleFloatUpAnims[a][b] && (this._bubbleFloatUpAnims[a][b].gotoAndStop(0), this._bubbleFloatUpAnims[a][b].visible = !1, this._bubbleFloatUpAnims[a][b].layer.removeAllChildren()), null != this._bubblePickSequenceItems[a][b] && (this._bubblePickSequenceItems[a][b].stopSequence(!0), this._bubblePickSequenceItems[a][b] = null), null != this._bubblePickAnims[a][b] && (this._bubblePickAnims[a][b].gotoAndStop("off"), delete this._bubblePickAnims[a][b]), this._bubblePickAnimsClicked[a][b] = !1
            }, b.prototype.destroyAllBubbles = function() {
                for (var a = 0; a < this.numBubbleAnimCols; a++)
                    for (var c = 0; c < b.MAX_FLOAT_UP_BUBBLES_PER_COL; c++) this.destroyBubble(a, c)
            }, b.prototype.createNewBubblePickAnim = function(a, b, c) {
                null != this._bubblePickSequenceItems[b][c] && (this._bubblePickSequenceItems[b][c].stopSequence(!0), this._bubblePickSequenceItems[b][c] = null), null != this._bubblePickAnims[b][c] && (this._bubblePickAnims[b][c].gotoAndStop("off"), delete this._bubblePickAnims[b][c]), this._bubblePickAnims[b][c] = a
            }, b.prototype.createAndStartNewBubblePickSequenceAnim = function(a, b) {
                null == this._bubblePickSequenceItems[a][b] && (this._bubblePickSequenceItems[a][b] = new c.MovieClipSequenceItem(this._bubblePickAnims[a][b], "idleLoop", "idleLoopDone", 0), this._bubblePickSequenceItems[a][b].startSequence(!0), this._bubblePickAnims[a][b].idleBubblePickAnim.gotoAndStop("idle"))
            }, b.prototype.stopAllOtherBubbles = function(a, b) {
                for (var c = 0; c < this.numBubbleAnimCols; c++)
                    for (var d = 0; d < this._bubbleFloatUpAnims[c].length; d++) c == a && d == b || (this._bubbleFloatUpAnims[c][d].gotoAndStop(0), this._bubbleFloatUpAnims[c][d].visible = !1, this._bubbleFloatUpSequenceItems[c][d].stopSequence(!0), null != this._bubblePickAnims[c][d] && this._bubblePickAnims[c][d].stop(), null != this._bubblePickSequenceItems[c][d] && (this._bubblePickSequenceItems[c][d].stopSequence(!0), this._bubblePickSequenceItems[c][d] = null))
            }, b.prototype.createAndStartNewBubblePopSequenceItem = function(a, e, f) {
                var g = this._bubbleFloatUpAnims[a][e],
                    i = g.layer,
                    j = i.getChildAt(0),
                    k = j.idleBubblePickAnim,
                    l = this._bubblePicks.getItem(),
                    m = k.textAnim,
                    n = m.textClip.textField,
                    o = m.valueClip.value;
                n.text = l.pickType, o.text = "+" + l.value;
                var p = new c.MovieClipSequenceItem(k, "pop", "popDone", 1);
                p.data = [a, e, f, l.pickType, l.value.toString()], this._bubblePopSequenceItems[f] = p, this._bubblePopSequenceItems[f].addEventListener("SequencerSequenceDone", this.handleBubblePopSequenceItemDone, this), null != this._bubblePickAnims[a][e] && this._bubblePickAnims[a][e].stop(), this._bubblePopSequenceItems[f].startSequence(!0), this.dispatchEvent(new d.events.Event(b.BUBBLE_POP_START, this._bubblePopSequenceItems[f].data, this)), h.AudioPlayer.playSound("bubblePick")
            }, b.prototype.handleBubblePopSequenceItemDone = function(a) {
                var c = a.target.data;
                this._bubblePopSequenceItems[c[2]].stopSequence(!0);
                var e = this._bubbleFloatUpAnims[c[0]][c[1]];
                e.gotoAndStop("floatUp"), e.visible = !1, e.layer.removeAllChildren(), this._bubbleFloatUpSequenceItems[c[0]][c[1]].stopSequence(!0), null != this._bubblePickAnims[c[0]][c[1]] && (this._bubblePickAnimsClicked[c[0]][c[1]] = !1), this.dispatchEvent(new d.events.Event(b.BUBBLE_POP_DONE, null, this)), this._bubblePopSequenceItems[c[2]].removeEventListener("SequencerSequenceDone", this.handleBubblePopSequenceItemDone, this), this.destroyBubble(c[0], c[1])
            }, b.prototype.substituteDynamicClipInCol = function(a, b) {
                var c = this._bubbleFloatUpAnims[a][b],
                    d = this.getNewRandomDynamicBubblePickAnim();
                c.layer.removeAllChildren(), c.layer.addChild(d), this.createNewBubblePickAnim(d, a, b), this.createAndStartNewBubblePickSequenceAnim(a, b)
            }, b.prototype.getNewRandomDynamicBubblePickAnim = function() {
                var a = this._assetManager.getNewAsset("bubblePickAnim" + b.randomBubbleIndex);
                return a.gotoAndStop("off"), a.idleBubblePickAnim.gotoAndStop("idle"), a
            }, Object.defineProperty(b, "randomBubbleIndex", {
                get: function() {
                    return Math.ceil(b.NUM_BUBBLE_VARIANTS * Math.random())
                },
                enumerable: !0,
                configurable: !0
            }), b.prototype.checkEndOfPicker = function() {
                this._totalPicksCompleted == this._expectedPicksMade && (this.destroyAllBubbles(), this._pickerCompleteDelayTimer.startSequence(!0))
            }, b.prototype.getBubblePickAnimIndexAtLocation = function(a, c) {
                for (var d, e, f, g = 0; g < this.numBubbleAnimCols; g++)
                    for (var h = 0; h < this._bubblePickAnims[g].length; h++)
                        if (d = this._bubblePickAnims[g][h], this._bubbleFloatUpAnims[g][h].visible && !this._bubbleFloatUpAnims[g][h].paused && !this._bubblePickAnimsClicked[g][h]) {
                            e = this._bubbleFloatUpAnims[g][h], f = this._bubbleCols[g];
                            var i = d.getBounds(),
                                j = e.getBounds(),
                                k = i.width / 2 + f.x + j.x,
                                l = i.height / 2 + j.y;
                            if (this.bubbleInPickBounds(i.width / 2, k, l) && b.bubbleInClickBounds(i.width / 2, k, l, a, c)) return this._bubblePickAnimsClicked[g][h] = !0, [g, h]
                        }
                return []
            }, b.prototype.bubbleInPickBounds = function(a, b, c) {
                var d = b - a > this._hitareaLeftBoundX,
                    e = b + a < this._hitareaRightBoundX,
                    f = c - a > this._hitareaTopBoundY,
                    g = c + a < this._hitareaBotBoundY;
                return d && e && f && g
            }, b.bubbleInClickBounds = function(a, b, c, d, e) {
                var f = d > b - a,
                    g = d < b + a,
                    h = e > c - a,
                    i = e < c + a;
                return f && g && h && i
            }, b.prototype.addListeners = function() {
                this.hasEventListener(b.BUBBLE_POP_DONE, this.onBubblePopDone, this) || this.addEventListener(b.BUBBLE_POP_DONE, this.onBubblePopDone, this), this._bubblePickHitboxManager.hasEventListener(g.BubblePickHitboxManager.MOUSE_CLICK, this.onLocationClicked, this) || this._bubblePickHitboxManager.addEventListener(g.BubblePickHitboxManager.MOUSE_CLICK, this.onLocationClicked, this)
            }, b.prototype.onBubblePopDone = function(a) {
                this.checkEndOfPicker()
            }, b.prototype.onLocationClicked = function(a) {
                var b = this._bubblePickHitboxManager.currentMouseBoundsSkin.globalToLocal(a.data.stageX, a.data.stageY),
                    c = b.x,
                    d = b.y,
                    e = this.getBubblePickAnimIndexAtLocation(c, d);
                e.length > 0 && (this._bubbleFloatUpAnims[e[0]][e[1]].stop(), this._totalPicksCompleted + 1 == this._expectedPicksMade && (this.enablePicking(!1), this.stopAllOtherBubbles(e[0], e[1])), this.createAndStartNewBubblePopSequenceItem(e[0], e[1], this._totalPicksMade++), this._bubblePickAnims[e[0]][e[1]].stop(), this._totalPicksCompleted++)
            }, b.prototype.onBubbleFloatUpTimerDone = function(a) {
                for (var c = !0, d = 0; d < this.numBubbleAnimCols; d++)
                    if (!this.bubbleAnimColFull(d)) {
                        c = !1;
                        break
                    }
                if (!(this.bubblesCurrentlyPlaying >= b.MAX_BUBBLES_CURRENTLY_PLAYING_THRESHOLD || c)) {
                    this._firstBubbleOfPicker = !1;
                    var e, f = 0,
                        g = [];
                    for (g.push(this._lastBubbleColIndexPlayed), f++; f < this.numBubbleAnimCols && g.length < this.numBubbleAnimCols;) {
                        for (e = Math.floor((this.numBubbleAnimCols - 1) * Math.random()); g.indexOf(e) > -1;) e = Math.floor((this.numBubbleAnimCols - 1) * Math.random());
                        if (!this.bubbleAnimColFull(e))
                            for (var d = 0; d < this._bubbleFloatUpAnims[e].length; d++)
                                if (this._bubbleFloatUpAnims[e][d].paused && null == this._bubblePickAnims[e][d] && !this._bubblePickAnimsClicked[e][d]) return this.substituteDynamicClipInCol(e, d), this.playBubblePickFloatUpSequenceItem(e, d), void(this._lastBubbleColIndexPlayed = e);
                        g.push(e), f++
                    }
                }
            }, b.prototype.bubbleAnimColFull = function(a) {
                return 2 == this._bubblePickAnims[a].length && null != this._bubblePickAnims[a][0] && null != this._bubblePickAnims[a][1]
            }, Object.defineProperty(b.prototype, "bubblesCurrentlyPlaying", {
                get: function() {
                    for (var a = 0, c = 0; c < this.numBubbleAnimCols; c++)
                        for (var d = 0; d < b.MAX_FLOAT_UP_BUBBLES_PER_COL; d++) null != this._bubblePickAnims[c][d] && a++;
                    return a
                },
                enumerable: !0,
                configurable: !0
            }), b.prototype.onBubblePicksCompleteDelayDone = function(a) {
                this.dispatchEvent(new d.events.Event(b.ALL_PICKS_DONE, null, this))
            }, b.prototype.removeEventListeners = function() {
                for (var a = 0; a < this.numBubbleAnimCols; a++)
                    for (var c = 0; c < b.MAX_FLOAT_UP_BUBBLES_PER_COL; c++) null != this._bubbleFloatUpSequenceItems[a][c] && (this._bubbleFloatUpSequenceItems[a][c].stopSequence(!0), this._bubbleFloatUpSequenceItems[a][c].removeEventListener("SequencerSequenceDone", this.handleBubbleFloatUpSequenceItemDone, this)), null != this._bubblePickSequenceItems[a][c] && this._bubblePickSequenceItems[a][c].stopSequence(!0);
                for (var d = 0, e = this._bubblePopSequenceItems; d < e.length; d++) {
                    var f = e[d];
                    f.stopSequence(!0), f.removeEventListener("SequencerSequenceDone", this.handleBubblePopSequenceItemDone, this)
                }
                this.removeEventListener(b.BUBBLE_POP_DONE, this.onBubblePopDone, this), this._bubblePickHitboxManager.removeEventListener(g.BubblePickHitboxManager.MOUSE_CLICK, this.onLocationClicked, this), this._bubblePickHitboxManager.removeEventListeners()
            }, Object.defineProperty(b.prototype, "originalPickerOrientation", {
                get: function() {
                    return this._originalPickerOrientation
                },
                set: function(a) {
                    this._originalPickerOrientation = a, this._currentOrientation = a, this._bubblePickHitboxManager.setCurrentMouseBoundsSkin(a), this._originalOrientationSet = !0, this.setPickBounds()
                },
                enumerable: !0,
                configurable: !0
            }), b.prototype.onOrientationChange_BubblePickAnimsPlayer = function(a) {
                var b = this;
                "desktop" != b._gameChannel && b._pickingEnabled && (b._assetManager.getOrientation() != b._originalPickerOrientation && b._bubbleFloatUpTimer.isSequenceStarted ? (b._bubbleFloatUpTimer.stopSequence(!0), b._onOriginalPickerOrientation = !1) : b._bubbleFloatUpTimer.isSequenceStarted || b._onOriginalPickerOrientation || b._totalPicksCompleted == b._expectedPicksMade || (b._bubbleFloatUpTimer.startSequence(!0), b._onOriginalPickerOrientation = !0))
            }, b
        }(d.events.EventDispatcher);
        i.ALL_PICKS_DONE = "AllPicksDone", i.BUBBLE_POP_START = "BubblePopStart", i.BUBBLE_POP_DONE = "BubblePopDone", i.BUBBLE_PICK_OFFSCREEN = "BubblePickOnScreenDone", i.MAX_FLOAT_UP_BUBBLES_PER_COL = 2, i.NUM_BUBBLE_VARIANTS = 4, i.PICK_BUBBLE_FREQUENCY_DELAY = 1e3, i.PICKS_COMPLETE_DELAY = 2e3, i.MAX_BUBBLES_CURRENTLY_PLAYING_THRESHOLD = 5, b.BubblePickAnimsPlayer = i
    }), define("views/picker/meters/AnimatingValueMeter", ["require", "exports", "wcgf/gameComponents/MovieClipSequenceItem"], function(a, b, c) {
        "use strict";
        var d = function() {
            function a(b, d, e, f) {
                void 0 === f && (f = !1), this._restartAnimInProgressWithUpdate = !1, this._meterType = b, this._skin = d, this._labelClip = this._skin.labelClip, this._labelClip.label.text = e, this._valueClip = this._skin.valueClip, this._restartAnimInProgressWithUpdate = f, this._animateValueSequence = new c.MovieClipSequenceItem(this._skin, a.ANIMATEVALUE_START_LABEL, a.ANIMATEVALUE_DONE_LABEL, 1)
            }
            return a.prototype.init = function(a) {
                void 0 === a && (a = 0), this._currentValue = 0, this._animateValueSequence.addEventListener("SequencerSequenceDone", this.onAnimateValueDone, this), this._skin.gotoAndStop("static"), this.addNewCurrentValue(a)
            }, a.prototype.addNewCurrentValue = function(a) {
                isNaN(a) || 0 == a ? (this._currentValue = 0, this._valueClip.value.text = "") : (this._currentValue += a, this._valueClip.value.text = this._currentValue.toString(), this.tryToPlayAnimation())
            }, a.prototype.tryToPlayAnimation = function() {
                (this._restartAnimInProgressWithUpdate || this._skin.paused) && this._animateValueSequence.startSequence(!0)
            }, a.prototype.onAnimateValueDone = function(a) {
                this._skin.gotoAndStop("static")
            }, a.prototype.removeEventListeners = function() {
                null != this._animateValueSequence && (this._animateValueSequence.stopSequence(!0), this._animateValueSequence.removeEventListener("SequencerSequenceDone", this.onAnimateValueDone, this))
            }, a
        }();
        d.ANIMATEVALUE_START_LABEL = "animateValue", d.ANIMATEVALUE_DONE_LABEL = "animateValueDone", b.AnimatingValueMeter = d
    }), define("views/picker/meters/AnimatingPicksValueMeter", ["require", "exports", "views/picker/meters/AnimatingValueMeter"], function(a, b, c) {
        "use strict";
        var d = function(a) {
            function b(b, c, d, e) {
                return void 0 === e && (e = !1), a.call(this, b, c, d, e) || this
            }
            return __extends(b, a), b.prototype.init = function(a) {
                void 0 === a && (a = 0), this._skin.gotoAndStop("static"), this.setNewCurrentTotalValue(a)
            }, b.prototype.setNewCurrentTotalValue = function(a) {
                this._currentValue = 0, this._currentTotalPicks = a, this._valueClip.value.text = this._currentValue + "/" + this._currentTotalPicks
            }, b.prototype.addNewCurrentValue = function(a) {
                0 == a ? (this._currentValue = 0, this._valueClip.value.text = "") : this._currentValue < this._currentTotalPicks && (this._currentValue += a, this._valueClip.value.text = this._currentValue + "/" + this._currentTotalPicks)
            }, b.prototype.addNewCurrentTotalValue = function(a) {
                "" != this._valueClip.value.text && (this._currentTotalPicks += a, this._valueClip.value.text = this._currentValue + "/" + this._currentTotalPicks, this.tryToPlayAnimation())
            }, b
        }(c.AnimatingValueMeter);
        b.AnimatingPicksValueMeter = d
    }), define("views/picker/meters/PickerMetersPlayer", ["require", "exports", "views/picker/meters/AnimatingValueMeter", "views/picker/meters/AnimatingPicksValueMeter"], function(a, b, c, d) {
        "use strict";
        var e = function() {
            function a(a, b, e, f) {
                this._freeSpinsMeter = new c.AnimatingValueMeter("Spin", a, b, !0), this._picksMeter = new d.AnimatingPicksValueMeter("Pick", e, f, !0)
            }
            return a.prototype.init = function(a, b) {
                this._freeSpinsMeter.init(a), this._picksMeter.init(b)
            }, a.prototype.addFreeSpinsValue = function(a) {
                this._freeSpinsMeter.addNewCurrentValue(a)
            }, a.prototype.addCurrentPicksValue = function(a) {
                this._picksMeter.addNewCurrentValue(a)
            }, a.prototype.addTotalPicksValue = function(a) {
                this._picksMeter.addNewCurrentTotalValue(a)
            }, a.prototype.removeEventListeners = function() {
                this._freeSpinsMeter.removeEventListeners(), this._picksMeter.removeEventListeners()
            }, a
        }();
        b.PickerMetersPlayer = e
    }), define("views/picker/PickerView", ["require", "exports", "wcgf/messageBus/GameMsgBus", "wcgf/core/AssetManager", "wcgf/core/events", "wcgf/gameComponents/MovieClipSequenceItem", "wcgf/sequencers/ISequenceItem", "wcgf/messageBus/ConsoleBusProxy", "wcgf/core/TextManager", "common/view/StageView", "common/audio/AudioPlayer", "views/picker/bubblePicks/BubblePickDataList", "views/picker/bubblePicks/BubblePickDataPair", "views/picker/bubblePicks/BubblePickAnimsPlayer", "views/picker/meters/PickerMetersPlayer", "Game"], function(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p) {
        "use strict";
        var q;
        ! function(a) {
            a[a.Intro = 0] = "Intro", a[a.Picked = 1] = "Picked", a[a.Idle = 2] = "Idle", a[a.Disable = 3] = "Disable"
        }(q = b.ControlsState || (b.ControlsState = {}));
        var r = function(a) {
            function b(b) {
                var e = a.call(this, b, "PickerSkin", "Picker") || this;
                return e._enable = !1, e._sendReceiveEnable = !1, e._inProgressStageHit = !1, e._currentOrientation = "NOT SET", e._originalPickerOrientationSet = !1, e._gameChannel = b.assetPack, e._msgBus = c.GameMsgBus.getInstance(), e._consoleProxy = h.ConsoleBusProxy.getInstance(), e._assetManager = d.AssetManager.getInstance(), null != e.skin.sendReceive && (e._sendReceive = e.skin.sendReceive, e._sendReceiveLoopSequence = new f.MovieClipSequenceItem(e._sendReceive, "onLoop", "onDone")), e._bubblePickAnimsPlayer = new n.BubblePickAnimsPlayer(e._gameChannel), e._bubblePickDataList = new l.BubblePickDataList, e._bubblePickRequestData = [], e._pickerMetersPlayer = new o.PickerMetersPlayer(e.skin.freeSpinsMeter, i.TextManager.getInstance().getText("pickerFreeSpinsAwardText"), e.skin.picksMeter, i.TextManager.getInstance().getText("pickerPickAwardText")), e._playerSessionStartsInPicker = !1, e
            }
            return __extends(b, a), b.prototype.onEnterNextStage = function(a) {
                this.nextStage()
            }, Object.defineProperty(b.prototype, "playerSessionStartsInPicker", {
                set: function(a) {
                    this._playerSessionStartsInPicker = a
                },
                enumerable: !0,
                configurable: !0
            }), b.prototype.doInit = function(a) {
                this._isInit = !0
            }, b.prototype.doAdditionalInit = function(a) {
                this._inProgressStageHit = !1, this._assetManager.hasEventListener(d.AssetManager.ORIENTATION_CHANGE, this.onOrientationChange_PickerView, this) || this._assetManager.addEventListener(d.AssetManager.ORIENTATION_CHANGE, this.onOrientationChange_PickerView, this), this._bubblePickAnimsPlayer.originalPickerOrientation = this._currentOrientation = this._assetManager.getOrientation(), this._originalPickerOrientationSet = !0, this.onOrientationChange_PickerView(null), null != this._sendReceive && this._sendReceive.gotoAndStop("off"), this.setState(q.Intro), k.AudioPlayer.playSound("onPickerStart"), this.parsePickerData(a), this.createPickerRequestData(), this._bubblePickAnimsPlayer.init(this._assetManager, this._assetManager.getAsset("pickerMouseBoundsLandscape"), this._assetManager.getAsset("pickerMouseBoundsPortrait"), this._assetManager.getAsset("bubblePickLayerLandscape"), this._assetManager.getAsset("bubblePickLayerPortrait"), this._finalBubblePicks), this._bubblePickAnimsPlayer.setExpectedNumOfPicks(this._finalBubblePicks.numItems), this._bubblePickAnimsPlayer.hasEventListener(n.BubblePickAnimsPlayer.ALL_PICKS_DONE, this.onAllPicksDone, this) || this._bubblePickAnimsPlayer.addEventListener(n.BubblePickAnimsPlayer.ALL_PICKS_DONE, this.onAllPicksDone, this), this._bubblePickAnimsPlayer.hasEventListener(n.BubblePickAnimsPlayer.BUBBLE_POP_START, this.onBubblePopStart, this) || this._bubblePickAnimsPlayer.addEventListener(n.BubblePickAnimsPlayer.BUBBLE_POP_START, this.onBubblePopStart, this);
                var b = a.gameLogicResponse.pickerSummaryOutcomes.getValue("");
                this._pickerMetersPlayer.init(0, b.initAwarded), this._pickerBackgroundLandscape = this._assetManager.getAsset("pickerBackgroundLandscape"), null != this._pickerBackgroundLandscape && (this._pickerBackgroundLandscape.gotoAndStop(0), this._pickerBackgroundLandscape.visible = !1, this._pickerBackgroundLandscape.loop = !0), this._pickerBackgroundPortrait = this._assetManager.getAsset("pickerBackgroundPortrait"), null != this._pickerBackgroundPortrait && (this._pickerBackgroundPortrait.gotoAndStop(0), this._pickerBackgroundPortrait.visible = !1, this._pickerBackgroundPortrait.loop = !0), this._pickerBackgroundPlaying = !1, this._originalPickerOrientationSet && (this.stopAndHidePickerBackgrounds(), this._pickerBackgroundPlaying || this.playPickerBackground(this._currentOrientation))
            }, b.prototype.parsePickerData = function(a) {
                this._bubblePickDataList.reset();
                var c = a.gameLogicResponse.populationOutcomes.getValue(b.PICKER_SEQUENCE_POPULATION_OUTCOME_NAME);
                if (null != c) {
                    for (var d = void 0, e = 0, f = b.PICKER_POPULATION_REEL_NAMES; e < f.length; e++) {
                        var g = f[e];
                        if (null != (d = c.reels.getValue(g))) break
                    }
                    if (null != d) {
                        var h = d.cells[0].symbolId;
                        if (null != h) {
                            for (var i = h.split(","), j = void 0, k = 0; k < i.length; k += 2) j = new m.BubblePickDataPair(i[k], i[k + 1]), this._bubblePickDataList.addItem(j);
                            return void(this._finalBubblePicks = this._bubblePickDataList.getValidPickList())
                        }
                    }
                }
                this._finalBubblePicks = null
            }, b.prototype.createPickerRequestData = function() {
                this._bubblePickRequestData.length = 0;
                for (var a = 0; a < this._finalBubblePicks.numItems; a++) this._bubblePickRequestData.push("L0C" + a + "R0")
            }, b.prototype.onAllPicksDone = function(a) {
                this._inProgressStageHit = !0, this.nextStage()
            }, b.prototype.onBubblePopStart = function(a) {
                this._pickerMetersPlayer.addCurrentPicksValue(1);
                var b = a.data;
                switch (b[3].toString()) {
                    case i.TextManager.getInstance().getText("pickerPickAwardText"):
                        this._pickerMetersPlayer.addTotalPicksValue(parseInt(b[4]));
                        break;
                    case i.TextManager.getInstance().getText("pickerFreeSpinsAwardText"):
                        this._pickerMetersPlayer.addFreeSpinsValue(parseInt(b[4]))
                }
            }, b.prototype.enablePickingAfterSoundPrompt = function() {
                "desktop" != this._gameChannel && this._playerSessionStartsInPicker && this._bubblePickAnimsPlayer.enablePicking(!0)
            }, b.prototype.onBeforeShowStage = function(a) {}, Object.defineProperty(b.prototype, "originalPickerOrientation", {
                get: function() {
                    return this._bubblePickAnimsPlayer.originalPickerOrientation
                },
                enumerable: !0,
                configurable: !0
            }), Object.defineProperty(b.prototype, "originalPickerOrientationSet", {
                get: function() {
                    return this._originalPickerOrientationSet
                },
                enumerable: !0,
                configurable: !0
            }), b.prototype.onStartGameInProgressStage = function(a) {
                k.AudioPlayer.playSound("pickerRefresh"), this.nextStage()
            }, b.prototype.onStartGameInProgressNextStage = function(a) {
                this.setInitialOrientation(), ("desktop" == this._gameChannel || "desktop" != this._gameChannel && !this._playerSessionStartsInPicker) && this._bubblePickAnimsPlayer.enablePicking(!0)
            }, b.prototype.setInitialOrientation = function() {
                this._originalPickerOrientationSet || (this._currentOrientation = this._assetManager.getOrientation(), this._bubblePickAnimsPlayer.originalPickerOrientation = this._currentOrientation, this._originalPickerOrientationSet = !0, this._pickerBackgroundPlaying || this.playPickerBackground(this._currentOrientation))
            }, b.prototype.onBeforeRequest = function(a) {
                this._originalPickerOrientationSet || (this._bubblePickAnimsPlayer.originalPickerOrientation = this._assetManager.getOrientation(), this._originalPickerOrientationSet = !0), this._inProgressStageHit ? (this._inProgressStageHit = !1, this.nextStage()) : (this.setState(q.Idle), ("desktop" == this._gameChannel || "desktop" != this._gameChannel && !this._playerSessionStartsInPicker) && this._bubblePickAnimsPlayer.enablePicking(!0), this._pickerBackgroundPlaying || this.playPickerBackground(this._currentOrientation))
            }, b.prototype.onMakeRequest = function(a) {
                for (var b = [], d = 0; d < this._bubblePickRequestData.length; d++) b[d] = {
                    "@name": this._bubblePickRequestData[d]
                };
                this._msgBus.dispatchEvent(new e.events.Event(c.GameMsgBus.PLAY_DATA, {
                    ActionInput: {
                        Action: "play"
                    },
                    PickerInput: {
                        Pick: b
                    }
                })), this.nextStage()
            }, b.prototype.onResolveStage = function(a) {
                this.nextStage()
            }, b.prototype.onRevealComplete = function(a) {
                a.target.removeEventListener(g.sequencers.SEQUENCE_END, this.onRevealComplete, this), this.nextStage()
            }, b.onEndGame = function(a) {}, b.prototype.onBeginNewGame = function(a) {}, b.prototype.onAccountBalance = function(a) {}, b.prototype.onExitStage = function(a) {
                this._bubblePickAnimsPlayer.hidePickLayer(), k.AudioPlayer.playSound("pickerToFreeSpins"), this.stopPickerBackground(), this._originalPickerOrientationSet = !1, this._playerSessionStartsInPicker = !1, this.dispatchEvent(new e.events.Event(p.Game.TRANSITION_READY))
            }, b.prototype.onAbortNextStage = function(a) {
                this.nextStage()
            }, b.prototype.onResetNextStage = function(a) {
                this.doAdditionalInit(a.data), this.nextStage()
            }, b.prototype.setState = function(a) {
                switch (a) {
                    case q.Intro:
                    case q.Idle:
                        this.setSendReceiveEnable(!1), this._consoleProxy.disableControlConsole();
                        break;
                    case q.Picked:
                        this.setSendReceiveEnable(!0), this._consoleProxy.disableControlConsole();
                        break;
                    case q.Disable:
                        this.setSendReceiveEnable(!1), this._consoleProxy.disableControlConsole()
                }
            }, b.prototype.setSendReceiveEnable = function(a) {
                this._sendReceiveEnable != a && (this._sendReceiveEnable = a, null != this._sendReceive && (this._sendReceiveEnable ? this._sendReceiveLoopSequence.startSequence() : (this._sendReceiveLoopSequence.stopSequence(), this._sendReceive.gotoAndStop("off"))))
            }, b.prototype.enableControls = function(a) {
                void 0 === a && (a = !0), a ? (this.setState(q.Idle), this.nextStage()) : this.setState(q.Disable)
            }, b.prototype.addToStage = function(a) {
                a.addChild(this.skin), this.addBusListeners(), this._enable = !0
            }, b.prototype.removeFromStage = function(a) {
                a.removeChild(this.skin), this.removeBusListeners(), this.removeEventListeners(), this._enable = !1
            }, Object.defineProperty(b.prototype, "enable", {
                get: function() {
                    return this._enable
                },
                set: function(a) {
                    this._enable != a && (this._enable = a, this.enableControls(a))
                },
                enumerable: !0,
                configurable: !0
            }), b.prototype.addBusListeners = function() {
                this._msgBus.addEventListener(c.GameMsgBus.ENTER_NEXT_STAGE, this.onEnterNextStage, this), this._msgBus.addEventListener(c.GameMsgBus.BEFORE_REQUEST, this.onBeforeRequest, this), this._msgBus.addEventListener(c.GameMsgBus.MAKE_REQUEST, this.onMakeRequest, this), this._msgBus.addEventListener(c.GameMsgBus.RESOLVE_STAGE, this.onResolveStage, this), this._msgBus.addEventListener(c.GameMsgBus.BEGIN_NEW_GAME, this.onBeginNewGame, this), this._msgBus.addEventListener(c.GameMsgBus.ACCOUNT_BALANCES, this.onAccountBalance, this), this._msgBus.addEventListener(c.GameMsgBus.BEFORE_SHOW_STAGE, this.onBeforeShowStage, this), this._msgBus.addEventListener(c.GameMsgBus.START_GAME_IN_PROGRESS_STAGE, this.onStartGameInProgressStage, this), this._msgBus.addEventListener(c.GameMsgBus.START_GAME_IN_PROGRESS_NEXT_STAGE, this.onStartGameInProgressNextStage, this), this._msgBus.addEventListener(c.GameMsgBus.EXIT_STAGE, this.onExitStage, this), this._msgBus.addEventListener(c.GameMsgBus.ABORT_NEXT_STAGE, this.onAbortNextStage, this), this._msgBus.addEventListener(c.GameMsgBus.RESET_NEXT_STAGE, this.onResetNextStage, this)
            }, b.prototype.removeBusListeners = function() {
                this._msgBus.removeEventListener(c.GameMsgBus.ENTER_NEXT_STAGE, this.onEnterNextStage, this), this._msgBus.removeEventListener(c.GameMsgBus.BEFORE_REQUEST, this.onBeforeRequest, this), this._msgBus.removeEventListener(c.GameMsgBus.MAKE_REQUEST, this.onMakeRequest, this), this._msgBus.removeEventListener(c.GameMsgBus.RESOLVE_STAGE, this.onResolveStage, this), this._msgBus.removeEventListener(c.GameMsgBus.BEGIN_NEW_GAME, this.onBeginNewGame, this), this._msgBus.removeEventListener(c.GameMsgBus.ACCOUNT_BALANCES, this.onAccountBalance, this), this._msgBus.removeEventListener(c.GameMsgBus.BEFORE_SHOW_STAGE, this.onBeforeShowStage, this), this._msgBus.removeEventListener(c.GameMsgBus.START_GAME_IN_PROGRESS_STAGE, this.onStartGameInProgressStage, this), this._msgBus.removeEventListener(c.GameMsgBus.START_GAME_IN_PROGRESS_NEXT_STAGE, this.onStartGameInProgressNextStage, this), this._msgBus.removeEventListener(c.GameMsgBus.EXIT_STAGE, this.onExitStage, this), this._msgBus.removeEventListener(c.GameMsgBus.ABORT_NEXT_STAGE, this.onAbortNextStage, this), this._msgBus.removeEventListener(c.GameMsgBus.RESET_NEXT_STAGE, this.onResetNextStage, this)
            }, b.prototype.nextStage = function() {
                this._msgBus.dispatchEvent(new e.events.Event(c.GameMsgBus.NEXT_STAGE))
            }, b.prototype.addEventListeners = function() {}, b.prototype.removeEventListeners = function() {
                this._isInit, this._bubblePickAnimsPlayer.removeEventListener(n.BubblePickAnimsPlayer.ALL_PICKS_DONE, this.onAllPicksDone, this), this._bubblePickAnimsPlayer.removeEventListener(n.BubblePickAnimsPlayer.BUBBLE_POP_START, this.onBubblePopStart, this), this._bubblePickAnimsPlayer.removeEventListeners(), this._pickerMetersPlayer.removeEventListeners()
            }, b.prototype.onOrientationChange_PickerView = function(a) {
                var b = this,
                    c = b._currentOrientation;
                b._currentOrientation = b._assetManager.getOrientation(), c != b._currentOrientation && "mobile" == b._gameChannel && b._pickerBackgroundPlaying && b.playPickerBackground(b._currentOrientation)
            }, b.prototype.playPickerBackground = function(a) {
                var b = this,
                    c = -1;
                a == d.AssetManager.LANDSCAPE_ORIENTATION && null != b._pickerBackgroundLandscape ? (null == b._pickerBackgroundPortrait || b._pickerBackgroundPortrait.paused || (b._pickerBackgroundPortrait.stop(), c = b._pickerBackgroundPortrait.currentFrame), b._pickerBackgroundLandscape.visible = !0, b._pickerBackgroundLandscape.totalFrames > 1 ? b._pickerBackgroundLandscape.gotoAndPlay(-1 == c ? 0 : c) : b._pickerBackgroundLandscape.gotoAndStop(0), null != b._pickerBackgroundPortrait && (b._pickerBackgroundPortrait.visible = !1), b._pickerBackgroundPlaying = !0) : null != b._pickerBackgroundPortrait && (null == b._pickerBackgroundLandscape || b._pickerBackgroundLandscape.paused || (b._pickerBackgroundLandscape.stop(), c = b._pickerBackgroundLandscape.currentFrame), b._pickerBackgroundPortrait.visible = !0, b._pickerBackgroundPortrait.totalFrames > 1 ? b._pickerBackgroundPortrait.gotoAndPlay(-1 == c ? 0 : c) : b._pickerBackgroundPortrait.gotoAndStop(0), null != b._pickerBackgroundLandscape && (b._pickerBackgroundLandscape.visible = !1), b._pickerBackgroundPlaying = !0)
            }, b.prototype.stopPickerBackground = function() {
                null != this._pickerBackgroundLandscape && this._pickerBackgroundLandscape.stop(), null != this._pickerBackgroundPortrait && this._pickerBackgroundPortrait.stop(), this._pickerBackgroundPlaying = !1
            }, b.prototype.stopAndHidePickerBackgrounds = function() {
                null != this._pickerBackgroundLandscape && (this._pickerBackgroundLandscape.stop(), this._pickerBackgroundLandscape.visible = !1), null != this._pickerBackgroundPortrait && (this._pickerBackgroundPortrait.stop(), this._pickerBackgroundPortrait.visible = !1), this._pickerBackgroundPlaying = !1
            }, b
        }(j.StageView);
        r.PICKER_SEQUENCE_POPULATION_OUTCOME_NAME = "Loop.PickerSequence", r.PICKER_POPULATION_REEL_NAMES = ["L0C0R0", "L0C1R0", "L0C2R0"], b.PickerView = r
    }), define("views/freeSpin/FreeSpinControlsView", ["require", "exports", "wcgf/core/events", "wcgf/coreComponents/PlayButtonController", "wcgf/coreComponents/LabeledTextFieldController", "wcgf/core/AssetManager", "wcgf/core/TextManager", "wcgf/core/CurrencyFormatter", "wcgf/gameComponents/RollupIncrementer", "wcgf/sequencers/ISequenceItem", "wcgf/messageBus/ConsoleBusProxy", "common/audio/AudioPlayer", "common/bubbleBoost/button/BubbleBoostButton"], function(a, b, c, d, e, f, g, h, i, j, k, l, m) {
        "use strict";
        var n;
        ! function(a) {
            a[a.StartIdle = 0] = "StartIdle", a[a.Spinning = 1] = "Spinning", a[a.Resolving = 2] = "Resolving", a[a.Idle = 3] = "Idle", a[a.Rollup = 4] = "Rollup", a[a.Disable = 5] = "Disable", a[a.BonusIdle = 6] = "BonusIdle", a[a.BonusTransition = 7] = "BonusTransition"
        }(n = b.ControlsState || (b.ControlsState = {}));
        var o = function(a) {
            function b() {
                var b = a.call(this) || this;
                return b._rollupIndex = 0, b._totalBet = 0, b._count = 0, b._totalAwarded = 0, b._state = n.Idle, b._assetManager = f.AssetManager.getInstance(), b._consoleProxy = k.ConsoleBusProxy.getInstance(), b
            }
            return __extends(b, a), b.prototype.init = function(a) {
                void 0 === a && (a = null), this.setBubbleBoostButton(a), this.setDenomination(a), this.setPlayButton(), this.setSpinsPlayedMeter(a), this.setBonusWinMeter(), this.setPayout(a), this.resetWin(), this.setRollup()
            }, b.prototype.setBubbleBoostButton = function(a) {
                var b, c = a.gameLogicResponse.triggerOutcome;
                b = c.getValue("Game.BetWithFeature");
                var d = b.trigger[0],
                    e = d.name.split("O").length > 1 ? m.AnimationState.FeatureOn : m.AnimationState.FeatureOff;
                this._bubbleBoostButton = new m.BubbleBoostButton, this._bubbleBoostButton.init(this._assetManager.getAsset("freeSpinBubbleBoostButton"), "FreeSpin", "bubbleBoostOnButton", "bubbleBoostOffButton", "bubbleBoostAnims", "hitArea", e), this._bubbleBoostButton.enableButton(!1)
            }, b.prototype.setPlayButton = function() {
                null == this._playButton && (this._playButton = new d.PlayButtonController(this._assetManager.getAsset("freeSpinPlayButton")), this._playButton.init(), this._playButton.state = d.PlayButtonState.Spin)
            }, b.prototype.setSpinsPlayedMeter = function(a) {
                this._spinsPlayedMeter = new e.LabeledTextFieldController(this._assetManager.getAsset("spinsPlayedMeter")), this._spinsPlayedMeter.init(), this._spinsPlayedMeter.label = g.TextManager.getInstance().getText("spinsPlayed"), this.initSpinsPlayedMeter(a)
            }, b.prototype.initSpinsPlayedMeter = function(a) {
                var b = a.gameLogicResponse.freeSpinOutcomes.getValue("FreeSpinOutcome");
                this._count = b.count, this._totalAwarded = b.totalAwarded, this._spinsPlayedMeter.setText(this._count + "/" + this._totalAwarded)
            }, b.prototype.incrementCount = function() {
                this._count++, this._spinsPlayedMeter.setText(this._count + "/" + this._totalAwarded)
            }, b.prototype.setBonusWinMeter = function() {
                this._bonusWinMeter = new e.LabeledTextFieldController(this._assetManager.getAsset("bonusWinMeter")), this._bonusWinMeter.init(), this._bonusWinMeter.setAutoCache(!1), this._bonusWinMeter.label = g.TextManager.getInstance().getText("bonusWin")
            }, b.prototype.setDenomination = function(a) {
                null != a && null != a.paytableResponse && null != a.paytableResponse.denominationList && (this._denomination = a.paytableResponse.denominationList[0].value)
            }, b.prototype.setTotalBet = function(a) {
                this._totalBet = a.gameLogicResponse.patternSliderInput.betPerPattern * a.gameLogicResponse.patternSliderInput.patternsBet
            }, b.prototype.setRollup = function() {
                this._rollup = new i.RollupIncrementer, this._rollup.denomination = this._denomination, this._rollup.textField = this._bonusWinMeter, this._rollup.addOnTargetValue = !0, this._rollup.currentValue = this._payout
            }, b.prototype.skipRollup = function() {
                this.hasPayout() && this._rollup.stopSequence()
            }, b.prototype.setRollupSequence = function() {
                this.hasPayout() && (this._rollup.targetValue = this._payout, this.calculateThreshold(), this._rollup.addEventListener(j.sequencers.SEQUENCE_END, this.onRollupComplete, this), this._rollup.addEventListener(j.sequencers.SEQUENCE_START, this.onRollupStart, this))
            }, b.prototype.onRollupStart = function(a) {
                this._rollup.removeEventListener(j.sequencers.SEQUENCE_START, this.onRollupStart, this), l.AudioPlayer.playSound("onFreeSpinRollup" + this._rollupIndex + "Start")
            }, b.prototype.onRollupComplete = function(a) {
                this._rollup.removeEventListener(j.sequencers.SEQUENCE_END, this.onRollupComplete, this), l.AudioPlayer.playSound("onFreeSpinRollup" + this._rollupIndex + "End")
            }, Object.defineProperty(b.prototype, "rollup", {
                get: function() {
                    return this._rollup
                },
                enumerable: !0,
                configurable: !0
            }), b.prototype.calculateThreshold = function() {
                this.thresholdReached(1e3, b.BIG_WIN_MULTIPLIER) ? this._rollupIndex = 2 : this.thresholdReached(100, b.MID_WIN_MULTIPLIER) ? this._rollupIndex = 1 : this._rollupIndex = 0
            }, b.prototype.thresholdReached = function(a, b) {
                return this._win >= a && this._win >= this._totalBet * b
            }, b.prototype.updateWin = function(a) {
                this.setPayout(a), this.setWin(a), this.updateWinField(0 != this._payout ? this.formatValue(this._payout, this._denomination) : "")
            }, b.prototype.resetWin = function() {
                this.updateWinField("")
            }, b.prototype.updateWinField = function(a) {
                this._bonusWinMeter.setText(a)
            }, b.prototype.setPayout = function(a) {
                if (null != a) {
                    if (null != a.gameLogicResponse.awardCapOutcome && a.gameLogicResponse.awardCapOutcome.awardCapExceeded) {
                        var b = a.gameLogicResponse.prizeOutcomes.getValue("Game.Total");
                        return void(this._payout = b.pay)
                    }
                    var c = a.gameLogicResponse.prizeOutcomes.getValue("FreeSpin.Total");
                    if (c && 0 != c.pay && !isNaN(c.pay)) return void(this._payout = c.pay)
                }
                this._payout = 0
            }, b.prototype.setWin = function(a) {
                this._win = 0, null != a && a.gameLogicResponse.prizeOutcomes.getValue("FreeSpin.Lines") && (this._win += a.gameLogicResponse.prizeOutcomes.getValue("FreeSpin.Lines").pay), null != a && a.gameLogicResponse.prizeOutcomes.getValue("FreeSpin.Scatter") && (this._win += a.gameLogicResponse.prizeOutcomes.getValue("FreeSpin.Scatter").pay)
            }, b.prototype.hasPayout = function() {
                return 0 != this._payout
            }, Object.defineProperty(b.prototype, "state", {
                get: function() {
                    return this._state
                },
                set: function(a) {
                    this._state != a && (this._state = a, this.updateState())
                },
                enumerable: !0,
                configurable: !0
            }), b.prototype.updateState = function() {
                switch (this._state) {
                    case n.Idle:
                        this._playButton.enable = !0, this._playButton.state = d.PlayButtonState.Spin, this._playButton.sendReceiveEnable = !1, this._consoleProxy.disableControlConsole(), this._bubbleBoostButton.enableButton(!1);
                        break;
                    case n.Rollup:
                        this._playButton.enable = !0, this._playButton.state = d.PlayButtonState.Skip, this._playButton.sendReceiveEnable = !1, this._consoleProxy.disableControlConsole(), this._bubbleBoostButton.enableButton(!1);
                        break;
                    case n.Spinning:
                        this._playButton.state = d.PlayButtonState.Spin, this._playButton.enable = !1, this._playButton.sendReceiveEnable = !0, this._consoleProxy.disableControlConsole(), this._bubbleBoostButton.enableButton(!1);
                        break;
                    case n.Resolving:
                        this._playButton.state = d.PlayButtonState.Spin, this._playButton.enable = !1, this._playButton.sendReceiveEnable = !1, this._consoleProxy.disableControlConsole();
                        break;
                    case n.BonusIdle:
                    case n.BonusTransition:
                        this._playButton.state = d.PlayButtonState.Start, this._playButton.enable = !1, this._playButton.sendReceiveEnable = !1, this._consoleProxy.disableControlConsole(), this._bubbleBoostButton.enableButton(!1);
                        break;
                    case n.Disable:
                        this._playButton.state = d.PlayButtonState.Spin, this._playButton.enable = !1, this._playButton.sendReceiveEnable = !1, this._consoleProxy.disableControlConsole(), this._bubbleBoostButton.enableButton(!1);
                        break;
                    case n.StartIdle:
                        this._playButton.state = d.PlayButtonState.Start, this._playButton.enable = !0, this._playButton.sendReceiveEnable = !1, this._consoleProxy.disableControlConsole(), this._bubbleBoostButton.enableButton(!1)
                }
            }, b.prototype.onSkipButtonClick = function(a) {
                this.dispatchEvent(new c.events.Event(b.SKIP_BUTTON_CLICK, null, this))
            }, b.prototype.onStartButtonClick = function(a) {
                this.dispatchEvent(new c.events.Event(b.START_BUTTON_CLICK, null, this))
            }, b.prototype.onSpinButtonClick = function(a) {
                l.AudioPlayer.playSound("ControlsButtonSpin"), this.dispatchEvent(new c.events.Event(b.SPIN_BUTTON_CLICK, null, this))
            }, b.prototype.formatValue = function(a, b) {
                return void 0 === b && (b = this._denomination), h.CurrencyFormatter.getInstance().format(a, b)
            }, b.prototype.getCurrentBubbleBoostButtonState = function() {
                return this._bubbleBoostButton.curButtonState
            }, b.prototype.getBubbleBoostButton = function() {
                return this._bubbleBoostButton
            }, b.prototype.addEventListeners = function() {
                this._playButton.addEventListener(d.PlayButtonController.SKIP_BUTTON_CLICK, this.onSkipButtonClick, this), this._playButton.addEventListener(d.PlayButtonController.SPIN_BUTTON_CLICK, this.onSpinButtonClick, this), this._playButton.addEventListener(d.PlayButtonController.START_BUTTON_CLICK, this.onStartButtonClick, this)
            }, b.prototype.removeEventListeners = function() {
                this._playButton.removeEventListener(d.PlayButtonController.SKIP_BUTTON_CLICK, this.onSkipButtonClick, this), this._playButton.removeEventListener(d.PlayButtonController.SPIN_BUTTON_CLICK, this.onSpinButtonClick, this), this._playButton.removeEventListener(d.PlayButtonController.START_BUTTON_CLICK, this.onStartButtonClick, this)
            }, b
        }(c.events.EventDispatcher);
        o.SPIN_BUTTON_CLICK = "FreeSpinControlsViewSpinClick", o.SKIP_BUTTON_CLICK = "FreeSpinControlsViewSkipClick", o.START_BUTTON_CLICK = "FreeSpinControlsViewStartClick", o.AUTO_PLAY_CLICK = "FreeSpinControlsViewAutoPlayClick", o.AUTO_PLAY_CHOICES_CLICK = "FreeSpinControlsViewAutoPlayChoicesClick", o.AUTO_PLAY_STOP_CLICK = "FreeSpinControlsViewAutoPlayStopClick", o.BIG_WIN_MULTIPLIER = 10, o.MID_WIN_MULTIPLIER = 5, b.FreeSpinControlsView = o
    }), define("views/freeSpin/FreeSpinView", ["require", "exports", "wcgf/messageBus/GameMsgBus", "wcgf/core/AssetManager", "wcgf/core/events", "wcgf/vendors/typescript_collections/Dictionary", "wcgf/gameComponents/reels/slotsReelSet/SlotsReelSet", "wcgf/coreComponents/GenericMessageController", "wcgf/sequencers/ISequenceItem", "wcgf/sequencers/TimerEventSequenceItem", "wcgf/gameComponents/RollupIncrementer", "wcgf/sequencers/LinearSequencer", "Game", "views/freeSpin/FreeSpinControlsView", "common/wincycle/WinCycle", "common/reels/ReelsHelper", "common/reels/SpinStrategy", "common/wincycle/WinSequencer", "common/audio/AudioPlayer", "common/bubbleBoost/BubbleBoostManager", "common/view/StageView", "common/bubbleBoost/button/BubbleBoostButton", "common/plaques/BubbleBoostPlaqueController"], function(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w) {
        "use strict";
        var x = function(a) {
            function b(b) {
                var e = a.call(this, b, "FreeSpinSkin", "FreeSpin") || this;
                e._symbolNames = ["s01", "s02", "s03", "s04", "s05", "s06", "s07", "s08", "s09", "b01", "w01"], e._prizeNames = ["FreeSpin.Lines", "FreeSpin.Scatter"], e._enable = !1, e._spinStarted = !1, e._rollupComplete = !1, e._firstCycleComplete = !1, e._resetStageHit = !1, e._inProgressStageHit = !1, e._exitStage = !1, e._autoSpinPauseSeq = new j.TimerEventSequenceItem(1e3), e._skinList = ["Paylines", "WinBoxes", "Messages", "Plaques", "FreeSpinControlSkin"], e._currentOrientation = d.AssetManager.LANDSCAPE_ORIENTATION, e._gameChannel = b.assetPack, e._msgBus = c.GameMsgBus.getInstance(), e._assetManager = d.AssetManager.getInstance(), e._freeSpinControlsView = new n.FreeSpinControlsView, e._reelSet = new g.SlotsReelSet("Symbols", e._assetManager.getAsset("FreeSpinReelsContainer"));
                var i = new f.default;
                return i.setValue("s01", 1), i.setValue("w01", 2), e._reelSet.symbolsPriority = i, e._bubbleBoostManager = new t.BubbleBoostManager(e._gameChannel, "FreeSpin"), e._messageController = new h.GenericMessageController, e._reelsHelper = new p.ReelsHelper(e._assetManager.getAsset("FreeSpinAnticipationContainer")), e._plaqueController = new w.BubbleBoostPlaqueController, e._winSequencer = new r.WinSequencer(e._reelSet, e.stageName), e
            }
            return __extends(b, a), b.prototype.doInit = function(a) {
                this._reelSet.stripInfoName = b.getStripInfoName(a.gameLogicResponse), this._reelSet.populationOutcomeName = this.stageName + ".Reels";
                var c = new f.default;
                c.setValue("s01", 10), c.setValue("s02", 10), c.setValue("s03", 10), c.setValue("s04", 10), c.setValue("s05", 10), c.setValue("s06", 10), c.setValue("s07", 10), c.setValue("s08", 10), c.setValue("s09", 10), c.setValue("b01", 10), c.setValue("w01", 10), this.onOrientationChange_FreeSpinView(null), this._spinStrategies = b.getSpinStrategies(5), this._reelSet.init(this._spinStrategies, a.paytableResponse.stripsInfo, a.gameLogicResponse.populationOutcomes, c), this._messageController.init(), this._plaqueController.init(a), this._winSequencer.init(a, this._prizeNames)
            }, b.prototype.doAdditionalInit = function(a) {
                this._freeSpinControlsView.init(a), this._assetManager.hasEventListener(d.AssetManager.ORIENTATION_CHANGE, this.onOrientationChange_FreeSpinView, this) || this._assetManager.addEventListener(d.AssetManager.ORIENTATION_CHANGE, this.onOrientationChange_FreeSpinView, this), this._reelsHelper.hideAnticipationAnims(), this._rollupComplete = !0, this._firstCycleComplete = !0, this._freeSpinControlsView.state = n.ControlsState.Disable, this._plaqueController.displayBubbleBoostPromptPlaque(!1);
                var b = a.gameLogicResponse.triggerOutcome,
                    c = b.getValue("Game.BetWithFeature"),
                    e = c.trigger[0],
                    f = e.name.split("O"),
                    g = parseInt(f[0]),
                    h = f.length > 1 ? v.AnimationState.FeatureOn : v.AnimationState.FeatureOff;
                this._bubbleBoostManager.setBubbleBoostButton(null, h), this._bubbleBoostManagerInitialized ? this._bubbleBoostManager.removeAllBubbleAnimsAndSequences() : (this._bubbleBoostManager.init(a.gameLogicResponse, d.AssetManager.getInstance(), this._skin, this._assetManager.getAsset("freeSpinBubbleEntranceAnimIntroLandscape"), this._assetManager.getAsset("freeSpinBubbleEntranceAnimIntroPortrait"), this._assetManager.getAsset("freeSpinBubbleEntranceAnimsLandscape"), this._assetManager.getAsset("freeSpinBubbleEntranceAnimsPortrait"), this._reelSet), this._bubbleBoostManagerInitialized = !0), this._bubbleBoostManager.handleBubblesOnInit(g), s.AudioPlayer.playSound("onFreeSpinStart"), this._bonusBackgroundLandscape = this._assetManager.getAsset("freeSpinBackgroundLandscape"), null != this._bonusBackgroundLandscape && (this._bonusBackgroundPlaying || (this._bonusBackgroundLandscape.gotoAndStop(0), this._bonusBackgroundLandscape.visible = !1), this._bonusBackgroundLandscape.loop = !0), this._bonusBackgroundPortrait = this._assetManager.getAsset("freeSpinBackgroundPortrait"), null != this._bonusBackgroundPortrait && (this._bonusBackgroundPlaying || (this._bonusBackgroundPortrait.gotoAndStop(0), this._bonusBackgroundPortrait.visible = !1), this._bonusBackgroundPortrait.loop = !0), this._bonusBackgroundPlaying || this.playBonusBackground(this._currentOrientation), this.addEventListeners(), this._startButtonClickedOnExitStage = !1
            }, b.getSpinStrategies = function(a) {
                for (var b = new f.default, c = 0; c < a; c++) b.setValue("Reel" + c, new q.SpinStrategy);
                return b
            }, b.getStripInfoName = function(a) {
                var c = a.triggerOutcome;
                if (null != c.getValue(b.RSS_TRIGGER_OUTCOME_NAME)) {
                    var d = c.getValue(b.RSS_TRIGGER_OUTCOME_NAME);
                    if (d.trigger.length > 0) return d.trigger[0].name
                }
                return "FreeSpin.ReelSet0"
            }, b.prototype.onBeforeShowStage = function(a) {
                this._bubbleBoostManager.removeAllBubbleAnimsAndSequences()
            }, b.prototype.onSpinButtonClick = function(a) {
                this.startSpin()
            }, b.prototype.startSpin = function(a) {
                void 0 === a && (a = null), this.clearEvents(), this._startButtonClickedOnExitStage = !1, this._bonusBackgroundPlaying || this.playBonusBackground(this._currentOrientation), this._bubbleBoostManager.revertCurrentReelsToNormal(), this._bubbleBoostManager.showIdleBubblesAfterSpinPressed(), this._reelsHelper.currentReelIndex = 0, this._firstCycleComplete = !1, this._rollupComplete = !1, s.AudioPlayer.playSound("ResetSmartList"), this._freeSpinControlsView.state = n.ControlsState.Spinning, this.nextStage(), this._spinStarted = !0, this._spinStrategies.forEach(function(a, b) {
                    b.spinSpeed = 2
                }), this._reelSet.spin()
            }, b.prototype.onSkipButtonClick = function(a) {
                this._winSequencer.skipSequence(), this._freeSpinControlsView.skipRollup(), this._exitStage && (this._rollupComplete = !0, this._firstCycleComplete = !0,
                    this.handleLastSpin())
            }, b.prototype.onStartGameInitial = function(a) {}, b.prototype.onBeforeRequest = function(a) {
                this._inProgressStageHit ? (this._inProgressStageHit = !1, this.nextStage()) : this._resetStageHit ? this._resetStageHit = !1 : (this._freeSpinControlsView.state = n.ControlsState.Idle, this._freeSpinControlsView.updateWin(a.data), this.handleAutoSpin())
            }, b.prototype.onMakeRequest = function(a) {
                var b, d;
                a.data.gameLogicResponse.patternSliderInput ? (b = a.data.gameLogicResponse.patternSliderInput.betPerPattern, d = a.data.gameLogicResponse.patternSliderInput.patternsBet) : (b = a.data.paytableResponse.patternSliderInfo.betInfo.steps[0], d = a.data.paytableResponse.patternSliderInfo.patternInfo.steps[0]), this._msgBus.dispatchEvent(new e.events.Event(c.GameMsgBus.PLAY_DATA, {
                    ActionInput: {
                        Action: "play"
                    },
                    PatternSliderInput: {
                        BetPerPattern: b,
                        PatternsBet: d
                    }
                })), this.nextStage()
            }, b.prototype.onAccountBalance = function(a) {
                this._isInit
            }, b.prototype.onResolveStage = function(a) {
                this._freeSpinControlsView.incrementCount(), this.handleReelStop(a)
            }, b.prototype.handleReelStop = function(a) {
                this._eventData = a, this._freeSpinControlsView.state = n.ControlsState.Resolving, this._bubbleBoostManager.analyzeNewOutcome(a.data.gameLogicResponse), this._reelSet.stripInfoName = b.getStripInfoName(a.data.gameLogicResponse), this._reelSet.populationOutcomeName = this.stageName + ".Reels", this._winSequencer.setWinOutcome(a), this._freeSpinControlsView.setWin(a.data), a.data.gameLogicResponse.outcomeDetail.nextStage != this.stageName && (this._exitStage = !0), this._reelsHelper.setNewData(a.data), this._freeSpinStopSpinPopulationOutcomes = a.data.gameLogicResponse.populationOutcomes, this._spinStarted ? (this._spinStarted = !1, this._bubbleBoostManager.boostActive && this._bubbleBoostManager.newBoostBubblesToShow() ? (this._bubbleBoostManager.addEventListener(t.BubbleBoostManager.BUBBLE_BOOST_DONE, this.onBubbleBoostDone, this), this._bubbleBoostManager.showBubbleEntranceAnimsBeforeReelStop()) : (this._bubbleBoostManager.addEventListener(t.BubbleBoostManager.BUBBLE_FLOATUP_DONE, this.onBubbleFloatUpDone, this), this._bubbleBoostManager.showBubbleFloatAnimsAfterBubbleEntranceAnims())) : this.nextStage()
            }, b.prototype.onReelStopSpinBegin = function(a) {
                this._reelsHelper.playReelStopSound();
                var b = this._reelsHelper.getLandAnims();
                if (null != b) {
                    var c = this._winSequencer.winCycle.getSymbolSequences(b);
                    this._reelsHelper.handleLandAnim(c)
                }
                this._reelsHelper.currentReelIndex++, this._reelsHelper.handleAnticipation(), this._reelsHelper.hasAnticipation && this._reelsHelper.getAnticipationForReel(this._reelsHelper.currentReelIndex) && (this._spinStrategies.getValue("Reel" + this._reelsHelper.currentReelIndex).spinSpeed = 4, this._reelsHelper.playAnticipationForReel(this._reelsHelper.currentReelIndex))
            }, b.prototype.onReelStopSpinEnd = function(a) {}, b.prototype.onAllReelStop = function(a) {
                this._reelsHelper.hideAnticipationAnims(), this._bubbleBoostManager.noExpansionsOnCurrentOutcome() ? (this._bubbleBoostManager.showNewIdleBubblesBelowReels(!0), this._bubbleBoostManager.bubblesExistOnReelsOnCurrentOutcome() ? (this._bubbleBoostManager.addEventListener(t.BubbleBoostManager.BUBBLE_POP_DONE, this.onBubblePopAnimsDone, this), this._bubbleBoostManager.transformCurrentReelsToWildsWithEvent()) : this.nextStage()) : (this._bubbleBoostManager.addEventListener(t.BubbleBoostManager.BUBBLE_PRESHOW_DONE, this.onBubblePreshowDone, this), this._bubbleBoostManager.showBubbleExpandAnimsAfterReelsStop(), s.AudioPlayer.playSound("bubbleExplosion"))
            }, b.prototype.onBubbleBoostDone = function(a) {
                this._bubbleBoostManager.removeEventListener(t.BubbleBoostManager.BUBBLE_BOOST_DONE, this.onBubbleBoostDone, this), this._bubbleBoostManager.addEventListener(t.BubbleBoostManager.BUBBLE_FLOATUP_DONE, this.onBubbleFloatUpDone, this), this._bubbleBoostManager.showBubbleFloatAnimsAfterBubbleEntranceAnims()
            }, b.prototype.onBubbleFloatUpDone = function(a) {
                this._bubbleBoostManager.removeEventListener(t.BubbleBoostManager.BUBBLE_FLOATUP_DONE, this.onBubbleFloatUpDone, this);
                var c = b.DEFAULT_SPIN_DURATION.concat();
                c = this._reelsHelper.getSpinDurationsForAllReels(c), this._reelSet.stopSpin(this._freeSpinStopSpinPopulationOutcomes, c)
            }, b.prototype.onBubblePreshowDone = function(a) {
                this._bubbleBoostManager.removeEventListener(t.BubbleBoostManager.BUBBLE_PRESHOW_DONE, this.onBubblePreshowDone, this), this._bubbleBoostManager.showNewIdleBubblesBelowReels(!0), this._bubbleBoostManager.bubblesExistOnReelsOnCurrentOutcome() ? (this._bubbleBoostManager.addEventListener(t.BubbleBoostManager.BUBBLE_POP_DONE, this.onBubblePopAnimsDone, this), this._bubbleBoostManager.changeReelsForExpandedWilds()) : this.nextStage()
            }, b.prototype.onBubblePopAnimsDone = function(a) {
                this._bubbleBoostManager.removeEventListener(t.BubbleBoostManager.BUBBLE_POP_DONE, this.onBubblePopAnimsDone, this), this.nextStage()
            }, b.prototype.onEndGame = function(a) {
                this.handleWinCelebration(a)
            }, b.prototype.onInProgressStage = function(a) {
                this._eventData = a, this.handleWinCelebration(a)
            }, b.prototype.onStartGameInProgressStage = function(a) {
                s.AudioPlayer.playSound("freeSpinsRefresh"), this.nextStage()
            }, b.prototype.onStartGameInProgressNextStage = function(a) {
                this._freeSpinControlsView.updateWin(a.data)
            }, b.prototype.handleWinCelebration = function(a) {
                a.data.gameLogicResponse.awardCapOutcome.awardCapExceeded || this.handleRetrigger(a), this._winSequencer.winCycleHelper.hasPrize() ? (this._freeSpinControlsView.setPayout(a.data), this._freeSpinControlsView.setRollupSequence(), this._freeSpinControlsView.state = n.ControlsState.Rollup, this._freeSpinControlsView.rollup.addEventListener(k.RollupIncrementer.ROLLUP_COMPLETE, this.onRollupComplete, this), this._winSequencer.winCycle.addEventListener(o.WinCycle.FIRST_CYCLE_DONE, this.onFirstCycleComplete, this), this._winSequencer.setWinCelebration(a, this._freeSpinControlsView.rollup), this._winSequencer.startSequence(), s.AudioPlayer.playFreeSpinRollup()) : (this._firstCycleComplete = !0, this._rollupComplete = !0, this._exitStage ? (this._freeSpinControlsView.state = n.ControlsState.BonusTransition, this.addTransitionPause()) : (this.nextStage(), this._freeSpinControlsView.state = n.ControlsState.Idle))
            }, b.prototype.handleRetrigger = function(a) {
                var b = a.data.gameLogicResponse.triggerOutcome.getValue("Picker");
                if (b && b.trigger.length > 0) {
                    this.startRetriggerPauseSequence();
                    var c = a.data.gameLogicResponse.triggerOutcome.getValue("FreeSpin.MaxRetriggerHit");
                    c && c.trigger.length > 0 ? this._plaqueController.displayLabelView(this._plaqueController.maxRetriggerPlaque) : this._plaqueController.displayLabelView(this._plaqueController.retriggerPlaque)
                }
            }, b.prototype.startRetriggerPauseSequence = function() {
                var a = new j.TimerEventSequenceItem(b.RETRIGGER_PLAQUE_TIME_DELAY),
                    c = new Array(a),
                    d = new l.LinearSequencer(c, 1);
                d.addEventListener(i.sequencers.SEQUENCE_END, this.onRetriggerPause_complete, this), d.startSequence()
            }, b.prototype.onFirstCycleComplete = function(a) {
                this._firstCycleComplete = !0, this._exitStage ? this.handleLastSpin() : this.handleAutoSpin()
            }, b.prototype.onRollupComplete = function(a) {
                this._rollupComplete = !0, s.AudioPlayer.stopFreeSpinRollup(), this._exitStage ? this.handleLastSpin() : this.nextStage()
            }, b.prototype.handleLastSpin = function() {
                this._firstCycleComplete && this._rollupComplete && (this._freeSpinControlsView.state = n.ControlsState.BonusIdle, this.addTransitionPause())
            }, b.prototype.handleAutoSpin = function() {
                this._firstCycleComplete && this._rollupComplete && (this._winSequencer.clearEvents(), this._autoSpinPauseSeq.addEventListener(i.sequencers.SEQUENCE_END, this.startSpin, this), this._autoSpinPauseSeq.startSequence())
            }, b.prototype.clearEvents = function() {
                this._winSequencer.clearEvents(), this._winSequencer.winCycle.hasEventListener(o.WinCycle.FIRST_CYCLE_DONE, this.onFirstCycleComplete, this) && this._winSequencer.winCycle.removeEventListener(o.WinCycle.FIRST_CYCLE_DONE, this.onFirstCycleComplete, this), this._freeSpinControlsView.rollup.hasEventListener(k.RollupIncrementer.ROLLUP_COMPLETE, this.onRollupComplete, this) && this._freeSpinControlsView.rollup.removeEventListener(k.RollupIncrementer.ROLLUP_COMPLETE, this.onRollupComplete, this), this._autoSpinPauseSeq.hasEventListener(i.sequencers.SEQUENCE_END, this.startSpin, this) && this._autoSpinPauseSeq.removeEventListener(i.sequencers.SEQUENCE_END, this.startSpin, this)
            }, b.prototype.onRetriggerPause_complete = function(a) {
                a.target.removeEventListener(i.sequencers.SEQUENCE_END, this.onRetriggerPause_complete, this), this._plaqueController.hideCurrentPlaque()
            }, b.prototype.onBeginNewGame = function(a) {
                this._freeSpinControlsView.state = n.ControlsState.Idle, this.handleAutoSpin()
            }, b.prototype.onExitStage = function(a) {
                a.data.gameLogicResponse.awardCapOutcome.awardCapExceeded ? (this._plaqueController.displayMultiLabeledView(this._plaqueController.maxAwardPlaqueBonus), this._freeSpinControlsView.state = n.ControlsState.Disable, this._freeSpinControlsView.updateWin(a.data), this.addTransitionPause()) : this.transitionOut(a)
            }, b.prototype.onAbortNextStage = function(a) {
                this._freeSpinControlsView.state = n.ControlsState.Disable, this._reelSet.reset(a.data.gameLogicResponse.populationOutcomes), this.nextStage()
            }, b.prototype.onResetNextStage = function(a) {
                this._freeSpinControlsView.state = n.ControlsState.Idle, this._resetStageHit = !0, this.nextStage()
            }, b.prototype.onEnterNextStage = function(a) {
                this._exitStage = !1, this.clearEvents(), this.nextStage()
            }, b.prototype.transitionOut = function(a) {
                this._bubbleBoostManager.replaceTransformedBonusSymbolsOnReels(a.data, !1), this.handleWinCelebration(this._eventData)
            }, b.prototype.enableControls = function(a) {
                void 0 === a && (a = !0), this._freeSpinControlsView.state = a ? n.ControlsState.StartIdle : n.ControlsState.Disable
            }, b.prototype.addTransitionPause = function() {
                var a = new j.TimerEventSequenceItem(2e3),
                    b = new Array(a),
                    c = new l.LinearSequencer(b, 1);
                c.addEventListener(i.sequencers.SEQUENCE_END, this.onTransitionPause_complete, this), c.startSequence()
            }, b.prototype.onTransitionPause_complete = function(a) {
                a.target.removeEventListener(i.sequencers.SEQUENCE_END, this.onTransitionPause_complete, this), this._winSequencer.stopSequence(!0), this._plaqueController.hideCurrentPlaque(), this.stopBonusBackground(), this._startButtonClickedOnExitStage || this.dispatchEvent(new e.events.Event(m.Game.TRANSITION_READY))
            }, b.prototype.onStartButtonClick = function(a) {
                this._exitStage ? (this._startButtonClickedOnExitStage = !0, this.clearEvents(), this._freeSpinControlsView.state = n.ControlsState.BonusTransition, this.nextStage(), s.AudioPlayer.playSound("StartButton")) : (this._inProgressStageHit = !0, this.startSpin())
            }, b.prototype.addBusListeners = function() {
                this._msgBus.addEventListener(c.GameMsgBus.START_GAME_INITIAL, this.onStartGameInitial, this), this._msgBus.addEventListener(c.GameMsgBus.BEFORE_REQUEST, this.onBeforeRequest, this), this._msgBus.addEventListener(c.GameMsgBus.MAKE_REQUEST, this.onMakeRequest, this), this._msgBus.addEventListener(c.GameMsgBus.RESOLVE_STAGE, this.onResolveStage, this), this._msgBus.addEventListener(c.GameMsgBus.END_GAME, this.onEndGame, this), this._msgBus.addEventListener(c.GameMsgBus.BEGIN_NEW_GAME, this.onBeginNewGame, this), this._msgBus.addEventListener(c.GameMsgBus.ACCOUNT_BALANCES, this.onAccountBalance, this), this._msgBus.addEventListener(c.GameMsgBus.BEFORE_SHOW_STAGE, this.onBeforeShowStage, this), this._msgBus.addEventListener(c.GameMsgBus.ENTER_NEXT_STAGE, this.onEnterNextStage, this), this._msgBus.addEventListener(c.GameMsgBus.IN_PROGRESS_STAGE, this.onInProgressStage, this), this._msgBus.addEventListener(c.GameMsgBus.START_GAME_IN_PROGRESS_STAGE, this.onStartGameInProgressStage, this), this._msgBus.addEventListener(c.GameMsgBus.START_GAME_IN_PROGRESS_NEXT_STAGE, this.onStartGameInProgressNextStage, this), this._msgBus.addEventListener(c.GameMsgBus.EXIT_STAGE, this.onExitStage, this), this._msgBus.addEventListener(c.GameMsgBus.ABORT_NEXT_STAGE, this.onAbortNextStage, this), this._msgBus.addEventListener(c.GameMsgBus.RESET_NEXT_STAGE, this.onResetNextStage, this)
            }, b.prototype.removeBusListeners = function() {
                this._msgBus.removeEventListener(c.GameMsgBus.START_GAME_INITIAL, this.onStartGameInitial, this), this._msgBus.removeEventListener(c.GameMsgBus.BEFORE_REQUEST, this.onBeforeRequest, this), this._msgBus.removeEventListener(c.GameMsgBus.MAKE_REQUEST, this.onMakeRequest, this), this._msgBus.removeEventListener(c.GameMsgBus.RESOLVE_STAGE, this.onResolveStage, this), this._msgBus.removeEventListener(c.GameMsgBus.END_GAME, this.onEndGame, this), this._msgBus.removeEventListener(c.GameMsgBus.BEGIN_NEW_GAME, this.onBeginNewGame, this), this._msgBus.removeEventListener(c.GameMsgBus.ACCOUNT_BALANCES, this.onAccountBalance, this), this._msgBus.removeEventListener(c.GameMsgBus.BEFORE_SHOW_STAGE, this.onBeforeShowStage, this), this._msgBus.removeEventListener(c.GameMsgBus.ENTER_NEXT_STAGE, this.onEnterNextStage, this), this._msgBus.removeEventListener(c.GameMsgBus.IN_PROGRESS_STAGE, this.onInProgressStage, this), this._msgBus.removeEventListener(c.GameMsgBus.START_GAME_IN_PROGRESS_STAGE, this.onStartGameInProgressStage, this), this._msgBus.removeEventListener(c.GameMsgBus.START_GAME_IN_PROGRESS_NEXT_STAGE, this.onStartGameInProgressNextStage, this), this._msgBus.removeEventListener(c.GameMsgBus.EXIT_STAGE, this.onExitStage, this), this._msgBus.removeEventListener(c.GameMsgBus.ABORT_NEXT_STAGE, this.onAbortNextStage, this), this._msgBus.removeEventListener(c.GameMsgBus.RESET_NEXT_STAGE, this.onResetNextStage, this)
            }, b.prototype.nextStage = function() {
                this._msgBus.dispatchEvent(new e.events.Event(c.GameMsgBus.NEXT_STAGE))
            }, b.prototype.addToStage = function(a) {
                a.addChild(this.skin);
                for (var b = 0, c = this._skinList; b < c.length; b++) {
                    var d = c[b];
                    a.addChild(this._assetManager.getSkin(d))
                }
                this.addBusListeners(), this._enable = !0
            }, b.prototype.removeFromStage = function(a) {
                a.removeChild(this.skin);
                for (var b = 0, c = this._skinList; b < c.length; b++) {
                    var d = c[b];
                    a.removeChild(this._assetManager.getSkin(d))
                }
                this.removeBusListeners(), this.removeEventListeners(), this._enable = !1
            }, b.prototype.removeChild = function(a) {
                this._skin.removeChild(this._assetManager.getSkin(a))
            }, Object.defineProperty(b.prototype, "enable", {
                get: function() {
                    return this._enable
                },
                set: function(a) {
                    this._enable != a && (this._enable = a, this.enableControls(a))
                },
                enumerable: !0,
                configurable: !0
            }), b.prototype.addEventListeners = function() {
                this._isInit && (this._freeSpinControlsView.addEventListener(n.FreeSpinControlsView.SPIN_BUTTON_CLICK, this.onSpinButtonClick, this), this._freeSpinControlsView.addEventListener(n.FreeSpinControlsView.SKIP_BUTTON_CLICK, this.onSkipButtonClick, this), this._freeSpinControlsView.addEventListener(n.FreeSpinControlsView.START_BUTTON_CLICK, this.onStartButtonClick, this), this._reelSet.addEventListener(g.SlotsReelSet.ALL_REEL_STOP, this.onAllReelStop, this), this._reelSet.addEventListener(g.SlotsReelSet.REEL_STOP_SPIN_BEGIN, this.onReelStopSpinBegin, this), this._reelSet.addEventListener(g.SlotsReelSet.REEL_STOP_SPIN_END, this.onReelStopSpinEnd, this), this._freeSpinControlsView.addEventListeners())
            }, b.prototype.removeEventListeners = function() {
                this._isInit && (this._freeSpinControlsView.removeEventListener(n.FreeSpinControlsView.SPIN_BUTTON_CLICK, this.onSpinButtonClick, this), this._freeSpinControlsView.removeEventListener(n.FreeSpinControlsView.SKIP_BUTTON_CLICK, this.onSkipButtonClick, this), this._freeSpinControlsView.removeEventListener(n.FreeSpinControlsView.START_BUTTON_CLICK, this.onStartButtonClick, this), this._reelsHelper.stopSequences(), this._reelSet.removeEventListener(g.SlotsReelSet.ALL_REEL_STOP, this.onAllReelStop, this), this._reelSet.removeEventListener(g.SlotsReelSet.REEL_STOP_SPIN_BEGIN, this.onReelStopSpinBegin, this), this._reelSet.removeEventListener(g.SlotsReelSet.REEL_STOP_SPIN_END, this.onReelStopSpinEnd, this), this._freeSpinControlsView.removeEventListeners(), this._bubbleBoostManager.removeEventListeners())
            }, b.prototype.onOrientationChange_FreeSpinView = function(a) {
                var b = this,
                    c = b._currentOrientation;
                b._currentOrientation = b._assetManager.getOrientation(), c != b._currentOrientation && "mobile" == b._gameChannel && b._bonusBackgroundPlaying && b.playBonusBackground(b._currentOrientation)
            }, b.prototype.startBonusBackgroundOnTransitionIn = function(a) {
                this._bonusBackgroundPlaying || (this._currentOrientation = a, this.playBonusBackground(this._currentOrientation)), this._bubbleBoostManager.setCurrentOrientationOnTransitionIn(a)
            }, b.prototype.playBonusBackground = function(a) {
                var b = this,
                    c = -1;
                a == d.AssetManager.LANDSCAPE_ORIENTATION && null != b._bonusBackgroundLandscape ? (null == b._bonusBackgroundPortrait || b._bonusBackgroundPortrait.paused || (b._bonusBackgroundPortrait.stop(), c = b._bonusBackgroundPortrait.currentFrame), b._bonusBackgroundLandscape.visible = !0, b._bonusBackgroundLandscape.totalFrames > 1 ? b._bonusBackgroundLandscape.gotoAndPlay(-1 == c ? 0 : c) : b._bonusBackgroundLandscape.gotoAndStop(0), b._bonusBackgroundPlaying = !0, null != b._bonusBackgroundPortrait && (b._bonusBackgroundPortrait.visible = !1)) : null != b._bonusBackgroundPortrait && (null == b._bonusBackgroundLandscape || b._bonusBackgroundLandscape.paused || (b._bonusBackgroundLandscape.stop(), c = b._bonusBackgroundLandscape.currentFrame), b._bonusBackgroundPortrait.visible = !0, b._bonusBackgroundPortrait.totalFrames > 1 ? b._bonusBackgroundPortrait.gotoAndPlay(-1 == c ? 0 : c) : b._bonusBackgroundPortrait.gotoAndStop(0), b._bonusBackgroundPlaying = !0, null != b._bonusBackgroundLandscape && (b._bonusBackgroundLandscape.visible = !1))
            }, b.prototype.stopBonusBackground = function() {
                null != this._bonusBackgroundLandscape && this._bonusBackgroundLandscape.stop(), null != this._bonusBackgroundPortrait && this._bonusBackgroundPortrait.stop(), this._bonusBackgroundPlaying = !1
            }, b
        }(u.StageView);
        x.POPULATION_OUTCOME_NAME = "Reels", x.RSS_TRIGGER_OUTCOME_NAME = "FreeSpin.CurrentReelSetSelect", x.DEFAULT_SPIN_DURATION = [100, 300, 500, 700, 900], x.RETRIGGER_PLAQUE_TIME_DELAY = 2e3, b.FreeSpinView = x
    }), define("transitions/DynamicTransition", ["require", "exports", "wcgf/gameComponents/transitions/GenericTransition", "wcgf/coreComponents/LabeledTextFieldController"], function(a, b, c, d) {
        "use strict";
        var e = function(a) {
            function b(b, c) {
                return a.call(this, b, c) || this
            }
            return __extends(b, a), b.prototype.setDynamicText = function(a, b) {
                if (void 0 === a && (a = null), void 0 === b && (b = null), null != this._landscapeAnim) {
                    var c = new d.LabeledTextFieldController(this._landscapeAnim.textCongratsWin);
                    null != a && (c.label = a), null != b && c.setText(b)
                }
                if (null != this._portraitAnim) {
                    var e = new d.LabeledTextFieldController(this._portraitAnim.textCongratsWin);
                    null != a && (e.label = a), null != b && e.setText(b)
                }
            }, b
        }(c.GenericTransition);
        b.DynamicTransition = e
    }), define("transitions/BaseGameToPicker", ["require", "exports", "wcgf/coreComponents/LabeledTextFieldController", "wcgf/coreComponents/LabeledViewController", "wcgf/core/TextManager", "transitions/DynamicTransition"], function(a, b, c, d, e, f) {
        "use strict";
        var g = function(a) {
            function b() {
                var b = a.call(this, "baseGameToPicker_landscape", "baseGameToPicker_portrait") || this;
                return b.transitionId = "BaseGameToPicker", b
            }
            return __extends(b, a), b.prototype.init = function() {
                if (a.prototype.init.call(this), null != this._landscapeAnim) {
                    var b = new c.LabeledTextFieldController(this._landscapeAnim.textCongratsWin);
                    b.label = e.TextManager.getInstance().getText("baseGameToPickerLabel"), b.setText(e.TextManager.getInstance().getText("baseGameToPickerText1") + " XX " + e.TextManager.getInstance().getText("baseGameToPickerText2"));
                    new d.LabeledViewController(this._landscapeAnim.textHowToPick).label = e.TextManager.getInstance().getText("baseGameToPickerHowToPickText")
                }
                if (null != this._portraitAnim) {
                    var f = new c.LabeledTextFieldController(this._portraitAnim.textCongratsWin);
                    f.label = e.TextManager.getInstance().getText("baseGameToPickerLabel"), f.setText(e.TextManager.getInstance().getText("baseGameToPickerText1") + " XX " + e.TextManager.getInstance().getText("baseGameToPickerText2"));
                    new d.LabeledViewController(this._portraitAnim.textHowToPick).label = e.TextManager.getInstance().getText("baseGameToPickerHowToPickText")
                }
            }, b.prototype.onOrientationChange = function(b) {
                a.prototype.onOrientationChange.call(this, b)
            }, b.prototype.startOutTransition = function() {
                a.prototype.startOutTransition.call(this)
            }, b.prototype.onOutSeqDone = function(b) {
                a.prototype.onOutSeqDone.call(this, b)
            }, b.prototype.stopTransition = function(b) {
                void 0 === b && (b = !1), a.prototype.stopTransition.call(this, b)
            }, b.prototype.setData = function(b) {
                a.prototype.setData.call(this, b)
            }, b
        }(f.DynamicTransition);
        b.BaseGameToPicker = g
    }), define("transitions/PickerToFreeSpin", ["require", "exports", "wcgf/core/TextManager", "wcgf/coreComponents/LabeledTextFieldController", "transitions/DynamicTransition"], function(a, b, c, d, e) {
        "use strict";
        var f = function(a) {
            function b() {
                var b = a.call(this, "pickerToFreeSpin_landscape", "pickerToFreeSpin_portrait") || this;
                return b.transitionId = "PickerToFreeSpin", b
            }
            return __extends(b, a), b.prototype.init = function() {
                if (a.prototype.init.call(this), null != this._landscapeAnim) {
                    var b = new d.LabeledTextFieldController(this._landscapeAnim.textCongratsWin);
                    b.label = c.TextManager.getInstance().getText("pickerToFreeSpinLabel"), b.setText(c.TextManager.getInstance().getText("pickerToFreeSpinText1") + " XX " + c.TextManager.getInstance().getText("pickerToFreeSpinText2"))
                }
                if (null != this._portraitAnim) {
                    var e = new d.LabeledTextFieldController(this._portraitAnim.textCongratsWin);
                    e.label = c.TextManager.getInstance().getText("pickerToFreeSpinLabel"), e.setText(c.TextManager.getInstance().getText("pickerToFreeSpinText1") + " XX " + c.TextManager.getInstance().getText("pickerToFreeSpinText2"))
                }
            }, b
        }(e.DynamicTransition);
        b.PickerToFreeSpin = f
    }), define("transitions/DynamicBonusTransition", ["require", "exports", "transitions/DynamicTransition"], function(a, b, c) {
        "use strict";
        var d = function(a) {
            function b(b, c) {
                return a.call(this, b, c) || this
            }
            return __extends(b, a), b.prototype.onOrientationChange = function(b) {
                a.prototype.onOrientationChange.call(this, b), this.handleBonusPlaqueState(null)
            }, b.prototype.handleBonusPlaqueState = function(a) {
                a && (this._totalBonusPay = a), this._currentAnim.textCongratsWin.visible = this._totalBonusPay > 0, this._currentAnim.bonusComplete.visible = 0 == this._totalBonusPay
            }, b
        }(c.DynamicTransition);
        b.DynamicBonusTransition = d
    }), define("transitions/FreeSpinToBaseGame", ["require", "exports", "wcgf/core/TextManager", "wcgf/coreComponents/LabeledTextFieldController", "wcgf/coreComponents/LabeledViewController", "wcgf/textFormatters/CurrencyTextFormatter", "wcgf/gameComponents/BetManager", "transitions/DynamicBonusTransition"], function(a, b, c, d, e, f, g, h) {
        "use strict";
        var i = function(a) {
            function b() {
                var b = a.call(this, "freeSpinToBaseGame_landscape", "freeSpinToBaseGame_portrait") || this;
                return b.transitionId = "FreeSpinToBaseGame", b
            }
            return __extends(b, a), b.prototype.init = function() {
                if (a.prototype.init.call(this), null != this._landscapeAnim) {
                    var b = new d.LabeledTextFieldController(this._landscapeAnim.textCongratsWin);
                    b.textFormatter = new f.CurrencyTextFormatter({
                        denomination: g.BetManager.getInstance().denomination
                    }), b.label = c.TextManager.getInstance().getText("freeSpinToBaseGameLabel"), b.setText(c.TextManager.getInstance().getText("freeSpinToBaseGameValueText"));
                    new e.LabeledViewController(this._landscapeAnim.bonusComplete).label = c.TextManager.getInstance().getText("freeSpinBonusCompleteText")
                }
                if (null != this._portraitAnim) {
                    var h = new d.LabeledTextFieldController(this._portraitAnim.textCongratsWin);
                    h.textFormatter = new f.CurrencyTextFormatter({
                        denomination: g.BetManager.getInstance().denomination
                    }), h.label = c.TextManager.getInstance().getText("freeSpinToBaseGameLabel"), h.setText(c.TextManager.getInstance().getText("freeSpinToBaseGameValueText"));
                    new e.LabeledViewController(this._landscapeAnim.bonusComplete).label = c.TextManager.getInstance().getText("freeSpinBonusCompleteText")
                }
            }, b
        }(h.DynamicBonusTransition);
        b.FreeSpinToBaseGame = i
    }), define("fonts/FontHelper", ["require", "exports", "wcgf/core/events", "wcgf/vendors/typescript_collections/util", "wcgf/vendors/webfontloader/webfont"], function(a, b, c, d, e) {
        "use strict";
        var f = function(a) {
            function b() {
                var d = a.call(this) || this;
                return d.fontServiceHandlers = {
                    custom: d.handleCustomService,
                    google: d.handleGoogleService,
                    typekit: null,
                    fontdeck: null,
                    monotype: null
                }, d.onLoadComplete = function() {
                    d.dispatchEvent(new c.events.Event(b.FONT_LOAD_COMPLETE, null, d))
                }, d.onLoadFail = function() {
                    d.dispatchEvent(new c.events.Event(b.FONT_LOAD_COMPLETE, null, d))
                }, d.onFontInactive = function(a, e) {
                    d.dispatchEvent(new c.events.Event(b.FONT_ERROR, {
                        familyName: a,
                        fvd: e
                    }, d))
                }, d.initWebFontConfig(), d
            }
            return __extends(b, a), b.prototype.initWebFontConfig = function() {
                this.webFontConfig = {
                    timeout: 2e3,
                    active: this.onLoadComplete,
                    inactive: this.onLoadFail,
                    fontinactive: this.onFontInactive
                }
            }, b.prototype.parse = function(a) {
                for (var b in this.fontServiceHandlers) d.has(this.fontServiceHandlers, b) && null != a[b] && null != this.fontServiceHandlers[b] && this.fontServiceHandlers[b].call(this, a[b])
            }, b.prototype.handleGoogleService = function(a) {
                if (null == this.webFontConfig.google && (this.webFontConfig.google = {
                        families: []
                    }), "object" != typeof a) throw new Error("Google font information is invalid");
                if (a instanceof Array) this.addGoogleFamilies(a);
                else if (this.addGoogleFamilies(a.families), null != a.text) {
                    if ("string" != typeof a.text) throw new Error("Google font explicit character data is invalid");
                    this.webFontConfig.google.text = a.text
                }
            }, b.prototype.addGoogleFamilies = function(a) {
                this.webFontConfig.google.families = b.validateAndCombineArrays(this.webFontConfig.google.families, a, "Google font families")
            }, b.validateAndCombineArrays = function(a, b, c) {
                if (!(b instanceof Array) || 0 == b.length) throw new Error("Invalid list of " + c);
                return a = 0 == a.length ? b : a.concat(b)
            }, b.prototype.handleCustomService = function(a) {
                null == this.webFontConfig.custom && (this.webFontConfig.custom = {}), this.addCustomFamilies(a.families), this.addCustomUrls(a.urls), this.addCustomTestStrings(a.testStrings)
            }, b.prototype.addCustomFamilies = function(a) {
                null == this.webFontConfig.custom.families && (this.webFontConfig.custom.families = []), this.webFontConfig.custom.families = b.validateAndCombineArrays(this.webFontConfig.custom.families, a, "custom font families")
            }, b.prototype.addCustomUrls = function(a) {
                null == this.webFontConfig.custom.urls && (this.webFontConfig.custom.urls = []), this.webFontConfig.custom.urls = b.validateAndCombineArrays(this.webFontConfig.custom.urls, a, "custom font urls")
            }, b.prototype.addCustomTestStrings = function(a) {
                if (null != a) {
                    if ("object" != typeof a) throw new Error("Invalid list of custom font test strings");
                    var c = this.webFontConfig.custom.testStrings;
                    null == c && (c = {});
                    for (var e in a) d.has(a, e) && (c[e] = b.mergeTestStrings(c[e], a[e]));
                    this.webFontConfig.custom.testStrings = c
                }
            }, b.mergeTestStrings = function(a, b) {
                if ("string" != typeof b) throw new Error("Invalid test string format: " + b);
                return null == a ? b : a + b
            }, b.prototype.loadFonts = function() {
                e.load(this.webFontConfig)
            }, b
        }(c.events.EventDispatcher);
        f.FONT_LOAD_COMPLETE = "FontHelper_FontLoadComplete", f.FONT_ERROR = "FontHelper_FontError", b.FontHelper = f
    }), define("transitions/FreeSpinToPicker", ["require", "exports", "wcgf/coreComponents/LabeledTextFieldController", "wcgf/coreComponents/LabeledViewController", "wcgf/core/TextManager", "transitions/DynamicTransition"], function(a, b, c, d, e, f) {
        "use strict";
        var g = function(a) {
            function b() {
                var b = a.call(this, "freeSpinToPicker_landscape", "freeSpinToPicker_portrait") || this;
                return b.transitionId = "FreeSpinToPicker", b
            }
            return __extends(b, a), b.prototype.init = function() {
                if (a.prototype.init.call(this), null != this._landscapeAnim) {
                    var b = new c.LabeledTextFieldController(this._landscapeAnim.textCongratsWin);
                    b.label = e.TextManager.getInstance().getText("freeSpinToPickerLabel"), b.setText(e.TextManager.getInstance().getText("freeSpinToPickerText1") + " XX " + e.TextManager.getInstance().getText("freeSpinToPickerText2"));
                    new d.LabeledViewController(this._landscapeAnim.textHowToPick).label = e.TextManager.getInstance().getText("baseGameToPickerHowToPickTextAdditional")
                }
                if (null != this._portraitAnim) {
                    var f = new c.LabeledTextFieldController(this._portraitAnim.textCongratsWin);
                    f.label = e.TextManager.getInstance().getText("freeSpinToPickerLabel"), f.setText(e.TextManager.getInstance().getText("freeSpinToPickerText1") + " XX " + e.TextManager.getInstance().getText("freeSpinToPickerText2"));
                    new d.LabeledViewController(this._portraitAnim.textHowToPick).label = e.TextManager.getInstance().getText("baseGameToPickerHowToPickTextAdditional")
                }
            }, b
        }(f.DynamicTransition);
        b.FreeSpinToPicker = g
    }), define("common/dataTranslator/PFSDataTranslator", ["require", "exports", "wcgf/dataTranslators/GleDataTranslator"], function(a, b, c) {
        "use strict";
        var d = function(a) {
            function b() {
                return a.apply(this, arguments) || this
            }
            return __extends(b, a), b.prototype.translate = function(b, c) {
                var d = a.prototype.translate.call(this, b, c);
                return this.isPromotionalFreeSpinsEnabled(d) && this.overrideBetPerPattern(d), d
            }, b.prototype.isPromotionalFreeSpinsEnabled = function(a) {
                return null != a.gameLogicResponse && null != a.gameLogicResponse.promotionalFreeSpin
            }, b.prototype.overrideBetPerPattern = function(a) {
                this.gameLogicResponse.patternSliderInput.betPerPattern = 1
            }, b
        }(c.GleDataTranslator);
        b.PFSDataTranslator = d
    }), define("Game", ["require", "exports", "wcgf/messageBus/GameMsgBus", "wcgf/gameComponents/GameController", "wcgf/core/events", "wcgf/core/AssetManager", "wcgf/gameComponents/transitions/TransitionsViewController", "wcgf/gameComponents/StageController", "wcgf/core/TextManager", "wcgf/core/CurrencyFormatter", "wcgf/gameComponents/BetManager", "views/baseGame/BaseGameView", "views/picker/PickerView", "views/freeSpin/FreeSpinView", "transitions/BaseGameToPicker", "transitions/PickerToFreeSpin", "transitions/FreeSpinToBaseGame", "common/audio/AudioPlayer", "fonts/FontHelper", "transitions/FreeSpinToPicker", "common/dataTranslator/PFSDataTranslator"], function(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u) {
        "use strict";
        var v = function(a) {
            function b() {
                var b = a.call(this) || this;
                return b._lockOrientation = !1, b._assetManager = f.AssetManager.getInstance(), b._gameChannel = b._assetManager.clientConfigData.assetPack, b
            }
            return __extends(b, a), b.prototype.onAssetMap = function(b) {
                a.prototype.onAssetMap.call(this, b);
                for (var c = 0, d = this.assetMap.deferredLoading; c < d.length; c++) {
                    var e = d[c];
                    "Tutorial" == e.id && this.assetMap.assetManifest.push(e)
                }
            }, b.prototype.handleFonts = function() {
                return null == this.assetMap.fonts || (this._fontHelper = new s.FontHelper, this._fontHelper.addEventListener(s.FontHelper.FONT_LOAD_COMPLETE, this.onFontLoadComplete, this), this._fontHelper.parse(this.assetMap.fonts), this._fontHelper.loadFonts(), !1)
            }, b.prototype.onFontLoadComplete = function(a) {
                this._fontHelper.removeEventListener(s.FontHelper.FONT_LOAD_COMPLETE, this.onFontLoadComplete, this), this._fontHelper = null, this.setFontLoaded()
            }, b.prototype.onMsgBusInitialize = function(b) {
                a.prototype.onMsgBusInitialize.call(this, b), this.msgBus.dataTranslators.push(new u.PFSDataTranslator)
            }, b.prototype.onGameInit = function(b) {
                null != b.data && null != b.data.gameLogicResponse.promotionalFreeSpin && (k.BetManager.getInstance().consoleProxySettings.lineBetConsoleOverride = [1]), k.BetManager.getInstance().consoleProxySettings.lineConsoleOverride = [50], a.prototype.onGameInit.call(this, b), this._baseGame = new l.BaseGameView(this.clientConfigData), this._picker = new m.PickerView(this.clientConfigData), this._freeSpin = new n.FreeSpinView(this.clientConfigData), this._gameContainer = new createjs.Container, this.stage.addChild(this._gameContainer), this._transitionsSkin = this._assetManager.getSkin("TransitionSkin"), this.stage.addChild(this._transitionsSkin), this._transitionsViewController = new g.TransitionsViewController(this._transitionsSkin), this._assetManager.addEventListener(f.AssetManager.ORIENTATION_CHANGE, this.checkOrientationLock, this), this.msgBus.dispatchEvent(new e.events.Event(c.GameMsgBus.GAME_INIT_DONE, {
                    version: {
                        gameVersion: "1.0",
                        gleVersion: "1.0"
                    }
                })), h.StageController.getInstance().addEventListener(h.StageController.ON_ENABLE_GAME, this.enableGame, this)
            }, b.prototype.onBeforeShowStage = function(b) {
                this._baseGameToPickerTransitionOut = new o.BaseGameToPicker, this._pickerToFreeSpinTransitionOut = new p.PickerToFreeSpin, this._freeSpinToBaseGameTransitionOut = new q.FreeSpinToBaseGame, this._freeSpinToPickerTransitionOut = new t.FreeSpinToPicker, this._transitionsViewController.init([this._baseGameToPickerTransitionOut, this._pickerToFreeSpinTransitionOut, this._freeSpinToBaseGameTransitionOut, this._freeSpinToPickerTransitionOut]), this._baseGame.playerSessionStartsInBaseGame = null != b.data && "BaseGame" == b.data.gameLogicResponse.outcomeDetail.stage,
                    this._baseGame.pfsEnabled = null != b.data && null != b.data.gameLogicResponse.promotionalFreeSpin, null != b.data && b.data.gameLogicResponse.preference && b.data.gameLogicResponse.preference.tutorial && (this._baseGame.tutorialDisabled = "off" === b.data.gameLogicResponse.preference.tutorial.toLowerCase()), this._picker.playerSessionStartsInPicker = null != b.data && "Picker" == b.data.gameLogicResponse.outcomeDetail.nextStage, this.stageHandler(b), this._currentStageView.enable = !1, this.checkOrientationLock(), a.prototype.onBeforeShowStage.call(this, b), this.nextStage()
            }, b.prototype.enableGame = function() {
                h.StageController.getInstance().removeEventListener(h.StageController.ON_ENABLE_GAME, this.enableGame, this), this._currentStageView.enable = !0, this._baseGame == this._currentStageView ? this._baseGame.showTutorial() : this._picker == this._currentStageView && "desktop" != this._gameChannel && this._picker.enablePickingAfterSoundPrompt()
            }, b.prototype.onExitStage = function(b) {
                a.prototype.onExitStage.call(this, b), this._cachedGlrEvent = b
            }, b.prototype.handleExitStage = function() {
                this._lockOrientation = !1;
                var a = this._cachedGlrEvent.data.gameLogicResponse.outcomeDetail.stage,
                    b = this._cachedGlrEvent.data.gameLogicResponse.outcomeDetail.nextStage;
                if ("BaseGame" == a && "Picker" == b) {
                    this._exitStageEvent = this._cachedGlrEvent;
                    var c = this._cachedGlrEvent.data.gameLogicResponse.pickerSummaryOutcomes.getValue("");
                    this._baseGameToPickerTransitionOut.setDynamicText(null, i.TextManager.getInstance().getText("baseGameToPickerText1") + " " + c.initAwarded + " " + i.TextManager.getInstance().getText("baseGameToPickerText2")), this._transitionsViewController.addEventListener(g.TransitionsViewController.OUT_SEQ_END, this.onTransitionOutDone, this), this._transitionsViewController.startOutTransition("BaseGameToPicker"), r.AudioPlayer.playSound("pickerPlaque"), this._picker.stopAndHidePickerBackgrounds(), this._picker.setInitialOrientation()
                } else if ("Picker" == a && "FreeSpin" == b) {
                    this._exitStageEvent = this._cachedGlrEvent;
                    var d = this._cachedGlrEvent.data.gameLogicResponse.freeSpinOutcomes.getValue("Picker.SingleSequence"),
                        e = this._cachedGlrEvent.data.gameLogicResponse.triggerOutcome.getValue("FreeSpin.RetriggerCount"),
                        h = i.TextManager.getInstance().getText("pickerToFreeSpinText2");
                    null != e && e.trigger.length > 0 && "1" != e.trigger[0].name && (h = i.TextManager.getInstance().getText("pickerToFreeSpinText2Additional")), this._pickerToFreeSpinTransitionOut.setDynamicText(null, i.TextManager.getInstance().getText("pickerToFreeSpinText1") + " " + d.totalAwarded + " " + h), this._transitionsViewController.addEventListener(g.TransitionsViewController.OUT_SEQ_END, this.onTransitionOutDone, this), this._transitionsViewController.startOutTransition("PickerToFreeSpin"), r.AudioPlayer.playSound("pickerPlaque"), this._freeSpin.startBonusBackgroundOnTransitionIn(f.AssetManager.getInstance().getOrientation())
                } else if ("FreeSpin" == a && "BaseGame" == b) {
                    this._exitStageEvent = this._cachedGlrEvent;
                    var l = this._cachedGlrEvent.data.gameLogicResponse.prizeOutcomes.getValue(this._cachedGlrEvent.data.gameLogicResponse.awardCapOutcome.awardCapExceeded ? "Game.Total" : "FreeSpin.Total");
                    this._freeSpinToBaseGameTransitionOut.setDynamicText(null, j.CurrencyFormatter.getInstance().format(l.totalPay, k.BetManager.getInstance().denomination)), this._freeSpinToBaseGameTransitionOut.handleBonusPlaqueState(l.totalPay), this._transitionsViewController.addEventListener(g.TransitionsViewController.OUT_SEQ_END, this.onTransitionOutDone, this), this._transitionsViewController.startOutTransition("FreeSpinToBaseGame"), r.AudioPlayer.stopFreeSpinMusic(), this._baseGame.startBaseGameBackgroundOnTransitionIn(f.AssetManager.getInstance().getOrientation())
                } else if ("FreeSpin" == a && "Picker" == b) {
                    this._exitStageEvent = this._cachedGlrEvent;
                    var c = this._cachedGlrEvent.data.gameLogicResponse.pickerSummaryOutcomes.getValue("");
                    this._freeSpinToPickerTransitionOut.setDynamicText(null, i.TextManager.getInstance().getText("freeSpinToPickerText1") + " " + c.initAwarded + " " + i.TextManager.getInstance().getText("freeSpinToPickerText2")), this._transitionsViewController.addEventListener(g.TransitionsViewController.OUT_SEQ_END, this.onTransitionOutDone, this), this._transitionsViewController.startOutTransition("FreeSpinToPicker"), this._picker.stopAndHidePickerBackgrounds(), this._picker.setInitialOrientation()
                }
                this.checkOrientationLock()
            }, b.prototype.onEnterNextStage = function(b) {
                a.prototype.onEnterNextStage.call(this, b)
            }, b.prototype.onTransitionOutDone = function(a) {
                this._transitionsViewController.removeEventListener(g.TransitionsViewController.OUT_SEQ_END, this.onTransitionOutDone, this), this.stageHandler(this._exitStageEvent), this._transitionsViewController.addEventListener(g.TransitionsViewController.IN_SEQ_END, this.onTransitionInDone, this), this._transitionsViewController.startInTransition()
            }, b.prototype.onTransitionInDone = function(a) {
                this._transitionsViewController.removeEventListener(g.TransitionsViewController.IN_SEQ_END, this.onTransitionInDone, this), this.nextStage()
            }, b.prototype.stageHandler = function(a) {
                var c = a.data.gameLogicResponse.outcomeDetail.nextStage;
                switch (null != this._currentStageView && this._currentStageView.removeFromStage(this._gameContainer), this.removeEventListeners(), c) {
                    case this._baseGame.stageName:
                        this._baseGame.addEventListener(b.TRANSITION_READY, this.handleExitStage, this), this._currentStageView = this._baseGame, this._baseGame.addToStage(this._gameContainer), this._picker.removeFromStage(this._gameContainer), this._freeSpin.removeFromStage(this._gameContainer), this._lockOrientation = !1;
                        break;
                    case this._picker.stageName:
                        this._picker.addEventListener(b.TRANSITION_READY, this.handleExitStage, this), this._currentStageView = this._picker, this._baseGame.removeFromStage(this._gameContainer), this._picker.addToStage(this._gameContainer), this._freeSpin.removeFromStage(this._gameContainer), this._lockOrientation = !0;
                        break;
                    case this._freeSpin.stageName:
                        this._freeSpin.addEventListener(b.TRANSITION_READY, this.handleExitStage, this), this._currentStageView = this._freeSpin, this._baseGame.removeFromStage(this._gameContainer), this._picker.removeFromStage(this._gameContainer), this._freeSpin.addToStage(this._gameContainer), this._lockOrientation = !1
                }
                this._currentStageView.addToStage(this._gameContainer), this.stage.update(), this._currentStageView.init(a.data)
            }, b.prototype.onResize = function(b) {
                a.prototype.onResize.call(this, b), this.checkOrientationLock()
            }, b.prototype.removeEventListeners = function() {
                this._baseGame.removeEventListener(b.TRANSITION_READY, this.handleExitStage, this), this._picker.removeEventListener(b.TRANSITION_READY, this.handleExitStage, this), this._freeSpin.removeEventListener(b.TRANSITION_READY, this.handleExitStage, this)
            }, b.prototype.checkOrientationLock = function() {
                if ("mobile" == this.clientConfigData.assetPack) {
                    var a = !!this._picker.originalPickerOrientationSet && f.AssetManager.getInstance().getOrientation() != this._picker.originalPickerOrientation;
                    this.setPause(this._lockOrientation && a)
                } else "tablet" == this.clientConfigData.assetPack && this.setPause(f.AssetManager.getInstance().getOrientation() == f.AssetManager.PORTRAIT_ORIENTATION)
            }, b.prototype.nextStage = function() {
                this.msgBus.dispatchEvent(new e.events.Event(c.GameMsgBus.NEXT_STAGE))
            }, b
        }(d.GameController);
        v.TRANSITION_READY = "StageTransitionReady", b.Game = v, new v
    });