{"version":3,"sources":["webpack:///./src/components/pmicom/widgets/timeline-widget/_style.scss","webpack:///./src/components/pmicom/widgets/timeline-widget/controller.js"],"names":["timelineGap","timelineTopMargin","timelineGapMobile","timelineTopMarginMobile","require","stuttering","default","onWidthResize","asyncImport","slowDelay","breakMedium","getNumber","mediaQueryMin","trackGtm","trackGtm4","duration","INACTIVE","ACTIVE","module","exports","init","title","root","querySelector","steps","Array","from","querySelectorAll","baseDescription","stepsLine","dots","previousButton","nextButton","baseStep","current","touch","Hammer","initEvents","resize","forEach","step","i","addEventListener","updateIndex","gtm4Tracking","on","gtmTracking","bind","DEBOUNCE","getSteps","stepTitle","stepNumber","classList","contains","innerText","trim","stepObject","number","event","widget_name","widget_title","timeline_widget_step_number","timeline_widget_step_title","mobile","stepsWidth","stepsHeight","getStepsLargestSizes","setSpacingsBetweenSteps","spacing","margin","style","marginTop","switchToStep","timelineSpace","clientWidth","marginLeft","marginRight","getIndexPosition","percent","hMax","wMax","content","height","clientHeight","width","newIndex","max","length","add","remove","setStepActivation","active","index","oldStep","newStep","oldDot","newDot","space","Math","abs","to","delay","transitionDuration","currentStep","textContent","eventCategory","eventAction","eventLabel"],"mappings":";;;;;;;;;AAAA,kBAAkB,qG;;;;;;;;;;;ACAlB;AACA,MAAM;EACLA,WADK;EAELC,iBAFK;EAGLC,iBAHK;EAILC;AAJK,IAKFC,mBAAO,CAAC,0JAAD,CALX;AAMA;;;AACA,MAAM;EAAEC,UAAF;EAAcC,OAAO,EAAEC;AAAvB,IAAyCH,mBAAO,CAAC,qDAAD,CAAtD;;AACA,MAAMI,WAAW,GAAGJ,mBAAO,CAAC,iDAAD,CAAP,CAA4BE,OAAhD;;AAEA,MAAM;EACLA,OAAO,EAAE;IAAEG,SAAF;IAAaC;EAAb;AADJ,IAEFN,mBAAO,CAAC,uDAAD,CAFX;;AAGA,MAAM;EACLO,SADK;EAELC,aAFK;EAGLC,QAHK;EAILC;AAJK,IAKFV,mBAAO,CAAC,6CAAD,CALX;;A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caf70696.js","sourcesContent":["module.exports = {\"timelineGap\":\"15\",\"timelineGapMobile\":\"10\",\"timelineTopMargin\":\"60\",\"timelineTopMarginMobile\":\"40\"};","/* eslint-disable */\r\nconst {\r\n\ttimelineGap,\r\n\ttimelineTopMargin,\r\n\ttimelineGapMobile,\r\n\ttimelineTopMarginMobile,\r\n} = require('!!sass-variable-loader!./_style.scss');\r\n/* eslint-enable */\nconst { stuttering, default: onWidthResize } = require('util/onWidthResize');\nconst asyncImport = require('util/asyncImport').default;\n\nconst {\n\tdefault: { slowDelay, breakMedium },\n} = require('util/sass-variables');\nconst {\n\tgetNumber,\n\tmediaQueryMin,\n\ttrackGtm,\n\ttrackGtm4,\n} = require('util/functions');\nconst duration = getNumber(slowDelay) * 1000;\n\nconst INACTIVE = 'inactive';\nconst ACTIVE = 'active';\n\nmodule.exports = {\n\tasync init() {\n\t\tthis.title = this.root.querySelector('.timeline-widget--title');\n\t\tthis.steps = Array.from(this.root.querySelectorAll('.step'));\n\t\tthis.baseDescription = this.root.querySelector(\n\t\t\t'.timeline-widget--step-description',\n\t\t);\n\t\tthis.stepsLine = this.root.querySelector('.timeline-widget--steps');\n\t\tthis.dots = this.root.querySelectorAll('.carousel-dot');\n\t\tthis.previousButton = this.root.querySelector('.timeline-widget--previous');\n\t\tthis.nextButton = this.root.querySelector('.timeline-widget--next');\n\t\tthis.baseStep = this.steps[0];\n\t\tthis.current = 0;\n\t\tawait asyncImport(this, 'Hammer');\n\t\tthis.touch = new this.Hammer(this.root);\n\t\tthis.initEvents();\n\t\tthis.resize();\n\t},\n\tinitEvents() {\n\t\tthis.steps.forEach((step, i) => {\n\t\t\tstep.addEventListener('click', () => {\n\t\t\t\tthis.updateIndex(i);\n\t\t\t\tthis.gtm4Tracking(this.title);\n\t\t\t});\n\t\t});\n\t\tthis.previousButton.addEventListener('click', () => {\n\t\t\tthis.updateIndex(this.current - 1);\n\t\t\tthis.gtm4Tracking(this.title);\n\t\t});\n\t\tthis.nextButton.addEventListener('click', () => {\n\t\t\tthis.updateIndex(this.current + 1);\n\t\t\tthis.gtm4Tracking(this.title);\n\t\t});\n\t\tthis.touch.on('swipeleft', () => {\n\t\t\tthis.updateIndex(this.current + 1);\n\t\t\tthis.gtm4Tracking(this.title);\n\t\t});\n\t\tthis.touch.on('swiperight', () => {\n\t\t\tthis.updateIndex(this.current - 1);\n\t\t\tthis.gtm4Tracking(this.title);\n\t\t});\n\t\tthis.gtmTracking();\n\t\tonWidthResize(this.resize.bind(this), stuttering.DEBOUNCE, 10);\n\t},\n\tgetSteps() {\n\t\tlet stepTitle;\n\t\tlet stepNumber;\n\t\tthis.steps.forEach((step, i) => {\n\t\t\tif (step.classList.contains('active')) {\n\t\t\t\tstepTitle = step.querySelector('.step--title').innerText.trim();\n\t\t\t\tstepNumber = i + 1;\n\t\t\t}\n\t\t});\n\t\tconst stepObject = {\n\t\t\ttitle: stepTitle,\n\t\t\tnumber: stepNumber,\n\t\t};\n\t\treturn stepObject;\n\t},\n\tgtm4Tracking(title) {\n\t\tconst stepObject = this.getSteps();\n\t\ttrackGtm4({\n\t\t\tevent: 'GA4_event_c_timeline',\n\t\t\twidget_name: 'V3-Timeline-widget',\n\t\t\twidget_title: title ? title.innerText.trim() : 'No title',\n\t\t\ttimeline_widget_step_number: stepObject.number\n\t\t\t\t? stepObject.number\n\t\t\t\t: 'undefined',\n\t\t\ttimeline_widget_step_title: stepObject.title\n\t\t\t\t? stepObject.title\n\t\t\t\t: 'No title',\n\t\t});\n\t},\n\tresize() {\n\t\tthis.mobile = !mediaQueryMin(breakMedium);\n\t\tconst [stepsWidth, stepsHeight] = this.getStepsLargestSizes();\n\t\tthis.setSpacingsBetweenSteps(stepsWidth);\n\t\tconst spacing = getNumber(\n\t\t\tthis.mobile ? timelineTopMarginMobile : timelineTopMargin,\n\t\t);\n\t\tconst margin = stepsHeight + spacing;\n\t\tthis.stepsLine.style.marginTop = margin + 'px';\n\t\tthis.switchToStep(this.current);\n\t},\n\tsetSpacingsBetweenSteps(stepsWidth) {\n\t\tthis.timelineSpace = ((stepsWidth + 50) / this.stepsLine.clientWidth) * 100;\n\t\tthis.steps.forEach((step, i) => {\n\t\t\tconst margin = this.timelineSpace / 2 + '%';\n\t\t\tif (i)\n\t\t\t\t// first one should keep its 50% margin on left\n\t\t\t\tstep.style.marginLeft = margin;\n\t\t\tstep.style.marginRight = margin;\n\t\t});\n\t\tif (this.mobile) this.timelineGap = timelineGapMobile;\n\t\telse this.timelineGap = timelineGap;\n\t},\n\t// get the margin to scroll the steps to a certain one\n\tgetIndexPosition(i) {\n\t\tconst percent = 50 - i * this.timelineSpace - (i ? this.timelineGap : 0);\n\t\treturn percent;\n\t},\n\tgetStepsLargestSizes() {\n\t\tlet hMax = 0;\n\t\tlet wMax = 0;\n\t\tthis.steps.forEach(step => {\n\t\t\tconst content = step.querySelector('.step--content');\n\t\t\tconst height = content.clientHeight;\n\t\t\tconst width = content.clientWidth;\n\t\t\tif (hMax < height) hMax = height;\n\t\t\tif (wMax < width) wMax = width;\n\t\t});\n\t\treturn [wMax, hMax];\n\t},\n\t// check index overflow, wrap if needed and switch to new step\n\tupdateIndex(i) {\n\t\tlet newIndex = i;\n\t\tconst max = this.steps.length - 1;\n\t\tif (i < 0) newIndex = max;\n\t\tif (i > max) newIndex = 0;\n\n\t\tif (newIndex === 0) this.previousButton.classList.add(INACTIVE);\n\t\telse this.previousButton.classList.remove(INACTIVE);\n\t\tif (newIndex === max) this.nextButton.classList.add(INACTIVE);\n\t\telse this.nextButton.classList.remove(INACTIVE);\n\t\tthis.switchToStep(newIndex);\n\t\tthis.gtmTracking();\n\t},\n\t// ungrey step and add margins\n\tsetStepActivation(step, active) {\n\t\tconst margin =\n\t\t\t(this.timelineSpace + (active ? this.timelineGap * 2 : 0)) / 2 + '%';\n\t\tstep.classList[active ? 'add' : 'remove'](ACTIVE);\n\t\tstep.style.marginLeft = margin;\n\t\tstep.style.marginRight = margin;\n\t},\n\tswitchToStep(index) {\n\t\tconst oldStep = this.steps[this.current];\n\t\tconst newStep = this.steps[index];\n\t\tconst oldDot = this.dots[this.current];\n\t\tconst newDot = this.dots[index];\n\t\tconst space = Math.abs(this.current - index);\n\t\tconst to = this.getIndexPosition(index);\n\n\t\t// evaluate the animation delay\n\t\tlet delay = (duration * space) / 1000;\n\t\tif (delay > 1.25) delay = 1.25;\n\t\tdelay += 's';\n\n\t\t// set and unset steps\n\t\tthis.setStepActivation(oldStep, false);\n\t\tthis.setStepActivation(newStep, true);\n\t\toldDot.classList.remove(ACTIVE);\n\t\tnewDot.classList.add(ACTIVE);\n\n\t\t// position and time steps animation\n\t\tthis.baseStep.style.marginLeft = to + '%';\n\t\tthis.baseDescription.style.marginLeft = -index * 200 + '%';\n\t\tthis.baseStep.style.transitionDuration = delay;\n\t\tthis.baseDescription.style.transitionDuration = delay;\n\t\tthis.current = index;\n\t},\n\tgtmTracking() {\n\t\tconst { steps, current, title } = this;\n\t\tconst currentStep = steps[current];\n\t\tconst stepTitle = currentStep.querySelector('.step--title').textContent;\n\t\ttrackGtm({\n\t\t\teventCategory: 'timeline',\n\t\t\teventAction: title ? title.textContent : 'Main title is not set',\n\t\t\teventLabel: `${current} | ${stepTitle}`,\n\t\t});\n\t},\n};\n"],"sourceRoot":""}