(()=>{"use strict";var e,t,i,n,r,o={},a={};function l(e){var t=a[e];if(void 0!==t)return t.exports;var i=a[e]={exports:{}};return o[e].call(i.exports,i,i.exports,l),i.exports}l.m=o,e=[],l.O=(t,i,n,r)=>{if(!i){var o=1/0;for(c=0;c=r)&&Object.keys(l.O).every((e=>l.O[e](i[s])))?i.splice(s--,1):(a=!1,r0&&e[c-1][2]>r;c--)e[c]=e[c-1];e[c]=[i,n,r]},l.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return l.d(t,{a:t}),t},i=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,l.t=function(e,n){if(1&n&&(e=this(e)),8&n)return e;if("object"==typeof e&&e){if(4&n&&e.__esModule)return e;if(16&n&&"function"==typeof e.then)return e}var r=Object.create(null);l.r(r);var o={};t=t||[null,i({}),i([]),i(i)];for(var a=2&n&&e;"object"==typeof a&&!~t.indexOf(a);a=i(a))Object.getOwnPropertyNames(a).forEach((t=>o[t]=()=>e[t]));return o.default=()=>e,l.d(r,o),r},l.d=(e,t)=>{for(var i in t)l.o(t,i)&&!l.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},l.f={},l.e=e=>Promise.all(Object.keys(l.f).reduce(((t,i)=>(l.f[i](e,t),t)),[])),l.u=e=>e+"-"+{"src_smile-ui_app_containers_Launcher_Launcher_tsx":"5eb890966b11c5c2c18a","src_smile-ui_app_containers_Nudges_Nudges_tsx":"38db9fe75cbd520b5ec8","src_smile-ui_app_components_Panel_Cards_Shared_ReferralUrlShare_tsx-src_smile-ui_app_componen-05962e":"753b144dc14deede79e4","src_smile-ui_app_containers_Prompt_Prompt_tsx":"19f7a0e4cd1b4e8f13d0","src_smile-ui_app_containers_Panel_PanelView_tsx":"3799312786c4bdf33b0e","panel-container-styles":"e9b3533620fd53341b6d","panel-content-styles":"7b63dfa2c7aa1ee2461d",translations0:"cae1a7d0ca7087a8b1fb",translations1:"0410a3965d34f775416c",translations2:"3826d15ff8a26b322156",translations3:"4c74f83cb7909470a447",translations4:"001c5ec32dbb23a8da6e",translations5:"92f34d3e14f20a966844","launcher-container-styles":"736289401c022d0a5804","launcher-content-styles":"ae85c21eb3c285da146f","prompt-container-styles":"9d6d1caab44904a054e8","prompt-content-styles":"ea59adb0dc61ffa31ed1"}[e]+".modern.js",l.miniCssF=e=>e+"."+{"panel-container-styles":"1f2e6359f0714c827d9d","launcher-container-styles":"04dbf396d0741a0ff79f","prompt-container-styles":"650585dabd16fbf1f196"}[e]+".css",l.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),l.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n={},r="smile-ui:",l.l=(e,t,i,o)=>{if(n[e])n[e].push(t);else{var a,s;if(void 0!==i)for(var d=document.getElementsByTagName("script"),c=0;c{a.onerror=a.onload=null,clearTimeout(p);var r=n[e];if(delete n[e],a.parentNode&&a.parentNode.removeChild(a),r&&r.forEach((e=>e(i))),t)return t(i)},p=setTimeout(m.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=m.bind(null,a.onerror),a.onload=m.bind(null,a.onload),s&&document.head.appendChild(a)}},l.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},l.p="https://js.smile.io/v1/",(()=>{if("undefined"!=typeof document){var e={runtime:0};l.f.miniCss=(t,i)=>{e[t]?i.push(e[t]):0!==e[t]&&{"panel-container-styles":1,"launcher-container-styles":1,"prompt-container-styles":1}[t]&&i.push(e[t]=(e=>new Promise(((t,i)=>{var n=l.miniCssF(e),r=l.p+n;if(((e,t)=>{for(var i=document.getElementsByTagName("link"),n=0;n{var o=document.createElement("link");o.rel="stylesheet",o.type="text/css",l.nc&&(o.nonce=l.nc),o.onerror=o.onload=i=>{if(o.onerror=o.onload=null,"load"===i.type)n();else{var a=i&&i.type,l=i&&i.target&&i.target.href||t,s=new Error("Loading CSS chunk "+e+" failed.\n("+a+": "+l+")");s.name="ChunkLoadError",s.code="CSS_CHUNK_LOAD_FAILED",s.type=a,s.request=l,o.parentNode&&o.parentNode.removeChild(o),r(s)}},o.href=t,document.head.appendChild(o)})(e,r,0,t,i)})))(t).then((()=>{e[t]=0}),(i=>{throw delete e[t],i})))}}})(),(()=>{var e={runtime:0};l.f.j=(t,i)=>{var n=l.o(e,t)?e[t]:void 0;if(0!==n)if(n)i.push(n[2]);else if("runtime"!=t){var r=new Promise(((i,r)=>n=e[t]=[i,r]));i.push(n[2]=r);var o=l.p+l.u(t),a=new Error;l.l(o,(i=>{if(l.o(e,t)&&(0!==(n=e[t])&&(e[t]=void 0),n)){var r=i&&("load"===i.type?"missing":i.type),o=i&&i.target&&i.target.src;a.message="Loading chunk "+t+" failed.\n("+r+": "+o+")",a.name="ChunkLoadError",a.type=r,a.request=o,n[1](a)}}),"chunk-"+t,t)}else e[t]=0},l.O.j=t=>0===e[t];var t=(t,i)=>{var n,r,[o,a,s]=i,d=0;if(o.some((t=>0!==e[t]))){for(n in a)l.o(a,n)&&(l.m[n]=a[n]);if(s)var c=s(l)}for(t&&t(i);d{let e,t,i,n,r,o,a=(()=>{let e=navigator.userAgent;return e&&e.headers&&"string"==typeof e.headers["user-agent"]&&(e=e.headers["user-agent"]),"string"==typeof e&&(/(android|bb\d+|meego).+mobile|armv7l|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series[46]0|samsungbrowser|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(e)&&!/CrOS/.test(e))})(),l=()=>a?"mobile":"desktop",s={square:0,shaved:5,rounded:10,circular:30},d=()=>{let e=document.getElementById("smile-ui-lite-container");e.parentNode.removeChild(e)},c=()=>{window.SmileUI&&window.SmileUI.openPanel({data:{trigger:"launcher"}})},u=()=>{e&&(clearTimeout(e),e=null),r||(r=!0,["smile-shopify-fdfcd26d5443f6b6b2a1.modern.js","vendor-bc797a1ba90ab4198d29.modern.js"].map((e=>window.dispatchEvent(new CustomEvent("smile:load-async-script",{detail:e})))))},[m,p]=await Promise.all([window.__smile_ui_init_data__,window.__smile_ui_customer_data__]);if(!((e,t)=>{if(t&&"disabled"===t.customer.state)return!1;let i=window.location.pathname,n=e.launcher.is_visible,r=e.launcher.visibility_setting.includes(l()),o=e.launcher.hide_on_index_page&&"/"===i,a=e.launcher.hidden_url_paths.every((e=>-1===i.indexOf(e)));return n&&r&&!o&&a})(m,p))return u();if((e=>{if(!e||e.account.load_js_sdk_at_launch)return!0;let i=new URLSearchParams(window.location.search);return!!(i.get("smile_deep_link")||i.get("st_intent")||window.location.hash.includes("smile-"))||(!!document.querySelector("[data-smile-deep-link]")||(document.getElementsByClassName("sweettooth-points-balance").length>0||(t=(n=e.nudges,r=window.location.pathname,n?n.filter((function(e){return r.indexOf(e.url_path)>-1})):[]).length>0)));var n,r})(m)){if(!t)return void u();e=setTimeout(u,5e3)}else(()=>{let e=document.createElement("link").relList,t=!!(e&&e.supports&&e.supports("prefetch"));function i(e){let i=document.createElement("link");i.href="https://js.smile.io/v1/"+e,i.setAttribute("crossorigin",""),t?i.rel="prefetch":(i.rel="preload",i.as="script"),document.querySelector("head").appendChild(i)}i("smile-shopify-fdfcd26d5443f6b6b2a1.modern.js"),i("vendor-bc797a1ba90ab4198d29.modern.js")})();window.addEventListener("hashchange",(e=>{new URL(e.newURL).hash.startsWith("#smile-")&&(u(),o?d():n=!0)})),(e=>{let{display_setting:t,launcher:r}=e,m=`smile_ui_${l()}_`,p=`border:0;outline:0;position:fixed;height:60px;z-index:0;overflow:hidden;box-shadow:0 0 25px 0 rgb(0 0 0 / 5%);${t[`${m}position`]}:${t[`${m}side_margin`]};bottom:${t[`${m}bottom_margin`]};border-radius:${s[r.border_radius_style]}px !important;`,f=document.createRange().createContextualFragment('
');f.getElementById("smile-ui-lite-launcher-frame-container").style.cssText=p,document.body.appendChild(f),(e=>{let{launcher:t,account:r}=e,l=a&&"text"===t.mobile_layout||!a&&t.layout.includes("text"),m=a&&"text"!==t.mobile_layout||!a&&("image"===t.layout||"text_and_icon"===t.layout),p=a&&r.uses_improved_mobile_launcher?"smile-improved-mobile-launcher":"",f=a&&r.uses_improved_mobile_launcher?t.mobile_text:t.text,h=m&&!l&&!(a&&r.uses_improved_mobile_launcher),b="".replace("",``),g=e.display_setting&&e.display_setting.customer_locale;g&&b.replace('lang="en-US"',`lang="${g}"`);let _=document.getElementById("smile-lite-launcher-frame");_.addEventListener("load",(()=>{let e=_.contentDocument.querySelector("button"),t=document.getElementById("smile-ui-lite-launcher-frame-container");t.style.width=`${e.offsetWidth}px`,p&&t.classList.add(p),e.addEventListener("click",(()=>{u(),o?(c(),d()):(i=!0,n=!0)}),{once:!0})})),_.srcdoc=b})(e),document.addEventListener("smile-ui-loaded",(()=>{new MutationObserver((function(e,t){e.find((e=>e.addedNodes&&Array.from(e.addedNodes).find((e=>e.childNodes&&Array.from(e.childNodes).find((e=>"smile-ui-container"===e.id))))))&&(o=!0,i&&c(),n&&d(),t.disconnect())})).observe(document.body,{attributes:!1,childList:!0,subtree:!0})}))})(m)})();