2913e53def2704f58d23bb57de9a065dd10867acffe6372cbe12bf16d1058f20

Source Code:

(window.webpackJsonp=window.webpackJsonp||[]).push([[9],{"0c1e":function(e,t,a){var n=a("3414"),o=a("d869"),r=function(e,t){r.superclass.constructor.call(this,e,t)};e.exports=Ext.extend(r,n.Model,{name:o.ChatPageModel.NAME,isChatPage:!0,_isOnPrivate:!1,_isChatLocked:!1,_currentPerformerName:null,_isPrivateEndDisplayed:!1,init:function(){r.superclass.init.call(this),this.attributes.performerName&&this.setCurrentPerformerName(this.attributes.performerName)},setIsOnPrivate:function(e){n.Config.set("isOnPrivate",e),this._isOnPrivate=e},getIsOnPrivate:function(){return this._isOnPrivate},getIsLocked:function(){return this._isChatLocked},getCurrentPerformerName:function(){return this._currentPerformerName},setCurrentPerformerName:function(e){this._currentPerformerName=e},setIsLocked:function(e){this._isChatLocked=e},getIsMinimized:function(){return this._isMinimized},setIsMinimized:function(e){this._isMinimized=e},setIsPrivateEndDisplayed:function(e){this._isPrivateEndDisplayed=e},isPrivateEndDisplayed:function(){return this._isPrivateEndDisplayed},setAppletReady:function(e){n.Config.set(o.ChatPageModel.MEMBERAPPLET_READY_STATE,e)},isAppletReady:function(){return n.Config.get(o.ChatPageModel.MEMBERAPPLET_READY_STATE)}})},"3aaa":function(e,t,a){var n=a("3414"),o=a("d869"),r=a("0592").default,i=a("83cb"),s=a("a9a1").store,l=a("c33b").startPrivate,h=a("cbc5").setPerformerNick,d=function(e,t){d.superclass.constructor.call(this,e,t)};e.exports=Ext.extend(d,i,{name:o.HTML5ChatPageController.NAME,html5Client:null,appletReady:!1,modalOpened:!1,init:function(e,t){d.superclass.init.call(this,e,t),this.registerHistory(),this.startVideoCallParams={}},onPrivateStartClick:function(){d.superclass.onPrivateStartClick.call(this)},_setSessionIdOnApplet:function(e){this.html5Client.setSessionId(e)},muteChatApplet:function(){this.html5Client.mute()},unMuteChatApplet:function(){this.html5Client.unMute()},onModalClosed:function(){this.model.isPrivateEndDisplayed()||setTimeout(n.bind(this.replaceState,this),0),this.html5Client.enableKeyboard(),this.keyboardDisabled=!1,this.modalOpened=!1},onModalOpened:function(){this.appletReady&&(this.html5Client.disableKeyboard(),this.keyboardDisabled=!0),this.modalOpened=!0},onAppletReady:function(){this.appletReady=!0,this.modalOpened&&!this.keyboardDisabled&&this.html5Client.disableKeyboard()},replaceState:function(){var e=this.model.getCurrentPerformerName(),t=e;""!==window.location.search&&(t+=window.location.search),""!==window.location.hash&&(t+=window.location.hash);try{window.history.replaceState({HTML5ChatPageController:{name:e,state:this.nextPerformerHistoryEntry,params:e,url:e}},null,t)}catch(e){console.error("error: ",e)}},onGetPerformerDetails:function(e,t){var a,o,i=this.model.getCurrentPerformerName();d.superclass.onGetPerformerDetails.apply(this,arguments),a=this.model.getCurrentPerformerName(),o=n.Config.get("htmlTitle").replace(i,a),s.dispatch(h(a)),r.pushState({HTML5ChatPageController:{name:a,state:this.nextPerformerHistoryEntry,params:a,url:a}},o,a,t)},_refreshFlashVars:function(e){n.Config.set("HTMLAppletVars",e)},setPerformerDetailsOnApplet:function(){this.html5Client.enableKeyboard(),this.html5Client.performerDetailsReady(this._performerData)},onStartVideoCall:function(e,t){this.model.getCurrentPerformerName()!==e?(this.startVideoCallParams={modelName:e,location:t},n.fireEvent(o.FlashExternal.GLOBALEVENT_GET_PERFORMER_DETAILS,e)):this.html5Client.startVideoCall(t)},onStartPrivate:function(e){this.model.getCurrentPerformerName()!==e?(this.pleaseTakeMePrivate=e,n.fireEvent(o.FlashExternal.GLOBALEVENT_GET_PERFORMER_DETAILS,e)):s.dispatch(l(e))},onStreamReady:function(){var e=this.model.getCurrentPerformerName(),t=this.startVideoCallParams.modelName,a=this.startVideoCallParams.location;if(t===e){this.startVideoCallParams={};var n=this;setTimeout((function(){n.html5Client.startVideoCall(a)}),0)}this.pleaseTakeMePrivate===e&&(this.pleaseTakeMePrivate=null,s.dispatch(l(e)))},bind:function(){d.superclass.bind.call(this),n.on([{element:n.Broadcaster,event:o.BasicController.GLOBALEVENT_REFRESH_APPLET_SESSION,handler:this._setSessionIdOnApplet},{element:n.Broadcaster,event:o.ModalComponent.GLOBALEVENT_MODAL_CLOSED,handler:this.onModalClosed},{element:n.Broadcaster,event:o.ModalComponent.GLOBALEVENT_MODAL_OPENED,handler:this.onModalOpened},{element:n.Broadcaster,event:o.FlashExternal.GLOBALEVENT_APPLET_READY,handler:this.onAppletReady},{element:n.Broadcaster,event:o.FlashExternal.GLOBALEVENT_APPLET_STREAM_READY,handler:this.onStreamReady}],this)}})},"5d02":function(e,t,a){var n=a("b441"),o=a("5aa8"),r=function(e){r.superclass.constructor.call(this,e)};e.exports=Ext.extend(r,n,{name:"FlashChatPageView",hideChat:function(){this.minimizeMemberApplet()},showChat:function(){this.resetAppletSize()},hideHTML5Applet:function(){try{o.isWin7IE11()?Ext.fly("member_client_container").addClass("minified"):Ext.fly("member_client_container").display("none")}catch(e){}}})},"71fb":function(e,t,a){"use strict";a.r(t);var n=a("3414"),o=a.n(n),r=a("d869"),i=a.n(r),s=a("a9a1"),l=a("cbc5"),h=a("7ab0"),d=a.n(h),E=a("98d2"),c=a("0592"),C=a("3aaa"),m=a.n(C),_=a("5d02"),p=a.n(_),u=a("0c1e"),P=a.n(u),A=function e(t,a){e.superclass.constructor.call(this,t,a)};Ext.extend(A,o.a.Component,{name:i.a.ChatPageComponentAbstract.NAME,controllerClassName:m.a,viewClassName:p.a,privateEndContainerId:"freechat_container",applet:null,init:function(e,t){A.superclass.init.call(this,e,t),this._addGlobalEvents(),this._setChatController()},_addGlobalEvents:function(){o.a.addEvents(i.a.ChatPageComponentAbstract.GLOBALEVENT_PRIVATE_START,i.a.ChatPageComponentAbstract.GLOBALEVENT_PRIVATE_END,i.a.ChatPageComponentAbstract.GLOBALEVENT_PRIVATE_TEASER_LEFT,i.a.ChatPageComponentAbstract.GLOBALEVENT_APPLET_GET_CREDITS_CLICK,i.a.ChatPageComponentAbstract.GLOBALEVENT_APPLET_RESIZE,i.a.ChatPageComponentAbstract.GLOBALEVENT_OPEN_CHAT,i.a.ChatPageComponentAbstract.GLOBALEVENT_ESC_KEYPRESS,i.a.ChatPageComponentAbstract.GLOBALEVENT_CLOSE_CHAT,i.a.ChatPageComponentAbstract.GLOBALEVENT_WINDOW_RESIZE,i.a.ChatPageComponentAbstract.GLOBALEVENT_HISTORY_CHANGE)},setApplet:function(){throw"You must override this method"},setModelContentComponent:function(e){var t=this,n=o.a.Config.get("performerHasStory"),r=o.a.Config.get("performerMyStoryProfilePictureUrl"),i=o.a.Config.get("HTMLAppletVars").category;void 0!==n&&s.store.dispatch(l.setPerformerHasStory(n)),void 0!==r&&s.store.dispatch(l.setSmallProfilePicture(r)),void 0!==i&&s.store.dispatch(l.setPerformerCategory(i)),this.modelContentComponent&&this.modelContentComponent.refresh(e),Promise.all([a.e(5),a.e(10),a.e(23),a.e(1),a.e(17)]).then(a.bind(null,"92aa")).then((function(a){var n=a.default;t.modelContentComponent instanceof n||(t.modelContentComponent=new n(t.element,{chatComponent:t,performerName:e}))})).catch((function(){return"An error occurred while loading the component"}))},_setChatController:function(){var e=this.controllerClassName;return this._chatController instanceof e||(this._chatController=new e({items:{IndexBroadcaster:{component:o.a.Broadcaster,listeners:o.a.object([[i.a.FlashExternal.GLOBALEVENT_LAYOUT_MODE_CHANGE,"onAppletLayoutModeChange"],[i.a.FlashExternal.GLOBALEVENT_PRIVATE_START,"onPrivateStartClick"],[i.a.FlashExternal.GLOBALEVENT_PRIVATE_END,"onPrivateEnd"],[i.a.FlashExternal.GLOBALEVENT_PEEK_END,"onPrivateEnd"],[i.a.FlashExternal.GLOBALEVENT_EXIT_FULLSCREEN,"onExitFullScreen"],[i.a.FlashExternal.GLOBALEVENT_UPDATE_SCROLL_POSITION,"onUpdateScrollPosition"],[i.a.FlashExternal.GLOBALEVENT_GET_PERFORMER_DETAILS,"onGetPerformerDetails"],[i.a.FlashExternal.GLOBALEVENT_VIP_SHOW_STARTED,"onVipShowStarted"]])},model:{component:this._setChatModel()},view:{component:this._setChatView()}}}),o.a.on([{element:this._chatController,event:i.a.ChatPageControllerAbstract.EVENT_MODEL_CHANGE,handler:this.onModelChange},{element:this._chatController,event:i.a.FlashChatPageControllerAbstract.EVENT_APPLET_RESIZE,handler:this.onAppletResize},{element:this._chatController,event:i.a.FlashChatPageControllerAbstract.EVENT_WINDOW_RESIZE,handler:this.onWindowResize},{element:this._chatController,event:i.a.ChatPageController.HISTORY_CHANGE,handler:this.onHistoryChange}],this)),this._chatController},_setChatView:function(){throw"You must override this method"},_setChatModel:function(){return this._chatModel instanceof P.a||(this._chatModel=new P.a({performerName:this.performerName})),this._chatModel},getChatModel:function(){return this._setChatModel()},onWindowResize:function(){o.a.fireEvent(i.a.ChatPageComponentAbstract.GLOBALEVENT_WINDOW_RESIZE,{scope:this})},onPrivateStartClick:function(){o.a.fireEvent(i.a.ChatPageComponentAbstract.GLOBALEVENT_PRIVATE_START,{scope:this,currentModelName:this._chatModel.getCurrentPerformerName()})},onPeekEnd:function(){o.a.fireEvent(i.a.ChatPageComponentAbstract.GLOBALEVENT_PRIVATE_END,{scope:this,currentModelName:this._chatModel.getCurrentPerformerName()})},onPrivateEnd:function(e){throw"You must override this method."},setPrivateEnd:function(e){throw"You must override this method."},getPrivateEndContainer:function(e,t){var n=this.privateEndContainerId;return new Promise((function(o){return Promise.all([a.e(2),a.e(26)]).then(a.bind(null,"c4ae")).then((function(a){var r=a.default;o(new r(n,{isHTML5Version:t,modelData:e,items:{}}))}))}))},onPrivateEndContentReady:function(){throw"You must override this method"},onPrivateEndClose:function(){if(d.a.isChatPage()){var e={category:o.a.getMeta("category")};window.location.href=o.a.getUrl(o.a.Config.get("listPageRoutes").listPage,e,{},"")}else this._destroyPrivateEndContainer(),this.closeApplet()},onPrivateEndRecommenderClick:function(){this._destroyPrivateEndContainer(),this._chatView.showHTML5Applet()},_destroyPrivateEndContainer:function(){this._chatModel.setIsPrivateEndDisplayed(!1),this._privateEndContainer&&(this._privateEndContainer.destroy(),delete this._privateEndContainer)},onPrivateTeaserLeft:function(e){o.a.fireEvent(i.a.ChatPageComponentAbstract.GLOBALEVENT_PRIVATE_TEASER_LEFT,{scope:this,privateTeaserLeft:e})},onGetCreditsClick:function(e){var t=function(e){return e.name===i.a.ChatModalComponent.NAME};if(void 0===E.default.getUserType())c.default.navigate("signup",{trigger:!0,preventNavigateBack:!1});else{var a="payment";void 0!==e.selectedPackage&&(a+="?package=".concat(e.selectedPackage)),c.default.navigate(a,{trigger:!0,replace:!1,preventNavigateBack:d.a.isChatPage(),keepActiveModal:t,lockActiveModal:t,data:{arrivedFromApplet:!0}})}},onModelChange:function(e){var t=e.modelData,a=(e.flashVars,t.performerId);this._destroyPrivateEndContainer(),this.setModelContentComponent(a)},onAppletResize:function(){o.a.fireEvent(i.a.ChatPageComponentAbstract.GLOBALEVENT_APPLET_RESIZE,this)},onHistoryChange:function(e){o.a.fireEvent(i.a.ChatPageComponentAbstract.GLOBALEVENT_HISTORY_CHANGE,e)},onCloseApplet:function(){this.closeApplet()},onCloseChatModal:function(e){e.scope.name===i.a.ChatModalComponent.NAME&&this.closeChatModal()},openChatModal:function(e){this._chatController.openChatModal(e)},lockChatModal:function(){this._chatController.lockChatModal()},closeChatModal:function(){o.a.Config.set("isChatOpenInOverlay",!1),this._destroyPrivateEndContainer(),this._chatController.closeChatModal()},closeApplet:function(){this._chatController.closeApplet()},getIsOnPrivate:function(){return this._chatModel.getIsOnPrivate()},getIsMinimized:function(){return this._chatModel.getIsMinimized()},onMuteChatApplet:function(){this._chatController.muteChatApplet()},onUnMuteChatApplet:function(){this._chatController.unMuteChatApplet()},onAppletReady:function(){this._chatModel&&this._chatModel.setAppletReady(!0)},onStatusChange:function(){throw"onStatusChange method must be implemented"},bind:function(){A.superclass.bind.call(this),o.a.on([{element:o.a.Broadcaster,event:i.a.FlashExternal.GLOBALEVENT_APPLET_READY,handler:this.onAppletReady},{element:o.a.Broadcaster,event:i.a.FlashExternal.GLOBALEVENT_PRIVATE_START,handler:this.onPrivateStartClick},{element:o.a.Broadcaster,event:i.a.FlashExternal.GLOBALEVENT_VIDEO_CALL_START,handler:this.onPrivateStartClick},{element:o.a.Broadcaster,event:i.a.FlashExternal.GLOBALEVENT_PRIVATE_END,handler:this.onPrivateEnd},{element:o.a.Broadcaster,event:i.a.FlashExternal.GLOBALEVENT_PEEK_END,handler:this.onPeekEnd},{element:o.a.Broadcaster,event:i.a.FlashExternal.GLOBALEVENT_PRIVATE_TEASER_LEFT,handler:this.onPrivateTeaserLeft},{element:o.a.Broadcaster,event:i.a.FlashExternal.GLOBALEVENT_APPLET_GET_CREDITS_CLICK,handler:this.onGetCreditsClick},{element:o.a.Broadcaster,event:i.a.FlashExternal.GLOBALEVENT_CLOSE_POPUP,handler:this.onCloseApplet},{element:o.a.Broadcaster,event:i.a.ModalComponent.GLOBALEVENT_MODAL_CLOSED,handler:this.onCloseChatModal},{element:o.a.Broadcaster,event:i.a.PhotoViewerComponent.GLOBALEVENT_VIDEO_PLAY_STARTED,handler:this.onMuteChatApplet},{element:o.a.Broadcaster,event:i.a.GalleryController.GLOBALEVENT_VIDEO_PLAYER_START,handler:this.onMuteChatApplet},{element:o.a.Broadcaster,event:i.a.PhotoViewerComponent.GLOBALEVENT_VIDEO_PLAY_STOPPED,handler:this.onUnMuteChatApplet},{element:o.a.Broadcaster,event:i.a.JawsNotificationsComponent.GLOBALEVENT_PERFORMER_STATUS_CHANGE,handler:this.onStatusChange}],this)}});var f=A,T=a("5aa8"),v=a.n(T),L=function e(t){e.superclass.constructor.call(this,t)};Ext.extend(L,o.a.View,{name:i.a.HTML5ChatPageView.NAME,hideHTML5Applet:function(){v.a.isWin7IE11()?Ext.fly("member_client_container").addClass("minified"):Ext.fly("member_client_container").display("none").addClass("hidden")},showHTML5Applet:function(){v.a.isWin7IE11()?Ext.fly("member_client_container").removeClass("minified"):Ext.fly("member_client_container").display("block").removeClass("hidden")},setAppletSizeType:function(e){o.a.Storage.set(i.a.HTML5ChatPageComponent.APPLET_SIZE_STORAGE_LABEL,e),this.element.data("size-type",e)}});var N=L,V=a("2ce1"),M=a("f94d"),O=a("dab4"),g=a.n(O),S=a("1cab"),R=function e(t,a){e.superclass.constructor.call(this,t,a)};Ext.extend(R,f,{name:i.a.HTML5ChatPageComponent.NAME,flashObjectId:"chatapplet",freeChatId:"freechat",controllerClassName:m.a,viewClassName:N,init:function(e,t){R.superclass.init.call(this,e,t);var a=t.performerName;this.setModelContentComponent(a),M.default.appletReady.then(function(e){this.setEvents(e)}.bind(this))},setEvents:function(e){e.onSetFixSize=this._setChatView().setAppletSizeType.bind(this,i.a.HTML5ChatPageComponent.SIZE_FIX),e.onSetFluidSize=this._setChatView().setAppletSizeType.bind(this,i.a.HTML5ChatPageComponent.SIZE_FLUID),e.onSubscribe=V.a.memberApplet.subscribe},_setChatView:function(){var e=this.viewClassName;return this._chatView instanceof e||(this._chatView=new e({id:"freechat_container",model:this._setChatModel()})),this._chatView},_setChatController:function(){var e=this.controllerClassName;return this._chatController instanceof e||(this._chatController=new e({html5Client:M.default.instance,items:{IndexBroadcaster:{component:o.a.Broadcaster,listeners:o.a.object([[i.a.FlashExternal.GLOBALEVENT_VIDEO_CALL_START,"onPrivateStartClick"],[i.a.FlashExternal.GLOBALEVENT_PRIVATE_START,"onPrivateStartClick"],[i.a.FlashExternal.GLOBALEVENT_PRIVATE_END,"onPrivateEnd"],[i.a.FlashExternal.GLOBALEVENT_PEEK_END,"onPrivateEnd"],[i.a.FlashExternal.GLOBALEVENT_GET_PERFORMER_DETAILS,"onGetPerformerDetails"]])},model:{component:this._setChatModel(),listeners:{}},view:{component:this._setChatView(),listeners:{}}}}),o.a.on([{element:this._chatController,event:i.a.ChatPageControllerAbstract.EVENT_MODEL_CHANGE,handler:this.onModelChange},{element:this._chatController,event:i.a.ChatPageController.HISTORY_CHANGE,handler:this.onHistoryChange}],this),Ext.fly("breadcrumb")&&this._chatController.addComponent({component:new g.a({id:"breadcrumb"}),listeners:{}},"breadCrumbView")),this._chatController},sendEscPressToApplet:function(){this.getChatModel().getIsOnPrivate()||this._chatController.closeApplet()},startVideoCallFromMessenger:function(e){this.startVideoCall(e,S.GA_CONST.PAGE.MESSAGES)},startVideoCallFromPrivateEnd:function(e){this.startVideoCall(e,S.GA_CONST.PAGE.VIDEOCALL_END)},startVideoCall:function(e,t){var a=this._chatModel.getCurrentPerformerName();!e||e===a?M.default.instance.startVideoCall(t):this._chatController.onStartVideoCall(e,t),this._destroyPrivateEndContainer()},startPrivateChat:function(e){var t=this._chatModel.getCurrentPerformerName();!e||e===t?M.default.instance.applet.backToPrivate():this._chatController.onStartPrivate(e),this._destroyPrivateEndContainer()},setPrivateEnd:function(e){e=Ext.apply(o.a.Config.get("HTMLAppletVars"),e),this.getPrivateEndContainer(e,!1).then(o.a.bind((function(e){this._privateEndContainer=e,o.a.on([{element:this._privateEndContainer,event:i.a.PrivateEndContainer.EVENT_CLOSE,handler:this.onPrivateEndClose},{element:this._privateEndContainer,event:i.a.PrivateEndContainer.EVENT_PRIVATE_END_CONTENT_READY,handler:this.onPrivateEndContentReady},{element:this._privateEndContainer,event:i.a.PrivateEndContainer.GLOBALEVENT_PRIVATE_END_RECOMMENDER_CLICK,handler:this.onPrivateEndRecommenderClick},{element:this._privateEndContainer,event:i.a.PrivateEndContainer.EVENT_BACK_TO_PRIVATE,handler:this.startPrivateChat},{element:this._privateEndContainer,event:i.a.PrivateEndContainer.EVENT_CALL_AGAIN,handler:this.startVideoCallFromPrivateEnd},{element:this._privateEndContainer,event:i.a.PrivateEndContainer.EVENT_PRIVATE_END_DESTROYED,handler:this.onPrivateEndDestroyed}],this)}),this))},onPrivateEndContentReady:function(){this._chatView.hideHTML5Applet()},onPrivateEnd:function(e){o.a.fireEvent(i.a.ChatPageComponentAbstract.GLOBALEVENT_PRIVATE_END,{scope:this,currentModelName:this._chatModel.getCurrentPerformerName()}),this._chatModel.isPrivateEndDisplayed()||(this._chatModel.setIsPrivateEndDisplayed(!0),Promise.resolve().then(o.a.bind((function(){this.setPrivateEnd(e)}),this).bind(null,a)).catch(a.oe))},onPrivateEndDestroyed:function(){this._chatView.showHTML5Applet()},onPrivateEndClose:function(){this._chatView.showHTML5Applet(),R.superclass.onPrivateEndClose.call(this)},onStatusChange:function(e){M.default.instance.updateAllPerformerStatuses(e.header)},onMuteChatApplet:function(){M.default.instance.mute()},onUnMuteChatApplet:function(){M.default.instance.unMute()},bind:function(){R.superclass.bind.call(this),o.a.on([{element:o.a.Broadcaster,event:i.a.ModelMessagesConversationController.GLOBALEVENT_PRIVATE_START,handler:this.startPrivateChat},{element:o.a.Broadcaster,event:i.a.ModelMessagesConversationController.GLOBALEVENT_VIDEO_CALL_START,handler:this.startVideoCallFromMessenger}],this)}});t.default=R}}]);