{"version":3,"sources":["webpack:///./src/feature/gtm-ecomm-click/gtm-ecomm-click.js","webpack:///./node_modules/core-js/modules/es.object.get-prototype-of.js","webpack:///./node_modules/core-js/modules/es.function.name.js","webpack:///./node_modules/core-js/modules/es.string.anchor.js","webpack:///./node_modules/core-js/internals/create-html.js","webpack:///./node_modules/core-js/internals/forced-string-html-method.js"],"names":["GtmEcommDetail","element","initDomCache","data","JSON","parse","dataset","click","anchor","dom","url","getAttribute","ecommData","event","ecommerce","actionField","list","products","name","id","price","brand","category","variant","position","eventCallback","eventTimeout","init","ecommDataProduct","this","document","location","log","addEventListener","e","preventDefault","stopPropagation","push","window","dataLayer","BaseFeature","$","fails","toObject","nativeGetPrototypeOf","CORRECT_PROTOTYPE_GETTER","target","stat","forced","sham","getPrototypeOf","it","DESCRIPTORS","defineProperty","f","FunctionPrototype","Function","prototype","FunctionPrototypeToString","toString","nameRE","configurable","get","call","match","error","createHTML","proto","forcedStringHTMLMethod","requireObjectCoercible","quot","module","exports","string","tag","attribute","value","S","String","p1","replace","METHOD_NAME","test","toLowerCase","split","length"],"mappings":"28BAEMA,E,YACL,WAAYC,GAAS,a,4FAAA,UACpB,wBAAMA,KAEDA,QAAUA,EAEf,EAAKC,eAEL,EAAKC,KAAOC,KAAKC,MAAMJ,EAAQK,QAAQC,OACvC,EAAKC,OAAS,EAAKC,IAAID,OACvB,EAAKE,IAAM,EAAKF,OAAOG,aAAa,QACpC,EAAKC,UAAY,CAChBC,MAAO,eACPC,UAAW,CACVP,MAAO,CACNQ,YAAa,CAAEC,KAAM,IACrBC,SAAU,CAAC,CACVC,KAAM,GACNC,GAAI,GACJC,MAAO,GACPC,MAAO,GACPC,SAAU,GACVC,QAAS,GACTC,SAAU,OAIbC,cAAe,GACfC,aAAc,KAGf,EAAKC,OA9Be,E,8RAiCd,WACAC,EAAmBC,KAAKjB,UAAUE,UAAUP,MAAMU,SAAS,GACjEW,EAAiBV,KAAOW,KAAK1B,KAAKe,KAClCU,EAAiBT,GA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OAAQ,SAAUqB,OAAO,EAAMnB,OAJN,EAAQ,IAIMoB,CAAuB,WAAa,CAC7E5D,OAAQ,SAAgBU,GACtB,OAAOgD,EAAWrC,KAAM,IAAK,OAAQX,O,oBCTzC,IAAImD,EAAyB,EAAQ,IAEjCC,EAAO,KAIXC,EAAOC,QAAU,SAAUC,EAAQC,EAAKC,EAAWC,GACjD,IAAIC,EAAIC,OAAOT,EAAuBI,IAClCM,EAAK,IAAML,EAEf,MADkB,KAAdC,IAAkBI,GAAM,IAAMJ,EAAY,KAAOG,OAAOF,GAAOI,QAAQV,EAAM,UAAY,KACtFS,EAAK,IAAMF,EAAI,KAAOH,EAAM,M,oBCVrC,IAAIhC,EAAQ,EAAQ,GAIpB6B,EAAOC,QAAU,SAAUS,GACzB,OAAOvC,GAAM,WACX,IAAIwC,EAAO,GAAGD,GAAa,KAC3B,OAAOC,IAASA,EAAKC,eAAiBD,EAAKE,MAAM,KAAKC,OAAS","file":"2-d65c2934.pkg.js","sourcesContent":["import BaseFeature from '../../foundation/base/base';\r\n\r\nclass GtmEcommDetail extends BaseFeature {\r\n\tconstructor(element) {\r\n\t\tsuper(element);\r\n\r\n\t\tthis.element = element;\r\n\r\n\t\tthis.initDomCache();\r\n\r\n\t\tthis.data = JSON.parse(element.dataset.click);\r\n\t\tthis.anchor = this.dom.anchor;\r\n\t\tthis.url = this.anchor.getAttribute('href');\r\n\t\tthis.ecommData = {\r\n\t\t\tevent: 'productClick',\r\n\t\t\tecommerce: {\r\n\t\t\t\tclick: {\r\n\t\t\t\t\tactionField: { list: '' },\r\n\t\t\t\t\tproducts: [{\r\n\t\t\t\t\t\tname: '',\r\n\t\t\t\t\t\tid: '',\r\n\t\t\t\t\t\tprice: '',\r\n\t\t\t\t\t\tbrand: '',\r\n\t\t\t\t\t\tcategory: '',\r\n\t\t\t\t\t\tvariant: '',\r\n\t\t\t\t\t\tposition: ''\r\n\t\t\t\t\t}]\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\teventCallback: '',\r\n\t\t\teventTimeout: 250\r\n\t\t};\r\n\r\n\t\tthis.init();\r\n\t}\r\n\r\n\tinit() {\r\n\t\tconst ecommDataProduct = this.ecommData.ecommerce.click.products[0];\r\n\t\tecommDataProduct.name = this.data.name;\r\n\t\tecommDataProduct.id = this.data.id;\r\n\t\tecommDataProduct.price = this.data.price;\r\n\t\tecommDataProduct.brand = this.data.brand;\r\n\t\tecommDataProduct.category = this.data.category;\r\n\t\tecommDataProduct.variant = this.data.variant;\r\n\t\tecommDataProduct.position = this.data.position;\r\n\r\n\t\tthis.ecommData.ecommerce.click.actionField.list = this.data.list;\r\n\r\n\t\tthis.ecommData.eventCallback = () => {\r\n\t\t\tdocument.location = this.url;\r\n\t\t};\r\n\r\n\t\tthis.log(this.ecommData);\r\n\r\n\t\tthis.anchor.addEventListener('click', (e) => {\r\n\t\t\te.preventDefault();\r\n\t\t\te.stopPropagation();\r\n\r\n\t\t\tthis.log('click');\r\n\t\t\tthis.log(this.ecommData);\r\n\t\t\tthis.push();\r\n\t\t});\r\n\t}\r\n\r\n\tpush() {\r\n\t\tif (window.dataLayer) {\r\n\t\t\twindow.dataLayer.push(this.ecommData);\r\n\t\t}\r\n\t}\r\n}\r\n\r\nexport default GtmEcommDetail;\r\n","var $ = require('../internals/export');\nvar fails = require('../internals/fails');\nvar toObject = require('../internals/to-object');\nvar nativeGetPrototypeOf = require('../internals/object-get-prototype-of');\nvar CORRECT_PROTOTYPE_GETTER = require('../internals/correct-prototype-getter');\n\nvar FAILS_ON_PRIMITIVES = fails(function () { nativeGetPrototypeOf(1); });\n\n// `Object.getPrototypeOf` method\n// https://tc39.github.io/ecma262/#sec-object.getprototypeof\n$({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES, sham: !CORRECT_PROTOTYPE_GETTER }, {\n getPrototypeOf: function getPrototypeOf(it) {\n return nativeGetPrototypeOf(toObject(it));\n }\n});\n\n","var DESCRIPTORS = require('../internals/descriptors');\nvar defineProperty = require('../internals/object-define-property').f;\n\nvar FunctionPrototype = Function.prototype;\nvar FunctionPrototypeToString = FunctionPrototype.toString;\nvar nameRE = /^\\s*function ([^ (]*)/;\nvar NAME = 'name';\n\n// Function instances `.name` property\n// https://tc39.github.io/ecma262/#sec-function-instances-name\nif (DESCRIPTORS && !(NAME in FunctionPrototype)) {\n defineProperty(FunctionPrototype, NAME, {\n configurable: true,\n get: function () {\n try {\n return FunctionPrototypeToString.call(this).match(nameRE)[1];\n } catch (error) {\n return '';\n }\n }\n });\n}\n","'use strict';\nvar $ = require('../internals/export');\nvar createHTML = require('../internals/create-html');\nvar forcedStringHTMLMethod = require('../internals/forced-string-html-method');\n\n// `String.prototype.anchor` method\n// https://tc39.github.io/ecma262/#sec-string.prototype.anchor\n$({ target: 'String', proto: true, forced: forcedStringHTMLMethod('anchor') }, {\n anchor: function anchor(name) {\n return createHTML(this, 'a', 'name', name);\n }\n});\n","var requireObjectCoercible = require('../internals/require-object-coercible');\n\nvar quot = /\"/g;\n\n// B.2.3.2.1 CreateHTML(string, tag, attribute, value)\n// https://tc39.github.io/ecma262/#sec-createhtml\nmodule.exports = function (string, tag, attribute, value) {\n var S = String(requireObjectCoercible(string));\n var p1 = '<' + tag;\n if (attribute !== '') p1 += ' ' + attribute + '=\"' + String(value).replace(quot, '"') + '\"';\n return p1 + '>' + S + '';\n};\n","var fails = require('../internals/fails');\n\n// check the existence of a method, lowercase\n// of a tag and escaping quotes in arguments\nmodule.exports = function (METHOD_NAME) {\n return fails(function () {\n var test = ''[METHOD_NAME]('\"');\n return test !== test.toLowerCase() || test.split('\"').length > 3;\n });\n};\n"],"sourceRoot":""}