(()=>{var u=Object.defineProperty,t=(t,e,i)=>(i=i,(e="symbol"!=typeof e?e+"":e)in(t=t)?u(t,e,{i:!0,o:!0,writable:!0,value:i}):t[e]=i),f={u:["h-address"],l:["h-street"],m:["h-country"],h:["h-city"],p:["h-state"],g:["h-zip-code"]},i=(t=>(t.TRACKING_URL="https://119689.t.hyros.com/v1/lst",t.FRONTEND_URL="https://app.hyros.com",t.LEAD_GEN_URL="https://lg.hyr.so/v1/lst",t.ORIGIN="SHOPIFY",t.PRODUCT_HASH="08972e4df56dc3a93fd6f6ff2916429cc1dcc9d2910f12bb2f86f5f430f43719",t.CUSTOM_TAG="\!tracking",t.SESSION_ID="",t.PREVIOUS_OVERRIDE="",t.REFERER_OVERRIDE="",t.CALL_TRACKING_POOL_HASH="",t.FINGERPRINT_SCRIPT="",t.DEVICE_FINGERPRINT="dvfp",t))({}),n=(t=>(t.PRODUCT_ID=119689,t))({}),a=(t=>(t.SPA_ENABLED=false,t.IGNORE_PREVIOUS_URL=false,t.EMBED_SCRIPTS_ON_IFRAME=false,t.CALL_TRACKING_ENABLED=false,t.FINGERPRINT_ENABLED=false,t.FETCH_KEEP_ALIVE_ENABLED=false,t.SHOPIFY_POST_PURCHASE_ENABLED=false,t.NO_SWAP_NUMBERS_ENABLED=false,t.DELETE_TRACKING_PARAMS_ENABLED=false,t.FB_EVENT_ID_RETRIEVAL=false,t))({}),m=(()=>{var t=[...Object.keys(a),...Object.keys(i),...Object.keys(n)];let e={};return t.forEach(t=>{t in a?e[t]=a[t]:t in i?e[t]=i[t]:t in n&&(e[t]=n[t])}),e})(),e=class{},h=(t(e,"origin",m.ORIGIN),t(e,"customTag",m.CUSTOM_TAG),t(e,"callTrackingPoolHash",m.CALL_TRACKING_POOL_HASH),t(e,"sessionId",m.SESSION_ID),t(e,"prevOverride",m.PREVIOUS_OVERRIDE),t(e,"refOverride",m.REFERER_OVERRIDE),t(e,"facebookEventIdRetrieval",m.FB_EVENT_ID_RETRIEVAL),t(e,"spaEnabled",m.SPA_ENABLED),t(e,"ignorePrevUrl",m.IGNORE_PREVIOUS_URL),t(e,"embedScriptOnIframes",m.EMBED_SCRIPTS_ON_IFRAME),t(e,"trackDeviceFingerprint",m.FINGERPRINT_ENABLED),t(e,"useFetchKeepAlive",m.FETCH_KEEP_ALIVE_ENABLED),t(e,"callTrackingEnabled",m.CALL_TRACKING_ENABLED),t(e,"shopifyPostPurchasePageScript",m.SHOPIFY_POST_PURCHASE_ENABLED),t(e,"noSwapNumbersEnabled",m.NO_SWAP_NUMBERS_ENABLED),t(e,"clientUseCustomConsentEvent",!1),t(e,"deleteParams",m.DELETE_TRACKING_PARAMS_ENABLED),class{constructor(){}}),r=(t(h,"id",m.PRODUCT_ID),t(h,"hash",m.PRODUCT_HASH),class{}),p=(t(r,"trackingBase",m.TRACKING_URL),t(r,"leadGenBase",m.LEAD_GEN_URL),t(r,"generateLeadGenSessionId",r.leadGenBase+"/session"),t(r,"processClick",r.trackingBase+"/pc"),t(r,"generateUUID",r.trackingBase+"/gusid"),t(r,"errorEndpoint",r.trackingBase+"/error"),t(r,"unifiedEvent",r.trackingBase+"/hte"),t(r,"clickUpdate",r.trackingBase+"/pcu"),t(r,"pingPongRequest",r.trackingBase+"/../sv"),t(r,"customActionProcessing",r.trackingBase+"/cap"),t(r,"dniRequest",r.trackingBase+"/cte"),class{constructor(){}}),g=(t(p,"product",h),t(p,"config",e),t(p,"endpoints",r),t(p,"href",location.href),t(p,"documentUrl",document.URL),t(p,"documentReferrer",document.referrer),class{constructor(){}static _(t){return this.v(document.getElementById(t))}static C(t){return document.getElementsByTagName(t)}static I(){return this.v(this.P(".hyros-first-name:not(input)"))}static T(){return this.v(this.P(".hyros-last-name:not(input)"))}static R(){return this.v(this.P(".hyros-full-name:not(input)"))}static v(t){return null!==t?t.innerText:""}static P(t){return document.querySelector(t)}}),l=(t=>(t.EMAIL="Email",t.EMAIL_LOWER="email",t.INVITEE_EMAIL="invitee_email",t.HEMAIL="hemail",t.HE="he",t.CEMAIL="cemail",t.PAYER_EMAIL="payer_email",t.CHECKOUTEMAIL="checkoutemail",t.CUSTOMER_EMAIL="customer_email",t.EMAIL_ADDRESS_LEAD="email-address-lead",t.EMAIL_LEAD="email-lead",t.BUYER_EMAIL="buyer_email",t.INF_FIELD_EMAIL="inf_field_Email",t.EMAIL_FORM1="email_form1",t.WJ_LEAD_EMAIL="wj_lead_email",t.EW_EMAIL="ew_email",t))({});var _=class{constructor(){}static log(t,e){console.log("%c [UTS] "+t,"color: "+e+";")}static info(t){this.log(t,"green")}static error(t){this.log(t,"red")}static warn(t){this.log(t,"#ff9966")}},v=class d{constructor(){}static decodeUrlParam(e){if(null!==e)try{for(;e!==decodeURIComponent(e);)e=decodeURIComponent(e)}catch(t){_.warn("[DCD] Fail: "+e+" , error: "+t)}return e}static k(t,e,i){try{return p.config.deleteParams?t:e}catch(t){return _.error(i+t),p.config.deleteParams=!1,e}}static A(){return this.k(p.href,location.href,"E_BHREF: ")}static S(){return this.k(p.documentUrl,document.URL,"E_DURL: ")}static O(){return this.k(p.documentReferrer,document.referrer,"E_DREF: ")}static getUrlParam(t,e,i,n){i=i||this.A(),t="[\\?&]"+(t=(t=t.toString().replace(/[\[]/,"\\[").replace(/[\]]/,"\\]")).toString().replace(/ /g,"\\+"))+'=([^&#,"]*)',t=new RegExp(t).exec(i);let a=t?t[1]:null;return a=null!==a&&(e&&(a=d.decodeUrlParam(a)),n)?a&&a.replace(/["},]/g,""):a}static U(t,e,i){for(var n,a=i||d.A(),i="[\\?&]"+(t=t.toString().replace(/[\[]/,"\\[").replace(/[\]]/,"\\]"))+"=([^&#]*)",r=new RegExp(i,"g"),o=[];null!==(n=r.exec(a));){let t=n[1];e&&(t=d.decodeUrlParam(t)),o.push(t)}return o}static D(){this.A(),this.S(),this.O()}static F(e,t,i,n){var a=d.getUrlParam(t,i,n,!0);if(e!==t)try{var r=d.getUrlParam(e,i,n,!0);if(r)return r}catch(t){_.info("[e_cp]: "+e+" , error: "+t)}return a}static G(t,e,i,n){t=d.F(t,e,i,n);return t?Number(t):null}static N(t,e,i,n){t=d.F(t,e,i,n);return t?Boolean(t):null}static L(t){for(var e of t){e=this.getUrlParam(e,!0);if(e)return e}return null}static H(){var e={},i=window.location.search.substring(1).split("&");for(let t=0;t()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(String(t).toLowerCase())}static M(){return g._("hyros-email")}static q(t){return t.includes("@")&&!t.includes(" ")}static J(t){var e=g.C(t);for(let t=0;t0(t.HYROS_FIRST_NAME="hyros-first-name",t.FIRST_NAME="firstname",t.NAME="name",t.FIRST_NAME_DASHED="first-name",t.F_NAME_DASHED="f-name",t.FIRST_NAME_SNAKE="first_name",t.F_NAME_SNAKE="f_name",t.FIRST_NAME_SPACED="first name",t.F_NAME_SPACED="f name",t))({}),j=(t=>(t.HYROS_LAST_NAME="hyros-last-name",t.LAST_NAME="lastname",t.LAST_NAME_DASHED="last-name",t.L_NAME_DASHED="l-name",t.LAST_NAME_SNAKE="last_name",t.L_NAME_SNAKE="l_name",t.LAST_NAME_SPACED="last name",t.L_NAME_SPACED="l name",t))({}),x=(t=>(t.HYROS_FULL_NAME="hyros-full-name",t.FULL_NAME_DASHED="full-name",t.FULL_NAME_SNAKE="full_name",t.FULL_NAME_SPACED="full name",t.FULL_NAME_SINGLE="fullname",t.COMPLETE_NAME_DASHED="complete-name",t.COMPLETE_NAME_SNAKE="complete_name",t.COMPLETE_NAME_SPACED="complete name",t.COMPLETE_NAME_SINGLE="completename",t.INVITEE_FULL_NAME="invitee_full_name",t))({}),T=class{constructor(){}static ft(t){return{[0]:Object.values(B),1:Object.values(j),2:Object.values(x)}[t]||[]}static ht(t){t=this.ft(t);return v.L(t)}},o=(t=>(t.HCONTACT="hcontact",t))(o||{});function R(){return Object.values(o)}var c=(t=>(t.SOURCE_LINK="sl",t.FB_AD_SET_ID="fbc_id",t.G_CAMPAIGN_ID="gc_id",t.G_ADGROUP_ID="h_ga_id",t.G_CLICK_ID="gclid",t.G_SPECIAL_CAMPAIGN="g_special_campaign",t.W_BRA_ID="wbraid",t.G_BRA_ID="gbraid",t.FB_CLICK_ID="fbclid",t.EMAIL_SOURCE="el",t.EMAIL_TRAFFIC="he",t.HYROS_AD_ID="h_ad_id",t.BING_AD_GROUP_ID="bng_id",t.BING_SPECIAL_CAMPAIGN="bng_special_campaign",t.HYROS_CAMPAIGN_ID="h_campaign_id",t.MANY_CHAT_PARAMS="mch",t.TT_AD_GROUP_ID="ttc_id",t.SN_AD_SET_ID="snc_id",t.LNK_CAMPAIGN_ID="lnk_id",t.TWT_ADGROUP_ID="twt_id",t.PNT_AD_GROUP_ID="pnt_id",t.TT_CLICK_ID="ttclid",t.RDT_AD_GROUP_ID="rdt_id",t.RDT_CLICK_ID="rdt_clid",t.PAYPAL_UNIQUE_CHECKOUT_ID="tx",t.HYROS_TRAFFIC_SOURCE="htrafficsource",t.HYROS_CATEGORY="hcategory",t.HYROS_GOAL="hgoal",t.HYROS_KEYWORD_ID="h_keyword_id",t.HYROS_KEYWORD="h_keyword",t.HYROS_PLACEMENT="h_placement",t))(c||{});function y(){return Object.values(c)}var b=(t=>(t.SOURCE_LINK="sl",t.FB_AD_SET_ID="fbc_id",t.G_CAMPAIGN_ID="gc_id",t.G_ADGROUP_ID="h_ga_id",t.G_SPECIAL_CAMPAIGN="CustomGSpecialCampaign",t.G_CLICK_ID="gclid",t.W_BRA_ID="wbraid",t.G_BRA_ID="gbraid",t.FB_CLICK_ID="fbclid",t.EMAIL_SOURCE="el",t.EMAIL_TRAFFIC="he",t.HYROS_AD_ID="h_ad_id",t.BING_AD_GROUP_ID="bng_id",t.BING_SPECIAL_CAMPAIGN="CustomBingSpecialCampaign",t.HYROS_CAMPAIGN_ID="h_campaign_id",t.MANY_CHAT_PARAMS="mch",t.TT_AD_GROUP_ID="ttc_id",t.SN_AD_SET_ID="snc_id",t.LNK_CAMPAIGN_ID="lnk_id",t.TWT_ADGROUP_ID="twt_id",t.PNT_AD_GROUP_ID="pnt_id",t.TT_CLICK_ID="ttclid",t.RDT_AD_GROUP_ID="rdt_id",t.RDT_CLICK_ID="rdt_clid",t.PAYPAL_UNIQUE_CHECKOUT_ID="tx",t.HYROS_TRAFFIC_SOURCE="htrafficsource",t.HYROS_CATEGORY="hcategory",t.HYROS_GOAL="hgoal",t.HYROS_KEYWORD_ID="h_keyword_id",t.HYROS_KEYWORD="h_keyword",t.HYROS_PLACEMENT="h_placement",t))(b||{});var k=(t=>(t.SOURCE_LINK_TAG="sourceLinkTag",t.FB_AD_SET_ID="fbAdSetId",t.BING_AD_GROUP_ID="bingAdGroupId",t.HYROS_CAMPAIGN_ID="hyrosCampaignId",t.GOOGLE_CAMPAIGN_ID="googleCampaignId",t.GOOGLE_ADGROUP_ID="googleAdgroupId",t.HYROS_AD_ID="hyrosAdId",t.TIKTOK_AD_GROUP_ID="tiktokAdGroupId",t.SNAPCHAT_AD_SET_ID="snapchatAdSetId",t.LINKEDIN_CAMPAIGN_ID="linkedinCampaignId",t.TWITTER_ADGROUP_ID="twitterAdgroupId",t.PINTEREST_AD_GROUP_ID="pinterestAdGroupId",t.WR_AD_ID="wrAdId",t.TW_AD_ID="twAdId",t))(k||{});var A=(t=>(t.GOOGLE="wickedsource",t.FACEBOOK="WickedSource",t))(A||{}),S=(t=>(t.GOOGLE="wickedid",t.FACEBOOK="WickedID",t))(S||{}),E=(t=>(t.SNAPCHAT="snapchat",t))(E||{}),O=(t=>(t.FACEBOOK="fbadid",t.GOOGLE="gadid",t.TIKTOK="ttadid",t.TIKTOK_OR_FACEBOOK="tw_adid",t))(O||{});var U=(t=>(t.EUIP="EUIP",t.BLCK="BLCK",t))(U||{});var s=(t=>(t.BURL="BURL",t.BIP="BIP",t))(s||{});function D(){return Object.values(s)}var M=(t=>(t.ADD_LEAD_TAG="addLeadTag",t.ADD_LEAD_PHONE="addLeadPhone",t.ADD_CONSENT="addConsent",t.ADD_LEAD_STAGE="addLeadStage",t))({}),F=(t=>(t.GRANTED="GRANTED",t.DENIED="DENIED",t.UNSPECIFIED="UNSPECIFIED",t))(F||{});var G={lead:{email:"",phoneNumbers:[],tag:"",tags:[],firstName:"",lastName:"",adOptimizationConsent:"UNSPECIFIED",leadStage:"",contact:"",leadAddress:"",leadCity:"",leadStreet:"",leadState:"",leadCountry:"",leadZipCode:""},source:{sourceLinkTags:"",fbAdsetId:0,googleAdId:0,bingAdGroupId:0,hyrosCampaignId:0,gClickId:"",wBraId:"",gBraId:"",fbClickId:"",tiktokAdGroupId:0,snapchatAdSetId:0,twitterAdgroupId:0,linkedinCampaignId:0,ttClickId:"",rdtAdGroupId:"",rdtClickId:"",bingSpecialCampaign:!1,gSpecialCampaign:!1,gAdgroupId:0,pinterestAdgroupId:0},config:{cookieEnabled:!0,origin:"",sessionId:"",prevUrl:"",refUrl:"",leadGenSessionId:"",dvfp:"",gt:"",cartId:null,_t:void 0,vt:!1},checkout:{paypalUniqueCheckoutId:"",uniqueCheckoutId:0},conversionInfo:{Ct:"",tiktokPixelId:"",It:"",Pt:"",transactionId:"",wt:"",clientDedupId:"",redditUUID:"",redditConversionId:""},processedData:{Tt:!1,email:null,Rt:null,yt:!1,bt:!1,kt:[],At:[],St:[],Et:[],Ot:[],Ut:[],Dt:[],Ft:[],Gt:[],Nt:[],Lt:[],Ht:[],Bt:[],jt:"",xt:!1,Mt:[],qt:null,zt:null,Jt:!0,reservedNumbers:[],noSwapNumbers:[],$t:!1,Kt:null}},q=(t=>(t.TEXT_REMINDER_NUMBER="text_reminder_number",t.SMS_NUMBER="sms_number",t.ANSWER="answer_",t.INF_CUSTOM_PHONE_NUMBER_OR_SKYPE_ID="inf_custom_PhonenumberorSkypeID",t.INF_FIELD_PHONE1="inf_field_Phone1",t.PHONE1="Phone1",t.PHONE="phone",t.MOBILE="mobile",t.CUSTOMER_VALID_PHONE="customer_valid_phone",t.TEL="tel",t))(q||{});var N=class{constructor(){}static Wt(){let t;return t=v.S()&&"about:blank"!=v.S()&&"about:srcdoc"!=v.S()?v.S():parent.document?parent.document.URL:v.O(),v.B(t)?t:encodeURI(t)}},z=()=>{var t=G.processedData.Et;return t.includes(p.config.customTag)||t.push(p.config.customTag),t},J=()=>{var e,i=v.H(),t=Object.values(q);for(e in i)if(w.lt(e,t)){let t=i[e];e.includes("answer_")&&(t=I.Y(t)),I.W(t)&&I.X(t)&&(t=I.V(t),G.processedData.St.includes(t)||G.processedData.St.push(t))}var n=I.V(I.rt());return I.X(n)&&!G.processedData.St.includes(n)&&G.processedData.St.push(n),G.processedData.St};{h=!0,new PerformanceObserver((t,e,i)=>{var n=t.getEntries().filter(t=>"img"===t.initiatorType&&t.name.includes("facebook")&&t.name.includes("/tr")&&t.name.includes("eid=")),t=t.getEntries().filter(t=>"img"===t.initiatorType&&t.name.includes("reddit")&&t.name.includes("/rp.gif"));0{t=t.t;t&&"PURCHASE"===t.ev&&(s=t.cdid,u=t.e_tid)})}catch(t){_.error("[snap_error]"+t.stack)}return r.apply(this,arguments)},[]);function $(t,e){i.push({name:t,Zt:e})}if($("Cookiebot",()=>"undefined"!=typeof Cookiebot&&Cookiebot.consent.marketing),$("CookiePro",()=>"undefined"!=typeof CookiePro&&CookiePro.GetConsent()),!h)return;let d={};var L="",K="";let o="",c="",s="",u="",l=!!p.config.refOverride;d.app=new function(){function n(t){var e=T.ft(0);if(t.className)for(var i in e){var n=["f_name","first_name"],a=[...t.classList].join("_").toLowerCase();if(r(n,a))return 1;if(a.split("_").includes(e[i]))return 1}return e.includes(t.id&&t.id.toLowerCase())||e.includes(t.placeholder&&t.placeholder.toLowerCase())}function r(t,e){return 0e.includes(t)?t:null).length}function a(t,e){return t&&t.classList&&t.classList.contains(e)}this.init=function(t){try{t()}catch(t){d.Vt(t,"[init] [UTC]")}},this.Xt=function(t,e){var i=g.C("head")[0],n=document.createElement("script");n.src=t,n.type="text/javascript",n.onreadystatechange=e,n.onload=e,i.appendChild(n)},this.Yt=function(){return"SHOPIFY"===p.config.origin?this.Qt():C.M()},this.Qt=function(){let t=C.$();return t=t||this.te()},this.te=function(){var t=document.cookie.match("(^|;)\\s*hyrosemail\\s*=\\s*([^;]+)"),t=t&&0{var e=T.ft(2);if(t.className)for(var i in e){var n=["complete_name","full_name"],a=[...t.classList].join("_").toLowerCase();if(r(n,a))return 1;if(a.split("_").includes(e[i]))return 1}return e.includes(t.id&&t.id.toLowerCase())||e.includes(t.placeholder&&t.placeholder.toLowerCase())})(i))d.app.pe(i,5);else if((t=>{var e=T.ft(1);if(t.className)for(var i in e){var n=["l_name","last_name"],a=[...t.classList].join("_").toLowerCase();if(r(n,a))return 1;if(a.split("_").includes(e[i]))return 1}return e.includes(t.id&&t.id.toLowerCase())||e.includes(t.placeholder&&t.placeholder.toLowerCase())})(i))d.app.pe(i,4);else if(n(i))d.app.pe(i,3);else if((t=>{if(t.className)for(var e in f.u)if([...t.classList].join("_").toLowerCase().split("_").includes(f.u[e]))return 1;return f.u.includes(t.id&&t.id.toLowerCase())||f.u.includes(t.placeholder&&t.placeholder.toLowerCase())})(i))d.app.pe(i,6);else if((t=>{if(t.className)for(var e in f.l)if([...t.classList].join("_").toLowerCase().split("_").includes(f.l[e]))return 1;return f.l.includes(t.id&&t.id.toLowerCase())||f.l.includes(t.placeholder&&t.placeholder.toLowerCase())})(i))d.app.pe(i,7);else if((t=>{if(t.className)for(var e in f.h)if([...t.classList].join("_").toLowerCase().split("_").includes(f.h[e]))return 1;return f.h.includes(t.id&&t.id.toLowerCase())||f.h.includes(t.placeholder&&t.placeholder.toLowerCase())})(i))d.app.pe(i,8);else if((t=>{if(t.className)for(var e in f.p)if([...t.classList].join("_").toLowerCase().split("_").includes(f.p[e]))return 1;return f.p.includes(t.id&&t.id.toLowerCase())||f.p.includes(t.placeholder&&t.placeholder.toLowerCase())})(i))d.app.pe(i,9);else if((t=>{if(t.className)for(var e in f.m)if([...t.classList].join("_").toLowerCase().split("_").includes(f.m[e]))return 1;return f.m.includes(t.id&&t.id.toLowerCase())||f.m.includes(t.placeholder&&t.placeholder.toLowerCase())})(i))d.app.pe(i,10);else{if((t=>{if(t.className)for(var e in f.g)if([...t.classList].join("_").toLowerCase().split("_").includes(f.g[e]))return 1;return f.g.includes(t.id&&t.id.toLowerCase())||f.g.includes(t.placeholder&&t.placeholder.toLowerCase())})(i))d.app.pe(i,11);else{if(n(i)){d.app.attachFirstNameListener(i);continue}if(a(i,"hyros-phone")){d.app.pe(i,1);continue}if(a(i,"hyros-coupon")){d.app.pe(i,2);continue}}"hyros-phone"===i.id?d.app.pe(i,1):"text"!==i.type&&"email"!==i.type||d.app.pe(i,0)}}},this.pe=function(e,i){G.processedData.kt.includes(e)||(d.app.ge(e.value,i),e.addEventListener("change",function(t){d.app.ge(e.value,i)}),G.processedData.kt.push(e))};function e(t){t=v.getUrlParam(t);return"fb"===t?"facebook":"tiktok"===t||"facebook"===t||"google"===t?t:""}this._e=function(){var e=[{name:"kartraReferenceIdLoaded",data:null}];for(let t=0;tasync t=>{var t=null!=e?t.detail[e]:t.detail;_.info("[uCheckId] "+t),G.checkout.uniqueCheckoutId=t,G.config._t&&(G.config.vt?await d.app.processClick(G.config.sessionId,()=>{}):(t={id:G.config._t.clickId,productId:p.product.id,uniqueCheckoutId:G.checkout.uniqueCheckoutId,creationDate:G.config._t.creationDate},G.config.vt=!0,d.app.ve(t)))})(e[t].data),!0)},this.Ce=function(){var t=p.config.customTag?"&tag="+p.config.customTag:"",e=p.config.spaEnabled?"&spa=true":"",i=p.config.ignorePrevUrl?"&ignorePrevUrl=true":"",n="SHOPIFY"===p.config.origin?"&origin=SHOPIFY":"",a=p.config.Ie?"&embed=true":"";return p.endpoints.trackingBase+"/universal-script?ph="+p.product.hash+t+n+e+i+a},this.Pe=function(){var e=[],i=document.getElementsByTagName("iframe");for(let t=0;t{G.config.gt=t,await d.app.processClick(G.config.sessionId,e),t=N.Wt()}),history.pushState=(e=>function(){var t=e.apply(this,arguments);return window.dispatchEvent(new Event("pushState")),window.dispatchEvent(new Event("locationchange")),t})(history.pushState),window.addEventListener("popstate",()=>{window.dispatchEvent(new Event("locationchange"))})}},this.Le=function(t){C.j(t.value)&&!G.processedData.kt.includes(t)&&d.app.ce(t.value,p.product.id,d.app.se())},this.He=()=>G.processedData.jt,this.ce=function(t,e,i){G.processedData.At.includes(t)||(t=t,i=i,G.processedData.At.push(t),G.processedData.email=t,G.lead.email=t,G.lead.leadAddress=v.L(f.u)||G.lead.leadAddress,G.lead.leadStreet=v.L(f.l)||G.lead.leadStreet,G.lead.leadCity=v.L(f.h)||G.lead.leadCity,G.lead.leadState=v.L(f.p)||G.lead.leadState,G.lead.leadCountry=v.L(f.m)||G.lead.leadCountry,G.lead.leadZipCode=v.L(f.g)||G.lead.leadZipCode,G.lead.phoneNumbers=J()||G.lead.phoneNumbers,G.lead.tag=p.config.customTag,G.lead.tags=z(),G.lead.leadStage=G.processedData.jt,G.lead.firstName=T.ht(0)||G.lead.firstName,G.lead.lastName=T.ht(1)||G.lead.lastName,G.lead.contact=v.L(R())||G.lead.contact,G.source.sourceLinkTags=i,G.source.fbAdsetId=v.G("fbc_id","fbc_id",!0),G.source.bingAdGroupId=v.G("bng_id","bng_id",!0),G.source.bingSpecialCampaign=v.N("CustomBingSpecialCampaign","bng_special_campaign",!0),G.source.hyrosCampaignId=v.G("h_campaign_id","h_campaign_id",!0),G.source.googleAdId=v.G("gc_id","gc_id",!0),G.source.gAdgroupId=v.G("h_ga_id","h_ga_id",!0),G.source.gSpecialCampaign=v.N("CustomGSpecialCampaign","g_special_campaign",!0),G.source.gClickId=v.F("gclid","gclid",!0),G.source.wBraId=v.F("wbraid","wbraid",!0),G.source.gBraId=v.F("gbraid","gbraid",!0),G.source.fbClickId=w.ut(v.F("fbclid","fbclid",!0)),G.source.tiktokAdGroupId=v.G("ttc_id","ttc_id",!0),G.source.snapchatAdSetId=v.G("snc_id","snc_id",!0),G.source.twitterAdgroupId=v.G("twt_id","twt_id",!0),G.source.pinterestAdgroupId=v.G("pnt_id","pnt_id",!0),G.source.linkedinCampaignId=v.G("lnk_id","lnk_id",!0),G.source.ttClickId=v.F("ttclid","ttclid",!0),G.source.rdtClickId=v.F("rdt_clid","rdt_clid",!0),G.checkout.paypalUniqueCheckoutId=v.F("tx","tx",!0),G.config.cookieEnabled=navigator.cookieEnabled,G.config.refUrl=N.Wt(),G.config.prevUrl=v.O(),G.lead.firstName&&G.lead.lastName||d.app.re(T.ht(2)),d.app.Be(p.endpoints.unifiedEvent,"POST",d.app.getObjectAsJson({productId:p.product.id,firstName:G.lead.firstName,lastName:G.lead.lastName,contact:G.lead.contact,email:G.lead.email,phoneNumbers:G.lead.phoneNumbers,tag:p.config.customTag,tags:G.lead.tags,leadStage:G.lead.leadStage,adOptimizationConsent:G.lead.adOptimizationConsent,leadAddress:G.lead.leadAddress,leadStreet:G.lead.leadStreet,leadCity:G.lead.leadCity,leadState:G.lead.leadState,leadCountry:G.lead.leadCountry,leadZipCode:G.lead.leadZipCode,sourceLinkTags:G.source.sourceLinkTags,fbAdsetId:G.source.fbAdsetId,bingAdGroupId:G.source.bingAdGroupId,bingSpecialCampaign:G.source.bingSpecialCampaign,hyrosCampaignId:G.source.hyrosCampaignId,googleAdId:G.source.googleAdId,gAdgroupId:G.source.gAdgroupId,gSpecialCampaign:G.source.gSpecialCampaign,gClickId:G.source.gClickId,wBraId:G.source.wBraId,gBraId:G.source.gBraId,fbClickId:G.source.fbClickId,rdtAdGroupId:G.source.rdtAdGroupId,tiktokAdGroupId:G.source.tiktokAdGroupId,snapchatAdSetId:G.source.snapchatAdSetId,twitterAdgroupId:G.source.twitterAdgroupId,pinterestAdgroupId:G.source.pinterestAdgroupId,linkedinCampaignId:G.source.linkedinCampaignId,ttClickId:G.source.ttClickId,rdtClickId:G.source.rdtClickId,paypalUniqueCheckoutId:G.checkout.paypalUniqueCheckoutId,origin:G.config.origin,cookieEnabled:G.config.cookieEnabled,refUrl:G.config.refUrl,dvfp:G.config.deviceFingerprint,prevUrl:G.config.prevUrl,sessionId:G.config.sessionId,leadGenSessionId:G.config.leadGenSessionId,uniqueCheckoutId:G.checkout.uniqueCheckoutId}),d.app.je,d.app.xe,!0))},this.Be=function(t,e,i,n,a,r){let o;p.config.useFetchKeepAlive?(o=d.app.Me(G.config.sessionId,p.product.id,G.config.leadGenSessionId),d.app.qe(t,e,i,n,a,o,r)):(o=d.app.getSessionIdHeaders(G.config.sessionId,p.product.id,G.config.leadGenSessionId),"POST"===e?d.app.requestPost(t,i,n,a,o,r):d.app.requestGet(t,n,a,o,r))},this.ze=function(t,e){if(!p.config.useFetchKeepAlive){if(t&&D().includes(t.body))return this.Je(t.body),!0;if(t&&"error"===t.status)return d.app.$e(t.body,e),!0}return!1},this.Ke=function(t){var e;t&&!G.processedData.St.includes(t)&&(I.W(t)&&I.X(t)&&(e=I.V(t),G.lead.phoneNumbers=[e]),e={id:G.config._t.clickId,productId:p.product.id,phoneNumber:t,creationDate:G.config._t.creationDate},d.app.ve(e))},this.We=function(t){t&&(t={id:G.config._t.clickId,productId:p.product.id,couponCode:t,creationDate:G.config._t.creationDate},d.app.ve(t))},this.Ze=function(t){t&&(G.lead.firstName=t,t={id:G.config._t.clickId,productId:p.product.id,firstName:t,creationDate:G.config._t.creationDate},d.app.ve(t))},this.Ve=function(t){t&&(G.lead.lastName=t,t={id:G.config._t.clickId,productId:p.product.id,lastName:t,creationDate:G.config._t.creationDate},d.app.ve(t))},this.Xe=function(t){t&&(G.lead.leadCity=t,t={id:G.config._t.clickId,productId:p.product.id,leadCity:t,creationDate:G.config._t.creationDate},d.app.ve(t))},this.Ye=function(t){t&&(G.lead.leadAddress=t,t={id:G.config._t.clickId,productId:p.product.id,leadAddress:t,creationDate:G.config._t.creationDate},d.app.ve(t))},this.Qe=function(t){t&&(G.lead.leadStreet=t,t={id:G.config._t.clickId,productId:p.product.id,leadStreet:t,creationDate:G.config._t.creationDate},d.app.ve(t))},this.ti=function(t){t&&(G.lead.leadState=t,t={id:G.config._t.clickId,productId:p.product.id,leadState:t,creationDate:G.config._t.creationDate},d.app.ve(t))},this.ei=function(t){t&&(G.lead.leadCountry=t,t={id:G.config._t.clickId,productId:p.product.id,leadCountry:t,creationDate:G.config._t.creationDate},d.app.ve(t))},this.ii=function(t){t&&(G.lead.leadZipCode=t,t={id:G.config._t.clickId,productId:p.product.id,leadZipCode:t,creationDate:G.config._t.creationDate},d.app.ve(t))},this.ie=function(t){t=I.V(t),I.X(t)&&!G.processedData.St.includes(t)&&G.config._t&&(d.app.Ke(t),G.processedData.St.push(t))},this.ni=function(t){G.processedData.Et.includes(t)||G.processedData.Et.push(t)},this.ai=function(t){t=w.dt(t),G.config._t&&(d.app.We(t),G.processedData.Ot.push(t))},this.ri=function(t){C.j(t)&&d.app.ce(t,p.product.id,d.app.se())},this.ne=function(t){t=w.st(t);var e=G.config._t.clickId;G.processedData.Ht.includes(t+e)||G.config._t&&(d.app.Ze(t),G.processedData.Ht.push(t+e))},this.ae=function(t){t=w.st(t);var e=G.config._t.clickId;G.processedData.Bt.includes(t+e)||G.config._t&&(d.app.Ve(t),G.processedData.Bt.push(t+e))},this.re=function(t){t=w.ct(t);0d.app.ri(t),1:t=>d.app.ie(t),2:t=>d.app.ai(t),3:t=>d.app.ne(t),4:t=>d.app.ae(t),5:t=>d.app.re(t),6:t=>d.app.hi(t),7:t=>d.app.fi(t),8:t=>d.app.di(t),9:t=>d.app.li(t),10:t=>d.app.ui(t),11:t=>d.app.mi(t)})[e](t)},this.je=function(t){d.app.ze(t,"hte")||_.info("[hte].")},this.gi=function(){_.info("[pcu].")},this._i=function(){_.info("[pp].")},this.xe=function(t){d.app.$e(t,"hte")},this.vi=function(t){d.app.$e(t,"pcu")},this.Ci=function(t){d.app.$e(t,"pp")},this.$e=function(t,e){d.Vt(t,"["+e+"]"),_.error("[ERROR]["+e+"]: "+t)},this.Je=function(t){_.warn("[WARN]["+t+"]")},this.Ii=function(e){try{var t=JSON.parse(e);if(t.body){if(Object.values(U).includes(t.body))return void _.error("["+t.body+"]");if(D().includes(t.body))return void this.Je(t.body)}d.app.$e(e,"gusid")}catch(t){d.app.$e(e,"gusid")}},this.Pi=function(t,e,i){e?_.info("Hyros Script Disabled"):(G.config.sessionId=t,_.info("[gusid]: "+t),this.wi(t),this.Ti(function(){d.app.Ri(t,function(){d.app.processClick(t,i)})}))},this.yi=async function(i){var t=new URLSearchParams,e=v.getUrlParam("hyros"),e=(e&&t.append("hyros",e),p.config.sessionId),e=(e&&"null"!=e&&t.append("r_c_id",e),await d.app.bi());let n=p.endpoints.generateUUID;t.toString()&&(n=n+"?"+t.toString()),d.app.requestSessionId(n,async function(t,e){d.app.Pi(t,e,i)},function(t){d.app.Ii(t)},[{key:"Product-ID",value:p.product.id},{key:"Ref-Url",value:p.config.refOverride||N.Wt()},{key:"fp",value:e}],!0)},this.Ti=function(e){var t=p.endpoints.generateLeadGenSessionId;this.ki(t,function(t){G.config.leadGenSessionId=t,e()},function(t){d.app.$e(t,"session")})},this.ki=function(t,e,i){let n=d.app.Ai("GET",t,!0,void 0,!0);n.onload=function(){if(200===n.status||304===n.status)try{var t=n.getResponseHeader("L-Gen-ID");null!=t&&"undefined"!==t&&""!==t&&"null"!==t&&e(t)}catch(t){i("ERROR Procesing Response: "+t)}else i("http status: "+n.status+" - "+n.responseText)},n.onerror=function(){i("Error XMLHttp: "+(n.responseText||"Network request failed"))},n.send()},this.Si=function(t){return 0Object.values(k).includes(t)&&null!==e).length},this.Ei=function(t,e){t.sourceLinkTag=d.app.se(e),t.fbAdSetId=v.F("fbc_id","fbc_id",!0,e),t.bingAdGroupId=v.F("bng_id","bng_id",!0,e),t.bingSpecialCampaign=v.F("CustomBingSpecialCampaign","bng_special_campaign",!0,e),t.hyrosCampaignId=v.F("h_campaign_id","h_campaign_id",!0,e),t.googleCampaignId=v.F("gc_id","gc_id",!0,e),t.Oi=v.F("h_ga_id","h_ga_id",!0,e),t.gSpecialCampaign=v.F("CustomGSpecialCampaign","g_special_campaign",!0,e),t.fbClickId=v.F("fbclid","fbclid",!0,e),t.googleClickId=v.F("gclid","gclid",!0,e),t.wBraId=v.F("wbraid","wbraid",!0,e),t.gBraId=v.F("gbraid","gbraid",!0,e),t.hyrosAdId=v.F("h_ad_id","h_ad_id",!0,e),t.tiktokAdGroupId=v.F("ttc_id","ttc_id",!0,e),t.rdtAdGroupId=v.F("rdt_id","rdt_id",!0,e),t.rdtClickId=v.F("rdt_clid","rdt_clid",!0,e),t.snapchatAdSetId=v.F("snc_id","snc_id",!0,e),t.linkedinCampaignId=v.F("lnk_id","lnk_id",!0,e),t.Ui=v.F("ttclid","ttclid",!0,e),t.twitterAdgroupId=v.F("twt_id","twt_id",!0,e),t.pinterestAdgroupId=v.F("pnt_id","pnt_id",!0,e),t.paypalUniqueCheckoutId=v.F("tx","tx",!0,e),t.Di=(t=>{if(t)return(t=new RegExp("kwd-(\\d+)").exec(t))?t[1]:null})(v.F("h_keyword_id","h_keyword_id",!0,e)),t.Fi=v.F("h_keyword","h_keyword",!0,e),t.Gi=v.F("h_placement","h_placement",!0,e),this.Ni(t,e)},this.Ni=function(t,e){var i={...t};delete i.sourceLinkTag,this.Si(i)||null===t.sourceLinkTag||(t.Li=v.F("htrafficsource","htrafficsource",!1,e),t.Hi=v.F("hcategory","hcategory",!1,e),t.Bi=v.F("hgoal","hgoal",!1,e))},this.ji=function(t){t.xi=this.Mi(),t.qi=this.zi(t)},this.Mi=function(){var t=this.Ji();return t||this.$i()},this.Ji=function(){var e=Object.values(A);let i;for(let t=0;ty().some(function(t){return e.name.includes(t)}))).length&&(i.refUrl=encodeURI(t[0].name),this.Ei(i,i.refUrl)),i.fbClickId=w.ut(i.fbClickId),!this.Si(i)){var t=v.F("mch","mch");let e=[];null!==t&&(e=decodeURIComponent(t).split(P));for(let t=0;tv.F("he","he",!1),this.cn=()=>v.F("el","el",!1),this.sn=async function(){var t=d.app.an(),e=new URLSearchParams,i=p.endpoints.processClick,t=(t.fbAdSetId&&e.append("fbc_id",t.fbAdSetId),t.bingAdGroupId&&e.append("bng_id",t.bingAdGroupId),t.bingSpecialCampaign&&e.append("bng_special_campaign",t.bingSpecialCampaign),t.hyrosCampaignId&&e.append("h_campaign_id",t.hyrosCampaignId),t.googleCampaignId&&e.append("gc_id",t.googleCampaignId),t.Oi&&e.append("h_ga_id",t.Oi),t.gSpecialCampaign&&e.append("g_special_campaign",t.gSpecialCampaign),t.hyrosAdId&&(t.fbAdSetId||t.googleCampaignId||t.Oi||t.tiktokAdGroupId||t.pinterestAdgroupId||t.snapchatAdSetId||t.bingAdGroupId||t.hyrosCampaignId||t.rdtAdGroupId)&&e.append("h_ad_id",t.hyrosAdId),t.fbClickId&&e.append("fb_cl_id",t.fbClickId),t.googleClickId&&e.append("g_cl_id",t.googleClickId),t.wBraId&&e.append("w_bra_id",t.wBraId),t.gBraId&&e.append("g_bra_id",t.gBraId),t.sourceLinkTag&&e.append("sl",t.sourceLinkTag),t.yt&&e.append("is_el",t.yt),t.previousUrl&&e.append("prev_url",t.previousUrl),t.refUrl&&e.append("ref_url",t.refUrl),t.fbPixelId&&e.append("fbp_id",t.fbPixelId),t.fbPixelEventId&&e.append("fbpe_id",t.fbPixelEventId),t.userAgent&&e.append("u_agent",t.userAgent),t.tiktokAdGroupId&&e.append("ttc_id",t.tiktokAdGroupId),t.uniqueCheckoutId&&e.append("u_ch_id",t.uniqueCheckoutId),t.snapchatAdSetId&&e.append("snc_id",t.snapchatAdSetId),t.twitterAdgroupId&&e.append("twt_id",t.twitterAdgroupId),t.pinterestAdgroupId&&e.append("pnt_id",t.pinterestAdgroupId),t.Ie&&e.append("embed",t.Ie),t.linkedinCampaignId&&e.append("lnk_id",t.linkedinCampaignId),t.Ui&&e.append("ttclid",t.Ui),t.rdtAdGroupId&&e.append("rdt_id",t.rdtAdGroupId),t.rdtClickId&&e.append("rdt_clid",t.rdtClickId),t.xi&&e.append("wr_source",t.xi),t.qi&&e.append("wr_ad_id",t.qi),t.en&&e.append("tw_ad_id",t.en),t.tn&&e.append("tw_source",t.tn),t.paypalUniqueCheckoutId&&e.append("u_ch_id",t.paypalUniqueCheckoutId),t.transactionId&&e.append("transactionId",t.transactionId),t.clientDedupId&&e.append("clientDedupId",t.clientDedupId),t.Li&&e.append("h_traffic_source",t.Li),t.Hi&&e.append("h_category",t.Hi),t.Bi&&e.append("h_goal",t.Bi),t.Fi&&e.append("h_keyword",t.Fi),t.Di&&e.append("h_keyword_id",t.Di),t.Gi&&e.append("h_placement",t.Gi),G.processedData.zt&&e.append("dni_number",G.processedData.zt),await d.app.bi());return null!=t&&e.append("fp",t),G.config.cartId?e.append("h_cart_id",G.config.cartId):(t=d.app.Re())&&e.append("h_cart_id",t),this.rn()&&this.cn()&&e.append("is_he",!0),i+"?"+e.toString()},this.wi=function(t){var e=g.C("button"),i=g.C("a");this.dn(t,e,"button"),this.dn(t,i,"tag"),setInterval(this.un(t),900)},this.dn=function(t,e,i){for(var n in e)try{var a,r=e[n].href;void 0!==r&&r.includes("https://www.digistore24.com/product/")&&!r.includes("custom=")&&(a=r.includes("?")?"&":"?",e[n].href=r+a+"custom="+t,_.info("[hyros-url] A "+i+", new href: "+e[n].href))}catch(t){_.warn("[hyros-url] A "+i+", error: "+t)}},this.un=function(t){var e,i=g.C("my-order-form");if(null===i||0===i.length)_.info("[hyros-url] iframe not found");else for(var n in i)try{void 0!==(url=i[n]._iframe.src)&&url.includes("https://www.digistore24.com/product/")&&!url.includes("custom=")&&(e=url.includes("?")?"&":"?",i[n]._iframe.src=url+e+"custom="+t,_.info("[hyros-url] A iframe, new href: "+i[n]._iframe.src))}catch(t){_.warn("[hyros-url] A iframe error, "+t)}},this.ln=function(e){var t;if(e.getAttribute("href")&&e.getAttribute("href").includes("tel:")&&e.setAttribute("href","tel:"+G.processedData.zt),0===e.childElementCount)e.innerHTML&&I.tt(e.innerHTML)&&(t=I.it(G.processedData.zt,e.innerHTML))&&(e.innerHTML=t);else for(let t=0;ti.delete(t)),Object.values(b).forEach(t=>i.delete(t)),t+((i.toString()&&"?")+decodeURIComponent(i.toString()))},this.wn=function(){v.D();try{p.config.deleteParams&&history.replaceState({},document.title,this.Pn())}catch(t){p.config.deleteParams=!1,_.error("E_P: "+t)}},this.Tn=()=>{var t,e;null!=G.processedData.Kt&&({Rn:t,value:e}=G.processedData.Kt,this.yn(t,e),G.processedData.Kt=null,_.info("[CAP] Cached event sent"))},this.processClick=async function(t,e){t=await this.sn(t);this.Be(t,"GET",{},function(t){d.app.ze(t,"pc")||(_.info("[pc]"),G.config._t=t,d.app.bn().then(),d.app.kn().then(),d.app.An().then(),d.app.Sn().then(),d.app.In(!0),d.app.Tn(),e())},function(t){d.app.$e(t,"pc"),d.app.In(!1),e()},!0),p.config.useFetchKeepAlive&&d.app.In(void 0)},this.ye=function(t){t=("; "+document.cookie).split("; "+t+"=");if(2===t.length)return t.pop().split(";").shift()},this.En=function(){"complete"===document.readyState||"interactive"===document.readyState?d.app.ee():(_.warn("[WARN][US] Document not ready: "+document.readyState),setTimeout(d.app.En,1e3))},this.On=function(){return v.L(R())},this.Un=function(){var t=decodeURIComponent(C.K()),e=d.app.On(),i=G.processedData.$t&&G.processedData.email;t&&C.j(t)||i?(t=C.j(t)?t:G.processedData.email,d.app.ce(t,p.product.id,d.app.se()),G.processedData.email=t,G.processedData.$t=!1):e?d.app.ce(e,p.product.id,d.app.se()):d.app.En(),d.app.propagateParametersToManyChat(),setTimeout(d.app.Dn,2e3)},this.Fn=function(){setInterval(d.app.he,3e3),setInterval(d.app.Cn,3e3),d.app.Un()},this.getSubstringBetween=function(t,e,i){if(""==t)return"";var n=t.indexOf(e);if(!(0<=n))return"";if(t=t.substring(n+e.length),i){if(!(0<=(n=t.indexOf(i))))return"";t=t.substring(0,n)}return t},this.Gn=function(t){t=d.app.getSubstringBetween(t,"fbq('init',",")");if(t=d.app.getSubstringBetween(t,"'","'"))return _.info("[fb_pi]: "+t.toString()),t},this.Nn=function(t){let e;return t=d.app.getSubstringBetween(t,"gtag('event',",")"),""!==(e=(e=""===(e=d.app.getSubstringBetween(t,"'transaction_id':",","))?d.app.getSubstringBetween(t,"'transaction_id':","}"):e).toString().replace(/'/g,""))&&(e=e.trim(),_.info("[gl_t_id]: "+e)),e},this.Ln=function(){var e=document.getElementsByTagName("script");for(let t=0;t{setTimeout(t,e)})},this.Bn=async function(){c?(G.conversionInfo.Pt=v.getUrlParam("eid",!1,c),G.conversionInfo.wt=v.getUrlParam("fbp",!1,c),_.info("[fb_ev_id]: "+G.conversionInfo.Pt),_.info("[_fbp]: "+G.conversionInfo.wt)):(await d.app.qn(1e3),await d.app.Bn())},this.jn=async function(){0t.name.includes("tiktok")&&t.name.includes("/pixel")&&t.name.includes("/pixel")&&!t.name.includes("/act")).length&&""!==L?(G.conversionInfo.It=L,G.conversionInfo.tiktokPixelId=K,_.info("[tt_ev_id]: "+G.conversionInfo.It),_.info("[tt_p_id]: "+G.conversionInfo.tiktokPixelId)):(await d.app.qn(1e3),await d.app.jn())},this.Mn=async function(){s?(G.conversionInfo.clientDedupId=s,G.conversionInfo.transactionId=u,_.info("[snap_cd_id]: "+G.conversionInfo.clientDedupId),_.info("[snap_t_id]: "+G.conversionInfo.transactionId)):(await d.app.qn(1e3),await d.app.Mn())},this.Hn=function(t,e,i){t=d.app.getSubstringBetween(t,"snaptr('track',",")");let n=d.app.getSubstringBetween(t,e,",");return""!==(n=(n=""===n?d.app.getSubstringBetween(t,e,"}"):n).toString().replace(/'/g,""))&&(n=n.trim(),_.info("[snap][get_"+i+"]: "+n)),n},this.zn=function(t,e){return"0000000000000000000000000000000000000000000000000000000000000001"===t&&(_.error("[reddit] Default placeholders are being used. Invalid param: "+e),!0)},this.xn=async function(){var t,e;o?(t=v.getUrlParam(e="external_id",!1,o),d.app.zn(t,e)||(G.conversionInfo.transactionId=t),_.info("[rdt_t_id]: "+G.conversionInfo.transactionId),e=v.getUrlParam("uuid",!1,o),d.app.zn(e,"uuid")||(G.conversionInfo.redditUUID=e),_.info("[rdt_uuid]: "+G.conversionInfo.redditUUID),e=v.getUrlParam(t="m.conversionId",!1,o),d.app.zn(e,t)||(G.conversionInfo.redditConversionId=e),_.info("[rdt_conv_id]: "+G.conversionInfo.redditConversionId)):(await d.app.qn(1e3),await d.app.xn())},this.getSessionIdHeaders=function(t,e,i){return[{key:"Access-Control-Allow-Headers",value:"*"},{key:"Access-Control-Allow-Origin",value:"*"},{key:"Content-type",value:"application/json; charset=utf-8"},{key:"Session-ID",value:t},{key:"Product-ID",value:e},{key:"L-Gen-ID",value:i}]},this.Jn=function(t){return null==t||"undefined"==t},this.Ai=function(t,e,i,n,a){a=!!a,n=d.app.Jn(n)?[{key:"Access-Control-Allow-Headers",value:"*"},{key:"Access-Control-Allow-Origin",value:"*"},{key:"Content-type",value:"application/json; charset=utf-8"}]:n;var r=new XMLHttpRequest;r.open(t,e,i),r.withCredentials=a;for(let t=0;t{try{var t;p.config.Zn&&((t=document.createElement("script")).text=m.FINGERPRINT_SCRIPT,document.head.appendChild(t),this.Vn(),_.info("[fp] init"))}catch(t){_.error("[fp] init: "+t.stack),p.config.Zn=!1}},this.Xn=function(){var t;p.config.shopifyPostPurchasePageScript&&(window.Shopify&&window.Shopify.on&&(window.fbq||window.gtag)?(window.Shopify.on("CheckoutAmended",function(t,e){let i=(e.order||e).lineItems.map(function(t){return t.id});var e=t.lineItems.filter(function(t){return i.indexOf(t.id)<0});0!==e.length&&(e=e[0],d.app.Yn(e.finalLinePrice,t.currency))}),window.Shopify.wasPostPurchasePageSeen||(t=window.Shopify.order,d.app.Yn(t.totalPrice,t.currency))):_.warn("[NTPF]"))},this.Yn=function(t,e){window.fbq&&(fbq("track","Purchase",{value:t,currency:e},{Qn:Math.random().toString(36).substr(2,15)}),_.info("[fbq]")),window.gtag&&(gtag("event","Purchase",{value:t,currency:e}),_.info("[gtag]"))},this.Vn=()=>{FPJS?G.processedData.qt=FPJS.load():(_.warn("[fp] unv"),setTimeout(this.Vn,100))},this.bi=async()=>{try{var t;return p.config.Zn?0{try{if(p.config.Zn){let e=G.config.dvfp;G.config.deviceFingerprint="",d.app.bi().then(t=>{null!=t&&t!==e&&(G.config.dvfp=t,t={id:G.config._t.clickId,productId:p.product.id,creationDate:G.config._t.creationDate,dvfp:t},d.app.ve(t))})}}catch(t){_.error("[fp2] "+t.stack)}},this.ve=function(t){d.app.requestPut(p.endpoints.clickUpdate,d.app.getObjectAsJson(t),d.app.gi,d.app.vi,d.app.getSessionIdHeaders(G.config.sessionId,p.product.id,G.config.leadGenSessionId),!0)},this.pingPongRequest=function(){var t=v.getUrlParam("hpp-pid"),e=p.product.id,i=window.location.origin,n=v.getUrlParam("hpp-ver-code");t&&d.app.requestPut(p.endpoints.pingPongRequest+"/verify",d.app.getObjectAsJson({domain:i,verificationCode:n,productId:t,scriptProductId:e}),d.app._i,d.app.Ci,d.app.getSessionIdHeaders(G.config.sessionId,p.product.id),!0)},this.ta=function(t){t.forEach(t=>{"consent"!==t[0]||"update"!==t[1]&&"default"!==t[1]||p.config.ci||(t="granted"===t[2].ad_user_data&&"granted"===t[2].ad_personalization?"GRANTED":"DENIED",d.app.updateConsentValue(t))})},this.checkAllConsents=function(){let e=!1;i.forEach(t=>{t.Zt()&&(e=!0,_.info("Cookie consent given through "+t.name),d.app.updateConsentValue("GRANTED"))}),e||this.ta(window.dataLayer||[])},this.updateConsentValue=function(t){t!==G.lead.adOptimizationConsent&&(G.lead.adOptimizationConsent=t,this.ea())},this.ia=function(){G.processedData.jt="",G.lead.adOptimizationConsent="UNSPECIFIED",G.lead.leadStage=""},this.na=function(){window.dataLayer=window.dataLayer||[];let e=window.dataLayer.push;window.dataLayer.push=function(){var t=[].slice.call(arguments,0);return d.app.ta(t),e.apply(window.dataLayer,t)}},this.aa=function(t){console.error("[CAP]: "+t.message)},this.ra=(t,e)=>JSON.stringify({type:t,value:Array.isArray(e)?[...e]:[e]}),this.oa=(e,i)=>Object.keys(e).find(t=>e[t]===i),this.yn=function(t,e){d.app.qe(p.endpoints.customActionProcessing,"POST",this.ra(t,e),this.ia,this.aa,{"Session-ID":G.config.sessionId,"Content-Type":"application/json"})},window.hrs=(()=>{let e=(t,e,i="leadUpdate")=>{window.dispatchEvent(new CustomEvent(i,{detail:{value:e,type:t}}))};return{addLeadTag:function(t){e("addLeadTag",t)},addLeadPhone:function(t){e("addLeadPhone",t)},addLeadConsent:function(t){e("addConsent",t)},addLeadStage:function(t){e("addLeadStage",t)}}})(),this.ca=(t,e)=>window.addEventListener(t,e),this.Ge=()=>{this.ca("leadUpdate",this.sa)},this.sa=t=>{var t=t.detail,e=t.value;switch(t.type){case"addLeadTag":this.ni(e);break;case"addLeadPhone":this.ie(e);break;case"addConsent":this.oi(e);break;case"addLeadStage":this.si(e);break;default:return void _.error("[LU_UT]")}this.ea(t.type,e)},this.ea=(t,e)=>{let i=G.processedData.email||G.processedData.Rt;i&&C.j(i)?G.config.sessionId?(G.processedData.At.includes(i)&&(G.processedData.At=G.processedData.At.filter(t=>t!==i)),d.app.ce(i,p.product.id,d.app.se())):G.processedData.$t=!0:t&&(t=this.oa(M,t),G.config.sessionId?d.app.yn(t,e):(G.processedData.Kt={Rn:t,value:e},_.info("[CAP] Event cached")))}},d.Vt=function(t,e){var i=new URLSearchParams,n=(i.append("script","UNIFIED_TRACKING_SCRIPT"),new XMLHttpRequest);n.open("POST",p.endpoints.errorEndpoint+"?"+i),n.setRequestHeader("Product-ID",p.product.id),""!=G.config.sessionId&&n.setRequestHeader("Session-ID",G.config.sessionId),n.send(e+" - "+(t.stack||t))},d.app.init(function(){d.app.wn(),d.app.Wn(),d.app.Xn(),d.app._e(),d.app.Ne(d.app.Un),d.app.Te(),d.app.Fe(),d.app.Ie(),d.app.Ln(),d.app.be(),d.app.yi(d.app.Fn),d.app.checkAllConsents(),d.app.na(),d.app.pingPongRequest()})}})();