{"version":3,"sources":["webpack://@verndale/toolkit/./src/js/components/video.js"],"names":["Module","Component"],"mappings":"4JAEA,MAAMA,UAAeC,WAAU,CAC7B,eAAgB,CACd,KAAK,IAAM,CACT,SAAU,KAAK,GAAG,GAAG,gBAAgB,EACrC,OAAQ,KAAK,GAAG,GAAG,QAAQ,EAC3B,QAAS,KAAK,GAAG,GAAG,gBAAgB,EACpC,eAAgB,KAAK,GAAG,GAAG,wBAAwB,CACrD,EACA,KAAK,SAAW,KAAK,IAAI,QAAQ,aAAa,KAAK,EAAE,KAAK,EAC1D,KAAK,SAAW,KAAK,SAAS,SAAS,QAAQ,EAC/C,KAAK,IAAI,eAAe,MAAM,QAAU,IACxC,KAAK,IAAI,eAAe,MAAM,mBAAqB,OACnD,KAAK,IAAI,eAAe,MAAM,mBAAqB,UAEnD,KAAK,cAAgB,EACvB,CAEA,cAAe,CACb,KAAK,IAAI,OAAO,iBAAiB,YAAa,KAAK,UAAU,KAAK,IAAI,CAAC,EACvE,KAAK,IAAI,OAAO,iBAAiB,aAAc,KAAK,WAAW,KAAK,IAAI,CAAC,EAEzE,KAAK,IAAI,QAAQ,iBAAiB,OAAQ,KAAK,YAAY,KAAK,IAAI,CAAC,CACvE,CAEA,WAAW,CACT,KAAK,cAAgB,GACjB,KAAK,SAAU,KAAK,IAAI,QAAQ,aAAa,MAAO,GAAG,KAAK,mCAAmC,EAC9F,KAAK,IAAI,QAAQ,aAAa,MAAO,GAAG,KAAK,4BAA4B,CAChF,CAEA,aAAa,CACP,KAAK,cAAe,KAAK,IAAI,eAAe,MAAM,QAAU,IAC3D,KAAK,IAAI,eAAe,MAAM,QAAU,GAC/C,CAEA,YAAY,CACV,KAAK,cAAgB,GACrB,KAAK,IAAI,QAAQ,gBAAgB,KAAK,CACxC,CACF,CAEA,UAAeD,C","file":"Areas/SunriseSeniorLiving/Scripts/2260.625ca46f684d50eb9671.bundle.js","sourcesContent":["import { Component } from '@verndale/core';\n\nclass Module extends Component {\n setupDefaults() {\n this.dom = {\n $trigger: this.el._$('.video-trigger'),\n $video: this.el._$('.video'),\n $iframe: this.el._$('.video__iframe'),\n $iframeWrapper: this.el._$('.video__iframe-wrapper')\n }\n this.videoSrc = this.dom.$iframe.getAttribute('src').trim()\n this.isWistia = this.videoSrc.includes('wistia')\n this.dom.$iframeWrapper.style.opacity = '0';\n this.dom.$iframeWrapper.style.transitionDuration = '0.5s';\n this.dom.$iframeWrapper.style.transitionProperty = 'opacity';\n\n this.iframeVisible = false;\n }\n\n addListeners() {\n this.dom.$video.addEventListener('modalopen', this.openVideo.bind(this));\n this.dom.$video.addEventListener('modalclose', this.closeVideo.bind(this));\n\n this.dom.$iframe.addEventListener('load', this.handleModal.bind(this));\n }\n\n openVideo(){\n this.iframeVisible = true;\n if (this.isWistia) this.dom.$iframe.setAttribute('src', `${this.videoSrc}?autoPlay=true&muted=true`)\n else this.dom.$iframe.setAttribute('src', `${this.videoSrc}?autoplay=1&mute=1`)\n }\n\n handleModal(){\n if (this.iframeVisible) this.dom.$iframeWrapper.style.opacity = '1';\n else this.dom.$iframeWrapper.style.opacity = '0'\n }\n\n closeVideo(){\n this.iframeVisible = false;\n this.dom.$iframe.removeAttribute('src')\n }\n}\n\nexport default Module;\n"],"sourceRoot":""}