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w5B,GAAS,OAAO,CACpC,CAAE,MAAOlnB,GACRrB,IAAIC,QAAQE,MAAM,UAAWkB,GAC7BrB,IAAIC,QAAQC,IAAI,OAASnR,EAC1B,MAEA,GAAIA,IAAOw5B,EAAQ,OAAO,EAI5B,OAAO,CAAK,EAGPE,EAASF,GACPrqB,EAAQqqB,GAGVC,EAAeA,KAmwCpB,IAAIE,EAAsB,GAO1B,OAJIj6B,MAAMC,QAAQoQ,aAAawP,QAAQqa,gBAAgBC,mBACtDF,EAAsB5pB,aAAawP,QAAQqa,gBAAgBC,iBArwC1C,GAwwCD/1B,OAhwCF,CACd,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,wBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,wBACA,wBACA,iBACA,mBACA,mBACA,kBACA,iBACA,mBACA,oBACA,oBACA,mBACA,kBACA,oBACA,kBACA,mBACA,mBACA,mBACA,gBACA,iBACA,mBACA,iBACA,iBACA,iBACA,kBACA,kBACA,oBACA,iBACA,mBACA,mBACA,mBACA,kBACA,kBACA,kBACA,iBACA,mBACA,mBACA,mBACA,kBACA,kBACA,kBACA,iBACA,mBACA,mBACA,kBACA,kBACA,kBACA,iBACA,kBACA,kBACA,iBACA,mBACA,mBACA,mBACA,mBACA,kBACA,kBACA,kBACA,iBACA,mBACA,mBACA,mBACA,mBACA,kBACA,kBACA,kBACA,iBACA,mBACA,mBACA,mBACA,mBACA,kBACA,kBACA,kBACA,iBACA,mBACA,mBACA,mBACA,mBACA,kBACA,kBACA,kBACA,iBACA,mBACA,mBACA,mBACA,mBACA,kBACA,kBACA,kBACA,iBACA,mBACA,kBACA,kBACA,kBACA,iBACA,mBACA,mBACA,mBACA,mBACA,kBACA,kBACA,kBACA,iBACA,mBACA,mBACA,mBACA,mBACA,kBACA,kBACA,kBACA,iBACA,mBACA,mBACA,mBACA,mBACA,kBACA,kBACA,kBACA,iBACA,kBACA,iBACA,mBACA,mBACA,mBACA,mBACA,kBACA,kBACA,kBACA,2BACA,2BACA,2BACA,2BACA,2BACA,2BACA,2BACA,2BACA,2BACA,2BACA,2BACA,2BACA,2BACA,2BACA,2BACA,2BACA,2BACA,2BACA,2BACA,2BACA,2BACA,2BACA,2BACA,2BACA,2BACA,2BACA,2BACA,2BACA,2BACA,2BACA,2BACA,2BACA,2BACA,2BACA,2BACA,2BACA,2BACA,2BACA,2BACA,2BACA,2BACA,2BACA,2BACA,2BACA,2BACA,2BACA,2BACA,2BACA,2BACA,2BACA,2BACA,2BACA,2BACA,2BACA,2BACA,2BACA,2BACA,2BACA,2BACA,2BACA,2BACA,2BACA,2BACA,2BACA,2BACA,2BACA,2BACA,2BACA,2BACA,2BACA,2BACA,2BACA,2BACA,2BACA,2BACA,2BACA,2BACA,2BACA,2BACA,2BACA,2BACA,2BACA,2BACA,2BACA,2BACA,2BACA,2BACA,2BACA,2BACA,2BACA,2BACA,2BACA,2BACA,2BACA,2BACA,2BACA,2BACA,2BACA,2BACA,2BACA,2BACA,2BACA,2BACA,kBACA,kBACA,oBACA,oBACA,oBACA,oBACA,mBACA,mBACA,mBACA,iBACA,mBACA,mBACA,mBACA,mBACA,kBACA,kBACA,kBACA,iBACA,mBACA,mBACA,mBACA,kBACA,kBACA,kBACA,iBACA,mBACA,mBACA,mBACA,mBACA,kBACA,kBACA,iBACA,mBACA,mBACA,mBACA,mBACA,kBACA,kBACA,kBACA,iBACA,mBACA,mBACA,mBACA,kBACA,kBACA,iBACA,mBACA,mBACA,mBACA,mBACA,kBACA,kBACA,kBACA,kBACA,oBACA,oBACA,oBACA,oBACA,mBACA,mBACA,mBACA,kBACA,oBACA,oBACA,oBACA,oBACA,mBACA,mBACA,mBACA,kBACA,mBACA,mBACA,kBACA,oBACA,oBACA,oBACA,oBACA,mBACA,mBACA,mBACA,kBACA,oBACA,oBACA,oBACA,oBACA,mBACA,mBACA,mBACA,kBACA,oBACA,mBACA,mBACA,mBACA,kBACA,oBACA,oBACA,oBACA,oBACA,mBACA,mBACA,mBACA,kBACA,oBAGgB,CAChB,iBACA,kBACA,kBACA,iBACA,iBACA,iBACA,kBACA,kBACA,kBACA,kBACA,gBACA,kBACA,gBACA,gBACA,kBACA,kBACA,kBACA,gBACA,gBACA,gBACA,gBACA,gBACA,gBACA,gBACA,gBACA,gBACA,gBACA,gBACA,gBACA,gBACA,gBACA,gBACA,gBACA,kBACA,iBACA,gBACA,gBACA,gBACA,gBACA,gBACA,gBACA,gBACA,gBACA,gBACA,gBACA,gBACA,gBACA,gBACA,gBACA,gBACA,gBACA,gBACA,kBACA,kBACA,kBACA,kBACA,kBACA,kBACA,gBACA,kBACA,kBACA,kBACA,kBACA,iBACA,iBACA,iBACA,iBACA,iBACA,iBACA,iBACA,iBACA,iBACA,iBACA,iBACA,kBACA,kBACA,kBACA,kBACA,kBACA,kBACA,kBACA,kBACA,kBACA,kBACA,kBACA,kBACA,kBACA,kBACA,iBACA,kBACA,iBACA,mBACA,mBACA,kBACA,kBACA,kBACA,kBACA,kBACA,kBACA,kBACA,kBACA,kBACA,kBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,kBACA,kBACA,kBACA,kBACA,kBACA,kBACA,kBACA,mBACA,kBACA,kBACA,kBACA,kBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,kBACA,kBACA,kBACA,kBACA,kBACA,kBACA,mBACA,kBACA,mBACA,kBACA,mBACA,mBACA,mBACA,iBACA,kBACA,kBACA,kBACA,kBACA,kBACA,kBACA,mBACA,mBACA,kBACA,kBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,kBACA,kBACA,kBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,kBACA,kBACA,kBACA,mBACA,mBACA,mBACA,kBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,kBACA,kBACA,mBACA,mBACA,mBACA,kBACA,mBACA,kBACA,kBACA,kBACA,kBACA,kBACA,iBACA,iBACA,iBACA,iBACA,kBACA,iBACA,mBACA,iBACA,sBACA,sBACA,mBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,iBACA,iBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,mBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,iBACA,iBACA,mBACA,mBACA,mBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,sBACA,sBACA,sBACA,mBACA,mBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,mBACA,mBACA,sBACA,sBACA,sBACA,sBACA,oBACA,mBACA,oBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,oBACA,oBACA,oBACA,oBACA,oBACA,oBACA,oBACA,oBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,oBACA,oBACA,oBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,oBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,oBACA,yBACA,kBAGe,CACf,kBACA,kBACA,mBAGY,CACZ,iBACA,iBACA,iBACA,iBACA,iBACA,kBACA,iBACA,kBACA,mBACA,kBACA,qBACA,kBACA,kBACA,mBACA,mBACA,kBACA,mBACA,iBACA,mBACA,iBACA,iBACA,iBACA,iBACA,iBACA,kBAGiB,CACjB,gBACA,gBACA,gBACA,gBACA,iBACA,iBACA,iBACA,mBAGc,CACd,eACA,iBACA,iBAGa,CACb,kBACA,kBAGc,CACd,iBACA,eAGa,CACb,iBACA,kBACA,mBACA,kBACA,kBACA,kBACA,gBACA,gBACA,gBACA,kBACA,mBACA,kBACA,kBACA,oBACA,oBACA,kBACA,mBACA,mBACA,mBACA,mBACA,iBACA,kBACA,mBACA,mBACA,mBAGkB,CAClB,gBACA,eACA,gBACA,cACA,eACA,gBACA,eACA,gBACA,gBACA,eACA,gBACA,iBAGa,CACb,iBACA,eACA,iBACA,iBACA,kBACA,kBACA,kBACA,kBACA,kBACA,kBACA,iBACA,iBACA,iBACA,iBACA,iBACA,gBACA,cACA,eACA,eACA,eACA,eACA,eACA,gBACA,eACA,gBACA,kBACA,iBACA,kBACA,kBACA,kBACA,kBACA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AAc,IAAIC,MAAM,oBAGjC7lB,SAAS4lB,cAAc,IAAIC,MAAM,kBAG3BtlB,IAAIqjB,aAEV5jB,SAAS4lB,cAAc,IAAIC,MAAM,cACjCtlB,IAAImlB,0BAGJnlB,IAAIkR,sBAAqB,EAG1B0gB,E","sources":["webpack://Pixel-Manager-for-WooCommerce/../../src/index.ts","webpack://Pixel-Manager-for-WooCommerce/../../src/ipRange.ts","webpack://Pixel-Manager-for-WooCommerce/../../src/ipv4.ts","webpack://Pixel-Manager-for-WooCommerce/../../src/ipv6.ts","webpack://Pixel-Manager-for-WooCommerce/../../src/util.ts","webpack://Pixel-Manager-for-WooCommerce/../node_modules/ipaddr.js/lib/ipaddr.js","webpack://Pixel-Manager-for-WooCommerce/../node_modules/ip6/ip6.js","webpack://Pixel-Manager-for-WooCommerce/../src/range-check.ts","webpack://Pixel-Manager-for-WooCommerce/./src/js-src/public/pixels/facebook/event_listeners.js","webpack://Pixel-Manager-for-WooCommerce/./src/js-src/public/pixels/facebook/functions.js","webpack://Pixel-Manager-for-WooCommerce/./src/js-src/public/pixels/facebook/loader.js","webpack://Pixel-Manager-for-WooCommerce/./src/js-src/public/pixels/google/ads/event_listeners.js","webpack://Pixel-Manager-for-WooCommerce/./src/js-src/public/pixels/google/ads/functions.js","webpack://Pixel-Manager-for-WooCommerce/./src/js-src/public/pixels/google/ads/loader.js","webpack://Pixel-Manager-for-WooCommerce/./src/js-src/public/pixels/google/analytics/ga4/event_listeners.js","webpack://Pixel-Manager-for-WooCommerce/./src/js-src/public/pixels/google/analytics/ga4/functions.js","webpack://Pixel-Manager-for-WooCommerce/./src/js-src/public/pixels/google/analytics/ga4/loader.js","webpack://Pixel-Manager-for-WooCommerce/./src/js-src/public/pixels/google/analytics/loader.js","webpack://Pixel-Manager-for-WooCommerce/./src/js-src/public/pixels/google/base/event_listeners.js","webpack://Pixel-Manager-for-WooCommerce/./src/js-src/public/pixels/google/base/functions.js","webpack://Pixel-Manager-for-WooCommerce/./src/js-src/public/pixels/google/base/loader.js","webpack://Pixel-Manager-for-WooCommerce/./src/js-src/public/pixels/google/loader.js","webpack://Pixel-Manager-for-WooCommerce/./src/js-src/public/pixels/hotjar/event_listeners.js","webpack://Pixel-Manager-for-WooCommerce/./src/js-src/public/pixels/hotjar/functions.js","webpack://Pixel-Manager-for-WooCommerce/./src/js-src/public/pixels/hotjar/loader.js","webpack://Pixel-Manager-for-WooCommerce/./src/js-src/public/version.js","webpack://Pixel-Manager-for-WooCommerce/./src/js-src/public/wpm/event_listeners.js","webpack://Pixel-Manager-for-WooCommerce/./src/js-src/public/wpm/event_listeners_on_ready.js","webpack://Pixel-Manager-for-WooCommerce/./src/js-src/public/wpm/functions.js","webpack://Pixel-Manager-for-WooCommerce/./src/js-src/public/wpm/functions_loader.js","webpack://Pixel-Manager-for-WooCommerce/./src/js-src/public/wpm/functions_main.js","webpack://Pixel-Manager-for-WooCommerce/./src/js-src/public/wpm/ip_services.js","webpack://Pixel-Manager-for-WooCommerce/./src/js-src/public/wpm/listeners/doofinder.js","webpack://Pixel-Manager-for-WooCommerce/./src/js-src/public/wpm/wc_hooks.js","webpack://Pixel-Manager-for-WooCommerce/./src/js-src/public/wpm/consent/api.mjs","webpack://Pixel-Manager-for-WooCommerce/./src/js-src/public/wpm/consent/cmps/borlabs.mjs","webpack://Pixel-Manager-for-WooCommerce/./src/js-src/public/wpm/consent/cmps/complianz.mjs","webpack://Pixel-Manager-for-WooCommerce/./src/js-src/public/wpm/consent/cmps/cookiebot.mjs","webpack://Pixel-Manager-for-WooCommerce/./src/js-src/public/wpm/consent/cmps/cookiefirst.mjs","webpack://Pixel-Manager-for-WooCommerce/./src/js-src/public/wpm/consent/cmps/cookieyes.mjs","webpack://Pixel-Manager-for-WooCommerce/./src/js-src/public/wpm/consent/cmps/onetrust.mjs","webpack://Pixel-Manager-for-WooCommerce/./src/js-src/public/wpm/consent/cmps/real-cookie-banner.mjs","webpack://Pixel-Manager-for-WooCommerce/./src/js-src/public/wpm/consent/cmps.mjs","webpack://Pixel-Manager-for-WooCommerce/./src/js-src/public/wpm/consent/cmps/cookie-compliance.mjs","webpack://Pixel-Manager-for-WooCommerce/./src/js-src/public/wpm/consent/cmps/cookie-script.mjs","webpack://Pixel-Manager-for-WooCommerce/./src/js-src/public/wpm/consent/cmps/iubenda.mjs","webpack://Pixel-Manager-for-WooCommerce/./src/js-src/public/wpm/consent/cmps/moove-cookie-compliance.mjs","webpack://Pixel-Manager-for-WooCommerce/./src/js-src/public/wpm/consent/cmps/termly.mjs","webpack://Pixel-Manager-for-WooCommerce/./src/js-src/public/wpm/consent/cmps/usercentrics.mjs","webpack://Pixel-Manager-for-WooCommerce/./src/js-src/public/wpm/consent/cmps/wp-auto-terms.mjs","webpack://Pixel-Manager-for-WooCommerce/./src/js-src/public/wpm/consent/cmps/wp-consent-api.mjs","webpack://Pixel-Manager-for-WooCommerce/./src/js-src/public/wpm/consent/cmps/wp-cookie-consent.mjs","webpack://Pixel-Manager-for-WooCommerce/./src/js-src/public/wpm/consent/consent.mjs","webpack://Pixel-Manager-for-WooCommerce/./src/js-src/public/wpm/console.mjs","webpack://Pixel-Manager-for-WooCommerce/./src/js-src/public/wpm/geo/geo.mjs","webpack://Pixel-Manager-for-WooCommerce/webpack/bootstrap","webpack://Pixel-Manager-for-WooCommerce/webpack/runtime/define property getters","webpack://Pixel-Manager-for-WooCommerce/webpack/runtime/global","webpack://Pixel-Manager-for-WooCommerce/webpack/runtime/hasOwnProperty shorthand","webpack://Pixel-Manager-for-WooCommerce/webpack/runtime/make namespace object","webpack://Pixel-Manager-for-WooCommerce/./src/js-src/public/main.js","webpack://Pixel-Manager-for-WooCommerce/./src/js-src/public/wpm/deprecated.mjs"],"sourcesContent":[null,null,null,null,null,"(function() {\n var expandIPv6, ipaddr, ipv4Part, ipv4Regexes, ipv6Part, ipv6Regexes, matchCIDR, root, zoneIndex;\n\n ipaddr = {};\n\n root = this;\n\n if ((typeof module !== \"undefined\" && module !== null) && module.exports) {\n module.exports = ipaddr;\n } else {\n root['ipaddr'] = ipaddr;\n }\n\n matchCIDR = function(first, second, partSize, cidrBits) {\n var part, shift;\n if (first.length !== second.length) {\n throw new Error(\"ipaddr: cannot match CIDR for objects with different lengths\");\n }\n part = 0;\n while (cidrBits > 0) {\n shift = partSize - cidrBits;\n if (shift < 0) {\n shift = 0;\n }\n if (first[part] >> shift !== second[part] >> shift) {\n return false;\n }\n cidrBits -= partSize;\n part += 1;\n }\n return true;\n };\n\n ipaddr.subnetMatch = function(address, rangeList, defaultName) {\n var k, len, rangeName, rangeSubnets, subnet;\n if (defaultName == null) {\n defaultName = 'unicast';\n }\n for (rangeName in rangeList) {\n rangeSubnets = rangeList[rangeName];\n if (rangeSubnets[0] && !(rangeSubnets[0] instanceof Array)) {\n rangeSubnets = [rangeSubnets];\n }\n for (k = 0, len = rangeSubnets.length; k < len; k++) {\n subnet = rangeSubnets[k];\n if (address.kind() === subnet[0].kind()) {\n if (address.match.apply(address, subnet)) {\n return rangeName;\n }\n }\n }\n }\n return defaultName;\n };\n\n ipaddr.IPv4 = (function() {\n function IPv4(octets) {\n var k, len, octet;\n if (octets.length !== 4) {\n throw new Error(\"ipaddr: ipv4 octet count should be 4\");\n }\n for (k = 0, len = octets.length; k < len; k++) {\n octet = octets[k];\n if (!((0 <= octet && octet <= 255))) {\n throw new Error(\"ipaddr: ipv4 octet should fit in 8 bits\");\n }\n }\n this.octets = octets;\n }\n\n IPv4.prototype.kind = function() {\n return 'ipv4';\n };\n\n IPv4.prototype.toString = function() {\n return this.octets.join(\".\");\n };\n\n IPv4.prototype.toNormalizedString = function() {\n return this.toString();\n };\n\n IPv4.prototype.toByteArray = function() {\n return this.octets.slice(0);\n };\n\n IPv4.prototype.match = function(other, cidrRange) {\n var ref;\n if (cidrRange === void 0) {\n ref = other, other = ref[0], cidrRange = ref[1];\n }\n if (other.kind() !== 'ipv4') {\n throw new Error(\"ipaddr: cannot match ipv4 address with non-ipv4 one\");\n }\n return matchCIDR(this.octets, other.octets, 8, cidrRange);\n };\n\n IPv4.prototype.SpecialRanges = {\n unspecified: [[new IPv4([0, 0, 0, 0]), 8]],\n broadcast: [[new IPv4([255, 255, 255, 255]), 32]],\n multicast: [[new IPv4([224, 0, 0, 0]), 4]],\n linkLocal: [[new IPv4([169, 254, 0, 0]), 16]],\n loopback: [[new IPv4([127, 0, 0, 0]), 8]],\n carrierGradeNat: [[new IPv4([100, 64, 0, 0]), 10]],\n \"private\": [[new IPv4([10, 0, 0, 0]), 8], [new IPv4([172, 16, 0, 0]), 12], [new IPv4([192, 168, 0, 0]), 16]],\n reserved: [[new IPv4([192, 0, 0, 0]), 24], [new IPv4([192, 0, 2, 0]), 24], [new IPv4([192, 88, 99, 0]), 24], [new IPv4([198, 51, 100, 0]), 24], [new IPv4([203, 0, 113, 0]), 24], [new IPv4([240, 0, 0, 0]), 4]]\n };\n\n IPv4.prototype.range = function() {\n return ipaddr.subnetMatch(this, this.SpecialRanges);\n };\n\n IPv4.prototype.toIPv4MappedAddress = function() {\n return ipaddr.IPv6.parse(\"::ffff:\" + (this.toString()));\n };\n\n IPv4.prototype.prefixLengthFromSubnetMask = function() {\n var cidr, i, k, octet, stop, zeros, zerotable;\n zerotable = {\n 0: 8,\n 128: 7,\n 192: 6,\n 224: 5,\n 240: 4,\n 248: 3,\n 252: 2,\n 254: 1,\n 255: 0\n };\n cidr = 0;\n stop = false;\n for (i = k = 3; k >= 0; i = k += -1) {\n octet = this.octets[i];\n if (octet in zerotable) {\n zeros = zerotable[octet];\n if (stop && zeros !== 0) {\n return null;\n }\n if (zeros !== 8) {\n stop = true;\n }\n cidr += zeros;\n } else {\n return null;\n }\n }\n return 32 - cidr;\n };\n\n return IPv4;\n\n })();\n\n ipv4Part = \"(0?\\\\d+|0x[a-f0-9]+)\";\n\n ipv4Regexes = {\n fourOctet: new RegExp(\"^\" + ipv4Part + \"\\\\.\" + ipv4Part + \"\\\\.\" + ipv4Part + \"\\\\.\" + ipv4Part + \"$\", 'i'),\n longValue: new RegExp(\"^\" + ipv4Part + \"$\", 'i')\n };\n\n ipaddr.IPv4.parser = function(string) {\n var match, parseIntAuto, part, shift, value;\n parseIntAuto = function(string) {\n if (string[0] === \"0\" && string[1] !== \"x\") {\n return parseInt(string, 8);\n } else {\n return parseInt(string);\n }\n };\n if (match = string.match(ipv4Regexes.fourOctet)) {\n return (function() {\n var k, len, ref, results;\n ref = match.slice(1, 6);\n results = [];\n for (k = 0, len = ref.length; k < len; k++) {\n part = ref[k];\n results.push(parseIntAuto(part));\n }\n return results;\n })();\n } else if (match = string.match(ipv4Regexes.longValue)) {\n value = parseIntAuto(match[1]);\n if (value > 0xffffffff || value < 0) {\n throw new Error(\"ipaddr: address outside defined range\");\n }\n return ((function() {\n var k, results;\n results = [];\n for (shift = k = 0; k <= 24; shift = k += 8) {\n results.push((value >> shift) & 0xff);\n }\n return results;\n })()).reverse();\n } else {\n return null;\n }\n };\n\n ipaddr.IPv6 = (function() {\n function IPv6(parts, zoneId) {\n var i, k, l, len, part, ref;\n if (parts.length === 16) {\n this.parts = [];\n for (i = k = 0; k <= 14; i = k += 2) {\n this.parts.push((parts[i] << 8) | parts[i + 1]);\n }\n } else if (parts.length === 8) {\n this.parts = parts;\n } else {\n throw new Error(\"ipaddr: ipv6 part count should be 8 or 16\");\n }\n ref = this.parts;\n for (l = 0, len = ref.length; l < len; l++) {\n part = ref[l];\n if (!((0 <= part && part <= 0xffff))) {\n throw new Error(\"ipaddr: ipv6 part should fit in 16 bits\");\n }\n }\n if (zoneId) {\n this.zoneId = zoneId;\n }\n }\n\n IPv6.prototype.kind = function() {\n return 'ipv6';\n };\n\n IPv6.prototype.toString = function() {\n return this.toNormalizedString().replace(/((^|:)(0(:|$))+)/, '::');\n };\n\n IPv6.prototype.toRFC5952String = function() {\n var bestMatchIndex, bestMatchLength, match, regex, string;\n regex = /((^|:)(0(:|$)){2,})/g;\n string = this.toNormalizedString();\n bestMatchIndex = 0;\n bestMatchLength = -1;\n while ((match = regex.exec(string))) {\n if (match[0].length > bestMatchLength) {\n bestMatchIndex = match.index;\n bestMatchLength = match[0].length;\n }\n }\n if (bestMatchLength < 0) {\n return string;\n }\n return string.substring(0, bestMatchIndex) + '::' + string.substring(bestMatchIndex + bestMatchLength);\n };\n\n IPv6.prototype.toByteArray = function() {\n var bytes, k, len, part, ref;\n bytes = [];\n ref = this.parts;\n for (k = 0, len = ref.length; k < len; k++) {\n part = ref[k];\n bytes.push(part >> 8);\n bytes.push(part & 0xff);\n }\n return bytes;\n };\n\n IPv6.prototype.toNormalizedString = function() {\n var addr, part, suffix;\n addr = ((function() {\n var k, len, ref, results;\n ref = this.parts;\n results = [];\n for (k = 0, len = ref.length; k < len; k++) {\n part = ref[k];\n results.push(part.toString(16));\n }\n return results;\n }).call(this)).join(\":\");\n suffix = '';\n if (this.zoneId) {\n suffix = '%' + this.zoneId;\n }\n return addr + suffix;\n };\n\n IPv6.prototype.toFixedLengthString = function() {\n var addr, part, suffix;\n addr = ((function() {\n var k, len, ref, results;\n ref = this.parts;\n results = [];\n for (k = 0, len = ref.length; k < len; k++) {\n part = ref[k];\n results.push(part.toString(16).padStart(4, '0'));\n }\n return results;\n }).call(this)).join(\":\");\n suffix = '';\n if (this.zoneId) {\n suffix = '%' + this.zoneId;\n }\n return addr + suffix;\n };\n\n IPv6.prototype.match = function(other, cidrRange) {\n var ref;\n if (cidrRange === void 0) {\n ref = other, other = ref[0], cidrRange = ref[1];\n }\n if (other.kind() !== 'ipv6') {\n throw new Error(\"ipaddr: cannot match ipv6 address with non-ipv6 one\");\n }\n return matchCIDR(this.parts, other.parts, 16, cidrRange);\n };\n\n IPv6.prototype.SpecialRanges = {\n unspecified: [new IPv6([0, 0, 0, 0, 0, 0, 0, 0]), 128],\n linkLocal: [new IPv6([0xfe80, 0, 0, 0, 0, 0, 0, 0]), 10],\n multicast: [new IPv6([0xff00, 0, 0, 0, 0, 0, 0, 0]), 8],\n loopback: [new IPv6([0, 0, 0, 0, 0, 0, 0, 1]), 128],\n uniqueLocal: [new IPv6([0xfc00, 0, 0, 0, 0, 0, 0, 0]), 7],\n ipv4Mapped: [new IPv6([0, 0, 0, 0, 0, 0xffff, 0, 0]), 96],\n rfc6145: [new IPv6([0, 0, 0, 0, 0xffff, 0, 0, 0]), 96],\n rfc6052: [new IPv6([0x64, 0xff9b, 0, 0, 0, 0, 0, 0]), 96],\n '6to4': [new IPv6([0x2002, 0, 0, 0, 0, 0, 0, 0]), 16],\n teredo: [new IPv6([0x2001, 0, 0, 0, 0, 0, 0, 0]), 32],\n reserved: [[new IPv6([0x2001, 0xdb8, 0, 0, 0, 0, 0, 0]), 32]]\n };\n\n IPv6.prototype.range = function() {\n return ipaddr.subnetMatch(this, this.SpecialRanges);\n };\n\n IPv6.prototype.isIPv4MappedAddress = function() {\n return this.range() === 'ipv4Mapped';\n };\n\n IPv6.prototype.toIPv4Address = function() {\n var high, low, ref;\n if (!this.isIPv4MappedAddress()) {\n throw new Error(\"ipaddr: trying to convert a generic ipv6 address to ipv4\");\n }\n ref = this.parts.slice(-2), high = ref[0], low = ref[1];\n return new ipaddr.IPv4([high >> 8, high & 0xff, low >> 8, low & 0xff]);\n };\n\n IPv6.prototype.prefixLengthFromSubnetMask = function() {\n var cidr, i, k, part, stop, zeros, zerotable;\n zerotable = {\n 0: 16,\n 32768: 15,\n 49152: 14,\n 57344: 13,\n 61440: 12,\n 63488: 11,\n 64512: 10,\n 65024: 9,\n 65280: 8,\n 65408: 7,\n 65472: 6,\n 65504: 5,\n 65520: 4,\n 65528: 3,\n 65532: 2,\n 65534: 1,\n 65535: 0\n };\n cidr = 0;\n stop = false;\n for (i = k = 7; k >= 0; i = k += -1) {\n part = this.parts[i];\n if (part in zerotable) {\n zeros = zerotable[part];\n if (stop && zeros !== 0) {\n return null;\n }\n if (zeros !== 16) {\n stop = true;\n }\n cidr += zeros;\n } else {\n return null;\n }\n }\n return 128 - cidr;\n };\n\n return IPv6;\n\n })();\n\n ipv6Part = \"(?:[0-9a-f]+::?)+\";\n\n zoneIndex = \"%[0-9a-z]{1,}\";\n\n ipv6Regexes = {\n zoneIndex: new RegExp(zoneIndex, 'i'),\n \"native\": new RegExp(\"^(::)?(\" + ipv6Part + \")?([0-9a-f]+)?(::)?(\" + zoneIndex + \")?$\", 'i'),\n transitional: new RegExp((\"^((?:\" + ipv6Part + \")|(?:::)(?:\" + ipv6Part + \")?)\") + (ipv4Part + \"\\\\.\" + ipv4Part + \"\\\\.\" + ipv4Part + \"\\\\.\" + ipv4Part) + (\"(\" + zoneIndex + \")?$\"), 'i')\n };\n\n expandIPv6 = function(string, parts) {\n var colonCount, lastColon, part, replacement, replacementCount, zoneId;\n if (string.indexOf('::') !== string.lastIndexOf('::')) {\n return null;\n }\n zoneId = (string.match(ipv6Regexes['zoneIndex']) || [])[0];\n if (zoneId) {\n zoneId = zoneId.substring(1);\n string = string.replace(/%.+$/, '');\n }\n colonCount = 0;\n lastColon = -1;\n while ((lastColon = string.indexOf(':', lastColon + 1)) >= 0) {\n colonCount++;\n }\n if (string.substr(0, 2) === '::') {\n colonCount--;\n }\n if (string.substr(-2, 2) === '::') {\n colonCount--;\n }\n if (colonCount > parts) {\n return null;\n }\n replacementCount = parts - colonCount;\n replacement = ':';\n while (replacementCount--) {\n replacement += '0:';\n }\n string = string.replace('::', replacement);\n if (string[0] === ':') {\n string = string.slice(1);\n }\n if (string[string.length - 1] === ':') {\n string = string.slice(0, -1);\n }\n parts = (function() {\n var k, len, ref, results;\n ref = string.split(\":\");\n results = [];\n for (k = 0, len = ref.length; k < len; k++) {\n part = ref[k];\n results.push(parseInt(part, 16));\n }\n return results;\n })();\n return {\n parts: parts,\n zoneId: zoneId\n };\n };\n\n ipaddr.IPv6.parser = function(string) {\n var addr, k, len, match, octet, octets, zoneId;\n if (ipv6Regexes['native'].test(string)) {\n return expandIPv6(string, 8);\n } else if (match = string.match(ipv6Regexes['transitional'])) {\n zoneId = match[6] || '';\n addr = expandIPv6(match[1].slice(0, -1) + zoneId, 6);\n if (addr.parts) {\n octets = [parseInt(match[2]), parseInt(match[3]), parseInt(match[4]), parseInt(match[5])];\n for (k = 0, len = octets.length; k < len; k++) {\n octet = octets[k];\n if (!((0 <= octet && octet <= 255))) {\n return null;\n }\n }\n addr.parts.push(octets[0] << 8 | octets[1]);\n addr.parts.push(octets[2] << 8 | octets[3]);\n return {\n parts: addr.parts,\n zoneId: addr.zoneId\n };\n }\n }\n return null;\n };\n\n ipaddr.IPv4.isIPv4 = ipaddr.IPv6.isIPv6 = function(string) {\n return this.parser(string) !== null;\n };\n\n ipaddr.IPv4.isValid = function(string) {\n var e;\n try {\n new this(this.parser(string));\n return true;\n } catch (error1) {\n e = error1;\n return false;\n }\n };\n\n ipaddr.IPv4.isValidFourPartDecimal = function(string) {\n if (ipaddr.IPv4.isValid(string) && string.match(/^(0|[1-9]\\d*)(\\.(0|[1-9]\\d*)){3}$/)) {\n return true;\n } else {\n return false;\n }\n };\n\n ipaddr.IPv6.isValid = function(string) {\n var addr, e;\n if (typeof string === \"string\" && string.indexOf(\":\") === -1) {\n return false;\n }\n try {\n addr = this.parser(string);\n new this(addr.parts, addr.zoneId);\n return true;\n } catch (error1) {\n e = error1;\n return false;\n }\n };\n\n ipaddr.IPv4.parse = function(string) {\n var parts;\n parts = this.parser(string);\n if (parts === null) {\n throw new Error(\"ipaddr: string is not formatted like ip address\");\n }\n return new this(parts);\n };\n\n ipaddr.IPv6.parse = function(string) {\n var addr;\n addr = this.parser(string);\n if (addr.parts === null) {\n throw new Error(\"ipaddr: string is not formatted like ip address\");\n }\n return new this(addr.parts, addr.zoneId);\n };\n\n ipaddr.IPv4.parseCIDR = function(string) {\n var maskLength, match, parsed;\n if (match = string.match(/^(.+)\\/(\\d+)$/)) {\n maskLength = parseInt(match[2]);\n if (maskLength >= 0 && maskLength <= 32) {\n parsed = [this.parse(match[1]), maskLength];\n Object.defineProperty(parsed, 'toString', {\n value: function() {\n return this.join('/');\n }\n });\n return parsed;\n }\n }\n throw new Error(\"ipaddr: string is not formatted like an IPv4 CIDR range\");\n };\n\n ipaddr.IPv4.subnetMaskFromPrefixLength = function(prefix) {\n var filledOctetCount, j, octets;\n prefix = parseInt(prefix);\n if (prefix < 0 || prefix > 32) {\n throw new Error('ipaddr: invalid IPv4 prefix length');\n }\n octets = [0, 0, 0, 0];\n j = 0;\n filledOctetCount = Math.floor(prefix / 8);\n while (j < filledOctetCount) {\n octets[j] = 255;\n j++;\n }\n if (filledOctetCount < 4) {\n octets[filledOctetCount] = Math.pow(2, prefix % 8) - 1 << 8 - (prefix % 8);\n }\n return new this(octets);\n };\n\n ipaddr.IPv4.broadcastAddressFromCIDR = function(string) {\n var cidr, error, i, ipInterfaceOctets, octets, subnetMaskOctets;\n try {\n cidr = this.parseCIDR(string);\n ipInterfaceOctets = cidr[0].toByteArray();\n subnetMaskOctets = this.subnetMaskFromPrefixLength(cidr[1]).toByteArray();\n octets = [];\n i = 0;\n while (i < 4) {\n octets.push(parseInt(ipInterfaceOctets[i], 10) | parseInt(subnetMaskOctets[i], 10) ^ 255);\n i++;\n }\n return new this(octets);\n } catch (error1) {\n error = error1;\n throw new Error('ipaddr: the address does not have IPv4 CIDR format');\n }\n };\n\n ipaddr.IPv4.networkAddressFromCIDR = function(string) {\n var cidr, error, i, ipInterfaceOctets, octets, subnetMaskOctets;\n try {\n cidr = this.parseCIDR(string);\n ipInterfaceOctets = cidr[0].toByteArray();\n subnetMaskOctets = this.subnetMaskFromPrefixLength(cidr[1]).toByteArray();\n octets = [];\n i = 0;\n while (i < 4) {\n octets.push(parseInt(ipInterfaceOctets[i], 10) & parseInt(subnetMaskOctets[i], 10));\n i++;\n }\n return new this(octets);\n } catch (error1) {\n error = error1;\n throw new Error('ipaddr: the address does not have IPv4 CIDR format');\n }\n };\n\n ipaddr.IPv6.parseCIDR = function(string) {\n var maskLength, match, parsed;\n if (match = string.match(/^(.+)\\/(\\d+)$/)) {\n maskLength = parseInt(match[2]);\n if (maskLength >= 0 && maskLength <= 128) {\n parsed = [this.parse(match[1]), maskLength];\n Object.defineProperty(parsed, 'toString', {\n value: function() {\n return this.join('/');\n }\n });\n return parsed;\n }\n }\n throw new Error(\"ipaddr: string is not formatted like an IPv6 CIDR range\");\n };\n\n ipaddr.isValid = function(string) {\n return ipaddr.IPv6.isValid(string) || ipaddr.IPv4.isValid(string);\n };\n\n ipaddr.parse = function(string) {\n if (ipaddr.IPv6.isValid(string)) {\n return ipaddr.IPv6.parse(string);\n } else if (ipaddr.IPv4.isValid(string)) {\n return ipaddr.IPv4.parse(string);\n } else {\n throw new Error(\"ipaddr: the address has neither IPv6 nor IPv4 format\");\n }\n };\n\n ipaddr.parseCIDR = function(string) {\n var e;\n try {\n return ipaddr.IPv6.parseCIDR(string);\n } catch (error1) {\n e = error1;\n try {\n return ipaddr.IPv4.parseCIDR(string);\n } catch (error1) {\n e = error1;\n throw new Error(\"ipaddr: the address has neither IPv6 nor IPv4 CIDR format\");\n }\n }\n };\n\n ipaddr.fromByteArray = function(bytes) {\n var length;\n length = bytes.length;\n if (length === 4) {\n return new ipaddr.IPv4(bytes);\n } else if (length === 16) {\n return new ipaddr.IPv6(bytes);\n } else {\n throw new Error(\"ipaddr: the binary input is neither an IPv6 nor IPv4 address\");\n }\n };\n\n ipaddr.process = function(string) {\n var addr;\n addr = this.parse(string);\n if (addr.kind() === 'ipv6' && addr.isIPv4MappedAddress()) {\n return addr.toIPv4Address();\n } else {\n return addr;\n }\n };\n\n}).call(this);\n","/**\n * Created by elgs on 3/5/16.\n */\nconst normalize = function (a) {\n if (!_validate(a)) {\n throw new Error('Invalid address: ' + a);\n }\n a = a.toLowerCase()\n\n const nh = a.split(/\\:\\:/g);\n if (nh.length > 2) {\n throw new Error('Invalid address: ' + a);\n }\n\n let sections = [];\n if (nh.length == 1) {\n // full mode\n sections = a.split(/\\:/g);\n if (sections.length !== 8) {\n throw new Error('Invalid address: ' + a);\n }\n } else if (nh.length == 2) {\n // compact mode\n const n = nh[0];\n const h = nh[1];\n const ns = n.split(/\\:/g);\n const hs = h.split(/\\:/g);\n for (let i in ns) {\n sections[i] = ns[i];\n }\n for (let i = hs.length; i > 0; --i) {\n sections[7 - (hs.length - i)] = hs[i - 1];\n }\n }\n for (let i = 0; i < 8; ++i) {\n if (sections[i] === undefined) {\n sections[i] = '0000';\n }\n sections[i] = _leftPad(sections[i], '0', 4);\n }\n return sections.join(':');\n};\n\nconst abbreviate = function (a) {\n if (!_validate(a)) {\n throw new Error('Invalid address: ' + a);\n }\n a = normalize(a);\n a = a.replace(/0000/g, 'g');\n a = a.replace(/\\:000/g, ':');\n a = a.replace(/\\:00/g, ':');\n a = a.replace(/\\:0/g, ':');\n a = a.replace(/g/g, '0');\n const sections = a.split(/\\:/g);\n let zPreviousFlag = false;\n let zeroStartIndex = -1;\n let zeroLength = 0;\n let zStartIndex = -1;\n let zLength = 0;\n for (let i = 0; i < 8; ++i) {\n const section = sections[i];\n let zFlag = (section === '0');\n if (zFlag && !zPreviousFlag) {\n zStartIndex = i;\n }\n if (!zFlag && zPreviousFlag) {\n zLength = i - zStartIndex;\n }\n if (zLength > 1 && zLength > zeroLength) {\n zeroStartIndex = zStartIndex;\n zeroLength = zLength;\n }\n zPreviousFlag = (section === '0');\n }\n if (zPreviousFlag) {\n zLength = 8 - zStartIndex;\n }\n if (zLength > 1 && zLength > zeroLength) {\n zeroStartIndex = zStartIndex;\n zeroLength = zLength;\n }\n //console.log(zeroStartIndex, zeroLength);\n //console.log(sections);\n if (zeroStartIndex >= 0 && zeroLength > 1) {\n sections.splice(zeroStartIndex, zeroLength, 'g');\n }\n //console.log(sections);\n a = sections.join(':');\n //console.log(a);\n a = a.replace(/\\:g\\:/g, '::');\n a = a.replace(/\\:g/g, '::');\n a = a.replace(/g\\:/g, '::');\n a = a.replace(/g/g, '::');\n //console.log(a);\n return a;\n};\n\n// Basic validation\nconst _validate = function (a) {\n return /^[a-f0-9\\\\:]+$/ig.test(a);\n};\n\nconst _leftPad = function (d, p, n) {\n const padding = p.repeat(n);\n if (d.length < padding.length) {\n d = padding.substring(0, padding.length - d.length) + d;\n }\n return d;\n};\n\nconst _hex2bin = function (hex) {\n return parseInt(hex, 16).toString(2)\n};\nconst _bin2hex = function (bin) {\n return parseInt(bin, 2).toString(16)\n};\n\nconst _addr2bin = function (addr) {\n const nAddr = normalize(addr);\n const sections = nAddr.split(\":\");\n let binAddr = '';\n for (const section of sections) {\n binAddr += _leftPad(_hex2bin(section), '0', 16);\n }\n return binAddr;\n};\n\nconst _bin2addr = function (bin) {\n const addr = [];\n for (let i = 0; i < 8; ++i) {\n const binPart = bin.substr(i * 16, 16);\n const hexSection = _leftPad(_bin2hex(binPart), '0', 4);\n addr.push(hexSection);\n }\n return addr.join(':');\n};\n\nconst divideSubnet = function (addr, mask0, mask1, limit, abbr) {\n if (!_validate(addr)) {\n throw new Error('Invalid address: ' + addr);\n }\n mask0 *= 1;\n mask1 *= 1;\n limit *= 1;\n mask1 = mask1 || 128;\n if (mask0 < 1 || mask1 < 1 || mask0 > 128 || mask1 > 128 || mask0 > mask1) {\n throw new Error('Invalid masks.');\n }\n const ret = [];\n const binAddr = _addr2bin(addr);\n const binNetPart = binAddr.substr(0, mask0);\n const binHostPart = '0'.repeat(128 - mask1);\n const numSubnets = Math.pow(2, mask1 - mask0);\n for (let i = 0; i < numSubnets; ++i) {\n if (!!limit && i >= limit) {\n break;\n }\n const binSubnet = _leftPad(i.toString(2), '0', mask1 - mask0);\n const binSubAddr = binNetPart + binSubnet + binHostPart;\n const hexAddr = _bin2addr(binSubAddr);\n if (!!abbr) {\n ret.push(abbreviate(hexAddr));\n } else {\n ret.push(hexAddr);\n }\n\n }\n // console.log(numSubnets);\n // console.log(binNetPart, binSubnetPart, binHostPart);\n // console.log(binNetPart.length, binSubnetPart.length, binHostPart.length);\n // console.log(ret.length);\n return ret;\n};\n\nconst range = function (addr, mask0, mask1, abbr) {\n if (!_validate(addr)) {\n throw new Error('Invalid address: ' + addr);\n }\n mask0 *= 1;\n mask1 *= 1;\n mask1 = mask1 || 128;\n if (mask0 < 1 || mask1 < 1 || mask0 > 128 || mask1 > 128 || mask0 > mask1) {\n throw new Error('Invalid masks.');\n }\n const binAddr = _addr2bin(addr);\n const binNetPart = binAddr.substr(0, mask0);\n const binHostPart = '0'.repeat(128 - mask1);\n const binStartAddr = binNetPart + '0'.repeat(mask1 - mask0) + binHostPart;\n const binEndAddr = binNetPart + '1'.repeat(mask1 - mask0) + binHostPart;\n if (!!abbr) {\n return {\n start: abbreviate(_bin2addr(binStartAddr)),\n end: abbreviate(_bin2addr(binEndAddr)),\n size: Math.pow(2, mask1 - mask0)\n };\n } else {\n return {\n start: _bin2addr(binStartAddr),\n end: _bin2addr(binEndAddr),\n size: Math.pow(2, mask1 - mask0)\n };\n }\n};\n\nconst randomSubnet = function (addr, mask0, mask1, limit, abbr) {\n if (!_validate(addr)) {\n throw new Error('Invalid address: ' + addr);\n }\n mask0 *= 1;\n mask1 *= 1;\n limit *= 1;\n mask1 = mask1 || 128;\n limit = limit || 1;\n if (mask0 < 1 || mask1 < 1 || mask0 > 128 || mask1 > 128 || mask0 > mask1) {\n throw new Error('Invalid masks.');\n }\n const ret = [];\n const binAddr = _addr2bin(addr);\n const binNetPart = binAddr.substr(0, mask0);\n const binHostPart = '0'.repeat(128 - mask1);\n const numSubnets = Math.pow(2, mask1 - mask0);\n for (let i = 0; i < numSubnets && i < limit; ++i) {\n // generate an binary string with length of mask1 - mask0\n let binSubnet = '';\n for (let j = 0; j < mask1 - mask0; ++j) {\n binSubnet += Math.floor(Math.random() * 2);\n }\n const binSubAddr = binNetPart + binSubnet + binHostPart;\n const hexAddr = _bin2addr(binSubAddr);\n if (!!abbr) {\n ret.push(abbreviate(hexAddr));\n } else {\n ret.push(hexAddr);\n }\n }\n // console.log(numSubnets);\n // console.log(binNetPart, binSubnetPart, binHostPart);\n // console.log(binNetPart.length, binSubnetPart.length, binHostPart.length);\n // console.log(ret.length);\n return ret;\n};\n\nconst ptr = function (addr, mask) {\n if (!_validate(addr)) {\n throw new Error('Invalid address: ' + addr);\n }\n mask *= 1;\n if (mask < 1 || mask > 128 || Math.floor(mask / 4) != mask / 4) {\n throw new Error('Invalid masks.');\n }\n const fullAddr = normalize(addr);\n const reverse = fullAddr.replace(/:/g, '').split('').reverse();\n return reverse.slice(0, (128 - mask) / 4).join('.');\n};\n\nif (typeof module !== 'undefined' && typeof module.exports !== 'undefined') {\n exports.normalize = normalize;\n exports.abbreviate = abbreviate;\n exports.divideSubnet = divideSubnet;\n exports.range = range;\n exports.randomSubnet = randomSubnet;\n exports.ptr = ptr;\n} else {\n window.normalize = normalize;\n window.abbreviate = abbreviate;\n window.divideSubnet = divideSubnet;\n window.range = range;\n window.randomSubnet = randomSubnet;\n window.ptr = ptr;\n}\n","import ipaddr from 'ipaddr.js';\n// @ts-ignore: Can't find a @types/ip6 package\nimport ip6 from 'ip6';\n\nexport function isIP(addr: string) {\n return ipaddr.isValid(addr);\n}\n\nexport function version(addr: string): number {\n try {\n const parse_addr = ipaddr.parse(addr);\n const kind = parse_addr.kind();\n\n if (kind === 'ipv4') {\n return 4; //IPv4\n } else if (kind === 'ipv6') {\n return 6; //IPv6\n } else {\n /* istanbul ignore next */\n return 0; //not 4 or 6\n }\n } catch (err) {\n return 0; //not 4 or 6\n }\n}\n\nexport function isV4(addr: string) {\n return version(addr) === 4;\n}\n\nexport function isV6(addr: string) {\n return version(addr) === 6;\n}\n\nexport function isRange(range: string) {\n try {\n const cidr = ipaddr.parseCIDR(range);\n return true;\n } catch (err) {\n return false;\n }\n}\n\nexport function inRange(addr: string, range: string | string[]) {\n if (typeof range === 'string') {\n if (range.indexOf('/') !== -1) {\n try {\n const range_data = range.split('/');\n\n const parse_addr = ipaddr.parse(addr);\n const parse_range = ipaddr.parse(range_data[0]);\n\n //@ts-ignore: It works.\n return parse_addr.match(parse_range, range_data[1]);\n } catch (err) {\n return false;\n }\n } else {\n addr = isV6(addr) ? ip6.normalize(addr) : addr; //v6 normalize addr\n range = isV6(range) ? ip6.normalize(range) : range; //v6 normalize range\n\n return isIP(range as string) && addr === range;\n }\n } else if (range && typeof range === 'object') {\n //list\n for (const check_range in range) {\n if (inRange(addr, range[check_range]) === true) {\n return true;\n }\n }\n return false;\n } else {\n return false;\n }\n}\n\nexport function storeIP(addr: string) {\n try {\n var parse_addr = ipaddr.parse(addr);\n var kind = parse_addr.kind();\n\n if (kind === 'ipv4') {\n //is a plain v4 address\n return addr;\n } else if (kind === 'ipv6') {\n //@ts-ignore: it exists!\n if (parse_addr.isIPv4MappedAddress()) {\n //convert v4 mapped to v6 addresses to a v4 in it's original format\n //@ts-ignore: it exists!\n return parse_addr.toIPv4Address().toString();\n } //is a v6, abbreviate it\n else {\n return ip6.abbreviate(addr);\n }\n } else {\n return null; //invalid IP address\n }\n } catch (err) {\n return null; //invalid IP address\n }\n}\n\n// searchIP is a aliases of storeIP\nexport { storeIP as searchIP };\n\nexport function displayIP(addr: string) {\n try {\n var parse_addr = ipaddr.parse(addr);\n var kind = parse_addr.kind();\n\n if (kind === 'ipv4') {\n //is a plain v4 address\n return addr;\n } else if (kind === 'ipv6') {\n //@ts-ignore: it exists!\n if (parse_addr.isIPv4MappedAddress()) {\n //convert v4 mapped to v6 addresses to a v4 in it's original format\n //@ts-ignore: it exists!\n return parse_addr.toIPv4Address().toString();\n } //is a v6, normalize it\n else {\n return ip6.normalize(addr);\n }\n } else {\n return ''; //invalid IP address\n }\n } catch (err) {\n return ''; //invalid IP address\n }\n}\n","/**\n * All event listeners\n *\n * https://developers.facebook.com/docs/meta-pixel/reference\n * */\n\n// Load pixel event\njQuery(document).on(\"pmw:load-pixels\", () => {\n\n\tif (\n\t\twpmDataLayer?.pixels?.facebook?.pixel_id\n\t\t&& !wpmDataLayer?.pixels?.facebook?.loaded\n\t\t&& !wpm.doesUrlContainPatterns(wpmDataLayer?.pixels?.facebook?.exclusion_patterns)\n\t) {\n\t\tif (wpm.consent.canPixelBeFired(\"marketing\", \"Facebook\")) wpm.loadFacebookPixel()\n\t}\n})\n\n// AddToCart event\n// https://developers.facebook.com/docs/meta-pixel/reference\njQuery(document).on(\"pmw:s2s:add-to-cart\", (event, payload) => {\n\n\ttry {\n\t\tif (wpm.canNotFireFbq()) return\n\n\t\tfbq(\"track\", \"AddToCart\", payload.facebook.custom_data, {\n\t\t\teventID: payload.facebook.event_id,\n\t\t})\n\t\tpmw.console.log(\"Facebook Pixel: AddToCart event sent\", payload.facebook)\n\n\t} catch (error) {\n\t\tconsole.error(error)\n\t}\n})\n\n// InitiateCheckout event\n// https://developers.facebook.com/docs/meta-pixel/reference\njQuery(document).on(\"pmw:s2s:begin-checkout\", (event, payload) => {\n\n\ttry {\n\t\tif (wpm.canNotFireFbq()) return\n\n\t\tfbq(\"track\", \"InitiateCheckout\", payload.facebook.custom_data, {\n\t\t\teventID: payload.facebook.event_id,\n\t\t})\n\t\tpmw.console.log(\"Facebook Pixel: InitiateCheckout event sent\", payload.facebook)\n\n\t} catch (error) {\n\t\tconsole.error(error)\n\t}\n})\n\n// AddPaymentInfo event\n// https://developers.facebook.com/docs/meta-pixel/reference\njQuery(document).on(\"pmw:s2s:add-payment-info\", (event, payload) => {\n\n\ttry {\n\t\tif (wpm.canNotFireFbq()) return\n\n\t\tconst eventName = \"AddPaymentInfo\"\n\n\t\tfbq(\"track\", eventName, payload.facebook.custom_data, {\n\t\t\teventID: payload.facebook.event_id,\n\t\t})\n\t\tpmw.console.log(`Facebook Pixel: ${eventName} event sent`, payload.facebook)\n\n\t} catch (error) {\n\t\tconsole.error(error)\n\t}\n})\n\n// AddToWishlist event\n// https://developers.facebook.com/docs/meta-pixel/reference\njQuery(document).on(\"pmw:s2s:add-to-wishlist\", (event, payload) => {\n\n\ttry {\n\t\tif (wpm.canNotFireFbq()) return\n\n\t\tfbq(\"track\", \"AddToWishlist\", payload.facebook.custom_data, {\n\t\t\teventID: payload.facebook.event_id,\n\t\t})\n\t\tpmw.console.log(\"Facebook Pixel: AddToWishlist event sent\", payload.facebook)\n\n\t} catch (error) {\n\t\tconsole.error(error)\n\t}\n})\n\n// ViewContent event\n// https://developers.facebook.com/docs/meta-pixel/reference\njQuery(document).on(\"pmw:s2s:view-item\", (event, payload) => {\n\n\ttry {\n\t\tif (wpm.canNotFireFbq()) return\n\n\t\tfbq(\"track\", \"ViewContent\", payload.facebook.custom_data, {\n\t\t\teventID: payload.facebook.event_id,\n\t\t})\n\t\tpmw.console.log(\"Facebook Pixel: ViewContent event sent\", payload.facebook)\n\n\t} catch (error) {\n\t\tconsole.error(error)\n\t}\n})\n\n\n// view search event\n// https://developers.facebook.com/docs/meta-pixel/reference\njQuery(document).on(\"pmw:s2s:search\", (event, payload) => {\n\n\ttry {\n\t\tif (wpm.canNotFireFbq()) return\n\n\t\tfbq(\"track\", \"Search\", payload.facebook.custom_data, {\n\t\t\teventID: payload.facebook.event_id,\n\t\t})\n\t\tpmw.console.log(\"Facebook Pixel: Search event sent\", payload.facebook)\n\n\t} catch (error) {\n\t\tconsole.error(error)\n\t}\n})\n\n// load always event\njQuery(document).on(\"pmw:load-always\", () => {\n\n\ttry {\n\t\tif (wpm.canNotFireFbq()) return\n\n\t\twpm.setFbUserData()\n\t} catch (error) {\n\t\tconsole.error(error)\n\t}\n})\n\n// view order received page event\n// https://developers.facebook.com/docs/meta-pixel/reference\njQuery(document).on(\"pmw:s2s:view-order-received-page\", (event, payload) => {\n\n\ttry {\n\t\tif (wpm.canNotFireFbq()) return\n\n\t\tfbq(\"track\", \"Purchase\", payload.facebook.custom_data, {\n\t\t\teventID: payload.facebook.event_id,\n\t\t})\n\t\tpmw.console.log(\"Facebook Pixel: Purchase event sent\", payload.facebook)\n\n\t} catch (error) {\n\t\tconsole.error(error)\n\t}\n})\n\ndocument.addEventListener(\"pmw:consent:update\", ({detail}) => {\n\n\tconst consent = detail\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.facebook?.loaded) return\n\n\t\tif (consent.marketing) {\n\t\t\tfbq(\"consent\", \"grant\")\n\t\t\tpmw.console.log(\"Facebook pixel - marketing consent granted\")\n\t\t} else {\n\t\t\tfbq(\"consent\", \"revoke\")\n\t\t\tpmw.console.log(\"Facebook pixel - marketing consent revoked\")\n\t\t}\n\n\t} catch (error) {\n\t\tconsole.error(error)\n\t}\n}, true)\n","/**\n * Add functions for Facebook\n * */\n\n(function (wpm, $, undefined) {\n\n\tlet fbUserData\n\n\twpm.fbeventsJsUrl = () => {\n\n\t\tlet searchParams = new URLSearchParams(window.location.search)\n\n\t\tif (searchParams.has(\"fbevents-version\")) {\n\t\t\treturn `https://connect.facebook.net/en_US/fbevents.js?v=${searchParams.get(\"fbevents-version\")}`\n\t\t}\n\n\t\treturn wpmDataLayer?.pixels?.facebook?.fbevents_js_url\n\t}\n\n\twpm.loadFacebookPixel = () => {\n\n\t\ttry {\n\t\t\twpmDataLayer.pixels.facebook.loaded = true\n\n\t\t\t// @formatter:off\n\t\t\t!function(f,b,e,v,n,t,s)\n\t\t\t{if(f.fbq)return;n=f.fbq=function(){n.callMethod?\n\t\t\t\tn.callMethod.apply(n,arguments):n.queue.push(arguments)};\n\t\t\t\tif(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0';\n\t\t\t\tn.queue=[];t=b.createElement(e);t.async=!0;\n\t\t\t\tt.src=v;s=b.getElementsByTagName(e)[0];\n\t\t\t\ts.parentNode.insertBefore(t,s)}(window, document,'script',\n\t\t\t\twpm.fbeventsJsUrl());\n\t\t\t// @formatter:on\n\n\t\t\tlet data = {}\n\n\t\t\t// Add user identifiers to data,\n\t\t\t// and only if fbp was set\n\t\t\tif (wpm.isFbpSet() && wpm.isFbAdvancedMatchingEnabled()) {\n\t\t\t\tdata = {...wpm.getUserIdentifiersForFb()}\n\t\t\t}\n\n\t\t\t// https://developers.facebook.com/docs/meta-pixel/advanced/#automatic-configuration\n\t\t\t// fbq(\"set\", \"autoConfig\", false, wpmDataLayer.pixels.facebook.pixel_id)\n\n\t\t\t// Initialize the Facebook Pixel and send the first PageView event\n\t\t\tfbq(\"init\", wpmDataLayer.pixels.facebook.pixel_id, data)\n\n\t\t\tif (wpmDataLayer?.pixels?.facebook?.mobile_bridge_app_id) {\n\t\t\t\tfbq(\"set\", \"mobileBridge\", wpmDataLayer.pixels.facebook.pixel_id, wpmDataLayer?.pixels?.facebook?.mobile_bridge_app_id)\n\t\t\t}\n\n\t\t\tfbq(\"track\", \"PageView\")\n\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\t// https://developers.facebook.com/docs/meta-pixel/advanced/advanced-matching\n\twpm.getUserIdentifiersForFb = () => {\n\n\t\tlet data = {}\n\n\t\t// external ID\n\t\tif (wpmDataLayer?.user?.id?.raw) data.external_id = wpmDataLayer.user.id.raw\n\t\tif (wpmDataLayer?.order?.user_id) data.external_id = wpmDataLayer.order.user_id\n\n\t\t// email\n\t\tif (wpmDataLayer?.user?.email?.facebook) data.em = wpmDataLayer.user.email.facebook\n\t\tif (wpmDataLayer?.order?.billing_email_hashed) data.em = wpmDataLayer.order.billing_email_hashed\n\n\t\t// first name\n\t\tif (wpmDataLayer?.user?.first_name?.facebook) data.fn = wpmDataLayer.user.first_name.facebook\n\t\tif (wpmDataLayer?.order?.billing_first_name) data.fn = wpmDataLayer.order.billing_first_name.toLowerCase()\n\n\t\t// last name\n\t\tif (wpmDataLayer?.user?.last_name?.facebook) data.ln = wpmDataLayer.user.last_name.facebook\n\t\tif (wpmDataLayer?.order?.billing_last_name) data.ln = wpmDataLayer.order.billing_last_name.toLowerCase()\n\n\t\t// phone\n\t\tif (wpmDataLayer?.user?.phone?.facebook) data.ph = wpmDataLayer.user.phone.facebook\n\t\tif (wpmDataLayer?.order?.billing_phone) data.ph = wpmDataLayer.order.billing_phone.replace(\"+\", \"\")\n\n\t\t// city\n\t\tif (wpmDataLayer?.user?.city?.facebook) data.ct = wpmDataLayer.user.city.facebook\n\t\tif (wpmDataLayer?.order?.billing_city) data.ct = wpmDataLayer.order.billing_city.toLowerCase().replace(/ /g, \"\")\n\n\t\t// state\n\t\tif (wpmDataLayer?.user?.state?.facebook) data.st = wpmDataLayer.user.state.facebook\n\t\tif (wpmDataLayer?.order?.billing_state) data.st = wpmDataLayer.order.billing_state.toLowerCase().replace(/[a-zA-Z]{2}-/, \"\")\n\n\t\t// postcode\n\t\tif (wpmDataLayer?.user?.postcode?.facebook) data.zp = wpmDataLayer.user.postcode.facebook\n\t\tif (wpmDataLayer?.order?.billing_postcode) data.zp = wpmDataLayer.order.billing_postcode\n\n\t\t// country\n\t\tif (wpmDataLayer?.user?.country?.facebook) data.country = wpmDataLayer.user.country.facebook\n\t\tif (wpmDataLayer?.order?.billing_country) data.country = wpmDataLayer.order.billing_country.toLowerCase()\n\n\t\treturn data\n\t}\n\n\twpm.getFbRandomEventId = () => (Math.random() + 1).toString(36).substring(2)\n\n\twpm.getFbUserData = () => {\n\n\t\t/**\n\t\t * We need to cache the FB user data for InitiateCheckout\n\t\t * where getting the user data from the browser is too slow\n\t\t * using wpm.getCookie().\n\t\t *\n\t\t * And we need the object merge because the ViewContent hit happens too fast\n\t\t * after adding a variation to the cart because the function to cache\n\t\t * the user data is too slow.\n\t\t *\n\t\t * But we can get the user_data using wpm.getCookie()\n\t\t * because we don't move away from the page and can wait for the browser\n\t\t * to get it.\n\t\t *\n\t\t * Also, the merge ensures that new data will be added to fbUserData if new\n\t\t * data is being added later, like user ID, or fbc.\n\t\t */\n\n\t\tfbUserData = {...fbUserData, ...wpm.getFbUserDataFromBrowser()}\n\n\t\treturn fbUserData\n\t}\n\n\twpm.isFbAdvancedMatchingEnabled = () => {\n\t\tif (wpmDataLayer?.pixels?.facebook?.advanced_matching) {\n\t\t\treturn true\n\t\t}\n\n\t\treturn false\n\t}\n\n\twpm.setFbUserData = () => {\n\t\tfbUserData = wpm.getFbUserDataFromBrowser()\n\t}\n\n\twpm.getFbUserDataFromBrowser = () => {\n\n\t\tlet data = {}\n\n\t\tlet fbp = wpm.getCookie(\"_fbp\")\n\t\tif (wpm.isValidFbp(fbp)) {\n\t\t\tdata.fbp = fbp\n\t\t}\n\n\t\tlet fbc = wpm.getCookie(\"_fbc\") || wpm.retrieveData(\"fbclid\")\n\t\tif (wpm.isValidFbc(fbc)) {\n\t\t\tdata.fbc = fbc\n\t\t}\n\n\t\tif (wpm.isFbAdvancedMatchingEnabled()) {\n\t\t\tif (wpmDataLayer?.user?.email?.facebook) data.em = wpmDataLayer.user.email.facebook\n\t\t\tif (wpmDataLayer?.user?.phone?.facebook) data.ph = wpmDataLayer.user.phone.facebook\n\t\t\tif (wpmDataLayer?.user?.first_name?.facebook) data.fn = wpmDataLayer.user.first_name.facebook\n\t\t\tif (wpmDataLayer?.user?.last_name?.facebook) data.ln = wpmDataLayer.user.last_name.facebook\n\t\t\tif (wpmDataLayer?.user?.city?.facebook) data.ct = wpmDataLayer.user.city.facebook\n\t\t\tif (wpmDataLayer?.user?.state?.facebook) data.st = wpmDataLayer.user.state.facebook\n\t\t\tif (wpmDataLayer?.user?.postcode?.facebook) data.zp = wpmDataLayer.user.postcode.facebook\n\t\t\tif (wpmDataLayer?.user?.country?.facebook) data.country = wpmDataLayer.user.country.facebook\n\t\t\tif (wpmDataLayer?.user?.id?.raw) data.external_id = wpmDataLayer.user.id.raw\n\t\t}\n\n\t\tif (navigator.userAgent) data.client_user_agent = navigator.userAgent\n\n\t\t// If a IPv6 address is available in the data store, add it to the user data\n\t\tif (wpm.retrieveData(\"ipv6\")) data.client_ip_address = wpm.retrieveData(\"ipv6\")\n\n\t\treturn data\n\t}\n\n\twpm.isFbpSet = () => {\n\t\treturn !!wpm.getCookie(\"_fbp\")\n\t}\n\n\t// https://developers.facebook.com/docs/marketing-api/conversions-api/parameters/fbp-and-fbc/\n\twpm.isValidFbp = fbp => {\n\n\t\tlet re = new RegExp(/^fb\\.[0-2]\\.\\d{13}\\.\\d{8,20}$/)\n\n\t\treturn re.test(fbp)\n\t}\n\n\t// https://developers.facebook.com/docs/marketing-api/conversions-api/parameters/fbp-and-fbc/\n\twpm.isValidFbc = fbc => {\n\n\t\tlet re = new RegExp(/^fb\\.[0-2]\\.\\d{13}\\.[\\da-zA-Z_-]{8,}/)\n\n\t\treturn re.test(fbc)\n\t}\n\n\twpm.fbGetProductDataForCapiEvent = product => {\n\t\treturn {\n\t\t\tcontent_type: \"product\",\n\t\t\tcontent_name: product.name,\n\t\t\tcontent_ids : [\n\t\t\t\tproduct.dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type],\n\t\t\t],\n\t\t\tvalue : parseFloat(product.quantity * product.price),\n\t\t\tcurrency : product.currency,\n\t\t}\n\t}\n\n\twpm.facebookContentIds = () => {\n\t\tlet prodIds = []\n\n\t\tObject.values(wpmDataLayer.order.items).forEach(item => {\n\t\t\tif (wpmDataLayer?.shop?.variations_output && 0 !== item.variation_id) {\n\t\t\t\tprodIds.push(String(wpmDataLayer.products[item.variation_id].dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type]))\n\t\t\t} else {\n\t\t\t\tprodIds.push(String(wpmDataLayer.products[item.id].dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type]))\n\t\t\t}\n\t\t})\n\n\t\treturn prodIds\n\t}\n\n\twpm.trackCustomFacebookEvent = (eventName, customData = {}) => {\n\t\ttry {\n\t\t\tif (!wpmDataLayer?.pixels?.facebook?.loaded) return\n\n\t\t\tlet eventId = wpm.getFbRandomEventId()\n\n\t\t\tfbq(\"trackCustom\", eventName, customData, {\n\t\t\t\teventID: eventId,\n\t\t\t})\n\n\t\t\tlet payload = {\n\t\t\t\tfacebook: {\n\t\t\t\t\tevent_name : eventName,\n\t\t\t\t\tevent_id : eventId,\n\t\t\t\t\tuser_data : wpm.getFbUserData(),\n\t\t\t\t\tevent_source_url: window.location.href,\n\t\t\t\t},\n\t\t\t}\n\n\t\t\t// if customData not empty, add it to the payload\n\t\t\tif (Object.keys(customData).length) {\n\t\t\t\tpayload.facebook.custom_data = customData\n\t\t\t}\n\n\t\t\twpm.sendEventPayloadToServer(payload)\n\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\twpm.fbGetContentIdsFromCart = () => {\n\n\t\tlet content_ids = []\n\n\t\tfor (const key in wpmDataLayer.cart) {\n\t\t\tcontent_ids.push(wpmDataLayer.products[key].dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type])\n\t\t}\n\n\t\treturn content_ids\n\t}\n\n\t/**\n\t * Check if Facebook Pixel is allowed to fire\n\t *\n\t * @returns {boolean}\n\t */\n\twpm.canFireFbq = () => {\n\n\t\t// If the Facebook Pixel is not loaded, return false\n\t\tif (!wpmDataLayer?.pixels?.facebook?.loaded) return false\n\n\t\t// If the user has not given consent for marketing, return false\n\t\tif (!wpm.consent.categories.get().marketing) return false\n\n\t\treturn true\n\t}\n\n\t/**\n\t * Check if Facebook Pixel is not allowed to fire\n\t *\n\t * @returns {boolean}\n\t */\n\twpm.canNotFireFbq = () => {\n\t\treturn !wpm.canFireFbq()\n\t}\n\n}(window.wpm = window.wpm || {}, jQuery));\n","/**\n * Facebook loader\n */\n\nrequire(\"./functions\")\nrequire(\"./event_listeners\")\n\n// #if process.env.TIER === 'premium'\n// if (wpm.canLoadPremiumFeatures()) {\n// \trequire(\"./functions_premium\")\n// \trequire(\"./event_listeners_premium\")\n// }\n// #endif\n\n","/**\n * Load Google Ads event listeners\n * */\n\n// view_item_list event\njQuery(document).on(\"pmw:view-item-list\", (event, product) => {\n\n\ttry {\n\t\tif (jQuery.isEmptyObject(wpmDataLayer?.pixels?.google?.ads?.conversion_ids)) return\n\t\tif (!wpm.googleConfigConditionsMet({type: \"marketing\"})) return\n\n\n\t\tif (\n\t\t\twpmDataLayer?.shop?.variations_output &&\n\t\t\tproduct.is_variable &&\n\t\t\twpmDataLayer.pixels.google.ads.dynamic_remarketing.send_events_with_parent_ids === false\n\t\t) return\n\n\t\t// try to prevent that WC sends cached hits to Google\n\t\tif (!product) return\n\n\t\tlet data = {\n\t\t\tsend_to: wpm.getGoogleAdsConversionIdentifiers(),\n\t\t\titems : [{\n\t\t\t\tid : product.dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type],\n\t\t\t\tgoogle_business_vertical: wpmDataLayer.pixels.google.ads.google_business_vertical,\n\t\t\t}],\n\t\t}\n\n\t\tif (wpmDataLayer?.user?.id?.raw) {\n\t\t\tdata.user_id = wpmDataLayer.user.id.raw\n\t\t}\n\n\t\twpm.gtagLoaded().then(() => {\n\t\t\tgtag(\"event\", \"view_item_list\", data)\n\t\t\tpmw.console.log(\"Google Ads: view_item_list event sent\", data)\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// add_to_cart event\njQuery(document).on(\"pmw:add-to-cart\", (event, product) => {\n\n\ttry {\n\t\tif (jQuery.isEmptyObject(wpmDataLayer?.pixels?.google?.ads?.conversion_ids)) return\n\t\tif (!wpm.googleConfigConditionsMet({type: \"marketing\"})) return\n\n\t\tlet data = {\n\t\t\tsend_to: wpm.getGoogleAdsConversionIdentifiers(),\n\t\t\tvalue : product.quantity * product.price,\n\t\t\titems : [{\n\t\t\t\tid : product.dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type],\n\t\t\t\tquantity : product.quantity,\n\t\t\t\tprice : product.price,\n\t\t\t\tgoogle_business_vertical: wpmDataLayer.pixels.google.ads.google_business_vertical,\n\t\t\t}],\n\t\t}\n\n\t\tif (wpmDataLayer?.user?.id?.raw) {\n\t\t\tdata.user_id = wpmDataLayer.user.id.raw\n\t\t}\n\n\t\twpm.gtagLoaded().then(() => {\n\t\t\tgtag(\"event\", \"add_to_cart\", data)\n\t\t\tpmw.console.log(\"Google Ads: add_to_cart event sent\", data)\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// view_item event\njQuery(document).on(\"pmw:view-item\", (event, product = null) => {\n\n\ttry {\n\t\tif (jQuery.isEmptyObject(wpmDataLayer?.pixels?.google?.ads?.conversion_ids)) return\n\t\tif (!wpm.googleConfigConditionsMet({type: \"marketing\"})) return\n\n\t\tlet data = {\n\t\t\tsend_to: wpm.getGoogleAdsConversionIdentifiers(),\n\t\t}\n\n\t\tif (product) {\n\t\t\tdata.value = (product.quantity ? product.quantity : 1) * product.price\n\t\t\tdata.items = [{\n\t\t\t\tid : product.dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type],\n\t\t\t\tquantity : (product.quantity ? product.quantity : 1),\n\t\t\t\tprice : product.price,\n\t\t\t\tgoogle_business_vertical: wpmDataLayer.pixels.google.ads.google_business_vertical,\n\t\t\t}]\n\t\t}\n\n\t\tif (wpmDataLayer?.user?.id?.raw) {\n\t\t\tdata.user_id = wpmDataLayer.user.id.raw\n\t\t}\n\n\t\twpm.gtagLoaded().then(() => {\n\t\t\tgtag(\"event\", \"view_item\", data)\n\t\t\tpmw.console.log(\"Google Ads: view_item event sent\", data)\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n\n// view search event\njQuery(document).on(\"pmw:search\", () => {\n\n\ttry {\n\t\tif (jQuery.isEmptyObject(wpmDataLayer?.pixels?.google?.ads?.conversion_ids)) return\n\t\tif (!wpm.googleConfigConditionsMet({type: \"marketing\"})) return\n\n\n\t\tlet products = []\n\n\t\tObject.values(wpmDataLayer.products).forEach(product => {\n\n\t\t\tif (\n\t\t\t\twpmDataLayer?.shop?.variations_output &&\n\t\t\t\tproduct.is_variable &&\n\t\t\t\twpmDataLayer.pixels.google.ads.dynamic_remarketing.send_events_with_parent_ids === false\n\t\t\t) return\n\n\t\t\tproducts.push({\n\t\t\t\tid : product.dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type],\n\t\t\t\tgoogle_business_vertical: wpmDataLayer.pixels.google.ads.google_business_vertical,\n\t\t\t})\n\t\t})\n\n\t\t// console.log(products);\n\n\t\tlet data = {\n\t\t\tsend_to: wpm.getGoogleAdsConversionIdentifiers(),\n\t\t\t// value : 1 * product.price,\n\t\t\titems: products,\n\t\t}\n\n\t\tif (wpmDataLayer?.user?.id?.raw) {\n\t\t\tdata.user_id = wpmDataLayer.user.id.raw\n\t\t}\n\n\t\twpm.gtagLoaded().then(() => {\n\t\t\tgtag(\"event\", \"view_search_results\", data)\n\t\t\tpmw.console.log(\"Google Ads: view_search_results event sent\", data)\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n\n// user log in event\njQuery(document).on(\"pmw:login\", () => {\n\n\ttry {\n\t\tif (jQuery.isEmptyObject(wpmDataLayer?.pixels?.google?.ads?.conversion_ids)) return\n\t\tif (!wpm.googleConfigConditionsMet({type: \"marketing\"})) return\n\n\t\tlet data = {\n\t\t\tsend_to: wpm.getGoogleAdsConversionIdentifiers(),\n\t\t}\n\n\t\tif (wpmDataLayer?.user?.id?.raw) {\n\t\t\tdata.user_id = wpmDataLayer.user.id.raw\n\t\t}\n\n\t\twpm.gtagLoaded().then(() => {\n\t\t\tgtag(\"event\", \"login\", data)\n\t\t\tpmw.console.log(\"Google Ads: login event sent\", data)\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n/**\n * Google Ads remarketing purchase\n *\n * https://support.google.com/google-ads/answer/7305793\n */\njQuery(document).on(\"pmw:view-order-received-page\", () => {\n\n\ttry {\n\t\tif (jQuery.isEmptyObject(wpm.getGoogleAdsConversionIdentifiersWithLabel())) return\n\t\tif (!wpm.googleConfigConditionsMet({type: \"marketing\"})) return\n\n\t\tlet data = {\n\t\t\tsend_to: wpm.getGoogleAdsConversionIdentifiers(),\n\t\t\tvalue : wpmDataLayer.order.value.marketing,\n\t\t\t// currency: wpmDataLayer.order.currency,\n\t\t\titems: wpm.getGoogleAdsRegularOrderItems(),\n\t\t}\n\n\t\twpm.gtagLoaded().then(() => {\n\t\t\tgtag(\"event\", \"purchase\", data)\n\t\t\tpmw.console.log(\"Google Ads: purchase event sent (for remarketing lists)\", data)\n\t\t})\n\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n/**\n * Google Ads conversion event\n *\n * new_customer parameter: https://support.google.com/google-ads/answer/9917012\n * cart data: https://support.google.com/google-ads/answer/9028614\n * customer_lifetime_value is undocumented, but available in gtag.js\n */\njQuery(document).on(\"pmw:view-order-received-page\", () => {\n\n\ttry {\n\t\tif (jQuery.isEmptyObject(wpm.getGoogleAdsConversionIdentifiersWithLabel())) return\n\t\tif (!wpm.googleConfigConditionsMet({type: \"marketing\"})) return\n\n\t\tlet data = {\n\t\t\tsend_to : wpm.getGoogleAdsConversionIdentifiersWithLabel(),\n\t\t\ttransaction_id: wpmDataLayer.order.number,\n\t\t\tvalue : wpmDataLayer.order.value.marketing,\n\t\t\tcurrency : wpmDataLayer.order.currency,\n\t\t\tnew_customer : wpmDataLayer.order.new_customer,\n\t\t}\n\n\t\tif (wpmDataLayer?.order?.value?.ltv?.marketing) {\n\t\t\tdata.customer_lifetime_value = wpmDataLayer.order.value.ltv.marketing\n\t\t}\n\n\t\tif (wpmDataLayer?.user?.id?.raw) {\n\t\t\tdata.user_id = wpmDataLayer.user.id.raw\n\t\t}\n\n\t\t// https://support.google.com/google-ads/answer/9028614\n\t\tif (wpmDataLayer?.order?.aw_merchant_id) {\n\t\t\tdata.discount = wpmDataLayer.order.discount\n\t\t\tdata.aw_merchant_id = wpmDataLayer.order.aw_merchant_id\n\t\t\tdata.aw_feed_country = wpmDataLayer.order.aw_feed_country\n\t\t\tdata.aw_feed_language = wpmDataLayer.order.aw_feed_language\n\t\t\tdata.items = wpm.getGoogleAdsRegularOrderItems()\n\t\t}\n\n\t\t// Add custom variables\n\t\tif(wpmDataLayer?.order?.google?.ads?.custom_variables) {\n\t\t\tObject.entries(wpmDataLayer.order.google.ads.custom_variables).forEach(([key, value]) => {\n\t\t\t\tdata[key] = value\n\t\t\t})\n\t\t}\n\n\t\twpm.gtagLoaded().then(() => {\n\t\t\t// Event needs to be \"purchase\" (not \"conversion\") in order to be able to track cart data:\n\t\t\t// https://support.google.com/google-ads/answer/9028614\n\t\t\tgtag(\"event\", \"purchase\", data)\n\t\t\tpmw.console.log(\"Google Ads: conversion event sent\", data)\n\t\t})\n\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n","/**\n * Load Google Ads functions\n * */\n\n(function (wpm, $, undefined) {\n\n\n\twpm.getGoogleAdsConversionIdentifiersWithLabel = () => {\n\n\t\tlet conversionIdentifiers = []\n\n\t\tif (wpmDataLayer?.pixels?.google?.ads?.conversion_ids) {\n\t\t\tObject.entries(wpmDataLayer.pixels.google.ads.conversion_ids).forEach(([key, item]) => {\n\t\t\t\tif (item) {\n\t\t\t\t\tconversionIdentifiers.push(key + \"/\" + item)\n\t\t\t\t}\n\t\t\t})\n\t\t}\n\n\t\treturn conversionIdentifiers\n\t}\n\n\twpm.getGoogleAdsConversionIdentifiers = () => {\n\n\t\tlet conversionIdentifiers = []\n\n\t\tObject.keys(wpmDataLayer.pixels.google.ads.conversion_ids).forEach((key) => {\n\t\t\tconversionIdentifiers.push(key)\n\t\t})\n\n\t\treturn conversionIdentifiers\n\t}\n\n\twpm.getGoogleAdsRegularOrderItems = () => {\n\n\t\tlet orderItems = []\n\n\t\tObject.values(wpmDataLayer.order.items).forEach((item) => {\n\n\t\t\tlet orderItem\n\n\t\t\torderItem = {\n\t\t\t\tquantity : item.quantity,\n\t\t\t\tprice : item.price,\n\t\t\t\tgoogle_business_vertical: wpmDataLayer.pixels.google.ads.google_business_vertical,\n\t\t\t}\n\n\t\t\tif (wpmDataLayer?.shop?.variations_output && 0 !== item.variation_id) {\n\n\t\t\t\torderItem.id = String(wpmDataLayer.products[item.variation_id].dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type])\n\t\t\t\torderItems.push(orderItem)\n\t\t\t} else {\n\n\t\t\t\torderItem.id = String(wpmDataLayer.products[item.id].dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type])\n\t\t\t\torderItems.push(orderItem)\n\t\t\t}\n\t\t})\n\n\t\treturn orderItems\n\t}\n\n}(window.wpm = window.wpm || {}, jQuery))\n","/**\n * Load Google Ads\n */\n\nrequire(\"./functions\")\nrequire(\"./event_listeners\")\n","/**\n * Load GA4 event listeners\n * */\n\n// view_item_list event\n// https://developers.google.com/analytics/devguides/collection/ga4/ecommerce?client_type=gtag#view_item_list\njQuery(document).on(\"pmw:view-item-list\", (event, product) => {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.google?.analytics?.ga4?.measurement_id) return;\n\t\tif (!wpm.googleConfigConditionsMet({type: \"statistics\"})) return;\n\n\t\tconst data = {\n\t\t\tsend_to : wpmDataLayer.pixels.google.analytics.ga4.measurement_id,\n\t\t\titems : [wpm.ga4GetFullProductItemData(product)],\n\t\t\titem_list_name: wpmDataLayer.shop.list_name, // doesn't make sense on mini_cart\n\t\t\titem_list_id : wpmDataLayer.shop.list_id, // doesn't make sense on mini_cart\n\t\t};\n\n\t\twpm.gtagLoaded().then(() => {\n\t\t\tgtag(\"event\", \"view_item_list\", data);\n\t\t\tpmw.console.log(\"Google Analytics: view_item_list event sent\", data);\n\t\t});\n\t} catch (e) {\n\t\tconsole.error(e);\n\t}\n});\n\n// select_item event\n// https://developers.google.com/analytics/devguides/collection/ga4/ecommerce?client_type=gtag#select_item\njQuery(document).on(\"pmw:select-item\", (event, product) => {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.google?.analytics?.ga4?.measurement_id) return;\n\t\tif (!wpm.googleConfigConditionsMet({type: \"statistics\"})) return;\n\n\t\tconst data = {\n\t\t\tsend_to: wpmDataLayer.pixels.google.analytics.ga4.measurement_id,\n\t\t\titems : [wpm.ga4GetFullProductItemData(product)],\n\t\t};\n\n\t\twpm.gtagLoaded().then(() => {\n\t\t\tgtag(\"event\", \"select_item\", data);\n\t\t\tpmw.console.log(\"Google Analytics: select_item event sent\", data);\n\t\t});\n\t} catch (e) {\n\t\tconsole.error(e);\n\t}\n});\n\n// add_to_cart event\n// https://developers.google.com/analytics/devguides/collection/ga4/ecommerce?client_type=gtag#add_to_cart\njQuery(document).on(\"pmw:add-to-cart\", (event, product) => {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.google?.analytics?.ga4?.measurement_id) return;\n\t\tif (!wpm.googleConfigConditionsMet({type: \"statistics\"})) return;\n\n\t\tconst data = {\n\t\t\tsend_to : wpmDataLayer.pixels.google.analytics.ga4.measurement_id,\n\t\t\tcurrency: wpmDataLayer.shop.currency,\n\t\t\tvalue : product.price * product.quantity,\n\t\t\titems : [wpm.ga4GetFullProductItemData(product)],\n\t\t};\n\n\t\twpm.gtagLoaded().then(() => {\n\t\t\tgtag(\"event\", \"add_to_cart\", data);\n\t\t\tpmw.console.log(\"Google Analytics: add_to_cart event sent\", data);\n\t\t});\n\t} catch (e) {\n\t\tconsole.error(e);\n\t}\n});\n\n// view_item event\n// https://developers.google.com/analytics/devguides/collection/ga4/ecommerce?client_type=gtag#view_item\njQuery(document).on(\"pmw:view-item\", (event, product = null) => {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.google?.analytics?.ga4?.measurement_id) return;\n\t\tif (!wpm.googleConfigConditionsMet({type: \"statistics\"})) return;\n\n\t\tlet data = {\n\t\t\tsend_to: wpmDataLayer.pixels.google.analytics.ga4.measurement_id,\n\t\t};\n\n\t\tif (product) {\n\t\t\tdata.currency = wpmDataLayer.shop.currency;\n\t\t\t// data.value = 0\n\t\t\tdata.items = [wpm.ga4GetFullProductItemData(product)];\n\t\t}\n\n\t\twpm.gtagLoaded().then(() => {\n\t\t\tgtag(\"event\", \"view_item\", data);\n\t\t\tpmw.console.log(\"Google Analytics: view_item event sent\", data);\n\t\t});\n\t} catch (e) {\n\t\tconsole.error(e);\n\t}\n});\n\n// add_to_wishlist event\n// https://developers.google.com/analytics/devguides/collection/ga4/ecommerce?client_type=gtag#add_to_wishlist\njQuery(document).on(\"pmw:add-to-wishlist\", (event, product) => {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.google?.analytics?.ga4?.measurement_id) return;\n\t\tif (!wpm.googleConfigConditionsMet({type: \"statistics\"})) return;\n\n\t\tconst data = {\n\t\t\tsend_to : wpmDataLayer.pixels.google.analytics.ga4.measurement_id,\n\t\t\tcurrency: wpmDataLayer.shop.currency,\n\t\t\tvalue : product.price * product.quantity,\n\t\t\titems : [wpm.ga4GetFullProductItemData(product)],\n\t\t};\n\n\t\twpm.gtagLoaded().then(() => {\n\t\t\tgtag(\"event\", \"add_to_wishlist\", data);\n\t\t\tpmw.console.log(\"Google Analytics: add_to_wishlist event sent\", data);\n\t\t});\n\t} catch (e) {\n\t\tconsole.error(e);\n\t}\n});\n\n// remove_from_cart event\n// https://developers.google.com/analytics/devguides/collection/ga4/ecommerce?client_type=gtag#remove_from_cart\njQuery(document).on(\"pmw:remove-from-cart\", (event, product) => {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.google?.analytics?.ga4?.measurement_id) return;\n\t\tif (!wpm.googleConfigConditionsMet({type: \"statistics\"})) return;\n\n\t\tconst data = {\n\t\t\tsend_to : wpmDataLayer.pixels.google.analytics.ga4.measurement_id,\n\t\t\tcurrency: wpmDataLayer.shop.currency,\n\t\t\tvalue : product.price * product.quantity,\n\t\t\titems : [wpm.ga4GetFullProductItemData(product)],\n\t\t};\n\n\t\twpm.gtagLoaded().then(() => {\n\t\t\tgtag(\"event\", \"remove_from_cart\", data);\n\t\t\tpmw.console.log(\"Google Analytics: remove_from_cart event sent\", data);\n\t\t});\n\t} catch (e) {\n\t\tconsole.error(e);\n\t}\n});\n\n// begin_checkout event\n// https://developers.google.com/analytics/devguides/collection/ga4/ecommerce?client_type=gtag#begin_checkout\njQuery(document).on(\"pmw:begin-checkout\", () => {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.google?.analytics?.ga4?.measurement_id) return;\n\t\tif (!wpm.googleConfigConditionsMet({type: \"statistics\"})) return;\n\n\t\tlet data = {\n\t\t\tsend_to: wpmDataLayer.pixels.google.analytics.ga4.measurement_id,\n\t\t\t// coupon: \"\",\n\t\t\tcurrency: wpmDataLayer.shop.currency,\n\t\t\tvalue : wpm.getCartValue(),\n\t\t\titems : wpm.getCartItemsGa4(),\n\t\t};\n\n\t\twpm.gtagLoaded().then(() => {\n\t\t\tgtag(\"event\", \"begin_checkout\", data);\n\t\t\tpmw.console.log(\"Google Analytics: begin_checkout event sent\", data);\n\t\t});\n\t} catch (e) {\n\t\tconsole.error(e);\n\t}\n});\n\n// add_shipping_info event\njQuery(document).on(\"pmw:add-shipping-info\", (event, payload) => {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.google?.analytics?.ga4?.measurement_id) return;\n\t\tif (!wpm.googleConfigConditionsMet({type: \"statistics\"})) return;\n\n\t\tconst eventName = \"add_shipping_info\";\n\n\t\tlet data = {\n\t\t\tsend_to: wpmDataLayer.pixels.google.analytics.ga4.measurement_id,\n\t\t\t// coupon: \"\",\n\t\t\tcurrency: wpmDataLayer.shop.currency,\n\t\t\tvalue : wpm.getCartValue(),\n\t\t\titems : wpm.getCartItemsGa4(),\n\t\t};\n\n\t\tif (payload?.shippingTier?.text) {\n\t\t\tdata.shipping_tier = payload.shippingTier.text;\n\t\t}\n\n\t\twpm.gtagLoaded().then(() => {\n\t\t\tgtag(\"event\", eventName, data);\n\t\t\tpmw.console.log(`Google Analytics: ${eventName} event sent`, data);\n\t\t});\n\t} catch (e) {\n\t\tconsole.error(e);\n\t}\n});\n\n// add_payment_info event\njQuery(document).on(\"pmw:add-payment-info\", (event, payload) => {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.google?.analytics?.ga4?.measurement_id) return;\n\t\tif (!wpm.googleConfigConditionsMet({type: \"statistics\"})) return;\n\n\t\tconst eventName = \"add_payment_info\";\n\n\t\tlet data = {\n\t\t\tsend_to: wpmDataLayer.pixels.google.analytics.ga4.measurement_id,\n\t\t\t// coupon: \"\",\n\t\t\tcurrency: wpmDataLayer.shop.currency,\n\t\t\tvalue : wpm.getCartValue(),\n\t\t\titems : wpm.getCartItemsGa4(),\n\t\t};\n\n\t\tif (payload?.paymentType?.text) {\n\t\t\tdata.payment_type = payload.paymentType.text;\n\t\t}\n\n\t\twpm.gtagLoaded().then(() => {\n\t\t\tgtag(\"event\", eventName, data);\n\t\t\tpmw.console.log(`Google Analytics: ${eventName} event sent`, data);\n\t\t});\n\t} catch (e) {\n\t\tconsole.error(e);\n\t}\n});\n\n// view_cart event\n// https://developers.google.com/analytics/devguides/collection/ga4/ecommerce?client_type=gtag#view_cart\njQuery(document).on(\"pmw:view-cart\", () => {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.google?.analytics?.ga4?.measurement_id) return;\n\t\tif (!wpm.googleConfigConditionsMet({type: \"statistics\"})) return;\n\n\t\tif (jQuery.isEmptyObject(wpmDataLayer.cart)) return;\n\n\t\tlet products = [];\n\t\tlet cartValue = null;\n\n\t\tObject.values(wpmDataLayer.cart).forEach(product => {\n\t\t\tproducts.push(wpm.ga4GetFullProductItemData(product));\n\t\t\tcartValue = cartValue + product.quantity * product.price;\n\t\t});\n\n\t\tconst data = {\n\t\t\tsend_to : wpmDataLayer.pixels.google.analytics.ga4.measurement_id,\n\t\t\tcurrency: wpmDataLayer.shop.currency,\n\t\t\tvalue : cartValue.toFixed(2),\n\t\t\titems : products,\n\t\t};\n\n\t\twpm.gtagLoaded().then(() => {\n\t\t\tgtag(\"event\", \"view_cart\", data);\n\t\t\tpmw.console.log(\"Google Analytics: view_cart event sent\", data);\n\t\t});\n\t} catch (e) {\n\t\tconsole.error(e);\n\t}\n});\n\n// view search event\njQuery(document).on(\"pmw:search\", () => {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.google?.analytics?.ga4?.measurement_id) return;\n\t\tif (!wpm.googleConfigConditionsMet({type: \"statistics\"})) return;\n\n\t\tlet products = [];\n\n\t\tObject.values(wpmDataLayer.products).forEach(product => {\n\t\t\tproducts.push(wpm.ga4GetFullProductItemData(product));\n\t\t});\n\n\t\tconst data = {\n\t\t\tsend_to : wpmDataLayer.pixels.google.analytics.ga4.measurement_id,\n\t\t\tsearch_term: wpm.getSearchTermFromUrl(),\n\t\t\titems : products,\n\t\t};\n\n\t\twpm.gtagLoaded().then(() => {\n\t\t\tgtag(\"event\", \"view_search_results\", data);\n\t\t\tpmw.console.log(\"Google Analytics: view_search_results event sent\", data);\n\t\t});\n\n\t} catch (e) {\n\t\tconsole.error(e);\n\t}\n});\n\n// view order received page event\njQuery(document).on(\"pmw:view-order-received-page\", function () {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.google?.analytics?.ga4?.measurement_id) return;\n\n\t\t// ga4_server_and_browser_tracking experiment\n\t\t// https://app.asana.com/0/1110999795232049/1204453591507565\n\t\t// ga4e: if (wpmDataLayer?.pixels?.google?.analytics?.ga4?.mp_active) {\n\t\t// \tif (wpmDataLayer?.experiments?.ga4_server_and_browser_tracking) {\n\t\t// \t\tbreak ga4e\n\t\t// \t}\n\t\t// \treturn\n\t\t// }\n\n\t\t// Deactivated for the ga4_server_and_browser_tracking experiment\n\t\tif (wpmDataLayer?.pixels?.google?.analytics?.ga4?.mp_active) return;\n\t\tif (!wpm.googleConfigConditionsMet({type: \"statistics\"})) return;\n\n\t\tconst data = {\n\t\t\tsend_to : [wpmDataLayer.pixels.google.analytics.ga4.measurement_id],\n\t\t\ttransaction_id: wpmDataLayer.order.number,\n\t\t\taffiliation : wpmDataLayer.order.affiliation,\n\t\t\tcurrency : wpmDataLayer.order.currency,\n\t\t\tvalue : wpmDataLayer.order.value.total,\n\t\t\tdiscount : wpmDataLayer.order.discount,\n\t\t\ttax : wpmDataLayer.order.tax,\n\t\t\tshipping : wpmDataLayer.order.shipping,\n\t\t\tcoupon : wpmDataLayer.order.coupon,\n\t\t\titems : wpm.getGA4OrderItems(),\n\t\t};\n\n\t\t// Check if the order has custom parameters\n\t\tif (wpmDataLayer?.order?.custom_parameters) {\n\t\t\t// Iterate through each key-value pair in custom parameters\n\t\t\tObject.keys(wpmDataLayer.order.custom_parameters).forEach(key => {\n\t\t\t\t// Add each custom parameter to the data object\n\t\t\t\tdata[key] = wpmDataLayer.order.custom_parameters[key];\n\t\t\t});\n\t\t}\n\n\t\twpm.gtagLoaded().then(function () {\n\t\t\tgtag(\"event\", \"purchase\", data);\n\t\t\tpmw.console.log(\"Google Analytics: purchase event sent\", data);\n\t\t});\n\n\t\t// wpm.gtagLoaded().then(function () {\n\t\t// \tgtag(\"get\", wpmDataLayer.pixels.google.analytics.ga4.measurement_id, \"client_id\", (client_id) => {\n\t\t// \t\tconsole.log(\"transaction_id: \" + wpmDataLayer.order.number + \" client_id: \" + client_id)\n\t\t// \t})\n\t\t// })\n\n\t} catch (e) {\n\t\tconsole.error(e);\n\t}\n});\n","/**\n * Load GA4 functions\n * */\n\n(function (wpm, $, undefined) {\n\n\twpm.getGA4OrderItems = function () {\n\n\t\t// \"item_id\" : \"34\",\n\t\t// \"item_name\" : \"Hoodie\",\n\t\t// \"quantity\" : 1,\n\t\t// \"item_brand\" : \"\",\n\t\t// \"item_variant\" : \"Color: blue | Logo: yes\",\n\t\t// \"price\" : 45,\n\t\t// \"currency\" : \"CHF\",\n\t\t// \"item_category\": \"Hoodies\"\n\n\n\t\tlet orderItems = [];\n\n\t\tObject.values(wpmDataLayer.order.items).forEach((item) => {\n\t\t\tlet orderItem;\n\n\t\t\torderItem = {\n\t\t\t\tquantity : item.quantity,\n\t\t\t\tprice : item.price,\n\t\t\t\titem_name : item.name,\n\t\t\t\tcurrency : wpmDataLayer.order.currency,\n\t\t\t\titem_category: wpmDataLayer.products[item.id].category.join(\"/\"),\n\t\t\t};\n\n\t\t\t// Check if the item has custom parameters\n\t\t\tif (item?.custom_parameters) {\n\t\t\t\t// Iterate through each key-value pair in custom parameters\n\t\t\t\tObject.keys(item.custom_parameters).forEach((key) => {\n\t\t\t\t\t// Add each custom parameter to the orderItem object\n\t\t\t\t\torderItem[key] = item.custom_parameters[key];\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tif (0 !== item.variation_id) {\n\n\t\t\t\torderItem.item_id = String(wpmDataLayer.products[item.variation_id].dyn_r_ids[wpmDataLayer.pixels.google.analytics.id_type]);\n\t\t\t\torderItem.item_variant = wpmDataLayer.products[item.variation_id].variant_name;\n\t\t\t\torderItem.item_brand = wpmDataLayer.products[item.variation_id].brand;\n\t\t\t} else {\n\n\t\t\t\torderItem.item_id = String(wpmDataLayer.products[item.id].dyn_r_ids[wpmDataLayer.pixels.google.analytics.id_type]);\n\t\t\t\torderItem.item_brand = wpmDataLayer.products[item.id].brand;\n\t\t\t}\n\n\t\t\torderItems.push(orderItem);\n\t\t});\n\n\t\treturn orderItems;\n\t};\n\n\twpm.ga4AddFormattedCategories = (item_data, categories) => {\n\n\t\tlet maxCategories = 5;\n\n\t\t// remove categories with equal names from array\n\t\tcategories = Array.from(new Set(categories));\n\n\t\tif (Array.isArray(categories) && categories.length) {\n\n\t\t\titem_data[\"item_category\"] = categories[0];\n\n\t\t\tlet max = categories.length > maxCategories ? maxCategories : categories.length;\n\n\t\t\tfor (let i = 1; i < max; i++) {\n\t\t\t\titem_data[\"item_category\" + (i + 1)] = categories[i];\n\t\t\t}\n\t\t}\n\n\t\treturn item_data;\n\t};\n\n\twpm.getCartItemsGa4 = () => {\n\n\t\tlet data = [];\n\n\t\tObject.values(wpmDataLayer.cart).forEach(product => {\n\t\t\tdata.push(wpm.ga4GetFullProductItemData(product));\n\t\t});\n\n\t\treturn data;\n\t};\n\n\twpm.ga4GetBasicProductItemData = (product) => {\n\n\t\treturn {\n\t\t\titem_id : product.dyn_r_ids[wpmDataLayer.pixels.google.analytics.id_type],\n\t\t\titem_name: product.name,\n\t\t\t// coupon : \"\",\n\t\t\t// discount: 0,\n\t\t\t// affiliation: \"\",\n\t\t\titem_brand : product.brand,\n\t\t\titem_variant: product.variant,\n\t\t\tprice : product.price,\n\t\t\tcurrency : wpmDataLayer.shop.currency,\n\t\t\tquantity : product.quantity,\n\t\t};\n\t};\n\n\twpm.ga4AddListNameToProduct = (item_data, productPosition = null) => {\n\n\t\titem_data.item_list_name = wpmDataLayer.shop.list_name;\n\t\titem_data.item_list_id = wpmDataLayer.shop.list_id;\n\n\t\tif (productPosition) {\n\t\t\titem_data.index = productPosition;\n\t\t}\n\n\t\treturn item_data;\n\t};\n\n\twpm.ga4GetFullProductItemData = (product) => {\n\n\t\tlet item_data;\n\n\t\titem_data = wpm.ga4GetBasicProductItemData(product);\n\t\titem_data = wpm.ga4AddListNameToProduct(item_data, product.position);\n\t\titem_data = wpm.ga4AddFormattedCategories(item_data, product.category);\n\n\t\treturn item_data;\n\t};\n\n}(window.wpm = window.wpm || {}, jQuery));\n","/**\n * GA4 loader\n */\n\nrequire(\"./functions\")\nrequire(\"./event_listeners\")\n\n// #if process.env.TIER === 'premium'\n// if (wpm.canLoadPremiumFeatures()) {\n// \trequire(\"./functions_premium\")\n// \trequire(\"./event_listeners_premium\")\n// }\n// #endif\n","/**\n * Google Analytics loader\n */\n\nrequire(\"./ga4/loader\")\n","/**\n * Load Google base event listeners\n */\n\n// Pixel load event listener\njQuery(document).on(\"pmw:load-pixels\", function () {\n\n\tif (typeof wpmDataLayer?.pixels?.google?.state === \"undefined\") {\n\t\tif (wpm.googleConfigConditionsMet({log: true})) {\n\t\t\twpm.loadGoogle()\n\t\t} else {\n\t\t\twpm.consent.logSuppressedPixel(\"statistics\", \"Google Analytics / Google Ads\")\n\t\t}\n\t}\n})\n\ndocument.addEventListener(\"pmw:consent:update\", ({detail}) => {\n\n\tconst consent = detail\n\n\twpm.updateGoogleConsentMode(consent)\n}, true)\n","/**\n * Load Google base functions\n */\n\n(function (wpm, $, undefined) {\n\n\twpm.googleConfigConditionsMet = ({type = null, log = false}) => {\n\n\t\t// Always returns true if Google Consent Mode is active\n\t\tif (wpmDataLayer?.pixels?.google?.consent_mode?.is_active) {\n\t\t\tif (log) pmw.console.log(\"Google Consent Mode is active. Loading the Google pixel.\");\n\t\t\treturn true;\n\t\t}\n\n\t\t// If a type is passed, return true if the user has given consent to that type\n\t\t// or false if the user has not given consent to that type.\n\t\tif (type) {\n\t\t\tif (!!wpm.consent.categories.get()[type]) {\n\t\t\t\tif (log) pmw.console.log(\"The category \" + type + \" has been approved. Loading the Google pixel.\");\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\tif (log) pmw.console.log(\"The category \" + type + \" has been denied. Not loading the Google pixel.\");\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\t// If no type is passed, return true if the user has given consent to the statistics or marketing categories.\n\t\tif (!!(wpm.consent.categories.get().marketing || wpm.consent.categories.get().statistics)) {\n\t\t\tif (log) pmw.console.log(\"The categories statistics and/or marketing are approved. Loading the Google pixel.\");\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t};\n\n\twpm.fireGtagGoogleAds = () => {\n\t\ttry {\n\t\t\twpmDataLayer.pixels.google.ads.state = \"loading\";\n\n\t\t\tif (wpmDataLayer?.pixels?.google?.enhanced_conversions?.is_active) {\n\t\t\t\tObject.keys(wpmDataLayer.pixels.google.ads.conversion_ids).forEach((key) => {\n\t\t\t\t\tgtag(\"config\", key, {\"allow_enhanced_conversions\": true});\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tObject.keys(wpmDataLayer.pixels.google.ads.conversion_ids).forEach((key) => {\n\t\t\t\t\tgtag(\"config\", key);\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tif (wpmDataLayer?.pixels?.google?.ads?.conversion_ids && wpmDataLayer?.pixels?.google?.ads?.phone_conversion_label && wpmDataLayer?.pixels?.google?.ads?.phone_conversion_number) {\n\t\t\t\tgtag(\"config\", Object.keys(wpmDataLayer.pixels.google.ads.conversion_ids)[0] + \"/\" + wpmDataLayer.pixels.google.ads.phone_conversion_label, {\n\t\t\t\t\tphone_conversion_number: wpmDataLayer.pixels.google.ads.phone_conversion_number,\n\t\t\t\t});\n\t\t\t}\n\n\t\t\twpmDataLayer.pixels.google.ads.state = \"ready\";\n\t\t} catch (e) {\n\t\t\tconsole.error(e);\n\t\t}\n\t};\n\n\t// https://developers.google.com/tag-platform/gtagjs/reference\n\twpm.fireGtagGoogleAnalyticsGA4 = () => {\n\n\t\ttry {\n\t\t\twpmDataLayer.pixels.google.analytics.ga4.state = \"loading\";\n\n\t\t\tlet parameters = wpmDataLayer.pixels.google.analytics.ga4.parameters;\n\n\t\t\tif (wpmDataLayer?.pixels?.google?.analytics?.ga4?.debug_mode) {\n\t\t\t\tparameters.debug_mode = true;\n\t\t\t}\n\n\t\t\tgtag(\"config\", wpmDataLayer.pixels.google.analytics.ga4.measurement_id, parameters);\n\n\t\t\twpmDataLayer.pixels.google.analytics.ga4.state = \"ready\";\n\t\t} catch (e) {\n\t\t\tconsole.error(e);\n\t\t}\n\t};\n\n\t/**\n\t * Check if Google is active\n\t *\n\t * @returns {boolean}\n\t */\n\twpm.isGoogleActive = () => {\n\n\t\t// If GA4 is active, return true\n\t\tif (wpmDataLayer?.pixels?.google?.analytics?.ga4?.measurement_id) return true;\n\n\t\t// If Google Ads is active, return true\n\t\tif (!jQuery.isEmptyObject(wpmDataLayer?.pixels?.google?.ads?.conversion_ids)) return true;\n\n\t\treturn false;\n\t};\n\n\twpm.getGoogleGtagId = () => {\n\n\t\tif (wpmDataLayer?.pixels?.google?.tracking_id) {\n\t\t\treturn wpmDataLayer.pixels.google.tracking_id;\n\t\t}\n\n\t\tif (\n\t\t\twpmDataLayer?.pixels?.google?.ads?.conversion_ids\n\t\t\t&& Object.keys(wpmDataLayer.pixels.google.ads.conversion_ids)[0]\n\t\t) {\n\t\t\treturn Object.keys(wpmDataLayer.pixels.google.ads.conversion_ids)[0];\n\t\t}\n\n\t\tif (wpmDataLayer?.pixels?.google?.analytics?.ga4?.measurement_id) {\n\t\t\treturn wpmDataLayer.pixels.google.analytics.ga4.measurement_id;\n\t\t}\n\n\t\treturn \"\";\n\t};\n\n\n\twpm.loadGoogle = () => {\n\n\t\tif (!wpm.isGoogleActive()) {\n\t\t\treturn;\n\t\t}\n\n\t\twpmDataLayer.pixels.google.state = \"loading\";\n\n\t\twpm.loadScriptAndCacheIt(\"https://www.googletagmanager.com/gtag/js?id=\" + wpm.getGoogleGtagId())\n\t\t\t.then((script, textStatus) => {\n\n\t\t\t\ttry {\n\n\t\t\t\t\t// If Google TCF is active, output the TCF script\n\t\t\t\t\t// https://developers.google.com/tag-platform/security/guides/implement-TCF-strings\n\t\t\t\t\tif (wpmDataLayer?.pixels?.google?.tcf_support) {\n\t\t\t\t\t\twindow[\"gtag_enable_tcf_support\"] = true;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Initiate Google dataLayer and gtag\n\t\t\t\t\twindow.dataLayer = window.dataLayer || [];\n\n\t\t\t\t\twindow.gtag = function gtag() {\n\n\t\t\t\t\t\tpmw.console.log(\"gtag called with\", arguments);\n\t\t\t\t\t\tpmw.consent.api.processExternalGcmConsentUpdate_experimental(arguments);\n\n\t\t\t\t\t\t// Delete the source property from the arguments object\n\t\t\t\t\t\t// It is a helper property that is not needed by gtag for regular calls\n\t\t\t\t\t\tif (arguments.length === 3 && arguments[2]?.source) {\n\t\t\t\t\t\t\tdelete arguments[2].source;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tdataLayer.push(arguments);\n\t\t\t\t\t};\n\n\t\t\t\t\t// Google Consent Mode\n\t\t\t\t\tif (wpmDataLayer?.pixels?.google?.consent_mode?.is_active) {\n\n\t\t\t\t\t\tlet google_consent_settings = {\n\t\t\t\t\t\t\tad_personalization : wpm.consent.categories.get().marketing ? \"granted\" : \"denied\",\n\t\t\t\t\t\t\tad_storage : wpm.consent.categories.get().marketing ? \"granted\" : \"denied\",\n\t\t\t\t\t\t\tad_user_data : wpm.consent.categories.get().marketing ? \"granted\" : \"denied\",\n\t\t\t\t\t\t\tanalytics_storage : wpm.consent.categories.get().statistics ? \"granted\" : \"denied\",\n\t\t\t\t\t\t\tfunctionality_storage : wpm.consent.categories.get().preferences ? \"granted\" : \"denied\",\n\t\t\t\t\t\t\tpersonalization_storage: wpm.consent.categories.get().preferences ? \"granted\" : \"denied\",\n\t\t\t\t\t\t\tsecurity_storage : wpm.consent.categories.get().necessary ? \"granted\" : \"denied\",\n\t\t\t\t\t\t\twait_for_update : wpmDataLayer.pixels.google.consent_mode.wait_for_update,\n\t\t\t\t\t\t};\n\n\t\t\t\t\t\tif (wpmDataLayer?.general?.consent_management?.restricted_regions) {\n\t\t\t\t\t\t\tgoogle_consent_settings.region = wpmDataLayer.general.consent_management.restricted_regions;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tpmw.console.log(\"Google Consent Mode settings\", google_consent_settings);\n\n\t\t\t\t\t\tgtag(\"consent\", \"default\", google_consent_settings);\n\t\t\t\t\t\tgtag(\"set\", \"ads_data_redaction\", wpmDataLayer.pixels.google.consent_mode.ads_data_redaction);\n\t\t\t\t\t\tgtag(\"set\", \"url_passthrough\", wpmDataLayer.pixels.google.consent_mode.url_passthrough);\n\t\t\t\t\t}\n\n\t\t\t\t\t// Google Linker\n\t\t\t\t\t// https://developers.google.com/gtagjs/devguide/linker\n\t\t\t\t\tif (wpmDataLayer?.pixels?.google?.linker?.settings) {\n\t\t\t\t\t\tgtag(\"set\", \"linker\", wpmDataLayer.pixels.google.linker.settings);\n\t\t\t\t\t}\n\n\t\t\t\t\tgtag(\"js\", new Date());\n\t\t\t\t\tgtag(\"set\", \"developer_id.dNDI5Yz\", true);\n\n\t\t\t\t\t/**\n\t\t\t\t\t * Set Enhanced Conversion Data for Google Ads and GA4 on the order received page\n\t\t\t\t\t *\n\t\t\t\t\t * https://support.google.com/google-ads/answer/9888145#zippy=%2Cvalidate-your-implementation-using-chrome-developer-tools\n\t\t\t\t\t * GA4: https://support.google.com/analytics/answer/14171598?sjid=9970117052450433556-EU\n\t\t\t\t\t */\n\t\t\t\t\tif (\n\t\t\t\t\t\twpmDataLayer?.shop?.page_type\n\t\t\t\t\t\t&& \"order_received_page\" === wpmDataLayer.shop.page_type\n\t\t\t\t\t\t&& wpmDataLayer?.order?.google?.enhanced_conversion_data\n\t\t\t\t\t) {\n\t\t\t\t\t\tgtag(\"set\", \"user_data\", wpmDataLayer.order.google.enhanced_conversion_data);\n\t\t\t\t\t}\n\n\t\t\t\t\t// Google Ads loader\n\t\t\t\t\tif (!jQuery.isEmptyObject(wpmDataLayer?.pixels?.google?.ads?.conversion_ids)) { // Only run if the pixel has set up\n\t\t\t\t\t\tif (wpm.googleConfigConditionsMet({type: \"marketing\"})) { \t\t\t\t\t\t\t// Only run if cookie consent has been given\n\t\t\t\t\t\t\twpm.fireGtagGoogleAds();\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\twpm.consent.logSuppressedPixel(\"marketing\", \"Google Ads\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// GA4 loader\n\t\t\t\t\tif (wpmDataLayer?.pixels?.google?.analytics?.ga4?.measurement_id) { \t\t\t// Only run if the pixel has set up\n\n\t\t\t\t\t\tif (wpm.googleConfigConditionsMet({type: \"statistics\"})) {\t\t\t\t\t\t// Only run if cookie consent has been given\n\t\t\t\t\t\t\twpm.fireGtagGoogleAnalyticsGA4();\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\twpm.consent.logSuppressedPixel(\"statistics\", \"GA4\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\twpmDataLayer.pixels.google.state = \"ready\";\n\n\t\t\t\t\twpm.triggerQueuedEvents(\"gtag\");\n\n\t\t\t\t} catch (e) {\n\t\t\t\t\tconsole.error(e);\n\t\t\t\t}\n\t\t\t});\n\t};\n\n\twpm.gtagLoaded = () => {\n\t\treturn new Promise((resolve, reject) => {\n\n\t\t\tif (typeof wpmDataLayer?.pixels?.google?.state === \"undefined\") reject();\n\n\t\t\tlet startTime = 0;\n\t\t\tlet timeout = 5000;\n\t\t\tlet frequency = 200;\n\n\t\t\t(function wait() {\n\t\t\t\tif (wpmDataLayer?.pixels?.google?.state === \"ready\") return resolve();\n\t\t\t\tif (startTime >= timeout) {\n\t\t\t\t\tpmw.console.error(\"Google gtag failed to load. Probably a third party script is blocking it.\");\n\t\t\t\t\treturn reject();\n\t\t\t\t}\n\t\t\t\tstartTime += frequency;\n\t\t\t\tsetTimeout(wait, frequency);\n\t\t\t})();\n\t\t});\n\t};\n\n\t/**\n\t * Update Google Consent Mode\n\t *\n\t * @param statistics\n\t * @param marketing\n\t * @param preferences\n\t * @param necessary\n\t */\n\twpm.updateGoogleConsentMode = ({\n\t\t\t\t\t\t\t\t\t statistics = wpm.consent.categories.get().statistics,\n\t\t\t\t\t\t\t\t\t marketing = wpm.consent.categories.get().marketing,\n\t\t\t\t\t\t\t\t\t preferences = wpm.consent.categories.get().preferences,\n\t\t\t\t\t\t\t\t\t necessary = wpm.consent.categories.get().necessary,\n\t\t\t\t\t\t\t\t }) => {\n\n\t\ttry {\n\t\t\tif (!window.gtag) return;\n\n\t\t\tlet data = {\n\t\t\t\tanalytics_storage : statistics ? \"granted\" : \"denied\",\n\t\t\t\tad_storage : marketing ? \"granted\" : \"denied\",\n\t\t\t\tad_user_data : marketing ? \"granted\" : \"denied\",\n\t\t\t\tad_personalization : marketing ? \"granted\" : \"denied\",\n\t\t\t\tfunctionality_storage : preferences ? \"granted\" : \"denied\",\n\t\t\t\tpersonalization_storage: preferences ? \"granted\" : \"denied\",\n\t\t\t\tsecurity_storage : necessary ? \"granted\" : \"denied\",\n\t\t\t\tsource : \"pmw\",\n\t\t\t};\n\n\t\t\tgtag(\"consent\", \"update\", data);\n\t\t\tpmw.console.log(\"Google consent mode updated\", data);\n\t\t} catch (e) {\n\t\t\tconsole.error(e);\n\t\t}\n\t};\n\n\n}(window.wpm = window.wpm || {}, jQuery));\n","/**\n * Load Google base\n */\n\n// Load base\nrequire(\"./functions\")\nrequire(\"./event_listeners\")\n\n// #if process.env.TIER === 'premium'\n// if (wpm.canLoadPremiumFeatures()) {\n// \trequire(\"./functions_premium\")\n// \trequire(\"./event_listeners_premium\")\n// }\n// #endif\n","/**\n * Load Google\n */\n\n// Load base\nrequire(\"./base/loader\")\n\n//Load additional Google libraries\nrequire(\"./ads/loader\")\nrequire(\"./analytics/loader\")\n\n","/**\n * Load Hotjar event listeners\n */\n\n// Pixel load event listener\njQuery(document).on(\"pmw:load-pixels\", function () {\n\n\tif (wpmDataLayer?.pixels?.hotjar?.site_id && !wpmDataLayer?.pixels?.hotjar?.loaded) {\n\t\tif (wpm.consent.canPixelBeFired(\"statistics\", \"Hotjar\") && !wpmDataLayer?.pixels?.hotjar?.loaded) wpm.load_hotjar_pixel()\n\t}\n})\n","/**\n * Load Hotjar functions\n */\n\n(function (wpm, $, undefined) {\n\n\twpm.load_hotjar_pixel = function () {\n\n\t\ttry {\n\t\t\twpmDataLayer.pixels.hotjar.loaded = true;\n\n\t\t\t// @formatter:off\n\t\t\t(function(h,o,t,j,a,r){\n\t\t\t\th.hj=h.hj||function(){(h.hj.q=h.hj.q||[]).push(arguments)};\n\t\t\t\th._hjSettings={hjid:wpmDataLayer.pixels.hotjar.site_id,hjsv:6};\n\t\t\t\ta=o.getElementsByTagName('head')[0];\n\t\t\t\tr=o.createElement('script');r.async=1;\n\t\t\t\tr.src=t+h._hjSettings.hjid+j+h._hjSettings.hjsv;\n\t\t\t\ta.appendChild(r);\n\t\t\t})(window,document,'https://static.hotjar.com/c/hotjar-','.js?sv=');\n\t\t\t// @formatter:on\n\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n}(window.wpm = window.wpm || {}, jQuery));\n","/**\n * Hotjar loader\n */\n\nrequire(\"./functions\")\nrequire(\"./event_listeners\")\n","(function (wpm, $, undefined) {\n\n\tconst PMW_LIBRARY_VERSION = \"1.46.1\"\n\n\twpm.getLibraryVersion = () => {\n\t\treturn PMW_LIBRARY_VERSION\n\t}\n\n\twpm.checkLibraryVersion = () => {\n\n\t\tif (wpm.getLibraryVersion() !== wpmDataLayer?.version?.number) {\n\t\t\tconsole.error(`Pixel Manager: The library version ${wpm.getLibraryVersion()} and wpmDataLayer.version.number ${wpmDataLayer.version.number} do not match. Delete the server-side cache and try again.`)\n\t\t}\n\t}\n\n}(window.wpm = window.wpm || {}, jQuery))\n\n","// a function that removes all \\n and \\t and html tags from a string\nconst removeHtmlTagsAndWhitespace = string => {\n\n\tstring = string.replace(/<[^>]*>?/gm, \"\").replace(/\\n/gm, \"\").replace(/\\t/gm, \"\");\n\tstring = string.trim();\n\n\treturn string;\n};\n\n/**\n * add_shipping_info event\n */\n\n// trigger when #shipping_method is changed\njQuery(\"form.woocommerce-checkout\").on(\"change\", \"#shipping_method\", (event) => {\n\n\tif (!event.target?.value) return;\n\tif (!event.target?.id) return;\n\n\ttriggerAddShippingInfoEvent({\n\t\tslug: event.target.value,\n\t\ttext: removeHtmlTagsAndWhitespace(jQuery(\"label[for='\" + event.target.id + \"']\").text()),\n\t});\n});\n\n// trigger when a shipping method is already selected on page load\njQuery(() => {\n\tif (jQuery(\"#shipping_method\").length) {\n\n\t\t// get the checked shipping method from #shipping_method\n\t\tlet checkedShippingMethod = jQuery(\"#shipping_method\").find(\":checked\");\n\n\t\t// if there is a checked shipping method\n\t\tif (checkedShippingMethod.length) {\n\n\t\t\tif (!checkedShippingMethod.val()) return;\n\t\t\tif (!checkedShippingMethod.attr(\"id\")) return;\n\n\t\t\ttriggerAddShippingInfoEvent({\n\t\t\t\tslug: checkedShippingMethod.val(),\n\t\t\t\ttext: removeHtmlTagsAndWhitespace(jQuery(\"label[for='\" + checkedShippingMethod.attr(\"id\") + \"']\").text()),\n\t\t\t});\n\t\t}\n\t}\n});\n\n// trigger when a shipping method is selected on page load\nconst triggerAddShippingInfoEvent = shippingTier => {\n\tjQuery(document).trigger(\"pmw:add-shipping-info\", {shippingTier});\n};\n\n/**\n * add_payment_info event\n */\n\n// flag to prevent double logging of payment method change on pageload\nlet paymentMethodChangeLogged = false;\n\n// trigger when a payment method is selected\njQuery(\"form.woocommerce-checkout\").on(\"change\", \"input[name=\\\"payment_method\\\"]\", event => {\n\n\tif (!event.target.value) return;\n\tif (!event.target.id) return;\n\n\ttriggerAddPaymentInfoEvent({\n\t\tslug: event.target.value,\n\t\ttext: removeHtmlTagsAndWhitespace(jQuery(\"label[for='\" + event.target.id + \"']\").text()),\n\t});\n\n\tpaymentMethodChangeLogged = true;\n});\n\n// trigger when a payment method is already selected on page load\njQuery(() => {\n\n\t// prevent double logging of payment method change on pageload\n\tif (paymentMethodChangeLogged) return;\n\n\tlet checkedPaymentMethod = jQuery(\"input[name=\\\"payment_method\\\"]:checked\");\n\n\tif (checkedPaymentMethod.length) {\n\n\t\tif (!checkedPaymentMethod.val()) return;\n\t\tif (!checkedPaymentMethod.attr(\"id\")) return;\n\n\t\ttriggerAddPaymentInfoEvent({\n\t\t\tslug: checkedPaymentMethod.val(),\n\t\t\ttext: removeHtmlTagsAndWhitespace(jQuery(\"label[for='\" + checkedPaymentMethod.attr(\"id\") + \"']\").text()),\n\t\t});\n\t}\n});\n\n// trigger when a payment method is selected on page load\nconst triggerAddPaymentInfoEvent = paymentType => {\n\tjQuery(document).trigger(\"pmw:add-payment-info\", {paymentType});\n};\n\n/**\n * remove_from_cart event\n *\n * Cannot be attached directly because the mini cart doesn't necessarily contain the remove button on page load.\n */\njQuery(document).on(\"click\", \".remove_from_cart_button, .remove\", (event) => {\n\n\t// console.log(\"remove_from_cart event\" + new Date().getTime())\n\n\ttry {\n\n\t\tlet url = new URL(jQuery(event.currentTarget).attr(\"href\"));\n\t\tlet productId = wpm.getProductIdByCartItemKeyUrl(url);\n\n\t\twpm.removeProductFromCart(productId);\n\n\t} catch (e) {\n\t\tconsole.error(e);\n\t}\n});\n\n\n/**\n * begin_checkout event\n *\n * Cannot be attached directly because the mini cart doesn't necessarily contain the remove button on page load.\n */\nlet checkoutButtonClasses = [\n\t// \".checkout\", // this is too generic. It triggers on the checkout page on some themes fore each interaction with the checkout form.\n\t\".checkout-button\",\n\t\".cart-checkout-button\",\n\t\".button.checkout\",\n\t\".xoo-wsc-ft-btn-checkout\", // https://xootix.com/side-cart-for-woocommerce/\n\t\".elementor-button--checkout\",\n\t\".xt_woofc-checkout\", // https://wordpress.org/plugins/woo-floating-cart-lite/\n\t\".fkcart-checkout--text\", // https://funnelkit.com/\n];\n\nconst checkoutButtonSelectors = wpm.prepareSelectors(checkoutButtonClasses, \"beginCheckout\");\n\n// https://wordpress.stackexchange.com/a/352171/68337\njQuery(document).on(\"click init_checkout\", checkoutButtonSelectors, () => {\n\tjQuery(document).trigger(\"pmw:begin-checkout\");\n});\n\njQuery(document).on(\"updated_cart_totals\", () => {\n\tjQuery(document).trigger(\"pmw:view-cart\");\n});\n\n/**\n * Set up PWM events\n */\n\n// track checkout option event: purchase click\n// https://wordpress.stackexchange.com/a/352171/68337\njQuery(document).on(\"wpmLoad\", (event) => {\n\tjQuery(document).on(\"payment_method_selected\", () => {\n\n\t\tif (false === wpm.paymentMethodSelected) {\n\t\t\twpm.fireCheckoutProgress(3);\n\t\t}\n\n\t\twpm.fireCheckoutOption(3, jQuery(\"input[name='payment_method']:checked\").val());\n\t\twpm.paymentMethodSelected = true;\n\t});\n});\n\n// populate the wpmDataLayer with the cart items\njQuery(document).on(\"wpmLoad\", () => {\n\n\ttry {\n\t\twpm.initCart();\n\t} catch (e) {\n\t\tconsole.error(e);\n\t}\n});\n\n// get all add-to-cart= products from backend\njQuery(document).on(\"wpmLoad\", () => {\n\n\twpmDataLayer.products = wpmDataLayer.products || {};\n\n\t// scan page for add-to-cart= links\n\tlet productIds = wpm.getAddToCartLinkProductIds();\n\n\twpm.getProductsFromBackend(productIds);\n});\n\n/**\n * Save the referrer into a cookie\n *\n * @returns {void}\n */\njQuery(document).on(\"wpmLoad\", () => {\n\n\t// If there is no referrer, then return\n\tif (!document.referrer) {\n\t\treturn;\n\t}\n\n\t// If the referrer is already stored, then return\n\tif (wpm.retrieveData(\"referrer\")) {\n\t\treturn;\n\t}\n\n\tlet referrerUrl = new URL(document.referrer);\n\tlet referrerHostname = referrerUrl.hostname;\n\n\tif (referrerHostname !== window.location.host) {\n\t\twpm.storeData(\"referrer\", referrerHostname);\n\t}\n});\n\n/**\n * Collect parameters from the URL\n * and save them to the PMW session storage.\n * Parameters:\n * - gclid\n * - wbraid\n * - gbraid\n * - fbclid\n * - ttclid\n * - ScCid\n * - epik\n *\n * @returns {void}\n * */\njQuery(document).on(\"wpmLoad\", () => {\n\n\tlet gclid = wpm.getUrlParameter(\"gclid\");\n\tif (gclid) wpm.storeData(\"gclid\", gclid);\n\n\tlet wbraid = wpm.getUrlParameter(\"wbraid\");\n\tif (wbraid) wpm.storeData(\"wbraid\", wbraid);\n\n\tlet gbraid = wpm.getUrlParameter(\"gbraid\");\n\tif (gbraid) wpm.storeData(\"gbraid\", gbraid);\n\n\t// https://developers.facebook.com/docs/marketing-api/conversions-api/parameters/fbp-and-fbc\n\tlet fbclid = wpm.getUrlParameter(\"fbclid\");\n\tif (fbclid) {\n\t\tfbclid = \"fb.1.\" + Math.floor(Date.now() / 1000) + \".\" + fbclid;\n\t\twpm.storeData(\"fbclid\", fbclid);\n\t}\n\n\tlet ttclid = wpm.getUrlParameter(\"ttclid\");\n\tif (ttclid) wpm.storeData(\"ttclid\", ttclid);\n\n\tlet scid = wpm.getUrlParameter(\"ScCid\");\n\tif (scid) wpm.storeData(\"scid\", scid);\n\n\tlet epik = wpm.getUrlParameter(\"epik\");\n\tif (epik) wpm.storeData(\"epik\", epik);\n});\n\n/**\n * Create our own load event in order to better handle script flow execution when JS \"optimizers\" shuffle the code.\n */\njQuery(document).on(\"wpmLoad\", () => {\n\t// document.addEventListener(\"wpmLoad\", function () {\n\ttry {\n\t\tif (typeof wpmDataLayer != \"undefined\" && !wpmDataLayer?.pmw_loaded) {\n\n\t\t\tjQuery(document).trigger(\"pmw:load-always\");\n\n\t\t\tif (wpmDataLayer?.shop) {\n\t\t\t\tif (\n\t\t\t\t\t\"product\" === wpmDataLayer.shop.page_type &&\n\t\t\t\t\t\"variable\" !== wpmDataLayer.shop.product_type &&\n\t\t\t\t\twpm.getMainProductIdFromProductPage()\n\t\t\t\t) {\n\t\t\t\t\tlet product = wpm.getProductDataForViewItemEvent(wpm.getMainProductIdFromProductPage());\n\t\t\t\t\tjQuery(document).trigger(\"pmw:view-item\", product);\n\t\t\t\t} else if (\"product_category\" === wpmDataLayer.shop.page_type) {\n\t\t\t\t\tjQuery(document).trigger(\"pmw:view-category\");\n\t\t\t\t} else if (\"search\" === wpmDataLayer.shop.page_type) {\n\t\t\t\t\tjQuery(document).trigger(\"pmw:search\");\n\t\t\t\t} else if (\"cart\" === wpmDataLayer.shop.page_type) {\n\t\t\t\t\tjQuery(document).trigger(\"pmw:view-cart\");\n\t\t\t\t} else if (\"order_received_page\" === wpmDataLayer.shop.page_type) {\n\t\t\t\t\tif (wpmDataLayer?.order && !wpm.isOrderIdStored(wpmDataLayer.order.id)) {\n\t\t\t\t\t\tjQuery(document).trigger(\"pmw:view-order-received-page\");\n\t\t\t\t\t\twpm.writeOrderIdToStorage(wpmDataLayer.order.id, wpmDataLayer.order.key);\n\t\t\t\t\t\tif (typeof wpm.acrRemoveCookie === \"function\") wpm.acrRemoveCookie();\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tjQuery(document).trigger(\"pmw:everywhere-else\");\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tjQuery(document).trigger(\"pmw:everywhere-else\");\n\t\t\t}\n\n\t\t\tif (wpmDataLayer?.user?.id && !wpm.hasLoginEventFired()) {\n\t\t\t\tjQuery(document).trigger(\"pmw:login\");\n\t\t\t\twpm.setLoginEventFired();\n\t\t\t}\n\n\t\t\twpmDataLayer.pmw_loaded = true;\n\t\t}\n\n\t} catch (e) {\n\t\tconsole.error(e);\n\t}\n});\n\n/**\n * Check if a variation is selected on a variable product page\n * and trigger the view-item event if a variation is selected\n *\n * Fallback for the jQuery(\".single_variation_wrap\").on(\"show_variation\", (event, variation) => {}) event listener\n * in case lazy loading is enabled and the event listener is not triggered.\n */\njQuery(document).on(\"wpmLoad\", () => {\n\n\t// Abort if lazy loading is disabled\n\tif(!wpmDataLayer?.general?.lazy_load_pmw) return;\n\n\t// Abort if we are not on a product page\n\t// if (!wpmDataLayer?.shop?.page_type || \"product\" !== wpmDataLayer.shop.page_type) return;\n\n\t// Abort if we are not on a variable product page\n\t// if (\"variable\" !== wpmDataLayer.shop.product_type) return;\n\n\ttry {\n\n\t\tvar $variationForm = jQuery(\".variations_form\");\n\n\t\t// Abort if there is no variation form\n\t\tif ($variationForm.length === 0) return;\n\n\t\t// Define the checkVariations function\n\t\tconst checkVariations = () => {\n\n\t\t\tlet allSelected = true;\n\t\t\tlet selectedValues = {};\n\n\t\t\t// Check if all selects have a selected value\n\t\t\t$selects.each((_, element) => {\n\t\t\t\tconst selectedValue = jQuery(element).val();\n\t\t\t\tconst attributeName = jQuery(element).attr(\"name\");\n\t\t\t\tif (!selectedValue) {\n\t\t\t\t\tallSelected = false;\n\t\t\t\t} else {\n\t\t\t\t\tselectedValues[attributeName] = selectedValue;\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tif (allSelected) {\n\t\t\t\t// Get product variations from the data-product_variations attribute\n\t\t\t\tconst productVariations = $variationForm.data(\"product_variations\");\n\n\t\t\t\t// Abort if there are no product variations\n\t\t\t\tif (!productVariations) return;\n\n\t\t\t\t// Find the matching variation\n\t\t\t\tconst matchingVariation = productVariations.find(variation =>\n\t\t\t\t\tObject.keys(selectedValues).every(attribute =>\n\t\t\t\t\t\tvariation.attributes[attribute] === selectedValues[attribute],\n\t\t\t\t\t),\n\t\t\t\t);\n\n\t\t\t\t// If a matching variation is found, log its ID\n\t\t\t\tif (matchingVariation) {\n\t\t\t\t\twpm.triggerViewItemEventPrep(matchingVariation.variation_id);\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\t// Collect all the selects\n\t\tlet $selects = $variationForm.find(\"select\");\n\n\t\t// Listen for changes on the selects\n\t\t$selects.on(\"change\", checkVariations);\n\n\t\t// Check if a variation is already selected on page load\n\t\tcheckVariations();\n\n\t} catch (e) {\n\t\tpmw.console.error(e);\n\t}\n});\n\n// Check if the REST endpoint is available and log an error if it is not\njQuery(document).on(\"wpmLoad\", async () => {\n\tif (wpm.retrieveData(\"restEndpointAvailable\") === false) pmw.console.error(\"REST endpoint is not available. Using admin-ajax.php instead.\");\n});\n\n/**\n * All s2s events\n */\n\n/**\n * Add to cart event\n */\njQuery(document).on(\"pmw:add-to-cart\", (event, product) => {\n\n\tpmw.console.log(\"pmw:add-to-cart event fired\", {event, product});\n\n\t/**\n\t * Prepare the payload\n\t */\n\n\tlet payload = {\n\t\tevent : \"add_to_cart\",\n\t\tproduct: product,\n\t};\n\n\t// Facebook\n\t// If Facebook pixel is loaded, add Facebook server to server event data to the payload\n\tif (wpmDataLayer?.pixels?.facebook?.loaded) {\n\t\tpayload.facebook = {\n\t\t\tevent_name : \"AddToCart\",\n\t\t\tevent_id : wpm.getFbRandomEventId(),\n\t\t\tuser_data : wpm.getFbUserData(),\n\t\t\tevent_source_url: window.location.href,\n\t\t\tcustom_data : wpm.fbGetProductDataForCapiEvent(product),\n\t\t};\n\n\t\tif (wpm.retrieveData(\"referrer\")) {\n\t\t\tpayload.facebook.referrer_url = wpm.makeFullUrl(wpm.retrieveData(\"referrer\"));\n\t\t}\n\t}\n\n\t// Pinterest\n\t// https://developers.pinterest.com/docs/conversions/best/\n\t// https://developers.pinterest.com/docs/api/v5/#operation/events/create\n\t// https://developers.pinterest.com/docs/conversions/event/\n\tif (wpmDataLayer?.pixels?.pinterest?.loaded) {\n\n\t\tpayload.pinterest = wpm.getPinterestS2SBaseData();\n\n\t\tpayload.pinterest.event_name = \"addtocart\";\n\t\tpayload.pinterest.custom_data = wpm.pinterestGetProductDataForCapiEvent(product);\n\t}\n\n\t// TikTok\n\t// https://ads.tiktok.com/gateway/docs/index?identify_key=c0138ffadd90a955c1f0670a56fe348d1d40680b3c89461e09f78ed26785164b&language=ENGLISH&doc_id=1739585702922241#item-link-Adding%20parameters%20to%20event%20code\n\t// TODO: add content_category to product data\n\t// TODO: add brand to product data\n\tif (wpmDataLayer?.pixels?.tiktok?.loaded) {\n\t\tpayload.tiktok = {\n\t\t\tevent : \"AddToCart\",\n\t\t\tevent_id : wpm.getRandomEventId(),\n\t\t\tuser : wpm.tiktokGetEventUserData(),\n\t\t\tpage : wpm.tiktokGetEventPageData(),\n\t\t\tproperties: {\n\t\t\t\tvalue : product.price * product.quantity,\n\t\t\t\tcurrency : product.currency,\n\t\t\t\tcontent_type: \"product\",\n\t\t\t\tcontents : [{\n\t\t\t\t\tcontent_id : wpm.getProductIdForSpecificPixel(product, \"tiktok\"),\n\t\t\t\t\tcontent_name: product.name,\n\t\t\t\t\tquantity : product.quantity,\n\t\t\t\t\tprice : product.price,\n\t\t\t\t}],\n\t\t\t},\n\t\t};\n\t}\n\n\t// Snapchat\n\t// https://docs.snap.com/api/marketing-api/Conversions-API/Parameters\n\t// https://businesshelp.snapchat.com/s/article/pixel-direct-implementation\n\tif (wpmDataLayer?.pixels?.snapchat?.loaded) {\n\t\tpayload.snapchat = wpm.getSnapchatS2SBaseData();\n\t\tpayload.snapchat.event_name = \"ADD_CART\";\n\t\tpayload.snapchat.custom_data = wpm.getSnapchatCustomDataForProduct(product);\n\t}\n\n\t/**\n\t * Process the client-to-server event\n\t */\n\n\tjQuery(document).trigger(\"pmw:s2s:add-to-cart\", payload);\n\n\t/**\n\t * Process the server-to-server event\n\t */\n\n\twpm.sendEventPayloadToServer(payload);\n});\n\n/**\n * Begin checkout event\n */\njQuery(document).on(\"pmw:begin-checkout\", (event) => {\n\n\tpmw.console.log(\"pmw:begin-checkout event fired\", {event});\n\n\t/**\n\t * Prepare the payload\n\t */\n\n\tlet payload = {\n\t\tevent: \"begin_checkout\",\n\t};\n\n\t// Facebook\n\tif (wpmDataLayer?.pixels?.facebook?.loaded) {\n\t\tpayload.facebook = {\n\t\t\tevent_name : \"InitiateCheckout\",\n\t\t\tevent_id : wpm.getFbRandomEventId(),\n\t\t\tuser_data : wpm.getFbUserData(),\n\t\t\tevent_source_url: window.location.href,\n\t\t\tcustom_data : {},\n\t\t};\n\n\t\tif (wpm.retrieveData(\"referrer\")) {\n\t\t\tpayload.facebook.referrer_url = wpm.makeFullUrl(wpm.retrieveData(\"referrer\"));\n\t\t}\n\n\t\tif (wpmDataLayer?.cart && !jQuery.isEmptyObject(wpmDataLayer.cart)) {\n\t\t\tpayload.facebook.custom_data = {\n\t\t\t\tcontent_type: \"product\",\n\t\t\t\tcontent_ids : wpm.fbGetContentIdsFromCart(),\n\t\t\t\tvalue : wpm.getCartValue(),\n\t\t\t\tcurrency : wpmDataLayer.shop.currency,\n\t\t\t};\n\t\t}\n\t}\n\n\t// TikTok\n\tif (wpmDataLayer?.pixels?.tiktok?.loaded) {\n\t\tpayload.tiktok = {\n\t\t\tevent : \"InitiateCheckout\",\n\t\t\tevent_id : wpm.getRandomEventId(),\n\t\t\tuser : wpm.tiktokGetEventUserData(),\n\t\t\tpage : wpm.tiktokGetEventPageData(),\n\t\t\tproperties: wpm.tiktokGetPropertiesFromCart(),\n\t\t};\n\t}\n\n\t// Snapchat\n\t// https://docs.snap.com/api/marketing-api/Conversions-API/Parameters\n\tif (wpmDataLayer?.pixels?.snapchat?.loaded) {\n\t\tpayload.snapchat = wpm.getSnapchatS2SBaseData();\n\t\tpayload.snapchat.event_name = \"START_CHECKOUT\";\n\t}\n\n\t/**\n\t * Process the client-to-server event\n\t */\n\n\tjQuery(document).trigger(\"pmw:s2s:begin-checkout\", payload);\n\n\t/**\n\t * Process the server-to-server event\n\t */\n\n\twpm.sendEventPayloadToServer(payload);\n});\n\n/**\n * Add Payment Info\n */\njQuery(document).on(\"pmw:add-payment-info\", (event) => {\n\n\tpmw.console.log(\"pmw:add-payment-info event fired\", {event});\n\n\t/**\n\t * Prepare the payload\n\t */\n\n\tlet payload = {\n\t\tevent: \"add_payment_info\",\n\t};\n\n\t// Facebook\n\tif (wpmDataLayer?.pixels?.facebook?.loaded) {\n\t\tpayload.facebook = {\n\t\t\tevent_name : \"AddPaymentInfo\",\n\t\t\tevent_id : wpm.getFbRandomEventId(),\n\t\t\tuser_data : wpm.getFbUserData(),\n\t\t\tevent_source_url: window.location.href,\n\t\t\tcustom_data : {},\n\t\t};\n\n\t\tif (wpm.retrieveData(\"referrer\")) {\n\t\t\tpayload.facebook.referrer_url = wpm.makeFullUrl(wpm.retrieveData(\"referrer\"));\n\t\t}\n\t}\n\n\t// TikTok\n\tif (wpmDataLayer?.pixels?.tiktok?.loaded) {\n\t\tpayload.tiktok = {\n\t\t\tevent : \"AddPaymentInfo\",\n\t\t\tevent_id: wpm.getRandomEventId(),\n\t\t\tuser : wpm.tiktokGetEventUserData(),\n\t\t\tpage : wpm.tiktokGetEventPageData(),\n\t\t};\n\t}\n\n\t/**\n\t * Process the client-to-server event\n\t */\n\n\tjQuery(document).trigger(\"pmw:s2s:add-payment-info\", payload);\n\n\t/**\n\t * Process the server-to-server event\n\t */\n\n\twpm.sendEventPayloadToServer(payload);\n});\n\n/**\n * Add to wishlist event\n */\njQuery(document).on(\"pmw:add-to-wishlist\", (event, product) => {\n\n\tpmw.console.log(\"pmw:add-to-wishlist event fired\", {event, product});\n\n\t/**\n\t * Prepare the payload\n\t */\n\n\tlet payload = {\n\t\tevent : \"add_to_wishlist\",\n\t\tproduct: product,\n\t};\n\n\t// Facebook\n\tif (wpmDataLayer?.pixels?.facebook?.loaded) {\n\t\tpayload.facebook = {\n\t\t\tevent_name : \"AddToWishlist\",\n\t\t\tevent_id : wpm.getFbRandomEventId(),\n\t\t\tuser_data : wpm.getFbUserData(),\n\t\t\tevent_source_url: window.location.href,\n\t\t\tcustom_data : wpm.fbGetProductDataForCapiEvent(product),\n\t\t};\n\n\t\tif (wpm.retrieveData(\"referrer\")) {\n\t\t\tpayload.facebook.referrer_url = wpm.makeFullUrl(wpm.retrieveData(\"referrer\"));\n\t\t}\n\t}\n\n\t// TikTok\n\tif (wpmDataLayer?.pixels?.tiktok?.loaded) {\n\t\tpayload.tiktok = {\n\t\t\tevent : \"AddToWishlist\",\n\t\t\tevent_id : wpm.getRandomEventId(),\n\t\t\tuser : wpm.tiktokGetEventUserData(),\n\t\t\tpage : wpm.tiktokGetEventPageData(),\n\t\t\tproperties: {\n\t\t\t\tvalue : product.price * product.quantity,\n\t\t\t\tcurrency : product.currency,\n\t\t\t\tcontent_type: \"product\",\n\t\t\t\tcontents : [{\n\t\t\t\t\tcontent_id : wpm.getProductIdForSpecificPixel(product, \"tiktok\"),\n\t\t\t\t\tcontent_name: product.name,\n\t\t\t\t\tquantity : product.quantity,\n\t\t\t\t\tprice : product.price,\n\t\t\t\t}],\n\t\t\t},\n\t\t};\n\t}\n\n\t// Snapchat\n\t// https://docs.snap.com/api/marketing-api/Conversions-API/Parameters\n\t// https://businesshelp.snapchat.com/s/article/pixel-direct-implementation\n\tif (wpmDataLayer?.pixels?.snapchat?.loaded) {\n\t\tpayload.snapchat = wpm.getSnapchatS2SBaseData();\n\t\tpayload.snapchat.event_name = \"ADD_TO_WISHLIST\";\n\t\tpayload.snapchat.custom_data = wpm.getSnapchatCustomDataForProduct(product);\n\t}\n\n\t/**\n\t * Process the client-to-server event\n\t */\n\n\tjQuery(document).trigger(\"pmw:s2s:add-to-wishlist\", payload);\n\n\t/**\n\t * Process the server-to-server event\n\t */\n\n\twpm.sendEventPayloadToServer(payload);\n});\n\n/**\n * View Item event\n */\njQuery(document).on(\"pmw:view-item\", (event, product = null) => {\n\n\tpmw.console.log(\"pmw:view-item event fired\", {event, product});\n\n\t/**\n\t * Prepare the payload\n\t */\n\n\tlet payload = {\n\t\tevent : \"view_item\",\n\t\tproduct: product,\n\t};\n\n\t// Facebook\n\tif (wpmDataLayer?.pixels?.facebook?.loaded) {\n\t\tpayload.facebook = {\n\t\t\tevent_name : \"ViewContent\",\n\t\t\tevent_id : wpm.getFbRandomEventId(),\n\t\t\tuser_data : wpm.getFbUserData(),\n\t\t\tevent_source_url: window.location.href,\n\t\t\tcustom_data : {},\n\t\t};\n\n\t\tif (wpm.retrieveData(\"referrer\")) {\n\t\t\tpayload.facebook.referrer_url = wpm.makeFullUrl(wpm.retrieveData(\"referrer\"));\n\t\t}\n\n\t\tif (product) {\n\t\t\tpayload.facebook.custom_data = wpm.fbGetProductDataForCapiEvent(product);\n\t\t}\n\t}\n\n\t// Pinterest\n\t// https://developers.pinterest.com/docs/conversions/best/\n\t// https://developers.pinterest.com/docs/api/v5/#operation/events/create\n\t// https://developers.pinterest.com/docs/conversions/event/\n\tif (wpmDataLayer?.pixels?.pinterest?.loaded) {\n\n\t\tpayload.pinterest = wpm.getPinterestS2SBaseData();\n\n\t\tpayload.pinterest.event_name = \"pagevisit\";\n\n\t\tif (product) {\n\t\t\tpayload.pinterest.custom_data = wpm.pinterestGetProductDataForCapiEvent(product);\n\t\t}\n\t}\n\n\t// TikTok\n\tif (wpmDataLayer?.pixels?.tiktok?.loaded) {\n\t\tpayload.tiktok = {\n\t\t\tevent : \"ViewContent\",\n\t\t\tevent_id: wpm.getRandomEventId(),\n\t\t\tuser : wpm.tiktokGetEventUserData(),\n\t\t\tpage : wpm.tiktokGetEventPageData(),\n\t\t};\n\n\t\tif (product) {\n\t\t\tpayload.tiktok.properties = {\n\t\t\t\tvalue : product.price * product.quantity,\n\t\t\t\tcurrency : product.currency,\n\t\t\t\tcontent_type: \"product\",\n\t\t\t\tcontents : [{\n\t\t\t\t\tcontent_id : wpm.getProductIdForSpecificPixel(product, \"tiktok\"),\n\t\t\t\t\tcontent_name: product.name,\n\t\t\t\t\tquantity : product.quantity,\n\t\t\t\t\tprice : product.price,\n\t\t\t\t}],\n\t\t\t};\n\t\t}\n\t}\n\n\t// Snapchat\n\t// https://docs.snap.com/api/marketing-api/Conversions-API/Parameters\n\t// https://businesshelp.snapchat.com/s/article/pixel-direct-implementation\n\tif (wpmDataLayer?.pixels?.snapchat?.loaded) {\n\t\tpayload.snapchat = wpm.getSnapchatS2SBaseData();\n\t\tpayload.snapchat.event_name = \"VIEW_CONTENT\";\n\n\t\tif (product) {\n\t\t\tpayload.snapchat.custom_data = wpm.getSnapchatCustomDataForProduct(product);\n\t\t}\n\t}\n\n\t/**\n\t * Process the client-to-server event\n\t */\n\n\tjQuery(document).trigger(\"pmw:s2s:view-item\", payload);\n\n\t/**\n\t * Process the server-to-server event\n\t */\n\n\twpm.sendEventPayloadToServer(payload);\n});\n\n/**\n * View category event\n */\njQuery(document).on(\"pmw:view-category\", (event, product = null) => {\n\n\tpmw.console.log(\"pmw:view-category event fired\", {event, product});\n\n\t/**\n\t * Prepare the payload\n\t */\n\n\tlet payload = {\n\t\tevent: \"view_category\",\n\t};\n\n\t// Pinterest\n\t// https://developers.pinterest.com/docs/conversions/best/\n\t// https://developers.pinterest.com/docs/api/v5/#operation/events/create\n\t// https://developers.pinterest.com/docs/conversions/event/\n\tif (wpmDataLayer?.pixels?.pinterest?.loaded) {\n\n\t\tpayload.pinterest = wpm.getPinterestS2SBaseData();\n\n\t\tpayload.pinterest.event_name = \"viewcategory\";\n\t}\n\n\t/**\n\t * Process the client-to-server event\n\t */\n\n\tjQuery(document).trigger(\"pmw:s2s:view-category\", payload);\n\n\t/**\n\t * Process the server-to-server event\n\t */\n\n\twpm.sendEventPayloadToServer(payload);\n});\n\n/**\n * Search event\n */\njQuery(document).on(\"pmw:search\", (event) => {\n\n\tpmw.console.log(\"pmw:search event fired\", {event});\n\n\t/**\n\t * Prepare the payload\n\t */\n\n\tlet payload = {\n\t\tevent: \"search\",\n\t};\n\n\t// Facebook\n\tif (wpmDataLayer?.pixels?.facebook?.loaded) {\n\t\tpayload.facebook = {\n\t\t\tevent_name : \"Search\",\n\t\t\tevent_id : wpm.getFbRandomEventId(),\n\t\t\tuser_data : wpm.getFbUserData(),\n\t\t\tevent_source_url: window.location.href,\n\t\t\tcustom_data : {\n\t\t\t\tsearch_string: wpm.getSearchTermFromUrl(),\n\t\t\t},\n\t\t};\n\n\t\tif (wpm.retrieveData(\"referrer\")) {\n\t\t\tpayload.facebook.referrer_url = wpm.makeFullUrl(wpm.retrieveData(\"referrer\"));\n\t\t}\n\t}\n\n\t// Pinterest\n\t// https://developers.pinterest.com/docs/conversions/best/\n\t// https://developers.pinterest.com/docs/api/v5/#operation/events/create\n\t// https://developers.pinterest.com/docs/conversions/event/\n\tif (wpmDataLayer?.pixels?.pinterest?.loaded) {\n\n\t\tpayload.pinterest = wpm.getPinterestS2SBaseData();\n\n\t\tpayload.pinterest.event_name = \"search\";\n\t\tpayload.pinterest.custom_data = {\n\t\t\tsearch_string: wpm.getSearchTermFromUrl(),\n\t\t};\n\t}\n\n\t// TikTok\n\tif (wpmDataLayer?.pixels?.tiktok?.loaded) {\n\t\tpayload.tiktok = {\n\t\t\tevent : \"Search\",\n\t\t\tevent_id : wpm.getRandomEventId(),\n\t\t\tuser : wpm.tiktokGetEventUserData(),\n\t\t\tpage : wpm.tiktokGetEventPageData(),\n\t\t\tproperties: {\n\t\t\t\tquery: wpm.getSearchTermFromUrl(),\n\t\t\t},\n\t\t};\n\t}\n\n\t// Snapchat\n\t// https://docs.snap.com/api/marketing-api/Conversions-API/Parameters\n\t// https://businesshelp.snapchat.com/s/article/pixel-direct-implementation\n\tif (wpmDataLayer?.pixels?.snapchat?.loaded) {\n\t\tpayload.snapchat = wpm.getSnapchatS2SBaseData();\n\t\tpayload.snapchat.event_name = \"SEARCH\";\n\t\tpayload.snapchat.custom_data = {\n\t\t\tsearch_string: wpm.getSearchTermFromUrl(),\n\t\t};\n\t}\n\n\t/**\n\t * Process the client-to-server event\n\t */\n\n\tjQuery(document).trigger(\"pmw:s2s:search\", payload);\n\n\t/**\n\t * Process the server-to-server event\n\t */\n\n\twpm.sendEventPayloadToServer(payload);\n});\n\n/**\n * Place order event\n */\njQuery(document).on(\"pmw:place-order\", (event) => {\n\n\tpmw.console.log(\"pmw:place-order event fired\", {event});\n\n\t/**\n\t * Prepare the payload\n\t */\n\n\tlet payload = {\n\t\tevent: \"place_order\",\n\t};\n\n\t// TikTok\n\tif (wpmDataLayer?.pixels?.tiktok?.loaded) {\n\t\tpayload.tiktok = {\n\t\t\tevent : \"PlaceAnOrder\",\n\t\t\tevent_id : wpm.getRandomEventId(),\n\t\t\tuser : wpm.tiktokGetEventUserData(),\n\t\t\tpage : wpm.tiktokGetEventPageData(),\n\t\t\tproperties: wpm.tiktokGetPropertiesFromCart(),\n\t\t};\n\t}\n\n\t/**\n\t * Process the client-to-server event\n\t */\n\n\tjQuery(document).trigger(\"pmw:s2s:place-order\", payload);\n\n\t/**\n\t * Process the server-to-server event\n\t */\n\n\twpm.sendEventPayloadToServer(payload);\n});\n\n/**\n * Order received event\n */\njQuery(document).on(\"pmw:view-order-received-page\", (event) => {\n\n\tpmw.console.log(\"pmw:view-order-received-page event fired\", {event});\n\n\t/**\n\t * Prepare the payload\n\t */\n\n\tlet payload = {\n\t\tevent: \"order_received\",\n\t};\n\n\t// Facebook\n\tif (wpmDataLayer?.pixels?.facebook?.loaded) {\n\t\tpayload.facebook = {\n\t\t\tevent_name : \"Purchase\",\n\t\t\tevent_id : wpmDataLayer.order.id.toString(),\n\t\t\tuser_data : wpm.getFbUserData(),\n\t\t\tevent_source_url: window.location.href,\n\t\t\tcustom_data : {\n\t\t\t\tcontent_type: \"product\",\n\t\t\t\tvalue : wpmDataLayer.order.value.marketing,\n\t\t\t\tcurrency : wpmDataLayer.order.currency,\n\t\t\t\tcontent_ids : wpm.facebookContentIds(),\n\t\t\t},\n\t\t};\n\n\t\tif (wpm.retrieveData(\"referrer\")) {\n\t\t\tpayload.facebook.referrer_url = wpm.makeFullUrl(wpm.retrieveData(\"referrer\"));\n\t\t}\n\t}\n\n\t// Pinterest\n\t// https://developers.pinterest.com/docs/conversions/best/\n\t// https://developers.pinterest.com/docs/api/v5/#operation/events/create\n\t// https://developers.pinterest.com/docs/conversions/event/\n\tif (wpmDataLayer?.pixels?.pinterest?.loaded) {\n\n\t\tpayload.pinterest = wpm.getPinterestS2SBaseData();\n\n\t\tpayload.pinterest.event_name = \"checkout\";\n\t}\n\n\t// TikTok\n\t// https://ads.tiktok.com/help/article/standard-events-parameters\n\tif (wpmDataLayer?.pixels?.tiktok?.loaded) {\n\t\tpayload.tiktok = {\n\t\t\tevent : \"CompletePayment\",\n\t\t\tevent_id : wpmDataLayer.order.id.toString(),\n\t\t\tuser : wpm.tiktokGetEventUserData(),\n\t\t\tpage : wpm.tiktokGetEventPageData(),\n\t\t\tproperties: {\n\t\t\t\tvalue : wpmDataLayer.order.value.marketing,\n\t\t\t\tcurrency : wpmDataLayer.order.currency,\n\t\t\t\tcontent_type: \"product\",\n\t\t\t\tcontents : wpm.getTikTokOrderItemIds(),\n\t\t\t},\n\t\t};\n\t}\n\n\t/**\n\t * Process the client-to-server event\n\t */\n\n\tjQuery(document).trigger(\"pmw:s2s:view-order-received-page\", payload);\n\n\t/**\n\t * Process the server-to-server event\n\t */\n\n\t// ! No server-to-server event is sent for this event because it is compiled and sent from the server directly\n});\n\n/**\n * Login event\n */\njQuery(document).on(\"pmw:login\", () => {\n\n\tpmw.console.log(\"pmw:login event fired\");\n\n\t/**\n\t * Prepare the payload\n\t */\n\n\tlet payload = {\n\t\tevent: \"login\",\n\t};\n\n\t// Snapchat\n\t// https://docs.snap.com/api/marketing-api/Conversions-API/Parameters\n\t// https://businesshelp.snapchat.com/s/article/pixel-direct-implementation\n\tif (wpmDataLayer?.pixels?.snapchat?.loaded) {\n\t\tpayload.snapchat = wpm.getSnapchatS2SBaseData();\n\t\tpayload.snapchat.event_name = \"LOGIN\";\n\t}\n\n\t/**\n\t * Process the client-to-server event\n\t */\n\n\tjQuery(document).trigger(\"pmw:s2s:login\", payload);\n\n\t/**\n\t * Process the server-to-server event\n\t */\n\n\twpm.sendEventPayloadToServer(payload);\n});\n\n/**\n * Run WooCommerce specific functions\n */\njQuery(document).on(\"pmw:ready\", async () => {\n\n\t// Only run if WooCommerce is active\n\tif (!wpm.isWooCommerceActive()) {\n\t\treturn;\n\t}\n\n\t/**\n\t * Run as soon as wpm namespace is loaded\n\t */\n\n\t// Watch for products visible in viewport\n\twpm.startIntersectionObserverToWatch();\n\n\t// Watch for lazy loaded products\n\twpm.startProductsMutationObserverToWatch();\n});\n","/**\n * Register event listeners\n */\n\n\n/**\n * add_to_cart event\n *\n * WC is inconsistent with events that emit add-to-cart events.\n * adding_to_cart and added_to_are legacy events. Also, they only work\n * on Ajax buttons on shop pages.\n *\n * Never add document or body selectors.\n * The document selector doesn't work.\n * The body selector will cause the events to fire twice and other erratic behavior if used along with other selectors.\n */\nconst addToCartSelectorsArray = [\n\t// \"document\",\n\t// \"body\",\n\t\".add_to_cart_button:not(.product_type_variable)\",\n\t\".ajax_add_to_cart\",\n\t\".single_add_to_cart_button\",\n];\n\nconst addToCartSelectors = wpm.prepareSelectors(addToCartSelectorsArray, \"addToCart\");\n\njQuery(addToCartSelectors).on(\"click adding_to_cart\", (event, data) => {\n\n\t// console.log(\"add_to_cart event fired at: \" + new Date().getTime())\n\t// console.log('add to cart data', data)\n\t// console.log('add to cart event', event)\n\t// console.log('add to cart jQuery(event.target.dataset)', jQuery(event.target.dataset))\n\t// console.log(\"add to cart event.target.dataset\", event.target.dataset)\n\t// console.log(\"add to cart event.target.dataset.quantity\", event.target.dataset.quantity)\n\t// console.log(\"add to cart event.target.dataset.product_id\", event.target.dataset.product_id)\n\n\ttry {\n\n\t\t// console.log(\"add_to_cart event detected\")\n\n\t\tlet quantity = event?.target?.dataset?.quantity ? event.target.dataset.quantity : null;\n\t\tlet productId = event?.target?.dataset?.product_id ? event.target.dataset.product_id : event?.target?.value ? event.target.value : null;\n\n\t\t// let quantity = event.target.dataset.quantity ? event.target.dataset.quantity : 1\n\t\t// let productId = event.target.dataset.product_id ? event.target.dataset.product_id : null\n\n\t\t// Only process on product pages\n\t\tif (wpmDataLayer.shop.page_type === \"product\") {\n\n\t\t\t// First process related and upsell products\n\t\t\tif (\n\t\t\t\ttypeof jQuery(event.currentTarget).attr(\"href\") !== \"undefined\"\n\t\t\t\t&& jQuery(event.currentTarget).attr(\"href\").includes(\"add-to-cart\")\n\t\t\t) {\n\n\t\t\t\tif (!productId) {\n\t\t\t\t\tproductId = jQuery(event.currentTarget).data(\"product_id\");\n\t\t\t\t}\n\n\t\t\t\twpm.addProductToCart(productId, 1);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// If is simple product\n\t\t\tif (wpmDataLayer.shop.product_type === \"simple\") {\n\n\t\t\t\tif (quantity === null) {\n\t\t\t\t\tquantity = Number(jQuery(\".input-text.qty\").val()) ? Number(jQuery(\".input-text.qty\").val()) : 1;\n\t\t\t\t}\n\n\t\t\t\tif (!productId) {\n\t\t\t\t\tproductId = jQuery(event.currentTarget).val();\n\t\t\t\t}\n\n\t\t\t\t// Fallback if the body selector is used\n\t\t\t\tif (!productId) {\n\t\t\t\t\t// get the product ID from the element that has the class .product\n\t\t\t\t\t// that element will also have an ID that start with product- and ends with the product ID\n\t\t\t\t\t// example: product-123\n\t\t\t\t\t// save the product ID in the variable productId\n\t\t\t\t\tproductId = jQuery(\".product\").attr(\"id\").replace(\"product-\", \"\");\n\t\t\t\t}\n\n\t\t\t\twpm.addProductToCart(productId, quantity);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// If is variable product or variable-subscription\n\t\t\tif ([\"variable\", \"variable-subscription\"].indexOf(wpmDataLayer.shop.product_type) >= 0) {\n\n\t\t\t\tif (quantity === null) {\n\t\t\t\t\tquantity = Number(jQuery(\".input-text.qty\").val()) ? Number(jQuery(\".input-text.qty\").val()) : 1;\n\t\t\t\t}\n\n\t\t\t\tif (!productId) {\n\t\t\t\t\tproductId = jQuery(\"[name='variation_id']\").val();\n\t\t\t\t}\n\n\t\t\t\twpm.addProductToCart(productId, quantity);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// If is grouped product\n\t\t\tif (wpmDataLayer.shop.product_type === \"grouped\") {\n\n\t\t\t\tjQuery(\".woocommerce-grouped-product-list-item\").each((index, element) => {\n\n\t\t\t\t\t// Can't rely on event.target.dataset as it always is sent with the parent product ID and the quantity 1\n\n\t\t\t\t\tquantity = Number(jQuery(element).find(\".input-text.qty\").val()) ? Number(jQuery(element).find(\".input-text.qty\").val()) : 1;\n\n\t\t\t\t\tlet classes = jQuery(element).attr(\"class\");\n\t\t\t\t\tproductId = wpm.getPostIdFromString(classes);\n\n\t\t\t\t\twpm.addProductToCart(productId, quantity);\n\t\t\t\t});\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// If is bundle product\n\t\t\tif (wpmDataLayer.shop.product_type === \"bundle\") {\n\n\t\t\t\tif (quantity === null) {\n\t\t\t\t\tquantity = Number(jQuery(\".input-text.qty\").val()) ? Number(jQuery(\".input-text.qty\").val()) : 1;\n\t\t\t\t}\n\n\t\t\t\tif (!productId) {\n\t\t\t\t\tproductId = jQuery(\"input[name=add-to-cart]\").val();\n\t\t\t\t}\n\n\t\t\t\twpm.addProductToCart(productId, quantity);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// everything else\n\t\t\tif (quantity === null) {\n\t\t\t\tquantity = Number(jQuery(\".input-text.qty\").val()) ? Number(jQuery(\".input-text.qty\").val()) : 1;\n\t\t\t}\n\n\t\t\twpm.addProductToCart(productId, quantity);\n\n\t\t} else {\n\n\t\t\tif (quantity === null) {\n\t\t\t\tquantity = 1;\n\t\t\t}\n\n\t\t\tif (!productId) {\n\t\t\t\t// console.log(\"add to cart event.currentTarget\", event.currentTarget)\n\t\t\t\tproductId = jQuery(event.currentTarget).data(\"product_id\") ? jQuery(event.currentTarget).data(\"product_id\") : null;\n\t\t\t}\n\n\t\t\t// Another fallback to retrieve the product ID in case the ID is saved in the value attribute\n\t\t\tif (!productId) {\n\t\t\t\tproductId = jQuery(event.currentTarget).val() ? jQuery(event.currentTarget).val() : null;\n\t\t\t}\n\n\t\t\tif (\n\t\t\t\tproductId\n\t\t\t\t&& quantity\n\t\t\t) {\n\t\t\t\twpm.addProductToCart(productId, quantity);\n\t\t\t}\n\t\t}\n\n\t} catch (e) {\n\t\tconsole.error(e);\n\t}\n});\n\n\n/**\n * If someone clicks anywhere on a custom /?add-to-cart=123 link\n * trigger the add to cart event\n */\n\n// jQuery(document).one(\"click\", \"a:not(.add_to_cart_button, .ajax_add_to_cart, .single_add_to_cart_button)\", (event) => {\njQuery(\"a:not(.add_to_cart_button, .ajax_add_to_cart, .single_add_to_cart_button)\").one(\"click\", (event) => {\n\n\ttry {\n\t\tif (jQuery(event.target).closest(\"a\").attr(\"href\")) {\n\n\t\t\tlet url = new URL(jQuery(event.currentTarget).attr(\"href\"), window.location.origin);\n\n\t\t\tif (url.searchParams.has(\"add-to-cart\")) {\n\n\t\t\t\tlet productId = url.searchParams.get(\"add-to-cart\");\n\t\t\t\twpm.addProductToCart(productId, 1);\n\t\t\t}\n\t\t}\n\t} catch (e) {\n\t\tconsole.error(e);\n\t}\n});\n\n// select item event\n// jQuery(document).on(\"click\", \".woocommerce-LoopProduct-link, .wc-block-grid__product, .product, .product-small, .type-product\", (event) => {\njQuery(\".woocommerce-LoopProduct-link, .wc-block-grid__product, .product, .product-small, .type-product\").on(\"click\", (event) => {\n\n\ttry {\n\n\t\t/**\n\t\t * On some pages the event fires multiple times, and on product pages\n\t\t * even on page load. Using e.stopPropagation helps to prevent this,\n\t\t * but I don't know why. We don't even have to use this, since only a real\n\t\t * product click yields a valid productId. So we filter the invalid click\n\t\t * events out later down in the code. I'll keep it that way because this is\n\t\t * the most compatible way across shops.\n\t\t *\n\t\t * e.stopPropagation();\n\t\t * */\n\n\t\tlet productId = jQuery(event.currentTarget).nextAll(\".wpmProductId:first\").data(\"id\");\n\n\t\t/**\n\t\t * On product pages, for some reason, the click event is triggered on the main product on page load.\n\t\t * In that case no ID is found. But we can discard it, since we only want to trigger the event on\n\t\t * related products, which are found below.\n\t\t */\n\n\t\tif (productId) {\n\n\t\t\tproductId = wpm.getIdBasedOndVariationsOutputSetting(productId);\n\n\t\t\tif (!productId) throw Error(\"Wasn't able to retrieve a productId\");\n\n\t\t\tif (wpmDataLayer.products && wpmDataLayer.products[productId]) {\n\n\t\t\t\tlet product = wpm.getProductDetailsFormattedForEvent(productId);\n\n\t\t\t\tjQuery(document).trigger(\"pmw:select-item\", product);\n\t\t\t}\n\t\t}\n\t} catch (e) {\n\t\tconsole.error(e);\n\t}\n});\n\n\n// checkout_progress event\n// track checkout option event: entered valid billing email\n// jQuery(document).on(\"input\", \"#billing_email\", (event) => {\njQuery(\"#billing_email\").on(\"input\", (event) => {\n\n\tif (wpm.isEmail(jQuery(event.currentTarget).val())) {\n\t\t// wpm.fireCheckoutOption(2);\n\t\twpm.fireCheckoutProgress(2);\n\t\twpm.emailSelected = true;\n\t}\n});\n\n\n/**\n * Place order button\n *\n * Track checkout option event: purchase click\n * https://stackoverflow.com/a/34112407/4688612\n * jQuery(document).one(\"click\", \"#place_order\", () => {\n *\n * Has to be hooked after document ready !\n */\njQuery(\"form.checkout\").on(\"checkout_place_order_success\", () => {\n\n\t// console log current time\n\t// console.log(\"checkout_place_order_success event fired at: \" + new Date().getTime())\n\n\tif (false === wpm.emailSelected) {\n\t\twpm.fireCheckoutProgress(2);\n\t}\n\n\tif (false === wpm.paymentMethodSelected) {\n\t\twpm.fireCheckoutProgress(3);\n\t\twpm.fireCheckoutOption(3, jQuery(\"input[name='payment_method']:checked\").val());\n\t}\n\n\twpm.fireCheckoutProgress(4);\n\n\tjQuery(document).trigger(\"pmw:place-order\", {});\n});\n\n/**\n * Update cart event\n *\n * Has to be hooked after document ready !\n */\njQuery(\"[name='update_cart']\").on(\"click\", () => {\n\n\t// console.log(\"update_cart event fired at: \" + new Date().getTime())\n\n\ttry {\n\t\tjQuery(\".cart_item\").each((index, element) => {\n\n\t\t\tconst productId = wpm.getProductIdByCartItemElement(element);\n\n\t\t\tif (!productId) {\n\t\t\t\tconsole.error(\"Pixel Manager: Wasn't able to retrieve a productId\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst quantity = wpm.getProductQuantityByCartItemElement(element);\n\n\t\t\tif (!quantity) {\n\t\t\t\tconsole.error(\"Pixel Manager: Wasn't able to retrieve a quantity\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// console.log(\"productId\", productId)\n\t\t\t// console.log(\"quantity\", quantity)\n\n\t\t\tif (quantity === 0) {\n\t\t\t\twpm.removeProductFromCart(productId);\n\t\t\t} else if (quantity < wpmDataLayer.cart[productId].quantity) {\n\t\t\t\twpm.removeProductFromCart(productId, wpmDataLayer.cart[productId].quantity - quantity);\n\t\t\t} else if (quantity > wpmDataLayer.cart[productId].quantity) {\n\t\t\t\twpm.addProductToCart(productId, quantity - wpmDataLayer.cart[productId].quantity);\n\t\t\t}\n\t\t});\n\t} catch (e) {\n\t\tconsole.error(e);\n\t\twpm.getCartItemsFromBackend();\n\t}\n});\n\n// Supports the following plugins:\n// WooCommerce Wishlist: https://woo.com/products/woocommerce-wishlists/\n// YITH WooCommerce Wishlist: https://wordpress.org/plugins/yith-woocommerce-wishlist/\n// add_to_wishlist\njQuery(\".add_to_wishlist,.wl-add-to\").on(\"click\", event => {\n\n\ttry {\n\n\t\tlet productId;\n\n\t\tif (jQuery(event.currentTarget).data(\"productid\")) { // for the WooCommerce wishlist plugin\n\n\t\t\tproductId = jQuery(event.currentTarget).data(\"productid\");\n\t\t} else if (jQuery(event.currentTarget).data(\"product-id\")) { // for the YITH wishlist plugin\n\n\t\t\tproductId = jQuery(event.currentTarget).data(\"product-id\");\n\t\t}\n\n\t\tif (!productId) throw Error(\"Wasn't able to retrieve a productId\");\n\n\t\tlet product = wpm.getProductDetailsFormattedForEvent(productId);\n\n\n\t\tjQuery(document).trigger(\"pmw:add-to-wishlist\", product);\n\t} catch (e) {\n\t\tconsole.error(e);\n\t}\n});\n\n\n/**\n * Called when the user selects all the required dropdowns / attributes\n *\n * Replaced by code in the event_listeners.js file in case of lazy loading\n *\n * Has to be hooked after document ready !\n *\n * https://stackoverflow.com/a/27849208/4688612\n * https://stackoverflow.com/a/65065335/4688612\n *\n */\n\nlet previousVariationId = null;\n\njQuery(\".single_variation_wrap\").on(\"show_variation\", (event, variation) => {\n\n\t// Abort if lazy loading is enabled\n\tif(wpmDataLayer?.general?.lazy_load_pmw) return;\n\n\ttry {\n\n\t\tlet productId = wpm.getIdBasedOndVariationsOutputSetting(variation.variation_id);\n\n\t\tif (!productId) throw Error(\"Wasn't able to retrieve a productId\");\n\n\t\t// If the variation id is not the same as the previous one, run the function\n\t\tif (previousVariationId !== variation.variation_id) {\n\t\t\twpm.triggerViewItemEventPrep(productId);\n\t\t\tpreviousVariationId = variation.variation_id;\n\t\t}\n\n\t} catch (e) {\n\t\tconsole.error(e);\n\t}\n});\n\n\n/**\n * Called on variable products when no selection has been done yet\n * or when the visitor deselects his choice.\n *\n * Has to be hooked after document ready !\n */\n\n// jQuery(function () {\n//\n// \tjQuery(\".single_variation_wrap\").on(\"hide_variation\", function () {\n//\n// \t\ttry {\n// \t\t\tlet classes = jQuery(\"body\").attr(\"class\")\n// \t\t\tlet productId = classes.match(/(postid-)(\\d+)/)[2]\n//\n// \t\t\tif (!productId) throw Error(\"Wasn't able to retrieve a productId\")\n//\n// \t\t\t/**\n// \t\t\t * If we have a variable product with no preset,\n// \t\t\t * and variations output is enabled,\n// \t\t\t * then we send a viewItem event with the first\n// \t\t\t * variation we find for the parent.\n// \t\t\t * If variations output is disabled,\n// \t\t\t * we just send the parent ID.\n// \t\t\t *\n// \t\t\t * And if Facebook microdata is active, use the\n// \t\t\t * microdata product ID.\n// \t\t\t */\n//\n// \t\t\tif (\n// \t\t\t\t\"variable\" === wpmDataLayer.shop.product_type &&\n// \t\t\t\twpmDataLayer?.shop?.variations_output\n// \t\t\t) {\n// \t\t\t\tfor (const [key, product] of Object.entries(wpmDataLayer.products)) {\n// \t\t\t\t\tif (\"parent_id\" in product) {\n//\n// \t\t\t\t\t\tproductId = product.id\n// \t\t\t\t\t\tbreak\n// \t\t\t\t\t}\n// \t\t\t\t}\n//\n// \t\t\t\tif (wpmDataLayer?.pixels?.facebook?.microdata_product_id) {\n// \t\t\t\t\tproductId = wpmDataLayer.pixels.facebook.microdata_product_id\n// \t\t\t\t}\n// \t\t\t}\n//\n// \t\t\t// console.log(\"hmm\")\n// \t\t\twpm.triggerViewItemEventPrep(productId)\n//\n// \t\t} catch (e) {\n// \t\t\tconsole.error(e)\n// \t\t}\n// \t})\n// })\n\n// jQuery(function () {\n//\n// \tjQuery(\".single_variation_wrap\").on(\"hide_variation\", function () {\n// \t\tjQuery(document).trigger(\"pmw:view-item\")\n// \t})\n// })\n","/**\n * Create a wpm namespace under which all functions are declared\n */\n\n// https://stackoverflow.com/a/5947280/4688612\n\n(function (wpm, $, undefined) {\n\n\tconst wpmDeduper = {\n\t\tkeyName : \"_wpm_order_ids\",\n\t\tcookieExpiresDays: 365,\n\t};\n\n\tconst wpmRestSettings = {\n\t\t// cookiesAvailable : '_wpm_cookies_are_available',\n\t\tcookiePmwRestEndpointAvailable: \"restEndpointAvailable\",\n\t\trestEndpointPost : \"pmw/v1/test/\",\n\t\trestFails : 0,\n\t\trestFailsThreshold : 10,\n\t};\n\n\twpm.emailSelected = false;\n\twpm.paymentMethodSelected = false;\n\n\twpm.isBelowRestErrorThreshold = () => wpm.retrieveData(wpmRestSettings.restFails) <= wpmRestSettings.restFailsThreshold;\n\n\twpm.isRestEndpointAvailable = async () => {\n\n\t\t// If we already tested the endpoint and have a stored value, return it\n\t\tif (wpm.retrieveData(wpmRestSettings.cookiePmwRestEndpointAvailable)) {\n\t\t\treturn wpm.retrieveData(wpmRestSettings.cookiePmwRestEndpointAvailable);\n\t\t}\n\n\t\treturn await wpm.testEndpoint();\n\t};\n\n\t/**\n\t * Tests a given endpoint by sending a POST request. If the response status is 200, it stores `true` in the dataStorage with given cookie name; else it stores `false`.\n\t *\n\t * @param {string} url - The URL of the endpoint to test. Defaults to concatenation of `wpm.root` and `wpmRestSettings.restEndpointPost`.\n\t * @param {string} cookieName - The name of the cookie where the test result will be stored. Defaults to `wpmRestSettings.cookiePmwRestEndpointAvailable`.\n\t * @returns {Promise} - Returns a promise that resolves to `true` if the response status is 200, and `false` otherwise.\n\t * @async\n\t */\n\twpm.testEndpoint = async (\n\t\turl = wpm.root + wpmRestSettings.restEndpointPost,\n\t\tcookieName = wpmRestSettings.cookiePmwRestEndpointAvailable,\n\t) => {\n\n\t\ttry {\n\n\t\t\tconst response = await fetch(url, {\n\t\t\t\tmethod : \"POST\",\n\t\t\t\tmode : \"cors\",\n\t\t\t\tcache : \"no-cache\",\n\t\t\t\tkeepalive: true,\n\t\t\t\tredirect : \"error\",\t// don't follow redirects\n\t\t\t});\n\n\t\t\tif (!response.ok) {\n\t\t\t\twpm.storeData(cookieName, false);\n\t\t\t\tpmw.console.error(\"Error testing the endpoint. Status: \" + response.status + \" | response: \", response);\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tconst responseJson = await response.json();\n\n\t\t\t// Return false if responseJson.success is not true\n\t\t\tif (!responseJson.success) {\n\t\t\t\twpm.storeData(cookieName, false);\n\t\t\t\tpmw.console.error(\"Error testing the endpoint. Response JSON: \" + JSON.stringify(responseJson));\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\twpm.storeData(cookieName, true);\n\t\t\treturn true;\n\n\t\t} catch (e) {\n\t\t\twpm.storeData(cookieName, false);\n\t\t\tpmw.console.error(\"Error testing the endpoint. Error: \" + e);\n\t\t\treturn false;\n\t\t}\n\t};\n\n\twpm.isWpmRestEndpointAvailable = (cookieName = wpmRestSettings.cookiePmwRestEndpointAvailable) => !!wpm.retrieveData(cookieName);\n\n\t/**\n\t * This function writes the provided orderId into storage. It will first retrieve the existing orderIds\n\t * from the storage if any, then add the new orderId into this existing array of orderIds and stores\n\t * the updated array back to the storage.\n\t * If the function wpm.storeOrderIdOnServer exists and order_duplication_prevention is set to true in wpmDataLayer.shop,\n\t * this function will also store the orderId, orderKey and source on the server side using wpm.storeOrderIdOnServer.\n\t *\n\t * @param {String} orderId - The ID of the order to be stored.\n\t * @param {String} orderKey - The Key of the order to be stored.\n\t * @param {String} source - The source from which the order originated (default: 'thankyou_page').\n\t */\n\twpm.writeOrderIdToStorage = (orderId, orderKey, source = \"thankyou_page\") => {\n\n\t\t// Get existing order ids\n\t\tlet orderIds = wpm.retrieveData(\"orderIds\", true) || [];\n\n\t\t// Add the new order id\n\t\torderIds.push(orderId);\n\n\t\t// Store the order ids\n\t\twpm.storeData(\"orderIds\", orderIds, true);\n\n\t\tif (typeof wpm.storeOrderIdOnServer === \"function\") {\n\t\t\twpm.storeOrderIdOnServer({\n\t\t\t\torderId : orderId,\n\t\t\t\torderKey: orderKey,\n\t\t\t\tsource : source,\n\t\t\t});\n\t\t}\n\t};\n\n\twpm.isOrderIdStored = orderId => {\n\n\t\t// If order deduplication is disabled, return false\n\t\tif (!wpmDataLayer.shop.order_duplication_prevention) {\n\t\t\tpmw.console.log(\"order duplication prevention is off\");\n\t\t\treturn false;\n\t\t}\n\n\t\tconst orderIds = wpm.retrieveData(\"orderIds\", true) || [];\n\t\treturn orderIds.includes(orderId);\n\t};\n\n\t/**\n\t * Check if the email address is valid\n\t *\n\t * https://stackoverflow.com/questions/201323/how-can-i-validate-an-email-address-using-a-regular-expression\n\t * https://www.w3.org/TR/html5/forms.html#valid-e-mail-address\n\t * https://fightingforalostcause.net/content/misc/2006/compare-email-regex.php\n\t *\n\t * @param email\n\t * @returns {boolean}\n\t */\n\twpm.isEmail = email => {\n\n\t\t/**\n\t\t * GitHub Copilot generated RFC 5322 compliant regex\n\t\t * - Don't allow emails without a top-level domain like \"john@localhost\"\n\t\t * - Don't allow emails with dots at the end of the name like \"john.doe.@example.com\"\n\t\t */\n\t\tconst regex = new RegExp(\n\t\t\t\"^(([^<>()\\\\[\\\\]\\\\\\\\.,;:\\\\s@\\\"]+(\\\\.[^<>()\\\\[\\\\]\\\\\\\\.,;:\\\\s@\\\"]+)*)|(\\\".+\\\"))\"\n\t\t\t+ \"@\"\n\t\t\t+ \"((\\\\[[0-9]{1,3}\\\\.[0-9]{1,3}\\\\.[0-9]{1,3}\\\\.[0-9]{1,3}\\\\])\"\n\t\t\t+ \"|(([a-zA-Z\\\\-0-9]+\\\\.)+[a-zA-Z]{2,}))$\",\n\t\t);\n\n\t\treturn regex.test(email);\n\t};\n\n\twpm.removeProductFromCart = async (productId, quantityToRemove = null) => {\n\n\t\ttry {\n\n\t\t\tif (!productId) throw Error(\"Wasn't able to retrieve a productId\");\n\n\t\t\tproductId = wpm.getIdBasedOndVariationsOutputSetting(productId);\n\n\t\t\tif (!productId) throw Error(\"Wasn't able to retrieve a productId\");\n\n\t\t\tlet quantity;\n\n\t\t\tif (quantityToRemove == null) {\n\t\t\t\tquantity = wpmDataLayer.cart[productId].quantity;\n\t\t\t} else {\n\t\t\t\tquantity = quantityToRemove;\n\t\t\t}\n\n\t\t\tif (!wpmDataLayer.cart[productId]) {\n\t\t\t\tawait wpm.getProductsFromBackend([productId]);\n\t\t\t}\n\n\t\t\tlet product = wpm.getProductDetailsFormattedForEvent(productId, quantity);\n\n\t\t\tjQuery(document).trigger(\"pmw:remove-from-cart\", product);\n\n\t\t\tif (quantityToRemove == null || wpmDataLayer.cart[productId].quantity === quantityToRemove) {\n\t\t\t\tdelete wpmDataLayer.cart[productId];\n\t\t\t} else {\n\t\t\t\twpmDataLayer.cart[productId].quantity = wpmDataLayer.cart[productId].quantity - quantity;\n\t\t\t}\n\n\t\t\twpm.storeCartData(wpmDataLayer.cart);\n\n\t\t} catch (e) {\n\t\t\tpmw.console.error(\"error: \", e);\n\t\t}\n\t};\n\n\twpm.getIdBasedOndVariationsOutputSetting = productId => {\n\n\t\ttry {\n\t\t\tif (wpmDataLayer?.shop?.variations_output) return productId;\n\n\t\t\tif (wpmDataLayer.products[productId].is_variation) return wpmDataLayer.products[productId].parent_id;\n\n\t\t\treturn productId;\n\n\t\t} catch (e) {\n\t\t\tconsole.error(e);\n\t\t}\n\t};\n\n\twpm.prepareSelectors = (selectors, type) => {\n\n\t\tif (wpmDataLayer?.shop?.selectors?.[type]) {\n\n\t\t\t// merge the selectors from the addToCartSelectors array with the selectors from the wpmDataLayer.shop.selectors.addToCart array\n\t\t\tselectors = selectors.concat(wpmDataLayer.shop.selectors[type]);\n\n\t\t\t// Remove duplicates\n\t\t\tselectors = [...new Set(selectors)];\n\n\t\t\t// If one of the selectors is document, remove it\n\t\t\tif (selectors.indexOf(\"document\") >= 0) {\n\t\t\t\tselectors.splice(selectors.indexOf(\"document\"), 1);\n\t\t\t}\n\n\t\t\t// If one of the selectors is body, remove all others\n\t\t\tif (selectors.indexOf(\"body\") >= 0) {\n\t\t\t\tselectors = [\"body\"];\n\t\t\t}\n\t\t}\n\n\t\treturn selectors.join(\", \");\n\t};\n\n\t// add_to_cart\n\twpm.addProductToCart = async (productId, quantity) => {\n\n\t\t// Cast quantity to number to make sure it's a number\n\t\tquantity = Number(quantity);\n\n\t\ttry {\n\n\t\t\tif (!productId) throw Error(\"Wasn't able to retrieve a productId\");\n\n\t\t\tproductId = wpm.getIdBasedOndVariationsOutputSetting(productId);\n\n\t\t\tif (!productId) throw Error(\"Wasn't able to retrieve a productId\");\n\n\t\t\tif (!wpmDataLayer?.products[productId]) {\n\t\t\t\tawait wpm.getProductsFromBackend([productId]);\n\t\t\t}\n\n\t\t\tlet product = wpm.getProductDetailsFormattedForEvent(productId, quantity);\n\n\t\t\tjQuery(document).trigger(\"pmw:add-to-cart\", product);\n\n\t\t\t// add product to cart wpmDataLayer['cart']\n\n\t\t\t// if the product already exists in the object, only add the additional quantity\n\t\t\t// otherwise create that product object in the wpmDataLayer['cart']\n\t\t\tif (wpmDataLayer?.cart[productId]) {\n\n\t\t\t\twpmDataLayer.cart[productId].quantity = wpmDataLayer.cart[productId].quantity + quantity;\n\t\t\t} else {\n\n\t\t\t\tif (!(\"cart\" in wpmDataLayer)) wpmDataLayer.cart = {};\n\n\t\t\t\twpmDataLayer.cart[productId] = wpm.getProductDetailsFormattedForEvent(productId, quantity);\n\t\t\t}\n\n\t\t\twpm.storeCartData(wpmDataLayer.cart);\n\n\t\t} catch (e) {\n\t\t\tconsole.error(e);\n\n\t\t\t// fallback if wpmDataLayer.cart and wpmDataLayer.products got out of sync in case cart caching has an issue\n\t\t\twpm.getCartItemsFromBackend();\n\t\t}\n\t};\n\n\twpm.initCart = () => {\n\n\t\t// If the WC cart doesn't exist, eg. after a confirmed purchase,\n\t\t// and we still have a cart object in the storage, reset it.\n\t\tif (\n\t\t\t!wpm.doesWooCommerceCartExist()\n\t\t\t&& Object.keys(wpm.retrieveCartData()).length !== 0\n\t\t) {\n\t\t\twpm.storeCartData({});\n\t\t\treturn;\n\t\t}\n\n\t\t// If the cart object is in the storage, use it\n\t\tif (wpm.retrieveCartData()) {\n\t\t\twpm.saveCartObjectToDataLayer(wpm.retrieveCartData());\n\t\t\treturn;\n\t\t}\n\n\t\t// If the cart object is missing in the storage, create an empty one and get the cart items from the backend\n\t\twpm.storeCartData({});\n\t\twpm.getCartItemsFromBackend();\n\t};\n\n\t// get all cart items from the backend\n\twpm.getCartItemsFromBackend = () => {\n\t\ttry {\n\n\t\t\t/**\n\t\t\t * Can't use a REST API endpoint, as the cart session will not be loaded if the\n\t\t\t * endpoint is called.\n\t\t\t *\n\t\t\t * https://wordpress.org/support/topic/wc-cart-is-null-in-custom-rest-api/#post-11442843\n\t\t\t */\n\n\t\t\t/**\n\t\t\t * Get the cart items from the backend the data object using fetch API\n\t\t\t * and log success or error messages\n\t\t\t * and url encoded data\n\t\t\t */\n\t\t\tfetch(wpm.ajax_url, {\n\t\t\t\tmethod : \"POST\",\n\t\t\t\tcache : \"no-cache\",\n\t\t\t\tbody : new URLSearchParams({action: \"pmw_get_cart_items\"}),\n\t\t\t\tkeepalive: true,\n\t\t\t\tredirect : \"error\",\n\t\t\t})\n\t\t\t\t.then(response => {\n\t\t\t\t\tif (response.ok) {\n\t\t\t\t\t\treturn response.json();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthrow Error(\"Error getting cart items from backend\");\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t\t.then(data => {\n\n\t\t\t\t\tif (data.success) {\n\n\t\t\t\t\t\tif (!data.data[\"cart\"]) data.data[\"cart\"] = {};\n\t\t\t\t\t\twpm.saveCartObjectToDataLayer(data.data[\"cart\"]);\n\t\t\t\t\t\twpm.storeCartData(data.data[\"cart\"]);\n\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthrow Error(\"Error getting cart items from backend\");\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t} catch (e) {\n\t\t\tconsole.error(e);\n\t\t}\n\t};\n\n\t// Get product IDs from the backend\n\twpm.getProductsFromBackend = async productIds => {\n\n\t\tif (wpmDataLayer?.products) {\n\t\t\t// If productIds already exists as key in wpmDataLayer.products, remove it from the array\n\t\t\tproductIds = productIds.filter(productId => !(productId in wpmDataLayer.products));\n\t\t}\n\n\t\t// If no product IDs are in the object, don't try to get anything from the server\n\t\tif (!productIds || productIds.length === 0) return;\n\n\t\t// if no page_id is set, don't try to get anything from the server\n\t\tif (!wpmDataLayer.general.page_id) return;\n\n\t\t// if productIds is not an array, or it's an empty array, don't try to get anything from the server\n\t\tif (!Array.isArray(productIds) || productIds.length === 0) return;\n\n\t\ttry {\n\n\t\t\tlet data = {\n\t\t\t\taction : \"pmw_get_product_ids\", // for the AJAX call\n\t\t\t\tpage_id : wpmDataLayer.general.page_id,\n\t\t\t\tpage_type : wpmDataLayer.shop.page_type,\n\t\t\t\tproduct_ids: productIds,\n\t\t\t};\n\n\t\t\tconst isRestEndpointAvailable = await wpm.isRestEndpointAvailable();\n\t\t\tconst url = isRestEndpointAvailable ? wpm.root + \"pmw/v1/products/\" : wpm.ajax_url;\n\n\t\t\tconst options = {\n\t\t\t\tmethod: \"POST\",\n\t\t\t\tcache : \"no-cache\",\n\t\t\t\tbody : isRestEndpointAvailable ? JSON.stringify(data) : new URLSearchParams(data),\n\t\t\t};\n\n\t\t\t// If the REST API is available, set the headers to JSON\n\t\t\tif (isRestEndpointAvailable) {\n\t\t\t\toptions.headers = {\"Content-Type\": \"application/json\"};\n\t\t\t}\n\n\t\t\tlet response = await fetch(url, options);\n\n\t\t\tif (!response.ok) {\n\t\t\t\tthrow new Error(\"Error getting products from backend. Status: \" + response.status + \" Status text: \" + response.statusText);\n\t\t\t}\n\n\t\t\tlet responseData = await response.json();\n\n\t\t\tif (!responseData.success) {\n\t\t\t\tthrow new Error(\"Error getting products from backend: \" + responseData.data);\n\t\t\t}\n\n\t\t\twpmDataLayer.products = Object.assign({}, wpmDataLayer.products, responseData.data);\n\n\t\t} catch (e) {\n\t\t\tconsole.error(e);\n\t\t}\n\n\t\treturn true;\n\t};\n\n\twpm.saveCartObjectToDataLayer = cartObject => {\n\n\t\twpmDataLayer.cart = cartObject;\n\t\twpmDataLayer.products = Object.assign({}, wpmDataLayer.products, cartObject);\n\t};\n\n\twpm.triggerViewItemEventPrep = async productId => {\n\n\t\tif (!wpmDataLayer?.products[productId]) {\n\t\t\tawait wpm.getProductsFromBackend([productId]);\n\t\t}\n\n\t\tif (!wpmDataLayer?.products[productId]) {\n\t\t\twpm.triggerViewItemEventNoProduct();\n\t\t\tpmw.console.log(`Product with ID ${productId} not found in the data layer and couldn't be retrieved from the backend. Triggering view-item event without product data.`);\n\t\t} else {\n\t\t\twpm.triggerViewItemEvent(productId);\n\t\t}\n\t};\n\n\twpm.triggerViewItemEvent = productId => {\n\n\t\tlet product = wpm.getProductDetailsFormattedForEvent(productId);\n\n\t\tif (!product) return;\n\n\t\tjQuery(document).trigger(\"pmw:view-item\", product);\n\t};\n\n\twpm.triggerViewItemEventNoProduct = () => {\n\t\tjQuery(document).trigger(\"pmw:view-item\");\n\t};\n\n\twpm.fireCheckoutOption = (step, checkout_option = null, value = null) => {\n\n\t\tlet data = {\n\t\t\tstep : step,\n\t\t\tcheckout_option: checkout_option,\n\t\t\tvalue : value,\n\t\t};\n\n\t\tjQuery(document).trigger(\"pmw:checkout-option\", data);\n\t};\n\n\twpm.fireCheckoutProgress = step => {\n\n\t\tlet data = {\n\t\t\tstep: step,\n\t\t};\n\n\t\tjQuery(document).trigger(\"pmw:checkout-progress\", data);\n\t};\n\n\twpm.getPostIdFromString = string => {\n\n\t\ttry {\n\t\t\treturn string.match(/(post-)(\\d+)/)[2];\n\t\t} catch (e) {\n\t\t\tconsole.error(e);\n\t\t}\n\t};\n\n\twpm.triggerViewItemList = productId => {\n\n\t\tif (!productId) throw Error(\"Wasn't able to retrieve a productId\");\n\n\t\tproductId = wpm.getIdBasedOndVariationsOutputSetting(productId);\n\n\t\tif (!productId) throw Error(\"Wasn't able to retrieve a productId\");\n\n\t\tjQuery(document).trigger(\"pmw:view-item-list\", wpm.getProductDataForViewItemEvent(productId));\n\t};\n\n\twpm.getProductDataForViewItemEvent = productId => {\n\n\t\tif (!productId) throw Error(\"Wasn't able to retrieve a productId\");\n\n\t\ttry {\n\t\t\tif (wpmDataLayer.products[productId]) {\n\n\t\t\t\treturn wpm.getProductDetailsFormattedForEvent(productId);\n\t\t\t}\n\t\t} catch (e) {\n\t\t\tconsole.error(e);\n\t\t}\n\t};\n\n\twpm.getMainProductIdFromProductPage = () => {\n\n\t\ttry {\n\t\t\tif ([\"simple\", \"variable\", \"grouped\", \"composite\", \"bundle\"].indexOf(wpmDataLayer.shop.product_type) >= 0) {\n\t\t\t\treturn jQuery(\".wpmProductId:first\").data(\"id\");\n\t\t\t} else {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} catch (e) {\n\t\t\tconsole.error(e);\n\t\t}\n\t};\n\n\twpm.viewItemListTriggerTestMode = target => {\n\n\t\tjQuery(target).css({\"position\": \"relative\"});\n\t\tjQuery(target).append(\"
\");\n\t\tjQuery(target).find(\"#viewItemListTriggerOverlay\").css({\n\t\t\t\"z-index\" : \"10\",\n\t\t\t\"display\" : \"block\",\n\t\t\t\"position\" : \"absolute\",\n\t\t\t\"height\" : \"100%\",\n\t\t\t\"top\" : \"0\",\n\t\t\t\"left\" : \"0\",\n\t\t\t\"right\" : \"0\",\n\t\t\t\"opacity\" : wpmDataLayer.shop.view_item_list_trigger.opacity,\n\t\t\t\"background-color\": wpmDataLayer.shop.view_item_list_trigger.background_color,\n\t\t});\n\t};\n\n\twpm.getSearchTermFromUrl = () => {\n\n\t\ttry {\n\t\t\tlet urlParameters = new URLSearchParams(window.location.search);\n\t\t\treturn urlParameters.get(\"s\");\n\t\t} catch (e) {\n\t\t\tconsole.error(e);\n\t\t}\n\t};\n\n\t// we need this to track timeouts for intersection observers\n\tlet ioTimeouts = {};\n\n\twpm.observerCallback = (entries, observer) => {\n\n\t\tentries.forEach((entry) => {\n\n\t\t\ttry {\n\t\t\t\tlet productId;\n\n\t\t\t\tlet elementId = jQuery(entry.target).data(\"ioid\");\n\n\t\t\t\t// Get the productId from next element, if wpmProductId is a sibling, like in Gutenberg blocks\n\t\t\t\t// otherwise go search in children, like in regular WC loop items\n\t\t\t\tif (jQuery(entry.target).next(\".wpmProductId\").length) {\n\t\t\t\t\t// console.log('test 1');\n\t\t\t\t\tproductId = jQuery(entry.target).next(\".wpmProductId\").data(\"id\");\n\t\t\t\t} else {\n\t\t\t\t\tproductId = jQuery(entry.target).find(\".wpmProductId\").data(\"id\");\n\t\t\t\t}\n\n\n\t\t\t\tif (!productId) throw Error(\"wpmProductId element not found\");\n\n\t\t\t\tif (entry.isIntersecting) {\n\n\t\t\t\t\tioTimeouts[elementId] = setTimeout(() => {\n\n\t\t\t\t\t\twpm.triggerViewItemList(productId);\n\t\t\t\t\t\tif (wpmDataLayer.shop.view_item_list_trigger.test_mode) wpm.viewItemListTriggerTestMode(entry.target);\n\t\t\t\t\t\tif (wpmDataLayer.shop.view_item_list_trigger.repeat === false) observer.unobserve(entry.target);\n\t\t\t\t\t}, wpmDataLayer.shop.view_item_list_trigger.timeout);\n\n\t\t\t\t} else {\n\n\t\t\t\t\tclearTimeout(ioTimeouts[elementId]);\n\t\t\t\t\tif (wpmDataLayer.shop.view_item_list_trigger.test_mode) jQuery(entry.target).find(\"#viewItemListTriggerOverlay\").remove();\n\t\t\t\t}\n\t\t\t} catch (e) {\n\t\t\t\tconsole.error(e);\n\t\t\t}\n\t\t});\n\t};\n\n\t// fire view_item_list only on products that have become visible\n\tlet io;\n\tlet ioid = 0;\n\n\tconst getCommonIdentifiersToWatch = () => {\n\n\t\tlet listOfClassNames = {\n\t\t\tnested: [],\n\t\t\tflat : [],\n\t\t};\n\n\t\ttry {\n\n\t\t\tconst haveSameNestingDepth = (element1, element2) => {\n\n\t\t\t\t// If both are the same, return the parent\n\t\t\t\treturn jQuery(element1).parents().length === jQuery(element2).parents().length;\n\t\t\t};\n\n\t\t\tconst findCommonParentElement = (element1, element2) => {\n\t\t\t\t// If both are the same, return the parent\n\t\t\t\tif (jQuery(element1).parent().is(jQuery(element2).parent())) {\n\t\t\t\t\treturn {\n\t\t\t\t\t\tnode: jQuery(element1).parent(),\n\t\t\t\t\t\ttype: \"flat\",\n\t\t\t\t\t};\n\t\t\t\t}\n\n\t\t\t\treturn {\n\t\t\t\t\tnode: jQuery(element1).parents().has(jQuery(element2).parents()).first(),\n\t\t\t\t\ttype: \"nested\",\n\t\t\t\t};\n\t\t\t};\n\n\t\t\tconst countOfChildren = (element) => {\n\t\t\t\t// Return the count of \"wpmProductId\" elements\n\t\t\t\treturn jQuery(element).find(\".wpmProductId\").length;\n\t\t\t};\n\n\t\t\tconst getCommonClass = (classes1, classes2) => {\n\n\t\t\t\t// console.log(\"classes1\", classes1);\n\t\t\t\t// console.log(\"classes2\", classes2);\n\t\t\t\t// classes 1 and 2 are arrays of classes\n\t\t\t\t// They may contain the same classes, but not in the same order\n\t\t\t\t// Return the first common class that's present in both arrays\n\n\t\t\t\treturn classes1.filter(value => classes2.includes(value))[0] || null;\n\t\t\t};\n\n\t\t\tconst wpmProductIds = document.querySelectorAll(\".wpmProductId\");\n\n\t\t\t// If zero or only one product template is found, then we can't run the algorithm\n\t\t\tif (wpmProductIds.length === 1) {\n\t\t\t\t// console.log(\"No product or too few templates found\")\n\t\t\t\treturn listOfClassNames;\n\t\t\t}\n\n\t\t\t// console.log(\"wpmProductIds\", wpmProductIds);\n\t\t\t// console.log(\"looping\")\n\n\t\t\tfor (let i = 0; i < wpmProductIds.length - 1; i++) {\n\n\t\t\t\t// console.log(\"i\", i)\n\n\t\t\t\tif (!haveSameNestingDepth(wpmProductIds[i], wpmProductIds[i + 1])) {\n\t\t\t\t\t// console.log(\"The nesting depth is not the same\")\n\t\t\t\t\ti++;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tlet productsNode = findCommonParentElement(wpmProductIds[i], wpmProductIds[i + 1]);\n\t\t\t\t// console.log(\"productsNode.node\", productsNode.node)\n\t\t\t\t// console.log(\"productsNode.type\", productsNode.type)\n\n\t\t\t\t// If the productsNode is nested, get the first class of the first child. Then console log the class\n\t\t\t\tif (productsNode.type === \"nested\") {\n\n\t\t\t\t\tlet firstChildClassAttr = productsNode.node.children().first().attr(\"class\");\n\t\t\t\t\tlet firstChildClasses = firstChildClassAttr ? firstChildClassAttr.split(\" \") : [];\n\n\t\t\t\t\tlet secondChildClassAttr = productsNode.node.children().first().next().attr(\"class\");\n\t\t\t\t\tlet secondChildClasses = secondChildClassAttr ? secondChildClassAttr.split(\" \") : [];\n\n\t\t\t\t\tconst commonClass = getCommonClass(firstChildClasses, secondChildClasses);\n\n\t\t\t\t\tlistOfClassNames.nested.push(commonClass);\n\t\t\t\t} else if (productsNode.type === \"flat\") {\n\n\t\t\t\t\t// If class is not found, continue\n\t\t\t\t\tif (!productsNode.node.children().first().attr(\"class\")) continue;\n\n\t\t\t\t\t// firstProductTemplateClasses is the classes of the first child element of the productsNode\n\t\t\t\t\tlet firstProductTemplateClasses = productsNode.node.children().first().attr(\"class\").split(\" \")[0];\n\n\t\t\t\t\tlistOfClassNames.flat.push(firstProductTemplateClasses);\n\t\t\t\t}\n\n\t\t\t\t// which wpmProductIds is the last one in the productsNode? console log the index of the last wpmProductId in the productsNode\n\t\t\t\t// console.log(\"productsNode.children().length\", countOfChildren(productsNode));\n\n\t\t\t\ti = i + countOfChildren(productsNode.node) - 1;\n\t\t\t}\n\n\t\t\t// Make the list of class names unique\n\t\t\tlistOfClassNames.nested = [...new Set(listOfClassNames.nested)];\n\t\t\tlistOfClassNames.flat = [...new Set(listOfClassNames.flat)];\n\n\t\t\treturn listOfClassNames;\n\n\t\t} catch (e) {\n\t\t\tconsole.error(e);\n\t\t\treturn listOfClassNames;\n\t\t}\n\t};\n\n\n\tlet detectedProductTemplateClasses = {\n\t\tnested: [],\n\t\tflat : [],\n\t};\n\n\tconst isNestedClass = (elem) => {\n\t\tlet nestedClassNames = [\n\t\t\t\"product\",\n\t\t\t\"type-product\",\n\t\t\t\"product-item-inner\",\n\t\t\t...detectedProductTemplateClasses.nested,\n\t\t];\n\n\t\treturn nestedClassNames.some(className => jQuery(elem).closest(\".\" + className).length);\n\t};\n\n\tconst isFlatClass = (elem) => {\n\n\t\tlet flatClassNames = [\n\t\t\t\"wc-block-grid__product\",\n\t\t\t\"product\",\n\t\t\t\"product-small\",\n\t\t\t\"woocommerce-LoopProduct-link\",\n\t\t\t...detectedProductTemplateClasses.flat,\n\t\t];\n\n\t\treturn flatClassNames.some(className => jQuery(elem).prev().hasClass(className));\n\t};\n\n\tconst getAllElementsToWatch = () => {\n\n\t\tdetectedProductTemplateClasses = getCommonIdentifiersToWatch();\n\n\t\treturn jQuery(\".wpmProductId\")\n\t\t\t.map(function (i, elem) {\n\n\t\t\t\tif (isNestedClass(elem)) {\n\t\t\t\t\treturn jQuery(elem).parent();\n\t\t\t\t} else if (isFlatClass(elem)) {\n\t\t\t\t\treturn jQuery(this).prev();\n\t\t\t\t} else if (jQuery(elem).closest(\".product\").length) {\n\t\t\t\t\treturn jQuery(elem).closest(\".product\");\n\t\t\t\t}\n\t\t\t});\n\t};\n\n\twpm.startIntersectionObserverToWatch = () => {\n\n\t\ttry {\n\t\t\t// enable view_item_list test mode from browser\n\t\t\tif (wpm.urlHasParameter(\"vildemomode\")) wpmDataLayer.shop.view_item_list_trigger.test_mode = true;\n\n\t\t\t// set up intersection observer\n\t\t\t// https://stackoverflow.com/questions/62084306/intersectionobserver-not-working-in-safari-or-ios\n\t\t\tio = new IntersectionObserver(wpm.observerCallback, {\n\t\t\t\troot: null,\n\t\t\t\t// root : document.body,\n\t\t\t\tthreshold: wpmDataLayer.shop.view_item_list_trigger.threshold,\n\t\t\t});\n\n\t\t\tgetAllElementsToWatch().each((i, elem) => {\n\n\t\t\t\tjQuery(elem[0]).data(\"ioid\", ioid++);\n\n\t\t\t\tio.observe(elem[0]);\n\t\t\t});\n\t\t} catch (e) {\n\t\t\tconsole.error(e);\n\t\t}\n\t};\n\n\t// Watch DOM for new lazy loaded products and add them to the intersection observer\n\twpm.startProductsMutationObserverToWatch = () => {\n\n\t\ttry {\n\t\t\t// Pass in the target node, as well as the observer options\n\n\t\t\t// selects the most common parent node\n\t\t\t// https://stackoverflow.com/a/7648323/4688612\n\t\t\tlet productsNode = jQuery(\".wpmProductId:eq(0)\").parents().has(jQuery(\".wpmProductId:eq(1)\").parents()).first();\n\n\t\t\tif (productsNode.length) {\n\t\t\t\tproductsMutationObserver.observe(productsNode[0], {\n\t\t\t\t\tattributes : true,\n\t\t\t\t\tchildList : true,\n\t\t\t\t\tcharacterData: true,\n\t\t\t\t});\n\t\t\t}\n\t\t} catch (e) {\n\t\t\tconsole.error(e);\n\t\t}\n\t};\n\n\t// Create an observer instance\n\tconst productsMutationObserver = new MutationObserver(mutations => {\n\n\t\tmutations.forEach(mutation => {\n\t\t\tlet newNodes = mutation.addedNodes; // DOM NodeList\n\t\t\tif (newNodes !== null) { // If there are new nodes added\n\t\t\t\tlet nodes = jQuery(newNodes); // jQuery set\n\t\t\t\tnodes.each((i, node) => {\n\t\t\t\t\tif (\n\t\t\t\t\t\t// jQuery(this).hasClass(\"type-product\") ||\n\t\t\t\t\t\t// jQuery(this).hasClass(\"product-small\") ||\n\t\t\t\t\t\t// jQuery(this).hasClass(\"wc-block-grid__product\")\n\t\t\t\t\t\t// jQuery(this).hasClass(\"type-product\")\n\t\t\t\t\t\tisNestedClass(node) || isFlatClass(node)\n\t\t\t\t\t) {\n\t\t\t\t\t\t// check if the node has a child or sibling wpmProductId\n\t\t\t\t\t\t// if yes add it to the intersectionObserver\n\t\t\t\t\t\tif (hasWpmProductIdElement(node)) {\n\t\t\t\t\t\t\tjQuery(node).data(\"ioid\", ioid++);\n\t\t\t\t\t\t\tio.observe(node);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t});\n\n\tlet hasWpmProductIdElement = elem =>\n\t\t!!(jQuery(elem).find(\".wpmProductId\").length ||\n\t\t\tjQuery(elem).siblings(\".wpmProductId\").length);\n\n\t/**\n\t * Sets a new cookie or updates an existing one with the provided name and value.\n\t *\n\t * @function setCookie\n\t * @global\n\t * @param {string} cookieName - The name of the cookie.\n\t * @param {string} [cookieValue=\"\"] - The value to set for the cookie. Default value is an empty string.\n\t * @param {number|null} [expiryDays=null] - The number of days until the cookie expires. If not provided, the cookie will last until the end of the session.\n\t * @returns {void}\n\t *\n\t * @example\n\t * // This will create a cookie \"username\" with the value \"JohnDoe\" that expires in 7 days\n\t * wpm.setCookie(\"username\", \"JohnDoe\", 7);\n\t */\n\twpm.setCookie = (cookieName, cookieValue = \"\", expiryDays = null) => {\n\n\t\tif (expiryDays) {\n\n\t\t\tlet d = new Date();\n\t\t\td.setTime(d.getTime() + (expiryDays * 24 * 60 * 60 * 1000));\n\t\t\tlet expires = \"expires=\" + d.toUTCString();\n\t\t\tdocument.cookie = cookieName + \"=\" + cookieValue + \";\" + expires + \";path=/\";\n\t\t} else {\n\t\t\tdocument.cookie = cookieName + \"=\" + cookieValue + \";path=/\";\n\t\t}\n\t};\n\n\t/**\n\t * Retrieves the value of a specific cookie from the document's cookie string.\n\t *\n\t * @param {String} cookieName - The name of the cookie to retrieve.\n\t * @returns {String} - The value of the cookie if found, an empty string otherwise.\n\t *\n\t * @example\n\t * // returns 'value' if 'cookieName=value' exists in document.cookie\n\t * wpm.getCookie('cookieName')\n\t */\n\twpm.getCookie = cookieName => {\n\n\t\tlet name = cookieName + \"=\";\n\t\tlet decodedCookie = decodeURIComponent(document.cookie);\n\t\tlet ca = decodedCookie.split(\";\");\n\n\t\tfor (let i = 0; i < ca.length; i++) {\n\n\t\t\tlet c = ca[i];\n\n\t\t\twhile (c.charAt(0) == \" \") {\n\t\t\t\tc = c.substring(1);\n\t\t\t}\n\n\t\t\tif (c.indexOf(name) == 0) {\n\t\t\t\treturn c.substring(name.length, c.length);\n\t\t\t}\n\t\t}\n\n\t\treturn \"\";\n\t};\n\n\t/**\n\t * Find and get the cookie with a name that contains the string.\n\t * If one is found, then return the cookie.\n\t * If none is found, then return false.\n\t *\n\t * @param string\n\t * @returns {boolean|string}\n\t *\n\t * @since 1.32.5\n\t */\n\twpm.getCookieThatContainsRegex = (regex) => {\n\n\t\tlet cookies = document.cookie.split(\";\");\n\n\t\tfor (let i = 0; i < cookies.length; i++) {\n\t\t\tlet cookie = cookies[i].trim();\n\n\t\t\tif (regex.test(cookie)) {\n\t\t\t\treturn cookie;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t};\n\n\twpm.deleteCookie = cookieName => {\n\t\twpm.setCookie(cookieName, \"\", -1);\n\t};\n\n\t/**\n\t * Store data in the browser\n\t *\n\t * Try to store the data in the local storage (session or persistent) if available.\n\t * If not available, store the data in the cookie.\n\t *\n\t * Max cookie expiry is 400 days as specified by Google Chrome: https://developer.chrome.com/blog/cookie-max-age-expires/\n\t *\n\t * @param key\n\t * @param value\n\t * @param persistent\n\t * @param extension - If true, this will be saved in a separate key\n\t */\n\twpm.storeData = (key, value, persistent = false, extension = false) => {\n\n\t\tconst suffix = extension ? key : \"\";\n\n\t\tlet dataGetter = persistent ? wpm.getPersistentData : wpm.getSessionData;\n\t\tlet dataSetter = persistent ? wpm.setPersistentData : wpm.setSessionData;\n\n\t\tlet data = dataGetter(suffix);\n\t\textension ? data = value : data[key] = value;\n\n\t\tdataSetter(data, suffix);\n\t};\n\n\twpm.retrieveData = (key, persistent = false, extension = false) => {\n\n\t\tconst suffix = extension ? key : \"\";\n\n\t\tlet data = persistent ? wpm.getPersistentData(suffix) : wpm.getSessionData(suffix);\n\n\t\treturn extension ? data : data[key];\n\t};\n\n\twpm.deleteDataKey = (key, persistent = false, extension = false) => {\n\n\t\tconst suffix = extension ? key : \"\";\n\n\t\tlet dataGetter = persistent ? wpm.getPersistentData : wpm.getSessionData;\n\t\tlet dataSetter = persistent ? wpm.setPersistentData : wpm.setSessionData;\n\n\t\tlet data = dataGetter(suffix);\n\t\t// extension ? delete data : delete data[key]\n\n\t\tif (extension) {\n\n\t\t\ttry {\n\t\t\t\tif (persistent && window.localStorage) window.localStorage.removeItem(wpm.getPersistentDataKey(suffix));\n\t\t\t\tif (!persistent && window.sessionStorage) window.sessionStorage.removeItem(wpm.getSessionDataKey(suffix));\n\n\t\t\t} catch (e) {\n\t\t\t\tconsole.error(e);\n\t\t\t}\n\n\t\t\treturn;\n\t\t}\n\n\t\tdelete data[key];\n\n\t\tdataSetter(data, suffix);\n\t};\n\n\twpm.storeCartData = data => {\n\t\twpm.storeData(\"cart\", data, false, true);\n\t};\n\n\twpm.retrieveCartData = () => {\n\t\treturn wpm.retrieveData(\"cart\", false, true);\n\t};\n\n\twpm.getSessionDataKey = (suffix = \"\") => {\n\t\tconst defaultStorageKey = \"_pmw_session_data\";\n\n\t\tif (suffix) {\n\t\t\treturn defaultStorageKey + \"_\" + suffix;\n\t\t}\n\n\t\treturn defaultStorageKey;\n\t};\n\n\twpm.getPersistentDataKey = (storageKeySuffix) => {\n\n\t\tconst defaultStorageKey = \"_pmw_persistent_data\";\n\n\t\tif (storageKeySuffix) {\n\t\t\treturn defaultStorageKey + \"_\" + storageKeySuffix;\n\t\t}\n\n\t\treturn defaultStorageKey;\n\t};\n\n\twpm.getSessionData = (suffix = \"\") => {\n\n\t\tif (window.sessionStorage) {\n\n\t\t\tlet data = window.sessionStorage.getItem(wpm.getSessionDataKey(suffix));\n\n\t\t\treturn data !== null ? JSON.parse(data) : {};\n\t\t} else {\n\t\t\t// fallback to cookie\n\t\t\tlet data = wpm.getCookie(wpm.getSessionDataKey(suffix));\n\n\t\t\treturn data !== \"\" ? JSON.parse(data) : {};\n\t\t}\n\t};\n\n\twpm.setSessionData = (data, storageKeySuffix = \"\") => {\n\t\tif (window.sessionStorage) {\n\t\t\twindow.sessionStorage.setItem(wpm.getSessionDataKey(storageKeySuffix), JSON.stringify(data));\n\t\t} else {\n\t\t\t// fallback to cookie\n\t\t\twpm.setCookie(wpm.getSessionDataKey(storageKeySuffix), JSON.stringify(data));\n\t\t}\n\t};\n\n\twpm.getPersistentData = (storageKeySuffix) => {\n\n\t\tif (window.localStorage) {\n\n\t\t\tlet data = window.localStorage.getItem(wpm.getPersistentDataKey(storageKeySuffix));\n\n\t\t\treturn data !== null ? JSON.parse(data) : {};\n\t\t} else {\n\t\t\t// fallback to cookie\n\t\t\tlet data = wpm.getCookie(wpm.getPersistentDataKey(storageKeySuffix));\n\n\t\t\treturn data !== \"\" ? JSON.parse(data) : {};\n\t\t}\n\t};\n\n\twpm.setPersistentData = (data, storageKeySuffix = \"\") => {\n\n\t\tif (window.localStorage) {\n\t\t\twindow.localStorage.setItem(wpm.getPersistentDataKey(storageKeySuffix), JSON.stringify(data));\n\t\t} else {\n\t\t\t// fallback to cookie\n\t\t\twpm.setCookie(wpm.getPersistentDataKey(storageKeySuffix), JSON.stringify(data), 400);\n\t\t}\n\t};\n\n\twpm.storeOrderIdOnServer = async (orderDetails) => {\n\n\t\ttry {\n\n\t\t\tlet response;\n\n\t\t\tif (await wpm.isRestEndpointAvailable()) {\n\n\t\t\t\tresponse = await fetch(wpm.root + \"pmw/v1/pixels-fired/\", {\n\t\t\t\t\tmethod : \"POST\",\n\t\t\t\t\theaders : {\n\t\t\t\t\t\t\"Content-Type\": \"application/json\",\n\t\t\t\t\t\t// \"X-WP-Nonce\" : wpm.nonce_wp_rest,\n\t\t\t\t\t},\n\t\t\t\t\tbody : JSON.stringify({\n\t\t\t\t\t\torder_id : orderDetails.orderId,\n\t\t\t\t\t\torder_key: orderDetails.orderKey,\n\t\t\t\t\t\tsource : orderDetails.source,\n\t\t\t\t\t\t// nonce : wpm.pmw_nonce,\n\t\t\t\t\t}),\n\t\t\t\t\tkeepalive: true,\n\t\t\t\t\tcache : \"no-cache\",\n\t\t\t\t\tredirect : \"error\",\n\t\t\t\t});\n\n\t\t\t} else {\n\n\t\t\t\tpmw.console.log(\"REST API not available, falling back to AJAX\");\n\n\t\t\t\t// save the state in the database\n\n\t\t\t\t// Send the data object with ajax request\n\t\t\t\t// and log success or error using fetch API and url encoded\n\t\t\t\tresponse = await fetch(wpm.ajax_url, {\n\t\t\t\t\tmethod : \"POST\",\n\t\t\t\t\tbody : new URLSearchParams({\n\t\t\t\t\t\taction : \"pmw_purchase_pixels_fired\",\n\t\t\t\t\t\torder_id : orderDetails.orderId,\n\t\t\t\t\t\torder_key: orderDetails.orderKey,\n\t\t\t\t\t\tsource : orderDetails.source,\n\t\t\t\t\t\t// nonce_ajax: wpm.nonce_ajax,\n\t\t\t\t\t}),\n\t\t\t\t\tkeepalive: true,\n\t\t\t\t\tredirect : \"error\",\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tconst responseJson = await response.json();\n\n\t\t\tif (responseJson.success) {\n\t\t\t\tpmw.console.log(\"\", responseJson.data);\n\t\t\t} else {\n\t\t\t\tpmw.console.error(\"\", responseJson.data);\n\t\t\t}\n\n\t\t} catch (e) {\n\t\t\tconsole.error(e);\n\t\t}\n\t};\n\n\twpm.getProductIdByCartItemElement = element => {\n\n\t\tconst href = jQuery(element).find(\".product-remove\").find(\"a\").attr(\"href\");\n\t\tif (href) return wpm.getProductIdByCartItemKeyUrl(new URL(href));\n\n\t\tconst productId = jQuery(element).find(\"[data-product_id]\").first().attr(\"data-product_id\");\n\t\treturn productId ? productId : null;\n\t};\n\n\twpm.getProductQuantityByCartItemElement = element => {\n\n\t\treturn jQuery(element).find(\".qty\").val() || null;\n\t};\n\n\twpm.getProductIdByCartItemKeyUrl = url => {\n\n\t\tlet searchParams = new URLSearchParams(url.search);\n\t\tlet cartItemKey = searchParams.get(\"remove_item\");\n\n\t\tlet productId;\n\n\t\tif (wpmDataLayer.cart_item_keys[cartItemKey][\"variation_id\"] === 0) {\n\t\t\tproductId = wpmDataLayer.cart_item_keys[cartItemKey][\"product_id\"];\n\t\t} else {\n\t\t\tproductId = wpmDataLayer.cart_item_keys[cartItemKey][\"variation_id\"];\n\t\t}\n\n\t\treturn productId;\n\t};\n\n\twpm.getAddToCartLinkProductIds = () =>\n\t\tjQuery(\"a\").map(function () {\n\t\t\tlet href = jQuery(this).attr(\"href\");\n\n\t\t\tif (href && href.includes(\"?add-to-cart=\")) {\n\t\t\t\tlet matches = href.match(/(add-to-cart=)(\\d+)/);\n\t\t\t\tif (matches) return matches[2];\n\t\t\t}\n\t\t}).get();\n\n\twpm.getProductDetailsFormattedForEvent = (productId, quantity = 1) => {\n\n\t\t// If wpmDataLayer.products[productId] doesn't exist, return an empty object\n\t\tif (!wpmDataLayer.products[productId]) return null;\n\n\t\tlet product = {\n\t\t\tid : productId.toString(),\n\t\t\tdyn_r_ids : wpmDataLayer.products[productId].dyn_r_ids,\n\t\t\tname : wpmDataLayer.products[productId].name,\n\t\t\tlist_name : wpmDataLayer.shop.list_name,\n\t\t\tbrand : wpmDataLayer.products[productId].brand,\n\t\t\tcategory : wpmDataLayer.products[productId].category,\n\t\t\tvariant : wpmDataLayer.products[productId].variant,\n\t\t\tlist_position: wpmDataLayer.products[productId].position,\n\t\t\tquantity : quantity,\n\t\t\tprice : wpmDataLayer.products[productId].price,\n\t\t\tcurrency : wpmDataLayer.shop.currency,\n\t\t\tis_variable : wpmDataLayer.products[productId].is_variable,\n\t\t\tis_variation : wpmDataLayer.products[productId].is_variation,\n\t\t\tparent_id : wpmDataLayer.products[productId].parent_id,\n\t\t};\n\n\t\tif (product.is_variation) product[\"parent_id_dyn_r_ids\"] = wpmDataLayer.products[productId].parent_id_dyn_r_ids;\n\n\t\treturn product;\n\t};\n\n\twpm.getClidFromBrowser = (clidId = \"gclid\") => {\n\n\t\tlet clidCookieId;\n\n\t\tclidCookieId = {\n\t\t\tgclid: \"_gcl_aw\",\n\t\t\tdclid: \"_gcl_dc\",\n\t\t};\n\n\t\tif (wpm.getCookie(clidCookieId[clidId])) {\n\n\t\t\tlet clidCookie = wpm.getCookie(clidCookieId[clidId]);\n\t\t\tlet matches = clidCookie.match(/(GCL.[\\d]*.)(.*)/);\n\t\t\treturn matches[2];\n\t\t} else {\n\t\t\treturn \"\";\n\t\t}\n\t};\n\n\twpm.getUserAgent = () => navigator.userAgent;\n\n\twpm.getViewPort = () => ({\n\t\twidth : Math.max(document.documentElement.clientWidth || 0, window.innerWidth || 0),\n\t\theight: Math.max(document.documentElement.clientHeight || 0, window.innerHeight || 0),\n\t});\n\n\n\twpm.consoleLogVersion = () => {\n\t\tconsole.log(wpmDataLayer.version);\n\t};\n\n\t/**\n\t * https://api.jquery.com/jquery.getscript/\n\t *\n\t * Switched back to jQuery.ajax as the fetch method on some sites returned a type error\n\t * Possible reasons are:\n\t * * CORS mismatch\n\t * * The user is using an ad blocker\n\t *\n\t * This code is .thenable\n\t */\n\n\twpm.loadScriptAndCacheIt = url => {\n\n\t\t// Get and load the script using fetch API, if possible from cache, and return it without using eval\n\t\t// return fetch(url, {\n\t\t// \tmethod : \"GET\",\n\t\t// \tcache : \"default\",\n\t\t// \tkeepalive: true,\n\t\t// })\n\t\t// \t.then(response => {\n\t\t// \t\tif (response.ok) {\n\t\t// \t\t\t// console.log(\"response\", response)\n\t\t// \t\t\treturn response.text()\n\t\t// \t\t\t// console.log(\"wpm.loadScriptAndCacheIt success: \" + url)\n\t\t// \t\t} else {\n\t\t// \t\t\tthrow new Error(\"Network response was not ok: \" + url)\n\t\t// \t\t}\n\t\t// \t})\n\t\t// \t.then(script => {\n\t\t// \t\t// Execute the script\n\t\t// \t\t// console.error(\"executing script: \" + script)\n\t\t// \t\teval(script)\n\t\t// \t\t// console.log(\"executed script: \" + script)\n\t\t// \t})\n\t\t// \t.catch(e => {\n\t\t// \t\tconsole.error(e)\n\t\t// \t})\n\n\t\tlet options = {\n\t\t\tdataType: \"script\",\n\t\t\tcache : true,\n\t\t\turl : url,\n\t\t};\n\n\t\treturn jQuery.ajax(options);\n\t};\n\n\twpm.getOrderItemPrice = orderItem => (orderItem.total + orderItem.total_tax) / orderItem.quantity;\n\n\twpm.hasLoginEventFired = () => {\n\t\tlet data = wpm.getSessionData();\n\t\treturn data?.loginEventFired;\n\t};\n\n\twpm.setLoginEventFired = () => {\n\t\tlet data = wpm.getSessionData();\n\t\tdata[\"loginEventFired\"] = true;\n\t\twpm.setSessionData(data);\n\t};\n\n\twpm.pageLoaded = async () => new Promise(resolve => {\n\t\t(function waitForVar() {\n\t\t\tif (\"complete\" === document.readyState) return resolve();\n\t\t\tsetTimeout(waitForVar, 50);\n\t\t})();\n\t});\n\n\twpm.pageReady = () => {\n\t\treturn new Promise(resolve => {\n\t\t\t(function waitForVar() {\n\t\t\t\tif (\"interactive\" === document.readyState || \"complete\" === document.readyState) return resolve();\n\t\t\t\tsetTimeout(waitForVar, 50);\n\t\t\t})();\n\t\t});\n\t};\n\n\twpm.isMiniCartActive = () => {\n\t\tif (window.sessionStorage) {\n\t\t\tObject.keys(window.sessionStorage).forEach(key => {\n\t\t\t\tif (key.includes(\"wc_fragments\")) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\treturn false;\n\t};\n\n\twpm.doesWooCommerceCartExist = () => document.cookie.includes(\"woocommerce_items_in_cart\");\n\n\twpm.urlHasParameter = parameter => {\n\t\tlet urlParams = new URLSearchParams(window.location.search);\n\t\treturn urlParams.has(parameter);\n\t};\n\n\twpm.getUrlParameter = parameter => {\n\t\tlet urlParams = new URLSearchParams(window.location.search);\n\t\treturn urlParams.get(parameter);\n\t};\n\n\t// https://stackoverflow.com/a/60606893/4688612\n\twpm.hashAsync = (algo, str) => {\n\t\treturn crypto.subtle.digest(algo, new TextEncoder(\"utf-8\").encode(str)).then(buf => {\n\t\t\treturn Array.prototype.map.call(new Uint8Array(buf), x => ((\"00\" + x.toString(16)).slice(-2))).join(\"\");\n\t\t});\n\t};\n\n\twpm.getCartValue = () => {\n\n\t\tlet value = 0;\n\n\t\tif (wpmDataLayer?.cart) {\n\n\t\t\tfor (const key in wpmDataLayer.cart) {\n\t\t\t\t// content_ids.push(wpmDataLayer.products[key].dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type])\n\n\t\t\t\tlet product = wpmDataLayer.cart[key];\n\n\t\t\t\tvalue += product.quantity * product.price;\n\t\t\t}\n\t\t}\n\n\t\treturn value;\n\t};\n\n\t/**\n\t * Detect if the current URL contains at least one pattern\n\t *\n\t * @param patterns\n\t * @returns {boolean}\n\t */\n\twpm.doesUrlContainPatterns = patterns => {\n\n\t\tfor (const pattern of patterns) {\n\t\t\tif (new RegExp(pattern).test(window.location.href)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t};\n\n\t/**\n\t * Detect if the current URL contains at least one pattern that is on the tracking exclusion list\n\t *\n\t * https://www.linkedin.com/pulse/how-remove-google-robot-problem-via-gtm-facebook-pixel-hjelpdahl/\n\t * https://www.youtube.com/watch?v=b4I1ePZt8Z0\n\t *\n\t * @returns {boolean}\n\t */\n\twpm.excludeDomainFromTracking = () => {\n\n\t\tlet exclude_domains = [\n\t\t\t\"appspot.com\",\n\t\t\t\"translate.google.com\",\n\t\t];\n\n\t\tif (wpmDataLayer?.general?.exclude_domains) {\n\t\t\texclude_domains = [...exclude_domains, ...wpmDataLayer.general.exclude_domains];\n\t\t}\n\n\t\t// Abort if URL contains excluded domains\n\t\tif (exclude_domains.some(domain => window.location.href.includes(domain))) {\n\t\t\tconsole.debug(\"Pixel Manager: Aborted due to excluded domain\");\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t};\n\n\t/**\n\t * Get a random event ID\n\t *\n\t * @param length\n\t * @return {string}\n\t */\n\twpm.getRandomEventId = (length = 16) => {\n\t\tlet id = \"\";\n\t\twhile (id.length < length) {\n\t\t\tid += (Math.random() + 1).toString(36).substring(2);\n\t\t}\n\t\treturn id.substring(0, length);\n\t};\n\n\twpm.pmwConsoleMessage = () => {\n\t\tlet message = \"Pixel Manager for WooCommerce: \";\n\t\tmessage += wpmDataLayer.version.pro ? \"pro\" : \"free\";\n\t\tmessage += \" | distro: \" + wpmDataLayer.version.distro;\n\t\tif (wpmDataLayer.version.distro === \"fms\" && wpmDataLayer.version.pro) {\n\t\t\tmessage += \" | active license: \" + (wpmDataLayer.version.eligible_for_updates ? \"yes\" : \"no\");\n\t\t}\n\t\tmessage += \" | version: \" + wpmDataLayer.version.number;\n\n\t\tif (wpmDataLayer.version.show === true) {\n\t\t\tconsole.log(message);\n\t\t} else {\n\t\t\tpmw.console.log(message);\n\t\t}\n\t};\n\n\twpm.canLoadPremiumFeatures = () => {\n\t\treturn (wpmDataLayer.version.distro === \"fms\" && wpmDataLayer.version.pro && wpmDataLayer.version.eligible_for_updates) || wpmDataLayer.version.distro === \"wcm\";\n\t};\n\n\t/**\n\t * State if the pmw:dom:ready event has been fired\n\t *\n\t * @type {boolean}\n\t */\n\tlet pmwDomReadyFired = false;\n\n\n\t/**\n\t * Trigger the pmw:dom:ready event\n\t *\n\t * @returns {void}\n\t */\n\twpm.triggerPmwDomReadyEvent = () => {\n\n\t\t// If the event has already been fired, return\n\t\tif (pmwDomReadyFired) return;\n\n\t\t// If the document is already loaded, fire the event\n\t\tif (document.readyState === \"complete\") {\n\t\t\tfirePmwDomReadyEvent();\n\t\t\treturn;\n\t\t}\n\n\t\t// Continue processing if the DOM has not yet been loaded\n\t\t// and attach the event listener to the DOMContentLoaded,\n\t\t// once through jQuery and once through the native DOM API\n\t\t// to maximize compatibility\n\n\t\t// If jQuery is available, use it to fire add the event listener\n\t\tjQuery(() => {\n\t\t\tfirePmwDomReadyEvent();\n\t\t});\n\n\t\t// Also add the event listener using the native DOM API\n\t\tdocument.addEventListener(\"DOMContentLoaded\", () => {\n\t\t\tfirePmwDomReadyEvent();\n\t\t}, true);\n\t};\n\n\t/**\n\t * Fire the pmw:dom:ready event\n\t *\n\t * @returns {void}\n\t */\n\tconst firePmwDomReadyEvent = () => {\n\n\t\t// If the event has already been fired, return\n\t\tif (pmwDomReadyFired) return;\n\n\t\t// Fire the event\n\t\tdocument.dispatchEvent(new Event(\"pmw:dom:ready\"));\n\n\t\t// Set the flag to true to indicate that the event has been fired\n\t\tpmwDomReadyFired = true;\n\t};\n\n\twpm.getEmailFromTarget = target => {\n\n\t\t// Only try to add the clicked email if href is set\n\t\tif (target.href) {\n\n\t\t\t// Get the email from the link\n\t\t\t// But only if there is a valid email address in the link\n\t\t\t// Also, the href may contain other parameters, so we need to check for that and remove them\n\t\t\tlet email = target.href.replace(\"mailto:\", \"\");\n\n\n\t\t\tif (email.indexOf(\"?\") > -1) {\n\t\t\t\temail = email.split(\"?\")[0];\n\t\t\t}\n\n\t\t\t// Trim the email and remove all whitespaces\n\t\t\temail = email.replace(/\\s/g, \"\");\n\n\t\t\t// If the email is not empty and valid, add it to the data object\n\t\t\tif (email && wpm.isEmail(email)) {\n\t\t\t\treturn email;\n\t\t\t}\n\t\t}\n\n\t\treturn \"\";\n\t};\n\n\twpm.sendEventPayloadToServer = payload => {\n\t\tif (typeof wpm.sendEventPayloadToServerPremium === \"function\") {\n\t\t\twpm.sendEventPayloadToServerPremium(payload);\n\t\t}\n\t};\n\n\t/**\n\t * Triggers the queued events for a pixel.\n\t * This function is responsible for executing the events that have been\n\t * queued up for a specific pixel.\n\t *\n\t * @param {string} pixel - The pixel function name.\n\t * @returns {void}\n\t */\n\twpm.triggerQueuedEvents = (pixel) => {\n\t\tif (window.pmw_event_queue && window.pmw_event_queue[pixel]) {\n\t\t\twindow.pmw_event_queue[pixel].forEach(func => {\n\t\t\t\tfunc();\n\t\t\t});\n\t\t}\n\t};\n\n\twpm.isWooCommerceActive = () => {\n\t\treturn !!wpmDataLayer.shop;\n\t};\n\n\t/**\n\t * Retrieves the product ID associated with a specific pixel.\n\t *\n\t * @param {string} pixelId - The ID of the pixel to get the product ID for.\n\t * @returns {string|null} - The product ID associated with the given pixel ID,\n\t * or null if no product ID is found.\n\t */\n\twpm.getProductIdForSpecificPixel = (product, pixelName) => {\n\t\treturn String(product.dyn_r_ids[wpmDataLayer.pixels[pixelName].dynamic_remarketing.id_type]);\n\t};\n\n\twpm.isInWooCommerceSesssion = () => {\n\n\t\tif (wpmDataLayer?.shop?.session_active) return true;\n\n\t\tlet regex = new RegExp(\"woocommerce_cart_hash\");\n\t\tlet wcSessionCookie = wpm.getCookieThatContainsRegex(regex);\n\n\t\tif (wcSessionCookie) return true;\n\n\t\treturn false;\n\t};\n\n\twpm.isNotInWooCommerceSesssion = () => {\n\t\treturn !wpm.isInWooCommerceSesssion();\n\t};\n\n\twpm.makeFullUrl = url => {\n\n\t\t// Trim any leading or trailing whitespace\n\t\turl = url.trim();\n\n\t\t// Check if the URL already contains a protocol\n\t\tif (/^(http:\\/\\/|https:\\/\\/)/.test(url)) {\n\t\t\treturn url;\n\t\t}\n\n\t\t// Remove leading slashes\n\t\turl = url.replace(/^\\/+/, \"\");\n\n\t\t// Add 'https://' as default protocol\n\t\treturn \"https://\" + url;\n\t};\n\n}(window.wpm = window.wpm || {}, jQuery));\n","/**\n * Load all PMW functions\n *\n * Ignore event listeners. They need to be loaded after\n * we made sure that jQuery has been loaded.\n */\n\nrequire(\"./functions\")\n\nwindow.wpm.consent = require(\"./consent/consent.mjs\")\n\nwindow.pmw = {\n\tconsent: {\n\t\tapi: require(\"./consent/api.mjs\"),\n\t\t// scripts: require(\"./consent/scripts.mjs\"),\n\t},\n\tconsole: require(\"./console.mjs\"),\n}\n\nrequire(\"./ip_services\")\n\n// #if process.env.TIER === 'premium'\n// if (wpm.canLoadPremiumFeatures()) {\n// \trequire(\"./functions_premium\")\n// }\n// #endif\n","(function (wpm, $, undefined) {\n\n\twpm.jQueryExists = async () => new Promise(resolve => {\n\n\t\t(function waitForjQuery() {\n\t\t\tif (typeof jQuery !== \"undefined\") return resolve()\n\t\t\tsetTimeout(waitForjQuery, 100)\n\t\t})()\n\t})\n\n\twpm.waitForLibrary = (library, timeout = 5000, interval = 100) => {\n\n\t\tconst startTime = Date.now()\n\t\twhile (typeof window[library] === \"undefined\") {\n\t\t\t// Check if timeout in milliseconds has passed\n\t\t\tif (Date.now() - startTime > timeout) {\n\t\t\t\tbreak // Maximum wait time reached, exit the loop\n\t\t\t}\n\t\t\t// Wait for the interval in milliseconds before checking again\n\t\t\tsetTimeout(() => {\n\t\t\t}, interval)\n\t\t}\n\t}\n\n\twpm.wpmDataLayerFullyLoaded = async () => {\n\n\t\t// Promise that checks if the nested object wpmDataLayer.version is defined.\n\t\t// If so, resolve.\n\t\t// We must check for the nested object wpmDataLayer.version,\n\t\t// because the wpmDataLayer object can be defined early by adding products to the data layer through\n\t\t// template inline scripts. So we need to wait until the wpmDataLayer configuration objects\n\t\t// are defined.\n\t\tlet checkVar = new Promise((resolve) => {\n\t\t\t(function waitForVar() {\n\t\t\t\tif (\n\t\t\t\t\ttypeof wpmDataLayer !== \"undefined\"\n\t\t\t\t\t&& typeof wpmDataLayer.version !== \"undefined\"\n\t\t\t\t) {\n\t\t\t\t\treturn resolve()\n\t\t\t\t}\n\t\t\t\tsetTimeout(waitForVar, 100)\n\t\t\t})()\n\t\t})\n\n\t\t// Set a timeout to log a message after 6 seconds\n\t\tlet logTimeoutId = setTimeout(() => {\n\t\t\tconsole.error(\"Pixel Manager error: The wpmDataLayer is not defined. Please make sure that the wpmDataLayer script snippet is inserted and not modified by any third-party plugin, such as a consent management platform or a JavaScript optimizer.\")\n\n\t\t}, 6000)\n\n\t\tcheckVar.then(() => {\n\t\t\tclearTimeout(logTimeoutId)\n\t\t})\n\n\t\treturn checkVar\n\t}\n\n\twpm.wpHooksExists = async () => new Promise(resolve => {\n\t\t(function waitForVar() {\n\n\t\t\t// Resolve if wp.hooks is defined\n\t\t\tif (typeof wp !== \"undefined\" && typeof wp.hooks !== \"undefined\") return resolve()\n\t\t\tsetTimeout(waitForVar, 50)\n\t\t})()\n\t})\n\n\t/**\n\t * Load all WooCommerce hooks functions\n\t *\n\t * Includes safeguard in case the user changed the default load order for wp-hooks, or removed it completely.\n\t *\n\t * @returns {Promise}\n\t */\n\twpm.loadWcHooksFunctions = async () => {\n\t\t// Load all WooCommerce Blocks hooks\n\t\tawait wpm.wpHooksExists()\n\t\trequire(\"./wc_hooks\")\n\t}\n\n}(window.wpm = window.wpm || {}, jQuery))\n","/**\n * IP functions\n */\n\n(function (wpm, $, undefined) {\n\n\tconst {isRange, isIP, isV4, isV6, version: getIpVersion} = require(\"range_check\")\n\n\tconst ipServices = {\n\t\t\"cloudflare\": {\n\t\t\t\"any\": \"https://www.cloudflare.com/cdn-cgi/trace\",\n\t\t},\n\t\t// icanhazip seems to regularly be added to malware databases, despite being a legitimate service run by Cloudflare\n\t\t// https://blog.apnic.net/2021/06/17/how-a-small-free-ip-tool-survived/\n\t\t// https://major.io/p/a-new-future-for-icanhazip/\n\t\t// https://major.io/p/extra-icanhaz-services-going-offline/\n\t\t\"icanhazip\" : {\n\t\t\t\"4\" : \"https://ipv4.icanhazip.com\",\n\t\t\t\"6\" : \"https://ipv6.icanhazip.com\",\n\t\t\t\"any\": \"https://icanhazip.com\",\n\t\t},\n\t\t\"ipinfo\" : {\n\t\t\t\"any\": \"https://ipinfo.io/ip\",\n\t\t},\n\t\t\"myexternalip\": {\n\t\t\t\"any\": \"https://myexternalip.com/raw\",\n\t\t\t// \"6\": \"https://api-ipv6.myexternalip.com/raw\", // This can return an IPv4 address, so we can't use it\n\t\t},\n\t\t\"ipify\" : {\n\t\t\t\"4\" : \"https://api4.ipify.org\",\n\t\t\t\"6\" : \"https://api6.ipify.org\",\n\t\t\t\"any\": \"https://api64.ipify.org\", // If IPv6 is available, AND the client is configured to prefer IPv6, this will return an IPv6 address\n\t\t},\n\t\t// Can't use amazon because its CORS policy blocks requests from the browser\n\t\t// \"amazon\" : {\n\t\t// \t\"any\": \"https://checkip.amazonaws.com/\",\n\t\t// },\n\t\t// Can't use ip.sb because its CORS policy blocks requests from the browser\n\t\t// \"ip.sb\" : {\n\t\t// \t\"any\": \"https://api.ip.sb/ip\",\n\t\t// },\n\t\t// Can't use seeip because its CORS policy blocks requests from the browser\n\t\t// \"seeip\" : {\n\t\t// \t\"any\": \"https://api.seeip.org\",\n\t\t// \t\"4\": \"https://ipv4.seeip.org\",\n\t\t// \t\"6\": \"https://ipv6.seeip.org\",\n\t\t// },\n\t}\n\n\twpm.getGeoInfo = {\n\n\t\tcloudflare: async () => {\n\n\t\t\tconst response = await fetch(\"https://www.cloudflare.com/cdn-cgi/trace\")\n\n\t\t\tif (!response.ok) throw new Error(`The response from Cloudflare was not OK. Status: ${response.status}`)\n\n\t\t\tlet data = await response.text()\n\n\t\t\tif (!data) throw new Error(\"No data was returned from Cloudflare\")\n\n\t\t\t// Convert key-value pairs to JSON\n\t\t\t// https://stackoverflow.com/a/39284735/452587\n\t\t\tdata = data\n\t\t\t\t.trim()\n\t\t\t\t.split(\"\\n\")\n\t\t\t\t.reduce((obj, pair) => {\n\t\t\t\t\tpair = pair.split(\"=\")\n\t\t\t\t\treturn obj[pair[0]] = pair[1], obj\n\t\t\t\t}, {})\n\n\t\t\tif (!data.ip || !data.loc) throw new Error(\"The JSON data is missing the ip or loc key from Cloudflare\")\n\n\t\t\t/**\n\t\t\t * Cloudflare doesn't return the region.\n\t\t\t * If the website manager has set a region such as California in the restricted_regions array,\n\t\t\t * we have to validate the region. This is not possible with the data from Cloudflare.\n\t\t\t * So we have to abort the process and give the other services a chance to return the region.\n\t\t\t */\n\t\t\tif (processRegion(data.loc)) throw new Error(\"We have to validate the region, and this service is not returning the region.\")\n\n\t\t\treturn {\n\t\t\t\tip : data.ip,\n\t\t\t\tcountryCode: data.loc,\n\t\t\t\tservice : \"cloudflare\",\n\t\t\t}\n\t\t},\n\n\t\tgeojs: async () => {\n\n\t\t\tconst response = await fetch(\"https://get.geojs.io/v1/ip/geo.json\")\n\n\t\t\tif (!response.ok) throw new Error(`The response from geojs was not OK. Status: ${response.status}`)\n\n\t\t\tlet data = await response.json()\n\n\t\t\tif (!data) throw new Error(\"No JSON data was returned from geojs\")\n\t\t\tif (!data.ip || !data.country_code || !data.region) throw new Error(\"The JSON data is missing the ip, country_code, or region key from geojs\")\n\n\t\t\treturn {\n\t\t\t\tip : data.ip,\n\t\t\t\tcountryCode: data.country_code,\n\t\t\t\tregion : data.region,\n\t\t\t\tservice : \"geojs\",\n\t\t\t}\n\t\t},\n\n\t\tipinfo: async () => {\n\n\t\t\tconst response = await fetch(\"https://ipinfo.io/json\")\n\n\t\t\tif (!response.ok) throw new Error(`The response from ipinfo was not OK from ipinfo. Status: ${response.status}`)\n\n\t\t\tlet data = await response.json()\n\n\t\t\tif (!data) throw new Error(\"No JSON data was returned from ipinfo\")\n\t\t\tif (!data.ip || !data.country || !data.region) throw new Error(\"The JSON data is missing the ip, country, or region key from ipinfo\")\n\n\t\t\treturn {\n\t\t\t\tip : data.ip,\n\t\t\t\tcountryCode: data.country,\n\t\t\t\tregion : data.region,\n\t\t\t\tservice : \"ipinfo\",\n\t\t\t}\n\t\t},\n\n\t\tipapi: async () => {\n\n\t\t\tconst response = await fetch(\"https://ipapi.co/json\")\n\n\t\t\tif (!response.ok) throw new Error(`The response from ipapi was not OK. Status: ${response.status}`)\n\n\t\t\tlet data = await response.json()\n\n\t\t\tif (!data) throw new Error(\"No JSON data was returned from ipapi\")\n\t\t\tif (!data.ip || !data.country || !data.region) throw new Error(\"The JSON data is missing the ip, country, or region key from ipapi\")\n\n\t\t\treturn {\n\t\t\t\tip : data.ip,\n\t\t\t\tcountryCode: data.country,\n\t\t\t\tregion : data.region,\n\t\t\t\tservice : \"ipapi\",\n\t\t\t}\n\t\t},\n\t}\n\n\t/**\n\t * /**\n\t * Cloudflare doesn't return the region.\n\t * If the website manager has set a region such as California in the restricted_regions array,\n\t * we have to validate the region. This is not possible with the data from Cloudflare.\n\t * So we have to abort the process and give the other services a chance to return the region.\n\t *\n\t * If the country code is US,\n\t * and the restricted_regions array contains \"US-CA\" or \"US-VA\",\n\t * we must process the region.\n\t *\n\t * @param countryCode\n\t * @returns {boolean}\n\t */\n\tconst processRegion = (countryCode) => {\n\n\t\tif (countryCode !== \"US \") return false\n\n\t\tconst regionsToCheck = [\"US-CA\", \"US-VA\"]\n\n\t\treturn regionsToCheck.some(region =>\n\t\t\twpmDataLayer?.general?.consent_management.restricted_regions.includes(region),\n\t\t)\n\t}\n\n\twpm.isIpAllowed = async () => {\n\n\t\t// Check the cache if the IP is allowed\n\t\tif (wpm.retrieveData(\"ipAllowed\")) {\n\t\t\treturn !!JSON.parse(wpm.retrieveData(\"ipAllowed\"))\n\t\t}\n\n\t\tconst ip = await wpm.getIp()\n\n\t\t// If the IP is blacklisted, return false and store the result in the cache\n\t\tif (isOnBlacklist(ip)) {\n\t\t\twpm.storeData(\"ipAllowed\", false)\n\t\t\treturn false\n\t\t}\n\n\t\t// If the IP is not blacklisted, return true and store the result in the cache\n\t\twpm.storeData(\"ipAllowed\", true)\n\t\treturn true\n\t}\n\n\twpm.getIp = async (ipVersion = \"any\", maxServicesToCheck = 3) => {\n\n\t\tconst validVersions = [\"any\", \"4\", \"6\"]\n\n\t\t// return null if the version is not valid and console log an error\n\t\tif (!validVersions.includes(ipVersion)) {\n\t\t\tconsole.error(\"The version argument must be one of the following: \" + validVersions.join(\", \"))\n\t\t\treturn null\n\t\t}\n\n\t\tif (ipVersion === \"any\" && wpm.retrieveData(\"ip\")) {\n\t\t\treturn wpm.retrieveData(\"ip\")\n\t\t}\n\n\t\t// Get the ipv data from the cache\n\t\tconst ipv = wpm.retrieveData(`ipv${ipVersion}`)\n\n\t\t// Return it if it is not undefined\n\t\t// The value can be an IP\n\t\t// or null if we ran the test but no IP could be retrieved\n\t\t// It is undefined if the ipVersion was not tested yet\n\t\tif (ipv !== undefined) return ipv\n\n\t\tpmw.console.log(\"Testing the IP address of the browser because one ore more server-to-server APIs are enabled and require the browser IP. It may trigger connection request errors in the console while testing the IP address. This is normal and expected behavior.\")\n\n\t\ttry {// Check the cache if the IP is already stored\n\n\t\t\tconst ip = await wpm.getIpFromAnyService(ipVersion, maxServicesToCheck)\n\n\t\t\t// if (!isIP(ip)) throw new Error(\"The returned value is not an IP address\")\n\n\t\t\t// Store the IP in the cache\n\t\t\tif (ipVersion === \"any\") {\n\t\t\t\twpm.storeData(\"ip\", ip)\n\t\t\t}\n\n\t\t\tif (\n\t\t\t\tgetIpVersion(ip) === 4\n\t\t\t\t|| (ipVersion === \"4\" && ip === null)\n\t\t\t) {\n\t\t\t\twpm.storeData(\"ipv4\", ip)\n\t\t\t}\n\n\t\t\tif (getIpVersion(ip) === 6\n\t\t\t\t|| (ipVersion === \"6\" && ip === null)\n\t\t\t) {\n\t\t\t\twpm.storeData(\"ipv6\", ip)\n\t\t\t}\n\n\t\t\treturn ip\n\t\t} catch (error) {\n\t\t\t// console.error(error)\n\t\t\treturn null\n\t\t}\n\t}\n\n\twpm.getBrowserGeoFromExternalService = async () => {\n\n\t\tconst startTime = performance.now()\n\n\t\tlet promises = []\n\n\t\tObject.keys(wpm.getGeoInfo).forEach(service => {\n\t\t\tpromises.push(wpm.getGeoInfo[service]())\n\t\t})\n\n\t\ttry {\n\t\t\tconst data = await Promise.any(promises)\n\n\t\t\tdata.countryCode = data.countryCode.toUpperCase()\n\n\t\t\tif (data.region && data.region === \"California\") {\n\t\t\t\tdata.regionCode = \"US-CA\"\n\t\t\t}\n\n\t\t\tif (data.region && data.region === \"Virginia\") {\n\t\t\t\tdata.regionCode = \"US-VA\"\n\t\t\t}\n\n\t\t\tpmw.console.log(\n\t\t\t\t\"Retrieved the browser geo info from an external service: \",\n\t\t\t\tdata,\n\t\t\t\t\" which took \",\n\t\t\t\t(performance.now() - startTime).toFixed(2) + \" ms\",\n\t\t\t)\n\n\t\t\t// wpm.storeData(\"countryCode\", data.countryCode)\n\t\t\t// wpm.storeData(\"ip\", data.ip)\n\t\t\treturn data\n\t\t} catch (error) {\n\t\t\tpmw.console.error(\"error: \", error)\n\t\t\treturn null\n\t\t}\n\t}\n\n\tconst getBrowserLocationByTimeZone = () => {\n\n\t\tconst geo = require(\"./geo/geo.mjs\")\n\t\tconst geoLocation = geo.getLocationByTimeZone()\n\n\t\tif (geoLocation.countryCode) {\n\t\t\treturn geoLocation\n\t\t}\n\n\t\treturn null\n\t}\n\n\twpm.getBrowserGeo = async () => {\n\n\t\tlet geoFromStorage = {}\n\n\t\tif (wpm.retrieveData(\"geoCountryCode\")) geoFromStorage.countryCode = wpm.retrieveData(\"geoCountryCode\")\n\t\tif (wpm.retrieveData(\"geoRegionCode\")) geoFromStorage.regionCode = wpm.retrieveData(\"geoRegionCode\")\n\t\tif (wpm.retrieveData(\"geoRegion\")) geoFromStorage.region = wpm.retrieveData(\"geoRegion\")\n\n\t\tif (geoFromStorage.countryCode) {\n\t\t\tpmw.console.log(\"Retrieved the browser geo location from the cache: \", geoFromStorage)\n\t\t\treturn geoFromStorage\n\t\t}\n\n\t\tlet geoInfo = await wpm.getBrowserGeoFromExternalService()\n\n\t\t// If the external services fail, try to use the timezone fallback to get the country\n\t\tif (!geoInfo) {\n\n\t\t\tconst gepLocationByTimeZone = getBrowserLocationByTimeZone()\n\n\t\t\tgeoInfo = {}\n\n\t\t\tif (gepLocationByTimeZone) pmw.console.log(\"Retrieved the browser geo location from the timezone: \", gepLocationByTimeZone)\n\t\t\tif (gepLocationByTimeZone.countryCode) geoInfo.countryCode = gepLocationByTimeZone.countryCode\n\t\t\tif (gepLocationByTimeZone.regionCode) geoInfo.regionCode = gepLocationByTimeZone.regionCode\n\t\t}\n\n\t\tif (geoInfo?.ip) wpm.storeData(\"ip\", geoInfo.ip)\n\t\tif (geoInfo?.countryCode) wpm.storeData(\"geoCountryCode\", geoInfo.countryCode)\n\t\tif (geoInfo?.regionCode) wpm.storeData(\"geoRegionCode\", geoInfo.regionCode)\n\t\tif (geoInfo?.region) wpm.storeData(\"geoRegion\", geoInfo.region)\n\n\t\tif (geoInfo?.countryCode) {\n\t\t\treturn geoInfo\n\t\t}\n\n\t\treturn null\n\t}\n\n\t/**\n\t * Get the IP from the visitor using different services.\n\t * Return the first valid IP address that can be retrieved the fastest.\n\t *\n\t * @returns {Promise}\n\t */\n\twpm.getIpFromAnyService = async (ipVersion = \"any\", maxServicesToCheck = 3) => {\n\n\t\t// start tracking time\n\t\tconst startTime = performance.now()\n\n\t\t// take the ipServices object and filter it to only contain objects with an ipVersion key that matches the ipVersion argument\n\t\t// keep the original order of the ipServices object\n\t\t// also keep only the first maxServicesToCheck objects\n\n\t\tconst ipServicesFiltered = Object.keys(ipServices)\n\t\t\t.filter(service => ipServices[service][ipVersion])\n\t\t\t.slice(0, maxServicesToCheck)\n\t\t\t.reduce((obj, key) => {\n\t\t\t\t\tobj[key] = ipServices[key]\n\t\t\t\t\treturn obj\n\t\t\t\t}\n\t\t\t\t, {})\n\n\t\tlet promises = []\n\n\t\tObject.keys(ipServicesFiltered).forEach(service => {\n\t\t\t// only push if the ipVersion is available for the service\n\t\t\tif (ipServicesFiltered[service][ipVersion]) {\n\t\t\t\t// console.log(`pushing ${service} to promises array with ipVersion ${ipVersion}`)\n\t\t\t\tpromises.push(wpm.getIpFromService(service, ipVersion))\n\t\t\t}\n\t\t})\n\n\t\t// If the promises array is not empty, return the first promise that resolves the fastest\n\t\t// Ignore the promises that reject\n\t\tif (promises.length > 0) {\n\n\t\t\ttry {\n\t\t\t\tconst data = await Promise.any(promises)\n\t\t\t\t// console.log(`The Pixel Manager retrieved the IP address ${data.ip} from ${data.service} using IP version ${data.ipVersion}`)\n\n\t\t\t\t// stop tracking time\n\t\t\t\tconst endTime = performance.now()\n\t\t\t\tconst timeTaken = (endTime - startTime).toFixed(2)\n\n\t\t\t\tpmw.console.log(`Retrieved the IP address ${data.ip} from ${data.service} which took ${timeTaken} ms`)\n\t\t\t\treturn data.ip\n\t\t\t} catch (error) {\n\t\t\t\t// console.error(error)\n\t\t\t\tpmw.console.log(`Could not retrieve an IP with version ${ipVersion} from any of the services.`)\n\t\t\t\treturn null\n\t\t\t}\n\n\t\t} else {\n\t\t\tpmw.console.log(\"No promises to resolve\")\n\t\t\treturn null\n\t\t}\n\t}\n\n\t/**\n\t * Fetches the IP address from a specified service.\n\t *\n\t * @async\n\t * @param {string} service - The name of the service to fetch the IP from.\n\t * @param {string} [ipVersion=\"any\"] - The version of the IP (e.g., \"any\" for global).\n\t * @returns {Promise} A promise that resolves to an object containing the IP address, service name, and IP version.\n\t * @throws {Error} Will reject the promise with an error if the IP version is not available for the service, the response from the service is not OK, the returned value from the service is not an IP address, or any other error occurs.\n\t */\n\twpm.getIpFromService = async (service, ipVersion = \"any\") => {\n\t\ttry {\n\n\t\t\tlet data = {\n\t\t\t\tip : null,\n\t\t\t\tservice : service,\n\t\t\t\tipVersion: ipVersion,\n\t\t\t}\n\n\t\t\t// Return reject if the ipVersion is not available for the service\n\t\t\tif (!ipServices[service][ipVersion]) return Promise.reject(new Error(`The IP version ${ipVersion} is not available for the service ${service}`))\n\n\t\t\tpmw.console.log(`Fetching IP from ${service} using IP version ${ipVersion}`)\n\n\t\t\tconst response = await fetch(ipServices[service][ipVersion])\n\n\t\t\tif (!response.ok) {\n\t\t\t\treturn Promise.reject(new Error(`The response from ${service} was not OK. Status: ${response.status}`))\n\t\t\t}\n\n\t\t\tlet serviceResponseData = await response.text()\n\n\t\t\tif (service === \"cloudflare\") {\n\t\t\t\t// Convert key-value pairs to JSON\n\t\t\t\tserviceResponseData = serviceResponseData\n\t\t\t\t\t.trim()\n\t\t\t\t\t.split(\"\\n\")\n\t\t\t\t\t.reduce((obj, pair) => {\n\t\t\t\t\t\tpair = pair.split(\"=\")\n\t\t\t\t\t\treturn (obj[pair[0]] = pair[1]), obj\n\t\t\t\t\t}, {})\n\n\t\t\t\tdata.ip = serviceResponseData.ip\n\t\t\t} else {\n\t\t\t\tdata.ip = serviceResponseData.trim()\n\t\t\t}\n\n\t\t\tif (!isIP(data.ip)) {\n\t\t\t\treturn Promise.reject(new Error(`The returned value from ${service} is not an IP address`))\n\t\t\t}\n\n\t\t\treturn data\n\t\t} catch (error) {\n\t\t\treturn Promise.reject(error)\n\t\t}\n\t}\n\n\t/**\n\t * Cloudflare\n\t *\n\t * Response time: approx. 70ms\n\t * IPv: Returns IPv4 or IPv6 depending on the client\n\t * Dual stack: Doesn't offer dual stack detection\n\t *\n\t * @returns {Promise<*>}\n\t */\n\tconst getIpFromCloudflare = async () => {\n\n\t\tconst response = await fetch(\"https://www.cloudflare.com/cdn-cgi/trace\")\n\t\tlet data = await response.text()\n\n\t\t// Convert key-value pairs to JSON\n\t\t// https://stackoverflow.com/a/39284735/452587\n\t\tdata = data\n\t\t\t.trim()\n\t\t\t.split(\"\\n\")\n\t\t\t.reduce((obj, pair) => {\n\t\t\t\tpair = pair.split(\"=\")\n\t\t\t\treturn obj[pair[0]] = pair[1], obj\n\t\t\t}, {})\n\n\t\t// return the data.ip not a promise\n\t\treturn data.ip\n\t}\n\n\twpm.isIpNotAllowed = async () => {\n\t\treturn await wpm.isIpAllowed() === false\n\t}\n\n\tconst isOnBlacklist = ip => {\n\n\t\tconst {isInSubnet} = require(\"is-in-subnet\")\n\n\t\tfor (const ipName of getBlacklist()) {\n\n\t\t\tif (isCidr(ipName)) {\n\t\t\t\ttry {\n\t\t\t\t\tif (isInSubnet(ip, ipName)) return true\n\t\t\t\t} catch (e) {\n\t\t\t\t\tpmw.console.error(\"error: \", e)\n\t\t\t\t\tpmw.console.log(\"IP: \" + ip)\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (ip === ipName) return true\n\t\t\t}\n\t\t}\n\n\t\treturn false\n\t}\n\n\tconst isCidr = ipName => {\n\t\treturn isRange(ipName)\n\t}\n\n\tconst getBlacklist = () => {\n\n\t\tconst blacklist = [\n\t\t\t// \"91.190.12.52/32\", // for testing\n\t\t\t// \"91.190.12.52\", // for testing\n\t\t]\n\n\t\t// https://developers.google.com/search/docs/crawling-indexing/verifying-googlebot\n\t\t// https://developers.google.com/static/search/apis/ipranges/googlebot.json\n\t\t// https://developers.google.com/static/search/apis/ipranges/special-crawlers.json\n\t\tconst google = [\n\t\t\t\"2001:4860:4801:10::/64\",\n\t\t\t\"2001:4860:4801:11::/64\",\n\t\t\t\"2001:4860:4801:12::/64\",\n\t\t\t\"2001:4860:4801:13::/64\",\n\t\t\t\"2001:4860:4801:14::/64\",\n\t\t\t\"2001:4860:4801:15::/64\",\n\t\t\t\"2001:4860:4801:16::/64\",\n\t\t\t\"2001:4860:4801:17::/64\",\n\t\t\t\"2001:4860:4801:18::/64\",\n\t\t\t\"2001:4860:4801:19::/64\",\n\t\t\t\"2001:4860:4801:1a::/64\",\n\t\t\t\"2001:4860:4801:1b::/64\",\n\t\t\t\"2001:4860:4801:1c::/64\",\n\t\t\t\"2001:4860:4801:1d::/64\",\n\t\t\t\"2001:4860:4801:1e::/64\",\n\t\t\t\"2001:4860:4801:20::/64\",\n\t\t\t\"2001:4860:4801:21::/64\",\n\t\t\t\"2001:4860:4801:22::/64\",\n\t\t\t\"2001:4860:4801:23::/64\",\n\t\t\t\"2001:4860:4801:24::/64\",\n\t\t\t\"2001:4860:4801:25::/64\",\n\t\t\t\"2001:4860:4801:26::/64\",\n\t\t\t\"2001:4860:4801:27::/64\",\n\t\t\t\"2001:4860:4801:28::/64\",\n\t\t\t\"2001:4860:4801:29::/64\",\n\t\t\t\"2001:4860:4801:2::/64\",\n\t\t\t\"2001:4860:4801:2a::/64\",\n\t\t\t\"2001:4860:4801:2b::/64\",\n\t\t\t\"2001:4860:4801:2c::/64\",\n\t\t\t\"2001:4860:4801:2d::/64\",\n\t\t\t\"2001:4860:4801:2e::/64\",\n\t\t\t\"2001:4860:4801:2f::/64\",\n\t\t\t\"2001:4860:4801:31::/64\",\n\t\t\t\"2001:4860:4801:32::/64\",\n\t\t\t\"2001:4860:4801:33::/64\",\n\t\t\t\"2001:4860:4801:34::/64\",\n\t\t\t\"2001:4860:4801:35::/64\",\n\t\t\t\"2001:4860:4801:36::/64\",\n\t\t\t\"2001:4860:4801:37::/64\",\n\t\t\t\"2001:4860:4801:38::/64\",\n\t\t\t\"2001:4860:4801:39::/64\",\n\t\t\t\"2001:4860:4801:3a::/64\",\n\t\t\t\"2001:4860:4801:3b::/64\",\n\t\t\t\"2001:4860:4801:3c::/64\",\n\t\t\t\"2001:4860:4801:3d::/64\",\n\t\t\t\"2001:4860:4801:3e::/64\",\n\t\t\t\"2001:4860:4801:40::/64\",\n\t\t\t\"2001:4860:4801:41::/64\",\n\t\t\t\"2001:4860:4801:42::/64\",\n\t\t\t\"2001:4860:4801:43::/64\",\n\t\t\t\"2001:4860:4801:44::/64\",\n\t\t\t\"2001:4860:4801:45::/64\",\n\t\t\t\"2001:4860:4801:46::/64\",\n\t\t\t\"2001:4860:4801:47::/64\",\n\t\t\t\"2001:4860:4801:48::/64\",\n\t\t\t\"2001:4860:4801:49::/64\",\n\t\t\t\"2001:4860:4801:4a::/64\",\n\t\t\t\"2001:4860:4801:50::/64\",\n\t\t\t\"2001:4860:4801:51::/64\",\n\t\t\t\"2001:4860:4801:53::/64\",\n\t\t\t\"2001:4860:4801:54::/64\",\n\t\t\t\"2001:4860:4801:55::/64\",\n\t\t\t\"2001:4860:4801:60::/64\",\n\t\t\t\"2001:4860:4801:61::/64\",\n\t\t\t\"2001:4860:4801:62::/64\",\n\t\t\t\"2001:4860:4801:63::/64\",\n\t\t\t\"2001:4860:4801:64::/64\",\n\t\t\t\"2001:4860:4801:65::/64\",\n\t\t\t\"2001:4860:4801:66::/64\",\n\t\t\t\"2001:4860:4801:67::/64\",\n\t\t\t\"2001:4860:4801:68::/64\",\n\t\t\t\"2001:4860:4801:69::/64\",\n\t\t\t\"2001:4860:4801:6a::/64\",\n\t\t\t\"2001:4860:4801:6b::/64\",\n\t\t\t\"2001:4860:4801:6c::/64\",\n\t\t\t\"2001:4860:4801:6d::/64\",\n\t\t\t\"2001:4860:4801:6e::/64\",\n\t\t\t\"2001:4860:4801:6f::/64\",\n\t\t\t\"2001:4860:4801:70::/64\",\n\t\t\t\"2001:4860:4801:71::/64\",\n\t\t\t\"2001:4860:4801:72::/64\",\n\t\t\t\"2001:4860:4801:73::/64\",\n\t\t\t\"2001:4860:4801:74::/64\",\n\t\t\t\"2001:4860:4801:75::/64\",\n\t\t\t\"2001:4860:4801:76::/64\",\n\t\t\t\"2001:4860:4801:77::/64\",\n\t\t\t\"2001:4860:4801:78::/64\",\n\t\t\t\"2001:4860:4801:79::/64\",\n\t\t\t\"2001:4860:4801:80::/64\",\n\t\t\t\"2001:4860:4801:81::/64\",\n\t\t\t\"2001:4860:4801:82::/64\",\n\t\t\t\"2001:4860:4801:83::/64\",\n\t\t\t\"2001:4860:4801:84::/64\",\n\t\t\t\"2001:4860:4801:85::/64\",\n\t\t\t\"2001:4860:4801:86::/64\",\n\t\t\t\"2001:4860:4801:87::/64\",\n\t\t\t\"2001:4860:4801:88::/64\",\n\t\t\t\"2001:4860:4801:90::/64\",\n\t\t\t\"2001:4860:4801:91::/64\",\n\t\t\t\"2001:4860:4801:92::/64\",\n\t\t\t\"2001:4860:4801:93::/64\",\n\t\t\t\"2001:4860:4801:c::/64\",\n\t\t\t\"2001:4860:4801:f::/64\",\n\t\t\t\"192.178.5.0/27\",\n\t\t\t\"34.100.182.96/28\",\n\t\t\t\"34.101.50.144/28\",\n\t\t\t\"34.118.254.0/28\",\n\t\t\t\"34.118.66.0/28\",\n\t\t\t\"34.126.178.96/28\",\n\t\t\t\"34.146.150.144/28\",\n\t\t\t\"34.147.110.144/28\",\n\t\t\t\"34.151.74.144/28\",\n\t\t\t\"34.152.50.64/28\",\n\t\t\t\"34.154.114.144/28\",\n\t\t\t\"34.155.98.32/28\",\n\t\t\t\"34.165.18.176/28\",\n\t\t\t\"34.175.160.64/28\",\n\t\t\t\"34.176.130.16/28\",\n\t\t\t\"34.22.85.0/27\",\n\t\t\t\"34.64.82.64/28\",\n\t\t\t\"34.65.242.112/28\",\n\t\t\t\"34.80.50.80/28\",\n\t\t\t\"34.88.194.0/28\",\n\t\t\t\"34.89.10.80/28\",\n\t\t\t\"34.89.198.80/28\",\n\t\t\t\"34.96.162.48/28\",\n\t\t\t\"35.247.243.240/28\",\n\t\t\t\"66.249.64.0/27\",\n\t\t\t\"66.249.64.128/27\",\n\t\t\t\"66.249.64.160/27\",\n\t\t\t\"66.249.64.224/27\",\n\t\t\t\"66.249.64.32/27\",\n\t\t\t\"66.249.64.64/27\",\n\t\t\t\"66.249.64.96/27\",\n\t\t\t\"66.249.65.0/27\",\n\t\t\t\"66.249.65.160/27\",\n\t\t\t\"66.249.65.192/27\",\n\t\t\t\"66.249.65.224/27\",\n\t\t\t\"66.249.65.32/27\",\n\t\t\t\"66.249.65.64/27\",\n\t\t\t\"66.249.65.96/27\",\n\t\t\t\"66.249.66.0/27\",\n\t\t\t\"66.249.66.160/27\",\n\t\t\t\"66.249.66.192/27\",\n\t\t\t\"66.249.66.32/27\",\n\t\t\t\"66.249.66.64/27\",\n\t\t\t\"66.249.66.96/27\",\n\t\t\t\"66.249.68.0/27\",\n\t\t\t\"66.249.68.32/27\",\n\t\t\t\"66.249.68.64/27\",\n\t\t\t\"66.249.69.0/27\",\n\t\t\t\"66.249.69.128/27\",\n\t\t\t\"66.249.69.160/27\",\n\t\t\t\"66.249.69.192/27\",\n\t\t\t\"66.249.69.224/27\",\n\t\t\t\"66.249.69.32/27\",\n\t\t\t\"66.249.69.64/27\",\n\t\t\t\"66.249.69.96/27\",\n\t\t\t\"66.249.70.0/27\",\n\t\t\t\"66.249.70.128/27\",\n\t\t\t\"66.249.70.160/27\",\n\t\t\t\"66.249.70.192/27\",\n\t\t\t\"66.249.70.224/27\",\n\t\t\t\"66.249.70.32/27\",\n\t\t\t\"66.249.70.64/27\",\n\t\t\t\"66.249.70.96/27\",\n\t\t\t\"66.249.71.0/27\",\n\t\t\t\"66.249.71.128/27\",\n\t\t\t\"66.249.71.160/27\",\n\t\t\t\"66.249.71.192/27\",\n\t\t\t\"66.249.71.224/27\",\n\t\t\t\"66.249.71.32/27\",\n\t\t\t\"66.249.71.64/27\",\n\t\t\t\"66.249.71.96/27\",\n\t\t\t\"66.249.72.0/27\",\n\t\t\t\"66.249.72.128/27\",\n\t\t\t\"66.249.72.160/27\",\n\t\t\t\"66.249.72.192/27\",\n\t\t\t\"66.249.72.224/27\",\n\t\t\t\"66.249.72.32/27\",\n\t\t\t\"66.249.72.64/27\",\n\t\t\t\"66.249.72.96/27\",\n\t\t\t\"66.249.73.0/27\",\n\t\t\t\"66.249.73.128/27\",\n\t\t\t\"66.249.73.160/27\",\n\t\t\t\"66.249.73.192/27\",\n\t\t\t\"66.249.73.224/27\",\n\t\t\t\"66.249.73.32/27\",\n\t\t\t\"66.249.73.64/27\",\n\t\t\t\"66.249.73.96/27\",\n\t\t\t\"66.249.74.0/27\",\n\t\t\t\"66.249.74.128/27\",\n\t\t\t\"66.249.74.32/27\",\n\t\t\t\"66.249.74.64/27\",\n\t\t\t\"66.249.74.96/27\",\n\t\t\t\"66.249.75.0/27\",\n\t\t\t\"66.249.75.128/27\",\n\t\t\t\"66.249.75.160/27\",\n\t\t\t\"66.249.75.192/27\",\n\t\t\t\"66.249.75.224/27\",\n\t\t\t\"66.249.75.32/27\",\n\t\t\t\"66.249.75.64/27\",\n\t\t\t\"66.249.75.96/27\",\n\t\t\t\"66.249.76.0/27\",\n\t\t\t\"66.249.76.128/27\",\n\t\t\t\"66.249.76.160/27\",\n\t\t\t\"66.249.76.192/27\",\n\t\t\t\"66.249.76.224/27\",\n\t\t\t\"66.249.76.32/27\",\n\t\t\t\"66.249.76.64/27\",\n\t\t\t\"66.249.76.96/27\",\n\t\t\t\"66.249.77.0/27\",\n\t\t\t\"66.249.77.128/27\",\n\t\t\t\"66.249.77.160/27\",\n\t\t\t\"66.249.77.192/27\",\n\t\t\t\"66.249.77.224/27\",\n\t\t\t\"66.249.77.32/27\",\n\t\t\t\"66.249.77.64/27\",\n\t\t\t\"66.249.77.96/27\",\n\t\t\t\"66.249.78.0/27\",\n\t\t\t\"66.249.78.32/27\",\n\t\t\t\"66.249.79.0/27\",\n\t\t\t\"66.249.79.128/27\",\n\t\t\t\"66.249.79.160/27\",\n\t\t\t\"66.249.79.192/27\",\n\t\t\t\"66.249.79.224/27\",\n\t\t\t\"66.249.79.32/27\",\n\t\t\t\"66.249.79.64/27\",\n\t\t\t\"66.249.79.96/27\",\n\t\t\t\"2001:4860:4801:2008::/64\",\n\t\t\t\"2001:4860:4801:200c::/64\",\n\t\t\t\"2001:4860:4801:200d::/64\",\n\t\t\t\"2001:4860:4801:2010::/64\",\n\t\t\t\"2001:4860:4801:2011::/64\",\n\t\t\t\"2001:4860:4801:2012::/64\",\n\t\t\t\"2001:4860:4801:2013::/64\",\n\t\t\t\"2001:4860:4801:2014::/64\",\n\t\t\t\"2001:4860:4801:2015::/64\",\n\t\t\t\"2001:4860:4801:2016::/64\",\n\t\t\t\"2001:4860:4801:2017::/64\",\n\t\t\t\"2001:4860:4801:2018::/64\",\n\t\t\t\"2001:4860:4801:2019::/64\",\n\t\t\t\"2001:4860:4801:201a::/64\",\n\t\t\t\"2001:4860:4801:201b::/64\",\n\t\t\t\"2001:4860:4801:201c::/64\",\n\t\t\t\"2001:4860:4801:201d::/64\",\n\t\t\t\"2001:4860:4801:201e::/64\",\n\t\t\t\"2001:4860:4801:2020::/64\",\n\t\t\t\"2001:4860:4801:2021::/64\",\n\t\t\t\"2001:4860:4801:2022::/64\",\n\t\t\t\"2001:4860:4801:2023::/64\",\n\t\t\t\"2001:4860:4801:2024::/64\",\n\t\t\t\"2001:4860:4801:2025::/64\",\n\t\t\t\"2001:4860:4801:2026::/64\",\n\t\t\t\"2001:4860:4801:2027::/64\",\n\t\t\t\"2001:4860:4801:2028::/64\",\n\t\t\t\"2001:4860:4801:2029::/64\",\n\t\t\t\"2001:4860:4801:202a::/64\",\n\t\t\t\"2001:4860:4801:202b::/64\",\n\t\t\t\"2001:4860:4801:202c::/64\",\n\t\t\t\"2001:4860:4801:202d::/64\",\n\t\t\t\"2001:4860:4801:202e::/64\",\n\t\t\t\"2001:4860:4801:202f::/64\",\n\t\t\t\"2001:4860:4801:2031::/64\",\n\t\t\t\"2001:4860:4801:2032::/64\",\n\t\t\t\"2001:4860:4801:2033::/64\",\n\t\t\t\"2001:4860:4801:2034::/64\",\n\t\t\t\"2001:4860:4801:2035::/64\",\n\t\t\t\"2001:4860:4801:2036::/64\",\n\t\t\t\"2001:4860:4801:2037::/64\",\n\t\t\t\"2001:4860:4801:2038::/64\",\n\t\t\t\"2001:4860:4801:2039::/64\",\n\t\t\t\"2001:4860:4801:203a::/64\",\n\t\t\t\"2001:4860:4801:203b::/64\",\n\t\t\t\"2001:4860:4801:203c::/64\",\n\t\t\t\"2001:4860:4801:203d::/64\",\n\t\t\t\"2001:4860:4801:203e::/64\",\n\t\t\t\"2001:4860:4801:2040::/64\",\n\t\t\t\"2001:4860:4801:2041::/64\",\n\t\t\t\"2001:4860:4801:2042::/64\",\n\t\t\t\"2001:4860:4801:2043::/64\",\n\t\t\t\"2001:4860:4801:2044::/64\",\n\t\t\t\"2001:4860:4801:2045::/64\",\n\t\t\t\"2001:4860:4801:2046::/64\",\n\t\t\t\"2001:4860:4801:2047::/64\",\n\t\t\t\"2001:4860:4801:2048::/64\",\n\t\t\t\"2001:4860:4801:2049::/64\",\n\t\t\t\"2001:4860:4801:204a::/64\",\n\t\t\t\"2001:4860:4801:2050::/64\",\n\t\t\t\"2001:4860:4801:2051::/64\",\n\t\t\t\"2001:4860:4801:2052::/64\",\n\t\t\t\"2001:4860:4801:2053::/64\",\n\t\t\t\"2001:4860:4801:2054::/64\",\n\t\t\t\"2001:4860:4801:2060::/64\",\n\t\t\t\"2001:4860:4801:2061::/64\",\n\t\t\t\"2001:4860:4801:2062::/64\",\n\t\t\t\"2001:4860:4801:2063::/64\",\n\t\t\t\"2001:4860:4801:2064::/64\",\n\t\t\t\"2001:4860:4801:2065::/64\",\n\t\t\t\"2001:4860:4801:2066::/64\",\n\t\t\t\"2001:4860:4801:2067::/64\",\n\t\t\t\"2001:4860:4801:2068::/64\",\n\t\t\t\"2001:4860:4801:2069::/64\",\n\t\t\t\"2001:4860:4801:206a::/64\",\n\t\t\t\"2001:4860:4801:206b::/64\",\n\t\t\t\"2001:4860:4801:206c::/64\",\n\t\t\t\"2001:4860:4801:206d::/64\",\n\t\t\t\"2001:4860:4801:206e::/64\",\n\t\t\t\"2001:4860:4801:206f::/64\",\n\t\t\t\"2001:4860:4801:2070::/64\",\n\t\t\t\"2001:4860:4801:2071::/64\",\n\t\t\t\"2001:4860:4801:2072::/64\",\n\t\t\t\"2001:4860:4801:2073::/64\",\n\t\t\t\"2001:4860:4801:2074::/64\",\n\t\t\t\"2001:4860:4801:2075::/64\",\n\t\t\t\"2001:4860:4801:2076::/64\",\n\t\t\t\"2001:4860:4801:2077::/64\",\n\t\t\t\"2001:4860:4801:2078::/64\",\n\t\t\t\"2001:4860:4801:2079::/64\",\n\t\t\t\"2001:4860:4801:2080::/64\",\n\t\t\t\"2001:4860:4801:2081::/64\",\n\t\t\t\"2001:4860:4801:2082::/64\",\n\t\t\t\"2001:4860:4801:2083::/64\",\n\t\t\t\"2001:4860:4801:2084::/64\",\n\t\t\t\"2001:4860:4801:2085::/64\",\n\t\t\t\"2001:4860:4801:2086::/64\",\n\t\t\t\"2001:4860:4801:2087::/64\",\n\t\t\t\"2001:4860:4801:2088::/64\",\n\t\t\t\"2001:4860:4801:2090::/64\",\n\t\t\t\"2001:4860:4801:2091::/64\",\n\t\t\t\"2001:4860:4801:2092::/64\",\n\t\t\t\"2001:4860:4801:2093::/64\",\n\t\t\t\"192.178.17.0/27\",\n\t\t\t\"209.85.238.0/27\",\n\t\t\t\"209.85.238.128/27\",\n\t\t\t\"209.85.238.160/27\",\n\t\t\t\"209.85.238.192/27\",\n\t\t\t\"209.85.238.224/27\",\n\t\t\t\"209.85.238.32/27\",\n\t\t\t\"209.85.238.64/27\",\n\t\t\t\"209.85.238.96/27\",\n\t\t\t\"66.249.87.0/27\",\n\t\t\t\"66.249.87.128/27\",\n\t\t\t\"66.249.87.160/27\",\n\t\t\t\"66.249.87.192/27\",\n\t\t\t\"66.249.87.224/27\",\n\t\t\t\"66.249.87.32/27\",\n\t\t\t\"66.249.87.64/27\",\n\t\t\t\"66.249.87.96/27\",\n\t\t\t\"66.249.89.0/27\",\n\t\t\t\"66.249.89.128/27\",\n\t\t\t\"66.249.89.160/27\",\n\t\t\t\"66.249.89.224/27\",\n\t\t\t\"66.249.89.32/27\",\n\t\t\t\"66.249.89.64/27\",\n\t\t\t\"66.249.89.96/27\",\n\t\t\t\"66.249.90.0/27\",\n\t\t\t\"66.249.90.128/27\",\n\t\t\t\"66.249.90.160/27\",\n\t\t\t\"66.249.90.192/27\",\n\t\t\t\"66.249.90.224/27\",\n\t\t\t\"66.249.90.32/27\",\n\t\t\t\"66.249.90.96/27\",\n\t\t\t\"66.249.91.0/27\",\n\t\t\t\"66.249.91.128/27\",\n\t\t\t\"66.249.91.160/27\",\n\t\t\t\"66.249.91.192/27\",\n\t\t\t\"66.249.91.224/27\",\n\t\t\t\"66.249.91.32/27\",\n\t\t\t\"66.249.91.64/27\",\n\t\t\t\"66.249.91.96/27\",\n\t\t\t\"66.249.92.0/27\",\n\t\t\t\"66.249.92.128/27\",\n\t\t\t\"66.249.92.160/27\",\n\t\t\t\"66.249.92.192/27\",\n\t\t\t\"66.249.92.32/27\",\n\t\t\t\"66.249.92.96/27\",\n\t\t\t\"72.14.199.0/27\",\n\t\t\t\"72.14.199.128/27\",\n\t\t\t\"72.14.199.160/27\",\n\t\t\t\"72.14.199.192/27\",\n\t\t\t\"72.14.199.224/27\",\n\t\t\t\"72.14.199.32/27\",\n\t\t\t\"72.14.199.64/27\",\n\t\t\t\"72.14.199.96/27\",\n\t\t\t\"74.125.148.0/27\",\n\t\t\t\"74.125.148.128/27\",\n\t\t\t\"74.125.148.160/27\",\n\t\t\t\"74.125.148.192/27\",\n\t\t\t\"74.125.148.224/27\",\n\t\t\t\"74.125.148.32/27\",\n\t\t\t\"74.125.148.64/27\",\n\t\t\t\"74.125.148.96/27\",\n\t\t\t\"74.125.149.0/27\",\n\t\t\t\"74.125.149.128/27\",\n\t\t\t\"74.125.149.160/27\",\n\t\t\t\"74.125.149.192/27\",\n\t\t\t\"74.125.149.224/27\",\n\t\t\t\"74.125.149.32/27\",\n\t\t\t\"74.125.149.64/27\",\n\t\t\t\"74.125.149.96/27\",\n\t\t\t\"74.125.150.0/27\",\n\t\t\t\"74.125.150.32/27\",\n\t\t\t\"74.125.150.64/27\",\n\t\t\t\"74.125.151.0/27\",\n\t\t\t\"74.125.151.128/27\",\n\t\t\t\"74.125.151.160/27\",\n\t\t\t\"74.125.151.192/27\",\n\t\t\t\"74.125.151.224/27\",\n\t\t\t\"74.125.151.32/27\",\n\t\t\t\"74.125.151.64/27\",\n\t\t\t\"74.125.151.96/27\",\n\t\t\t\"74.125.216.0/27\",\n\t\t\t\"74.125.216.128/27\",\n\t\t\t\"74.125.216.160/27\",\n\t\t\t\"74.125.216.192/27\",\n\t\t\t\"74.125.216.224/27\",\n\t\t\t\"74.125.216.32/27\",\n\t\t\t\"74.125.216.64/27\",\n\t\t\t\"74.125.216.96/27\",\n\t\t\t\"74.125.217.0/27\",\n\t\t\t\"74.125.217.128/27\",\n\t\t\t\"74.125.217.32/27\",\n\t\t\t\"74.125.217.64/27\",\n\t\t\t\"74.125.217.96/27\",\n\t\t\t\"74.125.218.0/27\",\n\t\t\t\"74.125.218.128/27\",\n\t\t\t\"74.125.218.160/27\",\n\t\t\t\"74.125.218.192/27\",\n\t\t\t\"74.125.218.224/27\",\n\t\t\t\"74.125.218.32/27\",\n\t\t\t\"74.125.218.64/27\",\n\t\t\t\"74.125.218.96/27\",\n\t\t\t\"74.125.219.0/27\",\n\t\t\t\"74.125.219.32/27\",\n\t\t]\n\n\t\tconst facebook = [\n\t\t\t\"69.63.176.0/20\",\n\t\t\t\"66.220.144.0/20\",\n\t\t\t\"66.220.144.0/21\",\n\t\t\t\"69.63.184.0/21\",\n\t\t\t\"69.63.176.0/21\",\n\t\t\t\"74.119.76.0/22\",\n\t\t\t\"69.171.255.0/24\",\n\t\t\t\"173.252.64.0/18\",\n\t\t\t\"69.171.224.0/19\",\n\t\t\t\"69.171.224.0/20\",\n\t\t\t\"103.4.96.0/22\",\n\t\t\t\"173.252.64.0/19\",\n\t\t\t\"31.13.64.0/18\",\n\t\t\t\"31.13.24.0/21\",\n\t\t\t\"66.220.152.0/21\",\n\t\t\t\"69.171.239.0/24\",\n\t\t\t\"69.171.240.0/20\",\n\t\t\t\"31.13.64.0/19\",\n\t\t\t\"31.13.64.0/24\",\n\t\t\t\"31.13.65.0/24\",\n\t\t\t\"31.13.67.0/24\",\n\t\t\t\"31.13.68.0/24\",\n\t\t\t\"31.13.69.0/24\",\n\t\t\t\"31.13.70.0/24\",\n\t\t\t\"31.13.71.0/24\",\n\t\t\t\"31.13.72.0/24\",\n\t\t\t\"31.13.73.0/24\",\n\t\t\t\"31.13.74.0/24\",\n\t\t\t\"31.13.75.0/24\",\n\t\t\t\"31.13.76.0/24\",\n\t\t\t\"31.13.77.0/24\",\n\t\t\t\"31.13.96.0/19\",\n\t\t\t\"31.13.66.0/24\",\n\t\t\t\"173.252.96.0/19\",\n\t\t\t\"69.63.178.0/24\",\n\t\t\t\"31.13.78.0/24\",\n\t\t\t\"31.13.79.0/24\",\n\t\t\t\"31.13.80.0/24\",\n\t\t\t\"31.13.82.0/24\",\n\t\t\t\"31.13.83.0/24\",\n\t\t\t\"31.13.84.0/24\",\n\t\t\t\"31.13.85.0/24\",\n\t\t\t\"31.13.86.0/24\",\n\t\t\t\"31.13.87.0/24\",\n\t\t\t\"31.13.88.0/24\",\n\t\t\t\"31.13.89.0/24\",\n\t\t\t\"31.13.91.0/24\",\n\t\t\t\"31.13.92.0/24\",\n\t\t\t\"31.13.93.0/24\",\n\t\t\t\"31.13.94.0/24\",\n\t\t\t\"31.13.95.0/24\",\n\t\t\t\"31.13.81.0/24\",\n\t\t\t\"179.60.192.0/22\",\n\t\t\t\"179.60.192.0/24\",\n\t\t\t\"179.60.193.0/24\",\n\t\t\t\"179.60.194.0/24\",\n\t\t\t\"179.60.195.0/24\",\n\t\t\t\"185.60.216.0/22\",\n\t\t\t\"45.64.40.0/22\",\n\t\t\t\"185.60.216.0/24\",\n\t\t\t\"185.60.217.0/24\",\n\t\t\t\"185.60.218.0/24\",\n\t\t\t\"185.60.219.0/24\",\n\t\t\t\"129.134.0.0/16\",\n\t\t\t\"157.240.0.0/16\",\n\t\t\t\"157.240.8.0/24\",\n\t\t\t\"157.240.0.0/24\",\n\t\t\t\"157.240.1.0/24\",\n\t\t\t\"157.240.2.0/24\",\n\t\t\t\"157.240.3.0/24\",\n\t\t\t\"157.240.5.0/24\",\n\t\t\t\"157.240.6.0/24\",\n\t\t\t\"157.240.7.0/24\",\n\t\t\t\"157.240.9.0/24\",\n\t\t\t\"157.240.10.0/24\",\n\t\t\t\"157.240.16.0/24\",\n\t\t\t\"157.240.19.0/24\",\n\t\t\t\"157.240.11.0/24\",\n\t\t\t\"157.240.12.0/24\",\n\t\t\t\"157.240.13.0/24\",\n\t\t\t\"157.240.14.0/24\",\n\t\t\t\"157.240.15.0/24\",\n\t\t\t\"157.240.17.0/24\",\n\t\t\t\"157.240.18.0/24\",\n\t\t\t\"157.240.20.0/24\",\n\t\t\t\"157.240.21.0/24\",\n\t\t\t\"157.240.22.0/24\",\n\t\t\t\"157.240.23.0/24\",\n\t\t\t\"157.240.0.0/17\",\n\t\t\t\"69.171.250.0/24\",\n\t\t\t\"204.15.20.0/22\",\n\t\t\t\"157.240.192.0/24\",\n\t\t\t\"157.240.198.0/24\",\n\t\t\t\"102.132.96.0/20\",\n\t\t\t\"102.132.96.0/24\",\n\t\t\t\"102.132.97.0/24\",\n\t\t\t\"157.240.26.0/24\",\n\t\t\t\"157.240.27.0/24\",\n\t\t\t\"157.240.28.0/24\",\n\t\t\t\"157.240.29.0/24\",\n\t\t\t\"157.240.30.0/24\",\n\t\t\t\"129.134.28.0/24\",\n\t\t\t\"129.134.29.0/24\",\n\t\t\t\"157.240.208.0/24\",\n\t\t\t\"157.240.193.0/24\",\n\t\t\t\"157.240.194.0/24\",\n\t\t\t\"157.240.195.0/24\",\n\t\t\t\"157.240.197.0/24\",\n\t\t\t\"157.240.196.0/24\",\n\t\t\t\"157.240.200.0/24\",\n\t\t\t\"157.240.201.0/24\",\n\t\t\t\"157.240.203.0/24\",\n\t\t\t\"157.240.204.0/24\",\n\t\t\t\"157.240.205.0/24\",\n\t\t\t\"157.240.206.0/24\",\n\t\t\t\"157.240.207.0/24\",\n\t\t\t\"157.240.209.0/24\",\n\t\t\t\"157.240.210.0/24\",\n\t\t\t\"157.240.211.0/24\",\n\t\t\t\"157.240.212.0/24\",\n\t\t\t\"157.240.213.0/24\",\n\t\t\t\"157.240.214.0/24\",\n\t\t\t\"157.240.215.0/24\",\n\t\t\t\"157.240.216.0/24\",\n\t\t\t\"157.240.222.0/24\",\n\t\t\t\"129.134.30.0/24\",\n\t\t\t\"129.134.31.0/24\",\n\t\t\t\"129.134.30.0/23\",\n\t\t\t\"129.134.25.0/24\",\n\t\t\t\"129.134.26.0/24\",\n\t\t\t\"129.134.27.0/24\",\n\t\t\t\"102.132.99.0/24\",\n\t\t\t\"102.132.101.0/24\",\n\t\t\t\"129.134.64.0/24\",\n\t\t\t\"129.134.65.0/24\",\n\t\t\t\"129.134.66.0/24\",\n\t\t\t\"129.134.67.0/24\",\n\t\t\t\"157.240.219.0/24\",\n\t\t\t\"157.240.217.0/24\",\n\t\t\t\"157.240.218.0/24\",\n\t\t\t\"157.240.199.0/24\",\n\t\t\t\"129.134.127.0/24\",\n\t\t\t\"157.240.223.0/24\",\n\t\t\t\"157.240.192.0/18\",\n\t\t\t\"157.240.221.0/24\",\n\t\t\t\"157.240.220.0/24\",\n\t\t\t\"173.252.88.0/21\",\n\t\t\t\"129.134.68.0/24\",\n\t\t\t\"129.134.69.0/24\",\n\t\t\t\"129.134.70.0/24\",\n\t\t\t\"157.240.24.0/24\",\n\t\t\t\"157.240.25.0/24\",\n\t\t\t\"102.132.100.0/24\",\n\t\t\t\"157.240.31.0/24\",\n\t\t\t\"157.240.224.0/24\",\n\t\t\t\"129.134.71.0/24\",\n\t\t\t\"157.240.225.0/24\",\n\t\t\t\"157.240.226.0/24\",\n\t\t\t\"157.240.227.0/24\",\n\t\t\t\"129.134.0.0/17\",\n\t\t\t\"129.134.72.0/24\",\n\t\t\t\"129.134.73.0/24\",\n\t\t\t\"129.134.74.0/24\",\n\t\t\t\"185.89.218.0/24\",\n\t\t\t\"185.89.219.0/24\",\n\t\t\t\"185.89.218.0/23\",\n\t\t\t\"157.240.228.0/24\",\n\t\t\t\"157.240.229.0/24\",\n\t\t\t\"129.134.76.0/24\",\n\t\t\t\"129.134.75.0/24\",\n\t\t\t\"157.240.239.0/24\",\n\t\t\t\"157.240.240.0/24\",\n\t\t\t\"157.240.241.0/24\",\n\t\t\t\"157.240.231.0/24\",\n\t\t\t\"157.240.232.0/24\",\n\t\t\t\"157.240.233.0/24\",\n\t\t\t\"157.240.234.0/24\",\n\t\t\t\"157.240.235.0/24\",\n\t\t\t\"157.240.236.0/24\",\n\t\t\t\"129.134.77.0/24\",\n\t\t\t\"129.134.78.0/24\",\n\t\t\t\"129.134.79.0/24\",\n\t\t\t\"157.240.237.0/24\",\n\t\t\t\"157.240.238.0/24\",\n\t\t\t\"157.240.242.0/24\",\n\t\t\t\"157.240.243.0/24\",\n\t\t\t\"129.134.112.0/24\",\n\t\t\t\"157.240.100.0/24\",\n\t\t\t\"157.240.98.0/24\",\n\t\t\t\"157.240.96.0/24\",\n\t\t\t\"157.240.99.0/24\",\n\t\t\t\"157.240.101.0/24\",\n\t\t\t\"129.134.113.0/24\",\n\t\t\t\"129.134.114.0/24\",\n\t\t\t\"157.240.97.0/24\",\n\t\t\t\"129.134.115.0/24\",\n\t\t\t\"157.240.244.0/24\",\n\t\t\t\"157.240.245.0/24\",\n\t\t\t\"157.240.246.0/24\",\n\t\t\t\"157.240.247.0/24\",\n\t\t\t\"157.240.248.0/24\",\n\t\t\t\"157.240.249.0/24\",\n\t\t\t\"157.240.250.0/24\",\n\t\t\t\"163.70.128.0/17\",\n\t\t\t\"163.77.128.0/17\",\n\t\t\t\"157.240.251.0/24\",\n\t\t\t\"157.240.252.0/24\",\n\t\t\t\"157.240.253.0/24\",\n\t\t\t\"147.75.208.0/20\",\n\t\t\t\"157.240.254.0/24\",\n\t\t\t\"185.89.219.0/24\",\n\t\t\t\"185.89.218.0/24\",\n\t\t\t\"185.89.218.0/23\",\n\t\t\t\"185.89.216.0/22\",\n\t\t\t\"147.75.208.0/20\",\n\t\t\t\"204.15.20.0/22\",\n\t\t\t\"69.63.176.0/20\",\n\t\t\t\"69.63.176.0/21\",\n\t\t\t\"69.63.184.0/21\",\n\t\t\t\"66.220.144.0/20\",\n\t\t\t\"69.63.176.0/20\",\n\t\t\t\"2620:0:1c00::/40\",\n\t\t\t\"2a03:2880::/32\",\n\t\t\t\"2a03:2880:fffe::/48\",\n\t\t\t\"2a03:2880:ffff::/48\",\n\t\t\t\"2620:0:1cff::/48\",\n\t\t\t\"2a03:2880:f001::/48\",\n\t\t\t\"2a03:2880:f003::/48\",\n\t\t\t\"2a03:2880:f004::/48\",\n\t\t\t\"2a03:2880:f005::/48\",\n\t\t\t\"2a03:2880:f006::/48\",\n\t\t\t\"2a03:2880:f007::/48\",\n\t\t\t\"2a03:2880:f008::/48\",\n\t\t\t\"2a03:2880:f00a::/48\",\n\t\t\t\"2a03:2880:f00c::/48\",\n\t\t\t\"2a03:2880:f00d::/48\",\n\t\t\t\"2a03:2880:f00e::/48\",\n\t\t\t\"2a03:2880:f00f::/48\",\n\t\t\t\"2a03:2880:f010::/48\",\n\t\t\t\"2a03:2880:f011::/48\",\n\t\t\t\"2a03:2880:f012::/48\",\n\t\t\t\"2a03:2880:f013::/48\",\n\t\t\t\"2a03:2880:f016::/48\",\n\t\t\t\"2a03:2880:f017::/48\",\n\t\t\t\"2a03:2880:f019::/48\",\n\t\t\t\"2a03:2880:f01b::/48\",\n\t\t\t\"2a03:2880:f01c::/48\",\n\t\t\t\"2a03:2880:f01f::/48\",\n\t\t\t\"2a03:2880:1000::/36\",\n\t\t\t\"2a03:2880:2000::/36\",\n\t\t\t\"2a03:2880:3000::/36\",\n\t\t\t\"2a03:2880:4000::/36\",\n\t\t\t\"2a03:2880:5000::/36\",\n\t\t\t\"2a03:2880:6000::/36\",\n\t\t\t\"2a03:2880:7000::/36\",\n\t\t\t\"2a03:2880:f021::/48\",\n\t\t\t\"2a03:2880:f023::/48\",\n\t\t\t\"2a03:2880:f024::/48\",\n\t\t\t\"2a03:2880:f027::/48\",\n\t\t\t\"2a03:2880:f028::/48\",\n\t\t\t\"2a03:2880:f029::/48\",\n\t\t\t\"2a03:2880:f02b::/48\",\n\t\t\t\"2a03:2880:f02c::/48\",\n\t\t\t\"2a03:2880:f02d::/48\",\n\t\t\t\"2a03:2880:f02e::/48\",\n\t\t\t\"2a03:2880:f02f::/48\",\n\t\t\t\"2a03:2880:f030::/48\",\n\t\t\t\"2a03:2880:f031::/48\",\n\t\t\t\"2a03:2880:f032::/48\",\n\t\t\t\"2a03:2880:f033::/48\",\n\t\t\t\"2a03:2880:f034::/48\",\n\t\t\t\"2a03:2880:f035::/48\",\n\t\t\t\"2a03:2880:f036::/48\",\n\t\t\t\"2a03:2880:f037::/48\",\n\t\t\t\"2a03:2880:f038::/48\",\n\t\t\t\"2a03:2880:f03a::/48\",\n\t\t\t\"2a03:2880:f03b::/48\",\n\t\t\t\"2a03:2880:f03d::/48\",\n\t\t\t\"2a03:2880:f03e::/48\",\n\t\t\t\"2a03:2880:f03f::/48\",\n\t\t\t\"2401:db00::/32\",\n\t\t\t\"2a03:2880::/36\",\n\t\t\t\"2a03:2880:f101::/48\",\n\t\t\t\"2a03:2880:f201::/48\",\n\t\t\t\"2a03:2880:f103::/48\",\n\t\t\t\"2a03:2880:f203::/48\",\n\t\t\t\"2a03:2880:f104::/48\",\n\t\t\t\"2a03:2880:f204::/48\",\n\t\t\t\"2a03:2880:f107::/48\",\n\t\t\t\"2a03:2880:f207::/48\",\n\t\t\t\"2a03:2880:f108::/48\",\n\t\t\t\"2a03:2880:f208::/48\",\n\t\t\t\"2a03:2880:f10a::/48\",\n\t\t\t\"2a03:2880:f20a::/48\",\n\t\t\t\"2a03:2880:f10d::/48\",\n\t\t\t\"2a03:2880:f20d::/48\",\n\t\t\t\"2a03:2880:f10e::/48\",\n\t\t\t\"2a03:2880:f20e::/48\",\n\t\t\t\"2a03:2880:f10f::/48\",\n\t\t\t\"2a03:2880:f20f::/48\",\n\t\t\t\"2a03:2880:f110::/48\",\n\t\t\t\"2a03:2880:f210::/48\",\n\t\t\t\"2a03:2880:f111::/48\",\n\t\t\t\"2a03:2880:f211::/48\",\n\t\t\t\"2a03:2880:f112::/48\",\n\t\t\t\"2a03:2880:f212::/48\",\n\t\t\t\"2a03:2880:f116::/48\",\n\t\t\t\"2a03:2880:f216::/48\",\n\t\t\t\"2a03:2880:f117::/48\",\n\t\t\t\"2a03:2880:f217::/48\",\n\t\t\t\"2a03:2880:f119::/48\",\n\t\t\t\"2a03:2880:f219::/48\",\n\t\t\t\"2a03:2880:f11f::/48\",\n\t\t\t\"2a03:2880:f21f::/48\",\n\t\t\t\"2a03:2880:f121::/48\",\n\t\t\t\"2a03:2880:f221::/48\",\n\t\t\t\"2a03:2880:f123::/48\",\n\t\t\t\"2a03:2880:f223::/48\",\n\t\t\t\"2a03:2880:f10c::/48\",\n\t\t\t\"2a03:2880:f20c::/48\",\n\t\t\t\"2a03:2880:f105::/48\",\n\t\t\t\"2a03:2880:f205::/48\",\n\t\t\t\"2a03:2880:f106::/48\",\n\t\t\t\"2a03:2880:f206::/48\",\n\t\t\t\"2a03:2880:f11b::/48\",\n\t\t\t\"2a03:2880:f21b::/48\",\n\t\t\t\"2a03:2880:f113::/48\",\n\t\t\t\"2a03:2880:f213::/48\",\n\t\t\t\"2a03:2880:f11c::/48\",\n\t\t\t\"2a03:2880:f21c::/48\",\n\t\t\t\"2a03:2880:f128::/48\",\n\t\t\t\"2a03:2880:f228::/48\",\n\t\t\t\"2a03:2880:f02a::/48\",\n\t\t\t\"2a03:2880:f12a::/48\",\n\t\t\t\"2a03:2880:f22a::/48\",\n\t\t\t\"2a03:2880:f12f::/48\",\n\t\t\t\"2a03:2880:f22f::/48\",\n\t\t\t\"2a03:2880:f124::/48\",\n\t\t\t\"2a03:2880:f127::/48\",\n\t\t\t\"2a03:2880:f129::/48\",\n\t\t\t\"2a03:2880:f12b::/48\",\n\t\t\t\"2a03:2880:f12c::/48\",\n\t\t\t\"2a03:2880:f12d::/48\",\n\t\t\t\"2a03:2880:f12e::/48\",\n\t\t\t\"2a03:2880:f130::/48\",\n\t\t\t\"2a03:2880:f131::/48\",\n\t\t\t\"2a03:2880:f132::/48\",\n\t\t\t\"2a03:2880:f133::/48\",\n\t\t\t\"2a03:2880:f134::/48\",\n\t\t\t\"2a03:2880:f135::/48\",\n\t\t\t\"2a03:2880:f136::/48\",\n\t\t\t\"2a03:2880:f137::/48\",\n\t\t\t\"2a03:2880:f138::/48\",\n\t\t\t\"2a03:2880:f13a::/48\",\n\t\t\t\"2a03:2880:f13b::/48\",\n\t\t\t\"2a03:2880:f13d::/48\",\n\t\t\t\"2a03:2880:f13e::/48\",\n\t\t\t\"2a03:2880:f13f::/48\",\n\t\t\t\"2a03:2880:f224::/48\",\n\t\t\t\"2a03:2880:f227::/48\",\n\t\t\t\"2a03:2880:f229::/48\",\n\t\t\t\"2a03:2880:f22b::/48\",\n\t\t\t\"2a03:2880:f22c::/48\",\n\t\t\t\"2a03:2880:f22d::/48\",\n\t\t\t\"2a03:2880:f22e::/48\",\n\t\t\t\"2a03:2880:f230::/48\",\n\t\t\t\"2a03:2880:f231::/48\",\n\t\t\t\"2a03:2880:f232::/48\",\n\t\t\t\"2a03:2880:f233::/48\",\n\t\t\t\"2a03:2880:f234::/48\",\n\t\t\t\"2a03:2880:f235::/48\",\n\t\t\t\"2a03:2880:f236::/48\",\n\t\t\t\"2a03:2880:f237::/48\",\n\t\t\t\"2a03:2880:f238::/48\",\n\t\t\t\"2a03:2880:f23a::/48\",\n\t\t\t\"2a03:2880:f23b::/48\",\n\t\t\t\"2a03:2880:f23d::/48\",\n\t\t\t\"2a03:2880:f23e::/48\",\n\t\t\t\"2a03:2880:f23f::/48\",\n\t\t\t\"2a03:2880:f0ff::/48\",\n\t\t\t\"2a03:2880:f1ff::/48\",\n\t\t\t\"2a03:2880:f2ff::/48\",\n\t\t\t\"2a03:2880:f044::/48\",\n\t\t\t\"2a03:2880:f144::/48\",\n\t\t\t\"2a03:2880:f244::/48\",\n\t\t\t\"2a03:2880:f042::/48\",\n\t\t\t\"2a03:2880:f043::/48\",\n\t\t\t\"2a03:2880:f045::/48\",\n\t\t\t\"2a03:2880:f046::/48\",\n\t\t\t\"2a03:2880:f047::/48\",\n\t\t\t\"2a03:2880:f048::/48\",\n\t\t\t\"2a03:2880:f04a::/48\",\n\t\t\t\"2a03:2880:f04c::/48\",\n\t\t\t\"2a03:2880:f04b::/48\",\n\t\t\t\"2a03:2880:f04d::/48\",\n\t\t\t\"2a03:2880:f259::/48\",\n\t\t\t\"2a03:2880:f258::/48\",\n\t\t\t\"2a03:2880:f257::/48\",\n\t\t\t\"2a03:2880:f256::/48\",\n\t\t\t\"2a03:2880:f255::/48\",\n\t\t\t\"2a03:2880:f254::/48\",\n\t\t\t\"2a03:2880:f253::/48\",\n\t\t\t\"2a03:2880:f252::/48\",\n\t\t\t\"2a03:2880:f250::/48\",\n\t\t\t\"2a03:2880:f24f::/48\",\n\t\t\t\"2a03:2880:f24d::/48\",\n\t\t\t\"2a03:2880:f24e::/48\",\n\t\t\t\"2a03:2880:f24c::/48\",\n\t\t\t\"2a03:2880:f24b::/48\",\n\t\t\t\"2a03:2880:f24a::/48\",\n\t\t\t\"2a03:2880:f248::/48\",\n\t\t\t\"2a03:2880:f247::/48\",\n\t\t\t\"2a03:2880:f246::/48\",\n\t\t\t\"2a03:2880:f245::/48\",\n\t\t\t\"2a03:2880:f243::/48\",\n\t\t\t\"2a03:2880:f242::/48\",\n\t\t\t\"2a03:2880:f241::/48\",\n\t\t\t\"2a03:2880:f240::/48\",\n\t\t\t\"2a03:2880:f159::/48\",\n\t\t\t\"2a03:2880:f158::/48\",\n\t\t\t\"2a03:2880:f157::/48\",\n\t\t\t\"2a03:2880:f156::/48\",\n\t\t\t\"2a03:2880:f155::/48\",\n\t\t\t\"2a03:2880:f154::/48\",\n\t\t\t\"2a03:2880:f153::/48\",\n\t\t\t\"2a03:2880:f152::/48\",\n\t\t\t\"2a03:2880:f150::/48\",\n\t\t\t\"2a03:2880:f14f::/48\",\n\t\t\t\"2a03:2880:f14e::/48\",\n\t\t\t\"2a03:2880:f14d::/48\",\n\t\t\t\"2a03:2880:f14c::/48\",\n\t\t\t\"2a03:2880:f14b::/48\",\n\t\t\t\"2a03:2880:f14a::/48\",\n\t\t\t\"2a03:2880:f148::/48\",\n\t\t\t\"2a03:2880:f147::/48\",\n\t\t\t\"2a03:2880:f146::/48\",\n\t\t\t\"2a03:2880:f145::/48\",\n\t\t\t\"2a03:2880:f143::/48\",\n\t\t\t\"2a03:2880:f142::/48\",\n\t\t\t\"2a03:2880:f141::/48\",\n\t\t\t\"2a03:2880:f140::/48\",\n\t\t\t\"2a03:2880:f059::/48\",\n\t\t\t\"2a03:2880:f058::/48\",\n\t\t\t\"2a03:2880:f057::/48\",\n\t\t\t\"2a03:2880:f056::/48\",\n\t\t\t\"2a03:2880:f055::/48\",\n\t\t\t\"2a03:2880:f054::/48\",\n\t\t\t\"2a03:2880:f053::/48\",\n\t\t\t\"2a03:2880:f052::/48\",\n\t\t\t\"2a03:2880:f050::/48\",\n\t\t\t\"2a03:2880:f04f::/48\",\n\t\t\t\"2a03:2880:f04e::/48\",\n\t\t\t\"2a03:2880:ff0b::/48\",\n\t\t\t\"2a03:2880:ff0c::/48\",\n\t\t\t\"2a03:2880:f040::/48\",\n\t\t\t\"2a03:2880:f041::/48\",\n\t\t\t\"2a03:2880:f0fc::/48\",\n\t\t\t\"2a03:2880:f0fd::/48\",\n\t\t\t\"2a03:2880:f0fc::/47\",\n\t\t\t\"2a03:2880:f1fc::/48\",\n\t\t\t\"2a03:2880:f1fd::/48\",\n\t\t\t\"2a03:2880:f1fc::/47\",\n\t\t\t\"2a03:2880:ff08::/48\",\n\t\t\t\"2a03:2880:ff09::/48\",\n\t\t\t\"2a03:2880:ff0a::/48\",\n\t\t\t\"2a03:2880:f05e::/48\",\n\t\t\t\"2a03:2880:f15e::/48\",\n\t\t\t\"2a03:2880:f25e::/48\",\n\t\t\t\"2620:0:1cfa::/48\",\n\t\t\t\"2a03:2880:f05b::/48\",\n\t\t\t\"2a03:2880:f05a::/48\",\n\t\t\t\"2a03:2880:f25a::/48\",\n\t\t\t\"2a03:2880:f15c::/48\",\n\t\t\t\"2a03:2880:f000::/36\",\n\t\t\t\"2a03:2880:f05d::/48\",\n\t\t\t\"2a03:2880:f25c::/48\",\n\t\t\t\"2a03:2880:f05c::/48\",\n\t\t\t\"2a03:2880:f260::/48\",\n\t\t\t\"2a03:2880:f060::/48\",\n\t\t\t\"2a03:2880:f160::/48\",\n\t\t\t\"2a03:2880:f15d::/48\",\n\t\t\t\"2a03:2880:f25b::/48\",\n\t\t\t\"2a03:2880:f25d::/48\",\n\t\t\t\"2a03:2880:f15b::/48\",\n\t\t\t\"2a03:2880:f15a::/48\",\n\t\t\t\"2a03:2880:f161::/48\",\n\t\t\t\"2a03:2880:f061::/48\",\n\t\t\t\"2a03:2880:f261::/48\",\n\t\t\t\"2a03:2881::/32\",\n\t\t\t\"2a03:2881::/48\",\n\t\t\t\"2a03:2881:1::/48\",\n\t\t\t\"2a03:2881:2::/48\",\n\t\t\t\"2a03:2881:3::/48\",\n\t\t\t\"2a03:2880:f162::/48\",\n\t\t\t\"2a03:2880:f262::/48\",\n\t\t\t\"2a03:2881:4000::/48\",\n\t\t\t\"2a03:2881:4003::/48\",\n\t\t\t\"2a03:2881:4001::/48\",\n\t\t\t\"2a03:2881:4002::/48\",\n\t\t\t\"2a03:2880:f065::/48\",\n\t\t\t\"2a03:2880:f163::/48\",\n\t\t\t\"2a03:2880:f066::/48\",\n\t\t\t\"2a03:2880:f263::/48\",\n\t\t\t\"2a03:2880:f264::/48\",\n\t\t\t\"2a03:2880:f164::/48\",\n\t\t\t\"2a03:2880:f067::/48\",\n\t\t\t\"2a03:2880:f165::/48\",\n\t\t\t\"2a03:2880:f265::/48\",\n\t\t\t\"2a03:2880:f068::/48\",\n\t\t\t\"2a03:2881:4004::/48\",\n\t\t\t\"2a03:2880:f06a::/48\",\n\t\t\t\"2a03:2880:f266::/48\",\n\t\t\t\"2a03:2880:f166::/48\",\n\t\t\t\"2a03:2880:f267::/48\",\n\t\t\t\"2a03:2880:f06b::/48\",\n\t\t\t\"2a03:2880:f167::/48\",\n\t\t\t\"2a03:2881:4006::/48\",\n\t\t\t\"2a03:2881:7::/48\",\n\t\t\t\"2a03:2881:9::/48\",\n\t\t\t\"2a03:2881:8::/48\",\n\t\t\t\"2a03:2881:4::/48\",\n\t\t\t\"2a03:2881:6::/48\",\n\t\t\t\"2a03:2881:5::/48\",\n\t\t\t\"2a03:2881:a::/48\",\n\t\t\t\"2a03:2880:f268::/48\",\n\t\t\t\"2a03:2880:f06d::/48\",\n\t\t\t\"2a03:2880:f168::/48\",\n\t\t\t\"2a03:2881:b::/48\",\n\t\t\t\"2a03:2881:c::/48\",\n\t\t\t\"2a03:2881:4007::/48\",\n\t\t\t\"2a03:2880:f269::/48\",\n\t\t\t\"2a03:2880:f169::/48\",\n\t\t\t\"2a03:2880:f06f::/48\",\n\t\t\t\"2a03:2880:f26a::/48\",\n\t\t\t\"2a03:2880:f16a::/48\",\n\t\t\t\"2a03:2880:f070::/48\",\n\t\t\t\"2a03:2881:d::/48\",\n\t\t\t\"2a03:2881:e::/48\",\n\t\t\t\"2a03:2880:f071::/48\",\n\t\t\t\"2a03:2880:f16b::/48\",\n\t\t\t\"2a03:2880:f26b::/48\",\n\t\t\t\"2a03:2881:4008::/48\",\n\t\t\t\"2a03:2881:10::/48\",\n\t\t\t\"2a03:2881:f::/48\",\n\t\t\t\"2a03:2881:11::/48\",\n\t\t\t\"2a03:2880:f26c::/48\",\n\t\t\t\"2a03:2880:f16c::/48\",\n\t\t\t\"2a03:2880:f073::/48\",\n\t\t\t\"2a03:2880:f16d::/48\",\n\t\t\t\"2a03:2880:f074::/48\",\n\t\t\t\"2a03:2880:f26d::/48\",\n\t\t\t\"2a03:2881:4009::/48\",\n\t\t\t\"2a03:2880:f26e::/48\",\n\t\t\t\"2a03:2880:f16e::/48\",\n\t\t\t\"2a03:2880:f076::/48\",\n\t\t\t\"2a03:2880:f16f::/48\",\n\t\t\t\"2a03:2880:f26f::/48\",\n\t\t\t\"2a03:2880:f077::/48\",\n\t\t\t\"2a03:2881:12::/48\",\n\t\t\t\"2a03:2881:13::/48\",\n\t\t\t\"2a03:2881:17::/48\",\n\t\t\t\"2a03:2881:15::/48\",\n\t\t\t\"2a03:2881:18::/48\",\n\t\t\t\"2a03:2881:14::/48\",\n\t\t\t\"2a03:2881:16::/48\",\n\t\t\t\"2a03:2881:19::/48\",\n\t\t\t\"2a03:2881:4005::/48\",\n\t\t\t\"2a03:2880:f078::/48\",\n\t\t\t\"2a03:2880:f170::/48\",\n\t\t\t\"2a03:2880:f270::/48\",\n\t\t\t\"2a03:2881:400a::/48\",\n\t\t\t\"2a03:2881:400c::/48\",\n\t\t\t\"2a03:2881:400b::/48\",\n\t\t\t\"2a03:2881:400d::/48\",\n\t\t\t\"2a03:2881:1a::/48\",\n\t\t\t\"2a03:2881:1c::/48\",\n\t\t\t\"2a03:2881:1b::/48\",\n\t\t\t\"2a03:2880:f271::/48\",\n\t\t\t\"2a03:2880:f07d::/48\",\n\t\t\t\"2a03:2880:f171::/48\",\n\t\t\t\"2a03:2880:f07e::/48\",\n\t\t\t\"2a03:2880:f172::/48\",\n\t\t\t\"2a03:2880:f272::/48\",\n\t\t\t\"2a03:2880:f080::/48\",\n\t\t\t\"2a03:2880:f173::/48\",\n\t\t\t\"2a03:2880:f273::/48\",\n\t\t\t\"2a03:2880:f081::/48\",\n\t\t\t\"2a03:2880:f174::/48\",\n\t\t\t\"2a03:2880:f274::/48\",\n\t\t\t\"2a03:2880:f175::/48\",\n\t\t\t\"2a03:2880:f275::/48\",\n\t\t\t\"2a03:2880:f082::/48\",\n\t\t\t\"2a03:2880:f176::/48\",\n\t\t\t\"2a03:2880:f276::/48\",\n\t\t\t\"2a03:2880:f083::/48\",\n\t\t\t\"2a03:2880:f277::/48\",\n\t\t\t\"2a03:2880:f084::/48\",\n\t\t\t\"2a03:2880:f177::/48\",\n\t\t\t\"2a03:2881:1e::/48\",\n\t\t\t\"2a03:2880:f085::/48\",\n\t\t\t\"2a03:2880:f178::/48\",\n\t\t\t\"2a03:2880:f278::/48\",\n\t\t\t\"2a03:2880:f179::/48\",\n\t\t\t\"2a03:2880:f086::/48\",\n\t\t\t\"2a03:2880:f279::/48\",\n\t\t\t\"2a03:2880:f17a::/48\",\n\t\t\t\"2a03:2880:f08a::/48\",\n\t\t\t\"2a03:2880:f27a::/48\",\n\t\t\t\"2a03:2881:48::/45\",\n\t\t\t\"2a10:f781:10:cee0::/64\",\n\t\t\t\"2a03:83e0::/32\",\n\t\t]\n\n\t\tconst twitter = [\n\t\t\t\"199.16.156.0/22\",\n\t\t\t\"199.59.148.0/22\",\n\t\t\t\"192.133.76.0/22\",\n\t\t]\n\n\t\tconst bing = [\n\t\t\t\"157.55.39.0/24\",\n\t\t\t\"207.46.13.0/24\",\n\t\t\t\"40.77.167.0/24\",\n\t\t\t\"13.66.139.0/24\",\n\t\t\t\"13.66.144.0/24\",\n\t\t\t\"52.167.144.0/24\",\n\t\t\t\"13.67.10.16/28\",\n\t\t\t\"13.69.66.240/28\",\n\t\t\t\"13.71.172.224/28\",\n\t\t\t\"139.217.52.0/28\",\n\t\t\t\"191.233.204.224/28\",\n\t\t\t\"20.36.108.32/28\",\n\t\t\t\"20.43.120.16/28\",\n\t\t\t\"40.79.131.208/28\",\n\t\t\t\"40.79.186.176/28\",\n\t\t\t\"52.231.148.0/28\",\n\t\t\t\"20.79.107.240/28\",\n\t\t\t\"51.105.67.0/28\",\n\t\t\t\"20.125.163.80/28\",\n\t\t\t\"40.77.188.0/22\",\n\t\t\t\"65.55.210.0/24\",\n\t\t\t\"199.30.24.0/23\",\n\t\t\t\"40.77.202.0/24\",\n\t\t\t\"40.77.139.0/25\",\n\t\t\t\"20.74.197.0/28\",\n\t\t]\n\n\t\tconst pinterest = [\n\t\t\t\"54.236.1.1/32\",\n\t\t\t\"54.236.1.2/31\",\n\t\t\t\"54.236.1.4/30\",\n\t\t\t\"54.236.1.8/29\",\n\t\t\t\"54.236.1.16/28\",\n\t\t\t\"54.236.1.32/27\",\n\t\t\t\"54.236.1.64/26\",\n\t\t\t\"54.236.1.128/25\",\n\t\t]\n\n\t\tconst hotjar = [\n\t\t\t\"18.203.61.76\",\n\t\t\t\"18.203.176.135\",\n\t\t\t\"52.17.197.221\",\n\t\t]\n\n\t\tconst alexa = [\n\t\t\t\"204.236.235.245\",\n\t\t\t\"75.101.186.145\",\n\t\t]\n\n\t\tconst amazon = [\n\t\t\t\"18.207.141.103\",\n\t\t\t\"52.1.113.12\",\n\t\t]\n\n\t\tconst baidu = [\n\t\t\t\"180.76.15.0/24\",\n\t\t\t\"119.63.196.0/24\",\n\t\t\t\"115.239.212.0/24\",\n\t\t\t\"119.63.199.0/24\",\n\t\t\t\"122.81.208.0/22\",\n\t\t\t\"123.125.71.0/24\",\n\t\t\t\"180.76.4.0/24\",\n\t\t\t\"180.76.5.0/24\",\n\t\t\t\"180.76.6.0/24\",\n\t\t\t\"185.10.104.0/24\",\n\t\t\t\"220.181.108.0/24\",\n\t\t\t\"220.181.51.0/24\",\n\t\t\t\"111.13.102.0/24\",\n\t\t\t\"123.125.67.144/29\",\n\t\t\t\"123.125.67.152/31\",\n\t\t\t\"61.135.169.0/24\",\n\t\t\t\"123.125.68.68/30\",\n\t\t\t\"123.125.68.72/29\",\n\t\t\t\"123.125.68.80/28\",\n\t\t\t\"123.125.68.96/30\",\n\t\t\t\"202.46.48.0/20\",\n\t\t\t\"220.181.38.0/24\",\n\t\t\t\"123.125.68.80/30\",\n\t\t\t\"123.125.68.84/31\",\n\t\t\t\"123.125.68.0/24\",\n\t\t]\n\n\t\tconst duckduckgo = [\n\t\t\t\"20.191.45.212\",\n\t\t\t\"40.88.21.235\",\n\t\t\t\"40.76.173.151\",\n\t\t\t\"40.76.163.7\",\n\t\t\t\"20.185.79.47\",\n\t\t\t\"52.142.26.175\",\n\t\t\t\"20.185.79.15\",\n\t\t\t\"52.142.24.149\",\n\t\t\t\"40.76.162.208\",\n\t\t\t\"40.76.163.23\",\n\t\t\t\"40.76.162.191\",\n\t\t\t\"40.76.162.247\",\n\t\t]\n\n\t\tconst yahoo = [\n\t\t\t\"5.255.250.0/24\",\n\t\t\t\"37.9.87.0/24\",\n\t\t\t\"67.195.37.0/24\",\n\t\t\t\"67.195.50.0/24\",\n\t\t\t\"67.195.110.0/24\",\n\t\t\t\"67.195.111.0/24\",\n\t\t\t\"67.195.112.0/23\",\n\t\t\t\"67.195.114.0/24\",\n\t\t\t\"67.195.115.0/24\",\n\t\t\t\"68.180.224.0/21\",\n\t\t\t\"72.30.132.0/24\",\n\t\t\t\"72.30.142.0/24\",\n\t\t\t\"72.30.161.0/24\",\n\t\t\t\"72.30.196.0/24\",\n\t\t\t\"72.30.198.0/24\",\n\t\t\t\"74.6.254.0/24\",\n\t\t\t\"74.6.8.0/24\",\n\t\t\t\"74.6.13.0/24\",\n\t\t\t\"74.6.17.0/24\",\n\t\t\t\"74.6.18.0/24\",\n\t\t\t\"74.6.22.0/24\",\n\t\t\t\"74.6.27.0/24\",\n\t\t\t\"74.6.168.0/24\",\n\t\t\t\"77.88.5.0/24\",\n\t\t\t\"77.88.47.0/24\",\n\t\t\t\"93.158.161.0/24\",\n\t\t\t\"98.137.72.0/24\",\n\t\t\t\"98.137.206.0/24\",\n\t\t\t\"98.137.207.0/24\",\n\t\t\t\"98.139.168.0/24\",\n\t\t\t\"114.111.95.0/24\",\n\t\t\t\"124.83.159.0/24\",\n\t\t\t\"124.83.179.0/24\",\n\t\t\t\"124.83.223.0/24\",\n\t\t\t\"141.8.144.0/24\",\n\t\t\t\"183.79.63.0/24\",\n\t\t\t\"183.79.92.0/24\",\n\t\t\t\"203.216.255.0/24\",\n\t\t\t\"211.14.11.0/24\",\n\t\t]\n\n\t\tconst yandex = [\n\t\t\t\"100.43.90.0/24\",\n\t\t\t\"37.9.115.0/24\",\n\t\t\t\"37.140.165.0/24\",\n\t\t\t\"77.88.22.0/25\",\n\t\t\t\"77.88.29.0/24\",\n\t\t\t\"77.88.31.0/24\",\n\t\t\t\"77.88.59.0/24\",\n\t\t\t\"84.201.146.0/24\",\n\t\t\t\"84.201.148.0/24\",\n\t\t\t\"84.201.149.0/24\",\n\t\t\t\"87.250.243.0/24\",\n\t\t\t\"87.250.253.0/24\",\n\t\t\t\"93.158.147.0/24\",\n\t\t\t\"93.158.148.0/24\",\n\t\t\t\"93.158.151.0/24\",\n\t\t\t\"93.158.153.0/32\",\n\t\t\t\"95.108.128.0/24\",\n\t\t\t\"95.108.138.0/24\",\n\t\t\t\"95.108.150.0/23\",\n\t\t\t\"95.108.158.0/24\",\n\t\t\t\"95.108.156.0/24\",\n\t\t\t\"95.108.188.128/25\",\n\t\t\t\"95.108.234.0/24\",\n\t\t\t\"95.108.248.0/24\",\n\t\t\t\"100.43.80.0/24\",\n\t\t\t\"130.193.62.0/24\",\n\t\t\t\"141.8.153.0/24\",\n\t\t\t\"178.154.165.0/24\",\n\t\t\t\"178.154.166.128/25\",\n\t\t\t\"178.154.173.29\",\n\t\t\t\"178.154.200.158\",\n\t\t\t\"178.154.202.0/24\",\n\t\t\t\"178.154.205.0/24\",\n\t\t\t\"178.154.239.0/24\",\n\t\t\t\"178.154.243.0/24\",\n\t\t\t\"37.9.84.253\",\n\t\t\t\"199.21.99.99\",\n\t\t\t\"178.154.162.29\",\n\t\t\t\"178.154.203.251\",\n\t\t\t\"178.154.211.250\",\n\t\t\t\"178.154.171.0/24\",\n\t\t\t\"178.154.200.0/24\",\n\t\t\t\"178.154.244.0/24\",\n\t\t\t\"178.154.246.0/24\",\n\t\t\t\"95.108.181.0/24\",\n\t\t\t\"95.108.246.252\",\n\t\t\t\"5.45.254.0/24\",\n\t\t\t\"5.255.253.0/24\",\n\t\t\t\"37.140.141.0/24\",\n\t\t\t\"37.140.188.0/24\",\n\t\t\t\"100.43.81.0/24\",\n\t\t\t\"100.43.85.0/24\",\n\t\t\t\"100.43.91.0/24\",\n\t\t\t\"199.21.99.0/24\",\n\t\t\t\"2a02:6b8:b000::/32\",\n\t\t\t\"2a02:6b8:b010::/32\",\n\t\t\t\"2a02:6b8:b011::/32\",\n\t\t\t\"2a02:6b8:c0e::/32\",\n\t\t]\n\n\t\tconst sogou = [\n\t\t\t\"220.181.125.0/24\",\n\t\t\t\"123.126.51.64/27\",\n\t\t\t\"123.126.51.96/28\",\n\t\t\t\"123.126.68.25\",\n\t\t\t\"61.135.189.74\",\n\t\t\t\"61.135.189.75\",\n\t\t]\n\n\t\tconst youdao = [\n\t\t\t\"61.135.249.200/29\",\n\t\t\t\"61.135.249.208/28\",\n\t\t]\n\n\t\tlet customExclusionList = []\n\n\t\t// if wpmDataLayer.general.server_2_server.ip_exclude_list is array\n\t\tif (Array.isArray(wpmDataLayer.general.server_2_server.ip_exclude_list)) {\n\t\t\tcustomExclusionList = wpmDataLayer.general.server_2_server.ip_exclude_list\n\t\t}\n\n\t\treturn blacklist.concat(\n\t\t\tgoogle,\n\t\t\tfacebook,\n\t\t\ttwitter,\n\t\t\tbing,\n\t\t\tpinterest,\n\t\t\thotjar,\n\t\t\talexa,\n\t\t\tamazon,\n\t\t\tbaidu,\n\t\t\tduckduckgo,\n\t\t\tyahoo,\n\t\t\tyandex,\n\t\t\tsogou,\n\t\t\tyoudao,\n\t\t\tcustomExclusionList,\n\t\t)\n\t}\n\n}(window.wpm = window.wpm || {}, jQuery))\n","document.addEventListener(\"doofinder.cart.add\", async event => {\n\n\tconst {item_id, amount} = event.detail\n\n\tif (!wpmDataLayer.products[item_id]) {\n\t\tawait wpm.getProductsFromBackend([item_id])\n\t}\n\n\tif (!wpmDataLayer.products[item_id]) {\n\t\tconsole.log(\"Product not found in dataLayer or server. Exiting...\")\n\t\treturn\n\t}\n\n\tlet product = wpm.getProductDetailsFormattedForEvent(item_id, amount)\n\n\tif (!product) {\n\t\tpmw.console.error(\"Product not found\")\n\t\treturn\n\t}\n\n\t// Trigger \"pmw:add-to-cart\" event using jQuery\n\tjQuery(document).trigger(\"pmw:add-to-cart\", product)\n})\n","/**\n * https://github.com/woocommerce/woocommerce-blocks/blob/trunk/src/BlockTypes/AbstractProductGrid.php#L108\n * https://github.com/woocommerce/woocommerce-blocks/issues/3483\n * https://github.com/woocommerce/woocommerce-blocks/issues/1714\n *\n * https://github.com/woocommerce/woocommerce-blocks/blob/trunk/docs/third-party-developers/extensibility/hooks/actions.md#woocommerce_add_to_cart\n *\n * https://github.com/woocommerce/woocommerce-blocks/blob/trunk/docs/internal-developers/blocks/feature-flags-and-experimental-interfaces.md\n * https://github.com/woocommerce/woocommerce-blocks/blob/trunk/docs/internal-developers/blocks/feature-flags-and-experimental-interfaces.md#usages-of-experimental-prefix\n *\n * experimental__woocommerce_blocks-product-list-render\n *\n * https://github.com/woocommerce/woocommerce-blocks/blob/a1a6eb2b574b7d39d19d67bafb747d38017289da/docs/internal-developers/blocks/feature-flags-and-experimental-interfaces.md/#usages-of-experimental-prefix\n */\n\n// TODO experimental__woocommerce_blocks-checkout-set-email-address\n// TODO experimental__woocommerce_blocks-product-view-link > selectItem\n// TODO maybe experimental__woocommerce_blocks-product-list-render, when product list is rendered send some list event\n// TODO maybe experimental__woocommerce_blocks-product-search, if the current event trigger doesn't work\n// TODO experimental__woocommerce_blocks-product-render > viewItem\n// TODO various events during entering checkout details, such as email, address, etc.\n// TODO find a way to keep view_item_list events working with the mutation observer\n\n// import {createHooks, addAction, doAction} from \"@wordpress/hooks\"\n// console.log(wp.hooks)\n// console.log(wp.hooks.applyFilters(\"ndx_change_string\", \"\"))\n\n/**\n * Add-to-cart button\n */\nwp.hooks.addAction(\n\t\"experimental__woocommerce_blocks-cart-add-item\",\n\t\"pixel-manager-for-woocommerce\",\n\tdata => {\n\t\t// console.log(\"experimental__woocommerce_blocks-cart-add-item\", data)\n\n\t\t// Works on the all product page\n\t\t// TODO make it work with variable quantities on product page\n\t\twpm.addProductToCart(data.product.id, 1);\n\t},\n);\n\n/**\n * Change cart quantity\n */\nwp.hooks.addAction(\n\t\"experimental__woocommerce_blocks-cart-set-item-quantity\",\n\t\"pixel-manager-for-woocommerce\",\n\tdata => {\n\t\t// console.log(\"experimental__woocommerce_blocks-cart-set-item-quantity\", data)\n\n\t\tif (data.quantity > data.product.quantity) {\n\t\t\twpm.addProductToCart(data.product.id, data.quantity - data.product.quantity);\n\t\t}\n\n\t\tif (data.quantity < data.product.quantity) {\n\t\t\twpm.removeProductFromCart(data.product.id, data.product.quantity - data.quantity);\n\t\t}\n\t},\n);\n\n/**\n * Remove from cart\n */\nwp.hooks.addAction(\n\t\"experimental__woocommerce_blocks-cart-remove-item\",\n\t\"pixel-manager-for-woocommerce\",\n\tdata => {\n\t\t// console.log(\"experimental__woocommerce_blocks-cart-remove-item\", data)\n\t\twpm.removeProductFromCart(data.product.id, data.quantity);\n\t},\n);\n\n/**\n * Start checkout\n */\n\n// wp.hooks.addAction(\n// \t\"experimental__woocommerce_blocks-checkout-render-checkout-form\",\n// \t\"pixel-manager-for-woocommerce\",\n// \tdata => {\n// \t\tconsole.log(\"experimental__woocommerce_blocks-checkout-render-checkout-form\", data)\n// \t\tjQuery(document).trigger(\"pmw:begin-checkout\")\n// \t},\n// )\n\n/**\n * Add shipping data\n *\n * @since 1.44.2\n */\n// Debounce function\nfunction debounce(func, wait) {\n\tlet timeout;\n\treturn function (...args) {\n\t\tclearTimeout(timeout);\n\t\ttimeout = setTimeout(() => func.apply(this, args), wait);\n\t};\n}\n\nconst checkMandatoryFields = debounce((data) => {\n\n\tlet mandatory_fields = [\"first_name\", \"last_name\", \"address_1\", \"city\", \"postcode\", \"country\"];\n\n\tif (!data.storeCart.shippingAddress || !mandatory_fields.every(field => data.storeCart.shippingAddress[field])) return;\n\n\t// console.log(\"experimental__woocommerce_blocks-checkout-set-shipping-address\", data);\n\tjQuery(document).trigger(\"pmw:add-shipping-info\", data);\n}, 2000);\n\n// Example usage\nwp.hooks.addAction(\n\t\"experimental__woocommerce_blocks-checkout-set-shipping-address\",\n\t\"pixel-manager-for-woocommerce\",\n\tdata => {\n\t\tcheckMandatoryFields(data);\n\t},\n);\n\n/**\n * Add payment method\n *\n * @since 1.44.2\n */\nwp.hooks.addAction(\n\t\"experimental__woocommerce_blocks-checkout-set-active-payment-method\",\n\t\"pixel-manager-for-woocommerce\",\n\tdata => {\n\t\t// console.log(\"experimental__woocommerce_blocks-checkout-set-active-payment-method\", data);\n\n\t\tlet payload = {paymentType: {text: data.value}};\n\n\t\tjQuery(document).trigger(\"pmw:add-payment-info\", payload);\n\t},\n);\n\n\n// wp.hooks.addAction(\n// \t\"experimental__woocommerce_blocks-checkout-set-selected-shipping-rate\",\n// \t\"pixel-manager-for-woocommerce\",\n// \tdata => {\n// \t\tconsole.log(\"experimental__woocommerce_blocks-checkout-set-selected-shipping-rate\", data);\n//\n// \t\tlet payload = {shippingMethod: {text: data.value}};\n//\n// \t\tjQuery(document).trigger(\"pmw:add-shipping-info\", payload);\n// \t},\n// );\n\n/**\n * Checkout form submit\n */\nwp.hooks.addAction(\n\t\"experimental__woocommerce_blocks-checkout-submit\",\n\t\"pixel-manager-for-woocommerce\",\n\t() => {\n\t\t// console.log(\"experimental__woocommerce_blocks-checkout-submit\")\n\t\tjQuery(document).trigger(\"pmw:place-order\", {});\n\t},\n);\n\n\n/**\n * Only outputs an object with products. No other data or actions.\n */\n// wp.hooks.addAction(\n// \t\"experimental__woocommerce_blocks-product-list-render\",\n// \t\"pixel-manager-for-woocommerce\",\n// \t(value) => {\n//\n// \t\tif (value.products.length > 0) {\n// \t\t\tconsole.log(\"hello world 1\")\n// \t\t\tconsole.log(value)\n//\n// \t\t\tjQuery(\".add_to_cart_button\").on(\"click\", function (event) {\n//\n// \t\t\t\tconsole.log(jQuery(event.target.parentElement.parentElement))\n//\n// \t\t\t\t// console.log(\"hello world 5\");\n// \t\t\t\t//\n// \t\t\t\t// console.log(jQuery(this.parentElement.parentElement));\n// \t\t\t\t//\n// \t\t\t\t// console.log(\"hello world 6\");\n// \t\t\t\t//\n// \t\t\t\t// // element is part of a React component.\n// \t\t\t\t// // Get the parent element.\n// \t\t\t\t// const pe = event.target.parentElement.parentElement\n// \t\t\t\t// console.log(jQuery(pe)._reactInternalFiber.key)\n// \t\t\t\t//\n// \t\t\t\t// // pe is a react component. Get the key of that component.\n// \t\t\t\t// const key = pe.getAttribute(\"data-key\")\n// \t\t\t\t// console.log(key)\n//\n//\n// \t\t\t\t// console.log(element.currentTarget.dataset.key)\n// \t\t\t})\n// \t\t}\n// \t\treturn value\n// \t},\n// )\n\n// jQuery(document).on(\"pmw:ready\", () => {\n// \tjQuery(\".add_to_cart_button\").on(\"click\", function (element) {\n//\n// \t\tconsole.log(\"hello world 3\")\n// \t\t// element is part of a React component.\n// \t\t// Get the key of that component.\n// \t\tconsole.log(element.currentTarget.dataset.key)\n// \t})\n// })\n\n// wp.hooks.addAction(\n// \t'woocommerce_add_to_cart',\n// \t'pixel-manager-for-woocommerce',\n// \t( cart_item_key, product_id, quantity, variation_id, variation, cart_item_data ) => {\n// \t\tconsole.log( cart_item_key, product_id, quantity, variation_id, variation, cart_item_data );\n// \t},\n// \t()=>{\n// \t\tconsole.log(\"hello world 2\")\n// \t}\n// )\n\n/**\n * Product Search\n *\n * TODO: Make sure that it doesn't duplicate the event\n */\n// wp.hooks.addAction(\n// \t\"experimental__woocommerce_blocks-product-search\",\n// \t\"pixel-manager-for-woocommerce\",\n// \tdata => {\n// \t\t// console.log(\"experimental__woocommerce_blocks-product-search\", data)\n// \t\tjQuery(document).trigger(\"pmw:search\", data.searchTerm)\n// \t},\n// )\n","/**\n * Pixel Manager Cookie Consent API\n **/\n\n/**\n * Accept consent for all cookies\n *\n * @param duration {number|null}\n * @returns {void}\n * @public\n */\nexport const acceptAll = ({duration = null} = {}) => {\n\n\tconst data = {\n\t\tstatistics : true,\n\t\tmarketing : true,\n\t\tpreferences: true,\n\t\tnecessary : true,\n\t\tduration : duration,\n\t}\n\n\tsaveState(data)\n\tloadApprovedPixels()\n\tdocument.dispatchEvent(new CustomEvent(\"pmw:consent:update\", {detail: data}))\n}\n\n/**\n * Revoke consent for all cookies\n *\n * @param duration {number|null}\n * @returns {void}\n * @public\n */\nexport const revokeAll = ({duration = null} = {}) => {\n\n\tconst data = {\n\t\tstatistics : false,\n\t\tmarketing : false,\n\t\tpreferences: false,\n\t\tnecessary : true,\n\t\tduration : duration,\n\t}\n\n\tsaveState(data)\n\tdocument.dispatchEvent(new CustomEvent(\"pmw:consent:update\", {detail: data}))\n}\n\n/**\n * Accept consent selectively\n *\n * @param statistics\n * @param marketing\n * @param preferences\n * @param necessary\n * @param duration\n * @returns {void}\n * @public\n */\nexport const updateSelectively = ({\n\t\t\t\t\t\t\t\t\t statistics = wpm.consent.categories.get().statistics,\n\t\t\t\t\t\t\t\t\t marketing = wpm.consent.categories.get().marketing,\n\t\t\t\t\t\t\t\t\t preferences = wpm.consent.categories.get().preferences,\n\t\t\t\t\t\t\t\t\t necessary = wpm.consent.categories.get().necessary,\n\t\t\t\t\t\t\t\t\t duration = null,\n\t\t\t\t\t\t\t\t }) => {\n\n\tif (statistics === undefined || marketing === undefined || preferences === undefined || necessary === undefined) {\n\t\tconsole.log(\"pmw.consent.api.updateSelectively: It is recommended to pass all consent types. - statistics, marketing, preferences\")\n\t}\n\n\tlet data = {\n\t\tstatistics,\n\t\tmarketing,\n\t\tpreferences,\n\t\tnecessary,\n\t\tduration,\n\t}\n\n\tsaveState(data)\n\tloadApprovedPixels()\n\tdocument.dispatchEvent(new CustomEvent(\"pmw:consent:update\", {detail: data}))\n}\n\n/**\n * Set a cookie called pmw_cookie_consent with the value of pmw_cookie_consent\n * and set the default expiration date to 1 year from now.\n *\n * @param statistics {boolean}\n * @param marketing {boolean}\n * @param preferences {boolean}\n * @param necessary {boolean}\n * @param duration {number|null}\n *\n * @returns {void}\n * @private\n *\n * TODO: Use the data store\n * TODO: Cleanup\n */\nconst setConsentCookie = ({statistics, marketing, preferences, necessary, duration = null}) => {\n\n\tconst key = \"pmw_cookie_consent\"\n\tconst data = {statistics, marketing, preferences, necessary}\n\n\t// If no duration is set, use the wpm storage,\n\t// otherwise use wpm.setCookie()\n\tif (duration === null) {\n\t\twpm.storeData(key, data, true)\n\t\treturn\n\t}\n\n\twpm.setCookie(\"pmw_cookie_consent\", JSON.stringify(data), duration)\n}\n\nconst loadApprovedPixels = () => {\n\tdocument.dispatchEvent(new Event(\"pmw:load-pixels\"))\n}\n\n/**\n * Save the consent in the settings and set the cookie\n *\n * @param data\n * @returns {void}\n * @private\n */\nconst saveState = (data) => {\n\twpm.consent.categories.set(data)\n\tsetConsentCookie(data)\n\tpmw.console.log(\"Updated consent state\", data)\n}\n\n/**\n * Process the consent update from the external source\n *\n * @param attributes\n * @returns {void}\n * @public\n */\nexport const processExternalGcmConsentUpdate_experimental = (attributes) => {\n\n\tif (attributes[0] !== \"consent\") return\n\tif (attributes[1] !== \"update\") return\n\tif (attributes[2]?.source === \"pmw\") return\n\n\tpmw.console.log(\"processExternalGcmConsentUpdate\", attributes)\n\n\tlet previousData = wpm.consent.categories.get()\n\n\tlet data = {\n\t\tstatistics : attributes[2].analytics_storage !== undefined ? attributes[2].analytics_storage === \"granted\" : previousData.statistics,\n\t\tmarketing : attributes[2].ad_storage !== undefined ? attributes[2].ad_storage === \"granted\" : previousData.marketing,\n\t\tpreferences: (attributes[2].functionality_storage !== undefined ? attributes[2].functionality_storage === \"granted\" : previousData.preferences) ||\n\t\t\t(attributes[2].personalization_storage !== undefined ? attributes[2].personalization_storage === \"granted\" : previousData.preferences),\n\t\tnecessary : attributes[2].security_storage !== undefined ? attributes[2].security_storage === \"granted\" : previousData.necessary,\n\t}\n\n\tsaveState(data)\n\tloadApprovedPixels()\n}\n\n","/**\n * Borlabs Cookie\n *\n * The PMW only supports the Borlabs Cookie version 2.x.\n * And it only supports category based consent.\n *\n * https://borlabs.io/borlabs-cookie/\n */\nexport const borlabs = {\n\n\t/**\n\t * Get the Borlabs Cookie cookie.\n\t *\n\t * @returns {{statistics: boolean, marketing: boolean, preferences: boolean, necessary: boolean}|null}\n\t **/\n\tgetConsent: () => {\n\n\t\tlet consent = wpm.getCookie(\"borlabs-cookie\")\n\n\t\tif (consent) {\n\n\t\t\tpmw.console.log(\"Borlabs Cookie CMP consent detected\")\n\n\t\t\tconsole.log(\"Pixel Manger: We deprecated direct support for Borlabs Cookie. Borlabs Cookie still can pass consent to PMW by using Google Consent Mode update calls which will be processd by the Pixel Manager.\")\n\n\t\t\tconsent = decodeURI(consent)\n\t\t\tconsent = JSON.parse(consent)\n\n\t\t\treturn {\n\t\t\t\tstatistics : consent?.consents?.statistics ?? true,\n\t\t\t\tmarketing : consent?.consents?.marketing ?? true,\n\t\t\t\tpreferences: true,\n\t\t\t\tnecessary : true,\n\t\t\t}\n\t\t}\n\n\t\treturn null\n\t},\n\n\t/**\n\t * Borlabs Cookie\n\t * If the visitor accepts cookies in Borlabs Cookie unblock the scripts.\n\t *\n\t * @returns {void}\n\t **/\n\tloadEventListeners: () => {\n\t\tdocument.addEventListener(\"borlabs-cookie-consent-saved\", () => {\n\t\t\t/**\n\t\t\t * Don't reload the page! (CMPs might emit the events on each page load, leading to a page reload loop)\n\t\t\t * Only try to save the consent in the PMW.\n\t\t\t */\n\t\t}, true)\n\t},\n}\n","/**\n * Complianz Cookie\n * https://wordpress.org/plugins/complianz-gdpr/\n *\n * TODO: Inform the developers. The event listener fires four times and has inconsistent data. As a consequence PMW has to update the consent status also four times which is inefficient.\n */\n\nexport const complianz = {\n\n\t/**\n\t * Get the Complianz cookies\n\t *\n\t * @returns {{statistics: boolean, marketing: boolean, preferences: boolean, necessary: boolean}|null}\n\t */\n\tgetConsent: () => {\n\n\t\t// console.log(\"getComplianzCookies\")\n\n\t\tlet cmplz_statistics = wpm.getCookie(\"cmplz_statistics\") || wpm.getCookie(\"cmplz_rt_statistics\")\n\t\tlet cmplz_marketing = wpm.getCookie(\"cmplz_marketing\") || wpm.getCookie(\"cmplz_rt_marketing\")\n\t\tlet cmplz_preferences = wpm.getCookie(\"cmplz_preferences\") || wpm.getCookie(\"cmplz_rt_preferences\")\n\t\tlet cmplz_necessary = wpm.getCookie(\"cmplz_functional\") || wpm.getCookie(\"cmplz_rt_functional\")\n\t\tlet cmplz_consent_status = wpm.getCookie(\"cmplz_consent_status\") || wpm.getCookie(\"cmplz_banner-status\") || wpm.getCookie(\"cmplz_rt_banner-status\")\n\n\t\tif (cmplz_consent_status) {\n\n\t\t\tpmw.console.log(\"Complianz CMP consent detected\")\n\n\t\t\treturn {\n\t\t\t\tstatistics : cmplz_statistics === \"\" || cmplz_statistics === \"allow\" ? true : false,\n\t\t\t\tmarketing : cmplz_marketing === \"\" || cmplz_marketing === \"allow\" ? true : false,\n\t\t\t\tpreferences: cmplz_preferences === \"\" || cmplz_preferences === \"allow\" ? true : false,\n\t\t\t\tnecessary : cmplz_necessary === \"\" || cmplz_necessary === \"allow\" ? true : false,\n\t\t\t}\n\t\t}\n\n\t\treturn null\n\t},\n\n\t/**\n\t * Complianz Cookie\n\t *\n\t * If visitor accepts cookies in Complianz unblock the scripts\n\t */\n\tloadEventListeners: () => {\n\t\tdocument.addEventListener(\"cmplz_fire_categories\", cmplzStatusChange, true)\n\t},\n}\n\n/**\n * Complianz\n *\n * @param consent\n */\nconst cmplzStatusChange = (consent) => {\n\n\tlet data = {\n\t\tstatistics : consent.detail.categories.includes(\"statistics\"),\n\t\tmarketing : consent.detail.categories.includes(\"marketing\"),\n\t\tpreferences: consent.detail.categories.includes(\"preferences\"),\n\t\tnecessary : consent.detail.categories.includes(\"functional\"),\n\t}\n\n\tpmw.consent.api.updateSelectively(data)\n}\n","/**\n * Cookiebot\n * https://wordpress.org/plugins/cookiebot/\n * https://support.cookiebot.com/hc/en-us/articles/360016047000-Cookiebot-and-Google-Consent-Mode\n */\nexport const cookiebot = {\n\n\t/**\n\t * Get the Cookiebot cookie.\n\t *\n\t * @returns {{statistics: boolean, marketing: boolean, preferences: boolean, necessary: boolean}|null}\n\t */\n\tgetConsent: () => {\n\n\t\t// let consent = \"{stamp:%27z5ZnyohzGbbYMhDdKsdXYMG3VT5a4l7mPBcyMeFe8vasPesmw/X1sQ==%27%2Cnecessary:true%2Cpreferences:true%2Cstatistics:false%2Cmarketing:true%2Cmethod:%27explicit%27%2Cver:1%2Cutc:1712435323862%2Cregion:%27ch%27}\"\n\t\tlet consent = wpm.getCookie(\"CookieConsent\")\n\n\t\tif (consent) {\n\n\t\t\tpmw.console.log(\"Cookiebot CMP consent detected\")\n\n\t\t\tif (isValidJson(consent)) {\n\t\t\t\tconsent = JSON.parse(consent)\n\t\t\t} else {\n\t\t\t\tconsent = decodeURI(consent)\n\t\t\t\tconsent = consent.replace(/'/g, \"\\\"\") // Replace single quotes with double quotes as JSON requires double quotes\n\t\t\t\tconsent = decodeURIComponent(consent)\n\t\t\t\tconsent = consent.replace(/(\\w+):/g, \"\\\"$1\\\":\") // Add double quotes to keys\n\t\t\t\tconsent = JSON.parse(consent)\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\tstatistics : consent.statistics ?? true,\n\t\t\t\tmarketing : consent.marketing ?? true,\n\t\t\t\tpreferences: consent.preferences ?? true,\n\t\t\t\tnecessary : consent.necessary ?? true,\n\t\t\t}\n\t\t}\n\n\t\treturn null\n\t},\n\n\t/**\n\t * Cookiebot\n\t * \tIf visitor accepts cookies in Cookiebot unblock the scripts\n\t *\n\t * \tCookiebot requires the events to be attached to the window object not the document object\n\t *\n\t * \thttps://www.cookiebot.com/en/developer/\n\t */\n\tloadEventListeners: () => {\n\n\t\twindow.addEventListener(\"CookiebotOnAccept\", (e) => {\n\n\t\t\tlet data = {\n\t\t\t\tstatistics : e.currentTarget.CookieConsent.consent.statistics ?? true,\n\t\t\t\tmarketing : e.currentTarget.CookieConsent.consent.marketing ?? true,\n\t\t\t\tpreferences: e.currentTarget.CookieConsent.consent.preferences ?? true,\n\t\t\t\tnecessary : e.currentTarget.CookieConsent.consent.necessary ?? true,\n\t\t\t}\n\n\t\t\tpmw.consent.api.updateSelectively(data)\n\t\t}, true)\n\t},\n}\n\nconst isValidJson = (str) => {\n\ttry {\n\t\tJSON.parse(str)\n\t} catch (e) {\n\t\treturn false\n\t}\n\treturn true\n}\n\n\n","/**\n * Cookiefirst CMP\n * https://cookiefirst.com\n * https://cookiefirst.com/wordpress-cookie-consent-plugin/\n * https://support.cookiefirst.com/hc/de/articles/360011568738-Javascript-API\n */\nexport const cookiefirst = {\n\n\t/**\n\t * Get the Cookiefirst cookie.\n\t *\n\t * @returns {{statistics: boolean, marketing: boolean, preferences: boolean, necessary: boolean}|null}\n\t */\n\tgetConsent: () => {\n\n\t\t// let consent = \"{\"necessary\":true,\"performance\":true,\"functional\":true,\"advertising\":true,\"timestamp\":1731043717,\"type\":\"category\",\"version\":\"73d03af8-0302-48f4-8d17-802e03d4959b\"}\"\n\t\tlet consent = wpm.getCookie(\"cookiefirst-consent\")\n\n\t\tif (consent) {\n\n\t\t\tpmw.console.log(\"Cookiefirst CMP consent detected\")\n\n\t\t\tif (isValidJson(consent)) {\n\t\t\t\tconsent = JSON.parse(consent)\n\t\t\t} else {\n\t\t\t\tconsent = decodeURI(consent)\n\t\t\t\tconsent = consent.replace(/'/g, \"\\\"\") // Replace single quotes with double quotes as JSON requires double quotes\n\t\t\t\tconsent = decodeURIComponent(consent)\n\t\t\t\tconsent = consent.replace(/(\\w+):/g, \"\\\"$1\\\":\") // Add double quotes to keys\n\t\t\t\tconsent = JSON.parse(consent)\n\t\t\t}\n\n\t\t\tconsole.log(\"cookiefirst consent object\", consent)\n\n\t\t\treturn {\n\t\t\t\tstatistics : consent.performance ?? true,\n\t\t\t\tmarketing : consent.advertising ?? true,\n\t\t\t\tpreferences: consent.functional ?? true,\n\t\t\t\tnecessary : consent.necessary ?? true,\n\t\t\t}\n\t\t}\n\n\t\treturn null\n\t},\n\n\t/**\n\t * Cookiefirst\n\t *\n\t * \tIf visitor accepts cookies in Cookiefirst unblock the scripts\n\t */\n\tloadEventListeners: () => {\n\n\t\twindow.addEventListener(\"cf_consent\", function(event) {\n\t\t\tlet data = {\n\t\t\t\tstatistics : consent.performance ?? true,\n\t\t\t\tmarketing : consent.advertising ?? true,\n\t\t\t\tpreferences: consent.functional ?? true,\n\t\t\t\tnecessary : consent.necessary ?? true,\n\t\t\t}\n\n\t\t\tpmw.consent.api.updateSelectively(data)\n\t\t}, true);\n\t},\n}\n\nconst isValidJson = (str) => {\n\ttry {\n\t\tJSON.parse(str)\n\t} catch (e) {\n\t\treturn false\n\t}\n\treturn true\n}\n\n\n","/**\n * CookieYes, GDPR Cookie Consent (Cookie Law Info)\n * https://wordpress.org/plugins/cookie-law-info/\n */\n\nexport const cookieyes = {\n\n\t/**\n\t * Get the CookieYes cookies\n\t *\n\t * @returns {{statistics: boolean, marketing: boolean, preferences: boolean, necessary: boolean}|null}\n\t */\n\tgetConsent: () => {\n\n\t\t/**\n\t\t * Process the new cookieyes-consent cookie that contains all the information\n\t\t */\n\n\t\t // on first load CookieYes sets the categories with now values (facepalm)\n\t\t // let consent = \"consentid:cWZkOGRjNzFzb1R3a0I4VlJMYXM1ZEJjVEs5aU4zcTQ,consent:,action:,necessary:,functional:,analytics:,performance:,advertisement:,other:\"\n\t\t\t// let consent = \"consentid:cnpZSGg2SDZzWXJodEc3TWF3UTdKVVM3UmtKWHc3SEk,consent:yes,action:yes,necessary:yes,functional:yes,analytics:no,performance:yes,advertisement:yes\"\n\t\tlet consent = wpm.getCookie(\"cookieyes-consent\")\n\n\t\tif (consent) {\n\n\t\t\tpmw.console.log(\"CookieYes CMP consent detected\")\n\n\t\t\t// This cookie has the following structure:\n\t\t\t// consentid:cnpZSGg2SDZzWXJodEc3TWF3UTdKVVM3UmtKWHc3SEk,consent:yes,action:yes,necessary:yes,functional:yes,analytics:no,performance:yes,advertisement:yes\n\t\t\t// First split the comma-separated values into an array\n\t\t\t// Then split each array item into a key value pair. The key and the value are separated by a colon.\n\t\t\t// Then create an object from the key value pairs.\n\t\t\t// Then console.log the object to see what it looks like.\n\n\t\t\tconsent = consentToJson(consent)\n\n\t\t\treturn {\n\t\t\t\tstatistics : consent.analytics ?? true,\n\t\t\t\tmarketing : consent.advertisement ?? true,\n\t\t\t\tpreferences: consent.functional ?? true,\n\t\t\t\tnecessary : consent.necessary ?? true,\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Check if at least one of the cookies is set\n\t\t *\n\t\t * @param cookieNames\n\t\t * @returns {boolean}\n\t\t */\n\t\tconst isOneCookieSet = (cookieNames) => {\n\t\t\tfor (let key in cookieNames) {\n\t\t\t\tfor (let cookieName of cookieNames[key]) {\n\t\t\t\t\tif (wpm.getCookie(cookieName)) {\n\t\t\t\t\t\treturn true\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false\n\t\t}\n\n\t\t/**\n\t\t * Process the old cookieyes-* cookies\n\t\t *\n\t\t * @param cookieNames\n\t\t * @returns {boolean}\n\t\t */\n\t\tconst getCookieValue = (cookieNames) => {\n\n\t\t\tfor (let cookieName of cookieNames) {\n\t\t\t\tlet value = wpm.getCookie(cookieName)\n\t\t\t\tif (value === \"yes\") {\n\t\t\t\t\treturn true\n\t\t\t\t} else if (value === \"no\") {\n\t\t\t\t\treturn false\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn true\n\t\t}\n\n\t\tconst cookieNames = {\n\t\t\tstatistics : [\n\t\t\t\t\"cookielawinfo-checkbox-analytics\",\n\t\t\t\t\"cookielawinfo-checkbox-analytiques\",\n\t\t\t\t\"cookieyes-analytics\",\n\t\t\t],\n\t\t\tmarketing : [\n\t\t\t\t\"cookielawinfo-checkbox-advertisement\",\n\t\t\t\t\"cookielawinfo-checkbox-performance\",\n\t\t\t\t\"cookielawinfo-checkbox-publicite\",\n\t\t\t\t\"cookieyes-advertisement\",\n\t\t\t],\n\t\t\tpreferences: [\n\t\t\t\t\"cookielawinfo-checkbox-functional\",\n\t\t\t\t\"cookielawinfo-checkbox-preferences\",\n\t\t\t\t\"cookieyes-functional\",\n\t\t\t],\n\t\t\tnecessary : [\n\t\t\t\t\"cookielawinfo-checkbox-necessary\",\n\t\t\t\t\"cookielawinfo-checkbox-necessaire\",\n\t\t\t\t\"cookieyes-necessary\",\n\t\t\t],\n\t\t}\n\n\t\t// If at least one of the cookies is set to \"yes\" or \"no\", then return the CookieYes consent\n\t\tif (isOneCookieSet(cookieNames)) {\n\n\t\t\tpmw.console.log(\"CookieYes CMP consent detected\")\n\n\t\t\treturn {\n\t\t\t\tstatistics : getCookieValue(cookieNames.statistics),\n\t\t\t\tmarketing : getCookieValue(cookieNames.marketing),\n\t\t\t\tpreferences: getCookieValue(cookieNames.preferences),\n\t\t\t\tnecessary : getCookieValue(cookieNames.necessary),\n\t\t\t}\n\t\t}\n\n\t\treturn null\n\t},\n\n\tloadEventListeners: () => {\n\n\t\tdocument.addEventListener(\"cookieyes_consent_update\", (e) => {\n\n\t\t\tlet data = {\n\t\t\t\tstatistics : e.detail.accepted.includes(\"analytics\"),\n\t\t\t\tmarketing : e.detail.accepted.includes(\"advertisement\"),\n\t\t\t\tpreferences: e.detail.accepted.includes(\"functional\"),\n\t\t\t\tnecessary : e.detail.accepted.includes(\"necessary\"),\n\t\t\t}\n\n\t\t\tpmw.consent.api.updateSelectively(data)\n\t\t}, true)\n\t},\n}\n\n\nconst consentToJson = (consent) => {\n\n\tconsent = consent.split(\",\")\n\n\tlet consentObj = {}\n\n\tconsent.forEach((item) => {\n\t\tlet [key, value] = item.split(\":\")\n\t\tconsentObj[key] = value\n\t})\n\n\tconsent = consentObj\n\n\t// Make every yes or no to boolean\n\t// On first load CookieYes sets the categories with no values, just empty strings. Not \"yes\" or \"no\". (facepalm)\n\tfor (let key in consent) {\n\t\tif (consent[key] === \"yes\") {\n\t\t\tconsent[key] = true\n\t\t} else if (consent[key] === \"no\" || consent[key] === \"\") {\n\t\t\tconsent[key] = false\n\t\t}\n\t}\n\n\treturn consent\n}\n","/**\n * OneTrust\n *\n * https://www.onetrust.com/\n */\n\nexport const onetrust = {\n\n\t/**\n\t * Get the OneTrust cookie.\n\t *\n\t * @returns {{statistics: boolean, marketing: boolean, preferences: boolean, necessary: boolean}|null}\n\t */\n\tgetConsent: () => {\n\n\t\t// let consent = \"isGpcEnabled=0&datestamp=Sun+Apr+07+2024+06%3A58%3A30+GMT%2B0200+(Central+European+Summer+Time)&version=202401.1.0&browserGpcFlag=0&isIABGlobal=false&hosts=&consentId=ddb816ea-097a-4590-a2dc-17120c6c412c&interactionCount=2&landingPath=NotLandingPage&groups=1%3A1%2C2%3A0%2C3%3A1%2C4%3A1&geolocation=CH%3BZH&AwaitingReconsent=false\"\n\t\tlet consent = wpm.getCookie(\"OptanonConsent\")\n\n\t\tif (consent) {\n\n\t\t\tpmw.console.log(\"OneTrust CMP consent detected\")\n\n\t\t\tconsent = consentToJSON(consent)\n\n\t\t\t// group mapping\n\t\t\t// 1 = necessary\n\t\t\t// 2 = analytics\n\t\t\t// 3 = functional\n\t\t\t// 4 = ads\n\n\t\t\treturn {\n\t\t\t\tstatistics : consent[\"2\"] ?? true,\n\t\t\t\tmarketing : consent[\"4\"] ?? true,\n\t\t\t\tpreferences: consent[\"3\"] ?? true,\n\t\t\t\tnecessary : consent[\"1\"] ?? true,\n\t\t\t}\n\t\t}\n\n\t\treturn null\n\t},\n\n\t/**\n\t * OneTrust Event Listeners\n\t */\n\tloadEventListeners: () => {\n\n\t\tdocument.addEventListener(\"consent.onetrust\", (e) => {\n\n\t\t\tlet data = {\n\t\t\t\tstatistics : e.detail.includes(\"2\"),\n\t\t\t\tmarketing : e.detail.includes(\"4\"),\n\t\t\t\tpreferences: e.detail.includes(\"3\"),\n\t\t\t\tnecessary : e.detail.includes(\"1\"),\n\t\t\t}\n\n\t\t\tpmw.consent.api.updateSelectively(data)\n\t\t}, true)\n\t},\n}\n\nconst consentToJSON = (consent) => {\n\n\tconsent = decodeURIComponent(consent);\n\n\tlet consentObject = consent.split(\"&\").reduce((obj, item) => {\n\t\tlet [key, value] = item.split(\"=\");\n\t\tobj[key] = value;\n\t\treturn obj;\n\t}, {});\n\n\tconsentObject.groups = consentObject.groups.split(\",\").reduce((obj, item) => {\n\t\tlet [key, value] = item.split(\":\");\n\t\tobj[key] = value === '1';\n\t\treturn obj;\n\t}, {});\n\n\treturn consentObject.groups\n}\n","/**\n * Real Cookie Banner\n *\n * https://devowl.io/wordpress-real-cookie-banner/\n */\nexport const realCookieBanner = {\n\n\t/**\n\t * Get the Real Cookie Banner cookie.\n\t *\n\t * @returns {{statistics: boolean, marketing: boolean, preferences: boolean, necessary: boolean}|null}\n\t */\n\tgetConsent: () => {\n\n\t\tif (!isRcbCookieSet()) return null\n\n\t\twpm.waitForLibrary(\"consentApi\")\n\n\t\tif (!window.consentApi) return null\n\n\t\tpmw.console.log(\"Real Cookie Banner CMP consent detected\")\n\n\t\tlet consent = {\n\t\t\tstatistics : undefined,\n\t\t\tmarketing : undefined,\n\t\t\tpreferences: true,\n\t\t\tnecessary : true,\n\t\t}\n\n\t\t// For each service in settings\n\t\t// and each cookie in service.cookies\n\t\t// check if consentApi.consentSync(\"http\", cookie, \"*\") returns an object that contains a not empty object called \"cookie\"\n\t\t// If one of the cookies returns true, then push service.service to wpmConsentValues.pixels\n\t\trcbSettings.forEach((service) => {\n\n\t\t\tservice.cookies.forEach((cookie) => {\n\n\t\t\t\tlet rcbConsent = window.consentApi.consentSync(\"http\", cookie, \"*\")\n\n\t\t\t\tif (rcbConsent?.cookie && rcbConsent?.cookieOptIn) {\n\n\t\t\t\t\tswitch (service.type) {\n\t\t\t\t\t\tcase \"statistics\":\n\t\t\t\t\t\t\tconsent.statistics = true\n\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\tcase \"marketing\":\n\t\t\t\t\t\t\tconsent.marketing = true\n\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\tcase \"preferences\":\n\t\t\t\t\t\t\tconsent.preferences = true\n\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\tcase \"necessary\":\n\t\t\t\t\t\t\tconsent.necessary = true\n\t\t\t\t\t\t\tbreak\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})\n\t\t})\n\n\t\treturn consent\n\t},\n\n\t/**\n\t * Real Cookie Banner\n\t * If the visitor accepts cookies in Real Cookie Banner unblock the scripts.\n\t */\n\tloadEventListeners: () => {\n\n\n\t\tdocument.addEventListener(\"RCB/OptIn/All\", (e) => {\n\n\t\t\t/**\n\t\t\t * Don't reload the page! RCB fires the event on each page load. Not just when the banner is clicked.\n\t\t\t */\n\t\t}, true)\n\t},\n}\n\nconst isRcbCookieSet = () => {\n\n\t// Find a cookie that has a prefix of real_cookie_banner\n\t// If one is found, then return true\n\t// If none is found, then return false\n\n\tlet cookies = document.cookie.split(\";\")\n\n\tfor (let i = 0; i < cookies.length; i++) {\n\t\tlet cookie = cookies[i].trim()\n\n\t\tif (cookie.startsWith(\"real_cookie_banner\")) {\n\t\t\treturn true\n\t\t}\n\t}\n\n\treturn false\n}\n\nconst rcbSettings = [\n\t{\n\t\t\"service\": \"adroll-ads\",\n\t\t\"type\" : \"marketing\",\n\t\t\"cookies\": [\"__adroll_fpc\", \"_ar_v4\", \"_adroll\"],\n\t},\n\t{\n\t\t\"service\": \"bing-ads\",\n\t\t\"type\" : \"marketing\",\n\t\t\"cookies\": [\"_uetsid\", \"_uetvid\"],\n\t},\n\t{\n\t\t\"service\": \"facebook-ads\",\n\t\t\"type\" : \"marketing\",\n\t\t\"cookies\": [\"_fbp\"],\n\t},\n\t{\n\t\t\"service\": \"google-analytics\",\n\t\t\"type\" : \"statistics\",\n\t\t\"cookies\": [\"_ga\", \"_gid\", \"_gat\", \"_gat_gtag_UA_*\"],\n\t},\n\t{\n\t\t\"service\": \"google-optimize\",\n\t\t\"type\" : \"statistics\",\n\t\t\"cookies\": [\"_ga\", \"_gid\", \"_gat\", \"_gat_gtag_UA_*\"],\n\t},\n\t{\n\t\t\"service\": \"google-ads\",\n\t\t\"type\" : \"marketing\",\n\t\t\"cookies\": [\"_gcl_au\", \"_gcl_aw\", \"_gcl_dc\", \"_gac_*\"],\n\t},\n\t{\n\t\t\"service\": \"hotjar\",\n\t\t\"type\" : \"statistics\",\n\t\t\"cookies\": [\"_hj*\", \"_hjid\"],\n\t},\n\t{\n\t\t\"service\": \"linkedin-ads\",\n\t\t\"type\" : \"marketing\",\n\t\t\"cookies\": [\"_li_ss\", \"_li_id\", \"_li_mk_*\"],\n\t},\n\t{\n\t\t\"service\": \"microsoft-ads\",\n\t\t\"type\" : \"marketing\",\n\t\t\"cookies\": [\"_uetsid\", \"_uetvid\"],\n\t},\n\t{\n\t\t\"service\": \"outbrain-ads\",\n\t\t\"type\" : \"marketing\",\n\t\t\"cookies\": [],\n\t},\n\t{\n\t\t\"service\": \"pinterest-ads\",\n\t\t\"type\" : \"marketing\",\n\t\t\"cookies\": [\"_pinterest_ct_ua\", \"_pinterest_ct_rt\", \"_pin_unauth\", \"_derived_epik\", \"_pinterest_sess\"],\n\t},\n\t{\n\t\t\"service\": \"reddit-ads\",\n\t\t\"type\" : \"marketing\",\n\t\t\"cookies\": [\"_rdt_uuid\"],\n\t},\n\t{\n\t\t\"service\": \"snapchat-ads\",\n\t\t\"type\" : \"marketing\",\n\t\t\"cookies\": [\"sc_at\", \"sc_anonymous_id\", \"sc_id\", \"_scid\", \"_scid_r\"],\n\t},\n\t{\n\t\t\"service\": \"taboola-ads\",\n\t\t\"type\" : \"marketing\",\n\t\t\"cookies\": [],\n\t},\n\t{\n\t\t\"service\": \"tiktok-ads\",\n\t\t\"type\" : \"marketing\",\n\t\t\"cookies\": [\"_ttp\", \"_ttclid\", \"ttwid\"],\n\t},\n\t{\n\t\t\"service\": \"twitter-ads\",\n\t\t\"type\" : \"marketing\",\n\t\t\"cookies\": [\"twitter_ads_id\", \"twid\", \"_twclid\", \"muc_ads\"],\n\t},\n]\n","import {borlabs} from \"./cmps/borlabs.mjs\"\nimport {complianz} from \"./cmps/complianz.mjs\"\nimport {cookieCompliance} from \"./cmps/cookie-compliance.mjs\"\nimport {cookieScript} from \"./cmps/cookie-script.mjs\"\nimport {cookiebot} from \"./cmps/cookiebot.mjs\"\nimport {cookiefirst} from \"./cmps/cookiefirst.mjs\"\nimport {cookieyes} from \"./cmps/cookieyes.mjs\"\nimport {iubenda} from \"./cmps/iubenda.mjs\"\nimport {mooveCookieCompliance} from \"./cmps/moove-cookie-compliance.mjs\"\nimport {onetrust} from \"./cmps/onetrust.mjs\"\nimport {realCookieBanner} from \"./cmps/real-cookie-banner.mjs\"\nimport {termly} from \"./cmps/termly.mjs\"\nimport {usercentrics} from \"./cmps/usercentrics.mjs\"\nimport {wpAutoTerms} from \"./cmps/wp-auto-terms.mjs\"\nimport {wpConsentApi} from \"./cmps/wp-consent-api.mjs\"\nimport {wpCookieConsent} from \"./cmps/wp-cookie-consent.mjs\"\n\nexport default [\n\tborlabs,\n\tcomplianz,\n\tcookieCompliance,\n\tcookieScript,\n\tcookiebot,\n\tcookiefirst,\n\tcookieyes,\n\tiubenda,\n\tmooveCookieCompliance,\n\tonetrust,\n\trealCookieBanner,\n\ttermly,\n\tusercentrics,\n\twpAutoTerms,\n\twpConsentApi,\n\twpCookieConsent,\n]\n","/**\n * Cookie Compliance (free version)\n * https://wordpress.org/plugins/cookie-notice/\n */\nexport const cookieCompliance = {\n\n\t/**\n\t * Get the Cookie Compliance cookie.\n\t *\n\t * @returns {{statistics: boolean, marketing: boolean, preferences: boolean, necessary: boolean}|null}\n\t */\n\tgetConsent: () => {\n\n\t\t// Free version\n\t\tlet consent = wpm.getCookie(\"cookie_notice_accepted\")\n\n\t\t// If the cookie is set, it contains the string \"true\" or \"false\"\n\t\tif (consent) {\n\n\t\t\tpmw.console.log(\"Cookie Compliance CMP (by hu-manity.co) consent detected\")\n\n\t\t\t// Convert the string \"true\" to true and \"false\" to false\n\t\t\tconsent = consent === \"true\"\n\n\t\t\treturn {\n\t\t\t\tstatistics : consent,\n\t\t\t\tmarketing : consent,\n\t\t\t\tpreferences: consent,\n\t\t\t\tnecessary : true,\n\t\t\t}\n\t\t}\n\n\t\t// Paid version\n\t\tconsent = wpm.getCookie(\"hu-consent\")\n\n\t\tif (consent) {\n\n\t\t\tpmw.console.log(\"Cookie Compliance CMP (by hu-manity.co) consent detected\")\n\n\t\t\tconsent = JSON.parse(consent)\n\n\t\t\treturn {\n\t\t\t\tstatistics : consent.categories[\"3\"] ?? true,\n\t\t\t\tmarketing : consent.categories[\"4\"] ?? true,\n\t\t\t\tpreferences: consent.categories[\"2\"] ?? true,\n\t\t\t\tnecessary : consent.categories[\"1\"] ?? true,\n\t\t\t}\n\t\t}\n\n\t\treturn null\n\t},\n\n\t/**\n\t * Cookie Compliance by hu-manity.co (free and pro)\n\t * If visitor accepts cookies in Cookie Notice by hu-manity.co unblock the scripts (free version)\n\t * https://wordpress.org/support/topic/events-on-consent-change/#post-15202792\n\t */\n\tloadEventListeners: () => {\n\t\tdocument.addEventListener(\"set-consent.hu\", (e) => {\n\n\t\t\t// Validate that e.detail.categories exists\n\t\t\tif (!e.detail.categories) return\n\n\t\t\tlet data = {\n\t\t\t\tstatistics : e.detail.categories[\"3\"],\n\t\t\t\tmarketing : e.detail.categories[\"4\"],\n\t\t\t\tpreferences: e.detail.categories[\"2\"],\n\t\t\t\tnecessary : e.detail.categories[\"1\"],\n\t\t\t}\n\n\t\t\tpmw.consent.api.updateSelectively(data)\n\t\t}, true)\n\t},\n}\n","/**\n * Cookie Script\n * https://wordpress.org/plugins/cookie-script-com/\n */\nexport const cookieScript = {\n\n\t/**\n\t * Get the Cookie Script cookie.\n\t *\n\t * @returns {{statistics: boolean, marketing: boolean, preferences: boolean, necessary: boolean}|null}\n\t */\n\tgetConsent: () => {\n\n\t\tlet consent = wpm.getCookie(\"CookieScriptConsent\")\n\n\t\tif (consent) {\n\n\t\t\tpmw.console.log(\"Cookie Script CMP consent detected\")\n\n\t\t\tconsent = JSON.parse(consent)\n\n\t\t\t// if cookie.categories is not an array, but a string, parse it\n\t\t\tif (typeof consent.categories === \"string\") consent.categories = JSON.parse(consent.categories)\n\n\t\t\tif (\n\t\t\t\tconsent.action\n\t\t\t\t&& consent.action === \"reject\"\n\t\t\t) {\n\t\t\t\treturn {\n\t\t\t\t\tstatistics : false,\n\t\t\t\t\tmarketing : false,\n\t\t\t\t\tpreferences: false,\n\t\t\t\t\tnecessary : true,\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (\n\t\t\t\tconsent.categories\n\t\t\t\t&& consent.categories.length > 0\n\t\t\t) {\n\n\t\t\t\treturn {\n\t\t\t\t\tstatistics : consent.categories.indexOf(\"performance\") >= 0,\n\t\t\t\t\tmarketing : consent.categories.indexOf(\"targeting\") >= 0,\n\t\t\t\t\tpreferences: consent.categories.indexOf(\"functionality\") >= 0,\n\t\t\t\t\tnecessary : true,\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\tstatistics : true,\n\t\t\t\tmarketing : true,\n\t\t\t\tpreferences: true,\n\t\t\t\tnecessary : true,\n\t\t\t}\n\t\t}\n\n\t\treturn null\n\t},\n\n\t/**\n\t * Cookie Script\n\t * If visitor accepts cookies in Cookie Script unblock the scripts\n\t * https://support.cookie-script.com/article/20-custom-events\n\t */\n\n\tloadEventListeners: () => {\n\n\t\tdocument.addEventListener(\"CookieScriptAccept\", e => {\n\n\t\t\tlet data = {\n\t\t\t\tstatistics : e.detail.categories.includes(\"performance\"),\n\t\t\t\tmarketing : e.detail.categories.includes(\"targeting\"),\n\t\t\t\tpreferences: e.detail.categories.includes(\"functionality\"),\n\t\t\t\tnecessary : true,\n\t\t\t}\n\n\t\t\tpmw.consent.api.updateSelectively(data)\n\t\t}, true)\n\n\t\tdocument.addEventListener(\"CookieScriptAcceptAll\", () => {\n\t\t\tpmw.consent.api.acceptAll()\n\t\t}, true)\n\n\t\tdocument.addEventListener(\"CookieScriptReject\", () => {\n\t\t\tpmw.consent.api.revokeAll()\n\t\t}, true)\n\t},\n}\n","export const iubenda = {\n\n\t/**\n\t * Get the Iubenda cookie.\n\t * Then parse it and return the analytics and marketing values.\n\t *\n\t * 1 = Necessary\n\t * 2 = Functionality\n\t * 3 = n/a\n\t * 4 = Measurement\n\t * 5 = Marketing\n\t *\n\t * @returns {{statistics: boolean, marketing: boolean, preferences: boolean, necessary: boolean}|null}\n\t * */\n\tgetConsent: () => {\n\n\t\t// Regex that matches _iub_cs-59340121 but not _iub_cs-59340121-granular\n\n\t\tlet regex = new RegExp(\"_iub_cs-\\\\d{8,}\")\n\n\t\t// let cookie = wpm.getCookieThatContainsRegex(\"_iub_cs-\")\n\t\tlet consent = wpm.getCookieThatContainsRegex(regex)\n\n\t\t// Parse the cookie into an object\n\t\t// The structure looks like this:\n\t\t// %7B%22timestamp%22%3A%222023-07-11T06%3A43%3A40.886Z%22%2C%22version%22%3A%221.48.0%22%2C%22purposes%22%3A%7B%221%22%3Atrue%2C%222%22%3Atrue%2C%224%22%3Atrue%2C%225%22%3Atrue%7D%2C%22id%22%3A63374232%7D\n\n\t\tif (consent) {\n\n\t\t\tpmw.console.log(\"Iubenda CMP consent detected\")\n\n\t\t\tconsent = decodeURIComponent(consent)\n\n\t\t\t// Now the structure looks like this:\n\t\t\t// _iub_cs-63374232={\"timestamp\":\"2023-07-11T06:43:40.886Z\",\"version\":\"1.48.0\",\"purposes\":{\"1\":true,\"2\":true,\"4\":true,\"5\":true},\"id\":63374232}\n\t\t\t// Remove the _iub_cs- prefix until and with the equal sign. The rest is the object we want to keep and parse.\n\t\t\tconsent = consent.replace(/_iub_cs-.*=/, \"\")\n\n\t\t\tconsent = JSON.parse(consent)\n\n\t\t\t/**\n\t\t\t * 1: necessary\n\t\t\t * 2: functionality\n\t\t\t * 3: experience\n\t\t\t * 4: measurement\n\t\t\t * 5: marketing\n\t\t\t */\n\n\t\t\treturn {\n\t\t\t\tstatistics : consent.purposes[\"4\"] ?? true,\n\t\t\t\tmarketing : consent.purposes[\"5\"] ?? true,\n\t\t\t\tpreferences: consent.purposes[\"2\"] ?? true,\n\t\t\t\tnecessary : consent.purposes[\"1\"] ?? true,\n\t\t\t}\n\t\t}\n\n\t\treturn null\n\t},\n\n\t/**\n\t * Iubenda CMP has no intelligent way of letting us know when the user has clicked the \"Accept\" button.\n\t * We have to resort to a MutationObserver to listen for changes in the DOM.\n\t * This is also why we have to reload the page when the user clicks the \"Accept\" button.\n\t * Reading the cookies on the same page will not work because the cookies are not set in time when the observer is triggered.\n\t */\n\tloadEventListeners: () => {\n\n\t\t// If the Iubenda CMP is not present, there's no need to continue\n\t\tif (!window._iub) return\n\n\t\twpm.consent.cmpConsentClickObserver({\n\t\t\tids : [\"iubFooterBtn\"],\n\t\t\tclasses: [\"iubenda-cs-reject-btn\", \"iubenda-cs-accept-btn\"],\n\t\t})\n\t},\n}\n\n\n","/**\n * GDPR Cookie Compliance Plugin by Moove Agency\n * https://wordpress.org/plugins/gdpr-cookie-compliance/\n *\n * TODO write documentation on how to set up the plugin in order for this to work properly\n */\nexport const mooveCookieCompliance = {\n\n\t/**\n\t * Get the GDPR Cookie Compliance Plugin by Moove Agency cookie.\n\t *\n\t * example cookie: %7B%22strict%22%3A%221%22%2C%22thirdparty%22%3A%220%22%2C%22advanced%22%3A%221%22%7D\n\t *\n\t * @returns {{statistics: boolean, marketing: boolean, preferences: boolean, necessary: boolean}|null}\n\t */\n\tgetConsent: () => {\n\n\t\tlet consent = wpm.getCookie(\"moove_gdpr_popup\")\n\n\t\tif (consent) {\n\n\t\t\tpmw.console.log(\"GDPR Cookie Compliance CMP (by Moove Agency) consent detected\")\n\n\t\t\tconsent = JSON.parse(consent)\n\n\t\t\treturn {\n\t\t\t\tstatistics: consent.thirdparty !== \"0\",\n\t\t\t\tmarketing : consent.advanced !== \"0\",\n\t\t\t\tpreferences: true,\n\t\t\t\tnecessary: consent.strict !== \"0\"\n\t\t\t}\n\t\t}\n\n\t\treturn null\n\t},\n\n\tloadEventListeners: () => {\n\n\t\tif (!window.moove_frontend_gdpr_scripts) return\n\n\t\t// If the button with class moove-gdpr-infobar-allow-all is clicked reload the page\n\t\tconst allowAllButton = document.querySelector(\".mgbutton\")\n\t\tif (allowAllButton) {\n\t\t\tallowAllButton.addEventListener(\"click\", () => {\n\t\t\t\t/**\n\t\t\t\t * Don't reload the page! (CMPs might emit the events on each page load, leading to a page reload loop)\n\t\t\t\t * Only try to save the consent in the PMW.\n\t\t\t\t */\n\t\t\t}, true)\n\t\t}\n\n\t\twpm.consent.cmpConsentClickObserver({classes: [\"moove-gdpr-infobar-allow-all\", \"moove-gdpr-modal-allow-all\", \"moove-gdpr-modal-save-settings\"]})\n\t},\n}\n","/**\n * Termly\n *\n * https://www.termly.io/\n *\n * TODO: Inform the developers. The cookie works with the new Google categories. However, the event listener is using different categories.\n */\nexport const termly = {\n\n\t/**\n\t * Get the Termly cookie.\n\t *\n\t * @returns {{statistics: boolean, marketing: boolean, preferences: boolean, necessary: boolean}|null}\n\t */\n\tgetConsent: () => {\n\n\t\t// Get Termly cookies from localStorage from termly_gtm_template_default_consents for ad_storage and for analytics_storage\n\t\t// let consent = `{\"ad_personalization\":\"granted\",\"ad_storage\":\"granted\",\"ad_user_data\":\"granted\",\"analytics_storage\":\"denied\",\"functionality_storage\":\"granted\",\"personalization_storage\":\"granted\",\"security_storage\":\"granted\",\"social_storage\":\"granted\",\"unclassified_storage\":\"granted\"}`\n\t\tlet consent = localStorage.getItem(\"termly_gtm_template_default_consents\")\n\n\t\tif (consent) {\n\n\t\t\tpmw.console.log(\"Termly CMP consent detected\")\n\n\t\t\tconsent = JSON.parse(consent)\n\n\t\t\treturn {\n\t\t\t\tstatistics : consent.analytics_storage !== \"denied\",\n\t\t\t\tmarketing : consent.ad_storage !== \"denied\",\n\t\t\t\tpreferences: consent.functionality_storage !== \"denied\",\n\t\t\t\tnecessary : consent.security_storage !== \"denied\",\n\t\t\t}\n\t\t}\n\n\t\treturn false\n\t},\n\n\t/**\n\t * Termly Event Listeners\n\t *\n\t * The event listener is within /sources/termly_web/resource-blocker/src/constants/lifeCycle.js\n\t *\n\t * statistics = analytics\n\t * marketing = advertising\n\t * preferences = performance\n\t * necessary = essential\n\t */\n\tloadEventListeners: () => {\n\n\t\tdocument.addEventListener(\"termlyConsent\", function (e) {\n\n\t\t\t// const consent = e.detail\n\n\t\t\tconst consent = [\n\t\t\t\t\"analytics\",\n\t\t\t\t\"advertising\",\n\t\t\t\t\"performance\",\n\t\t\t]\n\n\t\t\tif (\n\t\t\t\tconsent.includes(\"analytics\")\n\t\t\t\t&& consent.includes(\"advertising\")\n\t\t\t\t&& consent.includes(\"performance\")\n\t\t\t) {\n\t\t\t\tpmw.consent.api.acceptAll()\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tif (\n\t\t\t\t!consent.includes(\"analytics\")\n\t\t\t\t&& !consent.includes(\"advertising\")\n\t\t\t\t&& !consent.includes(\"performance\")\n\t\t\t) {\n\t\t\t\tpmw.consent.api.revokeAll()\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tpmw.consent.api.updateSelectively({\n\t\t\t\tstatistics : consent.includes(\"analytics\"),\n\t\t\t\tmarketing : consent.includes(\"advertising\"),\n\t\t\t\tpreferences: consent.includes(\"performance\"),\n\t\t\t\tnecessary : consent.includes(\"essential\"),\n\t\t\t})\n\n\t\t}, true)\n\t},\n}\n","/**\n * Usercentrics\n *\n * https://usercentrics.com/\n * https://docs.usercentrics.com/#/cmp-v2-ui-api\n * https://docs.usercentrics.com/#/cmp-v2-ui-api?id=getservicesbaseinfo\n *\n * Although Usercentrics adopts some of the Google consent categories,\n * they don't process and save the \"preferences\" category.\n */\nexport const usercentrics = {\n\n\t/**\n\t * Get the Usercentrics cookie.\n\t *\n\t * @returns {{statistics: boolean, marketing: boolean, preferences: boolean, necessary: boolean}|null}\n\t */\n\tgetConsent: () => {\n\n\t\tlet consent = window.localStorage.getItem(\"ucData\")\n\n\t\tif (consent) {\n\n\t\t\tpmw.console.log(\"Usercentrics CMP consent detected\")\n\n\t\t\tconsent = JSON.parse(consent).gcm\n\n\t\t\treturn {\n\t\t\t\tstatistics : consent.analyticsStorage !== \"denied\",\n\t\t\t\tmarketing : consent.adStorage !== \"denied\",\n\t\t\t\tpreferences: true,\n\t\t\t\tnecessary : true,\n\t\t\t}\n\t\t}\n\n\t\treturn null\n\t},\n\n\t/**\n\t * Usercentrics Event Listeners\n\t *\n\t * https://docs.usercentrics.com/#/v2-events?id=usage-as-window-event\n\t */\n\tloadEventListeners: () => {\n\n\t\t// ucCategory: {functional: true, marketing: true, essential: true, customcategory03: true}\n\t\t// statistics seem to be customcategory03 on their website.\n\t\t// document.addEventListener(\"ucEvent\", e => {\n\t\t// \tif (e.detail && e.detail.event == \"consent_status\") {\n\t\t// \t\t// check for consent status of service \"Google Ads Remarketing\"\n\t\t// \t\tif (e.detail[\"Google Ads Remarketing\"] === true) {\n\t\t// \t\t\tpmw.console.log(\"Google Ads Remarketing has consent\")\n\t\t// \t\t} else {\n\t\t// \t\t\tpmw.console.log(\"Google Ads Remarketing has no consent\")\n\t\t// \t\t}\n\t\t// \t}\n\t\t// }, true)\n\n\t\t// https://docs.usercentrics.com/#/v2-events?id=uc_ui_cmp_event\n\t\tdocument.addEventListener(\"UC_UI_CMP_EVENT\", event => {\n\n\t\t\tif (event.detail.type === \"ACCEPT_ALL\") pmw.consent.api.acceptAll()\n\n\t\t\tif (event.detail.type === \"DENY_ALL\") pmw.consent.api.revokeAll()\n\n\t\t\tif (event.detail.type === \"SAVE\") {\n\n\t\t\t\tlet consent = JSON.parse(e.currentTarget.localStorage.ucData).gcm\n\n\t\t\t\tif (consent) {\n\t\t\t\t\tpmw.consent.api.updateSelectively({\n\t\t\t\t\t\tstatistics : consent.analyticsStorage === \"granted\",\n\t\t\t\t\t\tmarketing : consent.adStorage === \"granted\",\n\t\t\t\t\t\tpreferences: true,\n\t\t\t\t\t\tnecessary : true,\n\t\t\t\t\t})\n\t\t\t\t}\n\t\t\t}\n\t\t}, true)\n\t},\n}\n","/**\n * WP AutoTerms\n * https://wordpress.org/plugins/auto-terms-of-service-and-privacy-policy/\n */\nexport const wpAutoTerms = {\n\n\t/**\n\t * Get the WP AutoTerms cookie.\n\t *\n\t * @returns {{statistics: boolean, marketing: boolean, preferences: boolean, necessary: boolean}|null}\n\t */\n\tgetConsent: () => {\n\n\t\tlet consent = wpm.getCookie(\"wpautoterms-cookies-notice\")\n\n\t\tif (consent && consent === \"1\") {\n\n\t\t\tpmw.console.log(\"WP AutoTerms CMP consent detected\")\n\n\t\t\treturn {\n\t\t\t\tstatistics : true,\n\t\t\t\tmarketing : true,\n\t\t\t\tpreferences: true,\n\t\t\t\tnecessary : true,\n\t\t\t}\n\t\t}\n\n\t\treturn null\n\t},\n\n\tloadEventListeners: () => {\n\n\t\t// Add an event listener to the button with the class wpautoterms-notice-close\n\t\tlet button = document.querySelectorAll(\".wpautoterms-notice-close\")[0]\n\n\t\tif (button) {\n\n\t\t\tbutton.addEventListener(\"click\", event => {\n\t\t\t\tpmw.consent.api.acceptAll()\n\t\t\t}, true)\n\t\t}\n\t}\n}\n","/**\n * WP Consent API\n * https://github.com/rlankhorst/wp-consent-level-api\n * https://wordpress.org/plugins/wp-consent-api/\n *\n * TODO: add check return for necessary and preferences\n */\nexport const wpConsentApi = {\n\n\t/**\n\t * Get the WP Consent API cookie.\n\t *\n\t * @returns {{statistics: boolean, marketing: boolean, preferences: boolean, necessary: boolean}|null}\n\t */\n\tgetConsent: () => {\n\n\t\t// If a at least one cookie exists that starts with wp_consent_ then the visitor has chosen\n\t\tlet consent = wpm.getCookieThatContainsRegex(/^wp_consent_/)\n\n\t\tif (consent) {\n\n\t\t\tpmw.console.log(\"WP Consent API CMP consent detected\")\n\n\t\t\treturn {\n\t\t\t\tstatistics : wpm.getCookie(\"wp_consent_statistics\") !== \"deny\",\n\t\t\t\tmarketing : wpm.getCookie(\"wp_consent_marketing\") !== \"deny\",\n\t\t\t\tpreferences: wpm.getCookie(\"wp_consent_preferences\") !== \"deny\",\n\t\t\t\tnecessary : wpm.getCookie(\"wp_consent_functional\") !== \"deny\",\n\t\t\t}\n\n\t\t\treturn null\n\t\t}\n\t},\n\n\t/**\n\t * WP Consent API\n\t * https://github.com/rlankhorst/wp-consent-level-api\n\t * https://wordpress.org/plugins/wp-consent-api/\n\t */\n\tloadEventListeners: () => {\n\n\t\tdocument.addEventListener(\"wp_listen_for_consent_change\", e => {\n\n\t\t\tconst consent = e.detail\n\n\t\t\tlet data = {\n\t\t\t\tstatistics : consent[\"statistics\"] !== \"deny\",\n\t\t\t\tmarketing : consent[\"marketing\"] !== \"deny\",\n\t\t\t\tpreferences: consent[\"preferences\"] !== \"deny\",\n\t\t\t\tnecessary : consent[\"functional\"] !== \"deny\",\n\t\t\t}\n\n\t\t\tpmw.consent.api.updateSelectively(data)\n\t\t}, true)\n\t},\n}\n","/**\n * WP Cookie Consent\n *\n * Source: https://wordpress.org/plugins/gdpr-cookie-consent/\n */\n\nexport const wpCookieConsent = {\n\n\t/**\n\t * Get the WP Cookie Consent cookie.\n\t *\n\t * @returns {{statistics: boolean, marketing: boolean, preferences: boolean, necessary: boolean}|null}\n\t */\n\tgetConsent: () => {\n\n\t\tlet consent = wpm.getCookie(\"wpl_user_preference\")\n\n\t\tif (consent) {\n\n\t\t\tpmw.console.log(\"WP Cookie Consent CMP (by wpeka.com) consent detected\")\n\n\t\t\tconsent = JSON.parse(consent)\n\n\t\t\treturn {\n\t\t\t\tstatistics : consent.analytics !== \"no\",\n\t\t\t\tmarketing : consent.marketing !== \"no\",\n\t\t\t\tpreferences: consent.preferences !== \"no\",\n\t\t\t\tnecessary : consent.necessary !== \"no\",\n\t\t\t}\n\t\t}\n\n\t\treturn null\n\t},\n\n\t/**\n\t * WP Cookie Consent Event Listeners\n\t *\n\t * Source: https://club.wpeka.com/docs/wp-cookie-consent/settings/integrating-your-actions/\n\t * Support ticket: https://wordpress.org/support/topic/gdprcookieconsentonaccept-event-never-triggered/\n\t */\n\tloadEventListeners: () => {\n\n\t\t// WP Cookie Consent emits a custom event called GdprCookieConsentOnAccept\n\t\t// The event doesn't work. Probably it is not bubbling up.\n\t\t// document.addEventListener(\"GdprCookieConsentOnAccept\", function (e) {\n\t\t// \tconsole.log(\"GdprCookieConsentOnAccept\", e.detail)\n\t\t// }, true)\n\n\t\tconst buttonIds = [\n\t\t\t\"cookie_action_accept\",\n\t\t\t\"cookie_action_reject\",\n\t\t]\n\n\t\tbuttonIds.forEach((buttonId) => {\n\t\t\tconst buttonElement = document.getElementById(buttonId)\n\n\t\t\tif (buttonElement) {\n\t\t\t\tbuttonElement.addEventListener(\"click\", () => {\n\t\t\t\t\t/**\n\t\t\t\t\t * Don't reload the page! (CMPs might emit the events on each page load, leading to a page reload loop)\n\t\t\t\t\t * Only try to save the consent in the PMW.\n\t\t\t\t\t */\n\t\t\t\t}, true)\n\t\t\t}\n\t\t})\n\n\t},\n}\n","/**\n * Consent Management\n **/\n\n/**\n * Load modules\n */\nimport cmps from \"./cmps.mjs\"\n\n/**\n * Initialize and set default values\n */\nexport let settings = {\n\tcategories : {\n\t\tstatistics : true,\n\t\tmarketing : true,\n\t\tpreferences: true,\n\t\tnecessary : true, // Necessary cookies are always allowed\n\t},\n\tvisitorHasChosen: false,\n\n\tget: (data = null) => {\n\n\t\tif (data === null) {\n\t\t\treturn settings\n\t\t}\n\n\t\tlet result = {}\n\n\t\tfor (let key of data) {\n\t\t\tresult[key] = settings[key]\n\t\t}\n\n\t\treturn result\n\t},\n\n\tset: (data) => {\n\t\tfor (let key in data) {\n\t\t\tsettings[key] = data[key]\n\t\t}\n\t},\n}\n\n/**\n * Load the consent management\n *\n * @returns {Promise}\n * @public\n */\nexport const load = async () => {\n\n\t/** Load the event listeners for each CMP */\n\tloadCmpEventListeners()\n\n\t/** Set the default values */\n\t// console.log(\"setDefaultValues\")\n\tsetExplicitConsentModeDefaults()\n\n\t/**\n\t * Get the consent values from the cookies\n\t * */\n\n\tloadConsentFromCmps()\n\n\t/** Unlocks countries in allowed regions */\n\tawait countryUnlock()\n\n\t/** Update the pixel consent for pixel type CMPs */\n\t// wpm.scriptTagObserver.observe(document.head, {childList: true, subtree: true})\n\t// jQuery(document).on(\"DOMContentLoaded\", () => wpm.scriptTagObserver.disconnect())\n\n\t/** Trigger the consent management loaded event */\n\tloadTrigger()\n}\n\nconst loadConsentFromCmps = () => {\n\tlet cmpConsent = getConsentFromCmps()\n\n\tif (cmpConsent) {\n\t\twpm.consent.categories.set(cmpConsent)\n\t\twpm.consent.settings.set({visitorHasChosen: true})\n\t}\n}\n\n/**\n * Load the event listeners for each CMP\n *\n * @returns {void}\n * @private\n */\nconst loadCmpEventListeners = () => {\n\tfor (let cmp of cmps) {\n\n\t\tif (typeof cmp.loadEventListeners !== \"function\") {\n\t\t\tcontinue\n\t\t}\n\t\tcmp.loadEventListeners()\n\t}\n}\n\n/**\n * Set the default values\n *\n * @returns {void}\n * @private\n */\nconst setExplicitConsentModeDefaults = () => {\n\n\t/**\n\t * Setup defaults\n\t *\n\t * TODO: Extend with country specific settings.\n\t *\n\t * If explicit consent mode is active,\n\t * and no consent has been given yet,\n\t * and there are regions set in the settings,\n\t * then set the consent values accordingly.\n\t * (if a country is set then only set the consent to false if the visitor is from that country)\n\t * Otherwise set the consent values to false.\n\t */\n\n\tlet explicitConsent = !wpm.consent.explicitConsentModeActive()\n\n\twpm.consent.categories.set({\n\t\tstatistics : explicitConsent,\n\t\tmarketing : explicitConsent,\n\t\tpreferences: explicitConsent,\n\t\tnecessary : true,\n\t})\n}\n\n/**\n * Check if PMW is in explicit consent mode\n *\n * @returns {boolean}\n * @private\n */\nexport const explicitConsentModeActive = () => wpmDataLayer?.general?.consent_management?.explicit_consent\n\n/**\n * Returns the consent values\n *\n * @returns any\n * @public\n * */\nwpm.getConsentValues = () => wpm.consent.settings.get()\n\n/**\n * Set the consent values\n *\n * @param {Object} consentValues\n * @param {boolean} consentValues.statistics\n * @param {boolean} consentValues.marketing\n * @param {boolean} consentValues.preferences\n * @param {boolean} consentValues.necessary\n *\n * @returns {void}\n * @public\n */\n// export const setCategories = ({statistics, marketing, preferences, necessary}) => {\nexport const categories = {\n\n\tset: ({\n\t\t\t statistics = wpm.consent.settings.get().statistics,\n\t\t\t marketing = wpm.consent.settings.get().marketing,\n\t\t\t preferences = wpm.consent.settings.get().preferences,\n\t\t\t necessary = wpm.consent.settings.get().necessary,\n\t\t }) => {\n\t\tsettings.categories.statistics = statistics\n\t\tsettings.categories.marketing = marketing\n\t\tsettings.categories.preferences = preferences\n\t\tsettings.categories.necessary = necessary\n\t},\n\n\tget: (data = null) => {\n\n\t\tif (data === null) {\n\t\t\treturn settings.categories\n\t\t}\n\n\t\tlet result = {}\n\n\t\tfor (let key of data) {\n\t\t\tresult[key] = settings.categories[key]\n\t\t}\n\n\t\treturn result\n\t},\n}\n\n/**\n * Get the consent values from various cookies\n *\n * @returns {{statistics: boolean, marketing: boolean, preferences: boolean, necessary: boolean} | null}\n * - statistics: Boolean - Indicates if consent has been given for statistics cookies\n * - marketing: Boolean - Indicates if consent has been given for marketing cookies\n * - preferences: Boolean - Indicates if consent has been given for preference cookies\n * - necessary: Boolean - Indicates if consent has been given for necessary cookies\n * @private\n */\nconst getConsentFromCmps = () => {\n\n\t/**\n\t * PMW Cookie Consent\n\t *\n\t * The PMW only saves the pmw_cookie_consent if the API is used.\n\t * This means that always the CMP cookie is read first, unless:\n\t * - Our CMP event listeners has been triggered and use our API to set the new consent values.\n\t * - A CMP decides to start using our API. (then their cookie will be ignored.\n\t * This is especially useful for Borlabs and RCB where we use truethy values for consent.\n\t *\n\t * TODO: Maybe store in PMW's data store. However, we can't set a duration there. Store in the data store if no duration is needed.\n\t */\n\n\tconst storageKey = \"pmw_cookie_consent\"\n\n\tlet consent = wpm.retrieveData(storageKey, true) || wpm.getCookie(storageKey)\n\n\tif (consent) {\n\n\t\t// Depending of if the value comes from window.localStorage or a cookie,\n\t\t// it might be a string or an object\n\t\tconsent = typeof consent === \"object\" ? consent : JSON.parse(consent)\n\n\t\tconsent = consentBackwardsCompatibilityUpdate(consent)\n\n\t\treturn consent\n\t}\n\n\t/**\n\t * Get the consent values from the CMPs\n\t */\n\tfor (let cmp of cmps) {\n\n\t\tif (typeof cmp.getConsent !== \"function\") {\n\t\t\tcontinue\n\t\t}\n\n\t\tlet consent = cmp.getConsent()\n\n\t\tif (!consent) {\n\t\t\tcontinue\n\t\t}\n\n\t\treturn consent\n\t}\n\n\treturn null\n}\n\n/**\n * This is to ensure backwards compatibility for consent that was set before the change\n * If key consent.analytics exists, rewrite it to consent.statistics\n *\n * @param consent\n * @return {Object}\n */\nconst consentBackwardsCompatibilityUpdate = (consent) => {\n\n\tif (!consent.hasOwnProperty(\"analytics\") && !consent.hasOwnProperty(\"ads\")) return consent\n\n\tif (consent.hasOwnProperty(\"analytics\")) {\n\t\tconsent.statistics = consent.analytics\n\t\tdelete consent.analytics\n\t}\n\n\tif (consent.hasOwnProperty(\"ads\")) {\n\t\tconsent.marketing = consent.ads\n\t\tdelete consent.ads\n\t}\n\n\tconsent.preferences = true\n\tconsent.necessary = true\n\n\treturn consent\n}\n\n/**\n * TODO: Extend with country specific settings.\n *\n * Unlock countries in allowed regions\n *\n * If explicit consent mode is active,\n * and no consent has been given yet,\n * and there are regions set in the settings,\n * then set the consent values accordingly.\n * If a country is set then only set the consent to false\n * if the visitor is from that country.\n * Otherwise set the consent values to true.\n *\n * @returns {Promise}\n * @private\n *\n * TODO: Verify all the conditions and calls\n */\nconst countryUnlock = async () => {\n\n\t// Return if explicit consent mode is not active\n\tif (!explicitConsentModeActive()) return\n\t// console.log(\"countryUnlock explicit_consent\", isPmwInExplicitConsentMode)\n\n\t// Return if the visitor has already chosen\n\tif (wpm.consent.settings.get().visitorHasChosen) return\n\t// console.log(\"countryUnlock visitorHasChosen\", wpmConsentValues.visitorHasChosen)\n\n\t// Return if there are no regions set in the settings\n\tif (!wpmDataLayer?.general?.consent_management?.restricted_regions) return\n\t// console.log(\"countryUnlock regions\", wpmDataLayer?.general?.consent_management?.restricted_regions)\n\n\tconst browserGeo = await wpm.getBrowserGeo()\n\n\t// If the country is in the list of restricted countries, then set the consent values to false\n\t// else set the consent values to true\n\tif (browserIsInRestrictedRegion(browserGeo)) {\n\n\t\tpmw.console.log(`The country and/or region is restricted. Set the consent values to false and block the pixels.`, browserGeo)\n\t\twpm.consent.categories.set({statistics: false, marketing: false, preferences: false, necessary: true})\n\t\treturn\n\t}\n\n\tpmw.console.log(`The country and/or region is not restricted. Set the consent values to true and fire the pixels.`, browserGeo)\n\twpm.consent.categories.set({statistics: true, marketing: true, preferences: true, necessary: true})\n}\n\nconst browserIsInRestrictedRegion = (browserGeo) => {\n\n\tif (browserGeo === null) {\n\t\treturn true\n\t}\n\n\tif (browserGeo.countryCode && wpmDataLayer?.general?.consent_management?.restricted_regions.includes(browserGeo.countryCode)) {\n\t\treturn true\n\t}\n\n\tif (browserGeo.regionCode && wpmDataLayer?.general?.consent_management?.restricted_regions.includes(browserGeo.regionCode)) {\n\t\treturn true\n\t}\n\n\treturn false\n}\n\n/**\n *\n * TODO: Remove pixel based features once support for Borlabs and Real Cookie Banner is fully dropped\n */\nexport const canPixelBeFired = (category, pixelName) => {\n\n\tif (wpm.consent.categories.get()[category]) {\n\t\tpmw.console.log(`The category ${category} has been approved. Loading the ${pixelName} pixel.`)\n\t\treturn true\n\t}\n\n\tlogSuppressedPixel(category, pixelName)\n\treturn false\n}\n\nexport const logSuppressedPixel = (category, pixelName) => {\n\n\tlet mode = explicitConsentModeActive() ? \"explicit\" : \"implicit\"\n\n\tconsole.log(`Pixel Manager: The pixel has not loaded because you have not given consent for it yet. - mode: ${mode}, category: ${category}, pixel: ${pixelName}`)\n}\n\n/**\n * Trigger the consent management loaded event\n *\n * @returns {void}\n * @private\n */\nconst loadTrigger = () => {\n\n\t// Trigger an event once the PMW consent management has been loaded\n\tdocument.dispatchEvent(new Event(\"pmw_cookie_consent_management_loaded\"))\n\tdocument.dispatchEvent(new Event(\"pmwCookieConsentManagementLoaded\"))\n\n\tpmw.console.log(\"Loaded consent category settings: \", wpm.consent.categories.get())\n}\n\n/**\n * Reload the page when the user clicks a cosent button\n *\n * @param ids\n * @param classes\n * @returns {void}\n * @public\n */\nexport const cmpConsentClickObserver = ({ids = [], classes = []}) => {\n\n\t// if buttonClasses don't have a dot in front of them, add it\n\tclasses = classes.map(buttonClass => buttonClass.startsWith(\".\") ? buttonClass : \".\" + buttonClass)\n\n\tconst observer = new MutationObserver((mutationsList, observer) => {\n\t\t// Look through all mutations that just occured\n\t\tfor (let mutation of mutationsList) {\n\t\t\t// If the addedNodes property has one or more nodes\n\t\t\tif (mutation.addedNodes.length) {\n\n\t\t\t\tif (classes.length > 0) {\n\n\t\t\t\t\tconst elements = document.querySelectorAll(classes.join(\", \"))\n\n\t\t\t\t\telements.forEach(element => {\n\t\t\t\t\t\telement.addEventListener(\"click\", () => {\n\t\t\t\t\t\t\tlocation.reload()\n\t\t\t\t\t\t})\n\t\t\t\t\t\tobserver.disconnect()\n\t\t\t\t\t})\n\t\t\t\t}\n\n\t\t\t\tif (ids.length > 0) {\n\n\t\t\t\t\tids.forEach(buttonId => {\n\t\t\t\t\t\tconst button = document.getElementById(buttonId)\n\t\t\t\t\t\tif (button) {\n\t\t\t\t\t\t\tbutton.addEventListener(\"click\", () => {\n\t\t\t\t\t\t\t\tlocation.reload()\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t// Once we have added the click event listener, there's no need to observe anymore\n\t\t\t\t\t\t\tobserver.disconnect()\n\t\t\t\t\t\t}\n\t\t\t\t\t})\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t})\n\n\tobserver.observe(document.body, {childList: true, subtree: true})\n}\n","/**\n * Logs a message to the console if the logger is enabled.\n *\n * @module console\n * @param message\n * @param objects\n * @public\n * @returns {void}\n */\nexport const log = (message, ...objects) => {\n\n\tif (!isLoggerEnabled()) return\n\n\tif (typeof message === \"object\") {\n\t\tconsole.log(\"Pixel Manager: \", message, ...objects)\n\t} else if (objects.length) {\n\t\tconsole.log(\"Pixel Manager: \" + message, ...objects)\n\t} else {\n\t\tconsole.log(\"Pixel Manager: \" + message)\n\t}\n}\n\n/**\n * Logs an error message to the console.\n *\n * @module console\n * @param message\n * @param objects\n * @public\n * @returns {void}\n */\nexport const error = (message, ...objects) => {\n\n\t// if (!isLoggerEnabled()) return\n\n\t// if message is an object, log the keys\n\tif (typeof message === \"object\") {\n\t\tconsole.error(\"Pixel Manager: \", message, ...objects)\n\t} else if (objects.length) {\n\t\tconsole.error(\"Pixel Manager: \" + message, ...objects)\n\t} else {\n\t\tconsole.error(\"Pixel Manager: \" + message)\n\t}\n}\n\n/**\n * Checks if the logger is enabled.\n *\n * @return {boolean}\n */\nconst isLoggerEnabled = () => {\n\n\tif (urlLoggerOff()) return false\n\n\tif (sessionLoggerEnabled()) return true\n\n\tif (urlLoggerOn()) return true\n\n\treturn !!wpmDataLayer?.general?.logger?.is_active\n}\n\n/**\n * Turn off the logger if the URL parameter is set.\n *\n * @return {boolean}\n */\nconst urlLoggerOff = () => {\n\n\tif (wpm.urlHasParameter(\"pmwloggeroff\")) {\n\t\twpm.storeData(\"loggerEnabled\", false)\n\t}\n\n\treturn wpm.urlHasParameter(\"pmwloggeroff\")\n}\n\n/**\n * Check if the logger is enabled for the session.\n *\n * @return {boolean}\n */\nconst sessionLoggerEnabled = () => {\n\treturn wpm.retrieveData(\"loggerEnabled\")\n}\n\n/**\n * Turn on the logger if the URL parameter is set.\n *\n * @return {boolean}\n */\nconst urlLoggerOn = () => {\n\n\tif (wpm.urlHasParameter(\"pmwloggeron\")) {\n\t\twpm.storeData(\"loggerEnabled\", true)\n\t}\n\n\treturn wpm.urlHasParameter(\"pmwloggeron\")\n}\n","// https://stackoverflow.com/a/70870895/4688612\nexport const getLocationByTimeZone = () => {\n\n\tconst timezones = {\n\t\t\"Africa/Abidjan\" : [\"CI\", \"BF\", \"GH\", \"GM\", \"GN\", \"ML\", \"MR\", \"SH\", \"SL\", \"SN\", \"TG\"],\n\t\t\"Africa/Accra\" : [\"GH\"],\n\t\t\"Africa/Addis_Ababa\" : [\"ET\"],\n\t\t\"Africa/Algiers\" : [\"DZ\"],\n\t\t\"Africa/Asmara\" : [\"ER\"],\n\t\t\"Africa/Asmera\" : [\"ER\"],\n\t\t\"Africa/Bamako\" : [\"ML\"],\n\t\t\"Africa/Bangui\" : [\"CF\"],\n\t\t\"Africa/Banjul\" : [\"GM\"],\n\t\t\"Africa/Bissau\" : [\"GW\"],\n\t\t\"Africa/Blantyre\" : [\"MW\"],\n\t\t\"Africa/Brazzaville\" : [\"CG\"],\n\t\t\"Africa/Bujumbura\" : [\"BI\"],\n\t\t\"Africa/Cairo\" : [\"EG\"],\n\t\t\"Africa/Casablanca\" : [\"MA\"],\n\t\t\"Africa/Ceuta\" : [\"ES\"],\n\t\t\"Africa/Conakry\" : [\"GN\"],\n\t\t\"Africa/Dakar\" : [\"SN\"],\n\t\t\"Africa/Dar_es_Salaam\" : [\"TZ\"],\n\t\t\"Africa/Djibouti\" : [\"DJ\"],\n\t\t\"Africa/Douala\" : [\"CM\"],\n\t\t\"Africa/El_Aaiun\" : [\"EH\"],\n\t\t\"Africa/Freetown\" : [\"SL\"],\n\t\t\"Africa/Gaborone\" : [\"BW\"],\n\t\t\"Africa/Harare\" : [\"ZW\"],\n\t\t\"Africa/Johannesburg\" : [\"ZA\", \"LS\", \"SZ\"],\n\t\t\"Africa/Juba\" : [\"SS\"],\n\t\t\"Africa/Kampala\" : [\"UG\"],\n\t\t\"Africa/Khartoum\" : [\"SD\"],\n\t\t\"Africa/Kigali\" : [\"RW\"],\n\t\t\"Africa/Kinshasa\" : [\"CD\"],\n\t\t\"Africa/Lagos\" : [\"NG\", \"AO\", \"BJ\", \"CD\", \"CF\", \"CG\", \"CM\", \"GA\", \"GQ\", \"NE\"],\n\t\t\"Africa/Libreville\" : [\"GA\"],\n\t\t\"Africa/Lome\" : [\"TG\"],\n\t\t\"Africa/Luanda\" : [\"AO\"],\n\t\t\"Africa/Lubumbashi\" : [\"CD\"],\n\t\t\"Africa/Lusaka\" : [\"ZM\"],\n\t\t\"Africa/Malabo\" : [\"GQ\"],\n\t\t\"Africa/Maputo\" : [\"MZ\", \"BI\", \"BW\", \"CD\", \"MW\", \"RW\", \"ZM\", \"ZW\"],\n\t\t\"Africa/Maseru\" : [\"LS\"],\n\t\t\"Africa/Mbabane\" : [\"SZ\"],\n\t\t\"Africa/Mogadishu\" : [\"SO\"],\n\t\t\"Africa/Monrovia\" : [\"LR\"],\n\t\t\"Africa/Nairobi\" : [\"KE\", \"DJ\", \"ER\", \"ET\", \"KM\", \"MG\", \"SO\", \"TZ\", \"UG\", \"YT\"],\n\t\t\"Africa/Ndjamena\" : [\"TD\"],\n\t\t\"Africa/Niamey\" : [\"NE\"],\n\t\t\"Africa/Nouakchott\" : [\"MR\"],\n\t\t\"Africa/Ouagadougou\" : [\"BF\"],\n\t\t\"Africa/Porto-Novo\" : [\"BJ\"],\n\t\t\"Africa/Sao_Tome\" : [\"ST\"],\n\t\t\"Africa/Timbuktu\" : [\"ML\"],\n\t\t\"Africa/Tripoli\" : [\"LY\"],\n\t\t\"Africa/Tunis\" : [\"TN\"],\n\t\t\"Africa/Windhoek\" : [\"NA\"],\n\t\t\"America/Adak\" : [\"US\"],\n\t\t\"America/Anchorage\" : [\"US\"],\n\t\t\"America/Anguilla\" : [\"AI\"],\n\t\t\"America/Antigua\" : [\"AG\"],\n\t\t\"America/Araguaina\" : [\"BR\"],\n\t\t\"America/Argentina/Buenos_Aires\": [\"AR\"],\n\t\t\"America/Argentina/Catamarca\" : [\"AR\"],\n\t\t\"America/Argentina/Cordoba\" : [\"AR\"],\n\t\t\"America/Argentina/Jujuy\" : [\"AR\"],\n\t\t\"America/Argentina/La_Rioja\" : [\"AR\"],\n\t\t\"America/Argentina/Mendoza\" : [\"AR\"],\n\t\t\"America/Argentina/Rio_Gallegos\": [\"AR\"],\n\t\t\"America/Argentina/Salta\" : [\"AR\"],\n\t\t\"America/Argentina/San_Juan\" : [\"AR\"],\n\t\t\"America/Argentina/San_Luis\" : [\"AR\"],\n\t\t\"America/Argentina/Tucuman\" : [\"AR\"],\n\t\t\"America/Argentina/Ushuaia\" : [\"AR\"],\n\t\t\"America/Aruba\" : [\"AW\"],\n\t\t\"America/Asuncion\" : [\"PY\"],\n\t\t\"America/Atikokan\" : [\"CA\"],\n\t\t\"America/Bahia\" : [\"BR\"],\n\t\t\"America/Bahia_Banderas\" : [\"MX\"],\n\t\t\"America/Barbados\" : [\"BB\"],\n\t\t\"America/Belem\" : [\"BR\"],\n\t\t\"America/Belize\" : [\"BZ\"],\n\t\t\"America/Blanc-Sablon\" : [\"CA\"],\n\t\t\"America/Boa_Vista\" : [\"BR\"],\n\t\t\"America/Bogota\" : [\"CO\"],\n\t\t\"America/Boise\" : [\"US\"],\n\t\t\"America/Cambridge_Bay\" : [\"CA\"],\n\t\t\"America/Campo_Grande\" : [\"BR\"],\n\t\t\"America/Cancun\" : [\"MX\"],\n\t\t\"America/Caracas\" : [\"VE\"],\n\t\t\"America/Cayenne\" : [\"GF\"],\n\t\t\"America/Cayman\" : [\"KY\"],\n\t\t\"America/Chicago\" : [\"US\"],\n\t\t\"America/Chihuahua\" : [\"MX\"],\n\t\t\"America/Coral_Harbour\" : [\"CA\"],\n\t\t\"America/Costa_Rica\" : [\"CR\"],\n\t\t\"America/Creston\" : [\"CA\"],\n\t\t\"America/Cuiaba\" : [\"BR\"],\n\t\t\"America/Curacao\" : [\"CW\"],\n\t\t\"America/Danmarkshavn\" : [\"GL\"],\n\t\t\"America/Dawson\" : [\"CA\"],\n\t\t\"America/Dawson_Creek\" : [\"CA\"],\n\t\t\"America/Denver\" : [\"US\"],\n\t\t\"America/Detroit\" : [\"US\"],\n\t\t\"America/Dominica\" : [\"DM\"],\n\t\t\"America/Edmonton\" : [\"CA\"],\n\t\t\"America/Eirunepe\" : [\"BR\"],\n\t\t\"America/El_Salvador\" : [\"SV\"],\n\t\t\"America/Fort_Nelson\" : [\"CA\"],\n\t\t\"America/Fortaleza\" : [\"BR\"],\n\t\t\"America/Glace_Bay\" : [\"CA\"],\n\t\t\"America/Goose_Bay\" : [\"CA\"],\n\t\t\"America/Grand_Turk\" : [\"TC\"],\n\t\t\"America/Grenada\" : [\"GD\"],\n\t\t\"America/Guadeloupe\" : [\"GP\"],\n\t\t\"America/Guatemala\" : [\"GT\"],\n\t\t\"America/Guayaquil\" : [\"EC\"],\n\t\t\"America/Guyana\" : [\"GY\"],\n\t\t\"America/Halifax\" : [\"CA\"],\n\t\t\"America/Havana\" : [\"CU\"],\n\t\t\"America/Hermosillo\" : [\"MX\"],\n\t\t\"America/Indiana/Indianapolis\" : [\"US\"],\n\t\t\"America/Indiana/Knox\" : [\"US\"],\n\t\t\"America/Indiana/Marengo\" : [\"US\"],\n\t\t\"America/Indiana/Petersburg\" : [\"US\"],\n\t\t\"America/Indiana/Tell_City\" : [\"US\"],\n\t\t\"America/Indiana/Vevay\" : [\"US\"],\n\t\t\"America/Indiana/Vincennes\" : [\"US\"],\n\t\t\"America/Indiana/Winamac\" : [\"US\"],\n\t\t\"America/Inuvik\" : [\"CA\"],\n\t\t\"America/Iqaluit\" : [\"CA\"],\n\t\t\"America/Jamaica\" : [\"JM\"],\n\t\t\"America/Juneau\" : [\"US\"],\n\t\t\"America/Kentucky/Louisville\" : [\"US\"],\n\t\t\"America/Kentucky/Monticello\" : [\"US\"],\n\t\t\"America/Kralendijk\" : [\"BQ\"],\n\t\t\"America/La_Paz\" : [\"BO\"],\n\t\t\"America/Lima\" : [\"PE\"],\n\t\t\"America/Los_Angeles\" : [\"US\"],\n\t\t\"America/Lower_Princes\" : [\"SX\"],\n\t\t\"America/Maceio\" : [\"BR\"],\n\t\t\"America/Managua\" : [\"NI\"],\n\t\t\"America/Manaus\" : [\"BR\"],\n\t\t\"America/Marigot\" : [\"MF\"],\n\t\t\"America/Martinique\" : [\"MQ\"],\n\t\t\"America/Matamoros\" : [\"MX\"],\n\t\t\"America/Mazatlan\" : [\"MX\"],\n\t\t\"America/Menominee\" : [\"US\"],\n\t\t\"America/Merida\" : [\"MX\"],\n\t\t\"America/Metlakatla\" : [\"US\"],\n\t\t\"America/Mexico_City\" : [\"MX\"],\n\t\t\"America/Miquelon\" : [\"PM\"],\n\t\t\"America/Moncton\" : [\"CA\"],\n\t\t\"America/Monterrey\" : [\"MX\"],\n\t\t\"America/Montevideo\" : [\"UY\"],\n\t\t\"America/Montreal\" : [\"CA\"],\n\t\t\"America/Montserrat\" : [\"MS\"],\n\t\t\"America/Nassau\" : [\"BS\"],\n\t\t\"America/New_York\" : [\"US\"],\n\t\t\"America/Nipigon\" : [\"CA\"],\n\t\t\"America/Nome\" : [\"US\"],\n\t\t\"America/Noronha\" : [\"BR\"],\n\t\t\"America/North_Dakota/Beulah\" : [\"US\"],\n\t\t\"America/North_Dakota/Center\" : [\"US\"],\n\t\t\"America/North_Dakota/New_Salem\": [\"US\"],\n\t\t\"America/Nuuk\" : [\"GL\"],\n\t\t\"America/Ojinaga\" : [\"MX\"],\n\t\t\"America/Panama\" : [\"PA\", \"CA\", \"KY\"],\n\t\t\"America/Pangnirtung\" : [\"CA\"],\n\t\t\"America/Paramaribo\" : [\"SR\"],\n\t\t\"America/Phoenix\" : [\"US\", \"CA\"],\n\t\t\"America/Port-au-Prince\" : [\"HT\"],\n\t\t\"America/Port_of_Spain\" : [\"TT\"],\n\t\t\"America/Porto_Velho\" : [\"BR\"],\n\t\t\"America/Puerto_Rico\" : [\"PR\", \"AG\", \"CA\", \"AI\", \"AW\", \"BL\", \"BQ\", \"CW\", \"DM\", \"GD\", \"GP\", \"KN\", \"LC\", \"MF\", \"MS\", \"SX\", \"TT\", \"VC\", \"VG\", \"VI\"],\n\t\t\"America/Punta_Arenas\" : [\"CL\"],\n\t\t\"America/Rainy_River\" : [\"CA\"],\n\t\t\"America/Rankin_Inlet\" : [\"CA\"],\n\t\t\"America/Recife\" : [\"BR\"],\n\t\t\"America/Regina\" : [\"CA\"],\n\t\t\"America/Resolute\" : [\"CA\"],\n\t\t\"America/Rio_Branco\" : [\"BR\"],\n\t\t\"America/Santarem\" : [\"BR\"],\n\t\t\"America/Santiago\" : [\"CL\"],\n\t\t\"America/Santo_Domingo\" : [\"DO\"],\n\t\t\"America/Sao_Paulo\" : [\"BR\"],\n\t\t\"America/Scoresbysund\" : [\"GL\"],\n\t\t\"America/Sitka\" : [\"US\"],\n\t\t\"America/St_Barthelemy\" : [\"BL\"],\n\t\t\"America/St_Johns\" : [\"CA\"],\n\t\t\"America/St_Kitts\" : [\"KN\"],\n\t\t\"America/St_Lucia\" : [\"LC\"],\n\t\t\"America/St_Thomas\" : [\"VI\"],\n\t\t\"America/St_Vincent\" : [\"VC\"],\n\t\t\"America/Swift_Current\" : [\"CA\"],\n\t\t\"America/Tegucigalpa\" : [\"HN\"],\n\t\t\"America/Thule\" : [\"GL\"],\n\t\t\"America/Thunder_Bay\" : [\"CA\"],\n\t\t\"America/Tijuana\" : [\"MX\"],\n\t\t\"America/Toronto\" : [\"CA\", \"BS\"],\n\t\t\"America/Tortola\" : [\"VG\"],\n\t\t\"America/Vancouver\" : [\"CA\"],\n\t\t\"America/Virgin\" : [\"VI\"],\n\t\t\"America/Whitehorse\" : [\"CA\"],\n\t\t\"America/Winnipeg\" : [\"CA\"],\n\t\t\"America/Yakutat\" : [\"US\"],\n\t\t\"America/Yellowknife\" : [\"CA\"],\n\t\t\"Antarctica/Casey\" : [\"AQ\"],\n\t\t\"Antarctica/Davis\" : [\"AQ\"],\n\t\t\"Antarctica/DumontDUrville\" : [\"AQ\"],\n\t\t\"Antarctica/Macquarie\" : [\"AU\"],\n\t\t\"Antarctica/Mawson\" : [\"AQ\"],\n\t\t\"Antarctica/McMurdo\" : [\"AQ\"],\n\t\t\"Antarctica/Palmer\" : [\"AQ\"],\n\t\t\"Antarctica/Rothera\" : [\"AQ\"],\n\t\t\"Antarctica/South_Pole\" : [\"AQ\"],\n\t\t\"Antarctica/Syowa\" : [\"AQ\"],\n\t\t\"Antarctica/Troll\" : [\"AQ\"],\n\t\t\"Antarctica/Vostok\" : [\"AQ\"],\n\t\t\"Arctic/Longyearbyen\" : [\"SJ\"],\n\t\t\"Asia/Aden\" : [\"YE\"],\n\t\t\"Asia/Almaty\" : [\"KZ\"],\n\t\t\"Asia/Amman\" : [\"JO\"],\n\t\t\"Asia/Anadyr\" : [\"RU\"],\n\t\t\"Asia/Aqtau\" : [\"KZ\"],\n\t\t\"Asia/Aqtobe\" : [\"KZ\"],\n\t\t\"Asia/Ashgabat\" : [\"TM\"],\n\t\t\"Asia/Atyrau\" : [\"KZ\"],\n\t\t\"Asia/Baghdad\" : [\"IQ\"],\n\t\t\"Asia/Bahrain\" : [\"BH\"],\n\t\t\"Asia/Baku\" : [\"AZ\"],\n\t\t\"Asia/Bangkok\" : [\"TH\", \"KH\", \"LA\", \"VN\"],\n\t\t\"Asia/Barnaul\" : [\"RU\"],\n\t\t\"Asia/Beirut\" : [\"LB\"],\n\t\t\"Asia/Bishkek\" : [\"KG\"],\n\t\t\"Asia/Brunei\" : [\"BN\"],\n\t\t\"Asia/Chita\" : [\"RU\"],\n\t\t\"Asia/Choibalsan\" : [\"MN\"],\n\t\t\"Asia/Colombo\" : [\"LK\"],\n\t\t\"Asia/Damascus\" : [\"SY\"],\n\t\t\"Asia/Dhaka\" : [\"BD\"],\n\t\t\"Asia/Dili\" : [\"TL\"],\n\t\t\"Asia/Dubai\" : [\"AE\", \"OM\"],\n\t\t\"Asia/Dushanbe\" : [\"TJ\"],\n\t\t\"Asia/Famagusta\" : [\"CY\"],\n\t\t\"Asia/Gaza\" : [\"PS\"],\n\t\t\"Asia/Hebron\" : [\"PS\"],\n\t\t\"Asia/Ho_Chi_Minh\" : [\"VN\"],\n\t\t\"Asia/Hong_Kong\" : [\"HK\"],\n\t\t\"Asia/Hovd\" : [\"MN\"],\n\t\t\"Asia/Irkutsk\" : [\"RU\"],\n\t\t\"Asia/Jakarta\" : [\"ID\"],\n\t\t\"Asia/Jayapura\" : [\"ID\"],\n\t\t\"Asia/Jerusalem\" : [\"IL\"],\n\t\t\"Asia/Kabul\" : [\"AF\"],\n\t\t\"Asia/Kamchatka\" : [\"RU\"],\n\t\t\"Asia/Karachi\" : [\"PK\"],\n\t\t\"Asia/Kathmandu\" : [\"NP\"],\n\t\t\"Asia/Khandyga\" : [\"RU\"],\n\t\t\"Asia/Kolkata\" : [\"IN\"],\n\t\t\"Asia/Krasnoyarsk\" : [\"RU\"],\n\t\t\"Asia/Kuala_Lumpur\" : [\"MY\"],\n\t\t\"Asia/Kuching\" : [\"MY\"],\n\t\t\"Asia/Kuwait\" : [\"KW\"],\n\t\t\"Asia/Macau\" : [\"MO\"],\n\t\t\"Asia/Magadan\" : [\"RU\"],\n\t\t\"Asia/Makassar\" : [\"ID\"],\n\t\t\"Asia/Manila\" : [\"PH\"],\n\t\t\"Asia/Muscat\" : [\"OM\"],\n\t\t\"Asia/Nicosia\" : [\"CY\"],\n\t\t\"Asia/Novokuznetsk\" : [\"RU\"],\n\t\t\"Asia/Novosibirsk\" : [\"RU\"],\n\t\t\"Asia/Omsk\" : [\"RU\"],\n\t\t\"Asia/Oral\" : [\"KZ\"],\n\t\t\"Asia/Phnom_Penh\" : [\"KH\"],\n\t\t\"Asia/Pontianak\" : [\"ID\"],\n\t\t\"Asia/Pyongyang\" : [\"KP\"],\n\t\t\"Asia/Qatar\" : [\"QA\", \"BH\"],\n\t\t\"Asia/Qostanay\" : [\"KZ\"],\n\t\t\"Asia/Qyzylorda\" : [\"KZ\"],\n\t\t\"Asia/Riyadh\" : [\"SA\", \"AQ\", \"KW\", \"YE\"],\n\t\t\"Asia/Sakhalin\" : [\"RU\"],\n\t\t\"Asia/Samarkand\" : [\"UZ\"],\n\t\t\"Asia/Seoul\" : [\"KR\"],\n\t\t\"Asia/Shanghai\" : [\"CN\"],\n\t\t\"Asia/Singapore\" : [\"SG\", \"MY\"],\n\t\t\"Asia/Srednekolymsk\" : [\"RU\"],\n\t\t\"Asia/Taipei\" : [\"TW\"],\n\t\t\"Asia/Tashkent\" : [\"UZ\"],\n\t\t\"Asia/Tbilisi\" : [\"GE\"],\n\t\t\"Asia/Tehran\" : [\"IR\"],\n\t\t\"Asia/Thimphu\" : [\"BT\"],\n\t\t\"Asia/Tokyo\" : [\"JP\"],\n\t\t\"Asia/Tomsk\" : [\"RU\"],\n\t\t\"Asia/Ulaanbaatar\" : [\"MN\"],\n\t\t\"Asia/Urumqi\" : [\"CN\"],\n\t\t\"Asia/Ust-Nera\" : [\"RU\"],\n\t\t\"Asia/Vientiane\" : [\"LA\"],\n\t\t\"Asia/Vladivostok\" : [\"RU\"],\n\t\t\"Asia/Yakutsk\" : [\"RU\"],\n\t\t\"Asia/Yangon\" : [\"MM\"],\n\t\t\"Asia/Yekaterinburg\" : [\"RU\"],\n\t\t\"Asia/Yerevan\" : [\"AM\"],\n\t\t\"Atlantic/Azores\" : [\"PT\"],\n\t\t\"Atlantic/Bermuda\" : [\"BM\"],\n\t\t\"Atlantic/Canary\" : [\"ES\"],\n\t\t\"Atlantic/Cape_Verde\" : [\"CV\"],\n\t\t\"Atlantic/Faroe\" : [\"FO\"],\n\t\t\"Atlantic/Jan_Mayen\" : [\"SJ\"],\n\t\t\"Atlantic/Madeira\" : [\"PT\"],\n\t\t\"Atlantic/Reykjavik\" : [\"IS\"],\n\t\t\"Atlantic/South_Georgia\" : [\"GS\"],\n\t\t\"Atlantic/St_Helena\" : [\"SH\"],\n\t\t\"Atlantic/Stanley\" : [\"FK\"],\n\t\t\"Australia/Adelaide\" : [\"AU\"],\n\t\t\"Australia/Brisbane\" : [\"AU\"],\n\t\t\"Australia/Broken_Hill\" : [\"AU\"],\n\t\t\"Australia/Darwin\" : [\"AU\"],\n\t\t\"Australia/Eucla\" : [\"AU\"],\n\t\t\"Australia/Hobart\" : [\"AU\"],\n\t\t\"Australia/Lindeman\" : [\"AU\"],\n\t\t\"Australia/Lord_Howe\" : [\"AU\"],\n\t\t\"Australia/Melbourne\" : [\"AU\"],\n\t\t\"Australia/Perth\" : [\"AU\"],\n\t\t\"Australia/Sydney\" : [\"AU\"],\n\t\t\"Canada/Eastern\" : [\"CA\"],\n\t\t\"Europe/Amsterdam\" : [\"NL\"],\n\t\t\"Europe/Andorra\" : [\"AD\"],\n\t\t\"Europe/Astrakhan\" : [\"RU\"],\n\t\t\"Europe/Athens\" : [\"GR\"],\n\t\t\"Europe/Belfast\" : [\"GB\"],\n\t\t\"Europe/Belgrade\" : [\"RS\", \"BA\", \"HR\", \"ME\", \"MK\", \"SI\"],\n\t\t\"Europe/Berlin\" : [\"DE\"],\n\t\t\"Europe/Bratislava\" : [\"SK\"],\n\t\t\"Europe/Brussels\" : [\"BE\"],\n\t\t\"Europe/Bucharest\" : [\"RO\"],\n\t\t\"Europe/Budapest\" : [\"HU\"],\n\t\t\"Europe/Busingen\" : [\"DE\"],\n\t\t\"Europe/Chisinau\" : [\"MD\"],\n\t\t\"Europe/Copenhagen\" : [\"DK\"],\n\t\t\"Europe/Dublin\" : [\"IE\"],\n\t\t\"Europe/Gibraltar\" : [\"GI\"],\n\t\t\"Europe/Guernsey\" : [\"GG\"],\n\t\t\"Europe/Helsinki\" : [\"FI\", \"AX\"],\n\t\t\"Europe/Isle_of_Man\" : [\"IM\"],\n\t\t\"Europe/Istanbul\" : [\"TR\"],\n\t\t\"Europe/Jersey\" : [\"JE\"],\n\t\t\"Europe/Kaliningrad\" : [\"RU\"],\n\t\t\"Europe/Kiev\" : [\"UA\"],\n\t\t\"Europe/Kirov\" : [\"RU\"],\n\t\t\"Europe/Lisbon\" : [\"PT\"],\n\t\t\"Europe/Ljubljana\" : [\"SI\"],\n\t\t\"Europe/London\" : [\"GB\", \"GG\", \"IM\", \"JE\"],\n\t\t\"Europe/Luxembourg\" : [\"LU\"],\n\t\t\"Europe/Madrid\" : [\"ES\"],\n\t\t\"Europe/Malta\" : [\"MT\"],\n\t\t\"Europe/Mariehamn\" : [\"AX\"],\n\t\t\"Europe/Minsk\" : [\"BY\"],\n\t\t\"Europe/Monaco\" : [\"MC\"],\n\t\t\"Europe/Moscow\" : [\"RU\"],\n\t\t\"Europe/Oslo\" : [\"NO\", \"SJ\", \"BV\"],\n\t\t\"Europe/Paris\" : [\"FR\"],\n\t\t\"Europe/Podgorica\" : [\"ME\"],\n\t\t\"Europe/Prague\" : [\"CZ\", \"SK\"],\n\t\t\"Europe/Riga\" : [\"LV\"],\n\t\t\"Europe/Rome\" : [\"IT\", \"SM\", \"VA\"],\n\t\t\"Europe/Samara\" : [\"RU\"],\n\t\t\"Europe/San_Marino\" : [\"SM\"],\n\t\t\"Europe/Sarajevo\" : [\"BA\"],\n\t\t\"Europe/Saratov\" : [\"RU\"],\n\t\t\"Europe/Simferopol\" : [\"RU\", \"UA\"],\n\t\t\"Europe/Skopje\" : [\"MK\"],\n\t\t\"Europe/Sofia\" : [\"BG\"],\n\t\t\"Europe/Stockholm\" : [\"SE\"],\n\t\t\"Europe/Tallinn\" : [\"EE\"],\n\t\t\"Europe/Tirane\" : [\"AL\"],\n\t\t\"Europe/Ulyanovsk\" : [\"RU\"],\n\t\t\"Europe/Uzhgorod\" : [\"UA\"],\n\t\t\"Europe/Vaduz\" : [\"LI\"],\n\t\t\"Europe/Vatican\" : [\"VA\"],\n\t\t\"Europe/Vienna\" : [\"AT\"],\n\t\t\"Europe/Vilnius\" : [\"LT\"],\n\t\t\"Europe/Volgograd\" : [\"RU\"],\n\t\t\"Europe/Warsaw\" : [\"PL\"],\n\t\t\"Europe/Zagreb\" : [\"HR\"],\n\t\t\"Europe/Zaporozhye\" : [\"UA\"],\n\t\t\"Europe/Zurich\" : [\"CH\", \"DE\", \"LI\"],\n\t\t\"GB\" : [\"GB\"],\n\t\t\"GB-Eire\" : [\"GB\"],\n\t\t\"Indian/Antananarivo\" : [\"MG\"],\n\t\t\"Indian/Chagos\" : [\"IO\"],\n\t\t\"Indian/Christmas\" : [\"CX\"],\n\t\t\"Indian/Cocos\" : [\"CC\"],\n\t\t\"Indian/Comoro\" : [\"KM\"],\n\t\t\"Indian/Kerguelen\" : [\"TF\", \"HM\"],\n\t\t\"Indian/Mahe\" : [\"SC\"],\n\t\t\"Indian/Maldives\" : [\"MV\"],\n\t\t\"Indian/Mauritius\" : [\"MU\"],\n\t\t\"Indian/Mayotte\" : [\"YT\"],\n\t\t\"Indian/Reunion\" : [\"RE\", \"TF\"],\n\t\t\"NZ\" : [\"NZ\"],\n\t\t\"Pacific/Apia\" : [\"WS\"],\n\t\t\"Pacific/Auckland\" : [\"NZ\", \"AQ\"],\n\t\t\"Pacific/Bougainville\" : [\"PG\"],\n\t\t\"Pacific/Chatham\" : [\"NZ\"],\n\t\t\"Pacific/Chuuk\" : [\"FM\"],\n\t\t\"Pacific/Easter\" : [\"CL\"],\n\t\t\"Pacific/Efate\" : [\"VU\"],\n\t\t\"Pacific/Fakaofo\" : [\"TK\"],\n\t\t\"Pacific/Fiji\" : [\"FJ\"],\n\t\t\"Pacific/Funafuti\" : [\"TV\"],\n\t\t\"Pacific/Galapagos\" : [\"EC\"],\n\t\t\"Pacific/Gambier\" : [\"PF\"],\n\t\t\"Pacific/Guadalcanal\" : [\"SB\"],\n\t\t\"Pacific/Guam\" : [\"GU\", \"MP\"],\n\t\t\"Pacific/Honolulu\" : [\"US\", \"UM\"],\n\t\t\"Pacific/Johnston\" : [\"UM\"],\n\t\t\"Pacific/Kanton\" : [\"KI\"],\n\t\t\"Pacific/Kiritimati\" : [\"KI\"],\n\t\t\"Pacific/Kosrae\" : [\"FM\"],\n\t\t\"Pacific/Kwajalein\" : [\"MH\"],\n\t\t\"Pacific/Majuro\" : [\"MH\"],\n\t\t\"Pacific/Marquesas\" : [\"PF\"],\n\t\t\"Pacific/Midway\" : [\"UM\"],\n\t\t\"Pacific/Nauru\" : [\"NR\"],\n\t\t\"Pacific/Niue\" : [\"NU\"],\n\t\t\"Pacific/Norfolk\" : [\"NF\"],\n\t\t\"Pacific/Noumea\" : [\"NC\"],\n\t\t\"Pacific/Pago_Pago\" : [\"AS\", \"UM\"],\n\t\t\"Pacific/Palau\" : [\"PW\"],\n\t\t\"Pacific/Pitcairn\" : [\"PN\"],\n\t\t\"Pacific/Pohnpei\" : [\"FM\"],\n\t\t\"Pacific/Port_Moresby\" : [\"PG\", \"AQ\"],\n\t\t\"Pacific/Rarotonga\" : [\"CK\"],\n\t\t\"Pacific/Saipan\" : [\"MP\"],\n\t\t\"Pacific/Samoa\" : [\"WS\"],\n\t\t\"Pacific/Tahiti\" : [\"PF\"],\n\t\t\"Pacific/Tarawa\" : [\"KI\"],\n\t\t\"Pacific/Tongatapu\" : [\"TO\"],\n\t\t\"Pacific/Wake\" : [\"UM\"],\n\t\t\"Pacific/Wallis\" : [\"WF\"],\n\t\t\"Singapore\" : [\"SG\"],\n\t\t\"US/Arizona\" : [\"US\"],\n\t\t\"US/Hawaii\" : [\"US\"],\n\t\t\"US/Samoa\" : [\"WS\"],\n\t}\n\n\tconst timezone = Intl.DateTimeFormat().resolvedOptions().timeZone\n\n\tif (timezone === \"\" || !timezone) {\n\t\treturn null\n\t}\n\n\tlet geoLocation = {\n\t\tcountryCode: timezones[timezone][0].toUpperCase(),\n\t}\n\n\t// if the timezone is equals \"America/Los_Angeles\" then add the regionCode \"US-CA\"\n\tif (timezone === \"America/Los_Angeles\") {\n\t\tgeoLocation.regionCode = \"US-CA\"\n\t}\n\n\tif (timezone === \"Europe/Zurich\") {\n\t\tgeoLocation.regionCode = \"CH-ZH\"\n\t}\n\n\treturn geoLocation\n}\n\n\n\n\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","/**\n * Run PMW main loader\n */\nimport {loadDeprecatedFunctions} from \"./wpm/deprecated.mjs\"\n\nconst main = async () => {\n\n\trequire(\"./wpm/functions_main\")\n\trequire(\"./version.js\")\n\n\t// Wait until jQuery is loaded\n\tawait wpm.jQueryExists()\n\n\t// Wait until wpmDataLayer is loaded\n\tawait wpm.wpmDataLayerFullyLoaded()\n\n\t// wait 1000ms\n\t// await new Promise(resolve => setTimeout(resolve, 1000))\n\n\t// Load all essential scripts first\n\trequire(\"./wpm/functions_loader\")\n\n\t// Output PMW console message\n\twpm.pmwConsoleMessage()\n\n\t// Load the consent management module\n\tawait wpm.consent.load()\n\n\t// Doesn't work if we listen to pmw:dom:ready because it runs too late\n\t// (at the end of the main.js file)\n\t// TODO: Find out why that order is important and optimize it. It is also difficult to test. In Cypress it works just with \"pmw:dom:ready\"\n\tjQuery(() => {\n\t\trequire(\"./wpm/event_listeners_on_ready\")\n\t})\n\n\t// Load remaining event listeners\n\trequire(\"./wpm/event_listeners\")\n\trequire(\"./wpm/listeners/doofinder\")\n\n\twpm.loadWcHooksFunctions()\n\n\t// Check if domain is excluded from tracking\n\t// If so, return\n\tif (wpm.excludeDomainFromTracking()) return\n\n\t// Load free pixels\n\trequire(\"./pixels/google/loader\")\n\trequire(\"./pixels/facebook/loader\")\n\trequire(\"./pixels/hotjar/loader\")\n\n\t// #if process.env.TIER === 'premium'\n// \t/**\n// \t * Load all premium scripts\n// \t */\n// \tif (wpm.canLoadPremiumFeatures()) {\n// \t\trequire(\"./wpm/event_listeners_premium\")\n// \t\trequire(\"./pixels/adroll/loader\")\n// \t\trequire(\"./pixels/linkedin/loader\")\n// \t\trequire(\"./pixels/microsoft-ads/loader\")\n// \t\trequire(\"./pixels/outbrain/loader\")\n// \t\trequire(\"./pixels/pinterest/loader\")\n// \t\trequire(\"./pixels/snapchat/loader\")\n// \t\trequire(\"./pixels/taboola/loader\")\n// \t\trequire(\"./pixels/tiktok/loader\")\n// \t\trequire(\"./pixels/twitter/loader\")\n// \t\trequire(\"./pixels/reddit/loader\")\n// \t\trequire(\"./pixels/vwo/loader\")\n// \t}\n\t// #endif\n\n\t/** Load the deprecated functions */\n\tloadDeprecatedFunctions()\n\n\t// Preload pixels\n\tdocument.dispatchEvent(new Event(\"pmw:load-pixels\"))\n\n\t// Trigger wpmLoad event\n\tdocument.dispatchEvent(new Event(\"wpmLoad\"))\n\n\t// Wait until page is loaded\n\tawait wpm.pageLoaded()\n\n\tdocument.dispatchEvent(new Event(\"pmw:ready\"))\n\twpm.triggerPmwDomReadyEvent()\n\n\t// Check if the library version matches the PMW version that's installed on the server\n\twpm.checkLibraryVersion()\n}\n\nmain()\n\n\n\n\n\n\n\n\n","export const loadDeprecatedFunctions = () => {\n\n\tpmw.consentAcceptAll = (data) => {\n\t\tconsole.error(\"The function pmw.consentAcceptAll is deprecated since version 1.41.1 of the Pixel Manager and will be removed in the future. It has been replaced by: pmw.consent.api.acceptAll()\")\n\t\tpmw.consent.api.acceptAll(data)\n\t}\n\n\tpmw.consentRevokeAll = (data) => {\n\t\tconsole.error(\"The function pmw.consentRevokeAll is deprecated since version 1.41.1 of the Pixel Manager and will be removed in the future. It has been replaced by: pmw.consent.api.revokeAll()\")\n\t\tpmw.consent.api.revokeAll(data)\n\t}\n\n\tpmw.consentAdjustSelectively = (data) => {\n\t\tconsole.error(\"The function pmw.consentAdjustSelectively is deprecated since version 1.41.1 of the Pixel Manager and will be removed in the future. It has been replaced by: pmw.consent.api.adjustSelectively()\")\n\n\t\tdata = renameDataKeys(data)\n\t\tpmw.consent.api.updateSelectively(data)\n\t}\n\n\t/**\n\t * Rename data keys\n\t *\n\t * The variable data can have a key analytics and a key ads\n\t * they need to be rewritten to statistics and marketing\n\t *\n\t * @param data\n\t * @returns {*}\n\t */\n\tconst renameDataKeys = (data) => {\n\t\tif (data.analytics) {\n\t\t\tdata.statistics = data.analytics\n\t\t\tdelete data.analytics\n\t\t}\n\n\t\tif (data.ads) {\n\t\t\tdata.marketing = data.ads\n\t\t\tdelete data.ads\n\t\t}\n\n\t\treturn data\n\t}\n\n\t// wpmBeginCheckout\n\tjQuery(document).on(\"wpmBeginCheckout\", () => {\n\t\tconsole.error(\"The event wpmBeginCheckout is deprecated since version 1.42.9 of the Pixel Manager and will be removed in the future. It has been replaced by: pmw:begin-checkout\")\n\t\tjQuery(document).trigger(\"pmw:begin-checkout\")\n\t})\n\n\t// wpmAddToCart\n\tjQuery(document).on(\"wpmAddToCart\", (event, product) => {\n\t\tconsole.error(\"The event wpmAddToCart is deprecated since version 1.42.8 of the Pixel Manager and will be removed in the future. It has been replaced by: pmw:add-to-cart\")\n\t\tjQuery(document).trigger(\"pmw:add-to-cart\", product)\n\t})\n\n\t// wpmOrderReceivedPage\n\tjQuery(document).on(\"wpmOrderReceivedPage\", () => {\n\t\tconsole.error(\"The event wpmOrderReceivedPage is deprecated since version 1.42.9 of the Pixel Manager and will be removed in the future. It has been replaced by: pmw:view-order-received-page\")\n\t\tjQuery(document).trigger(\"pmw:view-order-received-page\")\n\t})\n\n\t// wpmLogin\n\tjQuery(document).on(\"wpmLogin\", () => {\n\t\tconsole.error(\"The event wpmLogin is deprecated since version 1.42.9 of the Pixel Manager and will be removed in the future. It has been replaced by: pmw:login\")\n\t\tjQuery(document).trigger(\"pmw:login\")\n\t})\n\n\t// wpmAddToWishlist\n\tjQuery(document).on(\"wpmAddToWishlist\", (event, product) => {\n\t\tconsole.error(\"The event wpmAddToWishlist is deprecated since version 1.42.9 of the Pixel Manager and will be removed in the future. It has been replaced by: pmw:add-to-wishlist\")\n\t\tjQuery(document).trigger(\"pmw:add-to-wishlist\", product)\n\t})\n\n\t// pmwEvent:Search\n\tjQuery(document).on(\"pmwEvent:Search\", () => {\n\t\tconsole.error(\"The event pmwEvent:Search is deprecated since version 1.42.9 of the Pixel Manager and will be removed in the future. It has been replaced by: pmw:search\")\n\t\tjQuery(document).trigger(\"pmw:search\")\n\t})\n\n\t// wpmViewItem\n\tjQuery(document).on(\"wpmViewItem\", (event, product) => {\n\t\tconsole.error(\"The event wpmViewItem is deprecated since version 1.42.9 of the Pixel Manager and will be removed in the future. It has been replaced by: pmw:view-item\")\n\t\tjQuery(document).trigger(\"pmw:view-item\", product)\n\t})\n\n\t// wpmViewItemList\n\tjQuery(document).on(\"wpmViewItemList\", (event, product) => {\n\t\tconsole.error(\"The event wpmViewItemList is deprecated since version 1.42.9 of the Pixel Manager and will be removed in the future. It has been replaced by: pmw:view-item-list\")\n\t\tjQuery(document).trigger(\"pmw:view-item-list\", product)\n\t})\n\n\t// wpmSelectItem\n\tjQuery(document).on(\"wpmSelectItem\", (event, product) => {\n\t\tconsole.error(\"The event wpmSelectItem is deprecated since version 1.42.9 of the Pixel Manager and will be removed in the future. It has been replaced by: pmw:select-item\")\n\t\tjQuery(document).trigger(\"pmw:select-item\", product)\n\t})\n\n\t// wpmRemoveFromCart\n\tjQuery(document).on(\"wpmRemoveFromCart\", (event, product) => {\n\t\tconsole.error(\"The event wpmRemoveFromCart is deprecated since version 1.42.9 of the Pixel Manager and will be removed in the future. It has been replaced by: pmw:remove-from-cart\")\n\t\tjQuery(document).trigger(\"pmw:remove-from-cart\", product)\n\t})\n\t\n\t// wpmViewCart\n\tjQuery(document).on(\"wpmViewCart\", () => {\n\t\tconsole.error(\"The event wpmViewCart is deprecated since version 1.42.9 of the Pixel Manager and will be removed in the future. It has been replaced by: pmw:view-cart\")\n\t\tjQuery(document).trigger(\"pmw:view-cart\")\n\t})\n\n\t// wpmCategory\n\tjQuery(document).on(\"wpmCategory\", (event, category) => {\n\t\tconsole.error(\"The event wpmCategory is deprecated since version 1.42.9 of the Pixel Manager and will be removed in the future. It has been replaced by: pmw:view-category\")\n\t\tjQuery(document).trigger(\"pmw:view-category\", category)\n\t})\n\n\t// wpmEverywhereElse\n\tjQuery(document).on(\"wpmEverywhereElse\", () => {\n\t\tconsole.error(\"The event wpmEverywhereElse is deprecated since version 1.42.9 of the Pixel Manager and will be removed in the future. It has been replaced by: pmw:everywhere-else\")\n\t\tjQuery(document).trigger(\"pmw:everywhere-else\")\n\t})\n\n\t// wpmPlaceOrder\n\tjQuery(document).on(\"wpmPlaceOrder\", () => {\n\t\tconsole.error(\"The event wpmPlaceOrder is deprecated since version 1.42.9 of the Pixel Manager and will be removed in the future. It has been replaced by: pmw:place-order\")\n\t\tjQuery(document).trigger(\"pmw:place-order\")\n\t})\n\n\t// wpmFireCheckoutOption\n\tjQuery(document).on(\"wpmFireCheckoutOption\", (event, option) => {\n\t\tconsole.error(\"The event wpmFireCheckoutOption is deprecated since version 1.42.9 of the Pixel Manager and will be removed in the future. It has been replaced by: pmw:fire-checkout-option\")\n\t\tjQuery(document).trigger(\"pmw:fire-checkout-option\", option)\n\t})\n\n\t// wpmFireCheckoutProgress\n\tjQuery(document).on(\"wpmFireCheckoutProgress\", (event, progress) => {\n\t\tconsole.error(\"The event wpmFireCheckoutProgress is deprecated since version 1.42.9 of the Pixel Manager and will be removed in the future. It has been replaced by: pmw:fire-checkout-progress\")\n\t\tjQuery(document).trigger(\"pmw:fire-checkout-progress\", progress)\n\t})\n}\n"],"names":["IPv4","require","exports","IPv6","util","util_1","isInSubnet","address","subnetOrSubnets","createChecker","Array","isArray","subnetsByVersion","reduce","acc","subnet","ip","split","isIP","push","length","Error","check4","check6","isIPv6","isIPv4MappedAddress","extractMappedIpv4","Object","enumerable","get","isIPv4","isPrivate","isLocalhost","isReserved","isSpecial","localhost","ipv4","ipv6","private","reserved","ipRange_1","ipv4ToLong","octets","parseInt","checks_1","map","createLongChecker","addressLong","some","check","_a","subnetAddress","prefixLengthString","prefixLength","Number","isInteger","subnetLong","specialNetsCache","default","__spreadArrays","dot","mappedIpv4","colon","doubleColon","getIpv6Segments","test","matches","match","prefix","parts","x","toString","mappedIpv4ToIpv6","beforeChunk","afterChunk","beforeParts","afterParts","missingSegments","concat","createSegmentChecker","segments","subnetSegments","addressSegments","i","bitCount","Math","min","Boolean","v4Seg","v4Str","IPv4Reg","RegExp","v6Seg","IPv6Reg","s","expandIPv6","ipaddr","ipv4Part","ipv4Regexes","ipv6Part","ipv6Regexes","matchCIDR","zoneIndex","module","this","first","second","partSize","cidrBits","part","shift","subnetMatch","rangeList","defaultName","k","len","rangeName","rangeSubnets","kind","apply","octet","prototype","join","toNormalizedString","toByteArray","slice","other","cidrRange","ref","SpecialRanges","unspecified","broadcast","multicast","linkLocal","loopback","carrierGradeNat","range","toIPv4MappedAddress","parse","prefixLengthFromSubnetMask","cidr","stop","zeros","zerotable","fourOctet","longValue","parser","string","parseIntAuto","value","results","reverse","zoneId","l","replace","toRFC5952String","bestMatchIndex","bestMatchLength","regex","exec","index","substring","bytes","addr","suffix","call","toFixedLengthString","padStart","uniqueLocal","ipv4Mapped","rfc6145","rfc6052","teredo","toIPv4Address","high","low","transitional","colonCount","lastColon","replacement","replacementCount","indexOf","lastIndexOf","substr","isValid","error1","isValidFourPartDecimal","parseCIDR","maskLength","parsed","defineProperty","subnetMaskFromPrefixLength","filledOctetCount","j","floor","pow","broadcastAddressFromCIDR","ipInterfaceOctets","subnetMaskOctets","networkAddressFromCIDR","fromByteArray","process","commonjsGlobal","normalize","a","_validate","nh","toLowerCase","sections","n","h","ns","hs","undefined","_leftPad","abbreviate","zPreviousFlag","zeroStartIndex","zeroLength","zStartIndex","zLength","section","zFlag","splice","d","p","padding","repeat","_bin2hex","bin","_addr2bin","binAddr","_bin2addr","binPart","hexSection","divideSubnet","mask0","mask1","limit","abbr","ret","binNetPart","binHostPart","numSubnets","binSubnet","hexAddr","binStartAddr","binEndAddr","start","end","size","randomSubnet","random","ptr","mask","version","err","isV4","isV6","isRange","inRange","check_range","ip6","range_data","parse_addr","parse_range","storeIP","displayIP","jQuery","document","on","wpmDataLayer","pixels","facebook","pixel_id","loaded","wpm","doesUrlContainPatterns","exclusion_patterns","consent","canPixelBeFired","loadFacebookPixel","event","payload","canNotFireFbq","fbq","custom_data","eventID","event_id","pmw","console","log","error","eventName","setFbUserData","addEventListener","_ref","detail","marketing","fbUserData","fbeventsJsUrl","searchParams","URLSearchParams","window","location","search","has","fbevents_js_url","f","b","e","v","t","callMethod","arguments","queue","_fbq","createElement","async","src","getElementsByTagName","parentNode","insertBefore","data","isFbpSet","isFbAdvancedMatchingEnabled","getUserIdentifiersForFb","mobile_bridge_app_id","user","id","raw","external_id","order","user_id","email","em","billing_email_hashed","first_name","fn","billing_first_name","last_name","ln","billing_last_name","phone","ph","billing_phone","city","ct","billing_city","state","st","billing_state","postcode","zp","billing_postcode","country","billing_country","getFbRandomEventId","getFbUserData","getFbUserDataFromBrowser","advanced_matching","fbp","getCookie","isValidFbp","fbc","retrieveData","isValidFbc","navigator","userAgent","client_user_agent","client_ip_address","fbGetProductDataForCapiEvent","product","content_type","content_name","name","content_ids","dyn_r_ids","dynamic_remarketing","id_type","parseFloat","quantity","price","currency","facebookContentIds","prodIds","values","items","forEach","item","shop","variations_output","variation_id","String","products","trackCustomFacebookEvent","customData","eventId","event_name","user_data","event_source_url","href","keys","sendEventPayloadToServer","fbGetContentIdsFromCart","key","cart","canFireFbq","categories","isEmptyObject","google","ads","conversion_ids","googleConfigConditionsMet","type","is_variable","send_events_with_parent_ids","send_to","getGoogleAdsConversionIdentifiers","google_business_vertical","gtagLoaded","then","gtag","getGoogleAdsConversionIdentifiersWithLabel","getGoogleAdsRegularOrderItems","transaction_id","number","new_customer","ltv","customer_lifetime_value","aw_merchant_id","discount","aw_feed_country","aw_feed_language","custom_variables","entries","conversionIdentifiers","orderItems","orderItem","analytics","ga4","measurement_id","ga4GetFullProductItemData","item_list_name","list_name","item_list_id","list_id","getCartValue","getCartItemsGa4","shippingTier","text","shipping_tier","paymentType","payment_type","cartValue","toFixed","search_term","getSearchTermFromUrl","mp_active","affiliation","total","tax","shipping","coupon","getGA4OrderItems","custom_parameters","item_name","item_category","category","item_id","item_variant","variant_name","item_brand","brand","ga4AddFormattedCategories","item_data","from","Set","max","ga4GetBasicProductItemData","variant","ga4AddListNameToProduct","productPosition","position","loadGoogle","logSuppressedPixel","updateGoogleConsentMode","consent_mode","is_active","statistics","fireGtagGoogleAds","enhanced_conversions","phone_conversion_label","phone_conversion_number","fireGtagGoogleAnalyticsGA4","parameters","debug_mode","isGoogleActive","getGoogleGtagId","tracking_id","loadScriptAndCacheIt","script","textStatus","tcf_support","dataLayer","api","processExternalGcmConsentUpdate_experimental","source","google_consent_settings","ad_personalization","ad_storage","ad_user_data","analytics_storage","functionality_storage","preferences","personalization_storage","security_storage","necessary","wait_for_update","general","consent_management","restricted_regions","region","ads_data_redaction","url_passthrough","linker","settings","Date","page_type","enhanced_conversion_data","triggerQueuedEvents","Promise","resolve","reject","startTime","wait","setTimeout","_ref2","hotjar","site_id","load_hotjar_pixel","o","hj","q","_hjSettings","hjid","hjsv","r","appendChild","getLibraryVersion","checkLibraryVersion","removeHtmlTagsAndWhitespace","trim","target","triggerAddShippingInfoEvent","slug","checkedShippingMethod","find","val","attr","trigger","paymentMethodChangeLogged","triggerAddPaymentInfoEvent","checkedPaymentMethod","url","URL","currentTarget","productId","getProductIdByCartItemKeyUrl","removeProductFromCart","checkoutButtonSelectors","prepareSelectors","paymentMethodSelected","fireCheckoutProgress","fireCheckoutOption","initCart","productIds","getAddToCartLinkProductIds","getProductsFromBackend","referrer","referrerHostname","hostname","host","storeData","gclid","getUrlParameter","wbraid","gbraid","fbclid","now","ttclid","scid","epik","pmw_loaded","product_type","getMainProductIdFromProductPage","getProductDataForViewItemEvent","isOrderIdStored","writeOrderIdToStorage","acrRemoveCookie","hasLoginEventFired","setLoginEventFired","lazy_load_pmw","$variationForm","checkVariations","allSelected","selectedValues","$selects","each","_","element","selectedValue","attributeName","productVariations","matchingVariation","variation","every","attribute","attributes","triggerViewItemEventPrep","referrer_url","makeFullUrl","pinterest","getPinterestS2SBaseData","pinterestGetProductDataForCapiEvent","tiktok","getRandomEventId","tiktokGetEventUserData","page","tiktokGetEventPageData","properties","contents","content_id","getProductIdForSpecificPixel","snapchat","getSnapchatS2SBaseData","getSnapchatCustomDataForProduct","tiktokGetPropertiesFromCart","search_string","query","getTikTokOrderItemIds","isWooCommerceActive","startIntersectionObserverToWatch","startProductsMutationObserverToWatch","addToCartSelectors","dataset","product_id","includes","addProductToCart","classes","getPostIdFromString","one","closest","origin","nextAll","getIdBasedOndVariationsOutputSetting","getProductDetailsFormattedForEvent","isEmail","emailSelected","getProductIdByCartItemElement","getProductQuantityByCartItemElement","getCartItemsFromBackend","previousVariationId","$","wpmRestSettings","isBelowRestErrorThreshold","isRestEndpointAvailable","testEndpoint","root","cookieName","response","fetch","method","mode","cache","keepalive","redirect","ok","status","responseJson","json","success","JSON","stringify","isWpmRestEndpointAvailable","orderId","orderKey","orderIds","storeOrderIdOnServer","order_duplication_prevention","quantityToRemove","storeCartData","is_variation","parent_id","selectors","doesWooCommerceCartExist","retrieveCartData","saveCartObjectToDataLayer","ajax_url","body","action","filter","page_id","product_ids","options","headers","statusText","responseData","assign","cartObject","triggerViewItemEvent","triggerViewItemEventNoProduct","step","checkout_option","triggerViewItemList","viewItemListTriggerTestMode","css","append","view_item_list_trigger","opacity","background_color","io","ioTimeouts","observerCallback","observer","entry","elementId","next","isIntersecting","test_mode","unobserve","timeout","clearTimeout","remove","ioid","detectedProductTemplateClasses","nested","flat","isNestedClass","elem","className","isFlatClass","prev","hasClass","getAllElementsToWatch","getCommonIdentifiersToWatch","listOfClassNames","haveSameNestingDepth","element1","element2","parents","findCommonParentElement","parent","is","node","countOfChildren","getCommonClass","classes1","classes2","wpmProductIds","querySelectorAll","productsNode","firstChildClassAttr","children","firstChildClasses","secondChildClassAttr","commonClass","firstProductTemplateClasses","urlHasParameter","IntersectionObserver","threshold","observe","productsMutationObserver","childList","characterData","MutationObserver","mutations","mutation","newNodes","addedNodes","hasWpmProductIdElement","siblings","setCookie","cookieValue","expiryDays","setTime","getTime","expires","toUTCString","cookie","ca","decodeURIComponent","c","charAt","getCookieThatContainsRegex","cookies","deleteCookie","persistent","extension","dataGetter","getPersistentData","getSessionData","dataSetter","setPersistentData","setSessionData","deleteDataKey","localStorage","removeItem","getPersistentDataKey","sessionStorage","getSessionDataKey","defaultStorageKey","storageKeySuffix","getItem","setItem","order_id","orderDetails","order_key","cartItemKey","cart_item_keys","list_position","parent_id_dyn_r_ids","getClidFromBrowser","clidCookieId","clidId","dclid","getUserAgent","getViewPort","width","documentElement","clientWidth","innerWidth","height","clientHeight","innerHeight","consoleLogVersion","dataType","ajax","getOrderItemPrice","total_tax","loginEventFired","pageLoaded","waitForVar","readyState","pageReady","isMiniCartActive","parameter","hashAsync","algo","str","crypto","subtle","digest","TextEncoder","encode","buf","Uint8Array","patterns","pattern","excludeDomainFromTracking","exclude_domains","domain","debug","pmwConsoleMessage","message","pro","distro","eligible_for_updates","show","canLoadPremiumFeatures","pmwDomReadyFired","triggerPmwDomReadyEvent","firePmwDomReadyEvent","dispatchEvent","Event","getEmailFromTarget","sendEventPayloadToServerPremium","pixel","pmw_event_queue","func","pixelName","isInWooCommerceSesssion","session_active","isNotInWooCommerceSesssion","jQueryExists","waitForjQuery","waitForLibrary","library","interval","wpmDataLayerFullyLoaded","checkVar","logTimeoutId","wpHooksExists","wp","hooks","loadWcHooksFunctions","getIpVersion","ipServices","getGeoInfo","cloudflare","obj","pair","loc","processRegion","countryCode","service","geojs","country_code","ipinfo","ipapi","isIpAllowed","getIp","isOnBlacklist","ipVersion","maxServicesToCheck","validVersions","ipv","getIpFromAnyService","getBrowserGeoFromExternalService","performance","promises","any","toUpperCase","regionCode","getBrowserGeo","geoFromStorage","geoInfo","gepLocationByTimeZone","getBrowserLocationByTimeZone","geoLocation","getLocationByTimeZone","ipServicesFiltered","getIpFromService","timeTaken","serviceResponseData","isIpNotAllowed","ipName","getBlacklist","isCidr","customExclusionList","server_2_server","ip_exclude_list","amount","addAction","checkMandatoryFields","_len","args","_key","debounce","storeCart","shippingAddress","field","acceptAll","duration","saveState","loadApprovedPixels","CustomEvent","revokeAll","updateSelectively","set","setConsentCookie","previousData","complianz","getConsent","cmplz_statistics","cmplz_marketing","cmplz_preferences","cmplz_necessary","loadEventListeners","cmplzStatusChange","cookiebot","isValidJson","decodeURI","CookieConsent","cookiefirst","advertising","functional","cookieyes","consentToJson","advertisement","getCookieValue","cookieNames","isOneCookieSet","accepted","consentObj","onetrust","consentToJSON","consentObject","groups","realCookieBanner","isRcbCookieSet","consentApi","rcbSettings","rcbConsent","consentSync","cookieOptIn","startsWith","consents","purposes","_iub","cmpConsentClickObserver","ids","thirdparty","advanced","strict","moove_frontend_gdpr_scripts","allowAllButton","querySelector","gcm","analyticsStorage","adStorage","ucData","button","buttonId","buttonElement","getElementById","visitorHasChosen","result","load","loadCmpEventListeners","setExplicitConsentModeDefaults","loadConsentFromCmps","countryUnlock","loadTrigger","cmpConsent","getConsentFromCmps","cmp","cmps","explicitConsent","explicitConsentModeActive","explicit_consent","getConsentValues","storageKey","consentBackwardsCompatibilityUpdate","hasOwnProperty","browserGeo","browserIsInRestrictedRegion","buttonClass","mutationsList","reload","disconnect","subtree","objects","isLoggerEnabled","urlLoggerOff","sessionLoggerEnabled","urlLoggerOn","logger","timezone","Intl","DateTimeFormat","resolvedOptions","timeZone","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","definition","g","globalThis","Function","prop","Symbol","toStringTag","consentAcceptAll","consentRevokeAll","consentAdjustSelectively","renameDataKeys","option","progress","loadDeprecatedFunctions","main"],"sourceRoot":""}