1!function(){const t={cfg:{dataAttrAppUrl:"data-chekly-url",dataAttrCheckout:"chekly-procceded",dataAttrDynamicCheckout:"chekly-procceded-dynamic",dataAttrCustomDomain:"data-checkout-domain",dataAttrCheckoutTheme:"data-chekly-theme",defaultAppBaseUrl:"https://chekly-app.com",domainPath:"checkout"},vars:{checkoutDomain:null,isCheckoutProcessing:!1,_touchScrolled:!1,_touchStartY:0,_touchStartX:0},cartApi:{clearCart:()=>fetch("/cart/clear.js",{method:"POST",credentials:"same-origin"}),addToCart:t=>fetch("/cart/add.js",{method:"POST",credentials:"same-origin",body:"FORM"===t.nodeName?new FormData(t):t})},helpers:{debounce(t,e){let o=!1;return function(){o||(o=!0,setTimeout(()=>{t.apply(this,arguments),o=!1},e))}},throttleTrailing(t,e){let o=0,n=null;return function(){const r=e-(Date.now()-o);r>0?n||(n=setTimeout(()=>{n=null,o=Date.now(),t()},r)):(n&&(clearTimeout(n),n=null),o=Date.now(),t())}},isChild(t,e){let o=e.parentNode;for(;o;){if(o===t)return!0;o=o.parentNode}return!1},isAddToCartControl(t){if(!t.matches('[name="add"]')&&!t.querySelector('[name="add"]'))return!1;const e=t.closest('form[action^="/cart/add"]');return!!e&&!e.matches('[data-skip-cart="true"]')&&!e.querySelector('input[name="return_to"][value*="checkout"]')},isCartNavigationClick(t){if(!t||"function"!=typeof t.closest)return!1;const e=t.closest("a[href]");if(!e)return!1;let o;try{o=new URL(e.href,window.location.origin).pathname}catch(t){return!1}return/(^|\/)cart\/?$/.test(o)},addWrapperListener(e,o,n,r){e.addEventListener&&window.addEventListener(o,o=>{if(o.target===e||t.helpers.isChild(e,o.target)){if("function"==typeof r&&!r(o))return;o.stopImmediatePropagation(),o.preventDefault(),n()}},!0)},getCookie(t){const e=document.cookie.match(RegExp("(?:^|; )"+t.replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g,"\\$1")+"=([^;]*)"));return e?decodeURIComponent(e[1]):void 0},setCookie(t,e){const o=new Date(Date.now()+18e5).toUTCString();document.cookie=`${t}=${e}; expires=${o}; path=/;`},setCookieWithExpire(t,e,o){const n=new Date(Date.now()+864e5*o).toUTCString();document.cookie=`${t}=${e}; expires=${n}; path=/;`},getGoogleAnalyticsLinkerParam(){try{let e="";const o=t.helpers.getGoogleAnalyticsLinkerParam;if("string"==typeof o.__CACHE)return e=o.__CACHE,e;try{const t=new URLSearchParams(window.location.search).get("_gl");if(t)return e="_gl="+t,o.__CACHE=e,e}catch{}try{if("undefined"!=typeof gtag&&Array.isArray(window.dataLayer)){const t=window.dataLayer.find(t=>Array.isArray(t)&&"config"===t[0]&&"string"==typeof t[1]&&t[1].startsWith("G-"));if(t){const e=t[1];o.__PENDING||(o.__PENDING=!0,setTimeout(()=>{try{gtag("get",e,"linker_param",t=>{o.__PENDING=!1,t&&"string"==typeof t&&t.includes("_gl=")&&(o.__CACHE=t)})}catch{o.__PENDING=!1}},0))}}}catch{}return e}catch(t){return console.warn("Error getting GA linker param:",t),""}}},dom:{selectors:{checkoutForm:'form[action^="/cart"]:not([action^="/cart/"]), form[action="/checkout"], form[action="/a/checkout"]',checkoutButton:'[name="checkout"],[name="Checkout"],[class*="opcCheckout"],[class*="checkout-btn"],[class*="btn-checkout"],[class*="checkout-button"],[class*="button-checkout"],[class*="carthook_checkout"],[type*="submit"][class*="action_button"]:not([name*="add"]),[href*="/checkout"][class*="action_button"],[id*="checkout"],[id*="Checkout"],[id*="checkout-button"],[id*="checkout-btn"]',directCheckoutLink:'a[href^="/checkout"],[onclick*="/checkout"],a[href*="/checkout"]',addToCartForm:'form[action^="/cart/add"]',returnToField:'input[name="return_to"][value*="checkout"]',buyNowForm:'form[action^="/cart/add"][data-skip-cart="true"]',checkoutUpdateButton:'[type="submit"][name="update"]',dynamicPaymentButton:'[data-shopify="payment-button"] button,[data-shopify="payment-button"] .shopify-payment-button__button',dynamicPaymentButtonContainer:'[data-shopify="payment-button"]'},getCheckoutForms:()=>document.querySelectorAll(t.dom.selectors.checkoutForm),getCheckoutButtons:()=>document.querySelectorAll(t.dom.selectors.checkoutButton),getCheckoutLinks:()=>document.querySelectorAll(t.dom.selectors.directCheckoutLink),getBuyItNowForms(){const e=[...document.querySelectorAll(t.dom.selectors.buyNowForm)];return document.querySelectorAll(t.dom.selectors.returnToField).forEac
1h(t=>{const o=t.closest("form");o&&0>=e.filter(t=>o.isSameNode(t)).length&&e.push(o)}),e},getAddToCartForm:()=>document.querySelector(t.dom.selectors.addToCartForm),getDynamicPaymentButtons:()=>document.querySelectorAll(t.dom.selectors.dynamicPaymentButton),getUpdateCartButtons:()=>document.querySelectorAll(t.dom.selectors.checkoutUpdateButton),getDynamicPaymentButtonContainer:()=>document.querySelector(t.dom.selectors.dynamicPaymentButtonContainer)},functions:{getAppBaseUrl(){const e=document.querySelector("["+t.cfg.dataAttrAppUrl+"]"),o=e.getAttribute(t.cfg.dataAttrCustomDomain),n=e.getAttribute(t.cfg.dataAttrAppUrl),r=t.cfg.defaultAppBaseUrl;return o||n||r},getCheckoutTheme:()=>document.querySelector("["+t.cfg.dataAttrAppUrl+"]").getAttribute(t.cfg.dataAttrCheckoutTheme)||!1,getOriginUrl:()=>window.location.origin,getCartToken:()=>t.helpers.getCookie("cart"),getStoreName:()=>window.Shopify&&window.Shopify.shop?window.Shopify.shop:"",getStoreActieCurrency:()=>window.Shopify.currency.active,getStoreCountry:()=>window.Shopify.country,isUkrainianCustomer(){let t;try{t=window.Shopify&&window.Shopify.country}catch(t){}if(t)return"UA"===(t+"").toUpperCase();try{const t=window.Shopify&&window.Shopify.locale||"";if(/^uk(-|$)/i.test(t))return!0}catch(t){}try{if((navigator.languages&&navigator.languages.length?navigator.languages:[navigator.language||""]).some(t=>/^uk(-|$)/i.test(t)||/-UA$/i.test(t)))return!0}catch(t){}try{const t=Intl.DateTimeFormat().resolvedOptions().timeZone||"";if(/^Europe\/(Kyiv|Kiev|Uzhgorod|Zaporozhye)$/i.test(t))return!0}catch(t){}return!1},getCheckoutLang:()=>t.functions.isUkrainianCustomer()?"ua":"en",getStoreActiveCurrencyRate:()=>window.Shopify.currency.rate,getStoreRootRoute:()=>window.Shopify.routes.root,getUserName:()=>window.Shopify.customer?window.Shopify.customer.firstName:null,getUserLastName:()=>window.Shopify.customer?window.Shopify.customer.lastName:null,getUserEmail:()=>window.Shopify.customer?window.Shopify.customer.email:null,getUserPhone:()=>window.Shopify.customer?window.Shopify.customer.phone:null,submitBuyNowForm(e){const o=document.querySelector('form[action^="/cart/add"][data-product-form]'),n=e.closest('[data-shopify="payment-button"]'),r=(n?o:null)||e.closest("form")||o||t.dom.getAddToCartForm();let c=null;if(r){const t=r.querySelector('[name="id"]')||r.querySelector('[name="variant_id"]')||(r.id?document.querySelector(`[name="id"][form="${r.id}"]`):null)||(r.id?document.querySelector(`[name="variant_id"][form="${r.id}"]`):null);c=t&&t.value||null}if(!c&&o&&o!==r){const t=o.querySelector('[name="id"]')||o.querySelector('[name="variant_id"]')||(o.id?document.querySelector(`[name="id"][form="${o.id}"]`):null)||(o.id?document.querySelector(`[name="variant_id"][form="${o.id}"]`):null);t&&(c=t.value)}if(c||(c=new URLSearchParams(window.location.search).get("variant")||null),!c)try{const t=o||r,e=t?t.querySelector('[name="product-id"]'):null,n=e?e.value:null;document.querySelectorAll('script[type="application/json"]').forEach(t=>{if(c)return;const e=JSON.parse(t.textContent||"");e&&e.variants&&e.variants[0]&&e.variants[0].id&&(n&&e.id+""!==n||(c=e.variants[0].id+""))})}catch(t){}if(!c){const t=n&&n.querySelector("shopify-accelerated-checkout")||e.closest("shopify-accelerated-checkout");if(t)try{const e=JSON.parse(t.getAttribute("variant-params")||"[]");e.length&&(c=e[0].id+"")}catch(t){}}if(!r&&!c)return;const a=t.functions.getStoreCountry()||"GB",i=r?r.querySelector('[name="quantity"]'):null,u=i&&i.value||"1";t.functions.processCheckout(c?{variantId:c,customerCountryCode:a,quantity:u}:null)},processCheckout(e=null){if(t.vars.isCheckoutProcessing)return;t.vars.isCheckoutProcessing=!0;const o=t.functions.getAppBaseUrl(),n=t.functions.getCartToken(),r=t.functions.getOriginUrl().replace(/^https?:\/\//,""),c=t.functions.getStoreRootRoute(),a=t.functions.getStoreName(),i=t.functions.getStoreActiveCurrencyRate(),u=t.functions.getCheckoutTheme(),s=t.functions.getUserName()||null,d=t.functions.getUserLastName()||null,l=t.functions.getUserEmail()||null,m=t.functions.getUserPhone()||null,h=new URLSearchParams(window.location.search);let p={};try{p=JSON.parse(t.helpers.getCookie("chekly_tracking")||"{}")}catch(t){}const g=t=>h.get(t)||p[t]||"";console.log("Current URL params:",window.location.search),console.log("Saved tracking params:",p);const f=g("utm_campaign"),y=g("utm_medium"),k=g("utm_source"),C=g("utm_content"),w=g("utm_term"),_=g("utm_id");console.log("UTM params:",{utm_campaign:f,utm_medium:y,utm_source:k,utm_content:C,utm_term:w,utm_id:_}),f&&f.includes("__CAMPAIGN_NAME__")&&console.warn("TikTok macro __CAMPAIGN_NAME__ not expanded:",f),_&&_.includes("__CAMPAIGN_ID__")&&console.warn("TikTok macro __CAMPAIGN_ID__ not expanded:",_);const A=g("fbclid"),S=g("ttclid"),v=g("epik"),b=g("ScCid"),U=g("gclid"),I=g("wbraid"),N=g("gbraid"),L=g("click_id"),E=t.helpers.getCookie("_fbp"),P=t.helpers.getCookie("_fbc"),T=t.helpers.getCookie("_ttp"),R=t.helpers.getCookie("_shopify_sa_p"),D=(navigator.languages&&navigator.languages[0])?.slice(0,2)||navigator.language.slice(0,2),B=t.functions.getCheckoutLang(),q=[f?"utm_campaign="+encodeURIComponent(f):"",y?"utm_medium="+encodeURIComponent(y):"",k?"utm_source="+encodeURIComponent(k):"",C?"utm_content="+encodeURIComponent(C):"",w?"utm_term="+encodeURIComponent(w):"",_?"utm_id="+encodeURIComponent(_):"",A?"fbclid="+encodeURIComponent(A):"",S?"ttclid="+encodeURIComponent(S):"",v?"epik="+encodeURIComponent(v):"",b?"sccid="+encodeURIComponent(b):"",U?"gclid="+encodeURIComponent(U):"",I?"wbraid="+encodeURIComponent(I):"",N?"gbraid="+encodeURIComponent(N):"",L?"click_id="+encodeURIComponent(L):"",P?"_fbc="+encodeURIComponent(P):"",E?"_fbp="+encodeURIComponent(E):"",T?"ttp="+encodeURIComponent(T):"",D?"utm_lang="+D:"","lang="+B,R||""].filter(
1Boolean).join("&"),$=null!==e,F=$?t.helpers.getCookie("discount_code"):null,G=$?`variantID=${e.variantId}&customerCountryCode=${e.customerCountryCode}&variantQuantity=${e.quantity}${F?"&discountCode="+encodeURIComponent(F):""}`:"cartToken="+n;if(o&&r&&(n||$)){let e=`${o}/checkout/?storeName=${r}&${G}&curRate=${i}${u?"&theme="+u:""}&shopifyDomain=${a}${c.length>2?"&subFolder="+c.replace(/\//g,""):""}`;const n=[];null!==s&&n.push("user_name="+s),null!==d&&n.push("user_lastname="+d),null!==l&&n.push("user_email="+l),null!==m&&n.push("user_phone="+m),n.length&&(e+="&"+n.join("&"));const h=t.helpers.getGoogleAnalyticsLinkerParam();h?console.log("GA Linker param added:",h):console.warn("GA Linker param not found - cross-domain tracking may not work properly");let p=e;q&&(p+="&"+q),h&&(p+="&"+h),window.location=p}else window.location="/checkout"},addHandlers(){const e=t.dom.getCheckoutForms(),o=t.dom.getCheckoutLinks(),n=t.dom.getCheckoutButtons(),r=t.dom.getBuyItNowForms(),c=t.dom.getUpdateCartButtons();[...e].forEach(e=>{"true"!==e.getAttribute(t.cfg.dataAttrCheckout)&&(t.helpers.addWrapperListener(e,"submit",()=>{t.functions.processCheckout()}),e.setAttribute(t.cfg.dataAttrCheckout,"true"))}),[...o,...n].forEach(e=>{t.helpers.isAddToCartControl(e)||"true"!==e.getAttribute(t.cfg.dataAttrCheckout)&&(["mousedown","click"].forEach(o=>t.helpers.addWrapperListener(e,o,()=>{t.functions.processCheckout()},e=>!t.helpers.isCartNavigationClick(e.target))),e.setAttribute(t.cfg.dataAttrCheckout,"true"))}),[...r].forEach(e=>{"true"!==e.getAttribute(t.cfg.dataAttrCheckout)&&(t.helpers.addWrapperListener(e,"submit",()=>{t.functions.submitBuyNowForm(e)}),e.setAttribute(t.cfg.dataAttrCheckout,"true"))}),[...c].forEach(e=>{"true"!==e.getAttribute(t.cfg.dataAttrCheckout)&&(t.helpers.addWrapperListener(e,"click",()=>{e.closest("form").submit()}),e.setAttribute(t.cfg.dataAttrCheckout,"true"))})},addDynamicButtonHandlers(){[...t.dom.getDynamicPaymentButtons()].forEac
1h(e=>{"true"!==e.getAttribute(t.cfg.dataAttrDynamicCheckout)&&(window.addEventListener("touchend",o=>{if(o.target!==e&&!t.helpers.isChild(e,o.target))return;const n=o.changedTouches&&o.changedTouches[0],r=n?Math.abs(n.clientX-t.vars._touchStartX):0,c=n?Math.abs(n.clientY-t.vars._touchStartY):0;r>8||c>8||(o.stopImmediatePropagation(),o.preventDefault(),t.functions.submitBuyNowForm(e))},!0),t.helpers.addWrapperListener(e,"click",()=>{t.vars._touchScrolled||t.functions.submitBuyNowForm(e)}),e.setAttribute(t.cfg.dataAttrDynamicCheckout,"true"))})},ensureHandlersFor(e){if(!e||"function"!=typeof e.closest)return;const o=t.dom.selectors,n=t.cfg.dataAttrCheckout,r=e.closest("form");[[e.closest(o.checkoutButton),n],[e.closest(o.directCheckoutLink),n],[e.closest(o.checkoutUpdateButton),n],[e.closest(o.checkoutForm),n],[e.closest(o.buyNowForm),n],[r&&r.querySelector(o.returnToField)?r:null,n],[e.closest(o.dynamicPaymentButton),t.cfg.dataAttrDynamicCheckout]].some(([t,e])=>t&&"true"!==t.getAttribute(e))&&t.functions.reInit()},reInit(){t.functions.addDynamicButtonHandlers(),t.functions.addHandlers()},init(){const e=new URLSearchParams(window.location.search),o={};let n=!1;["utm_campaign","utm_medium","utm_source","utm_content","utm_term","utm_id","fbclid","ttclid","epik","ScCid","gclid","wbraid","gbraid","click_id"].forEach(t=>{const r=e.get(t);r&&(o[t]=r,n=!0)}),n&&t.helpers.setCookieWithExpire("chekly_tracking",JSON.stringify(o),7),t.functions.reInit();const r=t.helpers.throttleTrailing(()=>t.functions.reInit(),100);new MutationObserver(e=>{for(let o=0;o<e.length;o++){const n=e[o];if("attributes"!==n.type||n.attributeName!==t.cfg.dataAttrCheckout&&n.attributeName!==t.cfg.dataAttrDynamicCheckout)return void r()}}).observe(document,{attributes:!0,childList:!0,subtree:!0}),["pointerdown","mousedown","touchstart","keydown"].forEach(e=>window.addEventListener(e,o=>{"keydown"===e&&"Enter"!==o.key&&" "!==o.key&&"Spacebar"!==o.key||t.functions.ensureHandlersFor(o.target)},{capture:!0,passive:!0})),document.addEventListener("DOMContentLoaded",()=>{t.functions.reInit()}),window.addEventListener("load",()=>{t.functions.reInit()}),window.addEventListener("pageshow",()=>{t.vars.isCheckoutProcessing=!1,t.functions.reInit()}),window.addEventListener("focus",()=>{t.vars.isCheckoutProcessing&&(t.vars.isCheckoutProcessing=!1)}),window.addEventListener("popstate",()=>{t.vars.isCheckoutProcessing=!1}),document.addEventListener("visibilitychange",()=>{!document.hidden&&t.vars.isCheckoutProcessing&&(t.vars.isCheckoutProcessing=!1)}),window.addEventListener("touchstart",e=>{t.vars._touchScrolled=!1,t.vars._touchStartY=e.touches[0]?e.touches[0].clientY:0,t.vars._touchStartX=e.touches[0]?e.touches[0].clientX:0},{passive:!0}),window.addEventListener("touchmove",e=>{e.touches[0]&&Math.abs(e.touches[0].clientY-t.vars._touchStartY)>10&&(t.vars._touchScrolled=!0)},{passive:!0})}}};"undefined"!=typeof window&&(window.cheklyCheckoutManager=t),t.functions.init()}();
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.