c607f07daf2dd625c7576b69d6049db92e92bc346004829c0f261484ac031231

Source Code:

(window.webpackJsonp=window.webpackJsonp||[]).push([[67],{6497:function(e,t,i){"use strict";i.r(t);var s=i("3414"),r=i.n(s),n=i("d869"),a=i.n(n),o=i("71fb"),l=function e(t,i){e.superclass.constructor.call(this,t,i)};Ext.extend(l,r.a.Page,{init:function(e,t){l.superclass.init.call(this,e,t);try{var i=r.a.Storage.get(a.a.HTML5ChatPageComponent.APPLET_SIZE_STORAGE_LABEL)||a.a.HTML5ChatPageComponent.SIZE_FIX;Ext.fly("armageddonClient").data("size-type",i)}catch(e){}this.HTML5ChatPageComponent=new o.default("armageddonClient",{performerName:r.a.Config.get("displayName")})}}),t.default=l},"83cb":function(e,t,i){var s=i("3414"),r=i("d869"),n=i("e5b0").default,a=function(e,t){a.superclass.constructor.call(this,e,t)};e.exports=Ext.extend(a,s.Controller,{name:"ChatPageControllerAbstract",init:function(e,t){var i;a.superclass.init.call(this,e,t),this._isFirstPerfShown=this.model.isChatPage,i=this._getNormalizeAppletVars(),this._saveToHistory(i)},onPrivateStartClick:function(){this.model.setIsOnPrivate(!0)},onPrivateEnd:function(){this.model.setIsOnPrivate(!1)},registerHistory:function(){this.nextPerformerHistoryEntry="next-performer",s.History.registerActions(this.nextPerformerHistoryEntry,this.nextPerformerHistoryEntry,this.setNextModel,this),s.History.registerComponent(this,{state:this.nextPerformerHistoryEntry}),this.replaceState()},_saveToHistory:function(e){var t=e.p_id||e.pid;if(t){var i=e.performer_id||e.performerid,n=e.display_name,a=e.status;s.Broadcaster.fireEvent(r.PerformerHistory.ADD_PERFORMER_TO_HISTORY,{name:i,displayName:n,id:t.toString(),status:a})}},_getNormalizeAppletVars:function(){return s.Config.get("memberAppletFlashvars")?s.Config.get("memberAppletFlashvars"):s.Config.get("HTMLAppletVars")},replaceState:function(){throw"This method must be implemented."},setNextModel:function(e){if(!s.Config.get("isOnPrivate")){var t={performerId:e.name};this.model.getCurrentPerformerName()!==e.name&&(this.onGetPerformerDetails(t,!0),this.fireEvent(r.ChatPageController.HISTORY_CHANGE,e.name))}},getModelData:function(e){var t={};return"string"==typeof e?(t.performerId=e,t):e},onGetPerformerDetails:function(e){var t=this.getModelData(e),i=t.performerId;s.Config.set("performerChannelType",t.channelType),this._callPerformerDetailsService(i),this.model.setCurrentPerformerName(i);var n=this._getNormalizeAppletVars();this.fireEvent(r.ChatPageControllerAbstract.EVENT_MODEL_CHANGE,{modelData:t,flashVars:n,isFirstPerfShown:this._isFirstPerfShown}),this._isFirstPerfShown=!0},_callPerformerDetailsService:function(e){n.get(e).then(s.bind(this.onPerformerDetailsReady,this)).catch((function(e){}))},onPerformerDetailsReady:function(e){var t=s.getPath(e,"json.data");this._performerData=e.responseText,this._refreshFlashVars(t),this._saveToHistory(t),this.setPerformerDetailsOnApplet()},_refreshFlashVars:function(e){s.Config.set("memberAppletFlashvars",e)},setPerformerDetailsOnApplet:function(){throw"You must implement setPerformerDetailsOnApplet method"}})},b441:function(e,t,i){var s=i("3414"),r=i("d869"),n=function(e){n.superclass.constructor.call(this,e)};e.exports=Ext.extend(n,s.View,{name:"FlashChatPageViewAbstract",windowResizeDebounceTime:300,mainContainerId:"chatblock",footerTopLinkSel:".footer_link",headerTopLinkClass:"header_top_link",chatAppletId:"chatapplet",headerId:"header",footerId:"footer",freechatId:"freechat",_memberAppletEl:null,_mainContainerEl:null,showHTMLClass:"show-html",showFlashClass:"show-flash",init:function(){this.addEvents(r.FlashChatPageViewAbstract.EVENT_WINDOW_RESIZE,r.FlashChatPageViewAbstract.EVENT_APPLET_MINIMIZE),this._selectElements(),n.superclass.init.call(this)},_selectElements:function(){this._freechatEl=Ext.get(this.freechatId),this._mainContainerEl=Ext.get(this.mainContainerId)},minimizeMemberApplet:function(){},setFreeChatBlock:function(){this._freechatEl.display("block")},_showChatBlock:function(){switch(Ext.getBody().addClass("chat-opened"),this._mainContainerEl.removeClass("hidden"),this.name){case"HTML5ChatPageModalView":this._mainContainerEl.removeClass(this.showFlashClass);break;case"FlashChatPageModalView":this._mainContainerEl.removeClass(this.showHTMLClass)}},createMemberAppletContainer:function(){this._freechatEl.createChild('<div id="'+this.chatAppletId+'"></div>'),this._freechatEl.display("block")},getAppletEl:function(){return this._memberAppletEl||(this._memberAppletEl=Ext.get(this.chatAppletId)),this._memberAppletEl},onAppletSizeChange:function(){this.getAppletEl(),this._memberAppletEl.dom.width="",this._memberAppletEl.dom.height=this.model.getAppletSize().height,this.element.setStyle({width:"",height:this.model.getAppletSize().height+"px"}),this._memberAppletEl.dom.removeAttribute("style")},minimizeApplet:function(){this.element.setStyle({width:"1px",height:"1px"}),this.fireEvent(r.FlashChatPageViewAbstract.EVENT_APPLET_MINIMIZE,this)},resetAppletSize:function(){this.element.setStyle({width:"",height:""}),this.getAppletEl().dom.removeAttribute("style")},onWindowResize:function(){this.fireEvent(r.FlashChatPageViewAbstract.EVENT_WINDOW_RESIZE,{scope:this})},removeMemberApplet:function(){this.getAppletEl().remove(),this._memberAppletEl=null},onLayoutModeChange:function(){this.model.isCurrentLayoutMode(r.FlashChatPageControllerAbstract.LAYOUT_MODE_NORMAL)||this.model.isCurrentLayoutMode(r.FlashChatPageControllerAbstract.LAYOUT_MODE_FULLSCREEN)?this._mainContainerEl.removeClass(r.FlashChatPageControllerAbstract.LAYOUT_MODE_FULL):this._mainContainerEl.addClass(r.FlashChatPageControllerAbstract.LAYOUT_MODE_FULL)},updateScrollPosition:function(e){var t=window.scrollX||window.pageXOffset||document.documentElement.scrollLeft,i=window.scrollY||window.pageYOffset||document.documentElement.scrollTop;window.scrollTo(t,i+e)},bind:function(){n.superclass.bind.call(this),s.on([{element:Ext.fly(window),event:"resize",handler:s.debounce(this.onWindowResize,this.windowResizeDebounceTime)},{element:this.model,event:r.ChatPageModel.EVENT_LAYOUT_MODE_CHANGE,handler:this.onLayoutModeChange},{element:this.model,event:r.ChatPageModel.EVENT_APPLET_SIZE_CHANGE,handler:this.onAppletSizeChange}],this)}})}}]);