function showQuickTour(){if(!isA4V)if(!$("#bbd_tour").length){new App.Views.BottomDrawerViewNew({el:"div#bbd_tour",model:new App.Models.BBDModel({_id:"bbd_tour",persist:!1,dismiss:!1,solo:!1})});var e=new App.Views.QuickTourView({el:"#bbd_tour .child_content",model:new App.Models.QuickTourModel({title:"QuickTour"})});$("#bbd_tour").renderContent(e)}else $("#bbd_tour").toggle()}var triggerDataAnalytics;App.Models.MainLayoutModel=Backbone.Model.extend({defaults:{currentScenario:[],orientation:"",quickMessage:!1,message:!1,bottomDrawer:!1,settings:!1,feedback:!1,add_service:!1,deviceTray:!1,main_play:!1,drawer:!1,keyboard:{visible:!1,diffHeight:0,height:0}},initialize:function(){triggerDataAnalytics=_.debounce(function(e,t){var n=e.parseDataObj(t);e.set(n),$(funcObj.dataAnalytics).trigger("VIEW_CHANGE",n)},300)},setListeners:function(){this.listenTo(app.Views.NowPlayFullView,"UPDATE_MAIN_VIEW",function(e){this.updateMainView(e)}),this.listenTo(app.Views.BrowseView,"UPDATE_MAIN_VIEW",function(e){this.updateMainView(e)}),this.listenTo(app.Views.DrawerView,"UPDATE_MAIN_VIEW",function(e){this.updateMainView(e)}),this.on("UPDATE_ORIENTATION",function(e){showDebug===2&&console.log("UPDATE_ORIENTATION");var t=e;this.updateOrientation(t)}),this.on("UPDATE_MAIN_VIEW",function(e){showDebug===2&&console.log("UPDATE_MAIN_VIEW called from non-Backbone context"),this.updateMainView(e)}),this.on("SHOW_QUICK_TOUR",function(){showDebug===2&&console.log("SHOW_QUICK_TOUR"),showQuickTour()}),this.on("APP_START",function(){showDebug===2&&console.log("APP_START"),isA4V||setTimeout(function(){var e=new App.Views.OnBoardingView({el:"#bbd_onboard .child_content",model:new App.Models.OnBoardingModel});new App.Views.BottomDrawerViewNew({el:"div#bbd_onboard",model:new App.Models.BBDModel({_id:"bbd_onboard",child:e,persist:!1,solo:!1})})},1e3)}),this.on("BOTTOM_DRAWER DEV_TRAY drawer main_play browse_source",function(e){this.set(e),funcObj.dataAnalytics.setView(e),triggerDataAnalytics(this,e)}),this.on("CONTENT MESSAGE",function(e){this.set(e),funcObj.dataAnalytics.setView(e),$(funcObj.dataAnalytics).trigger("VIEW_CHANGE",e)}),this.on("KEYBOARD_EVENT",this.set)},updateMainView:function(e){var t=e.scenario.split(":"),n=t[0];if(!isA4V||isA4V&&n=="main_play"){_.isEqual(this.get("currentScenario"),t)&&(t.length=0);var r={};r[n]=t.length?!0:!1,this.set("currentScenario",t),this.trigger(n,r)}},updateOrientation:function(e){e!==this.get("orientation")&&this.set("orientation",e)},parseDataObj:function(e){var t=Object.keys(e)[0];if(t==="browse_source"){e={};if(this.get("drawer")||this.get("main_play"))this.get("drawer")?e.drawer=!1:e.main_play=!1}return e}});