');n.addClass("sumome-doctype-notice").append("More than one instance of Sumo is attempting to start on this page. ").append("Please check that you are only loading Sumo once per page.");var r=t("
").addClass("sumome-doctype-notice-close").click(function(){t(n).remove()}).appendTo(n);t("body").append(n)}return!1}g=!0,window.__smLoaded=!0;try{c.processShopifyParams()}catch(e){}t.fn.area=function(){return this.innerWidth()*this.innerHeight()},t.fn.aspect=function(){var e=this.innerWidth(),t=this.innerHeight();return t>e?e/t:t/e},t.fn.largest=function(){var e=null,n=0;return t(this).each(function(){var r=t(this).aspect(),i=t(this).area()*r;i>n&&(n=i,e=t(this))}),e},t.Path.map("#/sumome/app/:app_id(/)").to(e),t.Path.map("#/sumome/app/:app_id/:path(/)").to(e),t.Path.map("#/sumome/app/:app_id/:path(/*query)").to(e),"manage"===x&&(t.Path.map("#/:app_id(/)").to(e),t.Path.map("#/:app_id/:path(/)").to(e),t.Path.map("#/:app_id/:path(/*query)").to(e));var i=window.location.href,a;setInterval(function(){a=window.location.href,i!==a&&(z.emit("event",{event:"pageview",href:a,appId:"2d1fffc9-378f-4b61-ac79-2dc8a077b827"}),i=window.location.href)},1200),t(window).on("resize",function(e){z.emit("resize")}),window.addEventListener&&window.addEventListener("sumome",function(e){e&&"detail"in e&&e.detail&&"type"in e.detail&&e.detail.type&&"launch"===e.detail.type&&(T?(I=!0,T.triggerHandler("click")):z.emit("startApp","launcher"))}),t("body").keydown(function(e){var t=[83,85,77,79,77,69,38],n=[83,85,77,79,38];e.which===t[D.length]?(D.push(e.which),D.length===t.length&&(D=[],T?(I=!0,T.triggerHandler("click")):z.emit("startApp","launcher"))):e.which===n[D.length]?(D.push(e.which),D.length===n.length&&(D=[],T?(I=!0,T.triggerHandler("click")):z.emit("startApp","launcher"))):D=[]}),t("#sumome-jquery-iframe").hide(),t("#sumome-jquery-iframe").on("show",function(){this.hide()}),"location"in window&&"search"in window.location&&window.location.search.indexOf("smdebug")>=0&&(window.__smDebug=!0,window.__sm$=t,window.__smArticles=o),t.support.cors=!0;var p={href:window.location.href||null,ref:document.referrer||null};M&&(p.visitor_id=M),_&&(p.site_id=_),x&&(p.mode=x),E&&(p.platform=E);var d=u.getQueryVariable("sumotoken");t.ajax(t.extend(y(t.cookie("__smToken"),d),{url:sumoUrl+"/api/load/",data:p,error:function e(t){z.emit("removeCookie","__smUser")},success:function e(n){for(var r=!1,i=["hint","siteId","siteRegistered","badgeLocation","unreadNotificationCount","hasSumoMePro","access","geoLocation","ipAddress","views","tours","clientSites","gravatarHash","promptedShopifyReview","activatedAt","platform","services","isShopifyBilling","siteName","siteHref"],a=0;a')),U.tierProductIds="tierProductIds"in n?n.tierProductIds:[],n.success){n&&"token"in n&&n.token&&(U.sessionId=n.token,t.cookie("__smToken",n.token,{expires:365,path:"/"})),n&&"user"in n&&n.user?(U.user=n.user,U.role=n.role,t.cookie("__smUser",n.user,{expires:365,path:"/"}),"manage"===x||"login"in n&&n.login||n.unreadNotificationCount>0?(z.emit("beforeLogin","siteCreated"in n&&n.siteCreated),("manage"!==x||N)&&z.emit("startApp","control")):(C=!0,H()),z.emit("checkCompatibilityMode")):(z.emit("removeCookie","__smUser"),H()),n&&"apps"in n&&(U.apps=n.apps),n&&"publicApps"in n&&(U.publicApps=n.publicApps);for(var c=!1,a=0;a1&&(w=t([]));var S=[];w.each(function(){this.__url&&S.push(this.__url)}),m.shareService=!0,m.href=/y,m.urls=S}-1!==n.services.indexOf(HIGHLIGHTER_APP_ID)&&(m.highlighterService=!0,m.pathname=location.pathname),-1!==n.services.indexOf(GOOGLE_ANALYTICS_APP_ID)&&(m.googleAnalyticsService=!0),-1!==n.services.indexOf(HEAT_MAPS_APP_ID)&&(m.heatMapsStatus=!0,m.user_id=U.user,m.path=window.location.pathname+window.location.search),-1!==n.services.indexOf(SCROLL_BOX_APP_ID)&&(m.scrollBoxService=!0,m.cookieKeysOnly=Object.keys(t.cookie()),m.width=Math.min(window.screen.availWidth||t(window).width(),t(window).width())),t.ajax({type:"POST",dataType:"json",beforeSend:function e(n){n.setRequestHeader("X-Sumo-Auth",t.cookie("__smToken"))},url:U.sumoUrl+"/services",data:m,xhrFields:{withCredentials:!1},crossDomain:!0}).done(function(e){U.serviceData=e;for(var t=0;t=Y&&document.body)return h()}catch(e){}setTimeout(m,10)}}try{"CSS1Compat"!==document.compatMode&&(t.fn.oldHeightFunction=t.fn.height,t.fn.height=function(){return this.is(t(window))?this.oldHeightFunction()Sumo'),U.badgeLocation){case"tl":T.css(t.extend({},leftBorderStyle,{top:"40px",left:"-40px"})),T.find("span").css(t.extend({},leftBorderStyle,{marginLeft:"0",marginRight:"4px"}));break;case"tr":T.css(t.extend({},rightBorderStyle,{top:"40px",right:"-40px"})),T.find("span").css(t.extend({},rightBorderStyle,{marginLeft:"4px",marginRight:"0"}));break;case"bl":T.css(t.extend({},leftBorderStyle,{bottom:"40px",left:"-40px"})),T.find("span").css(t.extend({},leftBorderStyle,{marginLeft:"0",marginRight:"4px"}));break;case"br":T.css(t.extend({},rightBorderStyle,{bottom:"40px",right:"-40px"})),T.find("span").css(t.extend({},rightBorderStyle,{marginLeft:"4px",marginRight:"0"}));break;case"hidden":C?(T.css({top:"40px",right:"-40px"}),T.find("span").css({marginLeft:"4px",marginRight:"0"})):T.style("display","none","important")}t("body").append(T),n&&T.append('
'),T.click(function(e){if(I){if("login"===O)return void z.emit("stop",O+"/app",function(){z.emit("startApp","login")});if(C){t.ajax(t.extend(y(t.cookie("__smToken")),{url:sumoUrl+"/api/softlogin",data:{site_id:_},success:t.proxy(function(e){},this)})),z.emit("beforeLogin"),z.emit("startApp","launcher");for(var n=0;n");e.addClass("sumome-doctype-notice").append("Invalid <!DOCTYPE> declaration. Sumo may not display correctly. ").append('learn more');var n=t("").addClass("sumome-doctype-notice-close").click(function(){t(e).remove(),t.cookie("__smDoctype","true",{expires:3,path:"/"})}).appendTo(e);t("body").append(e)}}),z.on("setProperties",function(e){for(var t in e)U[t]=e[t]}),z.on("removeCookie",function(e){t.removeCookie(e,{path:"/"})}),z.on("event",function(e){var n=t.param({site_id:_,app_id:e.appId,shortcut_id:e.shortcutId,visitor_id:U.visitorId,event:e.event,href:e.href||window.location.href||null,ref:document.referrer||null,cache:Math.random()}),r=sumoUrl+"/api/event/?"+n,i=t("
").attr("src",r).attr("alt","").hide();t(document.body).append(i)}),z.on("restartApp",function(e){O===e.split("/")[0]&&(O=null),z.stop(e+"/app",function(t){t||("control"===e&&(R=!1),"launcher"===e&&(N=!1),z.emit("startApp",e))})}),z.on("stop",function(e){O===e.split("/")[0]&&(O=null),z.stop(e,function(t){t||(window.location.hash="",z.emit(e+"/stopped",e),"control/app"===e&&(R=!1),"launcher/app"===e&&(N=!1))})}),z.on("purchase",function(e){if(!t.cookie("__smToken"))return e.done&&e.done({success:!1,error:"Please log back in"}),z.emit("logout",!1);var n=e.iSrc||t.cookie("__smIRef")||null,r=e.src||t.cookie("__smSrc")||null;if(U.tierProductIds&&U.tierProductIds.length&&U.tierProductIds.indexOf(e.productId)<0&&"e75122b4-7cde-4828-9512-2dc2a32c1d81"!==e.productId)z.emit("startApp",{app:"app_store",src:r,iSrc:n});else{var o=e.siteId,a=e.cartId,s=e.productId,c=e.couponCode||null,l=e.collectionId||null,f=e.expiresAt||null,p=e.done,d=e.onWindowClose,h=400,m=670,v=void 0!==window.screenLeft?window.screenLeft:screen.left,g=void 0!==window.screenTop?window.screenTop:screen.top,_=!1,b=window.innerWidth?window.innerWidth:document.documentElement.clientWidth?document.documentElement.clientWidth:screen.width,w=window.innerHeight?window.innerHeight:document.documentElement.clientHeight?document.documentElement.clientHeight:screen.height,x=b/2-200+v,S=w/2-335+g,A=o?U.secureSumoUrl+"/site/"+o+"/store/product/"+s+"/":U.secureSumoUrl+"/preparecart/"+a+"/",E=u.getQueryVariable("payment_processor"),O=[];if(c&&O.push({key:"promotion",val:c}),E&&O.push({key:"payment_processor",val:E}),n&&O.push({key:"i_src",val:n}),O.length)for(i=0;i