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A,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,sBACA,wBACA,wBACA,mBACA,mBACA,kBACA,iBACA,mBACA,oBACA,oBACA,mBACA,kBACA,oBACA,kBACA,mBACA,mBACA,mBACA,iBACA,mBACA,iBACA,iBACA,iBACA,kBACA,kBACA,oBACA,iBACA,mBACA,mBACA,mBACA,mBACA,kBACA,kBACA,kBACA,iBACA,mBACA,mBACA,mBACA,mBACA,kBACA,kBACA,kBACA,iBACA,mBACA,mBACA,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,kBACA,kBACA,kBACA,iBACA,mBACA,mBACA,mBACA,mBACA,kBACA,kBACA,kBACA,iBACA,mBACA,mBACA,mBACA,mBACA,kBACA,kBACA,kBACA,iBACA,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,mBAGgB,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,kBACA,kBACA,kBACA,iBACA,iBACA,iBACA,mBACA,kBAGc,CACd,iBACA,gBACA,kBACA,gBACA,gBACA,gBACA,gBACA,kBACA,kBACA,kBACA,kBACA,kBACA,kBACA,kBACA,kBACA,kBACA,kBACA,kBACA,kBACA,kBACA,kBACA,oBACA,kBACA,kBACA,iBACA,kBACA,iBACA,mBACA,qBACA,iBACA,kBACA,mBACA,mBACA,mBACA,mBACA,cACA,eACA,iBACA,kBACA,kBACA,mBACA,mBACA,mBACA,mBACA,kBACA,iBACA,gBACA,iBACA,kBACA,kBACA,iBACA,iBACA,iBACA,iBACA,qBACA,qBACA,qBACA,qBAGa,CACb,mBACA,mBACA,mBACA,gBACA,gBACA,iBAGc,CACd,oBACA,qBAyBAw6B,EACA,CAGF,CAvnCA,CAunCCpsB,OAAO9B,IAAM8B,OAAO9B,KAAO,CAAC,EAAGR,O,WChmCjC0tB,GAAGC,MAAMiB,UACR,iDACA,iCACAnrB,IAKCjD,IAAI4hB,iBAAiB3e,EAAK8C,QAAQxC,GAAI,EAAE,IAO1C2pB,GAAGC,MAAMiB,UACR,0DACA,iCACAnrB,IAGKA,EAAKuD,SAAWvD,EAAK8C,QAAQS,UAChCxG,IAAI4hB,iBAAiB3e,EAAK8C,QAAQxC,GAAIN,EAAKuD,SAAWvD,EAAK8C,QAAQ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AAe5L,EAASkgC,OAAOC,YAAa,CAAEh3B,MAAO,WAE7D1H,OAAOmK,eAAe5L,EAAS,aAAc,CAAEmJ,OAAO,GAAO,ECFjD2K,WAEZ/T,EAAQ,YAGFmR,IAAI0sB,qBAGJ1sB,IAAI8sB,0BAMVj+B,EAAQ,MAGR2Q,OAAOC,UAAUC,GAAG,aAAa,KAChC7Q,EAAQ,KAAiC,IAI1CA,EAAQ,MAERmR,IAAIotB,uBAGJptB,IAAImsB,oBAIAnsB,IAAI+rB,8BAGRl9B,EAAQ,MACRA,EAAQ,MACRA,EAAQ,MAMJmR,IAAIkI,2BACPrZ,EAAQ,MACRA,EAAQ,MACRA,EAAQ,IACRA,EAAQ,MACRA,EAAQ,MACRA,EAAQ,KACRA,EAAQ,OAKT4Q,SAASqe,cAAc,IAAIC,MAAM,qBAGjCte,SAASqe,cAAc,IAAIC,MAAM,kBAG3B/d,IAAI8qB,aACV9qB,IAAIysB,uBAAsB,EAG3ByC,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/facebook/event_listeners.js","webpack://Pixel-Manager-for-WooCommerce/./src/js-src/public/facebook/event_listeners_premium.js","webpack://Pixel-Manager-for-WooCommerce/./src/js-src/public/facebook/functions.js","webpack://Pixel-Manager-for-WooCommerce/./src/js-src/public/facebook/functions_premium.js","webpack://Pixel-Manager-for-WooCommerce/./src/js-src/public/facebook/loader.js","webpack://Pixel-Manager-for-WooCommerce/./src/js-src/public/google/ads/event_listeners.js","webpack://Pixel-Manager-for-WooCommerce/./src/js-src/public/google/ads/functions.js","webpack://Pixel-Manager-for-WooCommerce/./src/js-src/public/google/ads/loader.js","webpack://Pixel-Manager-for-WooCommerce/./src/js-src/public/google/analytics/ga4/event_listeners.js","webpack://Pixel-Manager-for-WooCommerce/./src/js-src/public/google/analytics/ga4/event_listeners_premium.js","webpack://Pixel-Manager-for-WooCommerce/./src/js-src/public/google/analytics/ga4/functions.js","webpack://Pixel-Manager-for-WooCommerce/./src/js-src/public/google/analytics/ga4/functions_premium.js","webpack://Pixel-Manager-for-WooCommerce/./src/js-src/public/google/analytics/ga4/loader.js","webpack://Pixel-Manager-for-WooCommerce/./src/js-src/public/google/analytics/loader.js","webpack://Pixel-Manager-for-WooCommerce/./src/js-src/public/google/base/event_listeners.js","webpack://Pixel-Manager-for-WooCommerce/./src/js-src/public/google/base/event_listeners_premium.js","webpack://Pixel-Manager-for-WooCommerce/./src/js-src/public/google/base/functions.js","webpack://Pixel-Manager-for-WooCommerce/./src/js-src/public/google/base/functions_premium.js","webpack://Pixel-Manager-for-WooCommerce/./src/js-src/public/google/base/loader.js","webpack://Pixel-Manager-for-WooCommerce/./src/js-src/public/google/loader.js","webpack://Pixel-Manager-for-WooCommerce/./src/js-src/public/google/optimize/event_listeners.js","webpack://Pixel-Manager-for-WooCommerce/./src/js-src/public/google/optimize/functions.js","webpack://Pixel-Manager-for-WooCommerce/./src/js-src/public/google/optimize/loader.js","webpack://Pixel-Manager-for-WooCommerce/./src/js-src/public/hotjar/event_listeners.js","webpack://Pixel-Manager-for-WooCommerce/./src/js-src/public/hotjar/functions.js","webpack://Pixel-Manager-for-WooCommerce/./src/js-src/public/hotjar/loader.js","webpack://Pixel-Manager-for-WooCommerce/./src/js-src/public/microsoft-ads/event_listeners_premium.js","webpack://Pixel-Manager-for-WooCommerce/./src/js-src/public/microsoft-ads/functions_premium.js","webpack://Pixel-Manager-for-WooCommerce/./src/js-src/public/microsoft-ads/loader.js","webpack://Pixel-Manager-for-WooCommerce/./src/js-src/public/pinterest/event_listeners_premium.js","webpack://Pixel-Manager-for-WooCommerce/./src/js-src/public/pinterest/functions_premium.js","webpack://Pixel-Manager-for-WooCommerce/./src/js-src/public/pinterest/loader.js","webpack://Pixel-Manager-for-WooCommerce/./src/js-src/public/reddit/event_listeners_premium.js","webpack://Pixel-Manager-for-WooCommerce/./src/js-src/public/reddit/functions_premium.js","webpack://Pixel-Manager-for-WooCommerce/./src/js-src/public/reddit/loader.js","webpack://Pixel-Manager-for-WooCommerce/./src/js-src/public/snapchat/event_listeners_premium.js","webpack://Pixel-Manager-for-WooCommerce/./src/js-src/public/snapchat/functions_premium.js","webpack://Pixel-Manager-for-WooCommerce/./src/js-src/public/snapchat/loader.js","webpack://Pixel-Manager-for-WooCommerce/./src/js-src/public/tiktok/event_listeners_premium.js","webpack://Pixel-Manager-for-WooCommerce/./src/js-src/public/tiktok/functions_premium.js","webpack://Pixel-Manager-for-WooCommerce/./src/js-src/public/tiktok/loader.js","webpack://Pixel-Manager-for-WooCommerce/./src/js-src/public/twitter/event_listeners_premium.js","webpack://Pixel-Manager-for-WooCommerce/./src/js-src/public/twitter/functions_premium.js","webpack://Pixel-Manager-for-WooCommerce/./src/js-src/public/twitter/loader.js","webpack://Pixel-Manager-for-WooCommerce/./src/js-src/public/wpm/cookie_consent.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/event_listeners_premium.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/functions_premium.js","webpack://Pixel-Manager-for-WooCommerce/./src/js-src/public/wpm/ip_check.js","webpack://Pixel-Manager-for-WooCommerce/./src/js-src/public/wpm/wc_hooks.js","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"],"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(\"wpmLoadPixels\", () => {\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.canIFire(\"ads\", \"facebook-ads\")) wpm.loadFacebookPixel()\n\t}\n})\n\n// AddToCart event\n// https://developers.facebook.com/docs/meta-pixel/reference\njQuery(document).on(\"wpmClientSideAddToCart\", (event, payload) => {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.facebook?.loaded) return\n\n\t\tfbq(\"track\", \"AddToCart\", payload.facebook.custom_data, {\n\t\t\teventID: payload.facebook.event_id,\n\t\t})\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(\"wpmClientSideBeginCheckout\", (event, payload) => {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.facebook?.loaded) return\n\n\t\tfbq(\"track\", \"InitiateCheckout\", payload.facebook.custom_data, {\n\t\t\teventID: payload.facebook.event_id,\n\t\t})\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(\"wpmClientSideAddToWishlist\", (event, payload) => {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.facebook?.loaded) return\n\n\t\tfbq(\"track\", \"AddToWishlist\", payload.facebook.custom_data, {\n\t\t\teventID: payload.facebook.event_id,\n\t\t})\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(\"wpmClientSideViewItem\", (event, payload) => {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.facebook?.loaded) return\n\n\t\tfbq(\"track\", \"ViewContent\", payload.facebook.custom_data, {\n\t\t\teventID: payload.facebook.event_id,\n\t\t})\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(\"wpmClientSideSearch\", (event, payload) => {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.facebook?.loaded) return\n\n\t\tfbq(\"track\", \"Search\", payload.facebook.custom_data, {\n\t\t\teventID: payload.facebook.event_id,\n\t\t})\n\t} catch (error) {\n\t\tconsole.error(error)\n\t}\n})\n\n// load always event\njQuery(document).on(\"wpmLoadAlways\", () => {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.facebook?.loaded) 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(\"wpmClientSideOrderReceivedPage\", (event, payload) => {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.facebook?.loaded) return\n\n\t\tfbq(\"track\", \"Purchase\", payload.facebook.custom_data, {\n\t\t\teventID: payload.facebook.event_id,\n\t\t})\n\t} catch (error) {\n\t\tconsole.error(error)\n\t}\n})\n","/**\n * Copyright 2023 SweetCode. All rights reserved.\n *\n * All event listeners\n * */\n\njQuery(document).on(\"wpmFbCapiEvent\", function (event, eventData) {\n\n\ttry {\n\t\tif (!wpmDataLayer.pixels.facebook.capi) return\n\n\t\t// Send data to pmw public API with fetch API\n\t\t// fetch(wpm.root + \"pmw/v1/facebook/capi/event/\", {\n\t\t// \tmethod : \"POST\",\n\t\t// \tcredentials: \"same-origin\",\n\t\t// \theaders : {\n\t\t// \t\t\"Content-Type\": \"application/json\",\n\t\t// \t},\n\t\t// \tbody : JSON.stringify(eventData),\n\t\t// \tkeepalive : true,\t// keep connection alive until request is finished\n\t\t// })\n\t\t// \t.then(response => response.json())\n\t\t// \t.then(message => {\n\t\t// \t\tif (!message.success) {\n\t\t// \t\t\tconsole.error(message)\n\t\t// \t\t}\n\t\t// \t})\n\t\t// \t.catch(error => {\n\t\t// \t\tconsole.error(error)\n\t\t// \t})\n\n\t\t// https://css-tricks.com/send-an-http-request-on-page-exit/\n\t\tconst blob = new Blob([JSON.stringify(eventData)], { type: 'application/json; charset=UTF-8' });\n\t\tnavigator.sendBeacon(wpm.root + \"pmw/v1/facebook/capi/event/\", blob);\n\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\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\n\t\t\tdata = {}\n\n\t\tif (wpm.getCookie(\"_fbp\") && wpm.isValidFbp(wpm.getCookie(\"_fbp\"))) {\n\t\t\tdata.fbp = wpm.getCookie(\"_fbp\")\n\t\t}\n\n\t\tif (wpm.getCookie(\"_fbc\") && wpm.isValidFbc(wpm.getCookie(\"_fbc\"))) {\n\t\t\tdata.fbc = wpm.getCookie(\"_fbc\")\n\t\t}\n\n\t\tif (wpm.isFbAdvancedMatchingEnabled()) {\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\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\t// wpm.fbViewContent = (product = null) => {\n\t//\n\t// \ttry {\n\t// \t\tif (!wpmDataLayer?.pixels?.facebook?.loaded) return\n\t//\n\t// \t\tlet eventId = wpm.getFbRandomEventId()\n\t//\n\t// \t\tlet data = {}\n\t//\n\t// \t\tif (product) {\n\t// \t\t\tdata.content_type = \"product\"\n\t// \t\t\tdata.content_name = product.name\n\t// \t\t\t// data.content_category = product.category\n\t// \t\t\tdata.content_ids = product.dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type]\n\t// \t\t\tdata.currency = wpmDataLayer.shop.currency\n\t// \t\t\tdata.value = product.price\n\t// \t\t}\n\t//\n\t// \t\tfbq(\"track\", \"ViewContent\", data, {\n\t// \t\t\teventID: eventId,\n\t// \t\t})\n\t//\n\t// \t\tlet capiData = {\n\t// \t\t\tevent_name : \"ViewContent\",\n\t// \t\t\tevent_id : eventId,\n\t// \t\t\tuser_data : wpm.getFbUserData(),\n\t// \t\t\tevent_source_url: window.location.href,\n\t// \t\t}\n\t//\n\t// \t\tif (product) {\n\t// \t\t\tproduct[\"currency\"] = wpmDataLayer.shop.currency\n\t// \t\t\tcapiData.custom_data = wpm.fbGetProductDataForCapiEvent(product)\n\t// \t\t}\n\t//\n\t// \t\tjQuery(document).trigger(\"wpmFbCapiEvent\", capiData)\n\t// \t} catch (e) {\n\t// \t\tconsole.error(e)\n\t// \t}\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?.general?.variationsOutput && 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\tjQuery(document).trigger(\"wpmFbCapiEvent\", {\n\t\t\t\tevent_name : eventName,\n\t\t\t\tevent_id : eventId,\n\t\t\t\tuser_data : wpm.getFbUserData(),\n\t\t\t\tevent_source_url: window.location.href,\n\t\t\t\tcustom_data : customData,\n\t\t\t})\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}(window.wpm = window.wpm || {}, jQuery));\n","/**\n * Copyright 2023 SweetCode. All rights reserved.\n *\n * Add functions for Facebook (pro)\n * */\n\n(function (wpm, $, undefined) {\n\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'\nif (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(\"wpmViewItemList\", (event, product) => {\n\n\ttry {\n\t\tif (jQuery.isEmptyObject(wpmDataLayer?.pixels?.google?.ads?.conversionIds)) return\n\t\tif (!wpmDataLayer?.pixels?.google?.ads?.dynamic_remarketing?.status) return\n\t\tif (!wpm.googleConfigConditionsMet(\"ads\")) return\n\n\n\t\tif (\n\t\t\twpmDataLayer?.general?.variationsOutput &&\n\t\t\tproduct.isVariable &&\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})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// add_to_cart event\njQuery(document).on(\"wpmAddToCart\", (event, product) => {\n\n\ttry {\n\t\tif (jQuery.isEmptyObject(wpmDataLayer?.pixels?.google?.ads?.conversionIds)) return\n\t\tif (!wpmDataLayer?.pixels?.google?.ads?.dynamic_remarketing?.status) return\n\t\tif (!wpm.googleConfigConditionsMet(\"ads\")) 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})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// view_item event\njQuery(document).on(\"wpmViewItem\", (event, product = null) => {\n\n\ttry {\n\t\tif (jQuery.isEmptyObject(wpmDataLayer?.pixels?.google?.ads?.conversionIds)) return\n\t\tif (!wpmDataLayer?.pixels?.google?.ads?.dynamic_remarketing?.status) return\n\t\tif (!wpm.googleConfigConditionsMet(\"ads\")) 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})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n\n// view search event\njQuery(document).on(\"pmwEvent:Search\", () => {\n\n\ttry {\n\t\tif (jQuery.isEmptyObject(wpmDataLayer?.pixels?.google?.ads?.conversionIds)) return\n\t\tif (!wpmDataLayer?.pixels?.google?.ads?.dynamic_remarketing?.status) return\n\t\tif (!wpm.googleConfigConditionsMet(\"ads\")) 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?.general?.variationsOutput &&\n\t\t\t\tproduct.isVariable &&\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})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n\n// user log in event\njQuery(document).on(\"wpmLogin\", () => {\n\n\ttry {\n\t\tif (jQuery.isEmptyObject(wpmDataLayer?.pixels?.google?.ads?.conversionIds)) return\n\t\tif (!wpmDataLayer?.pixels?.google?.ads?.dynamic_remarketing?.status) return\n\t\tif (!wpm.googleConfigConditionsMet(\"ads\")) 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})\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(\"wpmOrderReceivedPage\", () => {\n\n\ttry {\n\t\tif (jQuery.isEmptyObject(wpm.getGoogleAdsConversionIdentifiersWithLabel())) return\n\t\tif (!wpm.googleConfigConditionsMet(\"ads\")) return\n\n\t\tlet data = {\n\t\t\tsend_to: wpm.getGoogleAdsConversionIdentifiers(),\n\t\t\tvalue : wpmDataLayer.order.value_filtered,\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})\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(\"wpmOrderReceivedPage\", () => {\n\n\ttry {\n\t\tif (jQuery.isEmptyObject(wpm.getGoogleAdsConversionIdentifiersWithLabel())) return\n\t\tif (!wpm.googleConfigConditionsMet(\"ads\")) 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_filtered,\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?.clv_order_value_filtered) {\n\t\t\tdata.customer_lifetime_value = wpmDataLayer.order.clv_order_value_filtered\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\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})\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?.conversionIds) {\n\t\t\tObject.entries(wpmDataLayer.pixels.google.ads.conversionIds).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 = function () {\n\n\t\tlet conversionIdentifiers = []\n\n\t\tObject.keys(wpmDataLayer.pixels.google.ads.conversionIds).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?.general?.variationsOutput && 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\n// view order received page event\njQuery(document).on(\"wpmOrderReceivedPage\", 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\n\t\tif (!wpm.googleConfigConditionsMet(\"analytics\")) return\n\n\t\twpm.gtagLoaded().then(function () {\n\t\t\tgtag(\"event\", \"purchase\", {\n\t\t\t\tsend_to : [wpmDataLayer.pixels.google.analytics.ga4.measurement_id],\n\t\t\t\ttransaction_id: wpmDataLayer.order.number,\n\t\t\t\taffiliation : wpmDataLayer.order.affiliation,\n\t\t\t\tcurrency : wpmDataLayer.order.currency,\n\t\t\t\tvalue : wpmDataLayer.order.value_regular,\n\t\t\t\tdiscount : wpmDataLayer.order.discount,\n\t\t\t\ttax : wpmDataLayer.order.tax,\n\t\t\t\tshipping : wpmDataLayer.order.shipping,\n\t\t\t\tcoupon : wpmDataLayer.order.coupon,\n\t\t\t\titems : wpm.getGA4OrderItems(),\n\t\t\t})\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 * Copyright 2023 SweetCode. All rights reserved.\n *\n * Load GA4 premium 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(\"wpmViewItemList\", (event, product) => {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.google?.analytics?.eec) return\n\t\tif (!wpmDataLayer?.pixels?.google?.analytics?.ga4?.measurement_id) return\n\t\tif (!wpm.googleConfigConditionsMet(\"analytics\")) return\n\n\t\twpm.gtagLoaded().then(() => {\n\t\t\tgtag(\"event\", \"view_item_list\", {\n\t\t\t\tsend_to : wpmDataLayer.pixels.google.analytics.ga4.measurement_id,\n\t\t\t\titems : [wpm.ga4GetFullProductItemData(product)],\n\t\t\t\titem_list_name: wpmDataLayer.shop.list_name, // doesn't make sense on mini_cart\n\t\t\t\titem_list_id : wpmDataLayer.shop.list_id, // doesn't make sense on mini_cart\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// https://developers.google.com/analytics/devguides/collection/ga4/ecommerce?client_type=gtag#select_item\njQuery(document).on(\"wpmSelectItem\", (event, product) => {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.google?.analytics?.eec) return\n\t\tif (!wpmDataLayer?.pixels?.google?.analytics?.ga4?.measurement_id) return\n\t\tif (!wpm.googleConfigConditionsMet(\"analytics\")) return\n\n\t\twpm.gtagLoaded().then(() => {\n\t\t\tgtag(\"event\", \"select_item\", {\n\t\t\t\tsend_to: wpmDataLayer.pixels.google.analytics.ga4.measurement_id,\n\t\t\t\titems : [wpm.ga4GetFullProductItemData(product)],\n\t\t\t})\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(\"wpmAddToCart\", (event, product) => {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.google?.analytics?.eec) return\n\t\tif (!wpmDataLayer?.pixels?.google?.analytics?.ga4?.measurement_id) return\n\t\tif (!wpm.googleConfigConditionsMet(\"analytics\")) return\n\n\t\twpm.gtagLoaded().then(() => {\n\t\t\tgtag(\"event\", \"add_to_cart\", {\n\t\t\t\tsend_to : wpmDataLayer.pixels.google.analytics.ga4.measurement_id,\n\t\t\t\tcurrency: wpmDataLayer.shop.currency,\n\t\t\t\t// value: 0,\n\t\t\t\titems: [wpm.ga4GetFullProductItemData(product)],\n\t\t\t})\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(\"wpmViewItem\", (event, product = null) => {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.google?.analytics?.eec) return\n\t\tif (!wpmDataLayer?.pixels?.google?.analytics?.ga4?.measurement_id) return\n\t\tif (!wpm.googleConfigConditionsMet(\"analytics\")) 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})\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(\"wpmAddToWishlist\", (event, product) => {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.google?.analytics?.eec) return\n\t\tif (!wpmDataLayer?.pixels?.google?.analytics?.ga4?.measurement_id) return\n\t\tif (!wpm.googleConfigConditionsMet(\"analytics\")) return\n\n\t\twpm.gtagLoaded().then(() => {\n\t\t\tgtag(\"event\", \"add_to_wishlist\", {\n\t\t\t\tsend_to : wpmDataLayer.pixels.google.analytics.ga4.measurement_id,\n\t\t\t\tcurrency: wpmDataLayer.shop.currency,\n\t\t\t\t// value: 0,\n\t\t\t\titems: [wpm.ga4GetFullProductItemData(product)],\n\t\t\t})\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(\"wpmRemoveFromCart\", (event, product) => {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.google?.analytics?.eec) return\n\t\tif (!wpmDataLayer?.pixels?.google?.analytics?.ga4?.measurement_id) return\n\t\tif (!wpm.googleConfigConditionsMet(\"analytics\")) return\n\n\t\twpm.gtagLoaded().then(() => {\n\t\t\tgtag(\"event\", \"remove_from_cart\", {\n\t\t\t\tsend_to : wpmDataLayer.pixels.google.analytics.ga4.measurement_id,\n\t\t\t\tcurrency: wpmDataLayer.shop.currency,\n\t\t\t\t// value: 0,\n\t\t\t\titems: [wpm.ga4GetFullProductItemData(product)],\n\t\t\t})\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(\"wpmBeginCheckout\", () => {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.google?.analytics?.eec) return\n\t\tif (!wpmDataLayer?.pixels?.google?.analytics?.ga4?.measurement_id) return\n\t\tif (!wpm.googleConfigConditionsMet(\"analytics\")) return\n\n\t\twpm.gtagLoaded().then(() => {\n\t\t\tgtag(\"event\", \"begin_checkout\", {\n\t\t\t\tsend_to: wpmDataLayer.pixels.google.analytics.ga4.measurement_id,\n\t\t\t\t// coupon: \"\",\n\t\t\t\tcurrency: wpmDataLayer.shop.currency,\n\t\t\t\t// value: 0,\n\t\t\t\titems: wpm.getCartItemsGa4(),\n\t\t\t})\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(\"wpmViewCart\", () => {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.google?.analytics?.eec) return\n\t\tif (!wpmDataLayer?.pixels?.google?.analytics?.ga4?.measurement_id) return\n\t\tif (!wpm.googleConfigConditionsMet(\"analytics\")) 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\twpm.gtagLoaded().then(() => {\n\t\t\tgtag(\"event\", \"view_cart\", {\n\t\t\t\tsend_to : wpmDataLayer.pixels.google.analytics.ga4.measurement_id,\n\t\t\t\tcurrency: wpmDataLayer.shop.currency,\n\t\t\t\tvalue : cartValue.toFixed(2),\n\t\t\t\titems : products,\n\t\t\t})\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n\n// view search event\njQuery(document).on(\"pmwEvent:Search\", () => {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.google?.analytics?.eec) return\n\t\tif (!wpmDataLayer?.pixels?.google?.analytics?.ga4?.measurement_id) return\n\t\tif (!wpm.googleConfigConditionsMet(\"analytics\")) 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\twpm.gtagLoaded().then(() => {\n\t\t\tgtag(\"event\", \"view_search_results\", {\n\t\t\t\tsend_to : wpmDataLayer.pixels.google.analytics.ga4.measurement_id,\n\t\t\t\tsearch_term: wpm.getSearchTermFromUrl(),\n\t\t\t\titems : products,\n\t\t\t})\n\n\t\t})\n\n\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// user log in event\njQuery(document).on(\"wpmLogin\", () => {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.google?.analytics?.eec) return\n\t\tif (!wpmDataLayer?.pixels?.google?.analytics?.ga4?.measurement_id) return\n\t\tif (!wpm.googleConfigConditionsMet(\"analytics\")) return\n\n\n\t\twpm.gtagLoaded().then(() => {\n\t\t\tgtag(\"event\", \"login\", {\n\t\t\t\tsend_to: wpmDataLayer.pixels.google.analytics.ga4.measurement_id,\n\t\t\t})\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n\n/**\n * Scroll tracking event\n */\n\njQuery(document).on(\"pmwScrollDepth\", (event, scrollEvent) => {\n\n\tif (!wpmDataLayer?.pixels?.google?.analytics?.eec) return\n\tif (!wpmDataLayer?.pixels?.google?.analytics?.ga4?.measurement_id) return\n\tif (!wpm.googleConfigConditionsMet(\"analytics\")) return\n\n\twpm.gtagLoaded().then(() => {\n\t\tgtag(\"event\", \"scroll\", {\n\t\t\tsend_to: wpmDataLayer.pixels.google.analytics.ga4.measurement_id,\n\t\t\tvalue : scrollEvent.threshold,\n\t\t})\n\t})\n})\n\n/**\n * Attach an event listener to all links that contain tel: links\n */\njQuery(document).on(\"click\", \"a[href^='tel:']\", (event) => {\n\n\t// Get the phone number from the link\n\tlet phoneNumber = event.target.href.replace(\"tel:\", \"\")\n\n\t// Trim the phone number and remove all whitespaces\n\tphoneNumber = phoneNumber.replace(/\\s/g, \"\")\n\n\twpm.gtagLoaded().then(() => {\n\t\tgtag(\"event\", \"phone_number_click\", {\n\t\t\tsend_to: wpmDataLayer.pixels.google.analytics.ga4.measurement_id,\n\t\t\tclicked_phone_number: phoneNumber,\n\t\t})\n\t})\n})\n\n/**\n * Attach an event listener to all links that contain mailto: links\n */\njQuery(document).on(\"click\", \"a[href^='mailto:']\", event => {\n\n\tconsole.log(\"email click\")\n\tconsole.log(\"email address: \" + wpm.getEmailFromTarget(event.target))\n\tconsole.log(\"event.target: \", event.target)\n\n\twpm.gtagLoaded().then(() => {\n\t\tgtag(\"event\", \"email_click\", {\n\t\t\tsend_to: wpmDataLayer.pixels.google.analytics.ga4.measurement_id,\n\t\t\tclicked_email: wpm.getEmailFromTarget(event.target),\n\t\t})\n\t})\n})\n\n// Track load time in GA4 in seconds\n// https://www.lovesdata.com/blog/page-load-google-analytics\njQuery(window).on(\"load\", () => {\n\n\tif(!wpmDataLayer?.pixels?.google?.analytics?.ga4?.page_load_time_tracking) return\n\n\tlet timeToLoad = (performance.now() / 1000).toFixed(2);\n\n\t// console.log(\"Time to load: \" + timeToLoad + \" seconds\");\n\n\twpm.gtagLoaded().then(() => {\n\t\tgtag(\"event\", \"page_load_time\", {\n\t\t\tsend_to: wpmDataLayer.pixels.google.analytics.ga4.measurement_id,\n\t\t\tpage_load_time_seconds: timeToLoad,\n\t\t})\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\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}(window.wpm = window.wpm || {}, jQuery))\n","/**\n * Copyright 2023 SweetCode. All rights reserved.\n *\n * Load GA4 premium functions\n * */\n\n(function (wpm, $, undefined) {\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'\nif (wpm.canLoadPremiumFeatures()) {\n\trequire(\"./functions_premium\")\n\trequire(\"./event_listeners_premium\")\n}\n// #endif\n","/**\n * Google Analytics loader\n */\n\n// require(\"./ga3/loader\")\nrequire(\"./ga4/loader\")\n","/**\n * Load Google base event listeners\n */\n\n// Pixel load event listener\njQuery(document).on(\"wpmLoadPixels\", function () {\n\n\tif (typeof wpmDataLayer?.pixels?.google?.state === \"undefined\") {\n\t\tif (wpm.canGoogleLoad()) {\n\t\t\twpm.loadGoogle()\n\t\t} else {\n\t\t\twpm.logPreventedPixelLoading(\"google\", \"analytics / ads\")\n\t\t}\n\t}\n})\n","/**\n * Copyright 2023 SweetCode. All rights reserved.\n *\n * Run the following on every page load\n */\n\njQuery(document).on(\"wpmLoadAlways\", function () {\n\n\ttry {\n\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n","/**\n * Load Google base functions\n */\n\n(function (wpm, $, undefined) {\n\n\twpm.googleConfigConditionsMet = (type) => {\n\n\t\t// always returns true if Google Consent Mode is active\n\t\tif (wpmDataLayer?.pixels?.google?.consent_mode?.active) {\n\t\t\treturn true\n\t\t} else if (wpm.getConsentValues().mode === \"category\") {\n\t\t\treturn wpm.getConsentValues().categories[type] === true\n\t\t} else if (wpm.getConsentValues().mode === \"pixel\") {\n\t\t\treturn wpm.getConsentValues().pixels.includes(\"google-\" + type)\n\t\t} else {\n\t\t\treturn false\n\t\t}\n\t}\n\n\twpm.getVisitorConsentStatusAndUpdateGoogleConsentSettings = (google_consent_settings) => {\n\n\t\tif (wpm.getConsentValues().mode === \"category\") {\n\n\t\t\tif (wpm.getConsentValues().categories.analytics) google_consent_settings.analytics_storage = \"granted\"\n\t\t\tif (wpm.getConsentValues().categories.ads) google_consent_settings.ad_storage = \"granted\"\n\t\t} else if ((wpm.getConsentValues().mode === \"pixel\")) {\n\n\t\t\tgoogle_consent_settings.analytics_storage = wpm.getConsentValues().pixels.includes(\"google-analytics\") ? \"granted\" : \"denied\"\n\t\t\tgoogle_consent_settings.ad_storage = wpm.getConsentValues().pixels.includes(\"google-ads\") ? \"granted\" : \"denied\"\n\t\t}\n\n\t\treturn google_consent_settings\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?.ads?.enhanced_conversions?.active) {\n\t\t\t\tObject.keys(wpmDataLayer.pixels.google.ads.conversionIds).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.conversionIds).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?.conversionIds && 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.conversionIds)[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\t// https://support.google.com/google-ads/answer/9888145#zippy=%2Cvalidate-your-implementation-using-chrome-developer-tools\n\t\t\tif (\n\t\t\t\twpmDataLayer?.shop?.page_type\n\t\t\t\t&& \"order_received_page\" === wpmDataLayer.shop.page_type\n\t\t\t\t&& wpmDataLayer?.order?.google?.ads?.enhanced_conversion_data\n\t\t\t) {\n\t\t\t\tgtag(\"set\", \"user_data\", wpmDataLayer.order.google.ads.enhanced_conversion_data)\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\twpm.fireGtagGoogleAnalyticsUA = () => {\n\n\t\ttry {\n\t\t\twpmDataLayer.pixels.google.analytics.universal.state = \"loading\"\n\n\t\t\tgtag(\"config\", wpmDataLayer.pixels.google.analytics.universal.property_id, wpmDataLayer.pixels.google.analytics.universal.parameters)\n\t\t\twpmDataLayer.pixels.google.analytics.universal.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\twpm.isGoogleActive = () => {\n\n\t\tif (\n\t\t\twpmDataLayer?.pixels?.google?.analytics?.universal?.property_id ||\n\t\t\twpmDataLayer?.pixels?.google?.analytics?.ga4?.measurement_id ||\n\t\t\t!jQuery.isEmptyObject(wpmDataLayer?.pixels?.google?.ads?.conversionIds)\n\t\t) {\n\t\t\treturn true\n\t\t} else {\n\t\t\treturn false\n\t\t}\n\t}\n\n\twpm.getGoogleGtagId = () => {\n\n\t\tif (wpmDataLayer?.pixels?.google?.analytics?.universal?.property_id) {\n\t\t\treturn wpmDataLayer.pixels.google.analytics.universal.property_id\n\t\t} else if (wpmDataLayer?.pixels?.google?.analytics?.ga4?.measurement_id) {\n\t\t\treturn wpmDataLayer.pixels.google.analytics.ga4.measurement_id\n\t\t} else {\n\t\t\treturn Object.keys(wpmDataLayer.pixels.google.ads.conversionIds)[0]\n\t\t}\n\t}\n\n\n\twpm.loadGoogle = () => {\n\n\t\tif (wpm.isGoogleActive()) {\n\n\t\t\twpmDataLayer.pixels.google.state = \"loading\"\n\n\t\t\twpm.loadScriptAndCacheIt(\"https://www.googletagmanager.com/gtag/js?id=\" + wpm.getGoogleGtagId())\n\t\t\t\t.then((script, textStatus) => {\n\n\t\t\t\t\ttry {\n\n\t\t\t\t\t\t// Initiate Google dataLayer and gtag\n\t\t\t\t\t\twindow.dataLayer = window.dataLayer || []\n\t\t\t\t\t\twindow.gtag = function gtag() {\n\t\t\t\t\t\t\tdataLayer.push(arguments)\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Google Consent Mode\n\t\t\t\t\t\tif (wpmDataLayer?.pixels?.google?.consent_mode?.active) {\n\n\t\t\t\t\t\t\tlet google_consent_settings = {\n\t\t\t\t\t\t\t\t\"ad_storage\" : wpmDataLayer.pixels.google.consent_mode.ad_storage,\n\t\t\t\t\t\t\t\t\"analytics_storage\": wpmDataLayer.pixels.google.consent_mode.analytics_storage,\n\t\t\t\t\t\t\t\t\"wait_for_update\" : wpmDataLayer.pixels.google.consent_mode.wait_for_update,\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif (wpmDataLayer?.pixels?.google?.consent_mode?.region) {\n\t\t\t\t\t\t\t\tgoogle_consent_settings.region = wpmDataLayer.pixels.google.consent_mode.region\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tgoogle_consent_settings = wpm.getVisitorConsentStatusAndUpdateGoogleConsentSettings(google_consent_settings)\n\n\t\t\t\t\t\t\tgtag(\"consent\", \"default\", google_consent_settings)\n\t\t\t\t\t\t\tgtag(\"set\", \"ads_data_redaction\", wpmDataLayer.pixels.google.consent_mode.ads_data_redaction)\n\t\t\t\t\t\t\tgtag(\"set\", \"url_passthrough\", wpmDataLayer.pixels.google.consent_mode.url_passthrough)\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Google Linker\n\t\t\t\t\t\t// https://developers.google.com/gtagjs/devguide/linker\n\t\t\t\t\t\tif (wpmDataLayer?.pixels?.google?.linker?.settings) {\n\t\t\t\t\t\t\tgtag(\"set\", \"linker\", wpmDataLayer.pixels.google.linker.settings)\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tgtag(\"js\", new Date())\n\t\t\t\t\t\tgtag('set', 'developer_id.dNDI5Yz', true);\n\n\t\t\t\t\t\t// Google Ads loader\n\t\t\t\t\t\tif (!jQuery.isEmptyObject(wpmDataLayer?.pixels?.google?.ads?.conversionIds)) { // Only run if the pixel has set up\n\t\t\t\t\t\t\tif (wpm.googleConfigConditionsMet(\"ads\")) { \t\t\t\t\t\t\t// Only run if cookie consent has been given\n\t\t\t\t\t\t\t\twpm.fireGtagGoogleAds()\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\twpm.logPreventedPixelLoading(\"google-ads\", \"ads\")\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Google Universal Analytics loader\n\t\t\t\t\t\tif (wpmDataLayer?.pixels?.google?.analytics?.universal?.property_id) { \t\t// Only run if the pixel has set up\n\n\t\t\t\t\t\t\tif (wpm.googleConfigConditionsMet(\"analytics\")) {\t\t\t\t\t\t// Only run if cookie consent has been given\n\t\t\t\t\t\t\t\twpm.fireGtagGoogleAnalyticsUA()\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\twpm.logPreventedPixelLoading(\"google-universal-analytics\", \"analytics\")\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// GA4 loader\n\t\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\t\tif (wpm.googleConfigConditionsMet(\"analytics\")) {\t\t\t\t\t\t// Only run if cookie consent has been given\n\t\t\t\t\t\t\t\twpm.fireGtagGoogleAnalyticsGA4()\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\twpm.logPreventedPixelLoading(\"ga4\", \"analytics\")\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\twpmDataLayer.pixels.google.state = \"ready\"\n\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\tconsole.error(e)\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t}\n\t}\n\n\twpm.canGoogleLoad = () => {\n\n\t\tif (wpmDataLayer?.pixels?.google?.consent_mode?.active) {\n\t\t\treturn true\n\t\t} else if (\"category\" === wpm.getConsentValues().mode) {\n\t\t\treturn !!(wpm.getConsentValues().categories[\"ads\"] || wpm.getConsentValues().categories[\"analytics\"])\n\t\t} else if (\"pixel\" === wpm.getConsentValues().mode) {\n\t\t\treturn wpm.getConsentValues().pixels.includes(\"google-ads\") || wpm.getConsentValues().pixels.includes(\"google-analytics\")\n\t\t} else {\n\t\t\tconsole.error(\"Couldn't find a valid load condition for Google mode in wpmConsentValues\")\n\t\t\treturn false\n\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) return reject()\n\t\t\t\tstartTime += frequency\n\t\t\t\tsetTimeout(wait, frequency)\n\t\t\t})()\n\t\t})\n\t}\n\n\n}(window.wpm = window.wpm || {}, jQuery))\n","/**\n * Copyright 2023 SweetCode. All rights reserved.\n *\n * Load Google base premium functions\n */\n\n(function (wpm, $, undefined) {\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'\nif (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\")\nrequire(\"./optimize/loader\")\n\n\n","/**\n * Load Google Optimize event listeners\n */\n\njQuery(document).on(\"wpmLoadPixels\", function () {\n\n\tif (wpmDataLayer?.pixels?.google?.optimize?.container_id && !wpmDataLayer?.pixels?.google?.optimize?.loaded) {\n\t\tif (wpm.canIFire(\"analytics\", \"google-optimize\")) wpm.load_google_optimize_pixel()\n\t}\n})\n","/**\n * Load Google Optimize functions\n */\n\n\n(function (wpm, $, undefined) {\n\n\twpm.load_google_optimize_pixel = function () {\n\n\t\ttry {\n\t\t\twpmDataLayer.pixels.google.optimize.loaded = true\n\n\t\t\twpm.loadScriptAndCacheIt(\"https://www.googleoptimize.com/optimize.js?id=\" + wpmDataLayer.pixels.google.optimize.container_id)\n\t\t\t// .then(function (script, textStatus) {\n\t\t\t// \t\tconsole.log('Google Optimize loaded')\n\t\t\t// });\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 * Load Google Optimize\n */\n\nrequire(\"./functions\")\nrequire(\"./event_listeners\")\n","/**\n * Load Hotjar event listeners\n */\n\n// Pixel load event listener\njQuery(document).on(\"wpmLoadPixels\", function () {\n\n\tif (wpmDataLayer?.pixels?.hotjar?.site_id && !wpmDataLayer?.pixels?.hotjar?.loaded) {\n\t\tif (wpm.canIFire(\"analytics\", \"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","/**\n * Copyright 2023 SweetCode. All rights reserved.\n *\n * Load Microsoft Ads event listeners\n *\n * https://help.ads.microsoft.com/#apex/ads/en/56684/2\n * https://help.ads.microsoft.com/#apex/ads/en/60118/-1\n *\n * add_payment_info, add_to_cart, add_to_wishlist, begin_checkout, checkout_progress, exception, generate_lead, login, page_view, purchase, refund, remove_from_cart, screen_view, search, select_content, set_checkout_option, share, sign_up, timing_complete, view_item, view_item_list, view_promotion, view_search_results\n *\n * */\n\n// Pixel load event listener\njQuery(document).on(\"wpmLoadPixels\", () => {\n\n\tif (wpmDataLayer?.pixels?.bing?.uet_tag_id && !wpmDataLayer?.pixels?.bing?.loaded) {\n\t\tif (wpm.canIFire(\"ads\", \"microsoft-ads\")) wpm.load_bing_pixel()\n\t}\n})\n\n// https://help.ads.microsoft.com/#apex/ads/en/60118/-1\n// add-to-cart event\njQuery(document).on(\"wpmAddToCart\", (event, product) => {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.bing?.loaded) return\n\n\t\twindow.uetq.push(\"event\", \"add_to_cart\", {\n\t\t\tecomm_pagetype: \"cart\",\n\t\t\tecomm_prodid : product.dyn_r_ids[wpmDataLayer.pixels.bing.dynamic_remarketing.id_type],\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// https://help.ads.microsoft.com/#apex/ads/en/60118/-1\n// view product event\njQuery(document).on(\"wpmViewItem\", (event, product = null) => {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.bing?.loaded) return\n\n\t\tlet data = {}\n\n\t\tif (product) {\n\t\t\tdata.ecomm_pagetype = \"product\"\n\t\t\tdata.ecomm_prodid = product.dyn_r_ids[wpmDataLayer.pixels.bing.dynamic_remarketing.id_type]\n\t\t}\n\n\t\twindow.uetq.push(\"event\", \"\", data)\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// https://help.ads.microsoft.com/#apex/ads/en/60118/-1\n// view category event\njQuery(document).on(\"wpmCategory\", () => {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.bing?.loaded) return\n\n\t\tlet data = {\n\t\t\tecomm_pagetype: \"category\",\n\t\t}\n\n\t\tif (Object.keys(wpmDataLayer?.products || {}).length) {\n\t\t\tdata.ecomm_prodid = wpm.getBingDataLayerProducts()\n\t\t}\n\n\t\twindow.uetq.push(\"event\", \"\", data)\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// https://help.ads.microsoft.com/#apex/ads/en/60118/-1\n// view search event\njQuery(document).on(\"pmwEvent:Search\", () => {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.bing?.loaded) return\n\n\t\tlet data = {\n\t\t\tecomm_query : wpm.getSearchTermFromUrl(),\n\t\t\tecomm_pagetype: \"searchresults\",\n\t\t}\n\n\t\tif (Object.keys(wpmDataLayer?.products || {}).length) {\n\t\t\tdata.ecomm_prodid = wpm.getBingDataLayerProducts()\n\t\t}\n\n\t\twindow.uetq.push(\"event\", \"\", data)\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n/**\n * The ecomm_pagetype parameter identifies the type of page the user has visited.\n * Valid options: home, searchresults, category, product, cart, purchase, other.\n * */\n// view category event\njQuery(document).on(\"wpmEverywhereElse\", () => {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.bing?.loaded) return\n\n\t\tlet data = {\n\t\t\tecomm_pagetype: wpmDataLayer?.shop?.page_type === \"front_page\" ? \"home\" : \"other\",\n\t\t}\n\n\t\tif (Object.keys(wpmDataLayer?.products || {}).length) {\n\t\t\tdata.ecomm_prodid = wpm.getBingDataLayerProducts()\n\t\t}\n\n\t\twindow.uetq.push(\"event\", \"\", data)\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// https://help.ads.microsoft.com/#apex/ads/en/60118/-1\n// view order received page event\njQuery(document).on(\"wpmOrderReceivedPage\", () => {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.bing?.loaded) return\n\n\t\twindow.uetq.push(\"event\", \"purchase\", {\n\t\t\tecomm_pagetype: \"purchase\",\n\t\t\tecomm_prodid : wpm.bing_purchase_ecomm_prodids(),\n\t\t\trevenue_value : wpmDataLayer.order.value_filtered,\n\t\t\tcurrency : wpmDataLayer.order.currency,\n\t\t\titems : wpm.bing_purchase_items(),\n\t\t})\n\t\t\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n","/**\n * Copyright 2023 SweetCode. All rights reserved.\n *\n * Load Microsoft Ads premium functions\n * */\n\n(function (wpm, $, undefined) {\n\n\twpm.load_bing_pixel = () => {\n\n\t\ttry {\n\t\t\twpmDataLayer.pixels.bing.loaded = true\n\n\t\t\t// @formatter:off\n\t\t\twindow.uetq = window.uetq || [];\n\n\t\t\t(function(w,d,t,r,u){var f,n,i;w[u]=w[u]||[],f=function(){var o={ti:wpmDataLayer.pixels.bing.uet_tag_id};o.q=w[u],w[u]=new UET(o),w[u].push(\"pageLoad\")},n=d.createElement(t),n.src=r,n.async=1,n.onload=n.onreadystatechange=function(){var s=this.readyState;s&&s!==\"loaded\"&&s!==\"complete\"||(f(),n.onload=n.onreadystatechange=null)},i=d.getElementsByTagName(t)[0],i.parentNode.insertBefore(n,i)})(window,document,\"script\",\"//bat.bing.com/bat.js\",\"uetq\");\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\twpm.bing_purchase_ecomm_prodids = () => {\n\n\t\tlet prodIds = []\n\n\t\tObject.values(wpmDataLayer.order.items).forEach((orderItem) => {\n\n\t\t\tif (wpmDataLayer?.general?.variationsOutput && 0 !== orderItem.variation_id) {\n\t\t\t\tprodIds.push(String(wpmDataLayer.products[orderItem.variation_id].dyn_r_ids[wpmDataLayer.pixels.bing.dynamic_remarketing.id_type]))\n\t\t\t} else {\n\t\t\t\tprodIds.push(String(wpmDataLayer.products[orderItem.id].dyn_r_ids[wpmDataLayer.pixels.bing.dynamic_remarketing.id_type]))\n\t\t\t}\n\t\t})\n\n\t\treturn prodIds\n\t}\n\n\twpm.bing_purchase_items = () => {\n\n\t\tlet orderItems = []\n\n\t\tObject.values(wpmDataLayer.order.items).forEach(item => {\n\n\t\t\tlet orderItem = {\n\t\t\t\tquantity: item.quantity,\n\t\t\t\tprice : item.price,\n\t\t\t}\n\n\t\t\tif (wpmDataLayer?.general?.variationsOutput && 0 !== item.variation_id) {\n\n\t\t\t\torderItem.id = String(wpmDataLayer.products[item.variation_id].dyn_r_ids[wpmDataLayer.pixels.bing.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.bing.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\twpm.getBingDataLayerProducts = () => {\n\n\t\tlet productIds = []\n\n\t\tObject.values(wpmDataLayer.products).forEach((product) => {\n\t\t\tproductIds.push(String(product.dyn_r_ids[wpmDataLayer.pixels.bing.dynamic_remarketing.id_type]))\n\t\t})\n\n\t\treturn productIds\n\t}\n\n}(window.wpm = window.wpm || {}, jQuery));\n","/**\n * Microsoft Ads loader\n */\n\n// #if process.env.TIER === 'premium'\nif (wpm.canLoadPremiumFeatures()) {\n\trequire(\"./functions_premium\")\n\trequire(\"./event_listeners_premium\")\n}\n// #endif\n\n","/**\n * Copyright 2023 SweetCode. All rights reserved.\n *\n * Load Pinterest event listeners\n * */\n\n// Pixel load event listener\njQuery(document).on(\"wpmLoadPixels\", () => {\n\n\tif (wpmDataLayer?.pixels?.pinterest?.pixel_id && !wpmDataLayer?.pixels?.pinterest?.loaded) {\n\t\tif (wpm.canIFire(\"ads\", \"pinterest-ads\")) wpm.loadPinterestPixel()\n\t}\n})\n\n// https://help.pinterest.com/en/business/article/add-event-codes\n// AddToCart event\njQuery(document).on(\"wpmClientSideAddToCart\", (event, payload) => {\n\n\tconst product = payload.product\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.pinterest?.loaded) return\n\n\t\t// keep \"addtocart\" as this is the official browser event name\n\t\tpintrk(\"track\", \"addtocart\", {\n\t\t\tevent_id : payload.pinterest.event_id,\n\t\t\tvalue : parseFloat(product.quantity * product.price),\n\t\t\tcurrency : product.currency,\n\t\t\tline_items: [wpm.getPinterestProductData(product)],\n\t\t})\n\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// https://help.pinterest.com/en/business/article/add-event-codes\n// pageview event\njQuery(document).on(\"wpmClientSideViewItem\", (event, payload) => {\n\n\tconst product = payload.product\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.pinterest?.loaded) return\n\n\t\tlet data = {\n\t\t\tevent_id: payload.pinterest.event_id,\n\t\t}\n\n\t\tif (product) {\n\t\t\tdata.currency = product.currency\n\t\t\tdata.line_items = [wpm.getPinterestProductData(product)]\n\t\t}\n\n\t\tpintrk(\"track\", \"pagevisit\", data)\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// view search event\njQuery(document).on(\"wpmClientSideSearch\", (event, payload) => {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.pinterest?.loaded) return\n\n\t\tlet urlParams = new URLSearchParams(window.location.search)\n\n\t\tpintrk(\"track\", \"search\", {\n\t\t\tevent_id : payload.pinterest.event_id,\n\t\t\tsearch_query: urlParams.get(\"s\"),\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// view category event\njQuery(document).on(\"wpmClientSideViewCategory\", (event, payload) => {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.pinterest?.loaded) return\n\n\t\tpintrk(\"track\", \"viewcategory\", {\n\t\t\tevent_id: payload.pinterest.event_id,\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n\n// view order received page event\n// https://developers.pinterest.com/docs/tag/conversion/\njQuery(document).on(\"wpmClientSideOrderReceivedPage\", (event, payload) => {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.pinterest?.loaded) return\n\n\t\tpintrk(\"track\", \"checkout\", {\n\t\t\tevent_id : wpmDataLayer.order.id.toString(),\n\t\t\tvalue : wpmDataLayer.order.value_filtered,\n\t\t\torder_quantity: wpmDataLayer.order.quantity,\n\t\t\tcurrency : wpmDataLayer.order.currency,\n\t\t\torder_id : wpmDataLayer.order.id.toString(),\n\t\t\tline_items : wpm.pinterestFormattedOrderItems(),\n\t\t})\n\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n","// TODO add enhanced match email hash to uncached pages like cart and purchase confirmation page\n// TODO check if more values can be passed to product and category pages\n// TODO look into how Pinterest handles variants separately https://developers.pinterest.com/docs/tag/conversion/\n\n/**\n * Copyright 2023 SweetCode. All rights reserved.\n *\n * Load Pinterest premium functions\n * */\n\n(function (wpm, $, undefined) {\n\n\twpm.getPinterestProductData = product => {\n\n\t\tif (product.isVariation) {\n\t\t\treturn {\n\t\t\t\tproduct_name : product.name,\n\t\t\t\tproduct_variant_id: product.dyn_r_ids[wpmDataLayer.pixels.pinterest.dynamic_remarketing.id_type],\n\t\t\t\t// product_id : wpmDataLayer.products[product.parentId].dyn_r_ids[wpmDataLayer.pixels.pinterest.dynamic_remarketing.id_type],\n\t\t\t\tproduct_id : product.parentId_dyn_r_ids[wpmDataLayer.pixels.pinterest.dynamic_remarketing.id_type],\n\t\t\t\tproduct_category: product.category,\n\t\t\t\tproduct_variant : product.variant,\n\t\t\t\tproduct_price : product.price,\n\t\t\t\tproduct_quantity: product.quantity,\n\t\t\t\tproduct_brand : product.brand,\n\t\t\t}\n\t\t} else {\n\t\t\treturn {\n\t\t\t\tproduct_name : product.name,\n\t\t\t\tproduct_id : product.dyn_r_ids[wpmDataLayer.pixels.pinterest.dynamic_remarketing.id_type],\n\t\t\t\tproduct_category: product.category,\n\t\t\t\tproduct_price : product.price,\n\t\t\t\tproduct_quantity: product.quantity,\n\t\t\t\tproduct_brand : product.brand,\n\t\t\t}\n\t\t}\n\t}\n\n\twpm.pinterestFormattedOrderItems = () => {\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\tproduct_category: wpmDataLayer.products[item.id].category.join(\",\"),\n\t\t\t\t// product_brand : wpmDataLayer.products[key].brand,\n\t\t\t\tproduct_quantity: item.quantity,\n\t\t\t\tproduct_price : item.price,\n\t\t\t}\n\n\t\t\tif (wpmDataLayer?.general?.variationsOutput && 0 !== item.variation_id) {\n\n\t\t\t\torderItem.product_id = String(wpmDataLayer.products[item.variation_id].dyn_r_ids[wpmDataLayer.pixels.pinterest.dynamic_remarketing.id_type])\n\t\t\t\torderItem.product_name = wpmDataLayer.products[item.variation_id].name\n\t\t\t\torderItems.push(orderItem)\n\t\t\t} else {\n\n\t\t\t\torderItem.product_id = String(wpmDataLayer.products[item.id].dyn_r_ids[wpmDataLayer.pixels.pinterest.dynamic_remarketing.id_type])\n\t\t\t\torderItem.product_name = wpmDataLayer.products[item.id].name\n\t\t\t\torderItems.push(orderItem)\n\t\t\t}\n\t\t})\n\n\t\treturn orderItems\n\t}\n\n\t// https://developers.pinterest.com/docs/tag/conversion/\n\twpm.loadPinterestPixel = () => {\n\n\t\ttry {\n\t\t\twpmDataLayer.pixels.pinterest.loaded = true\n\n\t\t\t// @formatter:off\n\t\t\t!function(e){if(!window.pintrk){window.pintrk=function(){window.pintrk.queue.push(\n\t\t\t\tArray.prototype.slice.call(arguments))};var\n\t\t\t\tn=window.pintrk;n.queue=[],n.version=\"3.0\";var\n\t\t\t\tt=document.createElement(\"script\");t.async=!0,t.src=e;var\n\t\t\t\tr=document.getElementsByTagName(\"script\")[0];r.parentNode.insertBefore(t,r)}}(\"https://s.pinimg.com/ct/core.js\");\n\n\t\t\twpm.pinterestLoadEvent();\n\t\t\tpintrk('page');\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\t// https://help.pinterest.com/en/business/article/enhanced-match\n\twpm.pinterestLoadEvent = () => {\n\t\ttry {\n\t\t\tif (\n\t\t\t\t(\n\t\t\t\t\twpmDataLayer.general.userLoggedIn ||\n\t\t\t\t\t\"order_received_page\" === wpmDataLayer.shop.page_type\n\t\t\t\t)\n\t\t\t\t&& wpmDataLayer?.user?.email?.sha256\n\t\t\t) {\n\t\t\t\tpintrk(\"load\", wpmDataLayer.pixels.pinterest.pixel_id, {em: wpmDataLayer.user.email.sha256})\n\t\t\t} else {\n\t\t\t\tpintrk(\"load\", wpmDataLayer.pixels.pinterest.pixel_id)\n\t\t\t}\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\t// https://developers.pinterest.com/docs/conversions/best/\n\t// https://help.pinterest.com/en/business/article/pinterest-tag-parameters-and-cookies\n\twpm.getPinterestUserDataFromBrowser = () => {\n\n\t\tlet data = {}\n\n\t\tif (\n\t\t\twpm.getCookie(\"_pin_unauth\")\n\t\t\t|| wpm.getCookie(\"_pinterest_ct_rt\")\n\t\t\t|| wpm.getCookie(\"_pinterest_ct\")\n\t\t\t|| wpm.getCookie(\"_pinterest_ct_ua\")\n\t\t\t|| wpm.getCookie(\"_pinterest_sess\")\n\t\t) {\n\t\t\tdata.trackingPermitted = true\n\t\t}\n\n\t\t// https://developers.pinterest.com/docs/conversions/event/\n\t\t// Not 100% if this must be an array or not.\n\t\t// On https://developers.pinterest.com/docs/conversions/event/ it is specified as an array.\n\t\t// On the setup guide it is specified as a string: https://cln.sh/z5FZsDM8\n\n\t\t// If the epik parameter is present in the URL and is valid, add it to the click_id array\n\t\tif (\n\t\t\twpm.urlHasParameter(\"epik\")\n\t\t\t&& wpm.isValidEpikCookie(wpm.getUrlParameter(\"epik\"))\n\t\t) {\n\t\t\tdata.click_id = wpm.getUrlParameter(\"epik\")\n\t\t}\n\n\t\tif (\n\t\t\t!data.click_id\n\t\t\t&& wpm.getCookie(\"_epik\")\n\t\t\t&& wpm.isValidEpikCookie(wpm.getCookie(\"_epik\"))\n\t\t) {\n\t\t\tdata.click_id = wpm.getCookie(\"_epik\")\n\t\t}\n\n\t\tif (\n\t\t\t!data.click_id\n\t\t\t&& wpm.getCookie(\"_derived_epik\")\n\t\t\t&& wpm.isValidDerivedEpikCookie(wpm.getCookie(\"_derived_epik\"))\n\t\t) {\n\t\t\tdata.click_id = wpm.getCookie(\"_derived_epik\")\n\t\t}\n\n\t\tif (navigator.userAgent) data.client_user_agent = navigator.userAgent\n\n\t\tif (wpmDataLayer?.pixels?.pinterest?.advanced_matching) {\n\t\t\tif (wpmDataLayer?.user?.email?.sha256) data.em = [wpmDataLayer.user.email.sha256]\n\t\t\tif (wpmDataLayer?.user?.phone?.pinterest) data.ph = [wpmDataLayer.user.phone.pinterest]\n\t\t\tif (wpmDataLayer?.user?.first_name?.pinterest) data.fn = [wpmDataLayer.user.first_name.pinterest]\n\t\t\tif (wpmDataLayer?.user?.last_name?.pinterest) data.ln = [wpmDataLayer.user.last_name.pinterest]\n\t\t\tif (wpmDataLayer?.user?.id?.sha256) data.external_id = [wpmDataLayer.user.id.sha256]\n\t\t\tif (wpmDataLayer?.user?.city?.pinterest) data.ct = [wpmDataLayer.user.city.pinterest]\n\t\t\tif (wpmDataLayer?.user?.state?.pinterest) data.st = [wpmDataLayer.user.state.pinterest]\n\t\t\tif (wpmDataLayer?.user?.postcode?.pinterest) data.zp = [wpmDataLayer.user.postcode.pinterest]\n\t\t\tif (wpmDataLayer?.user?.country?.pinterest) data.country = [wpmDataLayer.user.country.pinterest]\n\t\t}\n\n\t\treturn data\n\t}\n\n\twpm.isValidEpikCookie = (cookie) => {\n\n\t\t// The following are two valid _epik cookies. Create a regex that checks if a cookie is valid. The function should return true if the cookie is valid and false if it is not.\n\t\t// dj0yJnU9aUYyam5aN0N6SjhMZU1pTk1iRTdfUnlNcXRpdHJ1c2UmcD0xJm49QVJEX2VPajVWUWtramc4MUZTWlRfZyZ0PUFBQUFBR1JfV1BN\n\t\t// dj0yJnU9dms1bVZPSEFfWEJOazJjQ2pxemExX0NMVy0yUlV6M2EmcD0xJm49RFI4bjBfSjlheE9PMXhrWXltbmFhdyZ0PUFBQUFBR1JfVzVJ\n\n\t\t// Create a regex that checks if a cookie is valid. The function should return true if the cookie is valid and false if it is not.\n\t\t(/^dj0yJnU9[a-zA-Z0-9\\-\\_]{100}/).test(cookie)\n\t}\n\n\twpm.isValidDerivedEpikCookie = (cookie) => {\n\n\t\t// The following are valid _derived_epik cookies:\n\t\t// dj0yJnU9dkV4amp4ZkN4S3c2UzVXTXp3V09OeGVXZHg4WElPczQmbj1oOTBzWUZSZEJHYkNuUXU1TEpvamJRJm09MSZ0PUFBQUFBR1JfV1JnJnJtPTEmcnQ9QUFBQUFHUl9XUmcmc3A9NQ\n\t\t// dj0yJnU9VHNZZGQwM25sdXFNcEt6TzlXdFl6WGxraHZfaml1dHkmbj11Y3RHRXNQUzQwSjBIWnZla19HV0xBJm09MSZ0PUFBQUFBR1JfWEFrJnJtPTEmcnQ9QUFBQUFHUl9YQWsmc3A9NQ\n\n\t\t(/^dj0yJnU9[a-zA-Z0-9\\-\\_]{134}/).test(cookie)\n\t}\n\n\twpm.pinterestGetProductDataForCapiEvent = (product) => {\n\n\t\treturn {\n\t\t\tcurrency : product.currency,\n\t\t\tvalue : String(product.price * product.quantity),\n\t\t\tcontent_ids: [String(product.dyn_r_ids[wpmDataLayer.pixels.pinterest.dynamic_remarketing.id_type])],\n\t\t\tnum_items : 1,\n\t\t\tcontents : [{\n\t\t\t\titem_price: String(product.price),\n\t\t\t\tquantity : product.quantity,\n\t\t\t}],\n\t\t}\n\t}\n\n\twpm.getPinterestS2SBaseData = () => {\n\n\t\treturn {\n\t\t\taction_source : \"web\",\n\t\t\tevent_time : Math.round(Date.now() / 1000),\n\t\t\tevent_id : wpm.getRandomEventId(),\n\t\t\tevent_source_url: window.location.href,\n\t\t\t// opt_out : false,\n\t\t\t// partner_name: \"direct\",\n\t\t\tuser_data: wpm.getPinterestUserDataFromBrowser(),\n\t\t}\n\t}\n\n}(window.wpm = window.wpm || {}, jQuery));\n","/**\n * Pinterest Ads loader\n */\n\n// #if process.env.TIER === 'premium'\nif (wpm.canLoadPremiumFeatures()) {\n\trequire(\"./functions_premium\")\n\trequire(\"./event_listeners_premium\")\n}\n// #endif\n\n","/**\n * Copyright 2023 SweetCode. All rights reserved.\n *\n * Load Reddit event listeners\n *\n * Basic info: https://redditinc.force.com/helpcenter/s/article/Install-the-Reddit-Pixel-on-your-website\n * Advanced matching: https://redditinc.force.com/helpcenter/s/article/Reddit-Pixel-Advanced-Matching\n * Event metadata: https://redditinc.force.com/helpcenter/s/article/Reddit-Pixel-Event-Metadata\n * */\n\n// Pixel load event listener\njQuery(document).on(\"wpmLoadPixels\", () => {\n\tif (wpmDataLayer?.pixels?.reddit?.advertiser_id && !wpmDataLayer?.pixels?.reddit?.loaded) {\n\t\tif (wpm.canIFire(\"ads\", \"reddit-ads\")) wpm.loadRedditPixel()\n\t}\n})\n\n// AddToCart event\njQuery(document).on(\"wpmAddToCart\", (event, product) => {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.reddit?.loaded) return\n\n\t\tlet data = {\n\t\t\tcurrency : product.currency,\n\t\t\titemCount: product.quantity,\n\t\t\tvalue : product.price * product.quantity,\n\t\t}\n\n\t\trdt(\"track\", \"AddToCart\", data)\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// ViewContent event\njQuery(document).on(\"wpmViewItem\", (event, product = null) => {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.reddit?.loaded) return\n\n\t\trdt(\"track\", \"ViewContent\")\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// view search event\njQuery(document).on(\"pmwEvent:Search\", () => {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.reddit?.loaded) return\n\n\t\trdt(\"track\", \"Search\")\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\njQuery(document).on(\"wpmAddToWishlist\", (event, product) => {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.reddit?.loaded) return\n\n\t\tlet data = {\n\t\t\tcurrency : product.currency,\n\t\t\titemCount: product.quantity,\n\t\t\tvalue : product.price * product.quantity,\n\t\t}\n\n\t\trdt(\"track\", \"AddToWishlist\", data)\n\t} catch (error) {\n\t\tconsole.error(error)\n\t}\n})\n\n// view order received page event\njQuery(document).on(\"wpmOrderReceivedPage\", () => {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.reddit?.loaded) return\n\n\t\tlet data = {\n\t\t\ttransactionId: wpmDataLayer.order.number,\n\t\t\tcurrency : wpmDataLayer.order.currency,\n\t\t\tvalue : wpmDataLayer.order.value_filtered,\n\t\t}\n\n\t\t// Get order item count\n\t\t// Go through each order item and sum up the quantity\n\t\tif (wpmDataLayer.order.items) {\n\t\t\tlet itemCount = 0\n\t\t\twpmDataLayer.order.items.forEach(item => {\n\t\t\t\titemCount += parseInt(item.quantity)\n\t\t\t})\n\n\t\t\tdata.itemCount = itemCount\n\t\t}\n\n\t\trdt(\"track\", \"Purchase\", data)\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n","/**\n * Copyright 2023 SweetCode. All rights reserved.\n *\n * Load Reddit functions\n * */\n\n(function (wpm, $, undefined) {\n\n\twpm.getRedditAdvertiserId = () => {\n\t\treturn wpmDataLayer.pixels.reddit.advertiser_id\n\t}\n\n\t// https://redditinc.force.com/helpcenter/s/article/Reddit-Pixel-Advanced-Matching\n\twpm.redditInitEvent = () => {\n\t\ttry {\n\t\t\tif (\n\t\t\t\t(\n\t\t\t\t\twpmDataLayer.general.userLoggedIn\n\t\t\t\t\t|| \"order_received_page\" === wpmDataLayer.shop.page_type\n\t\t\t\t)\n\t\t\t\t&& wpmDataLayer?.pixels?.reddit?.advanced_matching\n\t\t\t) {\n\t\t\t\tlet data = {\n\t\t\t\t\toptOut : false,\n\t\t\t\t\tuseDecimalCurrencyValues: true,\n\t\t\t\t}\n\n\t\t\t\tif (wpmDataLayer?.user?.email?.sha256) {\n\t\t\t\t\tdata.email = wpmDataLayer.user.email.sha256\n\t\t\t\t}\n\n\t\t\t\tif (wpmDataLayer?.user?.id?.sha256) {\n\t\t\t\t\tdata.externalId = wpmDataLayer.user.id.sha256\n\t\t\t\t}\n\n\t\t\t\trdt(\"init\", wpm.getRedditAdvertiserId(), data)\n\n\t\t\t} else {\n\t\t\t\trdt(\"init\", wpm.getRedditAdvertiserId())\n\t\t\t}\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\twpm.loadRedditPixel = function () {\n\n\t\ttry {\n\t\t\twpmDataLayer.pixels.reddit.loaded = true\n\n\t\t\t// @formatter:off\n\t\t\t!function(w,d){if(!w.rdt){var p=w.rdt=function(){p.sendEvent?p.sendEvent.apply(p,arguments):p.callQueue.push(arguments)};p.callQueue=[];var t=d.createElement(\"script\");t.src=\"https://www.redditstatic.com/ads/pixel.js\",t.async=!0;var s=d.getElementsByTagName(\"script\")[0];s.parentNode.insertBefore(t,s)}}(window,document);\n\n\t\t\twpm.redditInitEvent();\n\t\t\trdt('track', 'PageVisit');\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 * Reddit Ads loader\n */\n\n// #if process.env.TIER === 'premium'\nif (wpm.canLoadPremiumFeatures()) {\n\trequire(\"./functions_premium\")\n\trequire(\"./event_listeners_premium\")\n}\n// #endif\n\n","// TODO check all events and add more if there are any\n\n/**\n * Copyright 2023 SweetCode. All rights reserved.\n *\n * All event listeners\n * */\n\n// Pixel load event listener\njQuery(document).on(\"wpmLoadPixels\", () => {\n\n\tif (wpmDataLayer?.pixels?.snapchat?.pixel_id && !wpmDataLayer?.pixels?.snapchat?.loaded) {\n\t\tif (wpm.canIFire(\"ads\", \"snapchat-ads\")) wpm.loadSnapchatPixel()\n\t}\n})\n\n// AddToCart event\njQuery(document).on(\"wpmAddToCart\", (event, product) => {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.snapchat?.loaded) return\n\n\t\tsnaptr(\"track\", \"ADD_CART\", {\n\t\t\titem_ids: [product.dyn_r_ids[wpmDataLayer.pixels.snapchat.dynamic_remarketing.id_type]],\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// VIEW_CONTENT event\njQuery(document).on(\"wpmViewItem\", (event, product = null) => {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.snapchat?.loaded) return\n\n\t\tlet data = {}\n\n\t\tif (product) {\n\t\t\tdata.item_ids = [product.dyn_r_ids[wpmDataLayer.pixels.snapchat.dynamic_remarketing.id_type]]\n\t\t}\n\n\t\tsnaptr(\"track\", \"VIEW_CONTENT\", data)\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n\n// view order received page event\njQuery(document).on(\"wpmOrderReceivedPage\", () => {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.snapchat?.loaded) return\n\n\t\tsnaptr(\"track\", \"PURCHASE\", {\n\t\t\tcurrency : wpmDataLayer.order.currency,\n\t\t\tprice : wpmDataLayer.order.value_filtered,\n\t\t\ttransaction_id: wpmDataLayer.order.id,\n\t\t\titem_ids : wpm.getSnapchatOrderItemIds(),\n\t\t})\n\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n","/**\n * Copyright 2023 SweetCode. All rights reserved.\n *\n * Load Snapchat Ads functions\n * */\n\n(function (wpm, $, undefined) {\n\n\twpm.snapchatGetEmail = () => {\n\n\t\tlet userInfo = {}\n\n\t\tif (wpmDataLayer?.user?.email?.sha256) {\n\t\t\tuserInfo.user_hashed_email = wpmDataLayer.user.email.sha256\n\t\t}\n\n\t\treturn userInfo\n\t}\n\n\twpm.loadSnapchatPixel = () => {\n\n\t\ttry {\n\t\t\twpmDataLayer.pixels.snapchat.loaded = true;\n\n\t\t\t// @formatter:off\n\t\t\t(function(e,t,n){if(e.snaptr)return;var a=e.snaptr=function()\n\t\t\t{a.handleRequest?a.handleRequest.apply(a,arguments):a.queue.push(arguments)};\n\t\t\t\ta.queue=[];var s='script';r=t.createElement(s);r.async=!0;\n\t\t\t\tr.src=n;var u=t.getElementsByTagName(s)[0];\n\t\t\t\tu.parentNode.insertBefore(r,u);})(window,document,\n\t\t\t\t'https://sc-static.net/scevent.min.js');\n\n\t\t\tsnaptr(\"init\", wpmDataLayer.pixels.snapchat.pixel_id, wpm.snapchatGetEmail())\n\n\t\t\tsnaptr(\"track\", \"PAGE_VIEW\")\n\t\t\t// @formatter:on\n\n\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\twpm.getSnapchatOrderItemIds = () => {\n\t\tlet contentIds = []\n\n\t\tObject.values(wpmDataLayer.order.items).forEach(item => {\n\n\t\t\tif (wpmDataLayer?.general?.variationsOutput && 0 !== item.variation_id) {\n\t\t\t\tcontentIds.push(String(wpmDataLayer.products[item.variation_id].dyn_r_ids[wpmDataLayer.pixels.snapchat.dynamic_remarketing.id_type]))\n\t\t\t} else {\n\t\t\t\tcontentIds.push(String(wpmDataLayer.products[item.id].dyn_r_ids[wpmDataLayer.pixels.snapchat.dynamic_remarketing.id_type]))\n\t\t\t}\n\t\t})\n\n\t\treturn contentIds\n\t}\n\n}(window.wpm = window.wpm || {}, jQuery));\n","/**\n * Snapchat Ads loader\n */\n\n// #if process.env.TIER === 'premium'\nif (wpm.canLoadPremiumFeatures()) {\n\trequire(\"./functions_premium\")\n\trequire(\"./event_listeners_premium\")\n}\n// #endif\n\n","// https://ads.tiktok.com/help/article?aid=10028\n// Deduplication: https://ads.tiktok.com/marketing_api/docs?id=1723170195197953\n// TODO check all events and add more if there are any\n\n/**\n * Copyright 2023 SweetCode. All rights reserved.\n *\n * Load TikTok Ads event listeners\n * */\n\n// Pixel load event listener\njQuery(document).on(\"wpmLoadPixels\", () => {\n\n\tif (wpmDataLayer?.pixels?.tiktok?.pixel_id && !wpmDataLayer?.pixels?.tiktok?.loaded) {\n\t\tif (wpm.canIFire(\"ads\", \"tiktok-ads\")) wpm.loadTikTokPixel()\n\t}\n})\n\n// AddToCart event\njQuery(document).on(\"wpmClientSideAddToCart\", (event, payload) => {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.tiktok?.loaded) return\n\n\t\tttq.track(\n\t\t\tpayload.tiktok.event,\n\t\t\tpayload.tiktok.properties,\n\t\t\t{event_id: payload.tiktok.event_id},\n\t\t)\n\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// InitiateCheckout event\njQuery(document).on(\"wpmClientSideBeginCheckout\", (event, payload) => {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.tiktok?.loaded) return\n\n\t\tttq.track(\n\t\t\tpayload.tiktok.event,\n\t\t\t{},\n\t\t\t{event_id: payload.tiktok.event_id},\n\t\t)\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// ViewContent event\njQuery(document).on(\"wpmClientSideViewItem\", (event, payload) => {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.tiktok?.loaded) return\n\n\t\tttq.track(\n\t\t\tpayload.tiktok.event,\n\t\t\tpayload.tiktok.properties,\n\t\t\t{event_id: payload.tiktok.event_id},\n\t\t)\n\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// AddToWishlist event\njQuery(document).on(\"wpmClientSideAddToWishlist\", (event, payload) => {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.tiktok?.loaded) return\n\n\t\tttq.track(\n\t\t\tpayload.tiktok.event,\n\t\t\tpayload.tiktok.properties,\n\t\t\t{event_id: payload.tiktok.event_id},\n\t\t)\n\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// search event\njQuery(document).on(\"wpmClientSideSearch\", (event, payload) => {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.tiktok?.loaded) return\n\n\t\tttq.track(\n\t\t\tpayload.tiktok.event,\n\t\t\tpayload.tiktok.properties,\n\t\t\t{event_id: payload.tiktok.event_id},\n\t\t)\n\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n\n})\n\n// PlaceAnOrder event\njQuery(document).on(\"wpmClientPlaceOrder\", (event, payload) => {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.tiktok?.loaded) return\n\n\t\tttq.track(\n\t\t\tpayload.tiktok.event,\n\t\t\t{},\n\t\t\t{event_id: payload.tiktok.event_id},\n\t\t)\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n\n})\n\n// view order received page event\njQuery(document).on(\"wpmClientSideOrderReceivedPage\", (event, payload) => {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.tiktok?.loaded) return\n\n\t\tttq.track(\n\t\t\tpayload.tiktok.event,\n\t\t\tpayload.tiktok.properties,\n\t\t\t{event_id: payload.tiktok.event_id},\n\t\t)\n\t\t\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n","/**\n * Copyright 2023 SweetCode. All rights reserved.\n *\n * Load TikTok Ads functions\n * */\n\n(function (wpm, $, undefined) {\n\n\twpm.loadTikTokPixel = () => {\n\n\t\ttry {\n\t\t\twpmDataLayer.pixels.tiktok.loaded = true\n\n\t\t\t// @formatter:off\n\t\t\t!function (w, d, t) {\n\t\t\t\tw.TiktokAnalyticsObject=t;var ttq=w[t]=w[t]||[];ttq.methods=[\"page\",\"track\",\"identify\",\"instances\",\"debug\",\"on\",\"off\",\"once\",\"ready\",\"alias\",\"group\",\"enableCookie\",\"disableCookie\"],ttq.setAndDefer=function(t,e){t[e]=function(){t.push([e].concat(Array.prototype.slice.call(arguments,0)))}};for(var i=0;i {\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\tcontent_type: \"product\",\n\t\t\t\tquantity : item.quantity,\n\t\t\t\tprice : item.price,\n\t\t\t}\n\n\t\t\tif (wpmDataLayer?.general?.variationsOutput && 0 !== item.variation_id) {\n\n\t\t\t\torderItem.content_id = String(wpmDataLayer.products[item.variation_id].dyn_r_ids[wpmDataLayer.pixels.tiktok.dynamic_remarketing.id_type])\n\t\t\t\torderItem.content_name = wpmDataLayer.products[item.variation_id].name\n\t\t\t\torderItems.push(orderItem)\n\t\t\t} else {\n\n\t\t\t\torderItem.content_id = String(wpmDataLayer.products[item.id].dyn_r_ids[wpmDataLayer.pixels.tiktok.dynamic_remarketing.id_type])\n\t\t\t\torderItem.content_name = wpmDataLayer.products[item.id].name\n\t\t\t\torderItems.push(orderItem)\n\t\t\t}\n\t\t})\n\n\t\treturn orderItems\n\t}\n\n\twpm.getTikTokUserDataFromBrowser = () => {\n\n\t\tlet\n\t\t\tdata = {\n\t\t\t\tuser: {},\n\t\t\t\tpage: {},\n\n\t\t\t}\n\n\t\tif (wpm.getCookie(\"_ttp\") && wpm.isValidTtp(wpm.getCookie(\"_ttp\"))) {\n\t\t\tdata.user.ttp = wpm.getCookie(\"_ttp\")\n\t\t}\n\n\t\tif (wpm.getCookie(\"_ttclid\") && wpm.isValidTtclid(wpm.getCookie(\"_ttclid\"))) {\n\t\t\tdata.ad = {\n\t\t\t\t\"callback\": wpm.getCookie(\"_ttclid\"),\n\t\t\t}\n\t\t}\n\n\t\tif (window.location.href) {\n\n\t\t\t// Remove the parameters from the URL and save it to data.page.url\n\t\t\tdata.page.url = window.location.href.split(\"?\")[0]\n\t\t}\n\n\t\tif (wpm.getCookie(\"wpmReferrer\")) {\n\t\t\tdata.page.referrer = wpm.getCookie(\"wpmReferrer\")\n\n\t\t\t// If http is missing, add it\n\t\t\tif (!data.page.referrer.startsWith(\"http\")) data.page.referrer = \"https://\" + data.page.referrer\n\t\t}\n\n\t\tif (wpmDataLayer?.pixels?.tiktok?.advanced_matching) {\n\t\t\tif (wpmDataLayer?.user?.id?.sha256) data.user.external_id = wpmDataLayer.user.id.sha256\n\t\t\tif (wpmDataLayer?.user?.email?.sha256) data.user.sha256_email = wpmDataLayer.user.email.sha256\n\t\t\tif (wpmDataLayer?.user?.phone?.sha256?.e164) data.user.sha256_phone_number = wpmDataLayer.user.phone.sha256.e164\n\t\t\tif (navigator.userAgent) data.user_agent = navigator.userAgent\n\t\t}\n\n\t\t// If data.user is empty, remove it\n\t\tif (Object.keys(data.user).length === 0) delete data.user\n\n\t\treturn data\n\t}\n\n\twpm.isValidTtp = ttp => {\n\n\t\tlet re = new RegExp(/^[\\da-zA-Z-]{20,50}$/)\n\n\t\treturn re.test(ttp)\n\t}\n\n\twpm.isValidTtclid = ttclid => {\n\n\t\tlet re = new RegExp(/^[\\da-zA-z-]{5,600}$/)\n\n\t\treturn re.test(ttclid)\n\t}\n\n}(window.wpm = window.wpm || {}, jQuery));\n","/**\n * TikTok Ads loader\n */\n\n// #if process.env.TIER === 'premium'\nif (wpm.canLoadPremiumFeatures()) {\n\trequire(\"./functions_premium\")\n\trequire(\"./event_listeners_premium\")\n}\n// #endif\n\n","// TODO implement AddPaymentInfo event\n// TODO check if more values can be passed to product and cart pages\n\n// https://business.twitter.com/en/help/campaign-measurement-and-analytics/conversion-tracking-for-websites.html\n\n/**\n * Copyright 2023 SweetCode. All rights reserved.\n *\n * Load Twitter Ads event listeners\n * */\n\n// Pixel load event listener\njQuery(document).on(\"wpmLoadPixels\", () => {\n\n\tif (wpmDataLayer?.pixels?.twitter?.pixel_id && !wpmDataLayer?.pixels?.twitter?.loaded) {\n\t\tif (wpm.canIFire(\"ads\", \"twitter-ads\")) wpm.loadTwitterPixel()\n\t}\n})\n\n// add-to-cart event\njQuery(document).on(\"wpmAddToCart\", (event, product) => {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.twitter?.loaded) return\n\n\t\tif (wpmDataLayer?.pixels?.twitter?.event_ids?.add_to_cart) {\n\t\t\ttwq(\"event\", wpmDataLayer.pixels.twitter.event_ids.add_to_cart, {\n\t\t\t\tvalue : product.quantity * product.price,\n\t\t\t\tcurrency: wpmDataLayer.shop.currency,\n\t\t\t\tcontents: [{\n\t\t\t\t\tcontent_type : \"product\",\n\t\t\t\t\tcontent_id : wpmDataLayer.products[product.id].dyn_r_ids[wpmDataLayer.pixels.twitter.dynamic_remarketing.id_type],\n\t\t\t\t\tcontent_name : product.name,\n\t\t\t\t\tcontent_price: product.price,\n\t\t\t\t\tnum_items : product.quantity,\n\t\t\t\t\t// content_group_id: null,\n\t\t\t\t}],\n\t\t\t})\n\t\t} else {\n\t\t\t// Legacy event\n\t\t\ttwq(\"track\", \"AddToCart\")\n\t\t}\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// view product event\njQuery(document).on(\"wpmViewItem\", (event, product = null) => {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.twitter?.loaded) return\n\n\t\tlet productData = {}\n\n\t\tif (product) {\n\t\t\tproductData = {\n\t\t\t\tvalue : product.quantity * product.price,\n\t\t\t\tcurrency: wpmDataLayer.shop.currency,\n\t\t\t\tcontents: [{\n\t\t\t\t\tcontent_type : \"product\",\n\t\t\t\t\tcontent_id : wpmDataLayer.products[product.id].dyn_r_ids[wpmDataLayer.pixels.twitter.dynamic_remarketing.id_type],\n\t\t\t\t\tcontent_name : product.name,\n\t\t\t\t\tcontent_price: product.price,\n\t\t\t\t\tnum_items : product.quantity,\n\t\t\t\t\t// content_group_id: null,\n\t\t\t\t}],\n\t\t\t}\n\t\t}\n\n\t\tif (wpmDataLayer?.pixels?.twitter?.event_ids?.view_content) {\n\t\t\ttwq(\"event\", wpmDataLayer.pixels.twitter.event_ids.view_content, productData)\n\t\t} else {\n\t\t\t// Legacy event\n\t\t\ttwq(\"track\", \"ViewContent\")\n\t\t}\n\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// // view category event\n// jQuery(document).on('wpmCategory', function () {\n//\n// \tif (!wpmDataLayer?.pixels?.twitter?.loaded) return;\n//\n// \t// twq('track', 'AddToWishlist');\n// });\n\n// add-to-wishlist event\njQuery(document).on(\"wpmAddToWishlist\", (event, product) => {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.twitter?.loaded) return\n\n\t\tlet productData = {}\n\n\t\tif (product) {\n\t\t\tproductData = {\n\t\t\t\tvalue : product.quantity * product.price,\n\t\t\t\tcurrency: wpmDataLayer.shop.currency,\n\t\t\t\tcontents: [{\n\t\t\t\t\tcontent_type : \"product\",\n\t\t\t\t\tcontent_id : wpmDataLayer.products[product.id].dyn_r_ids[wpmDataLayer.pixels.twitter.dynamic_remarketing.id_type],\n\t\t\t\t\tcontent_name : product.name,\n\t\t\t\t\tcontent_price: product.price,\n\t\t\t\t\tnum_items : product.quantity,\n\t\t\t\t\t// content_group_id: null,\n\t\t\t\t}],\n\t\t\t}\n\t\t}\n\n\t\tif (wpmDataLayer?.pixels?.twitter?.event_ids?.add_to_wishlist) {\n\t\t\ttwq(\"event\", wpmDataLayer.pixels.twitter.event_ids.add_to_wishlist, productData)\n\t\t} else {\n\t\t\t// Legacy event\n\t\t\ttwq(\"track\", \"AddToWishlist\")\n\t\t}\n\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// start checkout event\njQuery(document).on(\"wpmBeginCheckout\", () => {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.twitter?.loaded) return\n\n\t\tif (wpmDataLayer?.pixels?.twitter?.event_ids?.initiate_checkout) {\n\t\t\ttwq(\"event\", wpmDataLayer.pixels.twitter.event_ids.initiate_checkout, {})\n\t\t} else {\n\t\t\t// Legacy event\n\t\t\ttwq(\"track\", \"InitiateCheckout\")\n\t\t}\n\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// View search event\njQuery(document).on(\"pmwEvent:Search\", () => {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.twitter?.loaded) return\n\n\t\tif (wpmDataLayer?.pixels?.twitter?.event_ids?.search) {\n\t\t\ttwq(\"event\", wpmDataLayer.pixels.twitter.event_ids.search, {\n\t\t\t\tsearch_string: wpm.getSearchTermFromUrl(),\n\t\t\t})\n\t\t} else {\n\t\t\t// Legacy event\n\t\t\ttwq(\"track\", \"Search\")\n\t\t}\n\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n\n// view order received page event\n// TODO find out under which circumstances to use different values in content_type\njQuery(document).on(\"wpmOrderReceivedPage\", () => {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.twitter?.loaded) return\n\n\n\t\tif (wpmDataLayer?.pixels?.twitter?.event_ids?.purchase) {\n\t\t\ttwq(\"event\", wpmDataLayer.pixels.twitter.event_ids.purchase, {\n\t\t\t\tvalue : wpmDataLayer.order.value_filtered,\n\t\t\t\tcurrency: wpmDataLayer.order.currency,\n\t\t\t\tconversion_id: wpmDataLayer.order.id,\n\t\t\t\tcontents: wpm.twitterGetOrderContentIdsV2(),\n\t\t\t})\n\t\t} else {\n\t\t\t// Legacy event\n\t\t\ttwq(\"track\", \"Purchase\", {\n\t\t\t\torder_id: wpmDataLayer.order.id,\n\t\t\t\t// content_type: 'product',\n\t\t\t\tvalue : wpmDataLayer.order.value_filtered,\n\t\t\t\tcurrency : wpmDataLayer.order.currency,\n\t\t\t\tnum_items : wpmDataLayer.order.quantity,\n\t\t\t\tcontent_ids: wpm.twitterGetOrderContentIdsV1(),\n\t\t\t})\n\t\t}\n\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n","/**\n * Copyright 2023 SweetCode. All rights reserved.\n *\n * Load Twitter Ads functions\n * */\n\n(function (wpm, $, undefined) {\n\n\twpm.loadTwitterPixel = () => {\n\n\t\ttry {\n\t\t\twpmDataLayer.pixels.twitter.loaded = true\n\n\t\t\t// @formatter:off\n\t\t\t!function(e,t,n,s,u,a){e.twq||(s=e.twq=function(){s.exe?s.exe.apply(s,arguments):s.queue.push(arguments);\n\t\t\t},s.version='1.1',s.queue=[],u=t.createElement(n),u.async=!0,u.src='https://static.ads-twitter.com/uwt.js',\n\t\t\t\ta=t.getElementsByTagName(n)[0],a.parentNode.insertBefore(u,a))}(window,document,'script');\n\n\t\t\ttwq('config',wpmDataLayer.pixels.twitter.pixel_id);\n\t\t\t// @formatter:on\n\n\t\t\t// twq(\"track\", \"PageView\")\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\twpm.twitterGetOrderContentIdsV1 = () => {\n\t\tlet contentIds = []\n\n\t\tObject.values(wpmDataLayer.order.items).forEach(item => {\n\n\t\t\tif (wpmDataLayer?.general?.variationsOutput && 0 !== item.variation_id) {\n\t\t\t\tcontentIds.push(String(wpmDataLayer.products[item.variation_id].dyn_r_ids[wpmDataLayer.pixels.twitter.dynamic_remarketing.id_type]))\n\t\t\t} else {\n\t\t\t\tcontentIds.push(String(wpmDataLayer.products[item.id].dyn_r_ids[wpmDataLayer.pixels.twitter.dynamic_remarketing.id_type]))\n\t\t\t}\n\t\t})\n\n\t\treturn contentIds\n\t}\n\n\twpm.twitterGetOrderContentIdsV2 = () => {\n\n\t\tlet orderItems = []\n\n\t\tObject.values(wpmDataLayer.order.items).forEach(item => {\n\n\t\t\tlet orderItem = {\n\t\t\t\tcontent_type : \"product\",\n\t\t\t\tcontent_name : item.name,\n\t\t\t\tcontent_price: item.price,\n\t\t\t\tnum_items : item.quantity,\n\t\t\t\t// content_group_id: null,\n\t\t\t}\n\n\t\t\tif (wpmDataLayer?.general?.variationsOutput && 0 !== item.variation_id) {\n\t\t\t\torderItem.content_id = wpmDataLayer.products[item.variation_id].dyn_r_ids[wpmDataLayer.pixels.twitter.dynamic_remarketing.id_type]\n\t\t\t} else {\n\t\t\t\torderItem.content_id = wpmDataLayer.products[item.id].dyn_r_ids[wpmDataLayer.pixels.twitter.dynamic_remarketing.id_type]\n\t\t\t}\n\n\n\t\t\torderItems.push(orderItem)\n\t\t})\n\n\t\treturn orderItems\n\t}\n\n}(window.wpm = window.wpm || {}, jQuery));\n","/**\n * Twitter Ads loader\n */\n\n// #if process.env.TIER === 'premium'\nif (wpm.canLoadPremiumFeatures()) {\n\trequire(\"./functions_premium\")\n\trequire(\"./event_listeners_premium\")\n}\n// #endif\n\n","/**\n * Consent Mode functions\n */\n\n(function (wpm, $, undefined) {\n\n\t/**\n\t * Handle Cookie Management Platforms\n\t */\n\n\tconst getComplianzCookies = () => {\n\n\t\tlet cmplz_statistics = wpm.getCookie(\"cmplz_statistics\")\n\t\tlet cmplz_marketing = wpm.getCookie(\"cmplz_marketing\")\n\t\tlet cmplz_consent_status = wpm.getCookie(\"cmplz_consent_status\") || wpm.getCookie(\"cmplz_banner-status\")\n\n\t\tif (cmplz_consent_status) {\n\t\t\treturn {\n\t\t\t\tanalytics : cmplz_statistics === \"allow\",\n\t\t\t\tads : cmplz_marketing === \"allow\",\n\t\t\t\tvisitorHasChosen: true,\n\t\t\t}\n\t\t}\n\n\t\treturn false\n\t}\n\n\tconst getCookieLawInfoCookies = () => {\n\n\t\tlet analyticsCookie = wpm.getCookie(\"cookielawinfo-checkbox-analytics\") || wpm.getCookie(\"cookielawinfo-checkbox-analytiques\")\n\t\tlet adsCookie = wpm.getCookie(\"cookielawinfo-checkbox-advertisement\") || wpm.getCookie(\"cookielawinfo-checkbox-performance\") || wpm.getCookie(\"cookielawinfo-checkbox-publicite\")\n\t\tlet visitorHasChosen = wpm.getCookie(\"CookieLawInfoConsent\")\n\n\t\tif (analyticsCookie || adsCookie) {\n\n\t\t\treturn {\n\t\t\t\tanalytics : analyticsCookie === \"yes\",\n\t\t\t\tads : adsCookie === \"yes\",\n\t\t\t\tvisitorHasChosen: !!visitorHasChosen,\n\t\t\t}\n\t\t}\n\n\t\treturn false\n\t}\n\n\tconst getTermlyCookies = () => {\n\n\t\t// Get Termly cookies from localStorage from termly_gtm_template_default_consents for ad_storage and for analytics_storage\n\t\tlet termlyConsent = localStorage.getItem(\"termly_gtm_template_default_consents\")\n\n\t\tif (termlyConsent) {\n\t\t\ttermlyConsent = JSON.parse(termlyConsent)\n\n\t\t\treturn {\n\t\t\t\tanalytics : termlyConsent.analytics_storage === \"granted\",\n\t\t\t\tads : termlyConsent.ad_storage === \"granted\",\n\t\t\t\tvisitorHasChosen: true,\n\t\t\t}\n\t\t}\n\n\t\treturn false\n\t}\n\n\n\t/**\n\t * Initialize and set default values\n\t */\n\n\tlet\n\t\twpmConsentValues = {}\n\twpmConsentValues.categories = {}\n\twpmConsentValues.pixels = []\n\twpmConsentValues.mode = \"category\"\n\twpmConsentValues.visitorHasChosen = false\n\n\t// Return current consent values\n\twpm.getConsentValues = () => wpmConsentValues\n\n\twpm.setConsentValueCategories = (analytics = false, ads = false) => {\n\t\twpmConsentValues.categories.analytics = analytics\n\t\twpmConsentValues.categories.ads = ads\n\t}\n\n\t// Update the PMW consent values with values coming from a CMP\n\twpm.updateConsentCookieValues = (analytics = null, ads = null, explicitConsent = false) => {\n\n\t\t// ad_storage\n\t\t// analytics_storage\n\t\t// functionality_storage\n\t\t// personalization_storage\n\t\t// security_storage\n\n\t\tlet cookie\n\n\t\t/**\n\t\t * Setup defaults\n\t\t */\n\n\t\t// consentValues.categories.analytics = true\n\t\t// consentValues.categories.ads = true\n\n\t\twpmConsentValues.categories.analytics = !explicitConsent\n\t\twpmConsentValues.categories.ads = !explicitConsent\n\n\n\t\tif (analytics || ads) {\n\n\t\t\tif (analytics) {\n\t\t\t\twpmConsentValues.categories.analytics = !!analytics\n\t\t\t}\n\n\t\t\tif (ads) {\n\t\t\t\twpmConsentValues.categories.ads = !!ads\n\t\t\t}\n\n\t\t\treturn\n\t\t}\n\n\t\t/**\n\t\t * PMW Cookie Consent\n\t\t *\n\t\t * Must be before every other CMP for the case that one of the included CMPs\n\t\t * decides to implement the PMW cookie consent API. In that case\n\t\t * the PMW consent cookie must take precedence.\n\t\t */\n\n\t\tif (cookie = wpm.getCookie(\"pmw_cookie_consent\")) {\n\n\t\t\tcookie = JSON.parse(cookie)\n\n\t\t\twpmConsentValues.categories.analytics = cookie.analytics === true\n\t\t\twpmConsentValues.categories.ads = cookie.ads === true\n\t\t\twpmConsentValues.visitorHasChosen = true\n\n\t\t\treturn\n\t\t}\n\n\t\t/**\n\t\t * Cookiebot\n\t\t * https://wordpress.org/plugins/cookiebot/\n\t\t */\n\n\t\tif (cookie = wpm.getCookie(\"CookieConsent\")) {\n\n\t\t\tcookie = decodeURI(cookie)\n\n\t\t\twpmConsentValues.categories.analytics = cookie.indexOf(\"statistics:true\") >= 0\n\t\t\twpmConsentValues.categories.ads = cookie.indexOf(\"marketing:true\") >= 0\n\t\t\twpmConsentValues.visitorHasChosen = true\n\n\t\t\treturn\n\t\t}\n\n\t\t/**\n\t\t * Cookie Script\n\t\t * https://wordpress.org/plugins/cookie-script-com/\n\t\t */\n\n\t\tif (cookie = wpm.getCookie(\"CookieScriptConsent\")) {\n\n\t\t\tcookie = JSON.parse(cookie)\n\n\t\t\tif (cookie.action === \"reject\") {\n\t\t\t\twpmConsentValues.categories.analytics = false\n\t\t\t\twpmConsentValues.categories.ads = false\n\t\t\t} else if (cookie.categories.length === 2) {\n\t\t\t\twpmConsentValues.categories.analytics = true\n\t\t\t\twpmConsentValues.categories.ads = true\n\t\t\t} else {\n\t\t\t\twpmConsentValues.categories.analytics = cookie.categories.indexOf(\"performance\") >= 0\n\t\t\t\twpmConsentValues.categories.ads = cookie.categories.indexOf(\"targeting\") >= 0\n\t\t\t}\n\n\t\t\twpmConsentValues.visitorHasChosen = true\n\n\t\t\treturn\n\t\t}\n\n\t\t/**\n\t\t * Borlabs Cookie\n\t\t * https://borlabs.io/borlabs-cookie/\n\t\t */\n\t\tif (cookie = wpm.getCookie(\"borlabs-cookie\")) {\n\n\t\t\tcookie = decodeURI(cookie)\n\t\t\tcookie = JSON.parse(cookie)\n\n\t\t\twpmConsentValues.categories.analytics = !!cookie?.consents?.statistics\n\t\t\twpmConsentValues.categories.ads = !!cookie?.consents?.marketing\n\t\t\twpmConsentValues.visitorHasChosen = true\n\t\t\twpmConsentValues.pixels = [...cookie?.consents?.statistics || [], ...cookie?.consents?.marketing || []]\n\t\t\twpmConsentValues.mode = \"pixel\"\n\n\t\t\treturn\n\t\t}\n\n\t\t/**\n\t\t * Complianz Cookie\n\t\t * https://wordpress.org/plugins/complianz-gdpr/\n\t\t */\n\n\t\tif (cookie = getComplianzCookies()) {\n\n\t\t\twpmConsentValues.categories.analytics = cookie.analytics === true\n\t\t\twpmConsentValues.categories.ads = cookie.ads === true\n\t\t\twpmConsentValues.visitorHasChosen = cookie.visitorHasChosen\n\n\t\t\treturn\n\t\t}\n\n\t\t/**\n\t\t * Cookie Compliance (free version)\n\t\t * https://wordpress.org/plugins/cookie-notice/\n\t\t */\n\n\t\tif (cookie = wpm.getCookie(\"cookie_notice_accepted\")) {\n\n\t\t\twpmConsentValues.categories.analytics = true\n\t\t\twpmConsentValues.categories.ads = true\n\t\t\twpmConsentValues.visitorHasChosen = true\n\n\t\t\treturn\n\t\t}\n\n\t\t/**\n\t\t * Cookie Compliance (pro version)\n\t\t * https://wordpress.org/plugins/cookie-notice/\n\t\t */\n\n\t\tif (cookie = wpm.getCookie(\"hu-consent\")) {\n\n\t\t\tcookie = JSON.parse(cookie)\n\n\t\t\twpmConsentValues.categories.analytics = !!cookie.categories[\"3\"]\n\t\t\twpmConsentValues.categories.ads = !!cookie.categories[\"4\"]\n\t\t\twpmConsentValues.visitorHasChosen = true\n\n\t\t\treturn\n\t\t}\n\n\t\t/**\n\t\t * CookieYes, GDPR Cookie Consent (Cookie Law Info)\n\t\t * https://wordpress.org/plugins/cookie-law-info/\n\t\t */\n\n\t\tif (cookie = getCookieLawInfoCookies()) {\n\n\t\t\twpmConsentValues.categories.analytics = cookie.analytics === true\n\t\t\twpmConsentValues.categories.ads = cookie.ads === true\n\t\t\twpmConsentValues.visitorHasChosen = cookie.visitorHasChosen === true\n\n\t\t\treturn\n\t\t}\n\n\t\t/**\n\t\t * GDPR Cookie Compliance Plugin by Moove Agency\n\t\t * https://wordpress.org/plugins/gdpr-cookie-compliance/\n\t\t *\n\t\t * TODO write documentation on how to set up the plugin in order for this to work properly\n\t\t */\n\n\t\tif (cookie = wpm.getCookie(\"moove_gdpr_popup\")) {\n\n\t\t\tcookie = JSON.parse(cookie)\n\n\t\t\twpmConsentValues.categories.analytics = cookie.thirdparty === \"1\"\n\t\t\twpmConsentValues.categories.ads = cookie.advanced === \"1\"\n\t\t\twpmConsentValues.visitorHasChosen = true\n\n\t\t\treturn\n\t\t}\n\n\t\t/**\n\t\t * WP AutoTerms\n\t\t * https://wordpress.org/plugins/auto-terms-of-service-and-privacy-policy/\n\t\t */\n\n\t\tif (cookie = wpm.getCookie(\"wpautoterms-cookies-notice\")) {\n\n\t\t\tif (cookie !== \"1\") return\n\n\t\t\twpmConsentValues.categories.analytics = true\n\t\t\twpmConsentValues.categories.ads = true\n\t\t\twpmConsentValues.visitorHasChosen = true\n\n\t\t\treturn\n\t\t}\n\n\t\t/**\n\t\t * Usercentrics\n\t\t *\n\t\t * https://usercentrics.com/\n\t\t * https://docs.usercentrics.com/#/cmp-v2-ui-api\n\t\t * https://docs.usercentrics.com/#/cmp-v2-ui-api?id=getservicesbaseinfo\n\t\t */\n\n\t\tif (window.localStorage && window.localStorage.getItem(\"uc_settings\")) {\n\n\t\t\tconsole.log(\"Usercentrics settings detected\")\n\n\t\t\tif (typeof UC_UI === \"undefined\") {\n\n\t\t\t\t// register event to block unblock after UC_UI library is loaded\n\t\t\t\twindow.addEventListener(\"UC_UI_INITIALIZED\", (event) => {\n\t\t\t\t\twpm.ucUiProcessConsent()\n\t\t\t\t})\n\n\t\t\t\t// Don't continue because in here the UC_UI library is not loaded yet\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tif (UC_UI.areAllConsentsAccepted()) {\n\t\t\t\twpmConsentValues.categories.analytics = true\n\t\t\t\twpmConsentValues.categories.ads = true\n\t\t\t\twpmConsentValues.visitorHasChosen = true\n\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\twpm.ucUiProcessConsent()\n\t\t}\n\n\t\t/**\n\t\t * OneTrust\n\t\t *\n\t\t * https://www.onetrust.com/\n\t\t */\n\n\t\tif (cookie = wpm.getCookie(\"OptanonConsent\")) {\n\n\t\t\t// console.log(\"OneTrust settings detected\")\n\n\t\t\tlet params = new URLSearchParams(cookie)\n\t\t\tlet groups = params.get(\"groups\").split(\",\")\n\n\t\t\t// Groups is an array like this ['1:1', '2:0', '3:1', '4:1']. Make it an object with key value pairs\n\t\t\tlet groupsObject = {}\n\t\t\tgroups.forEach((group) => {\n\n\t\t\t\tlet groupArray = group.split(\":\")\n\t\t\t\tgroupsObject[groupArray[0]] = groupArray[1]\n\t\t\t})\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\twpmConsentValues.categories.analytics = groupsObject[\"2\"] === \"1\"\n\t\t\twpmConsentValues.categories.ads = groupsObject[\"4\"] === \"1\"\n\t\t\twpmConsentValues.visitorHasChosen = true\n\n\t\t\treturn\n\t\t}\n\n\t\t/**\n\t\t * Termly\n\t\t *\n\t\t * https://www.termly.io/\n\t\t */\n\n\t\tif (cookie = getTermlyCookies()) {\n\t\t\twpmConsentValues.categories.analytics = cookie.analytics === true\n\t\t\twpmConsentValues.categories.ads = cookie.ads === true\n\t\t\twpmConsentValues.visitorHasChosen = cookie.visitorHasChosen === true\n\t\t\treturn\n\t\t}\n\n\t\t/**\n\t\t * Real Cookie Banner\n\t\t *\n\t\t * https://devowl.io/wordpress-real-cookie-banner/\n\t\t */\n\t\tif (wpm.doesACookieForTheRealCookieBannerExist()) {\n\n\t\t\t// console.log(\"Real Cookie Banner settings detected\")\n\n\t\t\twpmConsentValues.mode = \"pixel\"\n\t\t\twpmConsentValues.visitorHasChosen = true\n\n\t\t\twpm.waitForLibrary(\"consentApi\")\n\n\t\t\t// console.log(\"Real Cookie Banner consentApi loaded\")\n\n\t\t\tif (!window.consentApi) {\n\t\t\t\tconsole.error(\"Pixel Manager for WooCommerce: window.consentApi is not available\")\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tconst settings = [\n\t\t\t\t{\n\t\t\t\t\t\"service\": \"google-analytics\",\n\t\t\t\t\t\"type\" : \"statistics\",\n\t\t\t\t\t\"cookies\": [\"_ga\", \"_gid\", \"_gat\", \"_gat_gtag_UA_*\"],\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"service\": \"google-optimize\",\n\t\t\t\t\t\"type\" : \"statistics\",\n\t\t\t\t\t\"cookies\": [\"_ga\", \"_gid\", \"_gat\", \"_gat_gtag_UA_*\"],\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"service\": \"google-ads\",\n\t\t\t\t\t\"type\" : \"marketing\",\n\t\t\t\t\t\"cookies\": [\"_gcl_au\", \"_gcl_aw\", \"_gcl_dc\", \"_gac_*\"],\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"service\": \"facebook-ads\",\n\t\t\t\t\t\"type\" : \"marketing\",\n\t\t\t\t\t\"cookies\": [\"_fbp\"],\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"service\": \"hotjar\",\n\t\t\t\t\t\"type\" : \"statistics\",\n\t\t\t\t\t\"cookies\": [\"_hj*\", \"_hjid\"],\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"service\": \"microsoft-ads\",\n\t\t\t\t\t\"type\" : \"marketing\",\n\t\t\t\t\t\"cookies\": [\"_uetsid\", \"_uetvid\"],\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"service\": \"bing-ads\",\n\t\t\t\t\t\"type\" : \"marketing\",\n\t\t\t\t\t\"cookies\": [\"_uetsid\", \"_uetvid\"],\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"service\": \"pinterest-ads\",\n\t\t\t\t\t\"type\" : \"marketing\",\n\t\t\t\t\t\"cookies\": [\"_pinterest_ct_ua\", \"_pinterest_ct_rt\", \"_pin_unauth\", \"_derived_epik\", \"_pinterest_sess\"],\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"service\": \"snapchat-ads\",\n\t\t\t\t\t\"type\" : \"marketing\",\n\t\t\t\t\t\"cookies\": [\"sc_at\", \"sc_anonymous_id\", \"sc_id\", \"_scid\", \"_scid_r\"],\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"service\": \"tiktok-ads\",\n\t\t\t\t\t\"type\" : \"marketing\",\n\t\t\t\t\t\"cookies\": [\"_ttp\", \"_ttclid\", \"ttwid\"],\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"service\": \"twitter-ads\",\n\t\t\t\t\t\"type\" : \"marketing\",\n\t\t\t\t\t\"cookies\": [\"twitter_ads_id\", \"twid\", \"_twclid\", \"muc_ads\"],\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"service\": \"reddit-ads\",\n\t\t\t\t\t\"type\" : \"marketing\",\n\t\t\t\t\t\"cookies\": [\"_rdt_uuid\"],\n\t\t\t\t},\n\t\t\t]\n\n\n\t\t\t// For each service in settings\n\t\t\t// and each cookie in service.cookies\n\t\t\t// check if consentApi.consentSync(\"http\", cookie, \"*\") returns an object that contains a not empty object called \"cookie\"\n\t\t\t// If one of the cookies returns true, then push service.service to wpmConsentValues.pixels\n\t\t\tsettings.forEach((service) => {\n\n\t\t\t\tservice.cookies.forEach((cookie) => {\n\n\t\t\t\t\tlet consent = window.consentApi.consentSync(\"http\", cookie, \"*\")\n\n\t\t\t\t\tif (consent?.cookie && consent?.cookieOptIn) {\n\n\t\t\t\t\t\twpmConsentValues.pixels.push(service.service)\n\n\t\t\t\t\t\tif (service.type === \"statistics\") {\n\t\t\t\t\t\t\twpmConsentValues.categories.analytics = true\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (service.type === \"marketing\") {\n\t\t\t\t\t\t\twpmConsentValues.categories.ads = true\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// continue with the next service\n\t\t\t\t\t\treturn\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t})\n\n\t\t\treturn\n\t\t}\n\t}\n\n\twpm.doesACookieForTheRealCookieBannerExist = () => {\n\n\t\t// Find a cookie that has a prefix of real_cookie_banner\n\t\t// If one is found, then return true\n\t\t// If none is found, then return false\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 (cookie.startsWith(\"real_cookie_banner\")) {\n\t\t\t\treturn true\n\t\t\t}\n\t\t}\n\n\t\treturn false\n\t}\n\n\t// Only run after having made sure that the UC_UI library is loaded\n\twpm.ucUiProcessConsent = () => {\n\n\t\tif (typeof UC_UI === \"undefined\") return\n\n\t\tif (UC_UI.areAllConsentsAccepted()) {\n\t\t\tpmw.consentAcceptAll()\n\t\t}\n\n\t\tconst ucStatisticsSlug = UC_UI.getSettingsLabels().categories.filter(data => data.label === \"Statistics\")[0].slug\n\n\t\tpmw.consentAdjustSelectively(\n\t\t\t{\n\t\t\t\tanalytics: !UC_UI.getServicesBaseInfo().filter(data => data.categorySlug === ucStatisticsSlug && data.consent.status === false).length > 0,\n\t\t\t\tads : !UC_UI.getServicesBaseInfo().filter(data => data.categorySlug === \"marketing\" && data.consent.status === false).length > 0,\n\t\t\t},\n\t\t)\n\t}\n\n\twpm.updateConsentCookieValues()\n\n\twpm.setConsentDefaultValuesToExplicit = () => {\n\t\twpmConsentValues.categories = {\n\t\t\tanalytics: false,\n\t\t\tads : false,\n\t\t}\n\t}\n\n\twpm.canIFire = (category, pixelName) => {\n\n\t\tlet canIFireMode\n\n\t\tif (\"category\" === wpmConsentValues.mode) {\n\t\t\tcanIFireMode = !!wpmConsentValues.categories[category]\n\t\t} else if (\"pixel\" === wpmConsentValues.mode) {\n\t\t\tcanIFireMode = wpmConsentValues.pixels.includes(pixelName)\n\n\t\t\t// If a user sets \"bing-ads\" in Borlabs Cookie instead of\n\t\t\t// \"microsoft-ads\" in the Borlabs settings, we need to check\n\t\t\t// for that too.\n\t\t\tif (false === canIFireMode && \"microsoft-ads\" === pixelName) {\n\t\t\t\tcanIFireMode = wpmConsentValues.pixels.includes(\"bing-ads\")\n\t\t\t}\n\t\t} else {\n\t\t\tconsole.error(\"Couldn't find a valid consent mode in wpmConsentValues\")\n\t\t\tcanIFireMode = false\n\t\t}\n\n\t\tif (canIFireMode) {\n\t\t\treturn true\n\t\t} else {\n\t\t\tif (true || wpm.urlHasParameter(\"debugConsentMode\")) {\n\t\t\t\twpm.logPreventedPixelLoading(pixelName, category)\n\t\t\t}\n\n\t\t\treturn false\n\t\t}\n\t}\n\n\twpm.logPreventedPixelLoading = (pixelName, category) => {\n\n\t\tif (wpmDataLayer?.shop?.cookie_consent_mgmt?.explicit_consent) {\n\t\t\tconsole.log(\"Pixel Manager for WooCommerce: The \\\"\" + pixelName + \" (category: \" + category + \")\\\" pixel has not fired because you have not given consent for it yet. (PMW is in explicit consent mode.)\")\n\t\t} else {\n\t\t\tconsole.log(\"Pixel Manager for WooCommerce: The \\\"\" + pixelName + \" (category: \" + category + \")\\\" pixel has not fired because you have removed consent for this pixel. (PMW is in implicit consent mode.)\")\n\t\t}\n\t}\n\n\t/**\n\t * Runs through each script in and blocks / unblocks it according to the plugin settings\n\t * and user consent.\n\t */\n\n\t// https://stackoverflow.com/q/65453565/4688612\n\twpm.scriptTagObserver = new MutationObserver((mutations) => {\n\t\tmutations.forEach(({addedNodes}) => {\n\t\t\t[...addedNodes]\n\t\t\t\t.forEach(node => {\n\n\t\t\t\t\tif ($(node).data(\"wpm-cookie-category\")) {\n\n\t\t\t\t\t\t// If the pixel category has been approved > unblock\n\t\t\t\t\t\t// If the pixel belongs to more than one category, then unblock if one of the categories has been approved\n\t\t\t\t\t\t// If no category has been approved, but the Google Consent Mode is active, then only unblock the Google scripts\n\n\t\t\t\t\t\tif (wpm.shouldScriptBeActive(node)) {\n\t\t\t\t\t\t\twpm.unblockScript(node)\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\twpm.blockScript(node)\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t})\n\t})\n\n\twpm.scriptTagObserver.observe(document.head, {childList: true, subtree: true})\n\t// jQuery(document).on(\"DOMContentLoaded\", () => wpm.scriptTagObserver.disconnect())\n\tdocument.addEventListener(\"DOMContentLoaded\", () => wpm.scriptTagObserver.disconnect())\n\n\twpm.shouldScriptBeActive = node => {\n\n\t\tif (\n\t\t\twpmDataLayer.shop.cookie_consent_mgmt.explicit_consent ||\n\t\t\twpmConsentValues.visitorHasChosen\n\t\t) {\n\n\t\t\tif (wpmConsentValues.mode === \"category\" && $(node).data(\"wpm-cookie-category\").split(\",\").some(element => wpmConsentValues.categories[element])) {\n\t\t\t\treturn true\n\t\t\t} else if (wpmConsentValues.mode === \"pixel\" && wpmConsentValues.pixels.includes($(node).data(\"wpm-pixel-name\"))) {\n\t\t\t\treturn true\n\t\t\t} else if (wpmConsentValues.mode === \"pixel\" && $(node).data(\"wpm-pixel-name\") === \"google\" && [\"google-analytics\", \"google-ads\"].some(element => wpmConsentValues.pixels.includes(element))) {\n\t\t\t\treturn true\n\t\t\t} else if (wpmDataLayer?.pixels?.google?.consent_mode?.active && $(node).data(\"wpm-pixel-name\") === \"google\") {\n\t\t\t\treturn true\n\t\t\t} else {\n\t\t\t\treturn false\n\t\t\t}\n\t\t} else {\n\t\t\treturn true\n\t\t}\n\t}\n\n\n\twpm.unblockScript = (scriptNode, removeAttach = false) => {\n\n\t\tif (removeAttach) $(scriptNode).remove()\n\n\t\tlet wpmSrc = $(scriptNode).data(\"wpm-src\")\n\t\tif (wpmSrc) $(scriptNode).attr(\"src\", wpmSrc)\n\n\t\tscriptNode.type = \"text/javascript\"\n\n\t\tif (removeAttach) $(scriptNode).appendTo(\"head\")\n\n\t\t// jQuery(document).trigger(\"wpmPreLoadPixels\")\n\t\tdocument.dispatchEvent(new Event(\"wpmPreLoadPixels\"))\n\t}\n\n\twpm.blockScript = (scriptNode, removeAttach = false) => {\n\n\t\tif (removeAttach) $(scriptNode).remove()\n\n\t\tif ($(scriptNode).attr(\"src\")) $(scriptNode).removeAttr(\"src\")\n\t\tscriptNode.type = \"blocked/javascript\"\n\n\t\tif (removeAttach) $(scriptNode).appendTo(\"head\")\n\t}\n\n\twpm.unblockAllScripts = (analytics = true, ads = true) => {\n\t\t// jQuery(document).trigger(\"wpmPreLoadPixels\")\n\t\twpm.setConsentValueCategories(analytics, ads)\n\t\tdocument.dispatchEvent(new Event(\"wpmPreLoadPixels\"))\n\t}\n\n\twpm.unblockSelectedPixels = () => {\n\t\t// jQuery(document).trigger(\"wpmPreLoadPixels\")\n\t\tdocument.dispatchEvent(new Event(\"wpmPreLoadPixels\"))\n\t}\n\n\twpm.explicitConsentStateAlreadySet = () => {\n\n\t\tif (wpmConsentValues.explicitConsentStateAlreadySet) {\n\t\t\treturn true\n\t\t} else {\n\t\t\twpmConsentValues.explicitConsentStateAlreadySet = true\n\t\t}\n\t}\n\n\twpm.updatePixelConsentForPixelTypeCMPs = () => {\n\n\t\twpm.updateConsentCookieValues()\n\n\t\tif (wpmConsentValues.mode === \"pixel\") {\n\n\t\t\twpm.unblockSelectedPixels()\n\t\t\twpm.updateGoogleConsentMode(wpmConsentValues.pixels.includes(\"google-analytics\"), wpmConsentValues.pixels.includes(\"google-ads\"))\n\t\t} else {\n\n\t\t\twpm.unblockAllScripts(wpmConsentValues.categories.analytics, wpmConsentValues.categories.ads)\n\t\t\twpm.updateGoogleConsentMode(wpmConsentValues.categories.analytics, wpmConsentValues.categories.ads)\n\t\t}\n\t}\n\n\n\t/**\n\t * Block or unblock scripts for each CMP immediately after cookie consent has been updated\n\t * by the visitor.\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\tdocument.addEventListener(\"borlabs-cookie-consent-saved\", () => {\n\t\twpm.updatePixelConsentForPixelTypeCMPs()\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\n\tdocument.addEventListener(\"RCB/OptIn/All\", () => {\n\t\tconsole.log(\"consent given or changed, check again with consentSync...\")\n\n\t\twpm.updatePixelConsentForPixelTypeCMPs()\n\t})\n\n\n\t/**\n\t * Cookiebot\n\t * \tIf visitor accepts cookies in Cookiebot unblock the scripts\n\t * \thttps://www.cookiebot.com/en/developer/\n\t */\n\twindow.addEventListener(\"CookiebotOnAccept\", () => {\n\t\tif (Cookiebot.consent.statistics) wpmConsentValues.categories.analytics = true\n\t\tif (Cookiebot.consent.marketing) wpmConsentValues.categories.ads = true\n\n\t\twpm.unblockAllScripts(wpmConsentValues.categories.analytics, wpmConsentValues.categories.ads)\n\t\twpm.updateGoogleConsentMode(wpmConsentValues.categories.analytics, wpmConsentValues.categories.ads)\n\n\t}, false)\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\t// jQuery(document).on(\"CookieScriptAccept\", e => {\n\tdocument.addEventListener(\"CookieScriptAccept\", e => {\n\n\t\tif (e.detail.categories.includes(\"performance\")) wpmConsentValues.categories.analytics = true\n\t\tif (e.detail.categories.includes(\"targeting\")) wpmConsentValues.categories.ads = true\n\n\t\twpm.unblockAllScripts(wpmConsentValues.categories.analytics, wpmConsentValues.categories.ads)\n\t\twpm.updateGoogleConsentMode(wpmConsentValues.categories.analytics, wpmConsentValues.categories.ads)\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/\n\t */\n\t// jQuery(document).on(\"CookieScriptAcceptAll\", () => {\n\tdocument.addEventListener(\"CookieScriptAcceptAll\", () => {\n\n\t\twpm.setConsentValueCategories(true, true)\n\t\twpm.unblockAllScripts(true, true)\n\t\twpm.updateGoogleConsentMode(true, true)\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\n\twpm.cmplzStatusChange = (cmplzConsentData) => {\n\n\t\tif (cmplzConsentData.detail.categories.includes(\"statistics\")) wpm.updateConsentCookieValues(true, null)\n\t\tif (cmplzConsentData.detail.categories.includes(\"marketing\")) wpm.updateConsentCookieValues(null, true)\n\n\t\twpm.unblockAllScripts(wpmConsentValues.categories.analytics, wpmConsentValues.categories.ads)\n\t\twpm.updateGoogleConsentMode(wpmConsentValues.categories.analytics, wpmConsentValues.categories.ads)\n\t}\n\n\t// jQuery(document).on(\"cmplzStatusChange\", wpm.cmplzStatusChange)\n\tdocument.addEventListener(\"cmplzStatusChange\", wpm.cmplzStatusChange)\n\t// jQuery(document).on(\"cmplz_status_change\", wpm.cmplzStatusChange)\n\tdocument.addEventListener(\"cmplz_status_change\", wpm.cmplzStatusChange)\n\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// jQuery(document).on(\"setCookieNotice\", () => {\n\tdocument.addEventListener(\"setCookieNotice\", () => {\n\t\twpm.updateConsentCookieValues()\n\n\t\twpm.unblockAllScripts(wpmConsentValues.categories.analytics, wpmConsentValues.categories.ads)\n\t\twpm.updateGoogleConsentMode(wpmConsentValues.categories.analytics, wpmConsentValues.categories.ads)\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 (pro version)\n\t * https://wordpress.org/support/topic/events-on-consent-change/#post-15202792\n\t * Because Cookie Notice has no documented API or event that is being triggered on consent save or update\n\t * we have to solve this by using a mutation observer.\n\t *\n\t * @type {MutationObserver}\n\t */\n\n\twpm.huObserver = new MutationObserver(mutations => {\n\t\tmutations.forEach(({addedNodes}) => {\n\t\t\t[...addedNodes]\n\t\t\t\t.forEach(node => {\n\n\t\t\t\t\tif (node.id === \"hu\") {\n\n\t\t\t\t\t\t// jQuery(\".hu-cookies-save\").on(\"click\", function () {\n\t\t\t\t\t\t// jQuery(\".hu-cookies-save\") in pure JavaScript\n\t\t\t\t\t\tdocument.querySelector(\".hu-cookies-save\").addEventListener(\"click\", () => {\n\t\t\t\t\t\t\twpm.updateConsentCookieValues()\n\t\t\t\t\t\t\twpm.unblockAllScripts(wpmConsentValues.categories.analytics, wpmConsentValues.categories.ads)\n\t\t\t\t\t\t\twpm.updateGoogleConsentMode(wpmConsentValues.categories.analytics, wpmConsentValues.categories.ads)\n\t\t\t\t\t\t})\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t})\n\t})\n\n\tif (window.hu) {\n\t\twpm.huObserver.observe(document.documentElement || document.body, {childList: true, subtree: true})\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\n\twindow.addEventListener(\"ucEvent\", e => {\n\t\tif (e.detail && e.detail.event == \"consent_status\") {\n\t\t\t// check for consent status of service \"Google Ads Remarketing\"\n\t\t\tif (e.detail[\"Google Ads Remarketing\"] === true) {\n\t\t\t\tconsole.log(\"Google Ads Remarketing has consent\")\n\t\t\t} else {\n\t\t\t\tconsole.log(\"Google Ads Remarketing has no consent\")\n\t\t\t}\n\t\t}\n\t})\n\n\t// https://docs.usercentrics.com/#/v2-events?id=uc_ui_cmp_event\n\twindow.addEventListener(\"UC_UI_CMP_EVENT\", event => {\n\n\t\tif (event.detail.type === \"ACCEPT_ALL\") {\n\t\t\t// console.log('accept all');\n\n\t\t\tpmw.consentAcceptAll()\n\t\t}\n\n\t\tif (event.detail.type === \"DENY_ALL\") {\n\t\t\tpmw.consentRevokeAll()\n\t\t}\n\n\t\tif (event.detail.type === \"SAVE\") {\n\t\t\tconsole.log(\"event.detail\", event.detail)\n\t\t}\n\t})\n\n\n\t/**\n\t * OneTrust Event Listeners\n\t *\n\t * CookiePro by OneTrust doesn't emit any events when the user accepts or declines cookies.\n\t */\n\n\t// There are two accept all buttons. One in the first banner and one in the settings window. Both have different identifiers.\n\tjQuery(\"#accept-recommended-btn-handler, #onetrust-accept-btn-handler\").on(\"click\", () => {\n\n\t\t// If OneTrust is not loaded, return\n\t\tif (typeof window.OneTrust === \"undefined\") return\n\n\t\tpmw.consentAcceptAll()\n\t})\n\n\t// There are two revoke all buttons. One in the first banner and one in the settings window. Both have different identifiers.\n\tjQuery(\".ot-pc-refuse-all-handler, #onetrust-reject-all-handler\").on(\"click\", () => {\n\t\tpmw.consentRevokeAll()\n\t})\n\n\t// There is one save button that saves mixed consent. It is in the settings window. We reload the page after saving to reflect the changes.\n\tjQuery(\".save-preference-btn-handler.onetrust-close-btn-handler\").on(\"click\", () => {\n\t\tlocation.reload()\n\n\t\t// OneTrust.OnConsentChanged(function (e) {\n\t\t// \tpmw.consentAdjustSelectively({\n\t\t// \t\tanalytics: e.detail.includes(\"2\"),\n\t\t// \t\tads : e.detail.includes(\"4\"),\n\t\t// \t})\n\t\t// })\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\n\tdocument.addEventListener(\"termlyConsent\", function (e) {\n\n\t\tconst consent = e.detail\n\n\t\tif (consent.advertising && consent.analytics) {\n\t\t\tpmw.consentAcceptAll()\n\t\t} else if (!consent.advertising && !consent.analytics) {\n\t\t\tpmw.consentRevokeAll()\n\t\t} else {\n\t\t\tpmw.consentAdjustSelectively({\n\t\t\t\tanalytics: consent.analytics,\n\t\t\t\tads : consent.advertising,\n\t\t\t})\n\t\t}\n\t})\n\n\twpm.updateGoogleConsentMode = (analytics = true, ads = true) => {\n\n\t\ttry {\n\t\t\tif (\n\t\t\t\t!window.gtag ||\n\t\t\t\t!wpmDataLayer.shop.cookie_consent_mgmt.explicit_consent\n\t\t\t) return\n\n\t\t\tgtag(\"consent\", \"update\", {\n\t\t\t\tanalytics_storage: analytics ? \"granted\" : \"denied\",\n\t\t\t\tad_storage : ads ? \"granted\" : \"denied\",\n\t\t\t})\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\n(function (pmw, $, undefined) {\n\n\t/**\n\t * Pixel Manager Cookie Consent API\n\t */\n\n\t// Accept consent for all cookies\n\tpmw.consentAcceptAll = (settings = {}) => {\n\n\t\tsettings.duration = settings.duration || 365\n\n\t\tpmw.consentSetCookie(true, true, settings.duration)\n\t\twpm.unblockAllScripts(true, true)\n\t\twpm.updateGoogleConsentMode(true, true)\n\t}\n\n\t// Accept consent selectively\n\tpmw.consentAdjustSelectively = (settings) => {\n\n\t\t// if settings.marketing is set\n\t\t// write its value to settings.ads\n\t\t// and delete settings.marketing\n\t\tif (settings.marketing !== undefined) {\n\t\t\tsettings.ads = settings.marketing\n\t\t\tdelete settings.marketing\n\t\t}\n\n\t\t// If settings.analytics is set, keep it, otherwise set it to wpm.getConsentValues().categories.analytics\n\t\tsettings.analytics = settings.analytics !== undefined ? settings.analytics : wpm.getConsentValues().categories.analytics\n\t\tsettings.ads = settings.ads !== undefined ? settings.ads : wpm.getConsentValues().categories.ads\n\t\tsettings.duration = settings.duration || 365\n\n\t\tconsole.log(\"settings\", settings)\n\n\t\tpmw.consentSetCookie(settings.analytics, settings.ads, settings.duration)\n\t\twpm.unblockAllScripts(settings.analytics, settings.ads)\n\t\twpm.updateGoogleConsentMode(settings.analytics, settings.ads)\n\t}\n\n\t// Remove consent for all cookies\n\tpmw.consentRevokeAll = (settings = {}) => {\n\n\t\tsettings.duration = settings.duration || 365\n\n\t\twpm.setConsentValueCategories(false, false)\n\t\tpmw.consentSetCookie(false, false, settings.duration)\n\t\twpm.updateGoogleConsentMode(false, false)\n\t}\n\n\t// Set a cookie called pmw_cookie_consent with the value of pmw_cookie_consent\n\t// and set the default expiration date to 1 year from now\n\tpmw.consentSetCookie = (analytics, ads, duration = 365) => {\n\t\twpm.setCookie(\"pmw_cookie_consent\", JSON.stringify({analytics, ads}), duration)\n\t}\n\n\tpmw.triggerPmwCookieConsentManagementLoaded = () => {\n\t\t// Trigger an event once the PMW consent management has been loaded\n\t\tdocument.dispatchEvent(new Event(\"pmw_cookie_consent_management_loaded\"))\n\t\tdocument.dispatchEvent(new Event(\"pmwCookieConsentManagementLoaded\"))\n\t}\n\n\tpmw.triggerPmwCookieConsentManagementLoaded()\n\n}(window.pmw = window.pmw || {}, jQuery))\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]\n\nconst checkoutButtonSelectors = wpm.prepareSelectors(checkoutButtonClasses, \"beginCheckout\")\n\n// console.log(\"checkoutButtonSelectors\", checkoutButtonSelectors)\n\n// https://wordpress.stackexchange.com/a/352171/68337\njQuery(document).on(\"click init_checkout\", checkoutButtonSelectors, () => {\n\n\t// console.log(\"init_checkout at: \" + new Date().getTime())\n\n\tjQuery(document).trigger(\"wpmBeginCheckout\")\n})\n\njQuery(document).on(\"updated_cart_totals\", () => {\n\tjQuery(document).trigger(\"wpmViewCart\")\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\t// When a new session is initiated there are no items in the cart,\n\t\t// so we can save the call to get the cart items\n\t\tif (wpm.doesWooCommerceCartExist()) wpm.getCartItems()\n\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\njQuery(document).on(\"wpmLoad\", () => {\n\n\t// can't use session storage as we can't read it from the server\n\tif (!wpm.getCookie(\"wpmReferrer\")) {\n\n\t\tif (document.referrer) {\n\t\t\tlet referrerUrl = new URL(document.referrer)\n\t\t\tlet referrerHostname = referrerUrl.hostname\n\n\t\t\tif (referrerHostname !== window.location.host) {\n\t\t\t\twpm.setCookie(\"wpmReferrer\", referrerHostname)\n\t\t\t}\n\t\t}\n\t}\n})\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?.wpmLoadFired) {\n\n\t\t\tjQuery(document).trigger(\"wpmLoadAlways\")\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(\"wpmViewItem\", product)\n\t\t\t\t} else if (\"product_category\" === wpmDataLayer.shop.page_type) {\n\t\t\t\t\tjQuery(document).trigger(\"wpmCategory\")\n\t\t\t\t} else if (\"search\" === wpmDataLayer.shop.page_type) {\n\t\t\t\t\tjQuery(document).trigger(\"pmwEvent:Search\")\n\t\t\t\t} else if (\"cart\" === wpmDataLayer.shop.page_type) {\n\t\t\t\t\tjQuery(document).trigger(\"wpmViewCart\")\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(\"wpmOrderReceivedPage\")\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(\"wpmEverywhereElse\")\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tjQuery(document).trigger(\"wpmEverywhereElse\")\n\t\t\t}\n\n\t\t\tif (wpmDataLayer?.user?.id && !wpm.hasLoginEventFired()) {\n\t\t\t\tjQuery(document).trigger(\"wpmLogin\")\n\t\t\t\twpm.setLoginEventFired()\n\t\t\t}\n\n\t\t\t// /**\n\t\t\t// * Load mini cart fragments into a wpm session storage key,\n\t\t\t// * after the document load event.\n\t\t\t// */\n\t\t\t// jQuery(document).ajaxSend(function (event, jqxhr, settings) {\n\t\t\t// \t// console.log('settings.url: ' + settings.url);\n\t\t\t//\n\t\t\t// \tif (settings.url.includes(\"get_refreshed_fragments\") && sessionStorage) {\n\t\t\t// \t\tif (!sessionStorage.getItem(\"wpmMiniCartActive\")) {\n\t\t\t// \t\t\tsessionStorage.setItem(\"wpmMiniCartActive\", JSON.stringify(true))\n\t\t\t// \t\t}\n\t\t\t// \t}\n\t\t\t// })\n\n\t\t\twpmDataLayer.wpmLoadFired = true\n\t\t}\n\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\njQuery(document).on(\"wpmLoad\", async () => {\n\n\tif (\n\t\twindow.sessionStorage &&\n\t\twindow.sessionStorage.getItem(\"_pmw_endpoint_available\") &&\n\t\t!JSON.parse(window.sessionStorage.getItem(\"_pmw_endpoint_available\"))\n\t) {\n\t\tconsole.error(\"Pixel Manager for WooCommerce: REST endpoint is not available. Using admin-ajax.php instead.\")\n\t}\n})\n\n\n/**\n * Load all pixels\n */\njQuery(document).on(\"wpmPreLoadPixels\", () => {\n\n\tif (wpmDataLayer?.shop?.cookie_consent_mgmt?.explicit_consent && !wpm.explicitConsentStateAlreadySet()) {\n\t\twpm.updateConsentCookieValues(null, null, true)\n\t}\n\n\tjQuery(document).trigger(\"wpmLoadPixels\", {})\n})\n\n\n/**\n * All ecommerce events\n */\n\n/**\n * Add to cart event\n */\njQuery(document).on(\"wpmAddToCart\", (event, product) => {\n\n\t/**\n\t * Prepare the payload\n\t */\n\n\tlet payload = {\n\t\tevent : \"addToCart\",\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\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\tif (wpmDataLayer?.pixels?.tiktok?.loaded) {\n\t\tpayload.tiktok = {\n\t\t\tevent : \"AddToCart\",\n\t\t\tevent_id : wpm.getRandomEventId(),\n\t\t\tcontext : wpm.getTikTokUserDataFromBrowser(),\n\t\t\tproperties: {\n\t\t\t\tvalue : product.price * product.quantity,\n\t\t\t\tcurrency: product.currency,\n\t\t\t\tcontents: [{\n\t\t\t\t\tcontent_id : product.dyn_r_ids[wpmDataLayer.pixels.tiktok.dynamic_remarketing.id_type],\n\t\t\t\t\tcontent_type: \"product\",\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/**\n\t * Process the client-to-server event\n\t */\n\n\tjQuery(document).trigger(\"wpmClientSideAddToCart\", payload)\n\n\t/**\n\t * Process the server-to-server event\n\t */\n\n\t// If function wpm.isServerToServerEnabled() exists, then run it\n\tif (typeof wpm.sendEventPayloadToServer === \"function\") {\n\t\twpm.sendEventPayloadToServer(payload)\n\t}\n})\n\n/**\n * Begin checkout event\n */\njQuery(document).on(\"wpmBeginCheckout\", () => {\n\n\t/**\n\t * Prepare the payload\n\t */\n\n\tlet payload = {\n\t\tevent: \"beginCheckout\",\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 (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\tcontext : wpm.getTikTokUserDataFromBrowser(),\n\t\t}\n\t}\n\n\t/**\n\t * Process the client-to-server event\n\t */\n\n\tjQuery(document).trigger(\"wpmClientSideBeginCheckout\", payload)\n\n\t/**\n\t * Process the server-to-server event\n\t */\n\n\t// If function wpm.isServerToServerEnabled() exists, then run it\n\tif (typeof wpm.sendEventPayloadToServer === \"function\") {\n\t\twpm.sendEventPayloadToServer(payload)\n\t}\n})\n\n/**\n * Add to wishlist event\n */\njQuery(document).on(\"wpmAddToWishlist\", (event, product) => {\n\n\t/**\n\t * Prepare the payload\n\t */\n\n\tlet payload = {\n\t\tevent : \"addToWishlist\",\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\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\tcontext : wpm.getTikTokUserDataFromBrowser(),\n\t\t\tproperties: {\n\t\t\t\tvalue : product.price * product.quantity,\n\t\t\t\tcurrency: product.currency,\n\t\t\t\tcontents: [{\n\t\t\t\t\tcontent_id : product.dyn_r_ids[wpmDataLayer.pixels.tiktok.dynamic_remarketing.id_type],\n\t\t\t\t\tcontent_type: \"product\",\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/**\n\t * Process the client-to-server event\n\t */\n\n\tjQuery(document).trigger(\"wpmClientSideAddToWishlist\", payload)\n\n\t/**\n\t * Process the server-to-server event\n\t */\n\n\t// If function wpm.isServerToServerEnabled() exists, then run it\n\tif (typeof wpm.sendEventPayloadToServer === \"function\") {\n\t\twpm.sendEventPayloadToServer(payload)\n\t}\n})\n\n/**\n * View Item event\n */\njQuery(document).on(\"wpmViewItem\", (event, product = null) => {\n\n\t/**\n\t * Prepare the payload\n\t */\n\n\tlet payload = {\n\t\tevent : \"viewItem\",\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 (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\tcontext : wpm.getTikTokUserDataFromBrowser(),\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\tcontents: [{\n\t\t\t\t\tcontent_id : product.dyn_r_ids[wpmDataLayer.pixels.tiktok.dynamic_remarketing.id_type],\n\t\t\t\t\tcontent_type: \"product\",\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/**\n\t * Process the client-to-server event\n\t */\n\n\tjQuery(document).trigger(\"wpmClientSideViewItem\", payload)\n\n\t/**\n\t * Process the server-to-server event\n\t */\n\n\t// If function wpm.isServerToServerEnabled() exists, then run it\n\tif (typeof wpm.sendEventPayloadToServer === \"function\") {\n\t\twpm.sendEventPayloadToServer(payload)\n\t}\n})\n\n/**\n * View category event\n */\njQuery(document).on(\"wpmCategory\", (event, product = null) => {\n\n\t/**\n\t * Prepare the payload\n\t */\n\n\tlet payload = {\n\t\tevent: \"viewCategory\",\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(\"wpmClientSideViewCategory\", payload)\n\n\t/**\n\t * Process the server-to-server event\n\t */\n\n\t// If function wpm.isServerToServerEnabled() exists, then run it\n\tif (typeof wpm.sendEventPayloadToServer === \"function\") {\n\t\twpm.sendEventPayloadToServer(payload)\n\t}\n})\n\n/**\n * Search event\n */\njQuery(document).on(\"pmwEvent:Search\", () => {\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\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\tcontext : wpm.getTikTokUserDataFromBrowser(),\n\t\t\tproperties: {\n\t\t\t\tquery: wpm.getSearchTermFromUrl(),\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(\"wpmClientSideSearch\", payload)\n\n\t/**\n\t * Process the server-to-server event\n\t */\n\n\t// If function wpm.isServerToServerEnabled() exists, then run it\n\tif (typeof wpm.sendEventPayloadToServer === \"function\") {\n\t\twpm.sendEventPayloadToServer(payload)\n\t}\n})\n\n/**\n * Place order event\n */\njQuery(document).on(\"wpmPlaceOrder\", () => {\n\n\t/**\n\t * Prepare the payload\n\t */\n\n\tlet payload = {\n\t\tevent: \"placeOrder\",\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\tcontext : wpm.getTikTokUserDataFromBrowser(),\n\t\t}\n\t}\n\n\t/**\n\t * Process the client-to-server event\n\t */\n\n\tjQuery(document).trigger(\"wpmClientPlaceOrder\", payload)\n\n\t/**\n\t * Process the server-to-server event\n\t */\n\n\t// If function wpm.isServerToServerEnabled() exists, then run it\n\tif (typeof wpm.sendEventPayloadToServer === \"function\") {\n\t\twpm.sendEventPayloadToServer(payload)\n\t}\n})\n\n/**\n * Order received event\n */\njQuery(document).on(\"wpmOrderReceivedPage\", () => {\n\n\t/**\n\t * Prepare the payload\n\t */\n\n\tlet payload = {\n\t\tevent: \"orderReceived\",\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_filtered,\n\t\t\t\tcurrency : wpmDataLayer.order.currency,\n\t\t\t\tcontent_ids : wpm.facebookContentIds(),\n\t\t\t},\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\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\tcontext : wpm.getTikTokUserDataFromBrowser(),\n\t\t\tproperties: {\n\t\t\t\tvalue : wpmDataLayer.order.value_filtered,\n\t\t\t\tcurrency: wpmDataLayer.order.currency,\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(\"wpmClientSideOrderReceivedPage\", 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\njQuery(document).on(\"pmw:ready\", async () => {\n\n\t// /**\n\t// * Run as soon as wpm namespace is loaded\n\t// */\n\t//\n\t// await wpm.wpmDataLayerExists()\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\n\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 behaviour 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 : 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\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(\"wpmSelectContentGaUa\", product)\n\t\t\t\tjQuery(document).trigger(\"wpmSelectItem\", 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(\"wpmPlaceOrder\", {})\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\tlet url = new URL(jQuery(element).find(\".product-remove\").find(\"a\").attr(\"href\"))\n\t\t\tlet productId = wpm.getProductIdByCartItemKeyUrl(url)\n\n\t\t\tlet quantity = jQuery(element).find(\".qty\").val()\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// 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(\"wpmAddToWishlist\", 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 * Has to be hooked after document ready !\n *\n * https://stackoverflow.com/a/27849208/4688612\n * https://stackoverflow.com/a/65065335/4688612\n */\n\njQuery(\".single_variation_wrap\").on(\"show_variation\", (event, variation) => {\n\n\ttry {\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\twpm.triggerViewItemEventPrep(productId)\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?.general?.variationsOutput\n// \t\t\t) {\n// \t\t\t\tfor (const [key, product] of Object.entries(wpmDataLayer.products)) {\n// \t\t\t\t\tif (\"parentId\" 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(\"wpmviewitem\")\n// \t})\n// })\n","/**\n * Copyright 2023 SweetCode. All rights reserved.\n *\n * Automatic Conversion Recovery (ACR)\n */\njQuery(document).on(\"wpmLoadAlways\", async () => {\n\n\ttry {\n\t\t// Return if on purchase confirmation page\n\t\tif (wpmDataLayer?.shop?.page_type === \"order_received_page\") return\n\n\t\t// console.log(\"ACR running\")\n\n\t\t// Return if ACR cookie has not been set\n\t\tif (!wpm.getCookie(\"pmw_automatic_conversion_recovery\")) return\n\n\t\t// console.log(\"ACR cookie found\")\n\n\t\t// Return if window.sessionStorage is not supported\n\t\tif (!window.sessionStorage) return\n\n\t\t// console.log(\"window.sessionStorage available\")\n\n\t\t// Return if the check has already run in the current session\n\t\tif (window.sessionStorage.getItem(\"_pmw_acr_attempted\")) return\n\n\t\t// console.log(\"ACR check not run in this session\")\n\n\t\t// Get the order details from the server\n\t\tawait wpm.getAcrOrderDetails()\n\n\t\tif(!wpmDataLayer?.order) {\n\t\t\tconsole.error(\"ACR order details not retrieved\")\n\t\t\treturn\n\t\t}\n\n\t\t// console.log(\"ACR order details retrieved\")\n\n\t\t// console.log(\"wpmDataLayer.order\", wpmDataLayer.order)\n\n\t\t// Fire the conversion pixels\n\t\tjQuery(document).trigger(\"wpmOrderReceivedPage\")\n\n\t\t// Save the order ID on the server to prevent duplicate conversions\n\t\twpm.writeOrderIdToStorage(wpmDataLayer.order.id, wpmDataLayer.order.key, \"acr_full_auto\")\n\n\t\t// Delete the ACR cookie\n\t\twpm.deleteCookie(\"pmw_automatic_conversion_recovery\")\n\n\t} catch (error) {\n\t\tif (window.sessionStorage) window.sessionStorage.setItem(\"_pmw_acr_attempted\", JSON.stringify(true))\n\t\tconsole.error(error)\n\t}\n})\n\n/**\n * Scroll Tracker\n */\n\n// We only can load it once the pmwDataLayer is available\njQuery(document).on(\"wpmLoad\", function () {\n\n\t// Only initialize if the scroll tracker is enabled\n\tif (!wpmDataLayer?.general?.scrollTrackingThresholds || !wpmDataLayer.general.scrollTrackingThresholds.length > 0) return\n\n\t(function (wpm, $, undefined) {\n\n\t\twpm.scrollVisibilityThreshold = wpmDataLayer.general.scrollTrackingThresholds\n\n\t\t// Create an object that contains each key from visibilityBreakPoints and sets each value to false\n\t\twpm.scrollVisibilityThresholdStatus = wpm.scrollVisibilityThreshold.reduce((obj, item) => {\n\t\t\tobj[item] = false\n\t\t\treturn obj\n\t\t}, {})\n\n\t}(window.wpm = window.wpm || {}, jQuery));\n\n\tjQuery(window).on(\"scroll\", (event) => {\n\n\t\tconst scrollPosition = jQuery(window).scrollTop()\n\n\t\t// If the scroll reaches a visibility threshold for each threshold in visibilityThresholdStatus that is set to false, trigger an event\n\t\tfor (const [threshold, value] of Object.entries(wpm.scrollVisibilityThresholdStatus)) {\n\t\t\tif (value === false) {\n\t\t\t\tconst visibilityBreakPoint = (jQuery(document).height() - jQuery(window).height()) * (threshold / 100)\n\t\t\t\tif (scrollPosition >= visibilityBreakPoint) {\n\t\t\t\t\tjQuery(document).trigger(\"pmwScrollDepth\", {\n\t\t\t\t\t\tdirection : \"vertical\",\n\t\t\t\t\t\tthreshold : threshold,\n\t\t\t\t\t\tposition : scrollPosition,\n\t\t\t\t\t\tpositionUnit: \"pixels\",\n\t\t\t\t\t})\n\t\t\t\t\twpm.scrollVisibilityThresholdStatus[threshold] = true\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t})\n\n\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: \"_pmw_endpoint_available\",\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\t// wpm.checkIfCookiesAvailable = function () {\n\t//\n\t// // read the cookie if previously set, if it is return true, otherwise continue\n\t// if (wpm.getCookie(wpmRestSettings.cookiesAvailable)) {\n\t// return true;\n\t// }\n\t//\n\t// // set the cookie for the session\n\t// Cookies.set(wpmRestSettings.cookiesAvailable, true);\n\t//\n\t// // read cookie, true if ok, false if not ok\n\t// return !!wpm.getCookie(wpmRestSettings.cookiesAvailable);\n\t// }\n\n\twpm.useRestEndpoint = () => {\n\n\t\t// only if sessionStorage is available\n\n\t\t// only if REST API endpoint is generally accessible\n\t\t// check in sessionStorage if we checked before and return answer\n\t\t// otherwise check if the endpoint is available, save answer in sessionStorage and return answer\n\n\t\t// only if not too many REST API errors happened\n\n\t\treturn wpm.isSessionStorageAvailable() &&\n\t\t\twpm.isRestEndpointAvailable() &&\n\t\t\twpm.isBelowRestErrorThreshold()\n\t}\n\n\twpm.isBelowRestErrorThreshold = () => window.sessionStorage.getItem(wpmRestSettings.restFails) <= wpmRestSettings.restFailsThreshold\n\n\twpm.isRestEndpointAvailable = async () => {\n\n\t\tif (window.sessionStorage.getItem(wpmRestSettings.cookiePmwRestEndpointAvailable)) {\n\t\t\treturn JSON.parse(window.sessionStorage.getItem(wpmRestSettings.cookiePmwRestEndpointAvailable))\n\t\t} else {\n\t\t\treturn await wpm.testEndpoint()\n\t\t}\n\t}\n\n\twpm.isSessionStorageAvailable = () => !!window.sessionStorage\n\n\t// Test the endpoint by sending a POST request\n\twpm.testEndpoint = async (\n\t\turl = wpm.root + wpmRestSettings.restEndpointPost,\n\t\tcookieName = wpmRestSettings.cookiePmwRestEndpointAvailable,\n\t) => {\n\n\t\tlet response = await fetch(url, {\n\t\t\tmethod : \"POST\",\n\t\t\tmode : \"cors\",\n\t\t\tcache : \"no-cache\",\n\t\t\tkeepalive: true,\n\t\t})\n\n\t\tif (response.status === 200) {\n\t\t\twindow.sessionStorage.setItem(cookieName, JSON.stringify(true))\n\t\t\treturn true\n\t\t} else if (response.status === 404) {\n\t\t\twindow.sessionStorage.setItem(cookieName, JSON.stringify(false))\n\t\t\treturn false\n\t\t} else if (response.status === 0) {\n\t\t\twindow.sessionStorage.setItem(cookieName, JSON.stringify(false))\n\t\t\treturn false\n\t\t}\n\t}\n\n\twpm.isWpmRestEndpointAvailable = (cookieName = wpmRestSettings.cookiePmwRestEndpointAvailable) => !!wpm.getCookie(cookieName)\n\n\twpm.writeOrderIdToStorage = (orderId, orderKey, source = \"thankyou_page\", expireDays = 365) => {\n\n\t\t// save the order ID in the browser storage\n\n\t\tif (!window.Storage) {\n\t\t\tlet expiresDate = new Date()\n\t\t\texpiresDate.setDate(expiresDate.getDate() + wpmDeduper.cookieExpiresDays)\n\n\t\t\tlet ids = []\n\t\t\tif (checkCookie()) {\n\t\t\t\tids = JSON.parse(wpm.getCookie(wpmDeduper.keyName))\n\t\t\t}\n\n\t\t\tif (!ids.includes(orderId)) {\n\t\t\t\tids.push(orderId)\n\t\t\t\tdocument.cookie = wpmDeduper.keyName + \"=\" + JSON.stringify(ids) + \";expires=\" + expiresDate.toUTCString()\n\t\t\t}\n\n\t\t} else {\n\t\t\tif (localStorage.getItem(wpmDeduper.keyName) === null) {\n\t\t\t\tlet ids = []\n\t\t\t\tids.push(orderId)\n\t\t\t\twindow.localStorage.setItem(wpmDeduper.keyName, JSON.stringify(ids))\n\n\t\t\t} else {\n\t\t\t\tlet ids = JSON.parse(localStorage.getItem(wpmDeduper.keyName))\n\t\t\t\tif (!ids.includes(orderId)) {\n\t\t\t\t\tids.push(orderId)\n\t\t\t\t\twindow.localStorage.setItem(wpmDeduper.keyName, JSON.stringify(ids))\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (typeof wpm.storeOrderIdOnServer === \"function\" && wpmDataLayer.orderDeduplication) {\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\tfunction checkCookie() {\n\t\tlet key = wpm.getCookie(wpmDeduper.keyName)\n\t\treturn key !== \"\"\n\t}\n\n\twpm.isOrderIdStored = orderId => {\n\n\t\tif (wpmDataLayer.orderDeduplication) {\n\n\t\t\tif (!window.Storage) {\n\n\t\t\t\tif (checkCookie()) {\n\t\t\t\t\tlet ids = JSON.parse(wpm.getCookie(wpmDeduper.keyName))\n\t\t\t\t\treturn ids.includes(orderId)\n\t\t\t\t} else {\n\t\t\t\t\treturn false\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (localStorage.getItem(wpmDeduper.keyName) !== null) {\n\t\t\t\t\tlet ids = JSON.parse(localStorage.getItem(wpmDeduper.keyName))\n\t\t\t\t\treturn ids.includes(orderId)\n\t\t\t\t} else {\n\t\t\t\t\treturn false\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tconsole.log(\"order duplication prevention: off\")\n\t\t\treturn false\n\t\t}\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\tlet 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(\"wpmRemoveFromCart\", product)\n\n\t\t\tif (quantityToRemove == null || wpmDataLayer.cart[productId].quantity === quantityToRemove) {\n\n\t\t\t\tdelete wpmDataLayer.cart[productId]\n\n\t\t\t\tif (sessionStorage) sessionStorage.setItem(\"wpmDataLayerCart\", JSON.stringify(wpmDataLayer.cart))\n\t\t\t} else {\n\n\t\t\t\twpmDataLayer.cart[productId].quantity = wpmDataLayer.cart[productId].quantity - quantity\n\n\t\t\t\tif (sessionStorage) sessionStorage.setItem(\"wpmDataLayerCart\", JSON.stringify(wpmDataLayer.cart))\n\t\t\t}\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t\t// console.log('getting cart from back end');\n\t\t\t// wpm.getCartItemsFromBackend();\n\t\t\t// console.log('getting cart from back end done');\n\t\t}\n\t}\n\n\twpm.getIdBasedOndVariationsOutputSetting = productId => {\n\n\t\ttry {\n\t\t\tif (wpmDataLayer?.general?.variationsOutput) return productId\n\n\t\t\tif (wpmDataLayer.products[productId].isVariation) return wpmDataLayer.products[productId].parentId\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(\"wpmAddToCart\", 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\tif (sessionStorage) sessionStorage.setItem(\"wpmDataLayerCart\", JSON.stringify(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.getCartItems = () => {\n\n\t\tif (sessionStorage) {\n\t\t\tif (!sessionStorage.getItem(\"wpmDataLayerCart\") || wpmDataLayer.shop.page_type === \"order_received_page\") {\n\t\t\t\tsessionStorage.setItem(\"wpmDataLayerCart\", JSON.stringify({}))\n\t\t\t} else {\n\t\t\t\twpm.saveCartObjectToDataLayer(JSON.parse(sessionStorage.getItem(\"wpmDataLayerCart\")))\n\t\t\t}\n\t\t} else {\n\t\t\twpm.getCartItemsFromBackend()\n\t\t}\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})\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\n\t\t\t\t\t\twpm.saveCartObjectToDataLayer(data.data[\"cart\"])\n\n\t\t\t\t\t\tif (sessionStorage) sessionStorage.setItem(\"wpmDataLayerCart\", JSON.stringify(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 productIds 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 products 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\ttry {\n\n\t\t\tlet response\n\n\t\t\tif (await wpm.isRestEndpointAvailable()) {\n\t\t\t\tresponse = await fetch(wpm.root + \"pmw/v1/products/\", {\n\t\t\t\t\tmethod : \"POST\",\n\t\t\t\t\tcache : \"no-cache\",\n\t\t\t\t\theaders: {\n\t\t\t\t\t\t\"Content-Type\": \"application/json\",\n\t\t\t\t\t},\n\t\t\t\t\tbody : JSON.stringify({\n\t\t\t\t\t\tpageId : wpmDataLayer.general.pageId,\n\t\t\t\t\t\tpageType : wpmDataLayer.shop.page_type,\n\t\t\t\t\t\tproductIds: productIds,\n\t\t\t\t\t}),\n\t\t\t\t})\n\t\t\t} else {\n\n\t\t\t\t// Get the product details from the backend the data object using fetch API\n\t\t\t\t// and log success or error messages\n\t\t\t\t// and url encoded data\n\t\t\t\tresponse = await fetch(wpm.ajax_url, {\n\t\t\t\t\tmethod: \"POST\",\n\t\t\t\t\tcache : \"no-cache\",\n\t\t\t\t\tbody : new URLSearchParams({\n\t\t\t\t\t\taction : \"pmw_get_product_ids\",\n\t\t\t\t\t\tpageId : wpmDataLayer.general.pageId,\n\t\t\t\t\t\tpageType : wpmDataLayer.shop.page_type,\n\t\t\t\t\t\tproductIds: productIds,\n\t\t\t\t\t}),\n\t\t\t\t})\n\t\t\t}\n\n\t\t\tif (response.ok) {\n\t\t\t\tlet responseData = await response.json()\n\t\t\t\tif (responseData.success) {\n\t\t\t\t\twpmDataLayer.products = Object.assign({}, wpmDataLayer.products, responseData.data)\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tconsole.error(\"Error getting products from backend\")\n\t\t\t}\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 && wpmDataLayer.products[productId]) {\n\n\t\t\twpm.triggerViewItemEvent(productId)\n\t\t} else {\n\t\t\tawait wpm.getProductsFromBackend([productId])\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\tjQuery(document).trigger(\"wpmViewItem\", product)\n\t}\n\n\twpm.triggerViewItemEventNoProduct = () => {\n\t\tjQuery(document).trigger(\"wpmViewItem\")\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(\"wpmFireCheckoutOption\", 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(\"wpmFireCheckoutProgress\", 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(\"wpmViewItemList\", 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.viewItemListTrigger.opacity,\n\t\t\t\"background-color\": wpmDataLayer.viewItemListTrigger.backgroundColor,\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.viewItemListTrigger.testMode) wpm.viewItemListTriggerTestMode(entry.target)\n\t\t\t\t\t\tif (wpmDataLayer.viewItemListTrigger.repeat === false) observer.unobserve(entry.target)\n\t\t\t\t\t}, wpmDataLayer.viewItemListTrigger.timeout)\n\n\t\t\t\t} else {\n\n\t\t\t\t\tclearTimeout(ioTimeouts[elementId])\n\t\t\t\t\tif (wpmDataLayer.viewItemListTrigger.testMode) 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\tlet allIoElementsToWatch\n\n\tlet getAllElementsToWatch = () => {\n\n\t\tallIoElementsToWatch = jQuery(\".wpmProductId\")\n\t\t\t.map(function (i, elem) {\n\n\t\t\t\tif (\n\t\t\t\t\tjQuery(elem).parent().hasClass(\"type-product\") ||\n\t\t\t\t\tjQuery(elem).parent().hasClass(\"product\") ||\n\t\t\t\t\tjQuery(elem).parent().hasClass(\"product-item-inner\")\n\t\t\t\t) {\n\t\t\t\t\treturn jQuery(elem).parent()\n\t\t\t\t} else if (\n\t\t\t\t\tjQuery(elem).prev().hasClass(\"wc-block-grid__product\") ||\n\t\t\t\t\tjQuery(elem).prev().hasClass(\"product\") ||\n\t\t\t\t\tjQuery(elem).prev().hasClass(\"product-small\") ||\n\t\t\t\t\tjQuery(elem).prev().hasClass(\"woocommerce-LoopProduct-link\")\n\t\t\t\t) {\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.viewItemListTrigger.testMode = true\n\n\t\t\t// set up intersection observer\n\t\t\tio = new IntersectionObserver(wpm.observerCallback, {\n\t\t\t\tthreshold: wpmDataLayer.viewItemListTrigger.threshold,\n\t\t\t})\n\n\t\t\tgetAllElementsToWatch()\n\n\t\t\tallIoElementsToWatch.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\tlet 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(function () {\n\t\t\t\t\tif (\n\t\t\t\t\t\tjQuery(this).hasClass(\"type-product\") ||\n\t\t\t\t\t\tjQuery(this).hasClass(\"product-small\") ||\n\t\t\t\t\t\tjQuery(this).hasClass(\"wc-block-grid__product\")\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(this)) {\n\t\t\t\t\t\t\tjQuery(this).data(\"ioid\", ioid++)\n\t\t\t\t\t\t\tio.observe(this)\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\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\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\twpm.deleteCookie = cookieName => {\n\t\twpm.setCookie(cookieName, \"\", -1)\n\t}\n\n\twpm.getWpmSessionData = () => {\n\n\t\tif (window.sessionStorage) {\n\n\t\t\tlet data = window.sessionStorage.getItem(\"_wpm\")\n\n\t\t\tif (data !== null) {\n\t\t\t\treturn JSON.parse(data)\n\t\t\t} else {\n\t\t\t\treturn {}\n\t\t\t}\n\t\t} else {\n\t\t\treturn {}\n\t\t}\n\t}\n\n\twpm.setWpmSessionData = data => {\n\t\tif (window.sessionStorage) {\n\t\t\twindow.sessionStorage.setItem(\"_wpm\", JSON.stringify(data))\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})\n\n\t\t\t} else {\n\n\t\t\t\tconsole.log(\"Pixel Manager for WooCommerce: 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})\n\t\t\t}\n\n\t\t\tconst responseJson = await response.json()\n\n\t\t\tif (responseJson.success) {\n\t\t\t\tconsole.log(\"Pixel Manager for WooCommerce: \" + responseJson.data)\n\t\t\t} else {\n\t\t\t\tconsole.error(\"Pixel Manager for WooCommerce 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.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.cartItemKeys[cartItemKey][\"variation_id\"] === 0) {\n\t\t\tproductId = wpmDataLayer.cartItemKeys[cartItemKey][\"product_id\"]\n\t\t} else {\n\t\t\tproductId = wpmDataLayer.cartItemKeys[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\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\tisVariable : wpmDataLayer.products[productId].isVariable,\n\t\t\tisVariation : wpmDataLayer.products[productId].isVariation,\n\t\t\tparentId : wpmDataLayer.products[productId].parentId,\n\t\t}\n\n\t\tif (product.isVariation) product[\"parentId_dyn_r_ids\"] = wpmDataLayer.products[productId].parentId_dyn_r_ids\n\n\t\treturn product\n\t}\n\n\twpm.setReferrerToCookie = () => {\n\n\t\t// can't use session storage as we can't read it from the server\n\t\tif (!wpm.getCookie(\"wpmReferrer\")) {\n\t\t\twpm.setCookie(\"wpmReferrer\", document.referrer)\n\t\t}\n\t}\n\n\twpm.getReferrerFromCookie = () => {\n\n\t\tif (wpm.getCookie(\"wpmReferrer\")) {\n\t\t\treturn wpm.getCookie(\"wpmReferrer\")\n\t\t} else {\n\t\t\treturn null\n\t\t}\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.version = () => {\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\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.getWpmSessionData()\n\t\treturn data?.loginEventFired\n\t}\n\n\twpm.setLoginEventFired = () => {\n\t\tlet data = wpm.getWpmSessionData()\n\t\tdata[\"loginEventFired\"] = true\n\t\twpm.setWpmSessionData(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\treturn false\n\t\t} else {\n\t\t\treturn false\n\t\t}\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 excludeDomains = [\n\t\t\t\"appspot.com\",\n\t\t\t\"translate.google.com\",\n\t\t]\n\n\t\tif (wpmDataLayer?.general?.excludeDomains) {\n\t\t\texcludeDomains = [...excludeDomains, ...wpmDataLayer.general.excludeDomains]\n\t\t}\n\n\t\t// Abort if URL contains excluded domains\n\t\tif (excludeDomains.some(domain => window.location.href.includes(domain))) {\n\t\t\tconsole.debug(\"Pixel Manager for WooCommerce: Aborted due to excluded domain\")\n\t\t\treturn true\n\t\t}\n\n\t\treturn false\n\t}\n\n\twpm.getRandomEventId = () => (Math.random() + 1).toString(36).substring(2)\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.eligibleForUpdates ? \"yes\" : \"no\")\n\t\t}\n\t\tmessage += \" | version: \" + wpmDataLayer.version.number\n\n\t\tconsole.log(message)\n\t}\n\n\twpm.canLoadPremiumFeatures = () => {\n\t\treturn (wpmDataLayer.version.distro === \"fms\" && wpmDataLayer.version.pro && wpmDataLayer.version.eligibleForUpdates) || wpmDataLayer.version.distro === \"wcm\"\n\t}\n\n\tlet jQueryReadyFired = false\n\n\twpm.triggerDomReadyEvent = () => {\n\t\tif (jQueryReadyFired === false) jQuery(document).trigger(\"pmw:ready\")\n\t\tjQueryReadyFired = true\n\t}\n\n\tjQuery(document).on(\"ready\", () => {\n\t\twpm.triggerDomReadyEvent()\n\t})\n\n\tdocument.addEventListener(\"DOMContentLoaded\", () => {\n\t\twpm.triggerDomReadyEvent()\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\n}(window.wpm = window.wpm || {}, jQuery))\n","/**\n * Load all WPM 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\")\nrequire(\"./cookie_consent\")\nrequire(\"./ip_check\")\n\n// #if process.env.TIER === 'premium'\nif (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 * Copyright 2023 SweetCode. All rights reserved.\n */\n\n(function (wpm, $, undefined) {\n\n\twpm.sendEventPayloadToServer = async payload => {\n\n\t\tconst isServerToServerEnabled = () => {\n\n\t\t\tif (wpmDataLayer?.general?.server2server?.active) return true\n\n\t\t\treturn false\n\t\t}\n\n\t\tconst isServerToServerDisabled = () => {\n\t\t\treturn !isServerToServerEnabled()\n\t\t}\n\n\t\tconst sendPayloadUsingFetch = payload => {\n\n\t\t\t// Send data to pmw public API with fetch API\n\t\t\tfetch(wpm.root + \"pmw/v1/sse/\", {\n\t\t\t\tmethod : \"POST\",\n\t\t\t\tcredentials: \"same-origin\",\n\t\t\t\theaders : {\n\t\t\t\t\t\"Content-Type\": \"application/json\",\n\t\t\t\t},\n\t\t\t\tbody : JSON.stringify(payload),\n\t\t\t\tkeepalive : true,\t// keep connection alive until request is finished\n\t\t\t})\n\t\t\t\t.then(response => response.json())\n\t\t\t\t.then(message => {\n\t\t\t\t\tif (!message.success) {\n\t\t\t\t\t\tconsole.error(message)\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t\t.catch(error => {\n\t\t\t\t\tconsole.error(error)\n\t\t\t\t})\n\n\t\t}\n\n\t\tconst sendPayloadUsingNavigatorSendBeacon = data => {\n\t\t\t// https://css-tricks.com/send-an-http-request-on-page-exit/\n\t\t\tnavigator.sendBeacon(wpm.root + \"pmw/v1/sse/\", data)\n\t\t}\n\n\t\ttry {\n\t\t\t// If server to server is disabled, do not send payload\n\t\t\tif (isServerToServerDisabled()) return\n\n\t\t\t// If IP is blacklisted, do not send data\n\t\t\tif(await wpm.ipCheck() === false) return\n\n\t\t\tif (await wpm.isRestEndpointAvailable()) { // Send data using REST API\n\n\t\t\t\tconst blob = new Blob([JSON.stringify(payload)], {type: \"application/json; charset=UTF-8\"})\n\n\t\t\t\t// navigator.sendBeacon has a limit of 64kb. Fall back to fetch if the blob is too large.\n\t\t\t\tif (blob.size < 60000) {\n\t\t\t\t\tsendPayloadUsingNavigatorSendBeacon(blob)\n\t\t\t\t} else {\n\t\t\t\t\tsendPayloadUsingFetch(payload)\n\t\t\t\t}\n\t\t\t} else { // Send data using wp-ajax\n\n\t\t\t\tjQuery.ajax(\n\t\t\t\t\t{\n\t\t\t\t\t\ttype : \"post\",\n\t\t\t\t\t\tdataType: \"json\",\n\t\t\t\t\t\turl : wpm.ajax_url,\n\t\t\t\t\t\tdata : {\n\t\t\t\t\t\t\taction: \"pmw_server_to_server_event\",\n\t\t\t\t\t\t\tdata : payload,\n\t\t\t\t\t\t},\n\t\t\t\t\t\tsuccess : message => {\n\t\t\t\t\t\t\t// console.log(message)\n\t\t\t\t\t\t},\n\t\t\t\t\t\terror : message => {\n\t\t\t\t\t\t\tconsole.error(message)\n\t\t\t\t\t\t},\n\t\t\t\t\t})\n\t\t\t}\n\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\twpm.acrRemoveCookie = () => {\n\n\t\t// Delete the pmw_checkout_order_created cookie\n\t\t// This cookie is used to verify that the purchase confirmation page has been reached\n\n\t\twpm.deleteCookie(\"pmw_automatic_conversion_recovery\")\n\t}\n\n\twpm.getAcrOrderDetails = async () => {\n\n\t\t// Get the order details from the pmw_automatic_conversion_recovery cookie\n\t\tconst acrOrderDetails = JSON.parse(wpm.getCookie(\"pmw_automatic_conversion_recovery\"))\n\n\t\tlet response\n\n\t\t// Get order details from the server using the REST API if the REST API is available\n\t\tif (await wpm.isRestEndpointAvailable()) {\n\t\t\tresponse = await fetch(wpm.root + \"pmw/v1/acr/order/\", {\n\t\t\t\tmethod : \"POST\",\n\t\t\t\tcredentials: \"same-origin\",\n\t\t\t\tcache : \"no-cache\",\n\t\t\t\theaders : {\n\t\t\t\t\t\"Content-Type\": \"application/json\",\n\t\t\t\t},\n\t\t\t\tbody : JSON.stringify({\n\t\t\t\t\torder_id : acrOrderDetails.order_id,\n\t\t\t\t\torder_key: acrOrderDetails.order_key,\n\t\t\t\t}),\n\t\t\t})\n\n\t\t} else {\n\t\t\t// Get order details from the server using the wp-ajax API if the REST API is not available using jQuery\n\t\t\tresponse = await jQuery.ajax({\n\t\t\t\ttype : \"POST\",\n\t\t\t\tdataType: \"json\",\n\t\t\t\turl : wpm.ajax_url,\n\t\t\t\tdata : {\n\t\t\t\t\taction: \"get_acr_order_data_ajax\",\n\t\t\t\t\tdata : {\n\t\t\t\t\t\torder_id : acrOrderDetails.order_id,\n\t\t\t\t\t\torder_key: acrOrderDetails.order_key,\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t})\n\n\t\t}\n\n\t\tconst responseJson = await response.json()\n\n\t\tif (responseJson.success) {\n\t\t\tconsole.log(\"ACR order details retrieved successfully\")\n\t\t} else {\n\t\t\tconsole.error(\"ACR order details could not be retrieved\", responseJson)\n\t\t}\n\n\t\twpmDataLayer.products = {...wpmDataLayer.products, ...responseJson.data.products}\n\t\twpmDataLayer.order = responseJson.data.order\n\t}\n\n}(window.wpm = window.wpm || {}, jQuery))\n","/**\n * IP Check\n */\n\n(function (wpm, $, undefined) {\n\n\twpm.ipCheck = async () => {\n\n\t\tif (window.sessionStorage && sessionStorage.getItem(\"pmw_ip_valid\")) {\n\t\t\treturn !!JSON.parse(sessionStorage.getItem(\"pmw_ip_valid\"))\n\t\t}\n\n\t\t// Cloudflare takes approx. 70ms to respond\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\tif (isOnBlacklist(data.ip)) {\n\t\t\tif (window.sessionStorage) window.sessionStorage.setItem(\"pmw_ip_valid\", JSON.stringify(false))\n\t\t\treturn false\n\t\t}\n\n\t\tif (window.sessionStorage) window.sessionStorage.setItem(\"pmw_ip_valid\", JSON.stringify(true))\n\t\treturn true\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\tconsole.error(e)\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\n\t\tconst {isRange} = require(\"range_check\")\n\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\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: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:30::/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:3::/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: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: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: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::/64\",\n\t\t\t\"2001:4860:4801:c::/64\",\n\t\t\t\"2001:4860:4801:f::/64\",\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.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.192/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.128/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.128/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.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.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.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.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.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]\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.server2server.ipExcludeList is array\n\t\tif (Array.isArray(wpmDataLayer.general.server2server.ipExcludeList)) {\n\t\t\tcustomExclusionList = wpmDataLayer.general.server2server.ipExcludeList\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","/**\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 * 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 * 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(\"wpmPlaceOrder\", {})\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","// 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 */\nconst main = async () => {\n\n\trequire(\"./wpm/functions_main\")\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// Load all event listeners that depend on document ready\n\tjQuery(document).on(\"pmw:ready\", () => {\n\t\trequire(\"./wpm/event_listeners_on_ready\")\n\t})\n\n\t// Load remaining event listeners\n\trequire(\"./wpm/event_listeners\")\n\n\twpm.loadWcHooksFunctions()\n\n\t// Output PMW console message\n\twpm.pmwConsoleMessage()\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(\"./google/loader\")\n\trequire(\"./facebook/loader\")\n\trequire(\"./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(\"./microsoft-ads/loader\")\n\t\trequire(\"./pinterest/loader\")\n\t\trequire(\"./snapchat/loader\")\n\t\trequire(\"./tiktok/loader\")\n\t\trequire(\"./twitter/loader\")\n\t\trequire(\"./reddit/loader\")\n\t}\n\t// #endif\n\n\t// Preload pixels\n\tdocument.dispatchEvent(new Event(\"wpmPreLoadPixels\"))\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\twpm.triggerDomReadyEvent()\n}\n\nmain()\n\n\n\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","canIFire","loadFacebookPixel","event","payload","fbq","custom_data","eventID","event_id","error","console","setFbUserData","eventData","capi","blob","Blob","JSON","stringify","type","navigator","sendBeacon","root","e","$","fbUserData","fbeventsJsUrl","searchParams","URLSearchParams","window","location","search","has","fbevents_js_url","f","b","v","callMethod","arguments","queue","_fbq","t","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","getCookie","isValidFbp","fbp","isValidFbc","fbc","userAgent","client_user_agent","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","general","variationsOutput","variation_id","String","products","trackCustomFacebookEvent","eventName","customData","eventId","trigger","event_name","user_data","event_source_url","href","fbGetContentIdsFromCart","key","cart","canLoadPremiumFeatures","isEmptyObject","google","ads","conversionIds","status","googleConfigConditionsMet","isVariable","send_events_with_parent_ids","send_to","getGoogleAdsConversionIdentifiers","google_business_vertical","gtagLoaded","then","gtag","getGoogleAdsConversionIdentifiersWithLabel","value_filtered","getGoogleAdsRegularOrderItems","transaction_id","number","new_customer","clv_order_value_filtered","customer_lifetime_value","aw_merchant_id","discount","aw_feed_country","aw_feed_language","conversionIdentifiers","entries","_ref","keys","orderItems","orderItem","analytics","ga4","measurement_id","mp_active","affiliation","value_regular","tax","shipping","coupon","getGA4OrderItems","eec","ga4GetFullProductItemData","item_list_name","shop","list_name","item_list_id","list_id","getCartItemsGa4","cartValue","toFixed","search_term","getSearchTermFromUrl","scrollEvent","threshold","phoneNumber","target","clicked_phone_number","log","getEmailFromTarget","clicked_email","page_load_time_tracking","timeToLoad","performance","now","page_load_time_seconds","item_name","item_category","category","item_id","item_variant","variant_name","item_brand","brand","ga4AddFormattedCategories","item_data","categories","from","Set","max","ga4GetBasicProductItemData","variant","ga4AddListNameToProduct","productPosition","position","canGoogleLoad","loadGoogle","logPreventedPixelLoading","consent_mode","active","getConsentValues","mode","includes","getVisitorConsentStatusAndUpdateGoogleConsentSettings","google_consent_settings","analytics_storage","ad_storage","fireGtagGoogleAds","enhanced_conversions","phone_conversion_label","phone_conversion_number","page_type","enhanced_conversion_data","fireGtagGoogleAnalyticsUA","universal","property_id","parameters","fireGtagGoogleAnalyticsGA4","debug_mode","isGoogleActive","getGoogleGtagId","loadScriptAndCacheIt","script","textStatus","dataLayer","wait_for_update","region","ads_data_redaction","url_passthrough","linker","settings","Date","Promise","resolve","reject","startTime","wait","setTimeout","optimize","container_id","load_google_optimize_pixel","hotjar","site_id","load_hotjar_pixel","o","r","hj","q","_hjSettings","hjid","hjsv","appendChild","bing","uet_tag_id","load_bing_pixel","uetq","ecomm_pagetype","ecomm_prodid","getBingDataLayerProducts","ecomm_query","bing_purchase_ecomm_prodids","revenue_value","bing_purchase_items","w","u","ti","UET","onload","onreadystatechange","readyState","productIds","pinterest","loadPinterestPixel","pintrk","line_items","getPinterestProductData","urlParams","search_query","order_quantity","order_id","pinterestFormattedOrderItems","isVariation","product_name","product_variant_id","product_id","parentId_dyn_r_ids","product_category","product_variant","product_price","product_quantity","product_brand","pinterestLoadEvent","userLoggedIn","sha256","getPinterestUserDataFromBrowser","trackingPermitted","urlHasParameter","isValidEpikCookie","getUrlParameter","click_id","isValidDerivedEpikCookie","cookie","pinterestGetProductDataForCapiEvent","num_items","contents","item_price","getPinterestS2SBaseData","action_source","event_time","round","getRandomEventId","reddit","advertiser_id","loadRedditPixel","itemCount","rdt","transactionId","getRedditAdvertiserId","redditInitEvent","optOut","useDecimalCurrencyValues","externalId","sendEvent","callQueue","snapchat","loadSnapchatPixel","snaptr","item_ids","getSnapchatOrderItemIds","snapchatGetEmail","userInfo","user_hashed_email","handleRequest","contentIds","tiktok","loadTikTokPixel","ttq","track","properties","TiktokAnalyticsObject","methods","setAndDefer","instance","_i","load","_u","_t","_o","page","e164","identity","sha256_email","sha256_phone_number","identify","getTikTokOrderItemIds","content_id","getTikTokUserDataFromBrowser","isValidTtp","ttp","isValidTtclid","ad","url","referrer","startsWith","user_agent","ttclid","twitter","loadTwitterPixel","event_ids","add_to_cart","twq","content_price","productData","view_content","add_to_wishlist","initiate_checkout","search_string","purchase","conversion_id","twitterGetOrderContentIdsV2","twitterGetOrderContentIdsV1","exe","wpmConsentValues","setConsentValueCategories","updateConsentCookieValues","explicitConsent","visitorHasChosen","decodeURI","action","consents","statistics","marketing","getComplianzCookies","cmplz_statistics","cmplz_marketing","getCookieLawInfoCookies","analyticsCookie","adsCookie","thirdparty","advanced","localStorage","getItem","UC_UI","addEventListener","ucUiProcessConsent","areAllConsentsAccepted","groups","groupsObject","group","groupArray","getTermlyCookies","termlyConsent","doesACookieForTheRealCookieBannerExist","waitForLibrary","consentApi","service","cookies","consent","consentSync","cookieOptIn","trim","pmw","consentAcceptAll","ucStatisticsSlug","getSettingsLabels","filter","label","slug","consentAdjustSelectively","getServicesBaseInfo","categorySlug","setConsentDefaultValuesToExplicit","pixelName","canIFireMode","cookie_consent_mgmt","explicit_consent","scriptTagObserver","MutationObserver","mutations","addedNodes","node","shouldScriptBeActive","unblockScript","blockScript","observe","head","childList","subtree","disconnect","element","scriptNode","removeAttach","remove","wpmSrc","attr","appendTo","dispatchEvent","Event","removeAttr","unblockAllScripts","unblockSelectedPixels","explicitConsentStateAlreadySet","updatePixelConsentForPixelTypeCMPs","updateGoogleConsentMode","Cookiebot","detail","cmplzStatusChange","cmplzConsentData","huObserver","_ref2","querySelector","hu","documentElement","body","consentRevokeAll","OneTrust","reload","advertising","duration","consentSetCookie","setCookie","triggerPmwCookieConsentManagementLoaded","URL","currentTarget","productId","getProductIdByCartItemKeyUrl","removeProductFromCart","checkoutButtonSelectors","prepareSelectors","paymentMethodSelected","fireCheckoutProgress","fireCheckoutOption","val","doesWooCommerceCartExist","getCartItems","getAddToCartLinkProductIds","getProductsFromBackend","referrerHostname","hostname","host","wpmLoadFired","product_type","getMainProductIdFromProductPage","getProductDataForViewItemEvent","isOrderIdStored","writeOrderIdToStorage","acrRemoveCookie","hasLoginEventFired","setLoginEventFired","sessionStorage","context","sendEventPayloadToServer","getCartValue","query","startIntersectionObserverToWatch","startProductsMutationObserverToWatch","addToCartSelectors","dataset","addProductToCart","each","find","classes","getPostIdFromString","one","closest","origin","nextAll","getIdBasedOndVariationsOutputSetting","getProductDetailsFormattedForEvent","isEmail","emailSelected","getCartItemsFromBackend","variation","triggerViewItemEventPrep","getAcrOrderDetails","deleteCookie","setItem","scrollTrackingThresholds","scrollVisibilityThreshold","scrollVisibilityThresholdStatus","obj","scrollPosition","scrollTop","height","direction","positionUnit","wpmDeduper","wpmRestSettings","checkCookie","useRestEndpoint","isSessionStorageAvailable","isRestEndpointAvailable","isBelowRestErrorThreshold","testEndpoint","cookieName","response","fetch","method","cache","keepalive","isWpmRestEndpointAvailable","orderId","orderKey","source","Storage","ids","expiresDate","setDate","getDate","toUTCString","storeOrderIdOnServer","orderDeduplication","quantityToRemove","parentId","selectors","saveCartObjectToDataLayer","ajax_url","ok","json","success","headers","pageId","pageType","responseData","assign","cartObject","triggerViewItemEvent","triggerViewItemEventNoProduct","step","checkout_option","triggerViewItemList","viewItemListTriggerTestMode","css","append","viewItemListTrigger","opacity","backgroundColor","io","ioTimeouts","observerCallback","observer","entry","elementId","next","isIntersecting","testMode","unobserve","timeout","clearTimeout","allIoElementsToWatch","ioid","getAllElementsToWatch","elem","parent","hasClass","prev","IntersectionObserver","productsNode","parents","productsMutationObserver","attributes","characterData","mutation","newNodes","hasWpmProductIdElement","siblings","cookieValue","expiryDays","setTime","getTime","expires","ca","decodeURIComponent","c","charAt","getWpmSessionData","setWpmSessionData","orderDetails","order_key","responseJson","cartItemKey","cartItemKeys","list_position","setReferrerToCookie","getReferrerFromCookie","getClidFromBrowser","clidCookieId","clidId","gclid","dclid","getUserAgent","getViewPort","width","clientWidth","innerWidth","clientHeight","innerHeight","options","dataType","ajax","getOrderItemPrice","total","total_tax","loginEventFired","pageLoaded","waitForVar","pageReady","isMiniCartActive","parameter","hashAsync","algo","str","crypto","subtle","digest","TextEncoder","encode","buf","Uint8Array","patterns","pattern","excludeDomainFromTracking","excludeDomains","domain","debug","pmwConsoleMessage","message","pro","distro","eligibleForUpdates","jQueryReadyFired","triggerDomReadyEvent","jQueryExists","waitForjQuery","library","interval","wpmDataLayerFullyLoaded","checkVar","logTimeoutId","wpHooksExists","wp","hooks","loadWcHooksFunctions","isServerToServerDisabled","server2server","ipCheck","credentials","catch","sendPayloadUsingFetch","acrOrderDetails","text","pair","isOnBlacklist","ipName","getBlacklist","isCidr","customExclusionList","ipExcludeList","addAction","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","definition","g","globalThis","Function","prop","hasOwnProperty","Symbol","toStringTag","main"],"sourceRoot":""}