/** * Combined by jsDelivr. * Original files: * - /npm/@blotoutio/providers-listrak-sdk@1.31.1/index.min.js * - /npm/@blotoutio/providers-facebook-sdk@1.31.1/index.min.js * - /npm/@blotoutio/providers-google-analytics-4-sdk@1.31.1/index.min.js * - /npm/@blotoutio/providers-blotout-wallet-sdk@1.31.1/index.min.js * - /npm/@blotoutio/providers-blotout-wallet-sdk@1.31.1/stores/shopify/index.js * - /npm/@blotoutio/providers-google-ads-clicks-sdk@1.31.1/index.min.js * - /npm/@blotoutio/edgetag-sdk-browser@1.31.1/index.min.js * * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files */ /** * Minified by jsDelivr using Terser v5.39.0. * Original file: /npm/@blotoutio/providers-listrak-sdk@1.31.1/index.js * * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files */ var ProvidersListrakSdk=function(){"use strict";const i={name:"listrak",user:({data:i})=>{var d,o,t,w,l;window&&window._ltk&&i&&!(null===(o=null===(d=window._ltk)||void 0===d?void 0:d.Customer)||void 0===o?void 0:o.Email)&&i.email&&((null===(t=window._ltk)||void 0===t?void 0:t.SCA)&&(window._ltk.SCA.Meta5="blotout"),null===(l=null===(w=window._ltk.SCA)||void 0===w?void 0:w.Update)||void 0===l||l.call(w,"email",i.email))},init:({getEdgeData:i})=>{var d;window&&window._ltk&&i&&(null===(d=window._ltk)||void 0===d?void 0:d.SCA)&&(window._ltk.SCA.Meta5="blotout")},tag:()=>({loaded:window&&!!window._ltk,sdkVersion:"1.31.1"})};try{window&&(window.edgetagProviders||(window.edgetagProviders=[]),window.edgetagProviders.push(i))}catch{}return i}(); ; /** * Minified by jsDelivr using Terser v5.39.0. * Original file: /npm/@blotoutio/providers-facebook-sdk@1.31.1/index.js * * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files */ var ProvidersFacebookSdk=function(){"use strict";const e=new Map([["Purchase_Paid_Facebook",{name:"Purchase_Paid_Facebook"}],["Purchase_Paid_Google",{name:"Purchase_Paid_Google"}],["Purchase_Paid_Bing",{name:"Purchase_Paid_Bing"}],["Purchase_Paid_TikTok",{name:"Purchase_Paid_TikTok"}],["Purchase_Paid_Snap",{name:"Purchase_Paid_Snap"}],["Purchase_Paid_Twitter",{name:"Purchase_Paid_Twitter"}],["Purchase_Paid_Other",{name:"Purchase_Paid_Other"}],["Purchase_Other_Referral",{name:"Purchase_Other_Referral",dependencies:new Set(["Purchase_Organic_Google","Purchase_Organic_Bing","Purchase_Search_Other"])}],["Purchase_Organic_Google",{name:"Purchase_Organic_Google"}],["Purchase_Organic_Bing",{name:"Purchase_Organic_Bing"}],["Purchase_Search_Other",{name:"Purchase_Search_Other"}],["Purchase_Other",{name:"Purchase_Other",dependencies:new Set(["Purchase_Other_Referral"])}],["Purchase_AppLovin",{name:"Purchase_AppLovin"}],["Purchase_Retail",{name:"Purchase_Retail"}],["Purchase_Offline",{name:"Purchase_Offline"}],["Paid_Social_NonFB",{name:"Paid_Social_NonFB",dependencies:new Set(["Purchase_Paid_TikTok","Purchase_AppLovin"]),description:"Triggered when a TikTok or AppLovin event is generated"}],["Purchase_Google",{name:"Purchase_Google",dependencies:new Set(["Purchase_Paid_Google","Purchase_Paid_Bing"]),description:"Triggered when a Google or Bing event is generated"}],["Purchase_Organic",{name:"Purchase_Organic",dependencies:new Set(["Purchase_Organic_Google","Purchase_Organic_Bing"]),description:"Triggered when a Google or Bing search event is generated"}],["Purchase_Custom_Other",{name:"Purchase_Custom_Other",dependencies:new Set(["Purchase_Paid_Other","Purchase_Other_Referral","Purchase_Search_Other","Purchase_Other"]),description:"Triggered when other purchase events occur"}],["Purchase_Direct",{name:"Purchase_Direct",dependencies:new Set(["Purchase_Paid_Facebook","Purchase_Paid_Google","Purchase_Paid_Bing","Purchase_Paid_TikTok","Purchase_Paid_Snap","Purchase_Paid_Twitter","Purchase_Paid_Other","Purchase_Other_Referral","Purchase_Organic_Google","Purchase_Organic_Bing","Purchase_Search_Other","Purchase_Other","Purchase_AppLovin","Purchase_Retail","Purchase_Offline"])}]]),a=(e,a)=>{var r,n,i,t,s,c;return(null===(r=e.dependencies)||void 0===r?void 0:r.has(a.name))?1:(null===(n=a.dependencies)||void 0===n?void 0:n.has(e.name))?-1:(null!==(t=null===(i=e.dependencies)||void 0===i?void 0:i.size)&&void 0!==t?t:0)-(null!==(c=null===(s=a.dependencies)||void 0===s?void 0:s.size)&&void 0!==c?c:0)},r=new Set(["Purchase_Paid_Facebook","Purchase_Paid_Google","Purchase_Paid_Bing","Purchase_Paid_TikTok","Purchase_Paid_Snap","Purchase_Paid_Twitter","Purchase_Paid_Other","Purchase_Direct","Purchase_Other_Referral","Purchase_Organic_Google","Purchase_Organic_Bing","Purchase_Search_Other","Purchase_Other","Purchase_AppLovin","Purchase_Retail","Purchase_Offline"]);var n;n=[...r].map((a=>e.get(a))),JSON.stringify([...n].sort(a).filter((e=>!r.has(e.name))).map((e=>{const a=e.dependencies&&e.dependencies.size>0?[...e.dependencies]:void 0;return{n:e.name,d:a}})));const i=new Set(["PageView","AddPaymentInfo","AddToCart","AddToWishList","CompleteRegistration","Contact","CustomizeProduct","Donate","FindLocation","InitiateCheckout","Lead","Purchase","Schedule","Search","StartTrial","SubmitApplication","Subscribe","ViewContent"]),t=()=>{var e;const a={};try{const r=null===(e=JSON.parse(window.sessionStorage.getItem("_workerStore")||"{}"))||void 0===e?void 0:e.kv;if(!r)return a;r.email&&(a.em=r.email),r.phone&&(a.ph=r.phone),r.firstName&&(a.fn=r.firstName),r.lastName&&(a.ln=r.lastName),r.city&&(a.ct=r.city),r.state&&(a.st=r.state),r.country&&(a.country=r.country)}catch(e){console.error(e)}return a},s=(e,a,r)=>{var n,i;const s=window&&window.fbq?window.fbq:null;s&&((null===(i=null===(n=s.instance)||void 0===n?void 0:n.pixelsByID)||void 0===i?void 0:i[e])&&(s.instance.pixelsByID[e].userData=null),s("init",e,{external_id:r,...t()}),s.disablePushState=!0,a&&s("dataProcessingOptions",["LDU"],0,0))},c={name:"facebook",tag:({data:e,eventName:a,manifestVariables:r,eventId:n})=>{if(window.fbq&&r.pixelId&&"1"===r.enableBrowser){const t=!0===e.skipTransformation?e:((e,a)=>{const r={app:"Blotout"};if((e.value||0===e.value)&&(r.value=e.value),e.currency&&(r.currency=e.currency),e.name&&(r.content_name=e.name),e.type&&(r.content_type=e.type),e.category&&(r.content_category=e.category),e.ids&&(r.content_ids=e.ids),e.search&&(r.search_string=e.search),e.status&&(r.status=e.status),e.predicted_ltv&&(r.predicted_ltv=e.predicted_ltv),e.orderId&&(r.order_id=e.orderId),e.contents&&Array.isArray(e.contents)&&(r.contents=e.contents.map((e=>{const r={},n=((e,a)=>"1"===a&&e.variantId?e.variantId:"2"===a&&e.sku?e.sku:e.id)(e,a);return n&&(r.id=n),e.quantity&&(r.quantity=e.quantity),(e.item_price||0===e.item_price)&&(r.item_price=e.item_price),e.category&&(r.category=e.category),e.title&&(r.title=e.title),r})),e.contents&&e.contents[0]&&e.contents[0].type&&(r.content_type=e.contents[0].type)),e.contents||e.ids){const a=e.contents||e.ids;Array.isArray(a)&&(r.num_items=a.length)}return r})(e,((e,a)=>{const r=e||a||"0";return r&&/^[012]$/.test(r)?r:"0"})(r.productIdMapping,r.variantId));delete t.skipTransformation,window.fbq(i.has(a)?"trackSingle":"trackSingleCustom",r.pixelId,a,t,{eventID:n})}return{sdkVersion:"1.31.1"}},init:({manifest:e,userId:a,consentData:r})=>{var n;e.variables&&e.variables.pixelId&&"1"===e.variables.enableBrowser&&((()=>{if(!window||!document||window.fbq)return;const e=window.fbq=function(){e.callMethod?e.callMethod.apply(e,arguments):e.queue.push(arguments)};window._fbq||(window._fbq=e),e.push=e,e.loaded=!0,e.version="2.0",e.queue=[];const a=document.createElement("script");a.async=!0,a.src="https://connect.facebook.net/en_US/fbevents.js";const r=document.getElementsByTagName("script")[0];r&&r.parentNode&&r.parentNode.insertBefore(a,r)})(),s(e.variables.pixelId,"1"===e.variables.ldu,a),((null===(n=null==r?void 0:r.consent)||void 0===n?void 0:n.facebook)||(null==r?void 0:r.categories.advertising))&&window.clientParamsHelper&&window.clientParamsHelper.collectAndSetParams(!0))},user:({userId:e,manifestVariables:a})=>{a&&a.pixelId&&"1"===a.enableBrowser&&s(a.pixelId,"1"===a.ldu,e)}};try{window&&(window.edgetagProviders||(window.edgetagProviders=[]),window.edgetagProviders.push(c))}catch{}return c}(); ; /** * Minified by jsDelivr using Terser v5.39.0. * Original file: /npm/@blotoutio/providers-google-analytics-4-sdk@1.31.1/index.js * * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files */ var ProvidersGoogleAnalytics4Sdk=function(){"use strict";const e="googleAnalytics4",a=e=>"boolean"==typeof e,n=e=>!!e&&"object"==typeof e&&!Array.isArray(e),t=e=>null===e||"boolean"==typeof e||Number.isFinite(e)||"string"==typeof e,i=e=>!!e&&"object"==typeof e,r=(e,{prefix:a="",keyFormatter:n=e=>e,delimiter:o="_"}={})=>{const s={};for(const[l,d]of Object.entries(e)){const e=a+n(l);t(d)?s[e]=d:i(d)&&Object.assign(s,r(d,{prefix:e+o,keyFormatter:n,delimiter:o}))}return s},o=e=>e.split(",").flatMap((e=>{if(!e.includes("-"))return e;const a=[],[n,t]=e.split("-").map(Number);for(let e=n;e<=t;e++)a.push(e.toString());return a}));new Set([...o("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"),...o("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"),...o("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"),...o("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"),...o("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"),...o("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"),...o("811,821,822,823-824,827,834,836,841-842,846,851,852-853,871,874-875,879,880-887,889,890-899"),...o("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, Islamic 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"]]),l=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."]]);new Set([...s.keys(),...l.keys()]);const d=e=>({analytics_storage:((e,n)=>{if(!e)return!1;let t=!!a(e.all)&&e.all;if(n in e){const i=e[n];a(i)&&(t=i)}return t})(e,"analytics")?"granted":"denied"}),c=e=>{const t=((e,t)=>{var i,r;let o=!1;if(n(null==e?void 0:e.consent)&&(o=!!a(e.consent.all)&&e.consent.all,t in e)){const i=e.consent[t];if(a(i))o=i;else if(n(i))return Object.keys(i).some((e=>!0===i[e]))}if(n(e.categories)&&n(null===(i=e.consentSettings)||void 0===i?void 0:i.channels)){o=!!a(e.categories.all)&&e.categories.all;const n=null===(r=Object.entries(e.consentSettings.channels).find((([,e])=>e.includes(t))))||void 0===r?void 0:r[0];n&&e.categories[n]&&(o=!0)}return o})(e,"googleAnalytics4");return{analytics_storage:t?"granted":"denied"}},u=(e=[])=>e.map((e=>{const a={item_id:e.id.toString(),quantity:e.quantity||1};if(e.sku&&(a.item_sku=e.sku),e.title&&(a.item_name=e.title),e.category){const n=e.category.split(",");a.item_category=n[0];for(let e=1;e{if(!a||!window.gtag||!(null==t?void 0:t.measurementId)||"server"===t.flowType)return;const{event:i,eventData:o}=((e,a,n)=>{switch(e){case"PageView":return{event:"page_view",eventData:{}};case"ViewContent":return{event:"view_item",eventData:{currency:a.currency,value:a.value,items:u(a.contents)}};case"ViewCart":return{event:"view_cart",eventData:{currency:a.currency,value:a.value,items:u(a.contents)}};case"RemoveFromCart":return{event:"remove_from_cart",eventData:{currency:a.currency,value:a.value,items:u(a.contents)}};case"AddToWishlist":return{event:"add_to_wishlist",eventData:{currency:a.currency,value:a.value,items:u(a.contents)}};case"ViewList":return{event:"view_item_list",eventData:{item_list_name:a.listName,item_list_id:a.listId,items:u(a.contents)}};case"Login":return{event:"login",eventData:{method:a.method}};case"SignUp":return{event:"sign_up",eventData:{method:a.method}};case"AddToCart":return{event:"add_to_cart",eventData:{currency:a.currency,value:a.value,items:u(a.contents)}};case"InitiateCheckout":return{event:"begin_checkout",eventData:{currency:a.currency,value:a.value,items:u(a.contents)}};case"AddShippingInfo":return{event:"add_shipping_info",eventData:{currency:a.currency,value:a.value,items:u(a.contents)}};case"AddPaymentInfo":return{event:"add_payment_info",eventData:{currency:a.currency,value:a.value,items:u(a.contents)}};case"Purchase":return{event:"purchase",eventData:{currency:a.currency,transaction_id:a.orderId||n,value:a.value,items:u(a.contents)}};case"Search":return{event:"search",eventData:{search_term:a.search}};case"Lead":return{event:"generate_lead",eventData:{currency:a.currency,value:a.value}};default:return{event:e,eventData:{}}}})(a,e,n);o.send_to=t.measurementId,"1"===t.debug&&(o.debug_mode=!0);const s=structuredClone(null!=e?e:{});"items"in o&&delete s.contents;const l={...r(s),...o};for(const e in l)void 0===l[e]&&delete l[e];window.gtag("event",i,{...l,app:"blotout"})},S=e=>Object.fromEntries(e.split(/;\s+/).map((e=>e.split("=").map((e=>e.trim())))).map((([e,...a])=>{const n=a.join("=");if(!e)return[];let t="";if(n)try{t=decodeURIComponent(n)}catch(a){console.log(`Unable to decode cookie ${e}: ${a}`),t=n}return[e,t]}))),m={name:e,init:({manifest:a,userId:n,executionContext:t,consentData:i})=>{window&&a.variables&&a.variables.measurementId&&"server"!==a.variables.flowType&&(window.dataLayer=window.dataLayer||[],window.gtag=function(){window.dataLayer.push(arguments)},window.google_tag_manager&&window.google_tag_manager[a.variables.measurementId]||((a,n,t,i,r)=>{var o;if(!window.gtag)return;if("1"!=t){let e=!1;for(const a of["googleAdsClicks","googleAnalytics4"])if(null===(o=r.get(a))||void 0===o?void 0:o.get("gtag")){e=!0;break}const a="1"===n?d(i.categories):c(i);e?window.gtag("consent","update",a):window.gtag("consent","default",{...a,functional_storage:"granted",personalization_storage:"granted",security_storage:"granted"})}((e,a,n,t)=>{const i=e.has(a)?e.get(a):t();e.set(a,n(i))})(r,e,(e=>e.set("gtag",!0)),(()=>new Map)),window.gtag("js",new Date);const s=document.createElement("script");s.async=!0,s.src=`https://www.googletagmanager.com/gtag/js?id=${a}`;const l=document.getElementsByTagName("script")[0];l&&l.parentNode&&l.parentNode.insertBefore(s,l)})(a.variables.measurementId,a.variables.advancedConsentMode,a.variables.consentSkip,i,t),window.gtag&&window.gtag("config",a.variables.measurementId,{user_id:n,send_page_view:!1}))},tag:({data:e,eventName:a,manifestVariables:n,eventId:t})=>{let i;return i="browser"===n.flowType||"server"!==n.flowType&&(window&&window.gtag&&!!(e=>{var a;try{return document&&document.cookie&&(null!==(a=S(document.cookie)[e])&&void 0!==a)?a:""}catch{return""}})("_ga")),i&&g({data:e,eventName:a,manifestVariables:n,eventId:t}),{loaded:i,sdkVersion:"1.31.1"}},consent:({consentData:e,variables:a})=>{if(!(null===window||void 0===window?void 0:window.gtag))return;if(a.some((e=>{var a;return"1"==(null===(a=e.variableSet)||void 0===a?void 0:a.consentSkip)})))return;const n=a.some((e=>{var a;return"1"===(null===(a=e.variableSet)||void 0===a?void 0:a.advancedConsentMode)}))?d(e.categories):c(e);window.gtag("consent","update",{...n,functional_storage:"granted",personalization_storage:"granted",security_storage:"granted"})}};try{window&&(window.edgetagProviders||(window.edgetagProviders=[]),window.edgetagProviders.push(m))}catch{}return m}(); ; /** * Minified by jsDelivr using Terser v5.39.0. * Original file: /npm/@blotoutio/providers-blotout-wallet-sdk@1.31.1/index.js * * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files */ var ProvidersBlotoutWalletSdk=function(){"use strict";const t=t=>t.split(",").flatMap((t=>{if(!t.includes("-"))return t;const e=[],[i,s]=t.split("-").map(Number);for(let t=i;t<=s;t++)e.push(t.toString());return e}));new Set([...t("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"),...t("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"),...t("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"),...t("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"),...t("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"),...t("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"),...t("811,821,822,823-824,827,834,836,841-842,846,851,852-853,871,874-875,879,880-887,889,890-899"),...t("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 e=/^[\w!#$%&'*+/=?^`{|}~-]+(:?\.[\w!#$%&'*+/=?^`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,i=(t,e)=>new Promise((i=>setTimeout((()=>i(e)),t))),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, Islamic 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"]]),n=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."]]);new Set([...s.keys(),...n.keys()]);const o=t=>{switch(t.name){case"enabled":return{name:"enabled",groupNames:new Set,segment:0,groupName:"",isEnabled:!0};case"disabled":return{name:"disabled",groupNames:new Set,segment:0,groupName:"",isEnabled:!1};case"ab-test":return(({userId:t})=>{const[e]=t.split("-"),i=parseInt(e,16)%2;return{name:"ab-test",groupNames:new Set(["enabled","control"]),segment:i,groupName:1==i?"enabled":"control",isEnabled:1==i}})(t);case"preview":return(({previewKey:t,userPreviewKey:e})=>{const i=!(!t||t!==e);return{name:"preview",groupNames:new Set(["preview"]),groupName:i?"preview":"",segment:i?1:0,isEnabled:i}})(t)}},a={type:"color",defaultValue:"#000000"},r={type:"color",defaultValue:"#000000"},l={type:"color",defaultValue:"#4e647f"},d={type:"color",defaultValue:"#ffffff"},c={type:"color",defaultValue:"#ffffff"},h={type:"color",defaultValue:"#2b65cf"},u={type:"color",defaultValue:"#dbe2eb"},p={type:"color",defaultValue:"#52525B"},f={type:"color",defaultValue:"#ffffff"},m={type:"color",defaultValue:"#00000077"},g={type:"text",defaultValue:"Hey! Your cart has expired!
But we've got you covered! 😉"},v={type:"text",defaultValue:"Enter your email ID"},w={type:"text",defaultValue:"Restore Cart"},b={type:"text",defaultValue:"No thanks, delete my expired cart"},y="blotoutWallet";var S;const A=Symbol.for("blotout-wallet");"undefined"!=typeof window&&(null!==(S=window[A])&&void 0!==S||(window[A]={}));const $=()=>{let t=null;try{t=localStorage.getItem("_blotoutWalletPreview")||null}catch{}return t},C=t=>Object.fromEntries(t.split(/;\s+/).map((t=>t.split("=").map((t=>t.trim())))).map((([t,...e])=>{const i=e.join("=");if(!t)return[];let s="";if(i)try{s=decodeURIComponent(i)}catch(e){console.log(`Unable to decode cookie ${t}: ${e}`),s=i}return[t,s]}))),E=(t,e,i)=>{var s;try{if(!document)return;const n=[`path=${null!==(s=null==i?void 0:i.path)&&void 0!==s?s:"/"}`];(null==i?void 0:i.maxAge)&&n.push(`max-age=${i.maxAge}`),(null==i?void 0:i.expires)&&n.push(`expires=${i.expires}`),(null==i?void 0:i.partitioned)&&n.push("partitioned"),(null==i?void 0:i.samesite)&&n.push(`samesite=${i.samesite}`),(null==i?void 0:i.secure)&&n.push("secure"),document.cookie=`${t}=${encodeURIComponent(e)};${n.join(";")}`}catch{return}},_=()=>{try{return"1"===localStorage.getItem("edgeTagDebug")}catch{return!1}},U="[EdgeTag]",P=(...t)=>{_()&&console.error(U,...t)},M=t=>`${y}|${t}`,x=t=>{try{const e=M(t);return JSON.parse(localStorage.getItem(e)||"null")}catch{return null}},I=(t,e)=>{try{const i=M(t),s=Object.assign({},x(t),e);localStorage.setItem(i,JSON.stringify(s))}catch{}},T=t=>{try{localStorage.removeItem(M(t))}catch{}},k=(t,e,i)=>{if(window.top!==window)return!1;try{const s=new URL(t).hostname;return!i.some((t=>s==`${t}.${e}`))}catch(t){return!0}},R=new Set(["AddToCart","RemoveFromCart","InitiateCheckout"]),N=({fetch:t=window.fetch,baseURL:i,userId:s,storeAPI:n})=>{if(!i)throw new Error("baseURL missing");if(!s)throw new Error("userId missing");if(!n)throw new Error("store API implementation missing");const o=(t=!1)=>{const e=new Headers({EdgeTagUserId:s});return t&&e.set("Content-type","application/json; charset=utf-8"),e},a=t=>{const e=new URL(`/providers/blotoutWallet${t}`,i),s=n.getCartToken();s&&e.searchParams.set("t",s);const o=$();return o&&e.searchParams.set("pk",o),e};return{getExpiredCarts:async()=>{const e=n.getCartToken()||"",s=x(i);if((null==s?void 0:s.lastSeenToken)===e&&(null==s?void 0:s.response)&&(null==s?void 0:s.token)===e)return s.response;const r=await t(a("/cart/expired"),{method:"GET",headers:o(),credentials:"include"});if(!r.ok)throw new Error(`Unable to get expired cart - ${r.status}: ${r.statusText}\n\n${await r.text()}`);const l=await r.json();return I(i,{token:e,response:l,lastSeenToken:e}),l.hasJustExpired&&window.edgetag("tag","CartRecovery_CartExpiredOnVisit",void 0,void 0,{destination:i}),l},sendEvent:async e=>{const i=await t(a("/user/event"),{method:"POST",headers:o(!0),body:JSON.stringify({action:e}),credentials:"include"});if(!i.ok)throw new Error(`Error while recording user event - ${i.status}: ${i.statusText}\n\n${await i.text()}`)},saveEmail:async s=>{const n=(t=>{if(!t)return"";const i=t.trim().toLowerCase();return e.test(i)?i:""})(s);if(!n)throw new Error("Could not save email - invalid email format");window.edgetag("user","email",n,{},{destination:i});const r=await t(a("/user/email"),{method:"POST",headers:o(!0),body:JSON.stringify({email:n}),credentials:"include"});if(!r.ok)throw new Error(`Could not save email - ${r.status}: ${r.statusText}\n\n${await r.text()}`);window.edgetag("tag","CartRecovery_KeepCartEmailSaved",void 0,void 0,{destination:i})},restoreCart:async(e,s)=>{const n=await t(a(`/cart/restore/${encodeURIComponent(e)}`),{method:"POST",headers:o(),credentials:"include"});if(!n.ok)throw new Error(`Could not update status in DB - ${n.status}: ${n.text}\n\n${await n.text()}`);T(i),window.edgetag("tag","CartRecovery_CartRestored",{isSilent:s},void 0,{method:"beacon",destination:i})},deleteCarts:async()=>{const e=await t(a("/cart/skip"),{method:"POST",headers:o(),credentials:"include"});if(!e.ok)throw new Error(`Could not mark cart as skipped - ${e.status}: ${await e.text()}`);T(i),window.edgetag("tag","CartRecovery_CartDeclined",void 0,void 0,{destination:i})}}},O=globalThis,L=O.ShadowRoot&&(void 0===O.ShadyCSS||O.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,B=Symbol(),H=new WeakMap;let D=class{constructor(t,e,i){if(this._$cssResult$=!0,i!==B)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(L&&void 0===t){const i=void 0!==e&&1===e.length;i&&(t=H.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&H.set(e,t))}return t}toString(){return this.cssText}};const G=t=>new D("string"==typeof t?t:t+"",void 0,B),V=(t,...e)=>{const i=1===t.length?t[0]:e.reduce(((e,i,s)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+t[s+1]),t[0]);return new D(i,t,B)},z=L?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return G(e)})(t):t /** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */,{is:K,defineProperty:j,getOwnPropertyDescriptor:F,getOwnPropertyNames:W,getOwnPropertySymbols:Y,getPrototypeOf:Z}=Object,J=globalThis,X=J.trustedTypes,q=X?X.emptyScript:"",Q=J.reactiveElementPolyfillSupport,tt=(t,e)=>t,et={toAttribute(t,e){switch(e){case Boolean:t=t?q:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let i=t;switch(e){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch(t){i=null}}return i}},it=(t,e)=>!K(t,e),st={attribute:!0,type:String,converter:et,reflect:!1,useDefault:!1,hasChanged:it};Symbol.metadata??=Symbol("metadata"),J.litPropertyMetadata??=new WeakMap;let nt=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=st){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){const i=Symbol(),s=this.getPropertyDescriptor(t,i,e);void 0!==s&&j(this.prototype,t,s)}}static getPropertyDescriptor(t,e,i){const{get:s,set:n}=F(this.prototype,t)??{get(){return this[e]},set(t){this[e]=t}};return{get:s,set(e){const o=s?.call(this);n?.call(this,e),this.requestUpdate(t,o,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??st}static _$Ei(){if(this.hasOwnProperty(tt("elementProperties")))return;const t=Z(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(tt("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(tt("properties"))){const t=this.properties,e=[...W(t),...Y(t)];for(const i of e)this.createProperty(i,t[i])}const t=this[Symbol.metadata];if(null!==t){const e=litPropertyMetadata.get(t);if(void 0!==e)for(const[t,i]of e)this.elementProperties.set(t,i)}this._$Eh=new Map;for(const[t,e]of this.elementProperties){const i=this._$Eu(t,e);void 0!==i&&this._$Eh.set(i,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const t of i)e.unshift(z(t))}else void 0!==t&&e.push(z(t));return e}static _$Eu(t,e){const i=e.attribute;return!1===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)))}addController(t){(this._$EO??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const i of e.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return((t,e)=>{if(L)t.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const i of e){const e=document.createElement("style"),s=O.litNonce;void 0!==s&&e.setAttribute("nonce",s),e.textContent=i.cssText,t.appendChild(e)}})(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((t=>t.hostConnected?.()))}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach((t=>t.hostDisconnected?.()))}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$ET(t,e){const i=this.constructor.elementProperties.get(t),s=this.constructor._$Eu(t,i);if(void 0!==s&&!0===i.reflect){const n=(void 0!==i.converter?.toAttribute?i.converter:et).toAttribute(e,i.type);this._$Em=t,null==n?this.removeAttribute(s):this.setAttribute(s,n),this._$Em=null}}_$AK(t,e){const i=this.constructor,s=i._$Eh.get(t);if(void 0!==s&&this._$Em!==s){const t=i.getPropertyOptions(s),n="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:et;this._$Em=s;const o=n.fromAttribute(e,t.type);this[s]=o??this._$Ej?.get(s)??o,this._$Em=null}}requestUpdate(t,e,i){if(void 0!==t){const s=this.constructor,n=this[t];if(i??=s.getPropertyOptions(t),!((i.hasChanged??it)(n,e)||i.useDefault&&i.reflect&&n===this._$Ej?.get(t)&&!this.hasAttribute(s._$Eu(t,i))))return;this.C(t,e,i)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(t,e,{useDefault:i,reflect:s,wrapped:n},o){i&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,o??e??this[t]),!0!==n||void 0!==o)||(this._$AL.has(t)||(this.hasUpdated||i||(e=void 0),this._$AL.set(t,e)),!0===s&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,e]of this._$Ep)this[t]=e;this._$Ep=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[e,i]of t){const{wrapped:t}=i,s=this[e];!0!==t||this._$AL.has(e)||void 0===s||this.C(e,void 0,i,s)}}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach((t=>t.hostUpdate?.())),this.update(e)):this._$EM()}catch(e){throw t=!1,this._$EM(),e}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach((t=>t.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach((t=>this._$ET(t,this[t]))),this._$EM()}updated(t){}firstUpdated(t){}};nt.elementStyles=[],nt.shadowRootOptions={mode:"open"},nt[tt("elementProperties")]=new Map,nt[tt("finalized")]=new Map,Q?.({ReactiveElement:nt}),(J.reactiveElementVersions??=[]).push("2.1.1"); /** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ const ot=globalThis,at=ot.trustedTypes,rt=at?at.createPolicy("lit-html",{createHTML:t=>t}):void 0,lt="$lit$",dt=`lit$${Math.random().toFixed(9).slice(2)}$`,ct="?"+dt,ht=`<${ct}>`,ut=document,pt=()=>ut.createComment(""),ft=t=>null===t||"object"!=typeof t&&"function"!=typeof t,mt=Array.isArray,gt="[ \t\n\f\r]",vt=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,wt=/-->/g,bt=/>/g,yt=RegExp(`>|${gt}(?:([^\\s"'>=/]+)(${gt}*=${gt}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),St=/'/g,At=/"/g,$t=/^(?:script|style|textarea|title)$/i,Ct=t=>(e,...i)=>({_$litType$:t,strings:e,values:i}),Et=Ct(1),_t=Ct(2),Ut=Symbol.for("lit-noChange"),Pt=Symbol.for("lit-nothing"),Mt=new WeakMap,xt=ut.createTreeWalker(ut,129);function It(t,e){if(!mt(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==rt?rt.createHTML(e):e}const Tt=(t,e)=>{const i=t.length-1,s=[];let n,o=2===e?"":3===e?"":"",a=vt;for(let e=0;e"===l[0]?(a=n??vt,d=-1):void 0===l[1]?d=-2:(d=a.lastIndex-l[2].length,r=l[1],a=void 0===l[3]?yt:'"'===l[3]?At:St):a===At||a===St?a=yt:a===wt||a===bt?a=vt:(a=yt,n=void 0);const h=a===yt&&t[e+1].startsWith("/>")?" ":"";o+=a===vt?i+ht:d>=0?(s.push(r),i.slice(0,d)+lt+i.slice(d)+dt+h):i+dt+(-2===d?e:h)}return[It(t,o+(t[i]||"")+(2===e?"":3===e?"":"")),s]};class kt{constructor({strings:t,_$litType$:e},i){let s;this.parts=[];let n=0,o=0;const a=t.length-1,r=this.parts,[l,d]=Tt(t,e);if(this.el=kt.createElement(l,i),xt.currentNode=this.el.content,2===e||3===e){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(s=xt.nextNode())&&r.length0){s.textContent=at?at.emptyScript:"";for(let i=0;imt(t)||"function"==typeof t?.[Symbol.iterator])(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==Pt&&ft(this._$AH)?this._$AA.nextSibling.data=t:this.T(ut.createTextNode(t)),this._$AH=t}$(t){const{values:e,_$litType$:i}=t,s="number"==typeof i?this._$AC(t):(void 0===i.el&&(i.el=kt.createElement(It(i.h,i.h[0]),this.options)),i);if(this._$AH?._$AD===s)this._$AH.p(e);else{const t=new Nt(s,this),i=t.u(this.options);t.p(e),this.T(i),this._$AH=t}}_$AC(t){let e=Mt.get(t.strings);return void 0===e&&Mt.set(t.strings,e=new kt(t)),e}k(t){mt(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,s=0;for(const n of t)s===e.length?e.push(i=new Ot(this.O(pt()),this.O(pt()),this,this.options)):i=e[s],i._$AI(n),s++;s2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=Pt}_$AI(t,e=this,i,s){const n=this.strings;let o=!1;if(void 0===n)t=Rt(this,t,e,0),o=!ft(t)||t!==this._$AH&&t!==Ut,o&&(this._$AH=t);else{const s=t;let a,r;for(t=n[0],a=0;a{const s=i?.renderBefore??e;let n=s._$litPart$;if(void 0===n){const t=i?.renderBefore??null;s._$litPart$=n=new Ot(e.insertBefore(pt(),t),t,void 0,i??{})}return n._$AI(t),n})(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return Ut}};Kt._$litElement$=!0,Kt.finalized=!0,zt.litElementHydrateSupport?.({LitElement:Kt});const jt=zt.litElementPolyfillSupport;jt?.({LitElement:Kt}),(zt.litElementVersions??=[]).push("4.2.1");const Ft="\n padding: 4px 8px 4px 36px;\n border: 1px dashed red;\n border-radius: 3px;\n font-weight: bold;\n background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAgCAYAAABU1PscAAAACXBIWXMAAAsTAAALEwEAmpwYAAAEt0lEQVRYhdWYX4hUdRTHP+d358+6azNGqUVqilrQXaNIClKSQHsQpJceSu4IBSFIvQRWLwWW9dBD0IMYvUTNSAUGGVRYGLFQQU8aO2VhhVpBlOHcdXd2Z+b+vj3MrG6z7c7OpO32hTt/DjO/+/2ec37nnPszgJEoXCvYB2w3WCIwFi5+B44AB3Kl8nEbKYTrJT4ZSLlV1cSb13zzmx2BGWlneGmo5rUvJfH8QMqtGm34hez1i0gkvBeIzUDkgO3V5P9BfhISYDgzdqQMFrenjQGZwDAgEdQXYF5J4IxrXTs1ZyCojHs9UU30QN3rlZSzsXlh2QFe4NqNzgzgvEnFfKn8ruCoQW2h5tg0AS0YWF8lCg3I/JeEukVqvgmYzezFuWBeBQRmeClJoAokvawxbwICMzz6WbAf7BhQp4cJYE4CDEg7I3CGJERzs0ui7kXSQ5UNHJjsq4b0ea40fKr7FZqYi4Ag5Yxqw39X8zoKHBfEhpYCdwPbsoEtq3k5dSNEgPCtT8RRuBK4AUhP2i6PAOOPsYbfCxwWVsmXhqcu/mqlEK6ZSLQ37WxnIuV9FxraUMg4e9wZ1xmGEA0vGppdTEcB+WJ5CBia/D5S2JAWygJjueKwzxfLPwF74ig8lQnsqbrXsq4icQlBzavevJd+aHG73ZndhJSZack5b+KRaPB6occkfx+wBPgljsJDwDu5UjnOlcovx1G4OhvYrrpXvofpw4DXgTdypfKPAHEUbnLGCx62zOSUOZXgkcLgeqEjAyn3ZNbZxrSzdX2B25IN7DVnvBRH4XIAwcGJRKfpIofb0P6/oFOb6BiB8d0brTZafbE/5W4da/jU5B3qCGcQmO0GfR1HYSlXKn8bR+GXKbPVDZTrMgoCHgG2xlF4BgiADYlYyyxPWB0F1MaqG4B7qonPtvPxgowzEmkH8AEQA8PO7AJSriv6kGScpZ2xCdgkoOFFIolZItp5D8hWpB2ZxgzuTCQkVgDZlumcGY0uyQMUa16fctnLKDqfNOv1P8IZmBFLF0kvphn+2WGt1xbVXKl8Fjjbmc/fMYc+YCe89H0msI31RKl21zgMB8c8qrRM673U32nZxINHdwKb4yic4EqNErni8Ggchc/VEhWzgV1T92o9DRl9gTGe+C8ScUimP+PC4FKku+qeqzr1gkQiMFvp0QH9i2FuTmU0Vyp/hLFzItGQF+MtAiOjDf9WIh4WnMoXvxFSIRvYzTA9UjOJwAgCY3Fg5Hu55tzIcsXyx5Vdt3xm3tYLloD9CpzNlYYbACOFwa2S9tS9lndTPqUeXd/CTAIEjOdLZVUK4ToTi4CTuTfLNaA89Yf+0dvsQrX+kKT9zuxG9ThH9AqLo9AzZfM4Ay8qwNPAGWAbUADea10nMRszKS+4A3gw7exeSf2Jem/BPQsYiULf3ugMSLmmSYAk0s5R955EjNGsGH2ZwDImrOY7jIxXCM6MlCB2xt+GL9E8CzIueTRJPAY4o3/SXuvlSeYywQyEzjngw0XBtOMhYHo6iOb4kKj5Pl+wpge9xGEn7NnRhj89kHJyC/XwZwoCM7LOkXY2BLxtAJUoXGPwDHC/wdUL8Xi9lbYe+A14HziYK5VP/AXU+TX099lFgwAAAABJRU5ErkJggg==) 8px 50% no-repeat;\n background-size: 24px 16px;\n",Wt=t=>console.log(`%c${t}`,Ft),Yt=t=>console.error(`%c${t}`,Ft),Zt={name:y,init:t=>{var e,i,s,n,a,r,l,d,c,h;if("undefined"==typeof window||"undefined"==typeof document)return;null!==(e=window[A])&&void 0!==e||(window[A]={});const u=null!==(i=(c=window[A]).storeAPI)&&void 0!==i?i:c.storeAPI=null===(n=(s=window[A]).storeAPIFactory)||void 0===n?void 0:n.call(s);if(!u)return void Yt("Implementation for store API missing!");const p=null!==(a=(h=window[A]).walletAPI)&&void 0!==a?a:h.walletAPI=N({baseURL:t.baseUrl,storeAPI:u,userId:t.userId});if(window.top!==window)return;if(!k(window.location.href,t.manifest.variables.siteDomain,null!==(l=null===(r=t.manifest.variables)||void 0===r?void 0:r.disallowedSubdomains)&&void 0!==l?l:[]))return void Yt("Disabling cart recovery when not running on root domain");const{enabled:f,previewKey:m,mode:g="disabled",afterRestore:v,silentRestore:w,theme:b}=null!==(d=t.manifest.variables)&&void 0!==d?d:{},y=o({name:g,userId:t.userId,previewKey:m,userPreviewKey:$()});if(window[A].variables={experiment:y,afterRestore:null!=v?v:{action:"none"},enabled:f||y.isEnabled,silentRestore:!!w},"preview"==y.name&&(y.isEnabled?Wt("Previewing functionality using preview key"):$()&&Wt("Preview key set but does not match the configured key")),f||y.isEnabled){const t=window[A].ui;if(!t)return void Yt("UI implementation is missing");null==t||t.init({afterRestore:window[A].variables.afterRestore,silentRestore:window[A].variables.silentRestore,theme:null!=b?b:{},walletAPI:p,storeAPI:u})}},tag:({destination:t,manifestVariables:e,eventName:i})=>{var s;const n={cartToken:"",previewKey:"",lastSeenToken:"",hasCachedData:!1,isOnAllowedSubdomain:k(window.location.href,e.siteDomain,e.disallowedSubdomains)};if("undefined"==typeof window)return n;const o=(null===(s=window[A].storeAPI)||void 0===s?void 0:s.getCartToken())||"",a=x(t);return n.previewKey=$()||"",n.cartToken=o,n.lastSeenToken=(null==a?void 0:a.lastSeenToken)||"",n.hasCachedData=!!a,"Purchase"==i?(T(t),E("cart2","",{maxAge:0})):(!e.enabled||e.enabled&&R.has(i))&&I(t,{lastSeenToken:o}),n}};try{"undefined"!=typeof window&&(window.edgetagProviders=window.edgetagProviders||[],window.edgetagProviders.push(Zt))}catch{}function Jt(t,e,i,s){var n,o=arguments.length,a=o<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,s);else for(var r=t.length-1;r>=0;r--)(n=t[r])&&(a=(o<3?n(a):o>3?n(e,i,a):n(e,i))||a);return o>3&&a&&Object.defineProperty(e,i,a),a}function Xt(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}"function"==typeof SuppressedError&&SuppressedError; /** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ const qt={attribute:!0,type:String,converter:et,reflect:!1,hasChanged:it},Qt=(t=qt,e,i)=>{const{kind:s,metadata:n}=i;let o=globalThis.litPropertyMetadata.get(n);if(void 0===o&&globalThis.litPropertyMetadata.set(n,o=new Map),"setter"===s&&((t=Object.create(t)).wrapped=!0),o.set(i.name,t),"accessor"===s){const{name:s}=i;return{set(i){const n=e.get.call(this);e.set.call(this,i),this.requestUpdate(s,n,t)},init(e){return void 0!==e&&this.C(s,void 0,t,e),e}}}if("setter"===s){const{name:s}=i;return function(i){const n=this[s];e.call(this,i),this.requestUpdate(s,n,t)}}throw Error("Unsupported decorator location: "+s)}; /** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ /** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ function te(t){return function(t){return(e,i)=>"object"==typeof i?Qt(t,e,i):((t,e,i)=>{const s=e.hasOwnProperty(i);return e.constructor.createProperty(i,t),s?Object.getOwnPropertyDescriptor(e,i):void 0})(t,e,i)}({...t,state:!0,attribute:!1})} /** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */const ee=(t,e,i)=>(i.configurable=!0,i.enumerable=!0,Reflect.decorate&&"object"!=typeof e&&Object.defineProperty(t,e,i),i) /** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */;function ie(t,e){return(i,s,n)=>{const o=e=>e.renderRoot?.querySelector(t)??null;if(e){const{get:t,set:e}="object"==typeof s?i:n??(()=>{const t=Symbol();return{get(){return this[t]},set(e){this[t]=e}}})();return ee(i,s,{get(){let i=t.call(this);return void 0===i&&(i=o(this),(null!==i||this.hasUpdated)&&e.call(this,i)),i}})}return ee(i,s,{get(){return o(this)}})}} /** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */const se=1;let ne=class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,i){this._$Ct=t,this._$AM=e,this._$Ci=i}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}; /** * @license * Copyright 2018 Google LLC * SPDX-License-Identifier: BSD-3-Clause */const oe="important",ae=" !"+oe,re=(t=>(...e)=>({_$litDirective$:t,values:e}))(class extends ne{constructor(t){if(super(t),t.type!==se||"style"!==t.name||t.strings?.length>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(t){return Object.keys(t).reduce(((e,i)=>{const s=t[i];return null==s?e:e+`${i=i.includes("-")?i:i.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${s};`}),"")}update(t,[e]){const{style:i}=t.element;if(void 0===this.ft)return this.ft=new Set(Object.keys(e)),this.render(e);for(const t of this.ft)null==e[t]&&(this.ft.delete(t),t.includes("-")?i.removeProperty(t):i[t]=null);for(const t in e){const s=e[t];if(null!=s){this.ft.add(t);const e="string"==typeof s&&s.endsWith(ae);t.includes("-")||e?i.setProperty(t,e?s.slice(0,-11):s,e?oe:""):i[t]=s}}return Ut}}); /** * @license * Copyright 2021 Google LLC * SPDX-License-Identifier: BSD-3-Clause */const le="linear(0, 0.009, 0.035 2.1%, 0.141, 0.281 6.7%, 0.723 12.9%, 0.938 16.7%, 1.017, 1.077, 1.121, 1.149 24.3%, 1.159, 1.163, 1.161, 1.154 29.9%, 1.129 32.8%, 1.051 39.6%, 1.017 43.1%, 0.991, 0.977 51%, 0.974 53.8%, 0.975 57.1%, 0.997 69.8%, 1.003 76.9%, 1.004 83.8%, 1)",de="cubic-bezier(0.25, 1, 0.5, 1)",ce=V` :host { --primary: var( --bw-primary, ${G(a.defaultValue)} ); --secondary: var( --bw-secondary, ${G(l.defaultValue)} ); --title-color: var( --bw-title-color, var( --primary, ${G(r.defaultValue)} ) ); --background: var( --bw-background, ${G(d.defaultValue)} ); --button-foreground: var( --bw-button-foreground, ${G(c.defaultValue)} ); --button-background: var( --bw-button-background, ${G(h.defaultValue)} ); --input-border: var( --bw-input-border, ${G(u.defaultValue)} ); --input-foreground: var( --bw-input-foreground, ${G(p.defaultValue)} ); --input-background: var( --bw-input-background, ${G(f.defaultValue)} ); --backdrop: var( --bw-backdrop, ${G(m.defaultValue)} ); --spring-easing: ${G(le)}; } `,he=()=>/\bGecko\/\d+/.test(navigator.userAgent);let ue=class extends Kt{constructor(){super(...arguments),this.hasEmail=!1,this.lastExpiredCart=void 0,this.state="ready",this.isStylesheetInjected=!1,this.transitionTo=t=>{return(e=this.dialog,e.animate([{transform:"perspective(1000px) rotateX(0)"},{transform:"perspective(1000px) rotateX(-90deg)"}],{duration:180,easing:de}).finished).then((()=>this.state=t)).then((()=>(t=>t.animate([{transform:"perspective(1000px) rotateX(90deg)"},{transform:"perspective(1000px) rotateX(0)"}],{duration:180,easing:de}).finished)(this.dialog))).catch(P);var e},this.restoreCart=async()=>{if(!this.lastExpiredCart)return;if(!this.silentRestore){const t=this.email.value.trim().toLowerCase();t&&(await this.walletAPI.saveEmail(t),this.email.value="",this.hasEmail=!0,this.dispatchEvent(new CustomEvent("blotout-wallet-email-saved",{bubbles:!0})))}this.restoreResponse=await this.storeAPI.addItems(this.lastExpiredCart.items,this.lastExpiredCart.token);const t=this.lastExpiredCart.cartId;await this.walletAPI.restoreCart(t,this.silentRestore),this.lastExpiredCart=void 0,this.dispatchEvent(new CustomEvent("blotout-wallet-cart-restored",{bubbles:!0}))},this.onSubmit=async t=>{t.preventDefault(),t.stopPropagation();try{await this.transitionTo("loading"),await this.restoreCart(),await this.transitionTo("restored"),await i(2e3),"restored"==this.state&&this.hideModal("restore"),this.afterHandleRestore()}catch(t){P(t),await this.transitionTo("failed")}},this.afterHandleRestore=()=>{if(this.afterRestore)switch(this.afterRestore.action){case"refresh":window.location.reload();break;case"redirect":try{window.location.href=new URL(this.afterRestore.url,window.location.href).toString()}catch(t){console.error("Invalid redirect URL",t)}break;case"checkout":{const t=this.storeAPI.getCheckoutURL();t&&(window.location.href=t.toString())}}},this.onDialogClick=()=>{"loading"!=this.state&&(this.hideModal(),this.email.value="")},this.onWrapperClick=t=>{t.stopPropagation()},this.onDialogClose=()=>{this.dialog.returnValue||"ready"!=this.state&&"failed"!=this.state||this.setDismissed()},this.expiredCartContent=()=>{var t,e,i,s,n,o;return Et`
${(null===(t=this.theme)||void 0===t?void 0:t.title)?Et`

${this.theme.title}

`:Pt}
${o=(null===(e=this.theme)||void 0===e?void 0:e.text)||g.defaultValue,function*(t,e){const i="function"==typeof e;if(void 0!==t){let s=-1;for(const n of t)s>-1&&(yield i?e(s):e),s++,yield n}}(o.split(/<\s*br\s*\/?\s*>/),Et`
`)}
`},this.loadingContent=()=>{return Et` ${t={class:"icon"},_t` `}
Your cart is being restored …
`;var t},this.restoredContent=()=>{return Et` ${t={class:"icon"},_t` `}
Cart restored successfully!
${this.restoreResponse?Et`

Some items could not be added: ${this.restoreResponse}

`:Pt} `;var t},this.failedContent=()=>{return Et` ${t={class:"icon"},_t` `}
Sorry, we couldn't restore your cart.
`;var t}}get isPopUpDismissed(){return"1"===(t=>{var e;try{return document&&document.cookie&&(null!==(e=C(document.cookie)[t])&&void 0!==e)?e:""}catch{return""}})("isPopUpDismissed")}setDismissed(){E("isPopUpDismissed","1",{maxAge:1800}),this.walletAPI.sendEvent("popupDismissed").catch(P)}connectedCallback(){var t;if(super.connectedCallback(),!this.isStylesheetInjected&&(null===(t=this.theme)||void 0===t?void 0:t.css)){const t=new CSSStyleSheet;t.replaceSync(this.theme.css),this.shadowRoot.adoptedStyleSheets.push(t),this.isStylesheetInjected=!0}document.hidden?document.addEventListener("visibilitychange",(()=>this.initialize()),{once:!0}):this.initialize()}async initialize(){if(!this.isPopUpDismissed){await i(1e3);try{const{email:t,carts:e}=await this.walletAPI.getExpiredCarts();this.dispatchEvent(new CustomEvent("blotout-wallet-loaded",{bubbles:!0})),this.hasEmail=t,this.lastExpiredCart=e[0],(null==e?void 0:e.length)&&(this.silentRestore?this.restoreCart().then(this.afterHandleRestore).catch(P):this.isPopUpDismissed||this.showModal())}catch(t){P(t)}}}showModal(){this.dialog.showModal(),new Promise(requestAnimationFrame).catch(P).finally((()=>(t=>{const e=[t.animate([{transform:"translateY(-20px)",opacity:0},{transform:"translateY(0)",opacity:1}],{duration:600,easing:le,composite:"add"})];return he()||e.push(t.animate([{opacity:0},{opacity:1}],{duration:300,easing:"ease-out",pseudoElement:"::backdrop",fill:"forwards"})),Promise.all(e.map((t=>t.finished)))})(this.dialog))),this.dispatchEvent(new CustomEvent("blotout-wallet-shown",{bubbles:!0})),this.walletAPI.sendEvent("popupShown").catch(P)}hideModal(t){(t=>{const e=[t.animate([{transform:"translateY(0)",opacity:1},{transform:"translateY(20px)",opacity:0}],{duration:600,easing:le})];return he()||e.push(t.animate([{opacity:1},{opacity:0}],{duration:300,easing:"ease-out",pseudoElement:"::backdrop",fill:"forwards"})),Promise.all(e.map((t=>t.finished)))})(this.dialog).catch(P).finally((()=>{var e;return null===(e=this.dialog)||void 0===e?void 0:e.close(t)})),this.dispatchEvent(new CustomEvent("blotout-wallet-hidden",{bubbles:!0})),this.restoreResponse=void 0}async skipCarts(){this.hideModal("skip");try{await this.walletAPI.deleteCarts(),this.lastExpiredCart=void 0}catch(t){P(t)}}render(){return this.isPopUpDismissed?Pt:Et`
${this.expiredCartContent()}
${this.loadingContent()}
${this.restoredContent()}
${this.failedContent()}
`}};var pe,fe,me;let ge;return ue.styles=[ce,V` * { box-sizing: border-box; font-family: inherit; font-size: 16px; line-height: 24px; } strong { font-weight: bold; } button { cursor: pointer; } .popup { width: 430px; max-width: 100vw; color: var(--primary); background: var(--background); border: none; border-radius: 20px; padding: 24px; text-align: center; } .popup::backdrop { background: var(--backdrop); backdrop-filter: blur(4px); } .restore-form { display: flex; flex-direction: column; gap: 16px; width: 100%; } .title { margin: 0; padding: 0; font-size: 20px; font-weight: bold; line-height: 30px; color: var(--title-color); } .text { margin: 0; padding: 0; } .email { width: 100%; border: 1px solid var(--input-border); color: var(--input-foreground); background: var(--input-background); padding: 10px 16px; border-radius: 5px; } .email::placeholder { color: var(--input-foreground); color: color(from var(--input-foreground) srgb r g b / 0.7); } :is(.email, button):focus-visible { outline-color: var(--primary); } .restore { width: 100%; border: none; color: var(--button-foreground); background: var(--button-background); border-radius: 5px; padding: 12px 20px; } .reject { font-size: 14px; line-height: 20px; color: var(--secondary); border: none; background: none; padding: 0; text-decoration: underline var(--secondary); } .centered { display: flex; flex-direction: column; gap: 16px; width: 100%; justify-content: center; align-items: center; } .icon { color: var(--button-background); } `],Jt([ie("dialog"),Xt("design:type",HTMLDialogElement)],ue.prototype,"dialog",void 0),Jt([ie("input[name=email]"),Xt("design:type",HTMLInputElement)],ue.prototype,"email",void 0),Jt([te(),Xt("design:type",Object)],ue.prototype,"hasEmail",void 0),Jt([te(),Xt("design:type",Object)],ue.prototype,"lastExpiredCart",void 0),Jt([te(),Xt("design:type",String)],ue.prototype,"state",void 0),Jt([te(),Xt("design:type",Object)],ue.prototype,"restoreResponse",void 0),ue=Jt([(t=>(e,i)=>{void 0!==i?i.addInitializer((()=>{customElements.define(t,e)})):customElements.define(t,e)})("blotout-wallet")],ue),"undefined"!=typeof window&&"undefined"!=typeof document&&(null!==(pe=window[A])&&void 0!==pe||(window[A]={}),null!==(fe=(me=window[A]).ui)&&void 0!==fe||(me.ui={init(t){ge||(ge=document.createElement("blotout-wallet"),t.theme&&(ge.style.cssText=Object.entries(t.theme).filter((([t])=>t.startsWith("--"))).map((([t,e])=>`${t}:${e}`)).join(";")),Object.assign(ge,t),document.body.append(ge))}})),Zt}(); ; (function () { 'use strict'; const expand = (str) => str.split(',').flatMap((entry) => { if (!entry.includes('-')) { return entry; } const result = []; const [start, end] = entry.split('-').map(Number); for (let i = start; i <= end; i++) { result.push(i.toString()); } return result; }); /** * Exported from https://en.wikipedia.org/wiki/List_of_North_American_Numbering_Plan_area_codes * * In Dev Tools, select the `tbody` element containing the area codes and run the following code, * replacing the emdash character with a simple endash: * * ```ts * [...$0.querySelectorAll('td:first-child')] * .filter(cell => cell.firstChild.nodeName != 'A') * .map(cell => cell.textContent.trim()).join(',') * ``` */ new Set([ ...expand('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'), ...expand('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'), ...expand('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'), ...expand('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'), ...expand('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'), ...expand('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'), ...expand('811,821,822,823-824,827,834,836,841-842,846,851,852-853,871,874-875,879,880-887,889,890-899'), ...expand('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 delay = (n, resolvedValue) => new Promise((resolve) => setTimeout(() => resolve(resolvedValue), n)); /** * ISO-3166 2-leter country codes and their names * @see https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2 */ const isoCountries = 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, Islamic 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'], ]); /** * ISO-3166 US state ISO codes * @see https://en.wikipedia.org/wiki/ISO_3166-2:US * */ const usStates = 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.'], ]); new Set([...isoCountries.keys(), ...usStates.keys()]); const cartTokenCookie = 'cart'; const cartTokenTwoCookie = 'cart2'; var _a$1; const registryKey = Symbol.for('blotout-wallet'); if (typeof window != 'undefined') { (_a$1 = window[registryKey]) !== null && _a$1 !== void 0 ? _a$1 : (window[registryKey] = {}); } const getCookieValue = (key) => { var _a; try { if (!document || !document.cookie) { return ''; } const cookies = parseCookies(document.cookie); return (_a = cookies[key]) !== null && _a !== void 0 ? _a : ''; } catch { return ''; } }; const parseCookies = (cookie) => { return Object.fromEntries(cookie .split(/;\s+/) .map((r) => r.split('=').map((str) => str.trim())) .map(([cookieKey, ...cookieValues]) => { const cookieValue = cookieValues.join('='); if (!cookieKey) { return []; } let decodedValue = ''; if (cookieValue) { try { decodedValue = decodeURIComponent(cookieValue); } catch (e) { console.log(`Unable to decode cookie ${cookieKey}: ${e}`); decodedValue = cookieValue; } } return [cookieKey, decodedValue]; })); }; var _a, _b; var _c; const MAX_RETRY_COUNT = 3; const RETRY_DELAY = 500; const ERROR_PATTERNS = { cannotAddMore: /^You can't add more (.*?) to the cart\.$/, soldOut: /^The product '?(.*?)'? is already sold out\.$/, }; const getItemNameFromDescription = (description) => { let matches = description.match(ERROR_PATTERNS.cannotAddMore); if (matches === null || matches === void 0 ? void 0 : matches.length) return matches[1]; matches = description.match(ERROR_PATTERNS.soldOut); if (matches === null || matches === void 0 ? void 0 : matches.length) return matches[1]; return null; }; const addItemsToCart = (fetchOverride, itemsToAdd) => fetchOverride(`${window.Shopify.routes.root}cart/add.js`, { method: 'POST', body: JSON.stringify({ items: itemsToAdd.map((item) => ({ id: item.variantId || item.productId, quantity: item.quantity, })), }), headers: { 'Content-type': 'application/json' }, }); const createShopApi = (fetchOverride = window.fetch) => ({ async addItems(items) { var _a; let filteredItems = items; const unavailableItems = []; for (let retries = 0; retries < MAX_RETRY_COUNT; retries++) { const response = await addItemsToCart(fetchOverride, filteredItems); if (response.ok) { break; } if (response.status == 422) { const data = (await response.json()); const rejectedItemName = (_a = getItemNameFromDescription(data.description)) === null || _a === void 0 ? void 0 : _a.toLowerCase(); if (!rejectedItemName) { throw new Error(`Could not add items`, { cause: data }); } else { const oldLength = filteredItems.length; filteredItems = filteredItems.filter((item) => { if (item.name.toLowerCase().includes(rejectedItemName)) { unavailableItems.push(item.name); return false; } return true; }); if (filteredItems.length == 0) { break; } else if (oldLength == filteredItems.length) { throw new Error(`Could not add items`, { cause: data }); } } await delay(RETRY_DELAY); } else if (!response.ok) { throw new Error(`Could not add items`, { cause: await response.text() }); } } return unavailableItems.length > 0 ? `Some items could not be added: ${unavailableItems.join(', ')}` : undefined; }, getCartToken() { let cartToken = getCookieValue(cartTokenCookie); if (!cartToken) { cartToken = getCookieValue(cartTokenTwoCookie); } return cartToken || null; }, getCheckoutURL() { const token = this.getCartToken(); return token ? new URL(`/checkouts/cn/${token}`, window.location.origin) : null; }, }); if (typeof window != 'undefined') { (_a = window[registryKey]) !== null && _a !== void 0 ? _a : (window[registryKey] = {}); // if a custom implementation is already present, don't override it (_b = (_c = window[registryKey]).storeAPIFactory) !== null && _b !== void 0 ? _b : (_c.storeAPIFactory = createShopApi); } })(); ; /** * Minified by jsDelivr using Terser v5.39.0. * Original file: /npm/@blotoutio/providers-google-ads-clicks-sdk@1.31.1/index.js * * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files */ var ProvidersGoogleAdsClicksSdk=function(){"use strict";const a="googleAdsClicks",n=a=>"boolean"==typeof a,e=a=>!!a&&"object"==typeof a&&!Array.isArray(a),i=a=>a.split(",").flatMap((a=>{if(!a.includes("-"))return a;const n=[],[e,i]=a.split("-").map(Number);for(let a=e;a<=i;a++)n.push(a.toString());return n}));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 t=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, Islamic 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"]]),o=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."]]);new Set([...t.keys(),...o.keys()]);const r=a=>{const i=((a,i)=>{var t,o;let r=!1;if(e(null==a?void 0:a.consent)&&(r=!!n(a.consent.all)&&a.consent.all,i in a)){const t=a.consent[i];if(n(t))r=t;else if(e(t))return Object.keys(t).some((a=>!0===t[a]))}if(e(a.categories)&&e(null===(t=a.consentSettings)||void 0===t?void 0:t.channels)){r=!!n(a.categories.all)&&a.categories.all;const e=null===(o=Object.entries(a.consentSettings.channels).find((([,a])=>a.includes(i))))||void 0===o?void 0:o[0];e&&a.categories[e]&&(r=!0)}return r})(a,"googleAdsClicks");return{ad_storage:i?"granted":"denied",ad_user_data:i?"granted":"denied",ad_personalization:i?"granted":"denied"}},s=a=>Object.fromEntries(a.split(/;\s+/).map((a=>a.split("=").map((a=>a.trim())))).map((([a,...n])=>{const e=n.join("=");if(!a)return[];let i="";if(e)try{i=decodeURIComponent(e)}catch(n){console.log(`Unable to decode cookie ${a}: ${n}`),i=e}return[a,i]}))),l=(a,n)=>{let e=a.trim();return n?(e=e.replaceAll("{productId}",n.id),e=e.replaceAll("{variantId}",n.variantId||""),e=e.replaceAll("{sku}",n.sku||""),e):e},d={name:a,init:({manifest:n,consentData:e,executionContext:i})=>{var t,o,s;if(!window||!(null===(t=null==n?void 0:n.variables)||void 0===t?void 0:t.tagId)||"1"!==n.variables.loadSDK)return;const l={send_page_view:!1};"gtag"===(null===(o=n.variables)||void 0===o?void 0:o.enhancedConversionsSetting)&&(l.allow_enhanced_conversions=!0),window.dataLayer=window.dataLayer||[],window.gtag=function(){window.dataLayer.push(arguments)},window.google_tag_manager&&window.google_tag_manager[n.variables.tagId]||((n,e,i,t)=>{var o;if(!window.gtag)return;if("1"!=t){let a=!1;for(const n of["googleAdsClicks","googleAnalytics4"])if(null===(o=i.get(n))||void 0===o?void 0:o.get("gtag")){a=!0;break}const n=r(e);a?window.gtag("consent","update",n):window.gtag("consent","default",{...n,functional_storage:"granted",personalization_storage:"granted",security_storage:"granted"})}((a,n,e,i)=>{const t=a.has(n)?a.get(n):i();a.set(n,e(t))})(i,a,(a=>a.set("gtag",!0)),(()=>new Map)),window.gtag("js",new Date);const s=document.createElement("script");s.async=!0,s.src=`https://www.googletagmanager.com/gtag/js?id=${n}`;const l=document.getElementsByTagName("script")[0];l&&l.parentNode&&l.parentNode.insertBefore(s,l)})(n.variables.tagId,e,i,null===(s=n.variables)||void 0===s?void 0:s.consentSkip),window.gtag&&window.gtag("config",n.variables.tagId,l)},tag:({data:a,eventName:n,manifestVariables:e,destination:i})=>{if(!(n&&window.gtag&&(null==e?void 0:e.tagId)&&"1"===(null==e?void 0:e.loadSDK)&&(a=>{var n;try{return document&&document.cookie&&(null!==(n=s(document.cookie)[a])&&void 0!==n)?n:""}catch{return""}})("_gcl_au")))return{isFired:!1,sdkVersion:"1.31.1"};const t=((a,n)=>{if(!n)return"";let e=[];try{e=n.conversionMappings}catch(a){}const i=e.find((n=>n.eventName===a));return null==i?void 0:i.browserConversionLabel})(n,e);if(!t)return{isFired:!1,sdkVersion:"1.31.1"};"gtag"===e.enhancedConversionsSetting&&i&&window.gtag("set","user_data",(a=>{var n,e,i;let t={};const o={},r={};try{t=null!==(i=null===(e=null===(n=JSON.parse(window.sessionStorage.getItem("_workerStoreMultiple")||"{}"))||void 0===n?void 0:n[a])||void 0===e?void 0:e.kv)&&void 0!==i?i:{}}catch(a){}return t.email&&(o.email=t.email),t.phone&&(o.phone_number=t.phone),t.firstName&&(r.first_name=t.firstName),t.lastName&&(r.last_name=t.lastName),t.zip&&(r.postal_code=t.zip),t.city&&(r.city=t.city),Object.keys(r).length&&(o.address=[r]),o})(i));const o=(a=>{const n={};return a?(a.value&&(n.value=a.value),a.currency&&(n.currency=a.currency),a.orderId&&(n.transaction_id=a.orderId),n):n})(a),r=((a,n)=>{const e={},i=parseInt(a.merchantId);return isNaN(i)||(e.aw_merchant_id=i),a.identifierFormat&&Array.isArray(null==n?void 0:n.contents)&&(e.items=n.contents.map((n=>({id:l(a.identifierFormat,n),price:n.item_price,quantity:n.quantity})))),e})(e,a);return window.gtag("event","conversion",{send_to:t,...o,...r,app:"blotout"}),{isFired:!0,sdkVersion:"1.31.1"}},consent:({consentData:a,variables:n})=>{if(!(null===window||void 0===window?void 0:window.gtag))return;if(n.some((a=>{var n;return"1"==(null===(n=a.variableSet)||void 0===n?void 0:n.consentSkip)})))return;const e=r(a);window.gtag("consent","update",{...e,personalization_storage:"granted",security_storage:"granted",functional_storage:"granted"})},user:({data:a,manifestVariables:n,destination:e})=>{const i=null==n?void 0:n.queryKey;if(i)try{const n=a[`googleAdsClicks::${i}`],t="_gcl_aw";if(!n)return;const o=((a,n)=>{const e=new Date(a);return e.setDate(e.getDate()+n),e})(new Date,90),r=`GCL.${(Date.now()+500)/1e3|0}.${n}`;let s="";e&&(s=`domain=${e.slice(e.indexOf("."))}`),document.cookie=`${t}=${r};expires=${o.toUTCString()};path=/;${s}`}catch{}}};try{window&&(window.edgetagProviders||(window.edgetagProviders=[]),window.edgetagProviders.push(d))}catch{}return d}(); ; /** * Minified by jsDelivr using Terser v5.39.0. * Original file: /npm/@blotoutio/edgetag-sdk-browser@1.31.1/index.js * * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files */ !function(){"use strict";var e=Object.freeze({__proto__:null,get consent(){return Ee},get data(){return Pe},get getConsent(){return Ge},get getData(){return ke},get getUserId(){return Le},get init(){return Me},get isNewUser(){return De},get keys(){return Te},get ready(){return Oe},get setConfig(){return Be},get tag(){return Re},get user(){return Ae}});const n=e=>"boolean"==typeof e,t=e=>!!e&&"object"==typeof e&&!Array.isArray(e),a=(e,a,s)=>{var o,i;let r=!1;if(t(e.consentChannel)&&(r=!!n(e.consentChannel.all)&&e.consentChannel.all,a in e.consentChannel)){const o=e.consentChannel[a];n(o)?r=o:t(o)&&("all"in o&&n(o.all)&&(r=o.all),s in o&&n(o[s])&&(r=o[s]))}if(r)return!0;if(t(e.consentCategory)&&t(null===(o=e.consentSettings)||void 0===o?void 0:o.channels)){r=!!n(e.consentCategory.all)&&e.consentCategory.all;const t=null===(i=Object.entries(e.consentSettings.channels).find((([,e])=>e.includes(a))))||void 0===i?void 0:i[0];t&&e.consentCategory[t]&&(r=!0)}return r},s=(e,a,s)=>{if(!t(e))return!0;if(a in e){const o=e[a];if(n(o))return o;if(t(o)){const e=Object.keys(o).filter((e=>"all"!=e));return s in o&&n(o[s])?o[s]:n(o.all)?o.all:0==e.length}}const o=Object.keys(e).filter((e=>"all"!=e));return n(e.all)?e.all:0==o.length},o=e=>e.split(",").flatMap((e=>{if(!e.includes("-"))return e;const n=[],[t,a]=e.split("-").map(Number);for(let e=t;e<=a;e++)n.push(e.toString());return n}));new Set([...o("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"),...o("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"),...o("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"),...o("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"),...o("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"),...o("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"),...o("811,821,822,823-824,827,834,836,841-842,846,851,852-853,871,874-875,879,880-887,889,890-899"),...o("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 i=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, Islamic 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."]]);new Set([...i.keys(),...r.keys()]);const l=new Map,d=(e,n,t,a)=>{if(!e||!a)return!0;let s=l.get(a);s||(s=(e=>{const n=new Set,t=new Set;if(e){const[a="",s=""]=e.split("|");for(const e of a.split(","))e&&n.add(e);for(const e of s.split(","))e&&t.add(e)}return{include:n,exclude:t}})(a),l.set(a,s));const o=[e,`${e}-${n}`];return t&&o.push("EU"),"GB"===e&&o.push("UK"),(!s.include.size||!o.every((e=>!s.include.has(e))))&&(!s.exclude.size||!o.some((e=>s.exclude.has(e))))},c=()=>{var e;return null!==(e=globalThis.edgeTagSettings)&&void 0!==e?e:globalThis.edgeTagSettings={}},u=(e,n)=>{const t=c();e?t[e]={...t[e],...n}:Object.keys(t).forEach((e=>{t[e]={...t[e],...n}}))},g=(e,n)=>{var t;return null===(t=c()[e])||void 0===t?void 0:t[n]},f=()=>Object.keys(c()),S=(e,n)=>{const t=g(e,"manifest");return t&&t.filter((e=>e.package===n)).map((e=>({tagName:e.tagName,geoRegions:e.geoRegions||null,variableSet:e.variables||{}})))||[]},m=()=>{try{return navigator.userAgent}catch{return""}},h=e=>{let n="";try{const t=new URL(document.referrer),a=new URL(w(e));return t.host!==a.host&&(n=t.href),n}catch(e){return n}},w=e=>{const n=g(e,"config");let t=(null==n?void 0:n.pageUrl)||"";try{if(window.edgetagData&&window.edgetagData.pageUrl)return window.edgetagData.pageUrl;t||(t=window.location.href)}catch{}return t},v=e=>{try{return new URL(w(e)).search}catch{return""}},p=()=>{try{return navigator.language}catch{return""}},U=()=>{try{return document.title}catch{return""}},y=(e,n)=>{if(typeof e!=typeof n||Array.isArray(e)!==Array.isArray(n)||isNaN(e)!==isNaN(n))return!1;if("object"!=typeof e||null===e)return e===n;const t=Object.keys(e),a=Object.keys(n);if(t.length!==a.length)return!1;for(const a of t){if(!(a in n))return!1;if(!y(e[a],n[a]))return!1}return!0},C="edgeTag",I="consent",b="consentCategories",N="_worker",M="fallback_tag_user_id",R="storageId",E=()=>parseInt((1e10*Math.random()).toString(),10),A=e=>{let n=Date.now().toString();if("undefined"!=typeof performance&&"function"==typeof performance.now){const e=performance.now();e&&(n=e.toFixed(4))}return`${(e=>"undefined"==typeof btoa?Buffer.from(e).toString("base64"):btoa(e))(e)}-${(()=>{let e="";try{if(e=crypto.randomUUID(),!e){const n=new Uint32Array(20),t=crypto.getRandomValues(n);for(let n=0;n<5;n++){const a=3*n;0!==n&&(e+="-"),e+=(t[a+1]+t[a+2]+t[a+3]).toString()}}}catch{e=`${E()}-${E()}-${E()}-${E()}-${E()}`,console.log("[EdgeTag] Crypto module not found")}return e})()}-${n}`},P=e=>{var n;try{if(!document||!document.cookie)return"";return null!==(n=k(document.cookie)[e])&&void 0!==n?n:""}catch{return""}},k=e=>Object.fromEntries(e.split(/;\s+/).map((e=>e.split("=").map((e=>e.trim())))).map((([e,...n])=>{const t=n.join("=");if(!e)return[];let a="";if(t)try{a=decodeURIComponent(t)}catch(n){console.log(`Unable to decode cookie ${e}: ${n}`),a=t}return[e,a]}))),T=()=>{try{return"1"===localStorage.getItem("edgeTagDebug")}catch{return!1}},L="[EdgeTag]",G=(...e)=>{T()&&console.log(L,...e)},D=(...e)=>{T()&&console.error(L,...e)},B=`${N}StoreMultiple`,O=(e,n,t,a,s)=>{const o=j(e,n);o.data||(o.data={}),o.data[t]||(o.data[t]={}),o.data[t][s]=a,V(e,n,o)},K=(e,n)=>{const t=j(e,"session");t.kv||(t.kv={}),t.kv={...t.kv,...n},V(e,"session",t)},$=(e,n,t,a,s)=>{const o=j(e,n);o[t]||(o[t]={}),o[t][s]=a,V(e,n,o)},F=(e,n,t,a)=>{const s=j(e,n);if(s[t])return s[t][a]},V=(e,n,t,a=B)=>{if("session"===n){const n=W(a);return n[e]=t,void z(n,a)}const s=J(a);s[e]=t,H(s,a)},j=(e,n,t=B)=>{let a;return a="session"===n?W(t):J(t),(null==a?void 0:a[e])||{}},H=(e,n)=>{try{if(!localStorage)return;localStorage.setItem(n,JSON.stringify(e))}catch{G("Local storage not supported.")}},J=e=>{try{if(!localStorage)return{};const n=localStorage.getItem(e);return n&&JSON.parse(n)||{}}catch{return{}}},z=(e,n)=>{try{if(!sessionStorage)return;sessionStorage.setItem(n,JSON.stringify(e))}catch{G("Session storage not supported.")}},W=e=>{try{if(!sessionStorage)return{};const n=sessionStorage.getItem(e);return n&&JSON.parse(n)||{}}catch{return{}}},Z=e=>{const n=g(e,"userId");return n||P("tag_user_id")},q=(e,n)=>{try{let t;return n&&(t=new Blob([JSON.stringify(n)],{type:"application/json"})),navigator.sendBeacon(e,t)}catch(e){return Promise.reject(new Error("Beacon not supported."))}},x=(e,n,t,a)=>fetch(t,{method:n,headers:{"Content-type":"application/json; charset=utf-8",Accept:"application/json; charset=utf-8",EdgeTagUserId:Z(e)},body:JSON.stringify(a),credentials:"include"}).then((e=>e.json().then((n=>({status:e.status,body:n}))))).then((({status:e,body:n})=>{if(e<200||e>=300)throw new Error(`Request failed with code ${e}: ${JSON.stringify(n)}`);return Promise.resolve(n)}));async function Y(e,n,t){if(!e)return Promise.reject(new Error("URL is empty."));const a=new URL(e).origin,s=((e,n)=>{const t={pageUrl:w(e),pageTitle:U(),userAgent:m(),referrer:h(e),search:v(e),locale:p(),sdkVersion:"1.31.1",...n||{}};let a={};const s=j(e,"session");s&&(a={...a,...s});const o=j(e,"local");return o&&(a={...a,...o}),t.storage=a,t})(a,n);return t&&"beacon"===t.method?Promise.resolve(q(e,s)):await x(a,"POST",e,s)}async function _(e,n){if(!e)return Promise.reject(new Error("URL is empty."));if(n&&"beacon"===n.method)return{result:Promise.resolve(q(e))};const t=new URL(e).origin;return await x(t,"GET",e)}const Q=(e,n)=>e?`${e}${n}`:(G("URL is not valid"),""),X=e=>{const n=F(e,"local",C,I);return n||g(e,"consent")},ee=e=>{const n=F(e,"local",C,b);return n||g(e,"consentCategories")},ne=(e,n)=>{const t=g(e,"stubs")||[];u(e,{stubs:[...t,n]})},te=(e,n,t)=>{_(((e,n)=>Q(e,`/data?keys=${encodeURIComponent(n.join(","))}`))(e,n)).then((e=>{t((null==e?void 0:e.result)||{})})).catch(D)},ae=(e,{eventName:n,eventId:t,data:a,providerData:s,providers:o,options:i})=>{const r={eventName:n,eventId:t,timestamp:Date.now(),data:a,providerData:s};o&&(r.providers=o),Y(((e,n,t)=>{const a=new URL(Q(e,"/tag"));return(null==t?void 0:t.sync)&&a.searchParams.set("sync","true"),n&&a.searchParams.set("name",n),a.toString()})(e,n,i),r,i).catch(D)},se=(e,n,t={},o,i)=>{var r,l;if(!g(e,"initialized"))return void ne(e,{name:"tag",arguments:[n,t,o,i]});let c=t.eventId;c||(c=A(n));const u=g(e,"browserPackages"),f=g(e,"channels"),m=g(e,"skipZeroPurchaseEvent")||!1,h=g(e,"geoCountry")||null,w=g(e,"geoRegion")||null,v=g(e,"isEURequest")||!1,p=g(e,"sessionId"),U=Z(e),y={},C={consentChannel:X(e),consentCategory:ee(e),consentSettings:g(e,"consentSetting")};if(m&&(e=>{var n;return"Purchase"==e.eventName&&0===parseFloat(null===(n=e.data)||void 0===n?void 0:n.value)})({eventName:n,data:t}))return;const I=((e,n)=>{const t=e.currency,a=parseFloat(e.value);if(!t||!n)return null;const s=n.rates.find((e=>e.from===t));if(!s)return null;if(e.currency=s.to,a&&(e.value=parseFloat((a*s.value).toFixed(3))),"contents"in e&&Array.isArray(e.contents))for(const n of e.contents)"item_price"in n&&(n.item_price=parseFloat((n.item_price*s.value).toFixed(3)));return{providers:n.providers,payload:e}})(JSON.parse(JSON.stringify(t)),g(e,"currency"));for(const i of u){if(!i||!i.name||!i.tag)continue;if(!f.has(i.name)){G(`Provider ${i.name} is not in allow list`);continue}const u=S(e,i.name),g={},m=new Map;for(const f of u){if(!s(o,i.name,f.tagName)){G(`Provider instance is not allowed (${i.name}: ${f.tagName})`);continue}if(!a(C,i.name,f.tagName)){G(`Consent is missing (${i.name}: ${f.tagName})`);continue}if(!d(h,w,v,f.geoRegions)){G("GEO request region does not match the filter, skiping");continue}const u=0===(null===(r=null==I?void 0:I.providers)||void 0===r?void 0:r.length)||(null===(l=null==I?void 0:I.providers)||void 0===l?void 0:l.includes(i.name))?I.payload:t;g[f.tagName]=i.tag({userId:U,sessionId:p,eventName:n,eventId:c,data:JSON.parse(JSON.stringify(u)),sendTag:ae.bind(null,e),getEdgeData:te.bind(null,e),manifestVariables:f.variableSet,executionContext:m,destination:e})}y[i.name]=g}oe(f,C,o)&&ae(e,{eventName:n,eventId:c,data:t,providerData:y,providers:o,options:i})},oe=(e,n,t)=>{for(const[o,i]of e)for(const e of i)if(a(n,o,e)&&s(t,o,e))return!0;return!1},ie=(e,n,t,o)=>{K(e,n);const i=g(e,"browserPackages"),r=g(e,"channels"),l=Z(e),c=g(e,"geoCountry")||null,u=g(e,"geoRegion")||null,f=g(e,"isEURequest")||!1,m={consentChannel:X(e),consentCategory:ee(e),consentSettings:g(e,"consentSetting")};for(const o of i){if(!o||!o.user||!o.name)continue;if(!r.has(o.name)){G(`Provider ${o.name} is not in allow list`);continue}const i=S(e,o.name);for(const r of i)s(t,o.name,r.tagName)?a(m,o.name,r.tagName)?d(c,u,f,r.geoRegions)?o.user({userId:l,data:n,manifestVariables:r.variableSet,destination:e}):G("GEO request region does not match list, skipping"):G(`Consent is missing for ${o.name} (${r.tagName})`):G(`Data not allowed for ${o.name} (${r.tagName})`)}Y((e=>Q(e,"/data"))(e),{data:n,providers:t},o).catch(D)},re=(e,n,t)=>{e&&0!==Object.keys(e).length?(null==t?void 0:t.destination)?ie(t.destination,e,n,t):f().forEach((a=>{ie(a,e,n,t)})):D("Provide data for data API.")},le=(e,n,t)=>{u(e,{consent:n,consentCategories:t}),$(e,"local",C,n,I),$(e,"local",C,t,b)},de=(e,n,t,s)=>{const o=X(e),i=ee(e);if(y(o,n)&&y(i,t))return;if(!g(e,"initialized"))return void ne(e,{name:"consent",arguments:[n,t,s]});const r={consentString:n,consentCategories:{...t,necessary:!0}};le(e,n,t),(null==s?void 0:s.localSave)||Y((e=>Q(e,"/consent"))(e),r).catch(D);const l=Z(e),c=g(e,"browserPackages"),u=new Map,f=g(e,"geoCountry")||null,m=g(e,"geoRegion")||null,h=g(e,"isEURequest")||!1,w=g(e,"consentSetting");for(const s of c){if(!s||!s.name||!s.init)continue;const o=S(e,s.name);for(const i of o){a({consentChannel:n,consentCategory:t,consentSettings:w},s.name,i.tagName)&&(d(f,m,h,i.geoRegions)&&s.init({userId:l,isNewUser:!1,baseUrl:e,manifest:{tagName:i.tagName,variables:i.variableSet,package:s.name,geoRegions:i.geoRegions},sendTag:ae.bind(null,e),sendEdgeData:ie.bind(null,e),getEdgeData:te.bind(null,e),keyName:`${N}Store`,executionContext:u,session:null,destination:e,consentData:{consent:n,categories:{...t,necessary:!0},consentSettings:w}}))}}try{window.dispatchEvent(new CustomEvent("edgetag-consent",{detail:{destination:e,oldConsent:o,newConsent:n,oldConsentCategories:i,newConsentCategories:t}}))}catch{}for(const a of Object.values(c)){if(!a||!a.name||!a.consent)continue;const s=S(e,a.name);a.consent({consentData:{consent:n,categories:{...t,necessary:!0},consentSettings:w},variables:s})}},ce=e=>{var n;if(!e)return null;if(!e.edgeURL)return D("Please provide URL for EdgeTag"),null;const t={};null===(n=e.providers)||void 0===n||n.forEach((e=>{e.name&&(t[e.name]=e)}));try{window&&Array.isArray(window.edgetagProviders)&&window.edgetagProviders.forEach((e=>{e.name&&(t[e.name]=e)}))}catch{}var a,s;return a=e.edgeURL,s={disableConsent:!!e.disableConsentCheck},c()[a]={destination:a,initialized:!1,stubs:[],browserPackages:[],channels:new Map,geoCountry:null,geoRegion:null,isEURequest:!1,consentSetting:{enabled:!1,channels:{}},...s},t},ue=`${N}Cache`,ge=e=>e,fe=(e,n,t,a)=>{if(!t)return;let s=t;if("string"!=typeof t)try{s=JSON.stringify(t)}catch{return void G("Error stringify value.")}re({[`${a}::${n}`]:s},void 0,{destination:e})},Se=(e,n,t,a,s,o)=>{let i;try{switch(s){case"cookie":i=(null!=o?o:ge)(P(t));break;case"local":i=(null!=o?o:ge)(localStorage.getItem(t));break;case"session":i=(null!=o?o:ge)(sessionStorage.getItem(t))}}catch{return}if(!i)return;const r=`${Z(e)}/${t}`,l=((e,n,t,a)=>{var s;return null===(s=j(e,"edge"===n?"local":n,ue)[t])||void 0===s?void 0:s[a]})(e,a,n,r);if("edge"===a&&l!==i)return fe(e,t,i,n),void((e,n,t,a,s)=>{const o="edge"===n?"local":n,i=j(e,o,ue);i[t]?i[t][a]=s:i[t]={[a]:s},V(e,o,i,ue)})(e,a,n,r,i);O(e,a,n,i,t)},me=(e,n,t,a)=>{t.forEach((t=>{switch(t.type){case"query":((e,n,t,a,s)=>{try{if(!window)return}catch{return}const o=new URLSearchParams(v(e));if(!o||!o.get(t))return;const i=(null!=s?s:ge)(o.get(t));i&&("edge"!==a?O(e,a,n,i,t):fe(e,t,i,n))})(e,n,t.key,t.persist,null==a?void 0:a.bind(null,t));break;case"storage":Se(e,n,t.key,t.persist,t.location,null==a?void 0:a.bind(null,t))}}))},he=`${N}Store`,we=(n,t)=>{const s=g(n,"browserPackages"),o=Z(n),i=new Map,r=t.result,l={consentChannel:X(n),consentCategory:ee(n),consentSettings:g(n,"consentSetting")};r.forEach((e=>{((e,n,t)=>{((e,n,t,a)=>{const s=e.has(n)?e.get(n):a();e.set(n,t(s))})(g(e,"channels"),n,(e=>e.add(t)),(()=>new Set))})(n,e.package,e.tagName);const r=s.find((n=>n.name===e.package));if(e.rules&&Object.entries(e.rules).forEach((([t,a])=>{"capture"!==t||me(n,e.package,a,null==r?void 0:r.capture)})),r&&r.name&&r.init){a(l,r.name,e.tagName)&&d(t.geoCountry,t.geoRegion,t.isEURequest,e.geoRegions)&&r.init({userId:o,isNewUser:!!t.isNewUser,session:t.session,baseUrl:n,manifest:e,sendTag:ae.bind(null,n),sendEdgeData:ie.bind(null,n),getEdgeData:te.bind(null,n),keyName:he,executionContext:i,destination:n,consentData:{consent:t.consent,categories:t.consentCategories,consentSettings:t.consentSetting}})}})),u(n,{initialized:!0}),(n=>{try{g(n,"stubs").forEach((n=>e[n.name](...n.arguments||[]))),u(n,{stubs:[]})}catch(e){D(e)}})(n)},ve=e=>async n=>{try{await n(e)}catch(e){console.error(e)}},pe=new Set,Ue=new Set,ye=e=>{const n=ce(e);if(!n)return;let t;try{if(t=e.fallbackUserId,!t){const e=sessionStorage.getItem(M);if(e)t=e;else{const e=crypto.randomUUID();e&&(t=`${e}-${Date.now()}`,sessionStorage.setItem(M,t))}}}catch{}e.afterManifestEvents&&u(e.edgeURL,{stubs:e.afterManifestEvents});const a=new URL((s=e.edgeURL,Q(s,"/init")));var s;let o;e.disableConsentCheck&&(a.searchParams.set("consentDisabled","true"),le(e.edgeURL,{all:!0},{all:!0})),e.userId&&(u(e.edgeURL,{userId:e.userId}),a.searchParams.set("userId",e.userId)),t&&a.searchParams.set("fallbackUserId",t),o=null!=e.storageId?e.storageId:F(e.edgeURL,"local",C,R),null==o||isNaN(o)||a.searchParams.set("storageId",o.toString()),e.sessionId&&a.searchParams.set("sessionId",e.sessionId),a.searchParams.set("pageUrl",w(e.edgeURL)),_(a.href).then((t=>{var a;if(!t)return void D("Initialization failed");t.isNewUser&&t.consent&&le(e.edgeURL,t.consent,t.consentCategories);const s={};null===(a=t.result)||void 0===a||a.forEach((e=>{const t=n[e.package];t&&(s[e.package]=t)})),u(e.edgeURL,{isNewUser:t.isNewUser,consent:X(e.edgeURL)||t.consent,userId:t.userId,sessionId:t.session.sessionId,manifest:t.result,browserPackages:Object.values(s),storageId:t.storageId,currency:t.currency,skipZeroPurchaseEvent:t.skipZeroPurchaseEvent,geoCountry:t.geoCountry,geoRegion:t.geoRegion,isEURequest:t.isEURequest,consentSetting:t.consentSetting}),null!=t.storageId&&$(e.edgeURL,"local",C,t.storageId,R),we(e.edgeURL,t);try{const n={destination:e.edgeURL,userId:t.userId,isNewUser:t.isNewUser,consent:t.consent,consentCategories:t.consentCategories,consentSetting:t.consentSetting,session:t.session};window.dispatchEvent(new CustomEvent("edgetag-initialized",{detail:n})),(async e=>{const n={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};Ue.add(n),await Promise.all([...pe].map(ve(n)))})(n)}catch{}})).catch(D)},Ce=(e,n,t,o,i)=>{K(e,{[n]:t});const r=g(e,"browserPackages"),l=g(e,"channels"),c=Z(e),u=g(e,"geoCountry")||null,f=g(e,"geoRegion")||null,m=g(e,"isEURequest")||!1,h={consentChannel:X(e),consentCategory:ee(e),consentSettings:g(e,"consentSetting")};for(const i of r){if(!i||!i.name||!i.user)continue;if(!l.has(i.name)){G(`Provider ${i.name} is not in allow list`);continue}const r=S(e,i.name);for(const l of r)s(o,i.name,l.tagName)?a(h,i.name,l.tagName)?d(u,f,m,l.geoRegions)?i.user({userId:c,data:{[n]:t},manifestVariables:l.variableSet,destination:e}):G("GEO request region does not match list, skipping"):G(`User do not have consent for ${i.name} (${l.tagName})`):G(`User not allowed for ${i.name} (${l.tagName})`)}Y((e=>Q(e,"/user"))(e),{key:n,value:t,providers:o},i).catch(D)},Ie=(e,n)=>{_((e=>Q(e,"/keys"))(e)).then((e=>{n((null==e?void 0:e.result)||[])})).catch(D)},be=(e,n)=>{_((e=>Q(e,"/full-consent"))(e)).then((e=>null==e?void 0:e.result)).catch((()=>{})).then((t=>{var a,s;const o=null!==(a=null==t?void 0:t.consent)&&void 0!==a?a:X(e),i=null!==(s=null==t?void 0:t.consentCategories)&&void 0!==s?s:ee(e),r=o||null,l=i||null;let d=null;r?i||(d="ConsentCategories not found for Current User!"):(i||(d="Consent and ConsentCategories not found for Current User!"),d="Consent not found for Current User!");const c=d?new Error(d):void 0;n(r,c,l)}))},Ne=(e,n)=>{const t=g(e,"config");u(e,{config:{...t,...n}})},Me=e=>{ye(e)},Re=(e,n,t,a)=>{((e,n={},t,a)=>{(null==a?void 0:a.destination)?se(a.destination,e,n,t,a):f().forEach((s=>{se(s,e,n,t,a)}))})(e,n,t,a)},Ee=(e,n,t)=>{((e,n,t)=>{(null==t?void 0:t.destination)?de(t.destination,e,n,t):f().forEach((a=>{de(a,e,n,t)}))})(e,n,t)},Ae=(e,n,t,a)=>{((e,n,t,a)=>{e&&n?(null==a?void 0:a.destination)?Ce(a.destination,e,n,t,a):f().forEach((s=>{Ce(s,e,n,t,a)})):D("Key or Value is missing in user API.")})(e,n,t,a)},Pe=(e,n,t)=>{re(e,n,t)},ke=(e,n,t)=>{((e,n,t)=>{if(!e||0===e.length)return void D("Provide keys for get data API.");if(null==t?void 0:t.destination)return void te(t.destination,e,n);const a=f();if(a.length>1)return D("Multiple instances found! Please provide destination."),void n({});te(a[0],e,n)})(e,n,t)},Te=(e,n)=>{((e,n)=>{if(null==n?void 0:n.destination)return void Ie(n.destination,e);const t=f();if(t.length>1)return D("Multiple instances found! Please provide destination."),void e([]);Ie(t[0],e)})(e,n)},Le=e=>(e=>{if(null==e?void 0:e.destination)return Z(e.destination);const n=f();return n.length>1?(D("Multiple instances detected! Please provide a destination."),""):Z(n[0])})(e),Ge=(e,n)=>{((e,n)=>{if(null==n?void 0:n.destination)return void be(n.destination,e);const t=f();t.length>1?e(null,new Error("Multiple instances found! Please provide destination."),null):be(t[0],e)})(e,n)},De=e=>(e=>{if(null==e?void 0:e.destination)return g(e.destination,"isNewUser");const n=f();if(!(n.length>1))return g(n[0],"isNewUser");D("Multiple instances found! Please provide destination.")})(e),Be=(e,n)=>{((e,n)=>{(null==n?void 0:n.destination)?Ne(n.destination,e):f().forEach((n=>{Ne(n,e)}))})(e,n)},Oe=e=>{(async e=>{pe.add(e),await Promise.all([...Ue.values()].map((n=>ve(n)(e))))})(e)};var Ke=new class{init(e){Me(e)}tag(e,n,t,a){Re(e,n,t,a)}consent(e,n){Ee(e,n)}user(e,n,t,a){Ae(e,n,t,a)}data(e,n,t){Pe(e,n,t)}getData(e,n,t){ke(e,n,t)}keys(e,n){Te(e,n)}getUserId(e){return Le(e)}getConsent(e,n){Ge(e,n)}isNewUser(e){return De(e)}setConfig(e,n){Be(e,n)}ready(e){Oe(e)}};!function(){const e=e=>{if(!(e?.length<4))return e[3].destination},n=(e,n)=>{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:n})},t=(t,a)=>{try{return"init"===t?void(e=>{if(!e?.length)return void console.error("EdgeTag SDK: Init event is missing arguments");const n=e[0]?.edgeURL;if(!n)return void console.error("EdgeTag SDK: edgeURL is required for initialization");if(!window.edgetag.destinations?.[n]?.initialized)return void window.edgetag.stubs.push(["init",...e]);const t=[];if(window.edgetag.destinations?.all?.tags&&!window.edgetag.destinations.all?.resolvedInits?.has(n)){const e=window.edgetag.destinations.all.tags.map((e=>{const t=structuredClone(e);return t.arguments[3]={...t.arguments[3],destination:n},t}));t.push(...e),window.edgetag.destinations.all.resolvedInits||(window.edgetag.destinations.all.resolvedInits=new Set),window.edgetag.destinations.all.resolvedInits.add(n)}window.edgetag.destinations[n].tags&&(t.push(...window.edgetag.destinations[n].tags),window.edgetag.destinations[n].tags=[]),t.length&&(e[0].afterManifestEvents=t),Ke.init(...e)})(a):"tag"===t?void(t=>{const a=e(t);!a||window.edgetag.destinations[a]?.initialized?Ke.tag(...t):n(a,t)})(a):Ke[t](...a)}catch(e){console.error(e)}},a=e=>{const n=[].slice.call(e);if(Array.isArray(n)&&n.length)return t(n[0],n.slice(1))};let s=window.edgetag?.stubs;if(s||(s=[]),!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)?(s=window.edgetag.stubs,window.edgetag.stubs=[],s.forEach((e=>{a(e)}))):console.error("EdgeTag SDK: Invalid stubs array")},window.edgetag.destinations||(window.edgetag.destinations={}),!s.length)return;const o=[],i=[],r=[];s.forEach((e=>{const n=[].slice.call(e);if(!Array.isArray(n))return;const t=n[0],a=n.slice(1);if("init"===t){const e=(e=>{if(!(e?.length<1))return e[0].edgeURL})(a);return window.edgetag.destinations[e]||(window.edgetag.destinations[e]={tags:[]}),void o.push(a)}"tag"!==t?r.push({name:t,args:a}):i.push(a)})),i.forEach((t=>{const a=e(t);a?n(a,t):(window.edgetag.destinations.all||(window.edgetag.destinations.all={tags:[],resolvedInits:new Set}),window.edgetag.destinations.all.tags.push({name:"tag",arguments:t}))})),o.forEach((e=>{window.edgetag.stubs.push(["init",...e])})),r.forEach((e=>{window.edgetag.stubs.push([e.name,...e.args])}))}()}(); ;{ !function(t,r){"object"==typeof exports&&"object"==typeof module?module.exports=r():"function"==typeof define&&define.amd?define([],r):"object"==typeof exports?exports.clientParamsHelper=r():t.clientParamsHelper=r()}(this,(()=>(()=>{"use strict";var t={d:(r,e)=>{for(var n in e)t.o(e,n)&&!t.o(r,n)&&Object.defineProperty(r,n,{enumerable:!0,get:e[n]})},o:(t,r)=>Object.prototype.hasOwnProperty.call(t,r),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},r={};t.r(r),t.d(r,{collectAndSetParams:()=>k,collectParams:()=>b,decorateUrl:()=>L,getFbc:()=>d,getFbp:()=>y});var e=999999999,n=7776e6,o="fb",i="fbclid",a="_fbc",c="_fbp",u="Bg";function s(t,r,e){return[o,t,r,e,u].join(".")}function f(t){var r=[];try{for(var e=document.cookie.split(";"),n="^\s*".concat(t,"=\s*(.*?)\s*$"),o=new RegExp(n),i=0;i-1,a.userAgent.match("CriOS")||null==i||"Google Inc."!==c||!1!==u||!1!==s?"":"SameSite=Lax;"))+"path=/"}catch(t){throw new Error("Fail to write cookie: "+t.message)}}function p(t,r){for(var e=window.location.hostname.split("."),n=0;n=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),s=n.call(a,"finallyLoc");if(u&&s){if(this.prev=0;--e){var o=this.tryEntries[e];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--r){var e=this.tryEntries[r];if(e.finallyLoc===t)return this.complete(e.completion,e.afterLoc),F(e),m}},catch:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.tryLoc===t){var n=e.completion;if("throw"===n.type){var o=n.arg;F(e)}return o}}throw Error("illegal catch attempt")},delegateYield:function(r,e,n){return this.delegate={iterator:G(r),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=t),m}},r}function m(t,r,e,n,o,i,a){try{var c=t[i](a),u=c.value}catch(t){return void e(t)}c.done?r(u):Promise.resolve(u).then(n,o)}function w(t){return function(){var r=this,e=arguments;return new Promise((function(n,o){var i=t.apply(r,e);function a(t){m(i,n,o,a,c,"next",t)}function c(t){m(i,n,o,a,c,"throw",t)}a(void 0)}))}}function b(){return x.apply(this,arguments)}function x(){return(x=w(g().mark((function t(){var r,e;return g().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!0!==(null!=window.webkit&&null!=window.webkit.messageHandlers&&null!=window.webkit.messageHandlers.browserProperties)){t.next=6;break}return t.next=4,window.webkit.messageHandlers.browserProperties.postMessage("clickID");case 4:return r=t.sent,t.abrupt("return",r);case 6:if(!0!==(n=397,o=void 0,i=void 0,a=void 0,c=void 0,u=void 0,s=void 0,o=window.navigator.userAgent,i=o.indexOf("Android")>=0,a=o.indexOf("FB_IAB")>=0,c=o.indexOf("Instagram")>=0,u=function(t){var r=0,e=t.match(/(FBAV|Instagram)[/s](d+)/);if(null!=e){var n=e[0].match(/(d+)/);null!=n&&(r=parseInt(n[0],10))}return r}(o),!!(s=i&&(a||c))&&(a&&null!=n?n<=u:c&&null!=instagramVersionReq?instagramVersionReq<=u:s)&&void 0!==window.XMLHttpRequest)){t.next=12;break}return t.next=10,new Promise((function(t,r){var e=new window.XMLHttpRequest;e.open("GET","properties://browser/clickID"),e.onload=function(){e.readyState===e.DONE&&e.status>=200&&e.status<300&&e.responseText&&t(e.responseText)},e.onerror=function(){r(new Error("warning: ebp got overrides."))},e.send()}));case 10:return e=t.sent,t.abrupt("return",e);case 12:case"end":return t.stop()}var n,o,i,a,c,u,s}),t)})))).apply(this,arguments)}function L(t){return E.apply(this,arguments)}function E(){return(E=w(g().mark((function t(r){var e,n;return g().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(e=new URL(r)).searchParams.has(i)){t.next=3;break}return t.abrupt("return",r.toString());case 3:return t.next=5,b();case 5:return null!=(n=t.sent)&&e.searchParams.append(i,n),t.abrupt("return",e.toString());case 8:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function k(t){return O.apply(this,arguments)}function O(){return(O=w(g().mark((function t(r){var n,o,i;return g().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!0===r){t.next=2;break}return t.abrupt("return",!1);case 2:if(n=!1,o=!1,d()){t.next=9;break}return t.next=7,b();case 7:(i=t.sent)&&(p(a,i),n=!0);case 9:return y()||(p(c,(u=void 0,s=void 0,u=Math.floor(Math.random()*e),s=Math.floor(Math.random()*e),u.toString()+s.toString())),o=!0),t.abrupt("return",n||o);case 11:case"end":return t.stop()}var u,s}),t)})))).apply(this,arguments)}return r})())); };;{ const domain = "https://htkqj.rainbowshops.com"; if (!window.edgetag.destinations) { window.edgetag.destinations={} } if (!window.edgetag.destinations[domain]) { window.edgetag.destinations[domain] = {} } window.edgetag.destinations[domain].initialized=true; if (window.edgetag.handleStubs) { window.edgetag.handleStubs(); } };