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B,EACFrE,EAAQf,SAAUiF,EAAKe,MAAiBrD,EAATsC,EAAKtC,EAAQsC,EAAKgB,MAAiBhG,EAATgF,EAAKhF,IAE9DgF,EAAKgB,QAAUzD,EAAOe,UAAY0B,EAAKhF,GACvCgF,EAAKe,QAAUxD,EAAOkB,WAAauB,EAAKtC,KAGtCgD,GAAmB,IAAVQ,GAAyB,IAAVA,IAC1BlG,EAAIuC,EAAOe,UACXZ,EAAIH,EAAOkB,WACXkC,EAAapD,EAAOlE,MAAMuH,eAAiBD,EAAapD,EAAOlE,MAAM0I,eAAe,oBACpFxE,EAAOe,UAAYtD,EAAI,EAEvBuC,EAAOkB,WAAaf,EAAI,EACxBH,EAAOe,UAAYtD,EACnBuC,EAAOkB,WAAaf,GAGtBsC,EAAKQ,MAAQR,EAAKtC,EAClBsC,EAAKS,MAAQT,EAAKhF,CACpB,EACA2G,KAAM,SAAcK,GAClB,IAAIC,EAAoB,aAAbD,GAEPC,GAAqB,eAAbD,KACV5L,KAAK2K,MAAQ,IAGXkB,GAAqB,eAAbD,KACV5L,KAAK4K,MAAQ,EAEjB,GAEFhL,EAAe+G,IAAMP,EACrBxG,EAAekM,UAAYrE,EAC3B7H,EAAemM,YAAcnF,EAC7BZ,KAActG,EAAKC,eAAeC,E","sources":["webpack://tombras/./js/components/Video.js","webpack://tombras/./node_modules/gsap/ScrollToPlugin.js"],"sourcesContent":["import { componentAnimationHandler } from \"../animations/AnimationHandler\";\nimport {\n\tani,\n\tDEFAULT_TIME_SHORT,\n\tDEFAULT_TIME,\n\tFINISH_OPACITY,\n\tSTART_OPACITY,\n\tDEFAULT_EASE,\n} from \"../animations/config\";\nimport gsap from \"gsap\";\nimport { gtmPush } from \"../analytics\";\nimport {\n\tcallFnIfEnterKeyWasPressed,\n\tisMobile,\n\tplayMobileFullscreenHelper,\n} from \"../utils\";\nimport ScrollToPlugin from \"gsap/ScrollToPlugin\";\n\ngsap.registerPlugin(ScrollToPlugin);\n\nclass Video {\n\tconstructor(el) {\n\t\tthis.el = el;\n\t\tthis.stream = el.querySelector(\"stream\");\n\t\tthis.startedPlaying;\n\n\t\tthis.tl = null;\n\n\t\t// is single block\n\t\tthis.isSingle = !!el.closest(\".one-col\");\n\n\t\tthis.closeBtn = el.querySelector(\".btn--close\");\n\n\t\t// play button\n\t\tthis.playBtn = el.querySelector(\".component-play-btn\");\n\t\tthis.hasPlayBtn = !!this.playBtn;\n\n\t\t// poster\n\t\tthis.poster = el.querySelector(\".poster\");\n\t\tthis.hasPoster = !!this.poster;\n\t\tif (this.hasPoster) {\n\t\t\tthis.handlePoster();\n\t\t}\n\n\t\t// events\n\t\tthis.setupEvents(el);\n\t\tcomponentAnimationHandler.add(el);\n\t}\n\n\tsetupEvents(el) {\n\t\tel.addEventListener(\"inview\", this.animate.bind(this));\n\n\t\tif (this.hasPoster && this.isSingle) {\n\t\t\tthis.el\n\t\t\t\t.querySelector(\".poster\")\n\t\t\t\t.addEventListener(\"click\", this.play.bind(this));\n\t\t} else if (this.hasPoster && !this.isSingle) {\n\t\t\tthis.el\n\t\t\t\t.querySelector(\".poster\")\n\t\t\t\t.addEventListener(\"click\", this.playMultiCol.bind(this));\n\t\t}\n\n\t\tif (this.closeBtn) {\n\t\t\tconst reverse = () => {\n\t\t\t\tthis.tl.reverse(0);\n\t\t\t\tthis.closeBtn.setAttribute(\"tabIndex\", -1);\n\t\t\t};\n\t\t\tthis.closeBtn.addEventListener(\"click\", reverse);\n\t\t\tthis.closeBtn.addEventListener(\n\t\t\t\t\"click\",\n\t\t\t\tcallFnIfEnterKeyWasPressed(reverse),\n\t\t\t);\n\t\t}\n\n\t\tif (isMobile() && this.stream) {\n\t\t\tdocument.addEventListener(\"webkitfullscreenchange\", () => {\n\t\t\t\tif (isMobile()) {\n\t\t\t\t\tconst fullscreenEl =\n\t\t\t\t\t\tdocument.fullscreenElement ||\n\t\t\t\t\t\tdocument.mozFullScreenElement ||\n\t\t\t\t\t\tdocument.webkitFullscreenElement;\n\t\t\t\t\tif (!fullscreenEl) {\n\t\t\t\t\t\tthis.stream.pause();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tthis.stream.addEventListener(\"webkitendfullscreen\", () => {\n\t\t\t\tthis.stream.pause();\n\t\t\t});\n\t\t}\n\t}\n\n\thandlePoster() {\n\t\tif (!this.isSingle) {\n\t\t\tconst img = this.poster.querySelector(\"img\");\n\t\t\t// https://videodelivery.net/3f6d74ffd5ba09401d5694178f3f33f4/thumbnails/thumbnail.jpg?width=1380\n\t\t\tconst oldSrc = (\n\t\t\t\timg.getAttribute(\"data-src\") || img.getAttribute(\"src\")\n\t\t\t).split(\"?width\");\n\t\t\timg.src = `${oldSrc[0]}?height=600&width=495`;\n\t\t}\n\t}\n\n\tplayMultiCol() {\n\t\tconsole.log(\"playing multi col\");\n\t\tconst el = this.el;\n\t\tconst section = this.el.closest(\".section\");\n\t\tconst hiderDiv = section.querySelector(\".hider-overlay\") || document.createElement(\"div\");\n\t\tconst video = this.el.querySelector(\"stream\");\n\t\tconst close = this.el.querySelector(\".btn--close\");\n\t\tconst poster = section.querySelector(\".poster\");\n\t\tconst wysiwyg = section.querySelector(\".wysiwyg\");\n\t\tconst squareVideo = this.el.classList.contains(\"square\");\n\t\tconst verticalVideo = this.el.classList.contains(\"vertical\");\n\t\tconst headerHeight = document.getElementById(\"site-header\").offsetHeight + 40;\n\n\t\tif (isMobile()) {\n\t\t\tvideo.style.display = \"block\";\n\t\t\tplayMobileFullscreenHelper(video, \"multi-col\");\n\t\t\treturn;\n\t\t}\n\n\t\tconst stuffToHide = [poster];\n\t\tif (wysiwyg) {\n\t\t\tstuffToHide.push(wysiwyg);\n\t\t}\n\n\t\thiderDiv.classList.add(\"hider-overlay\");\n\t\tthis.closeBtn.setAttribute(\"tabIndex\", 0);\n\t\tsection.appendChild(hiderDiv);\n\n\t\tconst tl = gsap.timeline({\n\t\t\tonReverseComplete: function () {\n\t\t\t\tconsole.log(\"reverse complete\");\n\t\t\t\tsection.style = \"\";\n\t\t\t\tvideo.style = \"\";\n\t\t\t\tsection.querySelectorAll(\"stream\").forEach(el => el.style= \"\")\n\t\t\t\tsection.querySelectorAll(\".poster\").forEach(el => el.style= \"\");\n\t\t\t\tclose.classList.remove(\"active\");\n\t\t\t\tel.classList.remove(\"override-relative\");\n\t\t\t}\n\t\t});\n\t\ttl.to(hiderDiv, DEFAULT_TIME_SHORT, { scaleX: 1 });\n\t\t// TODO set the padding top based on the proportion of the video\n\t\ttl.to(section, DEFAULT_TIME, {\n\t\t\tpaddingTop: squareVideo\n\t\t\t\t? `calc(100vh - ${headerHeight}px)`\n\t\t\t\t: verticalVideo\n\t\t\t\t\t? `calc(100vh - ${headerHeight}px)`\n\t\t\t\t\t: `calc(56vw - ${50 * .56}px)`,\n\t\t\twidth: squareVideo\n\t\t\t\t? `calc(100vh - ${headerHeight}px)`\n\t\t\t\t: verticalVideo\n\t\t\t\t\t? `calc(56vh - ${headerHeight * .56}px)`\n\t\t\t\t\t: `calc(100vw - 50px)`,\n\t\t\tmarginLeft: \"auto\",\n\t\t\tmarginRight: \"auto\",\n\t\t\theight: 0,\n\t\t\toverflow: \"hidden\",\n\t\t});\n\t\ttl.set(video, { display: \"block\", zIndex: 1 });\n\t\ttl.set(stuffToHide, { display: \"none\" });\n\t\ttl.call(() => {\n\t\t\tvideo.paused ? video.play() : video.pause();\n\t\t\tthis.el.classList.add(\"override-relative\");\n\t\t\tclose.classList.add(\"active\");\n\t\t});\n\t\ttl.to(window, 0.1, {\n\t\t\tscrollTo: {\n\t\t\t\ty: section,\n\t\t\t\toffsetY: verticalVideo || squareVideo ? headerHeight - 20 : headerHeight\n\t\t\t}\n\t\t});\n\t\ttl.to(hiderDiv, 0.4, { transformOrigin: \"left center\", scaleX: 0 });\n\t\ttl.to(close, DEFAULT_TIME_SHORT, FINISH_OPACITY);\n\n\t\tthis.tl = tl;\n\t}\n\n\tplay() {\n\t\tif (isMobile()) {\n\t\t\tconst video = this.el.querySelector(\"stream\");\n\t\t\tvideo.style.display = \"block\";\n\t\t\tif (this.hasPoster) {\n\t\t\t\tthis.poster.style.display = \"none\";\n\t\t\t}\n\t\t\tplayMobileFullscreenHelper(video, \"one column video\");\n\t\t\treturn;\n\t\t}\n\n\t\tconsole.log(\"Playing single column video\");\n\t\tconst tl = gsap.timeline();\n\t\tif (this.hasPoster) {\n\t\t\ttl.set(this.el.querySelector(\".hidden-video\"), { display: \"block\" });\n\t\t\ttl.to(this.poster, DEFAULT_TIME_SHORT, ani(START_OPACITY, DEFAULT_EASE));\n\t\t\ttl.set(this.poster, { pointerEvents: \"none\" });\n\t\t}\n\n\t\t// TODO: send some cool analytics\n\t\tgtmPush({\n\t\t\tevent: \"Play Videos\",\n\t\t\tcategory: \"Videos\",\n\t\t});\n\n\t\ttl.call(this.stream.play);\n\t\tthis.tl = tl;\n\t}\n\n\tpause() {\n\t\tthis.stream.pause();\n\t}\n\n\tanimate() {}\n}\n\nexport default Video;\nexport const instantiatedVideos = [\n\t...document.querySelectorAll(\".media-video-block\"),\n].map(el => new Video(el));\n","/*!\n * ScrollToPlugin 3.9.1\n * https://greensock.com\n *\n * @license Copyright 2008-2021, GreenSock. All rights reserved.\n * Subject to the terms at https://greensock.com/standard-license or for\n * Club GreenSock members, the agreement issued with that membership.\n * @author: Jack Doyle, jack@greensock.com\n*/\n\n/* eslint-disable */\nvar gsap,\n _coreInitted,\n _window,\n _docEl,\n _body,\n _toArray,\n _config,\n _windowExists = function _windowExists() {\n return typeof window !== \"undefined\";\n},\n _getGSAP = function _getGSAP() {\n return gsap || _windowExists() && (gsap = window.gsap) && gsap.registerPlugin && gsap;\n},\n _isString = function _isString(value) {\n return typeof value === \"string\";\n},\n _isFunction = function _isFunction(value) {\n return typeof value === \"function\";\n},\n _max = function _max(element, axis) {\n var dim = axis === \"x\" ? \"Width\" : \"Height\",\n scroll = \"scroll\" + dim,\n client = \"client\" + dim;\n return element === _window || element === _docEl || element === _body ? Math.max(_docEl[scroll], _body[scroll]) - (_window[\"inner\" + dim] || _docEl[client] || _body[client]) : element[scroll] - element[\"offset\" + dim];\n},\n _buildGetter = function _buildGetter(e, axis) {\n //pass in an element and an axis (\"x\" or \"y\") and it'll return a getter function for the scroll position of that element (like scrollTop or scrollLeft, although if the element is the window, it'll use the pageXOffset/pageYOffset or the documentElement's scrollTop/scrollLeft or document.body's. Basically this streamlines things and makes a very fast getter across browsers.\n var p = \"scroll\" + (axis === \"x\" ? \"Left\" : \"Top\");\n\n if (e === _window) {\n if (e.pageXOffset != null) {\n p = \"page\" + axis.toUpperCase() + \"Offset\";\n } else {\n e = _docEl[p] != null ? _docEl : _body;\n }\n }\n\n return function () {\n return e[p];\n };\n},\n _clean = function _clean(value, index, target, targets) {\n _isFunction(value) && (value = value(index, target, targets));\n\n if (typeof value !== \"object\") {\n return _isString(value) && value !== \"max\" && value.charAt(1) !== \"=\" ? {\n x: value,\n y: value\n } : {\n y: value\n }; //if we don't receive an object as the parameter, assume the user intends \"y\".\n } else if (value.nodeType) {\n return {\n y: value,\n x: value\n };\n } else {\n var result = {},\n p;\n\n for (p in value) {\n result[p] = p !== \"onAutoKill\" && _isFunction(value[p]) ? value[p](index, target, targets) : value[p];\n }\n\n return result;\n }\n},\n _getOffset = function _getOffset(element, container) {\n element = _toArray(element)[0];\n\n if (!element || !element.getBoundingClientRect) {\n return console.warn(\"scrollTo target doesn't exist. Using 0\") || {\n x: 0,\n y: 0\n };\n }\n\n var rect = element.getBoundingClientRect(),\n isRoot = !container || container === _window || container === _body,\n cRect = isRoot ? {\n top: _docEl.clientTop - (_window.pageYOffset || _docEl.scrollTop || _body.scrollTop || 0),\n left: _docEl.clientLeft - (_window.pageXOffset || _docEl.scrollLeft || _body.scrollLeft || 0)\n } : container.getBoundingClientRect(),\n offsets = {\n x: rect.left - cRect.left,\n y: rect.top - cRect.top\n };\n\n if (!isRoot && container) {\n //only add the current scroll position if it's not the window/body.\n offsets.x += _buildGetter(container, \"x\")();\n offsets.y += _buildGetter(container, \"y\")();\n }\n\n return offsets;\n},\n _parseVal = function _parseVal(value, target, axis, currentVal, offset) {\n return !isNaN(value) && typeof value !== \"object\" ? parseFloat(value) - offset : _isString(value) && value.charAt(1) === \"=\" ? parseFloat(value.substr(2)) * (value.charAt(0) === \"-\" ? -1 : 1) + currentVal - offset : value === \"max\" ? _max(target, axis) - offset : Math.min(_max(target, axis), _getOffset(value, target)[axis] - offset);\n},\n _initCore = function _initCore() {\n gsap = _getGSAP();\n\n if (_windowExists() && gsap && document.body) {\n _window = window;\n _body = document.body;\n _docEl = document.documentElement;\n _toArray = gsap.utils.toArray;\n gsap.config({\n autoKillThreshold: 7\n });\n _config = gsap.config();\n _coreInitted = 1;\n }\n};\n\nexport var ScrollToPlugin = {\n version: \"3.9.1\",\n name: \"scrollTo\",\n rawVars: 1,\n register: function register(core) {\n gsap = core;\n\n _initCore();\n },\n init: function init(target, value, tween, index, targets) {\n _coreInitted || _initCore();\n var data = this,\n snapType = gsap.getProperty(target, \"scrollSnapType\");\n data.isWin = target === _window;\n data.target = target;\n data.tween = tween;\n value = _clean(value, index, target, targets);\n data.vars = value;\n data.autoKill = !!value.autoKill;\n data.getX = _buildGetter(target, \"x\");\n data.getY = _buildGetter(target, \"y\");\n data.x = data.xPrev = data.getX();\n data.y = data.yPrev = data.getY();\n\n if (snapType && snapType !== \"none\") {\n // disable scroll snapping to avoid strange behavior\n data.snap = 1;\n data.snapInline = target.style.scrollSnapType;\n target.style.scrollSnapType = \"none\";\n }\n\n if (value.x != null) {\n data.add(data, \"x\", data.x, _parseVal(value.x, target, \"x\", data.x, value.offsetX || 0), index, targets);\n\n data._props.push(\"scrollTo_x\");\n } else {\n data.skipX = 1;\n }\n\n if (value.y != null) {\n data.add(data, \"y\", data.y, _parseVal(value.y, target, \"y\", data.y, value.offsetY || 0), index, targets);\n\n data._props.push(\"scrollTo_y\");\n } else {\n data.skipY = 1;\n }\n },\n render: function render(ratio, data) {\n var pt = data._pt,\n target = data.target,\n tween = data.tween,\n autoKill = data.autoKill,\n xPrev = data.xPrev,\n yPrev = data.yPrev,\n isWin = data.isWin,\n snap = data.snap,\n snapInline = data.snapInline,\n x,\n y,\n yDif,\n xDif,\n threshold;\n\n while (pt) {\n pt.r(ratio, pt.d);\n pt = pt._next;\n }\n\n x = isWin || !data.skipX ? data.getX() : xPrev;\n y = isWin || !data.skipY ? data.getY() : yPrev;\n yDif = y - yPrev;\n xDif = x - xPrev;\n threshold = _config.autoKillThreshold;\n\n if (data.x < 0) {\n //can't scroll to a position less than 0! Might happen if someone uses a Back.easeOut or Elastic.easeOut when scrolling back to the top of the page (for example)\n data.x = 0;\n }\n\n if (data.y < 0) {\n data.y = 0;\n }\n\n if (autoKill) {\n //note: iOS has a bug that throws off the scroll by several pixels, so we need to check if it's within 7 pixels of the previous one that we set instead of just looking for an exact match.\n if (!data.skipX && (xDif > threshold || xDif < -threshold) && x < _max(target, \"x\")) {\n data.skipX = 1; //if the user scrolls separately, we should stop tweening!\n }\n\n if (!data.skipY && (yDif > threshold || yDif < -threshold) && y < _max(target, \"y\")) {\n data.skipY = 1; //if the user scrolls separately, we should stop tweening!\n }\n\n if (data.skipX && data.skipY) {\n tween.kill();\n data.vars.onAutoKill && data.vars.onAutoKill.apply(tween, data.vars.onAutoKillParams || []);\n }\n }\n\n if (isWin) {\n _window.scrollTo(!data.skipX ? data.x : x, !data.skipY ? data.y : y);\n } else {\n data.skipY || (target.scrollTop = data.y);\n data.skipX || (target.scrollLeft = data.x);\n }\n\n if (snap && (ratio === 1 || ratio === 0)) {\n y = target.scrollTop;\n x = target.scrollLeft;\n snapInline ? target.style.scrollSnapType = snapInline : target.style.removeProperty(\"scroll-snap-type\");\n target.scrollTop = y + 1; // bug in Safari causes the element to totally reset its scroll position when scroll-snap-type changes, so we need to set it to a slightly different value and then back again to work around this bug.\n\n target.scrollLeft = x + 1;\n target.scrollTop = y;\n target.scrollLeft = x;\n }\n\n data.xPrev = data.x;\n data.yPrev = data.y;\n },\n kill: function kill(property) {\n var both = property === \"scrollTo\";\n\n if (both || property === \"scrollTo_x\") {\n this.skipX = 1;\n }\n\n if (both || property === \"scrollTo_y\") {\n this.skipY = 1;\n }\n }\n};\nScrollToPlugin.max = _max;\nScrollToPlugin.getOffset = _getOffset;\nScrollToPlugin.buildGetter = _buildGetter;\n_getGSAP() && gsap.registerPlugin(ScrollToPlugin);\nexport { ScrollToPlugin as default };"],"names":["gsap","registerPlugin","ScrollToPlugin","Video","constructor","el","this","stream","querySelector","startedPlaying","tl","isSingle","closest","closeBtn","playBtn","hasPlayBtn","poster","hasPoster","handlePoster","setupEvents","componentAnimationHandler","add","addEventListener","animate","bind","play","playMultiCol","reverse","setAttribute","callFnIfEnterKeyWasPressed","isMobile","document","fullscreenEl","fullscreenElement","mozFullScreenElement","webkitFullscreenElement","pause","img","oldSrc","getAttribute","split","src","section","hiderDiv","createElement","video","close","wysiwyg","squareVideo","classList","contains","verticalVideo","headerHeight","getElementById","offsetHeight","style","display","playMobileFullscreenHelper","stuffToHide","push","appendChild","timeline","onReverseComplete","querySelectorAll","forEach","remove","to","DEFAULT_TIME_SHORT","scaleX","DEFAULT_TIME","paddingTop","width","marginLeft","marginRight","height","overflow","set","zIndex","call","paused","window","scrollTo","y","offsetY","transformOrigin","FINISH_OPACITY","ani","START_OPACITY","DEFAULT_EASE","pointerEvents","gtmPush","event","category","instantiatedVideos","map","_coreInitted","_window","_docEl","_body","_toArray","_config","_windowExists","_getGSAP","_isString","value","_isFunction","_max","element","axis","dim","scroll","client","Math","max","_buildGetter","e","p","pageXOffset","toUpperCase","_clean","index","target","targets","charAt","x","nodeType","result","_getOffset","container","getBoundingClientRect","rect","isRoot","cRect","top","clientTop","pageYOffset","scrollTop","left","clientLeft","scrollLeft","offsets","_parseVal","currentVal","offset","isNaN","parseFloat","substr","min","_initCore","body","documentElement","utils","toArray","config","autoKillThreshold","version","name","rawVars","register","core","init","tween","data","snapType","getProperty","isWin","vars","autoKill","getX","getY","xPrev","yPrev","snap","snapInline","scrollSnapType","offsetX","_props","skipX","skipY","render","ratio","yDif","xDif","threshold","pt","_pt","r","d","_next","kill","onAutoKill","apply","onAutoKillParams","removeProperty","property","both","getOffset","buildGetter"],"sourceRoot":""}