(()=>{var s,t,e,n,i={537:s=>{var t=null,e=null;window.MPS_NOTIFICATIONS.snIsFoundAtleastOneCartSummaryFN=function(){var s=!1;return null!=window.MPS_NOTIFICATIONS.snCartSummaryNotifications&&(s=!0),s},window.MPS_NOTIFICATIONS.snAssignCartSummaryNotification=function(s){var n=t.settings.cart_summary_display_template;sn_jQuery("#mps-sales-notification .sn-img a").css("background-image","url('"+e.snSetProductImage(s.sn_img)+"')"),sn_jQuery("#mps-sales-notification .sn-img a").removeAttr("href"),function(){var i=t.settings.cart_summary_time_range,o="day";e.TIME_MANAGEMENT.SECONDS==t.settings.cart_summary_time_range_select?o=""==t.settings.cart_summary_seconds_prefered_keyword?"seconds":t.settings.cart_summary_seconds_prefered_keyword:e.TIME_MANAGEMENT.MINUTES==t.settings.cart_summary_time_range_select?o=""==t.settings.cart_summary_minutes_prefered_keyword?"minutes":t.settings.cart_summary_minutes_prefered_keyword:e.TIME_MANAGEMENT.HOURS==t.settings.cart_summary_time_range_select?o=""==t.settings.cart_summary_hours_prefered_keyword?"hours":t.settings.cart_summary_hours_prefered_keyword:e.TIME_MANAGEMENT.DAYS==t.settings.cart_summary_time_range_select&&(o=""==t.settings.cart_summary_days_prefered_keyword?"days":t.settings.cart_summary_days_prefered_keyword);var a={unit:i,duration:o},r=t.settings.cart_summary_time_ago_template;for(var _ in a)r=e.snReplaceUsingArray(r,a[_],e.snVariablesUsingRegex(_));var l=""==t.settings.cart_summary_variables_color?"":" style='color: "+t.settings.cart_summary_variables_color+"'";for(var _ in a={visitor_count:""+s.sn_visitor_count+"",add_to_cart_count:""+s.sn_count+"",time_ago:""+r+""})n=e.snReplaceUsingArray(n,a[_],e.snVariablesUsingRegex(_))}(),sn_jQuery("#mps-sales-notification .sn-info").html("
"+n+"
"),t.settings.cart_summary_is_rtl?sn_jQuery("#mps-sales-notification").addClass("mps-cart-summary-notification tb-rtl"):sn_jQuery("#mps-sales-notification").addClass("mps-cart-summary-notification")},s.exports=function(s,n,i){var o=new sn_jQuery.Deferred,a=!1;return n.snIsMobile()?s.settings.cart_summary_mobile_enabled&&(a=!0):s.settings.cart_summary_desktop_enabled&&(a=!0),i&&a&&n.snCheckFeatureAccess(MPS_NOTIFICATIONS.snAccessSettings,n.CART_SUMMARY_NOTIFICATION_APP)&&s.settings.is_cart_summary_notification_enabled?(t=s,e=n,function(s){e.postResult(e.snGlobalAPIURL()+e.ol_GET_CART_SUMMARY_NOTIFICATION,{sid:t.settings.sid,sn:e.snGetShopifyShopURL(),m:"sn-get-cs",time_range:t.settings.cart_summary_time_range,sec:t.settings.cart_summary_time_range_in_seconds}).done((function(n){var i,o,a;n.isSuccess?(o=(i=n).cSC,a=i.cSVC,o>=t.settings.cart_summary_cart_count&&o>0&&(window.MPS_NOTIFICATIONS.snCartSummaryNotifications=[],window.MPS_NOTIFICATIONS.snCartSummaryNotifications.push({sn_type:e.CART_SUMMARY_NOTIFICATION,sn_count:o,sn_visitor_count:a,sn_unique:e.snGetShopifyShopURL()+e.snCartSummaryUniqueKey,sn_img:e.snGlobalAPIURL()+e.snVersion+"img/no-cache/mps-cart-summary.svg?color="+t.settings.cart_summary_icon_color.replace("#","")})),s.resolve(!0)):s.resolve(!1)}))}(o)):o.resolve(!1),o.promise()}},279:s=>{var t=null,e=null,n=!1,i="",o="",a="",r="";function _(s){for(var i=0;i1?e.snSetProductImage(s.sn_img,t.settings.product_image_size_ext_mobile):e.snSetProductImage(s.sn_img):0==t.settings.product_image_size?e.snSetProductImage(s.sn_img,t.settings.product_image_customized_size+"x"):t.settings.product_image_size>1?e.snSetProductImage(s.sn_img,t.settings.product_image_size_ext):e.snSetProductImage(s.sn_img),sn_jQuery("#mps-sales-notification .sn-img a").css("background-image","url('"+n+"')");var i=e.snGetProductDomainURL();e.isFromAdmin()||(sn_jQuery("#mps-sales-notification .sn-img a").attr("href",i+"/products/"+s.sn_handle+window.MPS_NOTIFICATIONS.snGetUTMParams()),sn_jQuery("#mps-sales-notification .sn-img a").removeAttr("role")),e.snIsNotNullOrBlank(i)&&!e.isFromAdmin()&&sn_jQuery("#mps-sales-notification .sn-img a").attr("target","_blank")}(),function(){var i={item_price:e.bmMoneyFormat(s.sn_item_price,t.settings.money_format),line_price:e.bmMoneyFormat(s.sn_line_price,t.settings.money_format),quantity:s.sn_quantity};for(var o in i)n=e.snReplaceUsingArray(n,i[o],e.snVariablesUsingRegex(o))}(),function(){var t=e.snGetProductDomainURL(),i="";e.snIsNotNullOrBlank(t)&&(i=" target='_blank'");var o={item:e.isFromAdmin()?""+s.sn_title+"":""+s.sn_title+""};for(var a in o)n=e.FILTERS.getReplacedVariable(o,a,n)}(),function(){try{var _=window.MPS_NOTIFICATIONS.snPrepareThresholdDateTimeObj(s),l=0,d=e.snIsNotNullOrBlank(t.settings.time_ago_template)?t.settings.time_ago_template:"{{ unit }} {{ duration }} ago";if(c(_,t.settings.cart_notification_duration,t.settings.cart_notification_duration_select))return n=e.snReplaceUsingArray(n,"",e.snVariablesUsingRegex("time_ago")),!0;Math.floor(_.dtDiffSeconds)>0&&Math.floor(_.dtDiffSeconds)<60?(l=Math.floor(_.dtDiffSeconds),d=e.snReplaceUsingArray(d,l,e.snVariablesUsingRegex("unit")),d=Math.floor(_.dtDiffSeconds)<=1?e.snReplaceUsingArray(d,e.snIsNotNullOrBlank(i)?i:"second",e.snVariablesUsingRegex("duration")):e.snReplaceUsingArray(d,e.snIsNotNullOrBlank(i)?i:"seconds",e.snVariablesUsingRegex("duration"))):Math.floor(_.dtDiffMinutes)>0&&Math.floor(_.dtDiffMinutes)<60?(l=Math.floor(_.dtDiffMinutes),d=e.snReplaceUsingArray(d,l,e.snVariablesUsingRegex("unit")),d=Math.floor(_.dtDiffMinutes)<=1?e.snReplaceUsingArray(d,e.snIsNotNullOrBlank(o)?o:"minute",e.snVariablesUsingRegex("duration")):e.snReplaceUsingArray(d,e.snIsNotNullOrBlank(o)?o:"minutes",e.snVariablesUsingRegex("duration"))):Math.floor(_.dtDiffHours)>0&&Math.floor(_.dtDiffHours)<24?(l=Math.floor(_.dtDiffHours),d=e.snReplaceUsingArray(d,l,e.snVariablesUsingRegex("unit")),d=Math.floor(_.dtDiffHours)<=1?e.snReplaceUsingArray(d,e.snIsNotNullOrBlank(a)?a:"hour",e.snVariablesUsingRegex("duration")):e.snReplaceUsingArray(d,e.snIsNotNullOrBlank(a)?a:"hours",e.snVariablesUsingRegex("duration"))):Math.floor(_.dtDiffDays)>0&&(l=Math.floor(_.dtDiffDays),d=e.snReplaceUsingArray(d,l,e.snVariablesUsingRegex("unit")),d=Math.floor(_.dtDiffDays)<=1?e.snReplaceUsingArray(d,e.snIsNotNullOrBlank(r)?r:"day",e.snVariablesUsingRegex("duration")):e.snReplaceUsingArray(d,e.snIsNotNullOrBlank(r)?r:"days",e.snVariablesUsingRegex("duration"))),n=l>0?e.snReplaceUsingArray(n,''+d+"",e.snVariablesUsingRegex("time_ago")):e.snReplaceUsingArray(n,"",e.snVariablesUsingRegex("time_ago"))}catch(s){console.log(s),n=e.snReplaceUsingArray(n,"",e.snVariablesUsingRegex("time_ago"))}}(),sn_jQuery("#mps-sales-notification .sn-info").html("
"+n+"
"),t.settings.cart_is_rtl?sn_jQuery("#mps-sales-notification").addClass("mps-cart-notification tb-rtl"):sn_jQuery("#mps-sales-notification").addClass("mps-cart-notification")},window.MPS_NOTIFICATIONS.SNRefreshCartNotifications=function(){n&&t.settings.is_cart_notification_enabled&&(e.snIsNotNullOrBlank(t.settings.seconds_prefered_keyword)&&(i=t.settings.seconds_prefered_keyword),e.snIsNotNullOrBlank(t.settings.minutes_prefered_keyword)&&(o=t.settings.minutes_prefered_keyword),e.snIsNotNullOrBlank(t.settings.hours_prefered_keyword)&&(a=t.settings.hours_prefered_keyword),e.snIsNotNullOrBlank(t.settings.days_prefered_keyword)&&(r=t.settings.days_prefered_keyword),function(){if(n&&t.settings.is_cart_notification_enabled){var s=!1;e.snIsMobile()?t.settings.cart_mobile_enabled&&(s=!0,l()):t.settings.cart_desktop_enabled&&(s=!0,l()),s||_([])}}())},s.exports=function(s,i,o){t=s,e=i,n=o,window.MPS_NOTIFICATIONS.SNRefreshCartNotifications()}},59:s=>{var t="/v1/",e="shop=",n=".myshopify.com",i="?v=1.2.55",o="/v1/min/app.min.css",a="/v1/min/app.min.css"+i,r="makeprosimp.com",_=["toastibar.app"],l="/sales-notification-local",c="//sales-notification-demo.",d="//sales-notification.",u="//sales-notification-cdn.",I="//toastibar-demo.",m="//toastibar.",p="//toastibar-cdn.";!function(){function s(s){return!!document.querySelector('script[src*="'+s+'"]')}"undefined"!=typeof MPS_LOADER_SETTINGS&&void 0!==MPS_LOADER_SETTINGS.scriptTagURL?(MPS_LOADER_SETTINGS.scriptTagURL.includes(p)||MPS_LOADER_SETTINGS.scriptTagURL.includes(m)||MPS_LOADER_SETTINGS.scriptTagURL.includes(I))&&(c=I,d=m,u=p):(s(p)||s(m)||s(I))&&(c=I,d=m,u=p)}();var g="/v1/analytics",O="sn_preview=1";function f(){var s="";if(void 0!==MPS_LOADER_SETTINGS.scriptTagURL)s=MPS_LOADER_SETTINGS.scriptTagURL;else try{s=sn_jQuery('script[src*="'+u+'"]').attr("src")||sn_jQuery('script[src*="'+d+'"]').attr("src")||sn_jQuery('script[src*="'+c+'"]').attr("src")||sn_jQuery('script[src*="'+l+'"]').attr("src")}catch(s){}return s}function T(){var s=f();return""!=s&&(s=s.split(t)[0]),s}function N(){var s=f();try{s=s.split(e)[1].split(n)[0],s+=n}catch(t){console.log(t),s=Shopify.shop}return s}function S(){var s=window.location.href;try{(s=s.split("?")[0]).indexOf("#")>-1&&(s=s.split("#")[0])}catch(s){console.log(s)}return s}function y(){for(var s=[],t=document.location.pathname.split("/"),e=0;e-1?n+="/*":n+="/"+s})),""!=n&&(t=(t=n).replace(/\/\//g,"/")),!(t.indexOf(s)>-1)}function h(s,t,e,n){t=isNaN(t=Math.abs(t))?2:t,e=null==e?".":e,n=null==n?",":n;var i=s<0?"-":"",o=String(parseInt(s=Math.abs(Number(s)||0).toFixed(t))),a=(a=o.length)>3?a%3:0;return i+(a?o.substr(0,a)+n:"")+o.substr(a).replace(/(\d{3})(?=\d)/g,"$1"+n)+(t?e+Math.abs(s-o).toFixed(t).slice(2):"")}function R(){return sn_jQuery(window).width()<768}function P(){try{return window.location.href.indexOf(u+r)>-1||window.location.href.indexOf(d+r)>-1||window.location.href.indexOf(c+r)>-1||window.location.href.indexOf(l)>-1||Q()?"//"+N()+B():B()}catch(s){console.log(s)}return""}function v(s){return null!=s&&""!=s}function F(s){if(v(s)){s=s.split(" ");var t="";return s.forEach((function(s){t+=s.replace(/^\w/,(function(s){return s.toUpperCase()})),t+=" "})),t.replace(/^\s+|\s+$/gm,"")}return""}var M=0,b=[];function E(s){return s.toLowerCase().split("?")[0].split("#")[0].split("/products/")[1]}function L(s){var t="mps_visitor_info",e=j(t);if(null==e||""==e)sn_jQuery.ajax({url:"https://ipinfo.io",type:"GET",dataType:"json",success:function(e){e.country_code=e.country,x(t,JSON.stringify(e)),"function"==typeof s&&s(e)},error:function(){"function"==typeof s&&s(null)}});else{var n=!1;null!=(e=JSON.parse(e))&&""!=e&&void 0!==e.country_code&&(n=!0),n&&"function"==typeof s?s(e):"function"==typeof s&&s(null)}}var U=!0;function V(s,t,e){var n=new Date;n.setTime(n.getTime()+24*e*60*60*1e3);var i="expires="+n.toUTCString();document.cookie=s+"="+t+";"+i+";path=/"}function k(s){for(var t=s+"=",e=document.cookie.split(";"),n=0;n-1){s=!0;break}}catch(s){}return!!(window.location.href.indexOf(l)>-1||window.location.href.indexOf(r)>-1||s)}function B(){try{return window.Shopify.routes.root.replace(/\/$/,"")}catch(t){try{var s=(s=window.location.pathname.replace(/^\/|\/$/g,"")).split("/")[0].toLowerCase();if(-1==["","collections","pages","account","cart","products","blogs","search"].indexOf(s)&&(s.indexOf(Shopify.locale.toLowerCase())>-1||s.indexOf(Shopify.country.toLowerCase())>-1))return"/"+s}catch(s){}}return""}function Y(s){return["{{ "+s+" }}","{{ "+s+"}}","{{"+s+" }}","{{"+s+"}}"]}function W(s,t){const e=new RegExp(`\\|\\s*${t}\\s*\\s*:\\s*([^|}]*)`),n=s.match(e);var i="";return n&&(i=n[1].trim()),i}function z(s,t,e,n){if(!s)return"";if(e=parseInt(e),n=parseInt(n),s.length<=e+n)return s.replace(/./g,t);var i="",o="";return n>0?(i=s.slice(e,-n).replace(/./g,t),o=s.slice(-n)):i=s.slice(e).replace(/./g,t),s.slice(0,e)+i+o}function q(s){return Number.isNaN(Number(s))}!function(){const s=["/cart/add","/cart/update","/cart/change"];function t(t){try{const e=new URL(t,location.origin);return s.some((s=>e.pathname.endsWith(s)))}catch(s){return!1}}const e=window.fetch;window.fetch=async(...s)=>{const[n]=s,i=await e(...s);return t(n)&&window.dispatchEvent(new CustomEvent("cart-event-detected",{detail:{type:"fetch",url:n,response:i}})),i};const n=XMLHttpRequest.prototype.open;XMLHttpRequest.prototype.open=function(s,t,...e){return this._url=t,n.call(this,s,t,...e)};const i=XMLHttpRequest.prototype.send;XMLHttpRequest.prototype.send=function(...s){return this.addEventListener("load",(()=>{t(this._url)&&window.dispatchEvent(new CustomEvent("cart-event-detected",{detail:{type:"xhr",url:this._url,response:this.response}}))})),i.apply(this,s)}}(),s.exports={snVersion:t,snGetCSSScript:function(){if((s=T()).indexOf(u)>-1||s.indexOf(d)>-1)(n=document.createElement("link")).rel="preload",n.as="style",n.onload=function(){this.rel="stylesheet"},n.href=function(){var s,e=(""!=(s=f())&&(s=s.split(t)[0]),s);return e.indexOf(u)>-1||e.indexOf(d)>-1?e+a:e.indexOf(c)>-1||e.indexOf(l)>-1?e+o:""}(),document.getElementsByTagName("head")[0].appendChild(n);else if(s.indexOf(c)>-1||s.indexOf(l)>-1)for(var s=T()+o.replace("min/app.min.css",""),e=["css/common.css","css/sn-notifications.css","css/sn-cart-notifications.css"],n=null,r=0;r-1||s.indexOf("/checkouts/")>-1},snGetCurrentURLWithoutQueryString:S,snNoImageURL:"https://cdn.shopify.com/s/files/1/1980/3607/files/no-image_50x.jpg?8318599161665921371",snMobileWidth:768,snIsMobile:R,snSetProductImage:function(s,t){return void 0===t?s:s.replace(/.jpg([^.jpg]*)$/,"_"+t+".jpg$1").replace(/.jpeg([^.jpeg]*)$/,"_"+t+".jpeg$1").replace(/.png([^.png]*)$/,"_"+t+".png$1").replace(/.gif([^.gif]*)$/,"_"+t+".gif$1").replace(/.svg([^.svg]*)$/,"_"+t+".svg$1").replace(/.JPG([^.JPG]*)$/,"_"+t+".JPG$1").replace(/.JPEG([^.JPEG]*)$/,"_"+t+".JPEG$1").replace(/.PNG([^.PNG]*)$/,"_"+t+".PNG$1").replace(/.GIF([^.GIF]*)$/,"_"+t+".GIF$1").replace(/.SVG([^.SVG]*)$/,"_"+t+".SVG$1")},snRemoveDefaultChar:function(s){try{s=s.replace(" - Default Name","").replace(" - Default Title","").replace(" - Default","").replace(" - null","")}catch(s){console.log(s)}return s},sn_TESTING_PREVIEW_CODE:O,sn_MOBILE:0,sn_DESKTOP:1,sn_MOBILE_TEXT:"Mobile/Tablet",sn_DESKTOP_TEXT:"Desktop",sn_TRACKING_URL:g,snAnalyticForNotification:function(s,t){try{if(-1==sn_jQuery("#admin_bar_iframe").index()&&-1==sn_jQuery("#admin-bar-iframe").index()&&-1==window.location.href.indexOf(O)){var e=t.split("/")[t.split("/").length-1];e=e.split("?")[0];var n=Math.round(+new Date/1e3),i=1;R()&&(i=0);var o="?method=sn-analytics&handle="+e+"&shop="+N()+"&sid="+s+"&device="+i+"&t="+n;sn_jQuery.get(T()+g+o)}}catch(s){console.log(s)}},snTrackGA:function(s,t,e){try{window.ga&&ga.loaded&&ga("send","event","ToastiBar - Sales Popup App",s,t,e)}catch(s){console.log(s)}},snErrorHandling:function(s,t){try{""==k(s)&&(V(s,"1",1),sn_jQuery.post(T()+"/errors/report",{tkn:"91ca07f2c4f29c694830e289ff677695137a162b",url:window.location.href,reason:t}))}catch(s){console.log(s)}},snIsNotNullOrBlank:v,snCapitalizeFirstChar:F,snCOMMON_CLASS_CSS:"sn-common",snDEFAULT_CLASS_CSS:"sn-style-big",snSTYLE_CUSTOM:"3",snBACKGROUND_COLOR:1,snBACKGROUND_IMG:2,snSalesNotificationLocalStorage:"mps_sales_notification_ids",snProductTimerLocalStorage:"mps_product_timer_id_",snUpdateProductTimerLocalStorage:"mps_update_product_timer_id_",snTopBottomTimerLocalStorage:"mps_topbottom_timer_id_",snUpdateTopBottomTimerLocalStorage:"mps_update_topbottom_timer_id_",snLandingTimerLocalStorage:"mps_landing_timer_id_",snUpdateLandingTimerLocalStorage:"mps_update_landing_timer_id_",snCartTimerLocalStorage:"mps_cart_timer_id_",snUpdateCartTimerLocalStorage:"mps_update_cart_timer_id_",snTopBottomTimerDismissedLocalStorage:"mps_topbottom_close_timer_id_",snProductTimerDismissedLocalStorage:"mps_product_close_timer_id_",snLandingTimerDismissedLocalStorage:"mps_landing_close_timer_id_",snCartTimerDismissedLocalStorage:"mps_cart_close_timer_id_",snProductTimerAddToCartButtonName:'shopify-accelerated-checkout:visible,button[name="add"]:visible',snCartTimerAddToCartDrawerName:"cart-drawer-items,.cart-drawer",snCartTimerDeleteLocalStorage:"mps_cart_items_removed_",snSetLocalStorage:x,snGetLocalStorage:j,snRemoveLocalStorage:function(s){"undefined"!=typeof Storage?localStorage.removeItem(s):D(s)},snSetCookie:V,snGetCookie:k,snRemoveCookie:D,sn_notification_closed:"_mps_sn_notification_closed",snSetSessionStorage:function(s,t){"undefined"!=typeof Storage?sessionStorage.setItem(s,t):V(s,t,1)},snGetSessionStorage:function(s){return"undefined"!=typeof Storage?sessionStorage.getItem(s):k(s)},snRemoveSessionStorage:function(s){"undefined"!=typeof Storage?sessionStorage.removeItem(s):D(s)},snUTM_SOURCE_TAG:"utm_source",snUTM_MEDIUM_TAG:"utm_medium",snUTM_CAMPAIGN_TAG:"utm_campaign",bmMoneyFormat:function(s,t){if(null==t){try{t=theme.strings.moneyFormat}catch(s){console.log(s)}if(null==t)try{t=theme.moneyFormat}catch(s){console.log(s)}}var e=s,n=/\{\{\s*(\w+)\s*\}\}/;switch(t.match(n)[1]){case"amount":e=h(s);break;case"amount_no_decimals":e=h(s,0);break;case"amount_with_comma_separator":e=h(s,2,",",".");break;case"amount_no_decimals_with_comma_separator":e=h(s,0,",",".")}return t.replace(n,e)},snConst_Seconds:1,snConst_Minutes:2,snConst_Hours:3,snConst_Days:4,snGetDelayBetweenNotification:function(s){return s.settings.randomize_delay?Math.floor(Math.random()*(parseFloat(s.settings.display_time)+15-parseFloat(s.settings.display_time)+1))+parseFloat(s.settings.display_time):s.settings.delay_between_notification},SALES_NOTIFICATION:1,CART_NOTIFICATION:2,ONLINE_VISITORS_NOTIFICATION:3,RECENT_VISITORS_NOTIFICATION:4,FLAGURL:"/images/full-cache/flags/##FLAG_NAME##.avif",PRODUCT_VISITORS_NOTIFICATION:5,PRODUCT_REVIEWS_NOTIFICATION:6,ORDER_SUMMARY_NOTIFICATION:7,LOW_INVENTORY_NOTIFICATION:8,CART_SUMMARY_NOTIFICATION:9,sn_GENERATE_SALE_URL:"/v1/generate-sales",cn_GET_CART_NOTIFICATION:"/v1/get-cart-notification",ol_GET_VISITORS_NOTIFICATION:"/v1/tr",ol_GET_PRODUCT_VISITORS_NOTIFICATION:"/v1/tr-p",ol_GET_PRODUCT_REVIEWS_NOTIFICATION:"/v1/tr-pr",ol_GET_ORDER_SUMMARY_NOTIFICATION:"/v1/tr-os",ol_GET_LOW_INVENTORY_NOTIFICATION:"/v1/tr-li",ol_GET_CART_SUMMARY_NOTIFICATION:"/v1/tr-cs",ol_GET_TIMER_NOTIFICATION:"/v1/tr-ct",snCheckFeatureAccess:G,SALES_NOTIFICATION_APP:1,UNLIMITED_ORDERS:2,UNLIMITED_NOTIFICATIONS:3,CART_NOTIFICATION_APP:4,ONLINE_VISITORS_NOTIFICATION_APP:9,RECENT_VISITORS_NOTIFICATION_APP:10,PRODUCT_VISITORS_NOTIFICATION_APP:12,PRODUCT_REVIEWS_NOTIFICATION_APP:13,COUNTDOWN_TIMERS_APP:19,COUNTDOWN_TIMERS_SCHEDULE_LATER:20,COUNTDOWN_TIMERS_PRODUCT_PAGE:21,COUNTDOWN_TIMERS_TOP_BOTTOM_BAR:22,COUNTDOWN_TIMERS_LANDING_PAGE:23,COUNTDOWN_TIMERS_CART_PAGE:24,MULTIPLE_PRODUCT_PAGE_TIMERS:25,ORDER_SUMMARY_NOTIFICATION_APP:14,LOW_INVENTORY_NOTIFICATION_APP:15,CART_SUMMARY_NOTIFICATION_APP:16,ALL_NOTIFICATION_APPS:17,DISPLAY_SAME_PRODUCT_ON_PRODUCT_PAGE:8,PRIORITY_SUPPORT:5,ANALYTICS:6,ANALYTICS_NEW:11,ADDITIONAL_NOTIFICATION_DESIGNS:7,snDefaultRights:[1,2,3],snSalesNotificationArrayLS:"mps_sales_notification_list",snSalesNotificationCountLS:"mps_sales_notification_count",cartTimerLocalStorage:"mps_cart_Timers_ids",landingTimerLocalStorage:"mps_landing_Timers_ids",BASIC_STYLES:[1,2,3,4,5,6,7],FESTIVAL_STYLES:[14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44],isHomePage:function(){return!(y().length>0)},isProductPages:function(){return-1!=y().indexOf("products")},isCollectionPages:function(){return-1!=y().indexOf("collections")},isCartPage:function(){return-1!=y().indexOf("cart")},isPasswordPage:function(){return-1!=y().indexOf("password")},snAnalytic:function(s,t,e,n){try{if(-1==sn_jQuery("#admin_bar_iframe").index()&&-1==sn_jQuery("#admin-bar-iframe").index()){var i=t.split("/")[t.split("/").length-1];i=i.split("?")[0];var o=Math.round(+new Date/1e3),a=1;R()&&(a=0);var r={method:"sn-analytics"};r.handle=i,r.shop=N(),r.sid=s,r.device=a,r.title=n,r.img=e,sn_jQuery.post(T()+g+"?t="+o,r)}}catch(s){}},POSITION_TOP:"1",POSITION_BOTTOM:"2",MIN_BOTTOM_POSITION_DESKTOP:35,MIN_BOTTOM_POSITION_MOBILE:25,snGetProduct:function(s){var t=new sn_jQuery.Deferred;return sn_jQuery.ajax({url:(Q()?P():B())+"/products/"+s+".js",type:"GET",dataType:"json",complete:function(s,e){return"success"==e?t.resolve(s):t.resolve(!1)}}),t.promise()},getProductHandleFromURL:function(){var s=y();return-1==s.indexOf("products")?"":decodeURI(s[s.indexOf("products")+1])},getCollectionHandleFromURL:function(){var s=y();return-1==s.indexOf("collections")?"":decodeURI(s[s.indexOf("collections")+1])},getResult:function(s){var t=new sn_jQuery.Deferred;return sn_jQuery.ajax({url:s,type:"GET",dataType:"json",success:function(s){t.resolve(s)},error:function(){t.resolve(!1)}}),t.promise()},postResult:function(s,t){var e=new sn_jQuery.Deferred;return sn_jQuery.ajax({url:s,type:"POST",dataType:"json",data:t,success:function(s){e.resolve(s)},error:function(){e.resolve(!1)}}),e.promise()},sn_TRACK_SESSION:"_mps_sn_s",sn_TRACK_PRODUCT_SESSION:"_mps_sn_s_p",snOnlineVisitorUniqueKey:"_online_visitors",snRecentVisitorUniqueKey:"_recent_visitors",snProductVisitorUniqueKey:"_product_visitors",snProductReviewsUniqueKey:"_product_reviews",snOrderSummaryUniqueKey:"_order_summary",snLowInventoryUniqueKey:"_low_inventory",snCartSummaryUniqueKey:"_cart_summary",getImageFromItem:function(s,t,e){var n="";if(void 0===e&&(e=0),e&&t.sn_variant_id&&""!=t.sn_variant_id&&s.id==t.sn_product_id)try{s.variants.forEach((function(s){t.sn_variant_id==s.id&&s.featured_image&&s.featured_image.src&&""!=s.featured_image.src&&""==n&&(n=s.featured_image.src)})),""==n&&(n=t.sn_img??"")}catch(s){}return""==n&&(n=function(s){return null!=s.featured_image&&""!=s.featured_image?s.featured_image:s.images.length>0?s.images[0]:""}(s)),n},snWidgetImpressionCount:function(s,t){try{G(MPS_NOTIFICATIONS.snAccessSettings,11)&&function(s,t,e,n){try{U&&(void 0===n&&(n=.5),clearTimeout(M),b.push(e),M=setTimeout((function(){var t=Math.round(+new Date/1e3),e=1;R()&&(e=0);var n="?method=impression_analytics&shop="+N()+"&sid="+s+"&device="+e+"&feature="+b.join(",")+"&t="+t;sn_jQuery.get(T()+"/v1/analytics"+n),b=[]}),1e3*n))}catch(s){console.log(s)}}(s,0,t)}catch(s){}},snWidgetClickCount:function(s,t,e,n,i){try{G(MPS_NOTIFICATIONS.snAccessSettings,11)&&function(s,t,e,n,i,o,a){try{void 0===a&&(a=.5),setTimeout((function(){L((function(t){var a={};t?(a.ip=t.ip,a.country=t.country_code,a.region=t.region,a.city=t.city,a.productHandle=E(n),a.productTitle=i,a.productIMG=o):(a.productHandle=E(n),a.productTitle=i,a.productIMG=o);var r=Math.round(+new Date/1e3),_=1;R()&&(_=0),a.method="click_analytics",a.shop=N(),a.sid=s,a.device=_,a.feature=e,sn_jQuery.post(T()+"/v1/analytics?t="+r,a)}))}),1e3*a)}catch(s){console.log(s)}}(s,0,t,e,n,i,0)}catch(s){}},IsCustomerInWebsite:function(s){U=s},getGeoDetails:L,snIsValidWidgetForURL:function(s,t){var e=!0;try{if(s.length>0)for(var n=new URL(window.location.href),i=0;i-1&&!(e=C(o.pathname,n.pathname)))break}}}catch(n){e=function(s,t){var e=!0;if(s.length>0){var n=A(S().toLowerCase().replace("https://","").replace("http://","")),i=A(decodeURI(S()).toLowerCase().replace("https://","").replace("http://",""));s.forEach((function(s){if(t==s.ebu_fm_id){var o=A(s.ebu_page_url.toLowerCase());o!=n&&o!=i||(e=!1)}}))}return e}(s,t)}return e},getTemplate:function(s,t,e,n){if(void 0===s.geo_details||null==s.geo_details)return n;var i="";try{void 0!==window.MPS_LOCALE?i=window.MPS_LOCALE:"undefined"!=typeof Shopify&&void 0!==Shopify.locale?i=Shopify.locale:document.querySelector("html").hasAttribute("lang")&&(i=document.querySelector("html").getAttribute("lang"))}catch(s){}for(var o=0;o-1)return!0}catch(s){}return!1},containsVariable:function(s,t){return new RegExp(`{{\\s*${t}\\s*(\\|[^}]+)?\\s*}}`,"g").test(s)},TIME_MANAGEMENT:{SECONDS:1,MINUTES:2,HOURS:3,DAYS:4},FILTERS:{getFilterTemplate:W,maskVariable:z,getReplacedVariable:function(s,t,e){const n=`{{\\s*${t}\\s*(?:\\s*\\|\\s*[^{}]+\\s*)?\\s*}}`,i=new RegExp(n).exec(e);if(null!=i){q(u=s[t])&&(u=F(u));var o=/<(a|mark)[^>]*>(.*?)<\/\1>/i,a=!1,r="";o.test(u)&&(r=u.match(o))&&r[2]&&(u=r[2],a=!0);for(var _=0;_-1){var l=W(i[_],"mask"),c=""!=typeof l?l.split(","):"";u=z(u,c[0]?c[0].trim():"*",c[1]?c[1].trim():"0",c[2]?c[2].trim():"0")}if(q(u)&&(i[_].toLowerCase().indexOf("upcase")>-1||i[_].toLowerCase().indexOf("uppercase")>-1)&&(u=u.toUpperCase()),q(u)&&(i[_].toLowerCase().indexOf("downcase")>-1||i[_].toLowerCase().indexOf("lowercase")>-1)&&(u=u.toLowerCase()),i[_].toLowerCase().indexOf("truncate")>-1){var d=W(i[_],"truncate");""==d&&(d=30),u.length>parseInt(d)&&(u=u.substr(0,parseInt(d))+"...")}if(i[_].toLowerCase().indexOf("fallback")>-1&&""==u&&(u=W(i[_],"fallback")),a){var u=r[0].replace(/<(a|mark)([^>]*)>(.*?)<\/\1>/i,((s,t,e,n)=>`<${t}${e}>${u}`));e=e.replace(new RegExp(n),u.toString().replace(/[.*+?^${}()|[\]\\]/g,"\\$&"))}else e=e.replace(new RegExp(n),u.toString().replace(/[.*+?^${}()|[\]\\]/g,"\\$&"))}}try{e=e.replace(/\\/g,"")}catch(s){}return e}},snGetQueryParams:function(){const s={};return window.location.search.substring(1).split("&").forEach((t=>{const[e,n]=t.split("=");e&&(s[decodeURIComponent(e)]=decodeURIComponent(n))})),s},insertLinkTagForTimerCSS:function(){const s=document.createElement("link");s.rel="stylesheet",s.type="text/css",s.href=T()+"/v1/css/sn-timer.css?t="+Date.now(),document.head.appendChild(s)},TIMER_TYPE:{PRODUCT_PAGE:"1",TOP_BOTTOM_BAR:"2",LANDING_PAGE:"3",CART_PAGE:"4"},SELECT_VISIBILITY_TYPE:{ALL_PRODUCTS:"1",SPECIFIC_PRODUCTS:"2",ALL_PRODUCTS_IN_SPECIFIC_COLLECTIONS:"3",CUSTOM_POSITION:"4",SHOW_EVERYWHERE:"5",SHOW_ONLY_ON_HOMEPAGE:"6",SHOW_ON_ALL_PRODUCT_PAGES:"7",SHOW_ON_SPECIFIC_PRODUCTS:"8",SHOW_ON_PRODUCTS_IN_SPECIFIC_CATEGORIES:"9",SHOW_ON_ALL_CATEGORY_PAGES:"10",SHOW_ON_SPECIFIC_CATEGORIES:"11",PASSWORD_PAGE:"12",AT_TOP_OF_CART:"13",ALL_COLLECTION_PAGE:"14"},SPECIFIC_TIMER_TYPE:{SPECIFIC_DATE:"1",FIXED_MINUTES:"2"},TIMER_STARTS:{RIGHT_NOW:"1",SCHEDULE_LATER:"2"},ACTION_TYPE:{DISABLE_ACTION:"1",SHOW_BUTTON:"2",CLICKABLE_FULL_BAR:"3"},ELEMENT_POSITION:{TOP:"1",BOTTOM:"2"},ACTION_AFTER_TIMER_ENDS:{HIDE_TIMER_FOR_THE_BUYER:"1",RESET_TIMER:"2",DISPLAY_A_MESSAGE:"3",REPEAT_THE_COUNTDOWN:"4",DELETE_ALL_THE_ITEMS_IN_THE_CART:"5"},snIsSNDisabled:function(){return"false"==sn_jQuery('meta[name="mps-sales-notification:active"]').attr("content")||"false"==sn_jQuery('meta[name="mps-sale-notification:active"]').attr("content")}}},889:s=>{var t=null,e=null;window.MPS_NOTIFICATIONS.snIsFoundAtleastOneLowInventoryFN=function(){var s=!1;return null!=window.MPS_NOTIFICATIONS.snLowInventoryNotifications&&(s=!0),s},window.MPS_NOTIFICATIONS.snAssignLowInventoryNotification=function(s){var n,i=t.settings.low_inventory_display_template;n=e.snIsMobile()?0==t.settings.product_image_size_mobile?e.snSetProductImage(s.sn_img,t.settings.product_image_customized_size_mobile+"x"):t.settings.product_image_size_mobile>1?e.snSetProductImage(s.sn_img,t.settings.product_image_size_ext_mobile):e.snSetProductImage(s.sn_img):0==t.settings.product_image_size?e.snSetProductImage(s.sn_img,t.settings.product_image_customized_size+"x"):t.settings.product_image_size>1?e.snSetProductImage(s.sn_img,t.settings.product_image_size_ext):e.snSetProductImage(s.sn_img),sn_jQuery("#mps-sales-notification .sn-img a").css("background-image","url('"+n+"')"),sn_jQuery("#mps-sales-notification .sn-img a").removeAttr("href"),function(){var n=""==t.settings.low_inventory_variables_color?"":" style='color: "+t.settings.low_inventory_variables_color+"'",o={product_title:""+s.sn_title+"",current_inventory_value:""+s.sn_inventory_count+""};for(var a in o)i=e.FILTERS.getReplacedVariable(o,a,i)}(),sn_jQuery("#mps-sales-notification .sn-info").html("
"+i+"
"),t.settings.low_inventory_is_rtl?sn_jQuery("#mps-sales-notification").addClass("mps-low-inventory-notification tb-rtl"):sn_jQuery("#mps-sales-notification").addClass("mps-low-inventory-notification")},s.exports=function(s,n,i){var o=new sn_jQuery.Deferred,a=!1;return n.snIsMobile()?s.settings.low_inventory_mobile_enabled&&(a=!0):s.settings.low_inventory_desktop_enabled&&(a=!0),i&&n.isProductPages()&&a&&n.snCheckFeatureAccess(MPS_NOTIFICATIONS.snAccessSettings,n.LOW_INVENTORY_NOTIFICATION_APP)&&s.settings.is_low_inventory_notification_enabled?(t=s,e=n,function(s){e.postResult(e.snGlobalAPIURL()+e.ol_GET_LOW_INVENTORY_NOTIFICATION,{sid:t.settings.sid,sn:e.snGetShopifyShopURL(),m:"sn-get-li",ph:decodeURI(e.getProductHandleFromURL())}).done((function(n){var i;n.isSuccess?((i=n)&&i.totalInventory>0&&i.totalInventory<=t.settings.low_inventory_quantity_threshold&&(window.MPS_NOTIFICATIONS.snLowInventoryNotifications=[],window.MPS_NOTIFICATIONS.snLowInventoryNotifications.push({sn_type:e.LOW_INVENTORY_NOTIFICATION,sn_title:i.title,sn_handle:i.handle,sn_inventory_count:i.totalInventory,sn_unique:e.snGetShopifyShopURL()+e.snLowInventoryUniqueKey,sn_img:i.featuredImage&&null!=i.featuredImage.url?i.featuredImage.url:e.snNoImageURL()})),s.resolve(!0)):s.resolve(!1)}))}(o)):o.resolve(!1),o.promise()}},289:s=>{var t=null,e=null,n="";window.MPS_NOTIFICATIONS.snIsFoundAtleastOneOnlineVisitorFN=function(){var s=!1;return null!=window.MPS_NOTIFICATIONS.snOnlineVisitorsNotifications&&(s=!0),s},window.MPS_NOTIFICATIONS.snAssignOnlineVisitorNotification=function(s){var n=t.settings.online_visitors_display_template;sn_jQuery("#mps-sales-notification .sn-img a").css("background-image","url('"+e.snSetProductImage(s.sn_img)+"')"),sn_jQuery("#mps-sales-notification .sn-img a").removeAttr("href"),n=e.snReplaceUsingArray(n,s.sn_count,e.snVariablesUsingRegex("count")),sn_jQuery("#mps-sales-notification .sn-info").html("
"+n+"
"),t.settings.online_visitors_is_rtl?sn_jQuery("#mps-sales-notification").addClass("mps-online-visitors-notification tb-rtl"):sn_jQuery("#mps-sales-notification").addClass("mps-online-visitors-notification")},window.MPS_NOTIFICATIONS.snIsFoundAtleastOneRecentVisitorFN=function(){var s=!1;return null!=window.MPS_NOTIFICATIONS.snRecentVisitorsNotifications&&(s=!0),s},window.MPS_NOTIFICATIONS.snAssignRecentVisitorNotification=function(s){var n=t.settings.recent_visitors_display_template;sn_jQuery("#mps-sales-notification .sn-img a").css("background-image","url('"+e.snSetProductImage(s.sn_img)+"')"),sn_jQuery("#mps-sales-notification .sn-img a").removeAttr("href"),n=e.snReplaceUsingArray(n,s.sn_count,e.snVariablesUsingRegex("count")),sn_jQuery("#mps-sales-notification .sn-info").html("
"+n+"
"),t.settings.recent_visitors_is_rtl?sn_jQuery("#mps-sales-notification").addClass("mps-recent-visitors-notification tb-rtl"):sn_jQuery("#mps-sales-notification").addClass("mps-recent-visitors-notification")},s.exports=function(s,i,o){var a=new sn_jQuery.Deferred;return o&&(i.snCheckFeatureAccess(MPS_NOTIFICATIONS.snAccessSettings,i.ONLINE_VISITORS_NOTIFICATION_APP)&&s.settings.is_online_visitors_notification_enabled||i.snCheckFeatureAccess(MPS_NOTIFICATIONS.snAccessSettings,i.RECENT_VISITORS_NOTIFICATION_APP)&&s.settings.is_recent_visitors_notification_enabled)?(t=s,""==(e=i).snGetCookie(e.sn_TRACK_SESSION)&&e.postResult(e.snGlobalAPIURL()+e.ol_GET_VISITORS_NOTIFICATION,{sid:t.settings.sid,sn:e.snGetShopifyShopURL(),m:"sn-tr",si:e.snGetLocalStorage(e.sn_TRACK_SESSION)}).done((function(s){try{s&&""!=s.si&&(e.snSetCookie(e.sn_TRACK_SESSION,1,.00347222),e.snSetLocalStorage(e.sn_TRACK_SESSION,s.si))}catch(s){}})),function(s){e.postResult(e.snGlobalAPIURL()+e.ol_GET_VISITORS_NOTIFICATION,{sid:t.settings.sid,sn:e.snGetShopifyShopURL(),m:"sn-get-tr",si:e.snGetLocalStorage(e.sn_TRACK_SESSION),oe:t.settings.is_online_visitors_notification_enabled,re:t.settings.is_recent_visitors_notification_enabled}).done((function(i){i.isSuccess?(function(s){var i,o;if(n="",""!=(n=s.rODN).trim()&&setTimeout((function(){e.postResult(e.snGlobalAPIURL()+e.ol_GET_VISITORS_NOTIFICATION,{sid:t.settings.sid,sn:e.snGetShopifyShopURL(),m:"sn-del-tr",sis:n.trim()}).done((function(s){}))}),3e3),i=s.oVC,o=s.rVC,i>=t.settings.hide_if_visitors_less_than&&i>0){var a=!1;e.snIsMobile()?t.settings.online_mobile_enabled&&(a=!0):t.settings.online_desktop_enabled&&(a=!0),a&&(window.MPS_NOTIFICATIONS.snOnlineVisitorsNotifications=[],window.MPS_NOTIFICATIONS.snOnlineVisitorsNotifications.push({sn_type:e.ONLINE_VISITORS_NOTIFICATION,sn_count:i,sn_unique:e.snGetShopifyShopURL()+e.snOnlineVisitorUniqueKey,sn_img:e.snGlobalAPIURL()+e.snVersion+"img/no-cache/mps-v-a.svg?color="+t.settings.icon_color.replace("#","")}))}if(o>=t.settings.recent_hide_if_visitors_less_than&&o>0){var r=!1;e.snIsMobile()?t.settings.recent_mobile_enabled&&(r=!0):t.settings.recent_desktop_enabled&&(r=!0),r&&(window.MPS_NOTIFICATIONS.snRecentVisitorsNotifications=[],window.MPS_NOTIFICATIONS.snRecentVisitorsNotifications.push({sn_type:e.RECENT_VISITORS_NOTIFICATION,sn_count:o,sn_unique:e.snGetShopifyShopURL()+e.snRecentVisitorUniqueKey,sn_img:e.snGlobalAPIURL()+e.snVersion+"img/no-cache/mps-v-a.svg?color="+t.settings.recent_icon_color.replace("#","")}))}}(i),s.resolve(!0)):s.resolve(!1)}))}(a)):a.resolve(!1),a.promise()}},221:s=>{var t=null,e=null;window.MPS_NOTIFICATIONS.snIsFoundAtleastOneOrderSummaryFN=function(){var s=!1;return null!=window.MPS_NOTIFICATIONS.snOrderSummaryNotifications&&(s=!0),s},window.MPS_NOTIFICATIONS.snAssignOrderSummaryNotification=function(s){var n=t.settings.order_summary_display_template;sn_jQuery("#mps-sales-notification .sn-img a").css("background-image","url('"+e.snSetProductImage(s.sn_img)+"')"),sn_jQuery("#mps-sales-notification .sn-img a").removeAttr("href"),function(){var i=t.settings.order_summary_time_range,o="day";e.TIME_MANAGEMENT.SECONDS==t.settings.order_summary_time_range_select?o=""==t.settings.order_summary_seconds_prefered_keyword?"seconds":t.settings.order_summary_seconds_prefered_keyword:e.TIME_MANAGEMENT.MINUTES==t.settings.order_summary_time_range_select?o=""==t.settings.order_summary_minutes_prefered_keyword?"minutes":t.settings.order_summary_minutes_prefered_keyword:e.TIME_MANAGEMENT.HOURS==t.settings.order_summary_time_range_select?o=""==t.settings.order_summary_hours_prefered_keyword?"hours":t.settings.order_summary_hours_prefered_keyword:e.TIME_MANAGEMENT.DAYS==t.settings.order_summary_time_range_select&&(o=""==t.settings.order_summary_days_prefered_keyword?"days":t.settings.order_summary_days_prefered_keyword);var a={unit:i,duration:o},r=t.settings.order_summary_time_ago_template;for(var _ in a)r=e.snReplaceUsingArray(r,a[_],e.snVariablesUsingRegex(_));var l=""==t.settings.order_summary_variables_color?"":" style='color: "+t.settings.order_summary_variables_color+"'";for(var _ in a={visitor_count:""+s.sn_visitor_count+"",order_count:""+s.sn_count+"",time_ago:""+r+""})n=e.snReplaceUsingArray(n,a[_],e.snVariablesUsingRegex(_))}(),sn_jQuery("#mps-sales-notification .sn-info").html("
"+n+"
"),t.settings.order_summary_is_rtl?sn_jQuery("#mps-sales-notification").addClass("mps-order-summary-notification tb-rtl"):sn_jQuery("#mps-sales-notification").addClass("mps-order-summary-notification")},s.exports=function(s,n,i){var o=new sn_jQuery.Deferred,a=!1;return n.snIsMobile()?s.settings.order_summary_mobile_enabled&&(a=!0):s.settings.order_summary_desktop_enabled&&(a=!0),i&&a&&n.snCheckFeatureAccess(MPS_NOTIFICATIONS.snAccessSettings,n.ORDER_SUMMARY_NOTIFICATION_APP)&&s.settings.is_order_summary_notification_enabled?(t=s,e=n,function(s){e.postResult(e.snGlobalAPIURL()+e.ol_GET_ORDER_SUMMARY_NOTIFICATION,{sid:t.settings.sid,sn:e.snGetShopifyShopURL(),m:"sn-get-os",time_range:t.settings.order_summary_time_range,sec:t.settings.order_summary_time_range_in_seconds}).done((function(n){var i,o,a;n.isSuccess?(o=(i=n).oSC,a=i.oSVC,o>=t.settings.order_summary_cart_count&&o>0&&(window.MPS_NOTIFICATIONS.snOrderSummaryNotifications=[],window.MPS_NOTIFICATIONS.snOrderSummaryNotifications.push({sn_type:e.ORDER_SUMMARY_NOTIFICATION,sn_count:o,sn_visitor_count:a,sn_unique:e.snGetShopifyShopURL()+e.snOrderSummaryUniqueKey,sn_img:e.snGlobalAPIURL()+e.snVersion+"img/no-cache/mps-order-summary.svg?color="+t.settings.order_summary_icon_color.replace("#","")})),s.resolve(!0)):s.resolve(!1)}))}(o)):o.resolve(!1),o.promise()}},113:s=>{var t=null,e=null;window.MPS_NOTIFICATIONS.snIsFoundAtleastOneProductReviewsFN=function(){var s=!1;return null!=window.MPS_NOTIFICATIONS.snProductReviewsNotifications&&(s=!0),s},window.MPS_NOTIFICATIONS.snAssignProductReviewsNotification=function(s){var n=t.settings.product_reviews_display_template;function i(){sn_jQuery("#mps-sales-notification .sn-review-text").index()>-1?sn_jQuery("#mps-sales-notification .sn-review-text").html(s.rating_text):sn_jQuery(""+s.rating_text+"").insertAfter(sn_jQuery("#mps-sales-notification .sn-info"))}!function(){var i;i=e.snIsMobile()?0==t.settings.product_image_size_mobile?e.snSetProductImage(s.sn_img,t.settings.product_image_customized_size_mobile+"x"):t.settings.product_image_size_mobile>1?e.snSetProductImage(s.sn_img,t.settings.product_image_size_ext_mobile):e.snSetProductImage(s.sn_img):0==t.settings.product_image_size?e.snSetProductImage(s.sn_img,t.settings.product_image_customized_size+"x"):t.settings.product_image_size>1?e.snSetProductImage(s.sn_img,t.settings.product_image_size_ext):e.snSetProductImage(s.sn_img),sn_jQuery("#mps-sales-notification .sn-img a").css("background-image","url('"+i+"')");var o=e.snGetProductDomainURL();e.containsVariable(n,"product_with_link")&&!e.isFromAdmin()&&e.snIsNotNullOrBlank(s.sn_handle)&&s.sn_handle!=s.sn_unique?(sn_jQuery("#mps-sales-notification .sn-img a").attr("href",o+"/products/"+s.sn_handle+window.MPS_NOTIFICATIONS.snGetUTMParams()),sn_jQuery("#mps-sales-notification .sn-img a").removeAttr("role")):sn_jQuery("#mps-sales-notification .sn-img a").removeAttr("href"),e.snIsNotNullOrBlank(o)&&!e.isFromAdmin()&&e.snIsNotNullOrBlank(s.sn_handle)&&sn_jQuery("#mps-sales-notification .sn-img a").attr("target","_blank")}(),function(){var t={first_name:s.first_name,location:s.location,review_count:s.rating};for(var i in t)n=e.FILTERS.getReplacedVariable(t,i,n)}(),function(){var t=e.snGetProductDomainURL(),i="";e.snIsNotNullOrBlank(t)&&(i=" target='_blank'");var o={product_with_link:e.isFromAdmin()?""+s.sn_title+"":""+s.sn_title+"",product:""+s.sn_title+""};for(var a in o)n=e.FILTERS.getReplacedVariable(o,a,n)}(),sn_jQuery("#mps-sales-notification .sn-info").html("
"+n+"
"),function(){for(var e="",n=1;n<=5;n++)n<=s.rating?e+='':e+='';sn_jQuery("#mps-sales-notification .sn-info .sn-review-stars").index()>-1?sn_jQuery("#mps-sales-notification .sn-info .sn-info-wrapper .sn-review-stars").html(e):(sn_jQuery("#mps-sales-notification .sn-info .sn-info-wrapper").prepend(""+e+""),sn_jQuery("#mps-sales-notification .sn-review-stars").prop("style","--sn-review-color: "+t.settings.product_reviews_color))}(),t.settings.product_reviews_is_rtl?sn_jQuery("#mps-sales-notification").addClass("mps-product-reviews-notification tb-rtl"):sn_jQuery("#mps-sales-notification").addClass("mps-product-reviews-notification"),t.settings.product_reviews_show_written&&(t.settings.product_reviews_show_on_hover?i():(sn_jQuery("#mps-sales-notification.mps-product-reviews-notification .sn-img").css("height",sn_jQuery("#mps-sales-notification.mps-product-reviews-notification .sn-img").height()),i(),sn_jQuery("#mps-sales-notification .sn-review-text").addClass("sn-review-display")))},s.exports=function(s,n,i){var o=new sn_jQuery.Deferred,a=!1;return n.snIsMobile()?s.settings.product_reviews_mobile_enabled&&(a=!0):s.settings.product_reviews_desktop_enabled&&(a=!0),i&&a&&n.snCheckFeatureAccess(MPS_NOTIFICATIONS.snAccessSettings,n.PRODUCT_REVIEWS_NOTIFICATION_APP)&&s.settings.is_product_reviews_notification_enabled?(t=s,e=n,function(){if(t.settings.product_reviews_show_written&&t.settings.product_reviews_show_on_hover)var s=setInterval((function(){try{document.querySelector("#mps-sales-notification.mps-product-reviews-notification")&&(clearInterval(s),document.querySelector("#mps-sales-notification.mps-product-reviews-notification").addEventListener("mouseover",(s=>{sn_jQuery("#mps-sales-notification.mps-product-reviews-notification .sn-img").css("height",sn_jQuery("#mps-sales-notification.mps-product-reviews-notification .sn-img").height()),sn_jQuery("#mps-sales-notification.mps-product-reviews-notification").addClass("sn-hover")}),!1),document.querySelector("#mps-sales-notification.mps-product-reviews-notification").addEventListener("mouseleave",(s=>{sn_jQuery("#mps-sales-notification.mps-product-reviews-notification .sn-img").removeAttr("style"),sn_jQuery("#mps-sales-notification.mps-product-reviews-notification").removeClass("sn-hover")}),!1))}catch(s){}}),500)}(),function(s){e.postResult(e.snGlobalAPIURL()+e.ol_GET_PRODUCT_REVIEWS_NOTIFICATION,{sid:t.settings.sid,sn:e.snGetShopifyShopURL(),m:"sn-get-pr"}).done((function(n){n.isSuccess?(function(s){window.MPS_NOTIFICATIONS.snProductReviewsNotifications=[];for(var n=0;n{var t=null,e=null,n="";function i(s){try{return s.replace(/[^a-z0-9]/g,"_")}catch(s){}return s}function o(s,n){void 0===n&&(n=e.snGlobalAPIURL()+e.snVersion+"img/no-cache/mps-v-a.svg?color="+t.settings.product_icon_color.replace("#","")),window.MPS_NOTIFICATIONS.snProductVisitorsNotifications.push({sn_type:e.PRODUCT_VISITORS_NOTIFICATION,sn_count:s,sn_unique:e.snGetShopifyShopURL()+e.snProductVisitorUniqueKey,sn_img:n})}window.MPS_NOTIFICATIONS.snIsFoundAtleastOneProductVisitorFN=function(){var s=!1;return null!=window.MPS_NOTIFICATIONS.snProductVisitorsNotifications&&(s=!0),s},window.MPS_NOTIFICATIONS.snAssignProductVisitorNotification=function(s){var n,i=t.settings.product_visitors_display_template;n=e.snIsMobile()?0==t.settings.product_image_size_mobile?e.snSetProductImage(s.sn_img,t.settings.product_image_customized_size_mobile+"x"):t.settings.product_image_size_mobile>1?e.snSetProductImage(s.sn_img,t.settings.product_image_size_ext_mobile):e.snSetProductImage(s.sn_img):0==t.settings.product_image_size?e.snSetProductImage(s.sn_img,t.settings.product_image_customized_size+"x"):t.settings.product_image_size>1?e.snSetProductImage(s.sn_img,t.settings.product_image_size_ext):e.snSetProductImage(s.sn_img),sn_jQuery("#mps-sales-notification .sn-img a").css("background-image","url('"+n+"')"),sn_jQuery("#mps-sales-notification .sn-img a").removeAttr("href"),i=e.snReplaceUsingArray(i,s.sn_count,e.snVariablesUsingRegex("count")),sn_jQuery("#mps-sales-notification .sn-info").html("
"+i+"
"),t.settings.product_visitors_is_rtl?sn_jQuery("#mps-sales-notification").addClass("mps-product-visitors-notification tb-rtl"):sn_jQuery("#mps-sales-notification").addClass("mps-product-visitors-notification")},s.exports=function(s,a,r){var _=new sn_jQuery.Deferred,l=!1;if(a.snIsMobile()?s.settings.product_mobile_enabled&&(l=!0):s.settings.product_desktop_enabled&&(l=!0),r&&a.isProductPages()&&l&&a.snCheckFeatureAccess(MPS_NOTIFICATIONS.snAccessSettings,a.PRODUCT_VISITORS_NOTIFICATION_APP)&&s.settings.is_product_visitors_notification_enabled){var c=a.getProductHandleFromURL();c&&""!=c&&(t=s,e=a,function(){var s=e.snGetLocalStorage(e.snSalesNotificationLocalStorage);if("undefined"!=s&&e.snIsNotNullOrBlank(s)){for(var t=s.split(","),n=t.length,i=0;i-1&&i>-1){t.splice(i,1);break}s=t.join(),e.snSetLocalStorage(e.snSalesNotificationLocalStorage,s)}}(),t.pH=c,""==e.snGetCookie(e.sn_TRACK_PRODUCT_SESSION+"_"+i(t.pH))&&e.postResult(e.snGlobalAPIURL()+e.ol_GET_PRODUCT_VISITORS_NOTIFICATION,{sid:t.settings.sid,sn:e.snGetShopifyShopURL(),ph:t.pH,m:"sn-tr",si:e.snGetCookie(e.sn_TRACK_PRODUCT_SESSION+"_"+i(t.pH))}).done((function(s){try{s&&""!=s.si&&e.snSetCookie(e.sn_TRACK_PRODUCT_SESSION+"_"+i(t.pH),s.si,.00347222)}catch(s){}})),function(s){e.postResult(e.snGlobalAPIURL()+e.ol_GET_PRODUCT_VISITORS_NOTIFICATION,{sid:t.settings.sid,sn:e.snGetShopifyShopURL(),ph:t.pH,m:"sn-get-tr",si:e.snGetCookie(e.sn_TRACK_PRODUCT_SESSION+"_"+i(t.pH)),pe:t.settings.is_product_visitors_notification_enabled}).done((function(i){i.isSuccess?(function(s){var i;if(n="",""!=(n=s.rODN).trim()&&setTimeout((function(){e.postResult(e.snGlobalAPIURL()+e.ol_GET_PRODUCT_VISITORS_NOTIFICATION,{sid:t.settings.sid,sn:e.snGetShopifyShopURL(),ph:t.pH,m:"sn-del-tr",sis:n.trim()}).done((function(s){}))}),3e3),(i=s.rVC)>=t.settings.product_hide_if_visitors_less_than&&i>0)if(window.MPS_NOTIFICATIONS.snProductVisitorsNotifications=[],t.settings.product_is_display_img)try{e.snGetProduct(e.getProductHandleFromURL()).done((function(s){if(s)if(void 0!==s.responseJSON&&s.responseJSON.status)o(i);else if(void 0!==s.responseText&&JSON.parse(s.responseText).status)o(i);else{var t=void 0!==s.responseJSON?s.responseJSON:JSON.parse(s.responseText);o(i,t.featured_image)}else o(i)}))}catch(s){o(i)}else o(i)}(i),s.resolve(!0)):s.resolve(!1)}))}(_))}else _.resolve(!1);return _.promise()}},881:(s,t,e)=>{var n=e(289),i=e(421),o=e(113),a=e(221),r=e(889),_=e(537);e(59);var l=null,c=null,d=!1,u="",I="",m="",p="",g=0,O=0,f=0,T=0,N=[],S=!1,y=1;function A(){sn_jQuery("#mps-sales-notification-style").remove(),sn_jQuery("#mps-tb-script").remove(),sn_jQuery("#mps-sales-notification").remove()}function w(s){var t=c.snGetLocalStorage(c.snSalesNotificationLocalStorage);return!("undefined"==t||!c.snIsNotNullOrBlank(t))&&(t=t.split(",")).indexOf(s.toString())>-1}function C(s){return h(window.MPS_NOTIFICATIONS.snPrepareThresholdDateTimeObj(s),l.settings.order_threshold,l.settings.order_threshold_select)}function h(s,t,e){try{var n=!1;return e==c.snConst_Seconds?parseInt(t)-1)?window.MPS_NOTIFICATIONS.snRepeatNotification():(s&&(t.sn_img=c.getImageFromItem(s,t,l.settings.is_display_variant_img),null!=s.title&&""!=s.title&&(t.sn_title=s.title)),t.sn_type==c.CART_NOTIFICATION?(window.MPS_NOTIFICATIONS.snAssignCartNotification(t),y=c.CART_NOTIFICATION):t.sn_type==c.ONLINE_VISITORS_NOTIFICATION?(window.MPS_NOTIFICATIONS.snAssignOnlineVisitorNotification(t),y=c.ONLINE_VISITORS_NOTIFICATION):t.sn_type==c.RECENT_VISITORS_NOTIFICATION?(window.MPS_NOTIFICATIONS.snAssignRecentVisitorNotification(t),y=c.RECENT_VISITORS_NOTIFICATION):t.sn_type==c.PRODUCT_VISITORS_NOTIFICATION?(window.MPS_NOTIFICATIONS.snAssignProductVisitorNotification(t),y=c.PRODUCT_VISITORS_NOTIFICATION):t.sn_type==c.PRODUCT_REVIEWS_NOTIFICATION?(window.MPS_NOTIFICATIONS.snAssignProductReviewsNotification(t),y=c.PRODUCT_REVIEWS_NOTIFICATION):t.sn_type==c.ORDER_SUMMARY_NOTIFICATION?(window.MPS_NOTIFICATIONS.snAssignOrderSummaryNotification(t),y=c.ORDER_SUMMARY_NOTIFICATION):t.sn_type==c.LOW_INVENTORY_NOTIFICATION?(window.MPS_NOTIFICATIONS.snAssignLowInventoryNotification(t),y=c.LOW_INVENTORY_NOTIFICATION):t.sn_type==c.CART_SUMMARY_NOTIFICATION?(window.MPS_NOTIFICATIONS.snAssignCartSummaryNotification(t),y=c.CART_SUMMARY_NOTIFICATION):(function(s){var t=l.settings.display_template;void 0!==s.sn_location_id&&c.snIsNotNullOrBlank(s.sn_location_id)&&c.snIsNotNullOrBlank(l.settings.display_pos_template)?t=l.settings.display_pos_template:(s.sn_location_id="",s.sn_location_name=""),function(){var e;e=c.snIsMobile()?0==l.settings.product_image_size_mobile&&s.sn_handle!=s.sn_unique?c.snSetProductImage(s.sn_img,l.settings.product_image_customized_size_mobile+"x"):l.settings.product_image_size_mobile>1&&s.sn_handle!=s.sn_unique?c.snSetProductImage(s.sn_img,l.settings.product_image_size_ext_mobile):s.sn_handle==s.sn_unique&&c.snIsNotNullOrBlank(l.settings.product_message_color)?c.snSetProductImage(s.sn_img+"?color="+l.settings.product_message_color.replace("#","")):c.snSetProductImage(s.sn_img):0==l.settings.product_image_size&&s.sn_handle!=s.sn_unique?c.snSetProductImage(s.sn_img,l.settings.product_image_customized_size+"x"):l.settings.product_image_size>1&&s.sn_handle!=s.sn_unique?c.snSetProductImage(s.sn_img,l.settings.product_image_size_ext):s.sn_handle==s.sn_unique&&c.snIsNotNullOrBlank(l.settings.product_message_color)?c.snSetProductImage(s.sn_img+"?color="+l.settings.product_message_color.replace("#","")):c.snSetProductImage(s.sn_img),sn_jQuery("#mps-sales-notification .sn-img a").css("background-image","url('"+e+"')");var n=c.snGetProductDomainURL();c.containsVariable(t,"product_with_link")&&!c.isFromAdmin()&&c.snIsNotNullOrBlank(s.sn_handle)&&s.sn_handle!=s.sn_unique?(sn_jQuery("#mps-sales-notification .sn-img a").attr("href",n+"/products/"+s.sn_handle+window.MPS_NOTIFICATIONS.snGetUTMParams()),sn_jQuery("#mps-sales-notification .sn-img a").removeAttr("role")):sn_jQuery("#mps-sales-notification .sn-img a").removeAttr("href"),c.snIsNotNullOrBlank(n)&&!c.isFromAdmin()&&c.snIsNotNullOrBlank(s.sn_handle)&&sn_jQuery("#mps-sales-notification .sn-img a").attr("target","_blank")}(),function(){var e={first_name:s.sn_first_name,city:s.sn_city,province:s.sn_state,country:s.sn_country,pos_location_name:s.sn_location_name};for(var n in e)t=c.FILTERS.getReplacedVariable(e,n,t)}(),function(){var e="";c.snIsNotNullOrBlank(s.sn_flag)&&(e="");var n={flag:e};for(var i in n)t=c.snReplaceUsingArray(t,c.snCapitalizeFirstChar(n[i]),c.snVariablesUsingRegex(i))}(),function(){var e=c.snGetProductDomainURL(),n="";c.snIsNotNullOrBlank(e)&&(n=" target='_blank'");var i;i=c.isFromAdmin()?""+s.sn_title+"":""+s.sn_title+"";var o=""+s.sn_title+"";s.sn_handle!=s.sn_unique&&""!=s.sn_handle||(t=t.replace(/product_with_link/g,"product"));var a={product_with_link:i,product:o};for(var r in a)t=c.FILTERS.getReplacedVariable(a,r,t)}(),function(){try{var e=window.MPS_NOTIFICATIONS.snPrepareThresholdDateTimeObj(s),n=0,i=c.snIsNotNullOrBlank(l.settings.time_ago_template)?l.settings.time_ago_template:"{{ unit }} {{ duration }} ago";if(h(e,l.settings.timeago_threshold,l.settings.timeago_threshold_select))return t=c.snReplaceUsingArray(t,"",c.snVariablesUsingRegex("time_ago")),!0;Math.floor(e.dtDiffSeconds)>0&&Math.floor(e.dtDiffSeconds)<60?(n=Math.floor(e.dtDiffSeconds),i=c.snReplaceUsingArray(i,n,c.snVariablesUsingRegex("unit")),i=Math.floor(e.dtDiffSeconds)<=1?c.snReplaceUsingArray(i,c.snIsNotNullOrBlank(u)?u:"second",c.snVariablesUsingRegex("duration")):c.snReplaceUsingArray(i,c.snIsNotNullOrBlank(u)?u:"seconds",c.snVariablesUsingRegex("duration"))):Math.floor(e.dtDiffMinutes)>0&&Math.floor(e.dtDiffMinutes)<60?(n=Math.floor(e.dtDiffMinutes),i=c.snReplaceUsingArray(i,n,c.snVariablesUsingRegex("unit")),i=Math.floor(e.dtDiffMinutes)<=1?c.snReplaceUsingArray(i,c.snIsNotNullOrBlank(I)?I:"minute",c.snVariablesUsingRegex("duration")):c.snReplaceUsingArray(i,c.snIsNotNullOrBlank(I)?I:"minutes",c.snVariablesUsingRegex("duration"))):Math.floor(e.dtDiffHours)>0&&Math.floor(e.dtDiffHours)<24?(n=Math.floor(e.dtDiffHours),i=c.snReplaceUsingArray(i,n,c.snVariablesUsingRegex("unit")),i=Math.floor(e.dtDiffHours)<=1?c.snReplaceUsingArray(i,c.snIsNotNullOrBlank(m)?m:"hour",c.snVariablesUsingRegex("duration")):c.snReplaceUsingArray(i,c.snIsNotNullOrBlank(m)?m:"hours",c.snVariablesUsingRegex("duration"))):Math.floor(e.dtDiffDays)>0&&(n=Math.floor(e.dtDiffDays),i=c.snReplaceUsingArray(i,n,c.snVariablesUsingRegex("unit")),i=Math.floor(e.dtDiffDays)<=1?c.snReplaceUsingArray(i,c.snIsNotNullOrBlank(p)?p:"day",c.snVariablesUsingRegex("duration")):c.snReplaceUsingArray(i,c.snIsNotNullOrBlank(p)?p:"days",c.snVariablesUsingRegex("duration"))),t=n>0?c.snReplaceUsingArray(t,''+i+"",c.snVariablesUsingRegex("time_ago")):c.snReplaceUsingArray(t,"",c.snVariablesUsingRegex("time_ago"))}catch(s){console.log(s),t=c.snReplaceUsingArray(t,"",c.snVariablesUsingRegex("time_ago"))}}(),t=c.snIsNotNullOrBlank(s.sn_discount)&&s.sn_discount>0?c.snReplaceUsingArray(t,'Saved '+c.bmMoneyFormat(s.sn_discount,l.settings.money_format)+" on this order",c.snVariablesUsingRegex("discount")):c.snReplaceUsingArray(t,"",c.snVariablesUsingRegex("discount")),sn_jQuery("#mps-sales-notification .sn-info").html("
"+t+"
"),l.settings.is_rtl&&sn_jQuery("#mps-sales-notification").addClass("tb-rtl")}(t),y=c.SALES_NOTIFICATION),window.MPS_NOTIFICATIONS.snShowNotification(),g++,window.MPS_NOTIFICATIONS.snNextNotificationFrom=c.CART_NOTIFICATION,window.MPS_NOTIFICATIONS.snNextProductCall()):window.MPS_NOTIFICATIONS.snRepeatNotification()}function v(){!function(){window.MPS_NOTIFICATIONS.snIsFoundAtleastOneValidOrder=!1,window.MPS_NOTIFICATIONS.snIsFoundAtleastOneValidCart=!1,window.MPS_NOTIFICATIONS.snIsFoundAtleastOneValidOnlineVisitor=!1,window.MPS_NOTIFICATIONS.snIsFoundAtleastOneValidRecentVisitor=!1,window.MPS_NOTIFICATIONS.snIsFoundAtleastOneValidProductVisitor=!1,window.MPS_NOTIFICATIONS.snIsFoundAtleastOneValidProductReviews=!1,window.MPS_NOTIFICATIONS.snIsFoundAtleastOneValidOrderSummary=!1,window.MPS_NOTIFICATIONS.snIsFoundAtleastOneValidLowInventory=!1,window.MPS_NOTIFICATIONS.snIsFoundAtleastOneValidCartSummary=!1;for(var s=0;s0?Math.floor(e/2):window.MPS_NOTIFICATIONS.snOnlineVisitorsNotifications.length),null!=window.MPS_NOTIFICATIONS.snSalesNotifications&&null!=window.MPS_NOTIFICATIONS.snRecentVisitorsNotifications&&(a=window.MPS_NOTIFICATIONS.snRecentVisitorsNotifications.slice(),t+=e>0?Math.floor(e/2):window.MPS_NOTIFICATIONS.snRecentVisitorsNotifications.length),null!=window.MPS_NOTIFICATIONS.snSalesNotifications&&null!=window.MPS_NOTIFICATIONS.snProductVisitorsNotifications&&(r=window.MPS_NOTIFICATIONS.snProductVisitorsNotifications.slice(),t+=window.MPS_NOTIFICATIONS.snProductVisitorsNotifications.length),null!=window.MPS_NOTIFICATIONS.snSalesNotifications&&null!=window.MPS_NOTIFICATIONS.snOrderSummaryNotifications&&(l=window.MPS_NOTIFICATIONS.snOrderSummaryNotifications.slice(),t+=e>0?Math.floor(e/2):window.MPS_NOTIFICATIONS.snOrderSummaryNotifications.length),null!=window.MPS_NOTIFICATIONS.snSalesNotifications&&null!=window.MPS_NOTIFICATIONS.snLowInventoryNotifications&&(d=window.MPS_NOTIFICATIONS.snLowInventoryNotifications.slice(),t+=e>0?Math.floor(e/2):window.MPS_NOTIFICATIONS.snLowInventoryNotifications.length),null!=window.MPS_NOTIFICATIONS.snSalesNotifications&&null!=window.MPS_NOTIFICATIONS.snCartSummaryNotifications&&(u=window.MPS_NOTIFICATIONS.snCartSummaryNotifications.slice(),t+=e>0?Math.floor(e/2):window.MPS_NOTIFICATIONS.snCartSummaryNotifications.length)}catch(s){}for(var p=0,g=0,O=!1,f=[],T=t;T>0&&(n.length>0&&(s.push(n.shift()),T--,p++),i.length>0&&(s.push(i.shift()),T--,p++),_.length>0&&(s.push(_.shift()),T--),(2==p||0==g&&0==n.length&&0==i.length)&&(p=0,g++,d.length>0&&(d[0].sn_unique=d[0].sn_unique+"_"+g,-1==f.indexOf(c.LOW_INVENTORY_NOTIFICATION)?(f.push(c.LOW_INVENTORY_NOTIFICATION),s.unshift(JSON.parse(JSON.stringify(d[0])))):s.push(JSON.parse(JSON.stringify(d[0]))),T--),o.length>0&&(o[0].sn_unique=o[0].sn_unique+"_"+g,s.push(JSON.parse(JSON.stringify(o[0]))),T--),a.length>0&&(a[0].sn_unique=a[0].sn_unique+"_"+g,s.push(JSON.parse(JSON.stringify(a[0]))),T--),r.length>0&&!O&&(O=!0,r[0].sn_unique=r[0].sn_unique+"_"+g,s.push(JSON.parse(JSON.stringify(r[0]))),T--),l.length>0&&(l[0].sn_unique=l[0].sn_unique+"_"+g,s.push(JSON.parse(JSON.stringify(l[0]))),T--),u.length>0&&(u[0].sn_unique=u[0].sn_unique+"_"+g,s.push(JSON.parse(JSON.stringify(u[0]))),T--)),0!=n.length||0!=i.length||0!=_););s.length>0&&(window.MPS_NOTIFICATIONS.snSalesNotifications=s),window.MPS_NOTIFICATIONS.snRepeatNotification()}()}),1e3*parseFloat(l.settings.initial_delay))}function F(s){if(M()||(s=[]),s){for(var t=0;tT&&(T++,setTimeout((function(){var s;s=T,sn_jQuery.ajax({method:"post",url:c.snGlobalAPIURL()+c.sn_GENERATE_SALE_URL,data:{sale_url:l.sales_url,shop:c.snGetShopifyShopURL(),t:s},success:function(s,t,e){b()},error:function(s,t,e){b()}})}),1e3*T))}})}function E(){var s=1;try{void 0!==l.settings.is_remove_verified_by&&(s=l.settings.is_remove_verified_by)}catch(s){}return s}window.MPS_NOTIFICATIONS.snIsFoundAtleastOneValidOrder=!1,window.MPS_NOTIFICATIONS.snIsFoundAtleastOneValidCart=!1,window.MPS_NOTIFICATIONS.snIsStopToDisplayCartNotification=!1,pageProducts=[],page404Products=[],window.MPS_NOTIFICATIONS.snProductsInCart=[],infiniteLoopTimer=0,infiniteLoopReachedNumber=0,isInfiniteLoopReachedVar=!1,window.MPS_NOTIFICATIONS.snShowNotification=function(){if(sn_jQuery("#mps-sales-notification .sn-info-wrapper").attr("role","alert"),sn_jQuery("#mps-sales-notification .sn-info-wrapper").attr("aria-atomic","true"),sn_jQuery("#mps-sales-notification .sn-info-wrapper").attr("aria-live","assertive"),sn_jQuery("#mps-sales-notification").addClass("sn-activated"),d&&c.snWidgetImpressionCount(l.settings.sid,y),c.snIsNotNullOrBlank(l.settings.sound_url))try{new Audio(c.snGlobalAPIURL()+"/sound/"+l.settings.sound_url).play().then((()=>{})).catch((s=>{}))}catch(s){}},window.MPS_NOTIFICATIONS.snGetUTMParams=function(){return l.settings.is_utm_params?"?"+c.snUTM_SOURCE_TAG+"="+l.settings.utm_source+"&"+c.snUTM_MEDIUM_TAG+"="+l.settings.utm_medium+"&"+c.snUTM_CAMPAIGN_TAG+"="+l.settings.utm_campaign:""},window.MPS_NOTIFICATIONS.snPrepareThresholdDateTimeObj=function(s){var t=new Date(s.sn_purchased_on),e=((new Date).getTime()-t.getTime())/1e3,n=e/60,i=n/60;return{dtDiffSeconds:e,dtDiffMinutes:n,dtDiffHours:i,dtDiffDays:i/24}},window.MPS_NOTIFICATIONS.snNextProductCall=function(){clearTimeout(O),clearTimeout(f),O=setTimeout((function(){sn_jQuery("#mps-sales-notification .sn-info-wrapper").removeAttr("role"),sn_jQuery("#mps-sales-notification .sn-info-wrapper").removeAttr("aria-atomic"),sn_jQuery("#mps-sales-notification .sn-info-wrapper").removeAttr("aria-live"),sn_jQuery("#mps-sales-notification").removeClass("sn-activated"),setTimeout((function(){sn_jQuery("#mps-sales-notification").removeClass("mps-cart-notification mps-online-visitors-notification mps-recent-visitors-notification mps-product-visitors-notification mps-product-reviews-notification mps-order-summary-notification mps-low-inventory-notification mps-cart-summary-notification"),sn_jQuery("#mps-sales-notification .sn-review-text").index()>-1&&(sn_jQuery("#mps-sales-notification .sn-img").removeAttr("style"),sn_jQuery("#mps-sales-notification .sn-review-text").remove())}),1e3),setTimeout((()=>{sn_jQuery("#mps-sales-notification").removeClass("tb-rtl")}),1001),f=setTimeout((function(){window.MPS_NOTIFICATIONS.snRepeatNotification()}),1e3*parseFloat(c.snGetDelayBetweenNotification(l)))}),1e3*parseFloat(l.settings.display_time))},window.MPS_NOTIFICATIONS.snRepeatNotification=function(){return!(g>=parseInt(l.settings.max_per_page)||-1==sn_jQuery("#mps-sales-notification").index())&&!!(window.MPS_NOTIFICATIONS.snIsFoundAtleastOneValidOrder||window.MPS_NOTIFICATIONS.snIsFoundAtleastOneValidCart||window.MPS_NOTIFICATIONS.snIsFoundAtleastOneValidOnlineVisitor||window.MPS_NOTIFICATIONS.snIsFoundAtleastOneValidRecentVisitor||window.MPS_NOTIFICATIONS.snIsFoundAtleastOneValidProductVisitor||window.MPS_NOTIFICATIONS.snIsFoundAtleastOneValidProductReviews||window.MPS_NOTIFICATIONS.snIsFoundAtleastOneValidOrderSummary||window.MPS_NOTIFICATIONS.snIsFoundAtleastOneValidLowInventory||window.MPS_NOTIFICATIONS.snIsFoundAtleastOneValidCartSummary)&&void function(){if(infiniteLoopReachedNumber>=parseInt(l.settings.max_per_page)||(infiniteLoopReachedNumber++,clearTimeout(infiniteLoopTimer),infiniteLoopTimer=setTimeout((function(){infiniteLoopReachedNumber=0}),1e3),0))return isInfiniteLoopReachedVar=!0,!1;var s,t,e=!0,n="";if(l.settings.randomly_display_products){for(var i=[],o=0;o0){s=n.sn_unique,"undefined"!=(t=c.snGetLocalStorage(c.snSalesNotificationLocalStorage))&&c.snIsNotNullOrBlank(t)?t+=","+s:t=s,c.snSetLocalStorage(c.snSalesNotificationLocalStorage,t);var a=!0;if(n.sn_type!=c.SALES_NOTIFICATION||R(n)||(a=!1),function(s){return!(!l.settings.is_duplicate_products_display&&s.sn_type!=c.CART_NOTIFICATION&&s.sn_type!=c.ONLINE_VISITORS_NOTIFICATION&&s.sn_type!=c.RECENT_VISITORS_NOTIFICATION&&s.sn_type!=c.PRODUCT_VISITORS_NOTIFICATION&&s.sn_type!=c.ORDER_SUMMARY_NOTIFICATION&&s.sn_type!=c.LOW_INVENTORY_NOTIFICATION&&s.sn_type!=c.CART_SUMMARY_NOTIFICATION)||-1==N.indexOf(s.sn_title+s.sn_variant)&&(N.push(s.sn_title+s.sn_variant),!0)}(n)&&a){var r=pageProducts.filter((function(s){return s.handle===n.sn_handle}))[0];if(r||n.sn_type==c.ONLINE_VISITORS_NOTIFICATION||n.sn_type==c.RECENT_VISITORS_NOTIFICATION||n.sn_type==c.PRODUCT_VISITORS_NOTIFICATION||n.sn_type==c.ORDER_SUMMARY_NOTIFICATION||n.sn_type==c.LOW_INVENTORY_NOTIFICATION||n.sn_type==c.CART_SUMMARY_NOTIFICATION)P(r,n);else if(page404Products.indexOf(n.sn_handle)>-1)window.MPS_NOTIFICATIONS.snRepeatNotification();else if(void 0!==n.sn_location_id&&c.snIsNotNullOrBlank(n.sn_location_id)&&c.snIsNotNullOrBlank(l.settings.display_pos_template)&&n.sn_handle==n.sn_unique){var _={available:!0,handle:n.sn_handle,id:n.sn_product_id,title:n.sn_title,variants:[{id:n.sn_variant_id,title:n.sn_variant}],featured_image:n.sn_img,images:[n.sn_img]};pageProducts.push(_),P(_,n)}else c.snGetProduct(n.sn_handle).done((function(s){var t=!0;if(s)if(void 0!==s.responseJSON&&s.responseJSON.status);else if(void 0!==s.responseText&&JSON.parse(s.responseText).status);else{t=!1;var e=void 0!==s.responseJSON?s.responseJSON:JSON.parse(s.responseText);e.tags&&e.tags.length>0&&function(s,t){if(!s||!s.trim())return!1;const e=s.split(",").map((s=>s.trim()));for(let s=0;ss.toLowerCase().normalize()===n)))return!0}return!1}(l.settings.exclude_by_tags,e.tags)&&(t=!0,page404Products.push(n.sn_handle)),t||(pageProducts.push(e),P(e,n))}else page404Products.push(n.sn_handle);t&&window.MPS_NOTIFICATIONS.snRepeatNotification()}))}else window.MPS_NOTIFICATIONS.snRepeatNotification()}else console.log("ToastiBar - Sales Popup App: Oops! we are facing issues when displaying Sales Notifications. Please contact support for more help.")}()},window.MPS_NOTIFICATIONS.SNRefreshSalesNotifications=function(){if(_(l,c,d).done((function(s){r(l,c,d).done((function(s){a(l,c,d).done((function(s){o(l,c,d).done((function(s){i(l,c,d).done((function(s){n(l,c,d).done((function(s){if(d){A();var t=function(){var s=0;if(!E())try{c.snIsMobile()&&void 0!==l.settings.ppm_position_mobile&&c.POSITION_BOTTOM==l.settings.ppm_position_mobile?(s=c.MIN_BOTTOM_POSITION_MOBILE-l.settings.top_bottom_mobile,S=!0):void 0!==l.settings.ppm_position&&c.POSITION_BOTTOM==l.settings.ppm_position&&(s=c.MIN_BOTTOM_POSITION_DESKTOP-l.settings.top_bottom,S=!0)}catch(s){}return s}();c.snIsMobile()&&t>0?l.settings.top_bottom_mobile+=t:t>0&&(l.settings.top_bottom+=t),a="",a+="#mps-sales-notification.sn-common { ",a+="opacity: 0;",c.snIsMobile()?l.settings.z_index_mobile>0&&(a+="z-index: "+l.settings.z_index_mobile+";"):l.settings.z_index>0&&(a+="z-index: "+l.settings.z_index+";"),a+="} ",l.settings.is_background_color_or_img==c.snBACKGROUND_COLOR&&c.snIsNotNullOrBlank(l.settings.background_color)&&(a+="#mps-sales-notification.sn-common."+l.settings.style_class+" { ",a+="background-color: "+l.settings.background_color+";",a+="} "),(c.snIsNotNullOrBlank(l.settings.product_message_color)||l.settings.product_message_bold)&&(a+="#mps-sales-notification.sn-common."+l.settings.style_class+" { ",c.snIsNotNullOrBlank(l.settings.product_message_color)&&(a+="color: "+l.settings.product_message_color+";"),l.settings.product_message_bold&&(a+="font-weight: bold;"),a+="} ",c.snIsNotNullOrBlank(l.settings.product_message_color)&&(a+="#mps-sales-notification.sn-common."+l.settings.style_class+" a.sn-close-noty svg { ",a+="stroke: "+l.settings.product_message_color+";",a+="} ")),(c.snIsNotNullOrBlank(l.settings.product_title_color)||l.settings.product_title_bold)&&(a+="#mps-sales-notification.sn-common."+l.settings.style_class+" a { ",c.snIsNotNullOrBlank(l.settings.product_title_color)&&(a+="color: "+l.settings.product_title_color+";"),l.settings.product_title_bold?a+="font-weight: bold;":l.settings.product_message_bold&&(a+="font-weight: normal;"),a+="} "),(c.snIsNotNullOrBlank(l.settings.product_message_color)||l.settings.product_message_bold)&&(a+="#mps-sales-notification.sn-common."+l.settings.style_class+" p { ",c.snIsNotNullOrBlank(l.settings.product_message_color)&&(a+="color: "+l.settings.product_message_color+";"),l.settings.product_message_bold&&(a+="font-weight: bold;"),a+="} "),(c.snIsNotNullOrBlank(l.settings.product_timeago_color)||l.settings.product_timeago_bold)&&(a+="#mps-sales-notification.sn-common."+l.settings.style_class+" small { ",c.snIsNotNullOrBlank(l.settings.product_timeago_color)&&(a+="color: "+l.settings.product_timeago_color+";"),l.settings.product_timeago_bold&&(a+="font-weight: bold;"),a+="} "),c.snIsMobile()?3==(o=l.settings.class_mobile.split("-")).length&&(a+="@media screen and (max-width: 768px) { ","sn-fade-in-out"==l.settings.animation_class_mobile?(a+="#mps-sales-notification.sn-common."+l.settings.class_mobile+" { ",a+=o[1]+": "+l.settings.top_bottom_mobile+"px;",a+="left: 0;",a+="right: 0;",a+="} "):("sn-bottom-to-top"==l.settings.animation_class_mobile||"sn-top-to-bottom"==l.settings.animation_class_mobile)&&(a+="#mps-sales-notification.sn-common."+l.settings.class_mobile+" { ",a+="left: 0;",a+="right: 0;",a+="} "),a+="#mps-sales-notification.sn-common."+l.settings.class_mobile+".sn-activated { ",a+=o[1]+": "+l.settings.top_bottom_mobile+"px;",a+="left: 0;",a+="right: 0;",a+="} ",a+="} ",S&&(a+="@media screen and (max-width: 467px) { ","sn-fade-in-out"==l.settings.animation_class_mobile&&(a+="#mps-sales-notification.sn-common."+l.settings.class_mobile+"."+l.settings.animation_class_mobile+" { ",a+=o[1]+": "+l.settings.top_bottom_mobile+"px;",a+="} "),a+="#mps-sales-notification.sn-common."+l.settings.class_mobile+"."+l.settings.animation_class_mobile+".sn-activated { ",a+=o[1]+": "+l.settings.top_bottom_mobile+"px;",a+="} ",a+="} ")):3==(o=l.settings.class.split("-")).length&&(a+="@media screen and (min-width: 467px) { ","sn-fade-in-out"==l.settings.animation_class?(a+="#mps-sales-notification.sn-common."+l.settings.class+" { ",a+=o[1]+": "+l.settings.top_bottom+"px;",a+=o[2]+": "+l.settings.left_right+"px;",a+="} "):"sn-left-to-right"==l.settings.animation_class||"sn-right-to-left"==l.settings.animation_class?(a+="#mps-sales-notification.sn-common."+l.settings.class+" { ",a+=o[1]+": "+l.settings.top_bottom+"px;",a+="} "):("sn-bottom-to-top"==l.settings.animation_class||"sn-top-to-bottom"==l.settings.animation_class)&&(a+="#mps-sales-notification.sn-common."+l.settings.class+" { ",a+=o[2]+": "+l.settings.left_right+"px;",a+="} "),a+="#mps-sales-notification.sn-common."+l.settings.class+".sn-activated { ",a+=o[1]+": "+l.settings.top_bottom+"px;",a+=o[2]+": "+l.settings.left_right+"px;",a+="} ",a+="} ",S&&(a+="@media screen and (max-width: 467px) { ","sn-fade-in-out"==l.settings.animation_class&&(a+="#mps-sales-notification.sn-common."+l.settings.class+"."+l.settings.animation_class+" { ",a+=o[1]+": "+l.settings.top_bottom+"px;",a+="} "),a+="#mps-sales-notification.sn-common."+l.settings.class+"."+l.settings.animation_class+".sn-activated { ",a+=o[1]+": "+l.settings.top_bottom+"px;",a+="} ",a+="} ")),c.snIsNotNullOrBlank(l.settings.custom_css)&&(a+=l.settings.custom_css.replace(/##BREAKLINE##/g,"")),""!=a&&(a="",sn_jQuery("body").append(a)),function(){if(void 0!==l.settings.custom_js){var s="";c.snIsNotNullOrBlank(l.settings.custom_js)&&(s+=l.settings.custom_js.replace(/##BREAKLINE##/g,"")),""!=s&&(s="