function Tips(){function l(){c()}function c(){}function h(e){d(e)}function p(e){if(typeof e!="function")throw new Error("must register function to ready method");f?e():a.push(e)}function d(e){v(),H(e),s=0,o=0,u=0,y(),w(),S()}function v(){!isAndroid&&!isQT&&!isIOS?i=!1:funcObj.appcomm.appSend({method:"getData",params:{name:"tipsEnabled"},id:null},function(e){typeof e=="boolean"&&(e=e.toString()),e==undefined||e==null||e==""||e=="true"?funcObj.tips.setTipsEnabled(!0):funcObj.tips.setTipsEnabled(!1)})}function m(){return i}function g(e){var t=e?"true":"false";funcObj.appcomm.appSend({method:"setData",params:{name:"tipsEnabled",value:t},id:null})}function y(){funcObj.appcomm.appSend({method:"getData",params:{name:"runCount"},id:null},function(e){e=parseInt(e),isNaN(e)||(s=e)})}function b(){s++,funcObj.appcomm.appSend({method:"setData",params:{name:"runCount",value:s.toString()},id:null})}function w(){funcObj.appcomm.appSend({method:"getData",params:{name:"browseCount"},id:null},function(e){e=parseInt(e),isNaN(e)||(o=e)})}function E(){o++,funcObj.appcomm.appSend({method:"setData",params:{name:"browseCount",value:o.toString()},id:null})}function S(){funcObj.appcomm.appSend({method:"getData",params:{name:"presetCount"},id:null},function(e){e=parseInt(e),isNaN(e)||(u=e)})}function x(){u++,funcObj.appcomm.appSend({method:"setData",params:{name:"presetCount",value:u.toString()},id:null})}function T(){s=1,o=0,u=0,funcObj.appcomm.appSend({method:"setData",params:{name:"runCount",value:s.toString()},id:null}),funcObj.appcomm.appSend({method:"setData",params:{name:"browseCount",value:o.toString()},id:null}),funcObj.appcomm.appSend({method:"setData",params:{name:"presetCount",value:u.toString()},id:null})}function N(){C(),funcObj.message.createMessage({priority:1,title:"##TRANS_InternalMessages_Dialogs_StopTips_Title##",copy:"##TRANS_InternalMessages_Dialogs_StopTips_Copy##",buttons:[{title:"##TRANS_Buttons_OK##",callback:"close"}]})}function C(){g(!1),funcObj.message.closeMessage()}function k(e){return n[e]}function L(){!isAndroid&&!isQT&&!isIOS?(O(null),f=!0,a.forEach(function(e){e()})):funcObj.appcomm.appSend({method:"getData",params:{name:"tipsTracker"}},function(e){O(e),f=!0,a.forEach(function(e){e()})})}function A(e){var r=[];for(var i=0;i<t+1;i++)r.push(!0);var s=e.split(","),o=s.map(function(e){return e=e.trim(),e==="Tip Statuses"?"Tip Statuses":e=="true"});for(var i=0;i<o.length;i++)r[i]=o[i];n=r}function O(e){e==undefined||e==null||e==""?D():(r=e,A(r))}function M(e,t){n[e]=t?!0:!1;var r=n.join();funcObj.appcomm.appSend({method:"setData",params:{name:"tipsTracker",value:r},id:null})}function _(){return n}function D(){r="Tip Statuses,";for(var e=1;e<=t;e++)r+="true,";r=r.slice(0,-1),A(r),funcObj.appcomm.appSend({method:"setData",params:{name:"tipsTracker",value:r},id:null})}function P(n){var r=$(n).find("tip"),i=$(r).last().attr("number"),s=0;e[0]={};for(var o=0;o<i;o++)e[o+1]={},e[o+1].number=o+1,e[o+1].header=e[o+1].content=e[o+1].element="",$(r[s]).attr("number")==o+1&&(e[o+1].header=$(r[s]).find("header").text(),e[o+1].content=$(r[s]).find("tipcontent").text(),e[o+1].element=$(r[s]).find("element").text(),s++);t=parseInt(i),L()}function H(e){e!=undefined&&e!=null?P($($.parseXML(e))):P($($.parseXML("<tips></tips>")))}function B(t,n,r,i,s){var o=n||[],u=r||k(t);if(u&&e.length>=t){var a=e[t].header,f=e[t].content;o.push({title:"##TRANS_Buttons_OK##",callback:"close",weight:0,"class":"primary"}),o.sort(function(e,t){return e.weight===undefined&&(e.weight=Infinity),t.weight===undefined&&(t.weight=Infinity),e.weight-t.weight});var l={title:a,copy:f,modal:!0,background:!0,ref:"tip",tipRef:t,buttons:o};if(i!==null||i!==undefined)l.icon=i;if(s!==null||s!==undefined)l.priority=s;funcObj.message.createMessage(l),M(t)}}function j(t){F();if(t!=null&&e[t]!=undefined){var n=e[t].element;n!="none"&&$("#"+n).append(funcObj.contentCon.getContent("tipHighlight",{repl:{}}))}}function F(){$(".tipHighlight").length>0&&$(".tipHighlight").remove()}function I(e){funcObj.UIMain.updateInAppMsgReadyState({onboardingCheckComplete:!0})}function q(e){(e||!isBrowser&&k(17)&&funcObj["devCon"].getAccountID()!=undefined&&funcObj["devCon"].getAccountID()!=null)&&app&&app.Models&&app.Models.MainLayoutModel&&app.Models.MainLayoutModel.trigger("SHOW_QUICK_TOUR")}var e=[],t,n=[],r,i,s,o,u,a=[],f=!1;this.setup=h,this.resetCounts=T,this.hideTips=C,this.hideTipsCheck=N,this.getTipsEnabled=m,this.setTipsEnabled=g,this.resetConditions=D,this.initConditions=O,this.createTipHighlight=j,this.removeTipHighlight=F,this.showOnBoarding=I,this.toggleCondition=M,this.showQuickTour=q,this.createTip=B,this.getConditions=_,this.checkCondition=k,this.ready=p,l()};