/*! For license information please see widget.js.LICENSE.txt */ !function(){"use strict";var e,t={4087:function(e,t,n){n.d(t,{GJ:function(){return r},yi:function(){return o}});const o=()=>(e=>{const t={},n=document.createElement("a");n.href=e;const o=n.search.substring(1).split("&");for(let e=0;e{if(document.currentScript)return document.currentScript.getAttribute("src");const e=document.scripts||[],t=e[e.length-1];if(t)return t.getAttribute("src");throw new Error("[WDS] Failed to get current script source.")})()).shop,r=()=>{const e=[].slice.call(document.getElementsByClassName("step__sections"))[0],t=[].slice.call(e.children);let n=t.findIndex((e=>e.innerHTML.toLowerCase().includes("order details"))),o=t[n];if(o||(n=t.findIndex((e=>e.innerHTML.toLowerCase().includes(""))),o=t[n]),o||(o=t[t.length-1]),!o)return null;const r=[].slice.call(o.getElementsByClassName("content-box"));return{left_side:{order_confirmation:r[0],customer_info:r.slice(-1)[0]},right_side:{order_summary:document.getElementsByClassName("sidebar__content").item(0).parentElement}}}},6258:function(e,t,n){function o(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:window.location.search;var n;return t||(t=window.location.search),e&&t?decodeURIComponent(null==t?void 0:t.replace(new RegExp("^(?:.*[&\\?]"+(null===(n=encodeURIComponent(e))||void 0===n?void 0:n.replace(/[\.\+\*]/g,"\\$&"))+"(?:\\=([^&]*))?)?.*$","i"),"$1")):null}const r=(0,e.yi)(),i=()=>{o.e(504).then(o.bind(o,6560)).then((e=>{e.loadWidget(r)}))},c=()=>{const e=document.querySelector(`[action="${window.location.pathname}/authenticate"]`),t=(document.getElementById("email")||document.getElementById("phone"))&&document.getElementById("order_number")&&document.querySelector("[name=authenticity_token]");return e||t},u=()=>{var e,t,n,o,r,i;return(null===(t=null===(e=window.Shopify)||void 0===e?void 0:e.Checkout)||void 0===t?void 0:t.isOrderStatusPage)||"thank_you"==(null===(o=null===(n=window.Shopify)||void 0===n?void 0:n.Checkout)||void 0===o?void 0:o.page)||"thank_you"==(null===(i=null===(r=window.Shopify)||void 0===r?void 0:r.Checkout)||void 0===i?void 0:i.step)},a=()=>u()&&!c();document.addEventListener("DOMContentLoaded",(()=>{a()&&i()}));const s=new Proxy(new URLSearchParams(window.location.search),{get:(e,t)=>{if("string"==typeof t)return e.get(t)}});if(console.warn(`[Ark] - Widget Version ${function(){try{return"1.1.356"}catch(e){return"0.0.0"}}()}`),function(){try{const e=n("utm_source"),o=n("utm_medium"),r=n("utm_campaign"),i=n("utm_term"),c=n("utm_content");if(e||o||r||i||c){const n=function(){const e=t.Z.get("ark_cookie_utms")||localStorage.getItem("ark_cookie_utms");if(e)try{return JSON.parse(e)}catch(e){return{}}return{}}()||{};n.utm_source=e||n.utm_source,n.utm_medium=o||n.utm_medium,n.utm_campaign=r||n.utm_campaign,n.utm_term=i||n.utm_term,n.utm_content=c||n.utm_content,function(e){t.Z.set("ark_cookie_utms",JSON.stringify(e),{expires:365}),localStorage.setItem("ark_cookie_utms",JSON.stringify(e))}(n)}}catch(e){console.error(e)}}(),a())i();else if(u()&&c()&&s.shop_apps_upsell_page_id&&s.upsell_preview_auth_key){const e=window.location;localStorage.setItem("shop_apps_upsell_page_id",s.shop_apps_upsell_page_id),localStorage.setItem("shop_apps_upsell_order_email",s.order_email),localStorage.setItem("shop_apps_upsell_order_number",s.order_number),s.order_email&&s.order_number?(document.getElementById("email").value=s.order_email,document.getElementById("order_number").value=s.order_number,document.getElementById("email").form.submit()):window.location.href=`${e.origin}${e.pathname}/authenticate?key=${s.upsell_preview_auth_key}`}}()}();