1(window.webpackJsonp=window.webpackJsonp||[]).push([[17],{39:(function(module,__webpack_exports__,__webpack_require__){"use strict";var script=__webpack_require__(5),script_default=__webpack_require__.n(script);function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}function _createClass(Constructor,protoProps,staticProps){return protoProps&&_defineProperties(Constructor.prototype,protoProps),staticProps&&_defineProperties(Constructor,staticProps),Constructor}var api="https://www.youtube.com/iframe_api",apiLoadedCallbacks=[],apiLoaded=!1;window.onYouTubeIframeAPIReady=function(){apiLoadedCallbacks.forEach(function(apiLoadedCallback){return apiLoadedCallback()}),apiLoadedCallbacks=[],apiLoaded=!0};var Youtube_Youtube=(function(){function Youtube(_ref){var el=_ref.el,videoUrl=_ref.videoUrl;_classCallCheck(this,Youtube);var regex=/(?:youtube\.com\/(?:[^\/]+\/.+\/|(?:v|e(?:mbed)?)\/|.*[?&]v=)|youtu\.be\/)([^"&?\/ ]{11})/i;this.el=el,this.id=videoUrl.match(regex)[1]||null,this.onApiLoaded=this._onApiLoaded.bind(this),this.isReady=!1,this.onReady=this._onReady.bind(this),this.onReadyCallback=null,this.onStateChange=this._onStateChange.bind(this),this.onPlayCallback=null,apiLoaded?this._onApiLoaded():(apiLoadedCallbacks.push(this.onApiLoaded),script_default()(api))}return _createClass(Youtube,[{key:"play",value:function(){var _this=this;return new Promise(function(resolve){_this.onPlayCallback=resolve,_this.isReady?_this.player.playVideo():_this.onReadyCallback=function(){_this.player.playVideo()}})}},{key:"pause",value:function(){var _this2=this;return new Promise(function(resolve){_this2.onPlayCallback=resolve,_this2.isReady?_this2.player.pauseVideo():_this2.onReadyCallback=function(){_this2.player.pauseVideo()}})}},{key:"autoplay",value:function(){var _this3=this;return new Promise(function(resolve){_this3.onPlayCallback=resolve,_this3.isReady?(_this3.player.playVideo(),_this3.player.mute()):_this3.onReadyCallback=function(){_this3.player.playVideo(),_this3.player.mute()}})}},{key:"unload",value:function(){this.player.destroy()}},{key:"_onApiLoaded",value:function(){this.player=new YT.Player(this.el,{videoId:this.id,playerVars:{modestbranding:!0,showinfo:!1,controls:!1,rel:0},events:{onReady:this.onReady,onStateChange:this.onStateChange}})}},{key:"_onReady",value:function(){this.isReady=!0,this.onReadyCallback&&this.onReadyCallback()}},{key:"_onStateChange",value:function(event){var state=event.data;this.onPlayCallback&&state===YT.PlayerState.BUFFERING&&(this.onPlayCallback(),this.onPlayCallback=null)}}]),Youtube})();function Vimeo_classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function Vimeo_defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}function Vimeo_createClass(Constructor,protoProps,staticProps){return protoProps&&Vimeo_defineProperties(Constructor.prototype,protoProps),staticProps&&Vimeo_defineProperties(Constructor,staticProps),Constructor}var Vimeo_api="https://player.vimeo.com/api/player.js",Vimeo_apiLoaded=!1,Vimeo_VimeoPlayer=(function(){function VimeoPlayer(_ref){var el=_ref.el,videoUrl=_ref.videoUrl;Vimeo_classCallCheck(this,VimeoPlayer),this.el=el;var urlParts=videoUrl.split("/");this.id=urlParts[urlParts.length-1],this.onReadyCallback=null,this.onApiLoaded=this._onApiLoaded.bind(this),this.onProgress=this._onProgress.bind(this),this.onProgressCallback=null,Vimeo_apiLoaded?this._onApiLoaded():script_default()(Vimeo_api,this.onApiLoaded)}return Vimeo_createClass(VimeoPlayer,[{key:"play",value:function(){var _this=this;return new Promise(function(resolve){_this.onProgressCallback=resolve,Vimeo_apiLoaded?(_this.player.on("play",_this.onProgress),_this.player.play()):_this.onReadyCallback=function(){_this.player.on("play",_this.onProgress),_this.player.play()}})}},{key:"pause",value:function(){var _this2=this;return new Promise(function(resolve){_this2.onProgressCallback=resolve,Vimeo_apiLoaded?(_this2.player.on("pause",_this2.onProgress),_this2.player.pause()):_this2.onReadyCallback=function(){_this2.player.on("pause",_this2.onProgress),_this2.player.pause()}})}},{key:"autoplay",value:function(){var _this3=this;return new Promise(function(resolve){_this3.onProgressCallback=resolve,Vimeo_apiLoaded?(_this3.player.on("play",_this3.onProgress),_this3.player.setVolume(0),_this3.player.play()):_this3.onReadyCallback=function(){_this3.player.on("play",_this3.onProgress),_this3.player.setVolume(0),_this3.player.play()}})}},{key:"unload",value:function(){this.player.unload().catch()}},{key:"_onApiLoaded",value:function(){this.player=new window.Vimeo.Player(this.el,{id:this.id}),this.player.ready().then().catch(),Vimeo_apiLoaded=!0,this.onReadyCallback&&this.onReadyCallback()}},{key:"_onProgress",value:function(){this.player.off("play",this.onProgress),this.player.off("pause",this.onProgress),this.onProgressCallback&&(this.onProgressCallback(),this.onProgressCallback=null)}}]),VimeoPlayer})();__webpack_require__.d(__webpack_exports__,"a",function(){return Video_Video});function Video_classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function Video_defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}function Video_createClass(Constructor,protoProps,staticProps){return protoProps&&Video_defineProperties(Constructor.prototype,protoProps),staticProps&&Video_defineProperties(Constructor,staticProps),Constructor}var Video_Video=(function(){function Video(el,options){switch(Video_classCallCheck(this,Video),this.el=el,this.options=options,this.platform=el.getAttribute("data-video").trim(),this.playButton=el.querySelector("[data-vi
1deo-play-button]"),this.videoEl=el.querySelector("[data-video-element]"),this.onPlayClick=this._onPlayClick.bind(this),this.onPauseClick=this._onPauseClick.bind(this),this.autoplay=this._autoplay.bind(this),this.video=null,this.videoData={el:this.videoEl.childNodes[0],videoUrl:this.videoEl.getAttribute("data-video-url")},this.platform){case"youtube":this.video=new Youtube_Youtube(this.videoData);break;case"vimeo":this.video=new Vimeo_VimeoPlayer(this.videoData);break;default:this.video=null;break}this.playButton&&(this.options&&this.options.autoplay&&this.autoplay(),this.playButton.addEventListener("click",this.onPlayClick))}return Video_createClass(Video,[{key:"_onPlayClick",value:function(){var _this=this;this.el.classList.add("video-loading"),this.video.play().then(function(){_this.el.classList.add("video-transitioning"),setTimeout(function(){_this.el.classList.remove("video-loading"),_this.el.classList.remove("video-transitioning"),_this.el.classList.add("video-playing")},200)})}},{key:"_onPauseClick",value:function(){this.video.pause()}},{key:"_autoplay",value:function(){var _this2=this;this.el.classList.add("video-loading"),this.video.autoplay().then(function(){_this2.el.classList.add("video-transitioning"),setTimeout(function(){_this2.el.classList.remove("video-loading"),_this2.el.classList.remove("video-transitioning"),_this2.el.classList.add("video-playing")},200)})}},{key:"unload",value:function(){this.playButton&&this.playButton.removeEventListener("click",this.onPlayClick),this.video&&this.video.unload()}}]),Video})()}),72:(function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,"default",function(){return DynamicVideo});var _components_Video__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(39);function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}function _createClass(Constructor,protoProps,staticProps){return protoProps&&_defineProperties(Constructor.prototype,protoProps),staticProps&&_defineProperties(Constructor,staticProps),Constructor}var DynamicVideo=(function(){function DynamicVideo2(section){_classCallCheck(this,DynamicVideo2),this.el=section.el,this.autoplay=section.data.autoplay,this.init()}return _createClass(DynamicVideo2,[{key:"init",value:function(){var _this=this,videoEl=this.el.querySelector("[data-video]");if(this.hasPlayed=!1,videoEl&&(this.video=new _components_Video__WEBPACK_IMPORTED_MODULE_0__.a(videoEl)),this.video&&this.autoplay){var thresholds={play:.5,pause:.2};this.playPauseObserver=new IntersectionObserver(function(entries){var _entries$=entries[0],intersectionRatio=_entries$.intersectionRatio,isIntersecting=_entries$.isIntersecting;intersectionRatio>=thresholds.play&&isIntersecting&&!_this.hasPlayed?(_this.video._autoplay(),_this.hasPlayed=!0):intersectionRatio<=thresholds.pause&&isIntersecting===!1&&_this.video._onPauseClick()},{threshold:[thresholds.pause,thresholds.play]}),this.playPauseObserver.observe(videoEl)}}},{key:"onSectionUnload",value:function(){this.video&&this.video.unload(),this.playPauseObserver&&this.playPauseObserver.disconnect()}}]),DynamicVideo2})()})}]); 2//# sourceMappingURL=/cdn/shop/t/2/assets/DynamicVideo.bundle.js.map?v=108368474795176977211572832590
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.