1/** 2 * Combined by jsDelivr. 3 * Original files: 4 * - /npm/@blotoutio/[email protected]/index.min.js 5 * 6 * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files 7 */ 8/** 9 * Minified by jsDelivr using Terser v5.48.0. 10 * Original file: /npm/@blotoutio/[email protected]/index.js 11 * 12 * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files 13 */ 14!function(){"use strict";var e=Object.freeze({__proto__:null,get consent(){return Je},get data(){return Ye},get getConsent(){return et},get getData(){return Ze},get getUserId(){return Xe},get init(){return ze},get isNewUser(){return tt},get keys(){return Qe},get ready(){return at},get setConfig(){return nt},get tag(){return He},get user(){return _e}});const t=e=>"boolean"==typeof e,n=e=>!!e&&"object"==typeof e&&!Array.isArray(e),a=(e,a,o)=>{var i,s;let r=!1;if(n(e.consentChannel)&&(r=!!t(e.consentChannel.all)&&e.consentChannel.all,a in e.consentChannel)){const i=e.consentChannel[a];t(i)?r=i:n(i)&&("all"in i&&t(i.all)&&(r=i.all),o in i&&t(i[o])&&(r=i[o]))}if(r)return!0;if(n(e.consentCategory)&&n(null===(i=e.consentSettings)||void 0===i?void 0:i.channels)){r=!!t(e.consentCategory.all)&&e.consentCategory.all;const n=null===(s=Object.entries(e.consentSettings.channels).find(([,e])=>e.includes(a)))||void 0===s?void 0:s[0];n&&e.consentCategory[n]&&(r=!0)}return r},o=(e,a,o)=>{if(!n(e))return!0;if(a in e){const i=e[a];if(t(i))return i;if(n(i)){const e=Object.keys(i).filter(e=>"all"!=e);return o in i&&t(i[o])?i[o]:t(i.all)?i.all:0==e.length}}const i=Object.keys(e).filter(e=>"all"!=e);return t(e.all)?e.all:0==i.length},i=e=>e.split(",").flatMap(e=>{if(!e.includes("-"))return e;const t=[],[n,a]=e.split("-").map(Number);for(let e=n;e<=a;e++)t.push(e.toString());return t});new Set([...i("200,211,221,222,230,232,233,235,237-238,241,243,244,245,247,255,257,258-259,261,265,266,271,273,274,275,277,278,280,282,283,285-287,288,290-299"),...i("300,311,322,324,327,328,333,335,338,342,344,348-349,353,355,356,357-359,362,366,369,370-379,381,382,383-384,387,388,389,390-399"),...i("400,411,420,421-422,426-427,428,429,433,439,444,446,449,451-454,455,456,457,459,460,461-462,465,466,467,471,476,477,481-483,485-486,487,488,489,490-499"),...i("511,532,535,536,537,538,542-543,545-547,549-550,552-554,555,556,558,560,565,568,569,576,578,583,589,590-599"),...i("611,621,624,625,627,632,633,634-635,637-638,642-643,644,648,652-654,655,663,665,666,668,673-676,677,679,685,686,687,688,690-699"),...i("711,722,723,729,733,735-736,739,741,744,745-746,748,749-751,752,755,756,759,761,764,766,768,776,777,783,788,789,790-799"),...i("811,821,822,823-824,827,834,836,841-842,846,851,852-853,871,874-875,879,880-887,889,890-899"),...i("911,921,922,923,924,926,927,932,933,935,942,944,946,950,953,955,957-958,960-969,974,975,976,977,981-982,987,988,990-999")]);const s=new Map([["AD","Andorra"],["AE","United Arab Emirates"],["AF","Afghanistan"],["AG","Antigua and Barbuda"],["AI","Anguilla"],["AL","Albania"],["AM","Armenia"],["AO","Angola"],["AQ","Antarctica"],["AR","Argentina"],["AS","American Samoa"],["AT","Austria"],["AU","Australia"],["AW","Aruba"],["AX","à land Islands"],["AZ","Azerbaijan"],["BA","Bosnia and Herzegovina"],["BB","Barbados"],["BD","Bangladesh"],["BE","Belgium"],["BF","Burkina Faso"],["BG","Bulgaria"],["BH","Bahrain"],["BI","Burundi"],["BJ","Benin"],["BL","Saint Barthélemy"],["BM","Bermuda"],["BN","Brunei Darussalam"],["BO","Bolivia, Plurinational State of"],["BQ","Bonaire, Sint Eustatius and Saba"],["BR","Brazil"],["BS","Bahamas"],["BT","Bhutan"],["BV","Bouvet Island"],["BW","Botswana"],["BY","Belarus"],["BZ","Belize"],["CA","Canada"],["CC","Cocos (Keeling) Islands"],["CD","Congo, Democratic Republic of the"],["CF","Central African Republic"],["CG","Congo"],["CH","Switzerland"],["CI","Côte d'Ivoire"],["CK","Cook Islands"],["CL","Chile"],["CM","Cameroon"],["CN","China"],["CO","Colombia"],["CR","Costa Rica"],["CU","Cuba"],["CV","Cabo Verde"],["CW","Curaçao"],["CX","Christmas Island"],["CY","Cyprus"],["CZ","Czechia"],["DE","Germany"],["DJ","Djibouti"],["DK","Denmark"],["DM","Dominica"],["DO","Dominican Republic"],["DZ","Algeria"],["EC","Ecuador"],["EE","Estonia"],["EG","Egypt"],["EH","Western Sahara"],["ER","Eritrea"],["ES","Spain"],["ET","Ethiopia"],["EU","European Union"],["FI","Finland"],["FJ","Fiji"],["FK","Falkland Islands (Malvinas)"],["FM","Micronesia, Federated States of"],["FO","Faroe Islands"],["FR","France"],["GA","Gabon"],["GB","Great Britain"],["GD","Grenada"],["GE","Georgia"],["GF","French Guiana"],["GG","Guernsey"],["GH","Ghana"],["GI","Gibraltar"],["GL","Greenland"],["GM","Gambia"],["GN","Guinea"],["GP","Guadeloupe"],["GQ","Equatorial Guinea"],["GR","Greece"],["GS","South Georgia and the South Sandwich Islands"],["GT","Guatemala"],["GU","Guam"],["GW","Guinea-Bissau"],["GY","Guyana"],["HK","Hong Kong"],["HM","Heard Island and McDonald Islands"],["HN","Honduras"],["HR","Croatia"],["HT","Haiti"],["HU","Hungary"],["ID","Indonesia"],["IE","Ireland"],["IL","Israel"],["IM","Isle of Man"],["IN","India"],["IO","British Indian Ocean Territory"],["IQ","Iraq"],["IR","Iran, Islam
14ic Republic of"],["IS","Iceland"],["IT","Italy"],["JE","Jersey"],["JM","Jamaica"],["JO","Jordan"],["JP","Japan"],["KE","Kenya"],["KG","Kyrgyzstan"],["KH","Cambodia"],["KI","Kiribati"],["KM","Comoros"],["KN","Saint Kitts and Nevis"],["KP","Korea, Democratic People's Republic of"],["KR","Korea, Republic of"],["KW","Kuwait"],["KY","Cayman Islands"],["KZ","Kazakhstan"],["LA","Lao People's Democratic Republic"],["LB","Lebanon"],["LC","Saint Lucia"],["LI","Liechtenstein"],["LK","Sri Lanka"],["LR","Liberia"],["LS","Lesotho"],["LT","Lithuania"],["LU","Luxembourg"],["LV","Latvia"],["LY","Libya"],["MA","Morocco"],["MC","Monaco"],["MD","Moldova, Republic of"],["ME","Montenegro"],["MF","Saint Martin (French part)"],["MG","Madagascar"],["MH","Marshall Islands"],["MK","North Macedonia"],["ML","Mali"],["MM","Myanmar"],["MN","Mongolia"],["MO","Macao"],["MP","Northern Mariana Islands"],["MQ","Martinique"],["MR","Mauritania"],["MS","Montserrat"],["MT","Malta"],["MU","Mauritius"],["MV","Maldives"],["MW","Malawi"],["MX","Mexico"],["MY","Malaysia"],["MZ","Mozambique"],["NA","Namibia"],["NC","New Caledonia"],["NE","Niger"],["NF","Norfolk Island"],["NG","Nigeria"],["NI","Nicaragua"],["NL","Netherlands, Kingdom of the"],["NO","Norway"],["NP","Nepal"],["NR","Nauru"],["NU","Niue"],["NZ","New Zealand"],["OM","Oman"],["PA","Panama"],["PE","Peru"],["PF","French Polynesia"],["PG","Papua New Guinea"],["PH","Philippines"],["PK","Pakistan"],["PL","Poland"],["PM","Saint Pierre and Miquelon"],["PN","Pitcairn"],["PR","Puerto Rico"],["PS","Palestine, State of"],["PT","Portugal"],["PW","Palau"],["PY","Paraguay"],["QA","Qatar"],["RE","Réunion"],["RO","Romania"],["RS","Serbia"],["RU","Russian Federation"],["RW","Rwanda"],["SA","Saudi Arabia"],["SB","Solomon Islands"],["SC","Seychelles"],["SD","Sudan"],["SE","Sweden"],["SG","Singapore"],["SH","Saint Helena, Ascension and Tristan da Cunha"],["SI","Slovenia"],["SJ","Svalbard and Jan Mayen"],["SK","Slovakia"],["SL","Sierra Leone"],["SM","San Marino"],["SN","Senegal"],["SO","Somalia"],["SR","Suriname"],["SS","South Sudan"],["ST","Sao Tome and Principe"],["SV","El Salvador"],["SX","Sint Maarten (Dutch part)"],["SY","Syrian Arab Republic"],["SZ","Eswatini"],["TC","Turks and Caicos Islands"],["TD","Chad"],["TF","French Southern Territories"],["TG","Togo"],["TH","Thailand"],["TJ","Tajikistan"],["TK","Tokelau"],["TL","Timor-Leste"],["TM","Turkmenistan"],["TN","Tunisia"],["TO","Tonga"],["TR","Türkiye"],["TT","Trinidad and Tobago"],["TV","Tuvalu"],["TW","Taiwan, Province of China"],["TZ","Tanzania, United Republic of"],["UA","Ukraine"],["UG","Uganda"],["UK","United Kingdom of Great Britain and Northern Ireland"],["UM","United States Minor Outlying Islands"],["US","United States of America"],["UY","Uruguay"],["UZ","Uzbekistan"],["VA","Holy See"],["VC","Saint Vincent and the Grenadines"],["VE","Venezuela, Bolivarian Republic of"],["VG","Virgin Islands (British)"],["VI","Virgin Islands (U.S.)"],["VN","Viet Nam"],["VU","Vanuatu"],["WF","Wallis and Futuna"],["WS","Samoa"],["YE","Yemen"],["YT","Mayotte"],["ZA","South Africa"],["ZM","Zambia"],["ZW","Zimbabwe"]]),r=new Map([["US-AL","Alabama"],["US-AK","Alaska"],["US-AZ","Arizona"],["US-AR","Arkansas"],["US-CA","California"],["US-CO","Colorado"],["US-CT","Connecticut"],["US-DE","Delaware"],["US-FL","Florida"],["US-GA","Georgia"],["US-HI","Hawaii"],["US-ID","Idaho"],["US-IL","Illinois"],["US-IN","Indiana"],["US-IA","Iowa"],["US-KS","Kansas"],["US-KY","Kentucky"],["US-LA","Louisiana"],["US-ME","Maine"],["US-MD","Maryland"],["US-MA","Massachusetts"],["US-MI","Michigan"],["US-MN","Minnesota"],["US-MS","Mississippi"],["US-MO","Missouri"],["US-MT","Montana"],["US-NE","Nebraska"],["US-NV","Nevada"],["US-NH","New Hampshire"],["US-NJ","New Jersey"],["US-NM","New Mexico"],["US-NY","New York"],["US-NC","North Carolina"],["US-ND","North Dakota"],["US-OH","Ohio"],["US-OK","Oklahoma"],["US-OR","Oregon"],["US-PA","Pennsylvania"],["US-RI","Rhode Island"],["US-SC","South Carolina"],["US-SD","South Dakota"],["US-TN","Tennessee"],["US-TX","Texas"],["US-UT","Utah"],["US-VT","Vermont"],["US-VA","Virginia"],["US-WA","Washington"],["US-WV","West Virginia"],["US-WI","Wisconsin"],["US-WY","Wyoming"],["US-DC","District of Columbia"],["US-AS","American Samoa"],["US-GU","Guam"],["US-MP","Northern Mariana Islands"],["US-PR","Puerto Rico"],["US-UM","United States Minor Outlying Islands"],["US-VI","Virgin Islands, U.S."]]
14),l=new Map([["CA-AB","Alberta"],["CA-BC","British Columbia"],["CA-MB","Manitoba"],["CA-NB","New Brunswick"],["CA-NL","Newfoundland and Labrador"],["CA-NS","Nova Scotia"],["CA-NT","Northwest Territories"],["CA-NU","Nunavut"],["CA-ON","Ontario"],["CA-PE","Prince Edward Island"],["CA-QC","Quebec"],["CA-SK","Saskatchewan"],["CA-YT","Yukon"]]);new Set([...s.keys(),...r.keys(),...l.keys()]);const d=new Map,c=(e,t,n,a)=>{if(!e||!a)return!0;let o=d.get(a);o||(o=(e=>{const t=new Set,n=new Set;if(e){const[a="",o=""]=e.split("|");for(const e of a.split(","))e&&t.add(e);for(const e of o.split(","))e&&n.add(e)}return{include:t,exclude:n}})(a),d.set(a,o));const i=[e,`${e}-${t}`];return n&&i.push("EU"),"GB"===e&&i.push("UK"),(!o.include.size||!i.every(e=>!o.include.has(e)))&&(!o.exclude.size||!i.some(e=>o.exclude.has(e)))},u=e=>e&&Object.keys(e).length>0?e:{all:!0},g=(e,t)=>{const n=t.split(".");let a=e;for(const e of n){if(null==a)return;if("object"!=typeof a)return;a=a[e]}return a},p=(e,t,n)=>{const a=t.split(".");let o=e;for(let e=0;e<a.length-1;e++){const n=a[e],i=o[n];if(void 0===i)o[n]={};else{if(null!==i&&"object"!=typeof i)return void console.log(`Cannot set nested path "${t}": "${a.slice(0,e+1).join(".")}" is already a ${typeof i} and cannot be converted to an object`);o[n]||(o[n]={})}o=o[n]}o[a[a.length-1]]=n},f=(e,t)=>{const n=t.split(".");let a=e;for(let e=0;e<n.length-1;e++){const t=n[e],o=a[t];if(null===o||"object"!=typeof o)return;a=a[t]}delete a[n[n.length-1]]},m=(e,t,n={})=>{let a;if(e.field.startsWith("user.")){const t=e.field.replace("user.","");a=g(n,t)}else if(e.field.startsWith("payload.")){const n=e.field.replace("payload.","");if(n.includes("[]")){const[e,o]=n.split("[]"),i=g(t,e);if(Array.isArray(i)){const e=o.startsWith(".")?o.slice(1):o;a=i.flatMap(t=>"object"==typeof t&&null!==t?t[e]:[])}else a=void 0}else a=g(t,n)}else a=g(t.data,e.field);const o=e.operator,i=e.value;switch(o){case"equals":return a===i;case"notEquals":return a!==i;case"greaterThan":return"number"==typeof a&&"number"==typeof i&&a>i;case"greaterThanOrEqual":return"number"==typeof a&&"number"==typeof i&&a>=i;case"lessThan":return"number"==typeof a&&"number"==typeof i&&a<i;case"lessThanOrEqual":return"number"==typeof a&&"number"==typeof i&&a<=i;case"contains":return Array.isArray(a)?"string"==typeof i&&a.some(e=>"string"==typeof e&&e===i):"string"==typeof a&&"string"==typeof i&&a.includes(i);case"notContains":return Array.isArray(a)?"string"==typeof i&&!a.some(e=>"string"==typeof e&&e===i):"string"==typeof a&&"string"==typeof i&&!a.includes(i);case"in":return Array.isArray(a)?Array.isArray(i)&&a.some(e=>i.includes(e)):Array.isArray(i)&&i.some(e=>e===a);case"notIn":return Array.isArray(a)?Array.isArray(i)&&!a.some(e=>i.includes(e)):Array.isArray(i)&&!i.some(e=>e===a);case"startsWith":return"string"==typeof a&&"string"==typeof i&&a.startsWith(i);case"endsWith":return"string"==typeof a&&"string"==typeof i&&a.endsWith(i);case"isNull":return null==a;case"isNotNull":return null!=a;default:return!1}},v=(e,t,n,a={})=>0===e.length||("AND"===t?e.every(e=>m(e,n,a)):e.some(e=>m(e,n,a))),h=(e,t,n)=>{const a=structuredClone(t);a.data||(a.data={});const o=null!=n?n:a.providers,i=u(o);let s=!1,r=!1;const l=[];for(const t of e)switch(t.type){case"skipEvent":s=!0;break;case"skipBrowserEvent":r=!0;break;case"skipProviders":if(t.providers&&i)for(const e of t.providers)i[e]=!1;break;case"updatePayloadField":if(t.fieldPath&&void 0!==t.fieldValue){const e=t.fieldPath.startsWith("data.")?t.fieldPath:`data.${t.fieldPath}`;p(a.data,e.replace("data.",""),t.fieldValue)}break;case"addPayloadField":if(t.fieldPath&&void 0!==t.fieldValue){const e=t.fieldPath.startsWith("data.")?t.fieldPath:`data.${t.fieldPath}`;p(a.data,e.replace("data.",""),t.fieldValue)}break;case"removePayloadField":if(t.fieldPath){const e=t.fieldPath.startsWith("data.")?t.fieldPath:`data.${t.fieldPath}`;f(a.data,e.replace("data.",""))}break;case"createAdditionalEvents":t.additionalEvents&&l.push(...t.additionalEvents)}return void 0!==i&&(a.providers=i),{updatedPayload:a,updatedProviders:i,skipEvent:s,skipBrowserEvent:r,additionalEvents:l}},w=e=>function(e,t){try{if(e)return JSON.parse(e)}catch{}return t}(JSON.stringify(e),void 0);new Set([...[{param:"fbclid",label:"Facebook"},{param:"gclid",label:"Google"},{param:"gbraid",label:"Google"},{param:"wbraid",label:"Google"},{param:"msclkid",label:"Bing"},{param:"ttclid",label:"TikTok"},{param:"ScCid",label:"Snapchat"},{param:"epik",label:"Pinterest"},{param:"li_fat_id",label:"LinkedIn"}
14,{param:"twclid",label:"Twitter"},{param:"rdt_cid",label:"Reddit"},{param:"aleid",label:"AppLovin"},{param:"tabclid",label:"Taboola"},{param:"obclid",label:"Outbrain"},{param:"trybe",label:"Trybe"},{param:"_kx",label:"Klaviyo"},{param:"mc_eid",label:"Mailchimp"},{param:"ttd_id",label:"The Trade Desk"},{param:"evsclid",label:"EvoSearch"},{param:"li_did",label:"Live Intent"},{param:"_raclid",label:"Rumble"},{param:"ref_id",label:"StackAdapt"},{param:"duel_a",label:"Duel"}].map(e=>e.label),...Object.values({google:"Google",adwords:"Google",youtube:"Google",yt:"Google",meta:"Facebook",facebook:"Facebook",instagram:"Facebook",ig:"Facebook",igshopping:"Facebook",threads:"Facebook",twitter:"Twitter",snapchat:"Snapchat",pinterest:"Pinterest",bing:"Bing",microsoft:"Bing",tiktok:"TikTok",rtbhouse:"RTB House",applovin:"AppLovin",ttd:"The Trade Desk",amazondsp:"Amazon DSP",axon:"Axon",duel:"Duel",awin:"Awin","affiliate-cj":"CJ Affiliate",impact:"Impact",rakuten:"Rakuten",superfiliate:"Superfiliate",perplexity:"Perplexity",chatgpt:"ChatGPT","chatgpt.com":"ChatGPT",openai:"ChatGPT","copilot.com":"Microsoft Copilot",copilot:"Microsoft Copilot",applenews:"Apple News",whatsapp:"WhatsApp",podcast:"Podcast",mailchimp:"Mailchimp",omnisend:"Omnisend",iterable:"Iterable",listrak:"Listrak",sailthru:"Sailthru",pushowl:"PushOwl",narvar:"Narvar",shop_app:"Shop App",salesforce:"Salesforce",yotpo:"Yotpo"}
14),...[{prefix:"tiktok",name:"TikTok"},{prefix:"criteo",name:"Criteo"},{prefix:"klaviyo",name:"Klaviyo"},{prefix:"attentive",name:"Attentive"},{prefix:"postscript",name:"Postscript"},{prefix:"afterpay",name:"Afterpay"},{prefix:"klarna",name:"Klarna"}].map(e=>e.name),...[{match:"google",name:"Google"},{match:"bing",name:"Bing"},{match:"yahoo",name:"Yahoo"},{match:"duckduckgo",name:"DuckDuckGo"},{match:"baidu",name:"Baidu"},{match:"yandex",name:"Yandex"},{match:"brave",name:"Brave"}].map(e=>`Organic Search - ${e.name}`),...[{match:"facebook",name:"Facebook"},{match:"instagram",name:"Facebook"},{match:"twitter",name:"Twitter"},{match:"x.com",name:"Twitter"},{match:"tiktok",name:"TikTok"},{match:"pinterest",name:"Pinterest"},{match:"linkedin",name:"LinkedIn"},{match:"youtube",name:"YouTube"},{match:"chatgpt",name:"ChatGPT"},{match:"claude",name:"Claude"},{match:"perplexity",name:"Perplexity"},{match:"shop.app",name:"Shop App"},{match:"amazon",name:"Amazon"},{match:"attentive",name:"Attentive"}].map(e=>`Referral - ${e.name}`),"Referral - Other","Direct Traffic","Other","Blotout_Offline"]);const y=()=>{var e;return null!==(e=globalThis.edgeTagSettings)&&void 0!==e?e:globalThis.edgeTagSettings={}},S=(e,t)=>{const n=y();e?n[e]={...n[e],...t}:Object.keys(n).forEach(e=>{n[e]={...n[e],...t}})},b=(e,t)=>{var n;return null===(n=y()[e])||void 0===n?void 0:n[t]},C=()=>Object.keys(y()),U=(e,t)=>{const n=b(e,"manifest");return n&&n.filter(e=>e.package===t).map(e=>({tagName:e.tagName,geoRegions:e.geoRegions||null,variableSet:e.variables||{}}))||[]},N=()=>{try{return navigator.userAgent}catch{return""}},k=e=>{let t="";try{const n=new URL(document.referrer),a=new URL(I(e));return n.host!==a.host&&(t=n.href),t}catch(e){return t}},I=e=>{const t=b(e,"config");let n=(null==t?void 0:t.pageUrl)||"";try{if(window.edgetagData&&window.edgetagData.pageUrl)return window.edgetagData.pageUrl;n||(n=window.location.href)}catch{}return n},P=e=>{try{return new URL(I(e)).search}catch{return""}},E=()=>{try{return navigator.language}catch{return""}},A=()=>{try{return document.title}catch{return""}},R=(e,t)=>{if(typeof e!=typeof t||Array.isArray(e)!==Array.isArray(t)||isNaN(e)!==isNaN(t))return!1;if("object"!=typeof e||null===e)return e===t;const n=Object.keys(e),a=Object.keys(t);if(n.length!==a.length)return!1;for(const a of n){if(!(a in t))return!1;if(!R(e[a],t[a]))return!1}return!0},M=(e,t)=>({destination:e,userId:t.userId,isNewUser:t.isNewUser,consent:t.consent,consentCategories:t.consentCategories,consentSetting:t.consentSetting,session:t.session,geoCountry:t.geoCountry,geoRegion:t.geoRegion,userIP:t.ip,isEURequest:t.isEURequest}),T=(e,t)=>{const n={};t.email&&(n.hasEmail=!0),t.phone&&(n.hasPhone=!0),"string"==typeof t.isNewCustomer&&(n.isNewCustomer="true"===t.isNewCustomer);const a=b(e,"userProperties");S(e,{userProperties:{...a,...n}})},B="edgeTag",L="consent",G="consentCategories",D="_worker",O="fallback_tag_user_id",$="storageId",F=()=>parseInt((1e10*Math.random()).toString(),10),K=e=>{let t=Date.now().toString();if("undefined"!=typeof performance&&"function"==typeof performance.now){const e=performance.now();e&&(t=e.toFixed(4))}return`${(e=>"undefined"==typeof btoa?Buffer.from(e).toString("base64"):btoa(e))(e).replace(/[^a-zA-Z0-9]/g,"")}-${(()=>{let e="";try{if(e=crypto.randomUUID(),!e){const t=new Uint32Array(20),n=crypto.getRandomValues(t);for(let t=0;t<5;t++){const a=3*t;0!==t&&(e+="-"),e+=(n[a+1]+n[a+2]+n[a+3]).toString()}}}catch{e=`${F()}-${F()}-${F()}-${F()}-${F()}`,console.log("[EdgeTag] Crypto module not found")}return e})()}-${t}`},V=e=>{var t;try{if(!document||!document.cookie)return"";return null!==(t=j(document.cookie)[e])&&void 0!==t?t:""}catch{return""}},j=e=>Object.fromEntries(e.split(/;\s+/).map(e=>e.split("=").map(e=>e.trim())).map(([e,...t])=>{const n=t.join("=");if(!e)return[];let a="";if(n)try{a=decodeURIComponent(n)}catch(t){console.log(`Unable to decode cookie ${e}: ${t}`),a=n}return[e,a]})),x=()=>{try{return"1"===localStorage.getItem("edgeTagDebug")}catch{return!1}},q="[EdgeTag]",W=(...e)=>{x()&&console.log(q,...e)},z=(...e)=>{x()&&console.error(q,...e)},H=`${D}StoreMultiple`,J=(e,t,n,a,o)=>{const i=X(e,t);i.data||(i.data={}),i.data[n]||(i.data[n]={}),i.data[n][o]=a,Q(e,t,i)},_=(e,t)=>
14{const n=X(e,"session");n.kv||(n.kv={}),n.kv={...n.kv,...t},Q(e,"session",n)},Y=(e,t,n,a,o)=>{const i=X(e,t);i[n]||(i[n]={}),i[n][o]=a,Q(e,t,i)},Z=(e,t,n,a)=>{const o=X(e,t);if(o[n])return o[n][a]},Q=(e,t,n,a=H)=>{if("session"===t){const t=ae(a);return t[e]=n,void ne(t,a)}const o=te(a);o[e]=n,ee(o,a)},X=(e,t,n=H)=>{let a;return a="session"===t?ae(n):te(n),(null==a?void 0:a[e])||{}},ee=(e,t)=>{try{if(!localStorage)return;localStorage.setItem(t,JSON.stringify(e))}catch{W("Local storage not supported.")}},te=e=>{try{if(!localStorage)return{};const t=localStorage.getItem(e);return t&&JSON.parse(t)||{}}catch{return{}}},ne=(e,t)=>{try{if(!sessionStorage)return;sessionStorage.setItem(t,JSON.stringify(e))}catch{W("Session storage not supported.")}},ae=e=>{try{if(!sessionStorage)return{};const t=sessionStorage.getItem(e);return t&&JSON.parse(t)||{}}catch{return{}}},oe=e=>{const t=b(e,"userId");return t||V("tag_user_id")},ie=(e,t)=>{try{let n;return t&&(n=new Blob([JSON.stringify(t)],{type:"application/json"})),navigator.sendBeacon(e,n)}catch(e){return Promise.reject(new Error("Beacon not supported."))}},se=(e,t,n,a)=>fetch(n,{method:t,headers:{"Content-type":"application/json; charset=utf-8",Accept:"application/json; charset=utf-8",EdgeTagUserId:oe(e)},body:JSON.stringify(a),credentials:"include"}).then(e=>e.json().then(t=>({status:e.status,body:t}))).then(({status:e,body:t})=>{if(e<200||e>=300)throw new Error(`Request failed with code ${e}: ${JSON.stringify(t)}`);return Promise.resolve(t)}),re=(e,t)=>{const n={pageUrl:I(e),pageTitle:A(),userAgent:N(),referrer:k(e),search:P(e),locale:E(),sdkVersion:"1.70.2",...t||{}};let a={};const o=X(e,"session");o&&(a={...a,...o});const i=X(e,"local");return i&&(a={...a,...i}),n.storage=a,n};async function le(e,t,n){if(!e)return Promise.reject(new Error("URL is empty."));const a=new URL(e).origin,o=re(a,t);return n&&"beacon"===n.method?Promise.resolve(ie(e,o)):await se(a,"POST",e,o)}async function de(e,t){if(!e)return Promise.reject(new Error("URL is empty."));if(t&&"beacon"===t.method)return{result:Promise.resolve(ie(e))};const n=new URL(e).origin;return await se(n,"GET",e)}const ce=(e,t)=>e?`${e}${t}`:(W("URL is not valid"),""),ue=e=>{const t=Z(e,"local",B,L);return t||b(e,"consent")},ge=e=>{const t=Z(e,"local",B,G);return t||b(e,"consentCategories")},pe=(e,t)=>{const n=b(e,"stubs")||[];S(e,{stubs:[...n,t]})},fe=(e,t)=>{const n=e.currency;if(!n||!t)return null;const a=t.rates.find(e=>e.from===n);if(!a)return null;const o=(e,t)=>{const n=parseFloat(e[t]);n&&(e[t]=parseFloat((n*a.value).toFixed(3)))};if(e.currency=a.to,o(e,"value"),o(e,"grossValue"),o(e,"taxCost"),o(e,"shippingCost"),e.predicted_ltv){const t=parseFloat(e.predicted_ltv);t&&(e.predicted_ltv=parseFloat((t*a.value).toFixed(3)).toString())}if("contents"in e&&Array.isArray(e.contents))for(const t of e.contents)o(t,"item_price"),o(t,"discount_value");return{providers:t.providers,payload:e}},me=(e,t,n)=>{de(((e,t)=>ce(e,`/data?keys=${encodeURIComponent(t.join(","))}`))(e,t)).then(e=>{n((null==e?void 0:e.result)||{})}).catch(z)},ve=(e,{eventName:t,eventId:n,data:a,providerData:o,providers:i,options:s,configuratorProcessed:r})=>{const l={eventName:t,eventId:n,timestamp:Date.now(),data:a,providerData:o,configuratorProcessed:r};i&&(l.providers=i),le(((e,t,n)=>{const a=new URL(ce(e,"/tag"));return(null==n?void 0:n.sync)&&a.searchParams.set("sync","true"),t&&a.searchParams.set("name",t),a.toString()})(e,t,s),l,s).catch(z)},he=(e,t,n)=>{if(!e)return!0;const a=e.scripts.length>0;if(n&&a)return e.scripts.includes(`${t}||${n}`);const o=0===e.providers.length&&!a,i=e.scripts.some(e=>e.split("||")[0]===t);return o||e.providers.includes(t)||i},we=(e,t)=>{if(!e||0===e.scripts.length&&0===e.providers.length)return null;const n=new Set;for(const t of e.scripts)n.add(t);for(const a of e.providers){const e=t.get(a);if(e)for(const t of e)n.add(`${a}||${t}`)}return n},ye=(e,t,n,a)=>{const o=(e=>{if(!e||0===e.scripts.length&&0===e.providers.length)return;const t={};for(const n of e.scripts){const e=n.indexOf("||");if(-1===e)continue;const a=n.slice(0,e),o=n.slice(e+2),i=t[a];i&&!0!==i?i[o]=!0:t[a]={[o]:!0}}for(const n of e.providers)n in t||(t[n]=!0);return t})(null==t?void 0:t[e.name]);for(const t of a)Ne(t.eventName,t.data,o,void 0,e.name,n)},Se={root:0,channel:1,instance:2},be=(e,t,n,a)=>
14e===t&&Se[a]<=Se[null!=n?n:"instance"],Ce=async(e,t,n,a)=>{var o,i;const s=a.payload;let r=s.eventName,l=s.data,d=a.providers,c=!1;for(const u of e){const e=u.rules[t];if(e)try{const g=await e({...a,payload:{...s,eventName:r,data:w(l)},variables:u.variables||{}});(null==g?void 0:g.additionalEvents)&&ye(u,n,"tagChannel"===t?"channel":"instance",g.additionalEvents),(null==g?void 0:g.skipEvent)&&(c=!0),(null===(o=null==g?void 0:g.payload)||void 0===o?void 0:o.eventName)&&(r=g.payload.eventName),(null===(i=null==g?void 0:g.payload)||void 0===i?void 0:i.data)&&(l=g.payload.data),void 0!==(null==g?void 0:g.providers)&&(d=g.providers)}catch(e){z(`Plugin ${u.name} ${t} error: ${e}`)}}return{eventName:r,data:l,providers:d,skip:c}},Ue=async(e,t,n={},i,s,r,l)=>{var d,g;let p=t;if(!b(e,"initialized"))return void pe(e,{name:"tag",arguments:[t,n,i,s]});let f=n.eventId;f||(f=K(p));const m=b(e,"browserPackages"),y=b(e,"channels"),S=b(e,"skipZeroPurchaseEvent")||!1,C=b(e,"geoCountry")||null,N=b(e,"geoRegion")||null,k=b(e,"isEURequest")||!1,P=b(e,"sessionId"),E=oe(e),A={},R=ue(e),M=ge(e),T={consentChannel:R,consentCategory:M,consentSettings:b(e,"consentSetting")},B=b(e,"ip")||null,L=b(e,"userProperties");if(S&&(e=>{var t;return"Purchase"==e.eventName&&0===parseFloat(null===(t=e.data)||void 0===t?void 0:t.value)})({eventName:t,data:n}))return;const G=w(n),D=w(i),O=((e,t,n,a={})=>{let o=t;const i=null!=n?n:t.providers;let s=u(i),r=!1,l=!1;const d=[];try{for(const t of e)if(v(t.conditions||[],t.logicalOperator||"AND",o,a)){const e=t.actions||[],n=h(e,o,s);o=n.updatedPayload,s=n.updatedProviders,d.push(...n.additionalEvents),n.skipEvent&&(r=!0),n.skipBrowserEvent&&(l=!0)}}catch(e){console.error("Error evaluating event rules:",e)}return{updatedPayload:o,updatedProviders:s,skipEvent:r,skipBrowserEvent:l,additionalEvents:d}})(b(e,"configuratorSetting")||[],w({eventName:t,data:n}),null!=i?i:void 0,L||{});if(O.skipEvent)W("Event skipped by event rules");else{O.updatedPayload&&(n=O.updatedPayload.data),O.updatedProviders&&(i=O.updatedProviders);const t=(e=>{var t,n,a;try{return(null===(a=null===(n=null===(t=globalThis.edgetag)||void 0===t?void 0:t.destinations)||void 0===n?void 0:n[e])||void 0===a?void 0:a.plugins)||[]}catch{return[]}})(e),u=b(e,"pluginScopes"),v={userId:E,sessionId:P,geoCountry:C,geoRegion:N,isEURequest:k,ip:B,consent:R,consentCategories:M,userProperties:L},h=re(e),S={getIsNewCustomerFlag:()=>(async e=>{const{isNewCustomer:t}=await new Promise(t=>e(["isNewCustomer"],t));return t?"true"===t:void 0})(me.bind(null,e))};let G=new Set;if(t.length>0){const e=await(async(e,t,n,a,o,i)=>{var s,r;const l=t.payload;let d=l.eventName,c=l.data,u=t.providers;const g=new Set;for(const p of e){if(be(p.name,o,i,"root"))continue;const e=p.rules.tagRoot;if(e)try{const o=await e({...t,payload:{...l,eventName:d,data:w(c)},variables:p.variables||{}});if((null==o?void 0:o.additionalEvents)&&ye(p,n,"root",o.additionalEvents),null==o?void 0:o.skipEvent){const e=we(null==n?void 0:n[p.name],a);if(null===e)for(const[e,t]of a)for(const n of t)g.add(`${e}||${n}`);else for(const t of e)g.add(t)}(null===(s=null==o?void 0:o.payload)||void 0===s?void 0:s.eventName)&&(d=o.payload.eventName),(null===(r=null==o?void 0:o.payload)||void 0===r?void 0:r.data)&&(c=o.payload.data),void 0!==(null==o?void 0:o.providers)&&(u=o.providers)}catch(e){z(`Plugin ${p.name} tagRoot error: ${e}`)}}return{eventName:d,data:c,providers:u,skippedInstances:g}})(t,{payload:{eventName:p,data:n,eventId:f},context:h,providers:i,settings:v,utilities:S},u,y,r,l);void 0!==e.providers&&(i=e.providers),p=e.eventName,n=e.data,G=e.skippedInstances}if(O.skipBrowserEvent)W("Browser events skipped by event rules, sending tag to server only");else{const s=b(e,"currency");for(const b of m){if(!b||!b.name||!b.tag)continue;if(!y.has(b.name)){W(`Provider ${b.name} is not in allow list`);continue}const m=b.name,R=U(e,b.name),M=new Map;for(const e of R)M.set(e.tagName,{eventName:p,data:n,skipped:G.has(`${m}||${e.tagName}`)});const L=t.filter(e=>!be(e.name,r,l,"channel")&&he(null==u?void 0:u[e.name],m,null));if(L.length>0){const e=await Ce(L,"tagChannel",u,{payload:{eventName:p,data:n,eventId:f},context:h,settings:v,providerId:m,utilities:S});for(const t of R){const n=M.get(t.tagName);e.skip&&(n.skipped=!0),n.eventName=e.eventName,n.data=w(e.data)}}const D={},O=new Map;for(const n of R){const p=M.get(n.tagName);if(!o(i,m,n.tagName)){W(`Provider instance is not allowed (${m}: ${n.tagName})`);continue}if(!a(T,m,n.tagName)){W(`Consent is missing (${m}: ${n.tagName})`);continue}
14if(!c(C,N,k,n.geoRegions)){W("GEO request region does not match the filter, skipping");continue}const y=t.filter(e=>!be(e.name,r,l,"instance")&&he(null==u?void 0:u[e.name],m,n.tagName));if(y.length>0){const e=await Ce(y,"tagInstance",u,{payload:{eventName:p.eventName,data:p.data,eventId:f},context:h,settings:v,providerId:m,utilities:S});e.skip&&(p.skipped=!0),p.eventName=e.eventName,p.data=e.data}if(p.skipped){W(`Skipping event due to plugin condition (${m}: ${n.tagName})`);continue}const U=fe(w(p.data),s),A=0===(null===(d=null==U?void 0:U.providers)||void 0===d?void 0:d.length)||(null===(g=null==U?void 0:U.providers)||void 0===g?void 0:g.includes(m))?U.payload:p.data;try{D[n.tagName]=await Promise.resolve(b.tag({userId:E,sessionId:P,eventName:p.eventName,eventId:f,data:w(A),sendTag:ve.bind(null,e),getEdgeData:me.bind(null,e),manifestVariables:n.variableSet,executionContext:O,destination:e,geoCountry:C,geoRegion:N,isEURequest:k,ip:B,pageUrl:I(e)}))}catch(e){z(`Provider ${m} tag error (${n.tagName}): ${e}`)}}Object.keys(D).length>0&&(A[m]=D)}}ve(e,{configuratorProcessed:!0,eventName:p,eventId:f,data:n,providerData:A,providers:i,options:s})}const $=O.additionalEvents||[];for(const e of $)Ne(e,w(G||{}),D,s)},Ne=(e,t={},n,a,o,i)=>{(null==a?void 0:a.destination)?Ue(a.destination,e,t,n,a,o,i).catch(z):C().forEach(s=>{Ue(s,e,t,n,a,o,i).catch(z)})},ke=(e,t,n,i)=>{_(e,t),T(e,t);const s=b(e,"browserPackages"),r=b(e,"channels"),l=oe(e),d=b(e,"geoCountry")||null,u=b(e,"geoRegion")||null,g=b(e,"isEURequest")||!1,p={consentChannel:ue(e),consentCategory:ge(e),consentSettings:b(e,"consentSetting")};for(const i of s){if(!i||!i.user||!i.name)continue;if(!r.has(i.name)){W(`Provider ${i.name} is not in allow list`);continue}const s=U(e,i.name);for(const r of s)o(n,i.name,r.tagName)?a(p,i.name,r.tagName)?c(d,u,g,r.geoRegions)?i.user({userId:l,data:t,manifestVariables:r.variableSet,destination:e}):W("GEO request region does not match list, skipping"):W(`Consent is missing for ${i.name} (${r.tagName})`):W(`Data not allowed for ${i.name} (${r.tagName})`)}le((e=>ce(e,"/data"))(e),{data:t,providers:n},i).catch(z)},Ie=(e,t,n)=>{e&&0!==Object.keys(e).length?(null==n?void 0:n.destination)?ke(n.destination,e,t,n):C().forEach(a=>{ke(a,e,t,n)}):z("Provide data for data API.")},Pe=(e,t,n)=>{S(e,{consent:t,consentCategories:n}),Y(e,"local",B,t,L),Y(e,"local",B,n,G)},Ee=(e,t,n,o)=>{const i=ue(e),s=ge(e);if(R(i,t)&&R(s,n))return;if(!b(e,"initialized"))return void pe(e,{name:"consent",arguments:[t,n,o]});const r={consentString:t,consentCategories:{...n,necessary:!0}};Pe(e,t,n),(null==o?void 0:o.localSave)||le((e=>ce(e,"/consent"))(e),r).catch(z);const l=oe(e),d=b(e,"browserPackages"),u=new Map,g=b(e,"geoCountry")||null,p=b(e,"geoRegion")||null,f=b(e,"isEURequest")||!1,m=b(e,"ip")||null,v=b(e,"consentSetting");for(const o of d){if(!o||!o.name||!o.init)continue;const i=U(e,o.name);for(const s of i){a({consentChannel:t,consentCategory:n,consentSettings:v},o.name,s.tagName)&&(c(g,p,f,s.geoRegions)&&o.init({userId:l,isNewUser:!1,baseUrl:e,manifest:{tagName:s.tagName,variables:s.variableSet,package:o.name,geoRegions:s.geoRegions},sendTag:ve.bind(null,e),sendEdgeData:ke.bind(null,e),getEdgeData:me.bind(null,e),keyName:`${D}Store`,executionContext:u,session:null,destination:e,consentData:{consent:t,categories:{...n,necessary:!0},consentSettings:v},geoCountry:g,geoRegion:p,isEURequest:f,ip:m,pageUrl:I(e)}))}}try{window.dispatchEvent(new CustomEvent("edgetag-consent",{detail:{destination:e,oldConsent:i,newConsent:t,oldConsentCategories:s,newConsentCategories:n}}))}catch{}for(const a of Object.values(d)){if(!a||!a.name||!a.consent)continue;const o=U(e,a.name);a.consent({consentData:{consent:t,categories:{...n,necessary:!0},consentSettings:v},variables:o})}},Ae=e=>{var t;if(!e)return null;if(!e.edgeURL)return z("Please provide URL for EdgeTag"),null;const n={};null===(t=e.providers)||void 0===t||t.forEach(e=>{e.name&&(n[e.name]=e)});try{window&&Array.isArray(window.edgetagProviders)&&window.edgetagProviders.forEach(e=>{e.name&&(n[e.name]=e)})}catch{}return((e,t)=>{var n,a,o,i,s,r,l,d;const c=y(),u=c[e];c[e]={destination:e,initialized:null!==(n=null==u?void 0:u.initialized)&&void 0!==n&&n,stubs:null!==(a=null==u?void 0:u.stubs)&&void 0!==a?a:[],browserPackages:null!==(o=null==u?void 0:u.browserPackages)&&void 0!==o?o:[],channels:null!==(i=null==u?void 0:u.channels)&&void 0!==i?i:new Map,geoCountry:null!==(s=null==u?void 0:u.geoCountry)&&void 0!==s?s:null,geoRegion:null!==(r=null==u?void 0:u.geoRegion)&&void 0!==r?r:null,isEURequest:null!==(l=null==u?void 0:u.isEURequest)&&void 0!==l&&l,ip:(null==u?void 0:u.ip)||null,consentSetting:null!==(d=null==u?void 0:u.consentSetting)&&void 0!==d?d:{enabled:!1,channels:{}},...t}})(e.edgeURL,{disableConsent:!!e.disableConsentCheck}),n},Re=`${D}Cache`,Me=e=>e,Te=(e,t,n,a)=>
14{if(!n)return;let o=n;if("string"!=typeof n)try{o=JSON.stringify(n)}catch{return void W("Error stringify value.")}Ie({[`${a}::${t}`]:o},void 0,{destination:e})},Be=(e,t,n,a,o,i)=>{let s;try{switch(o){case"cookie":s=(null!=i?i:Me)(V(n));break;case"local":s=(null!=i?i:Me)(localStorage.getItem(n));break;case"session":s=(null!=i?i:Me)(sessionStorage.getItem(n))}}catch{return}if(!s)return;const r=`${oe(e)}/${n}`,l=((e,t,n,a)=>{var o;return null===(o=X(e,"edge"===t?"local":t,Re)[n])||void 0===o?void 0:o[a]})(e,a,t,r);if("edge"===a&&l!==s)return Te(e,n,s,t),void((e,t,n,a,o)=>{const i="edge"===t?"local":t,s=X(e,i,Re);s[n]?s[n][a]=o:s[n]={[a]:o},Q(e,i,s,Re)})(e,a,t,r,s);J(e,a,t,s,n)},Le=(e,t,n,a)=>{n.forEach(n=>{switch(n.type){case"query":((e,t,n,a,o)=>{try{if(!window)return}catch{return}const i=new URLSearchParams(P(e));if(!i||!i.get(n))return;const s=(null!=o?o:Me)(i.get(n));s&&("edge"!==a?J(e,a,t,s,n):Te(e,n,s,t))})(e,t,n.key,n.persist,null==a?void 0:a.bind(null,n));break;case"storage":Be(e,t,n.key,n.persist,n.location,null==a?void 0:a.bind(null,n))}})},Ge=`${D}Store`,De=(t,n)=>{const o=b(t,"browserPackages"),i=oe(t),s=new Map,r=n.result,l={consentChannel:ue(t),consentCategory:ge(t),consentSettings:b(t,"consentSetting")};r.forEach(e=>{((e,t,n)=>{((e,t,n,a)=>{const o=e.has(t)?e.get(t):a();e.set(t,n(o))})(b(e,"channels"),t,e=>e.add(n),()=>new Set)})(t,e.package,e.tagName);const r=o.find(t=>t.name===e.package);if(e.rules&&Object.entries(e.rules).forEach(([n,a])=>{"capture"!==n||Le(t,e.package,a,null==r?void 0:r.capture)}),r&&r.name&&r.init){a(l,r.name,e.tagName)&&c(n.geoCountry,n.geoRegion,n.isEURequest,e.geoRegions)&&r.init({userId:i,isNewUser:!!n.isNewUser,session:n.session,baseUrl:t,manifest:e,sendTag:ve.bind(null,t),sendEdgeData:ke.bind(null,t),getEdgeData:me.bind(null,t),keyName:Ge,executionContext:s,destination:t,consentData:{consent:n.consent,categories:n.consentCategories,consentSettings:n.consentSetting},geoCountry:n.geoCountry,geoRegion:n.geoRegion,isEURequest:n.isEURequest,ip:n.ip,pageUrl:I(t)})}}),S(t,{initialized:!0});try{const e=M(t,n);window.dispatchEvent(new CustomEvent("edgetag-boot",{detail:e}))}catch{}(t=>{try{b(t,"stubs").forEach(t=>e[t.name](...t.arguments||[])),S(t,{stubs:[]})}catch(e){z(e)}})(t)},Oe=e=>async t=>{await t(e)},$e=new Set,Fe=new Set,Ke=e=>{for(const t of e)"rejected"===t.status&&console.error("ready callback error:",t.reason)},Ve=e=>{const t=Ae(e);if(!t)return;let n;try{if(n=e.fallbackUserId,!n){const e=sessionStorage.getItem(O);if(e)n=e;else{const e=crypto.randomUUID();e&&(n=`${e}-${Date.now()}`,sessionStorage.setItem(O,n))}}}catch{}e.afterManifestEvents&&S(e.edgeURL,{stubs:e.afterManifestEvents});const a=new URL((o=e.edgeURL,ce(o,"/init")));var o;let i;e.disableConsentCheck&&(a.searchParams.set("consentDisabled","true"),Pe(e.edgeURL,{all:!0},{all:!0})),e.userId&&(S(e.edgeURL,{userId:e.userId}
14),a.searchParams.set("userId",e.userId)),n&&a.searchParams.set("fallbackUserId",n),i=null!=e.storageId?e.storageId:Z(e.edgeURL,"local",B,$),null==i||isNaN(i)||a.searchParams.set("storageId",i.toString()),e.sessionId&&a.searchParams.set("sessionId",e.sessionId),a.searchParams.set("pageUrl",I(e.edgeURL));const s=k(e.edgeURL);s&&a.searchParams.set("referrer",s),de(a.href).then(n=>{var a;if(!n)return void z("Initialization failed");n.isNewUser&&n.consent&&Pe(e.edgeURL,n.consent,n.consentCategories);const o={};null===(a=n.result)||void 0===a||a.forEach(e=>{const n=t[e.package];n&&(o[e.package]=n)}),S(e.edgeURL,{isNewUser:n.isNewUser,consent:ue(e.edgeURL)||n.consent,userId:n.userId,sessionId:n.session.sessionId,manifest:n.result,browserPackages:Object.values(o),storageId:n.storageId,currency:n.currency,skipZeroPurchaseEvent:n.skipZeroPurchaseEvent,greySwitch:n.greySwitch,greySwitchEuUk:n.greySwitchEuUk,geoCountry:n.geoCountry,geoRegion:n.geoRegion,isEURequest:n.isEURequest,consentSetting:n.consentSetting,configuratorSetting:n.configuratorSetting,userProperties:n.userProperties,ip:n.ip,pluginScopes:n.pluginScopes}),null!=n.storageId&&Y(e.edgeURL,"local",B,n.storageId,$),De(e.edgeURL,n);const i=M(e.edgeURL,n);try{"undefined"!=typeof window&&"undefined"!=typeof CustomEvent&&window.dispatchEvent(new CustomEvent("edgetag-initialized",{detail:i}))}catch(e){z(e)}(async e=>{const t={destination:e.destination,userId:e.userId,sessionId:e.session.sessionId,isNewUser:e.isNewUser,isNewSession:e.session.isNewSession,consent:e.consent,consentCategories:e.consentCategories,consentSetting:e.consentSetting,geoCountry:e.geoCountry,geoRegion:e.geoRegion,userIP:e.userIP,isEURequest:e.isEURequest};Fe.add(t),await Promise.allSettled([...$e].map(Oe(t))).then(Ke)})(i)}).catch(z)},je=(e,t,n,i,s)=>{_(e,{[t]:n}),T(e,{[t]:n});const r=b(e,"browserPackages"),l=b(e,"channels"),d=oe(e),u=b(e,"geoCountry")||null,g=b(e,"geoRegion")||null,p=b(e,"isEURequest")||!1,f={consentChannel:ue(e),consentCategory:ge(e),consentSettings:b(e,"consentSetting")};for(const s of r){if(!s||!s.name||!s.user)continue;if(!l.has(s.name)){W(`Provider ${s.name} is not in allow list`);continue}const r=U(e,s.name);for(const l of r)o(i,s.name,l.tagName)?a(f,s.name,l.tagName)?c(u,g,p,l.geoRegions)?s.user({userId:d,data:{[t]:n},manifestVariables:l.variableSet,destination:e}):W("GEO request region does not match list, skipping"):W(`User do not have consent for ${s.name} (${l.tagName})`):W(`User not allowed for ${s.name} (${l.tagName})`)}le((e=>ce(e,"/user"))(e),{key:t,value:n,providers:i},s).catch(z)},xe=(e,t)=>{de((e=>ce(e,"/keys"))(e)).then(e=>{t((null==e?void 0:e.result)||[])}).catch(z)},qe=(e,t)=>{de((e=>ce(e,"/full-consent"))(e)).then(e=>null==e?void 0:e.result).catch(()=>{}).then(n=>{var a,o;const i=null!==(a=null==n?void 0:n.consent)&&void 0!==a?a:ue(e),s=null!==(o=null==n?void 0:n.consentCategories)&&void 0!==o?o:ge(e),r=i||null,l=s||null;let d=null;r?s||(d="ConsentCategories not found for Current User!"):(s||(d="Consent and ConsentCategories not found for Current User!"),d="Consent not found for Current User!");const c=d?new Error(d):void 0;t(r,c,l)})},We=(e,t)=>{const n=b(e,"config");S(e,{config:{...n,...t}})},ze=e=>{Ve(e)},He=(e,t,n,a)=>{Ne(e,t,n,a)},Je=(e,t,n)=>{((e,t,n)=>{(null==n?void 0:n.destination)?Ee(n.destination,e,t,n):C().forEach(a=>{Ee(a,e,t,n)})})(e,t,n)},_e=(e,t,n,a)=>{((e,t,n,a)=>{e&&t?(null==a?void 0:a.destination)?je(a.destination,e,t,n,a):C().forEach(o=>{je(o,e,t,n,a)}):z("Key or Value is missing in user API.")})(e,t,n,a)},Ye=(e,t,n)=>{Ie(e,t,n)},Ze=(e,t,n)=>{((e,t,n)=>{if(!e||0===e.length)return void z("Provide keys for get data API.");if(null==n?void 0:n.destination)return void me(n.destination,e,t);const a=C();if(a.length>1)return z("Multiple instances found! Please provide destination."),void t({});me(a[0],e,t)})(e,t,n)},Qe=(e,t)=>{((e,t)=>{if(null==t?void 0:t.destination)return void xe(t.destination,e);const n=C();if(n.length>1)return z("Multiple instances found! Please provide destination."),void e([]);xe(n[0],e)})(e,t)},Xe=e=>(e=>{if(null==e?void 0:e.destination)return oe(e.destination);const t=C();return t.length>1?(z("Multiple instances detected! Please provide a destination."),""):oe(t[0])})(e),et=(e,t)=>{((e,t)=>
14{if(null==t?void 0:t.destination)return void qe(t.destination,e);const n=C();n.length>1?e(null,new Error("Multiple instances found! Please provide destination."),null):qe(n[0],e)})(e,t)},tt=e=>(e=>{if(null==e?void 0:e.destination)return b(e.destination,"isNewUser");const t=C();if(!(t.length>1))return b(t[0],"isNewUser");z("Multiple instances found! Please provide destination.")})(e),nt=(e,t)=>{((e,t)=>{(null==t?void 0:t.destination)?We(t.destination,e):C().forEach(t=>{We(t,e)})})(e,t)},at=e=>{(async e=>{$e.add(e),await Promise.allSettled([...Fe.values()].map(t=>Oe(t)(e))).then(Ke)})(e)};var ot=new class{init(e){ze(e)}tag(e,t,n,a){He(e,t,n,a)}consent(e,t){Je(e,t)}user(e,t,n,a){_e(e,t,n,a)}data(e,t,n){Ye(e,t,n)}getData(e,t,n){Ze(e,t,n)}keys(e,t){Qe(e,t)}getUserId(e){return Xe(e)}getConsent(e,t){et(e,t)}isNewUser(e){return tt(e)}setConfig(e,t){nt(e,t)}ready(e){at(e)}};!function(){const e=e=>{if(!(e?.length<4))return e[3].destination},t=(e,t)=>{window.edgetag.destinations[e]||(window.edgetag.destinations[e]={}),window.edgetag.destinations[e].tags||(window.edgetag.destinations[e].tags=[]),window.edgetag.destinations[e].tags.push({name:"tag",arguments:t})},n=(n,a)=>{try{return"init"===n?void(e=>{if(!e?.length)return void console.error("EdgeTag SDK: Init event is missing arguments");const t=e[0]?.edgeURL;if(!t)return void console.error("EdgeTag SDK: edgeURL is required for initialization");if(!window.edgetag.destinations?.[t]?.initialized)return void window.edgetag.stubs.push(["init",...e]);const n=[],a=[];if(window.edgetag.destinations.all=window.edgetag.destinations.all||{},!window.edgetag.destinations.all.resolvedInits?.has(t)){if(window.edgetag.destinations?.all?.tags){const e=window.edgetag.destinations.all.tags.map(e=>{const n=structuredClone(e);return n.arguments[3]={...n.arguments[3],destination:t},n});n.push(...e)}if(window.edgetag.destinations?.all?.consents){const e=window.edgetag.destinations.all.consents.map(e=>{const n=structuredClone(e);return n.arguments[2]={...n.arguments[2],destination:t},n});a.push(...e)}window.edgetag.destinations.all.resolvedInits||(window.edgetag.destinations.all.resolvedInits=new Set),window.edgetag.destinations.all.resolvedInits.add(t)}window.edgetag.destinations[t].tags&&(n.push(...window.edgetag.destinations[t].tags),window.edgetag.destinations[t].tags=[]),window.edgetag.destinations[t].consents&&(a.push(...window.edgetag.destinations[t].consents),window.edgetag.destinations[t].consents=[]),a.length+n.length>0&&(e[0].afterManifestEvents=[...a,...n]),ot.init(...e)})(a):"tag"===n?void(n=>{const a=e(n);!a||window.edgetag.destinations[a]?.initialized?ot.tag(...n):t(a,n)})(a):ot[n](...a)}catch(e){console.error(e)}},a=e=>{const t=[].slice.call(e);if(Array.isArray(t)&&t.length)return n(t[0],t.slice(1))};let o=window.edgetag?.stubs;if(o||(o=[]),!window.edgetag?.live){const e=window.edgetag?.destinations;window.edgetag=function(){return a(arguments)},window.edgetag.live=!0,window.edgetag.destinations=e||{}}if(window.edgetag.stubs=[],window.edgetag.handleStubs=()=>{window.edgetag.stubs&&Array.isArray(window.edgetag.stubs)?(o=window.edgetag.stubs,window.edgetag.stubs=[],o.forEach(e=>{a(e)})):console.error("EdgeTag SDK: Invalid stubs array")},window.edgetag.destinations||(window.edgetag.destinations={}),!o.length)return;const i=[],s=[],r=[],l=[];o.forEach(e=>{const t=[].slice.call(e);if(!Array.isArray(t))return;const n=t[0],a=t.slice(1);if("init"===n){const e=(e=>{if(!(e?.length<1))return e[0].edgeURL})(a);return window.edgetag.destinations[e]||(window.edgetag.destinations[e]={tags:[]}),void i.push(a)}"consent"!==n?"tag"!==n?l.push({name:n,args:a}):s.push(a):r.push(a)}),s.forEach(n=>{const a=e(n);a?t(a,n):(window.edgetag.destinations.all||(window.edgetag.destinations.all={tags:[],consents:[],resolvedInits:new Set}),window.edgetag.destinations.all.tags.push({name:"tag",arguments:n}))}),r.forEach(t=>{const n=e(t);n?((e,t)=>{window.edgetag.destinations[e]||(window.edgetag.destinations[e]={}),window.edgetag.destinations[e].consents||(window.edgetag.destinations[e].consents=[]),window.edgetag.destinations[e].consents.push({name:"consent",arguments:t})})(n,t):(window.edgetag.destinations.all||(window.edgetag.destinations.all={tags:[],consents:[],resolvedInits:new Set}),window.edgetag.destinations.all.consents||(window.edgetag.destinations.all.consents=[]),window.edgetag.destinations.all.consents.push({name:"consent",arguments:t}))}
14),i.forEach(e=>{window.edgetag.stubs.push(["init",...e])}),l.forEach(e=>{window.edgetag.stubs.push([e.name,...e.args])})}()}(); 15;{ 16 const domain = "https://viahc.thebourboncentral.com"; 17 if (!window.edgetag.destinations) { 18 window.edgetag.destinations={} 19 } 20 if (!window.edgetag.destinations[domain]) { 21 window.edgetag.destinations[domain] = {} 22 } 23 window.edgetag.destinations[domain].initialized=true; 24 if (window.edgetag.handleStubs) { 25 window.edgetag.handleStubs(); 26 } 27};
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.