{"version":3,"sources":["webpack:///1742452116000.blk-video-and-text-block-chunk.js","webpack:///D:/AzureDevops/vsts-agent-win-x64-2.202.1_06/_work/151/s/FrontEnd/src/views/blocks/videoAndTextBlock/js/videoAndTextBlock.js"],"names":["webpackJsonpUpdateBris","396","module","exports","__webpack_require__","$","_classCallCheck","instance","Constructor","TypeError","Object","defineProperty","value","_createClass","defineProperties","target","props","i","length","descriptor","enumerable","configurable","writable","key","protoProps","staticProps","prototype","VideoAndTextBlock","$el","this","enterViewPort","img","find","controlsVideo","imageClick","_this","video","autoPlay","getAttribute","setAttribute","playPromise","play","undefined","then","_","observer","IntersectionObserver","entries","forEach","entry","intersectionRatio","paused","addClass","removeClass","pause","threshold","observe","_this2","$block","on","muted","call"],"mappings":";AAAAA,wBAAwB,KAElBC,IACA,SAAUC,EAAQC,EAASC,GAEjC,cAC4B,SAASC,GAQrC,QAASC,GAAgBC,EAAUC,GAAe,KAAMD,YAAoBC,IAAgB,KAAM,IAAIC,WAAU,qCANhHC,OAAOC,eAAeR,EAAS,cAC9BS,OAAO,GAGR,IAAIC,GAAe,WAAc,QAASC,GAAiBC,EAAQC,GAAS,IAAK,GAAIC,GAAI,EAAGA,EAAID,EAAME,OAAQD,IAAK,CAAE,GAAIE,GAAaH,EAAMC,EAAIE,GAAWC,WAAaD,EAAWC,aAAc,EAAOD,EAAWE,cAAe,EAAU,SAAWF,KAAYA,EAAWG,UAAW,GAAMZ,OAAOC,eAAeI,EAAQI,EAAWI,IAAKJ,IAAiB,MAAO,UAAUX,EAAagB,EAAYC,GAAiJ,MAA9HD,IAAYV,EAAiBN,EAAYkB,UAAWF,GAAiBC,GAAaX,EAAiBN,EAAaiB,GAAqBjB,KASxgBL,GChBXwB,kBDgBuC,WCfnD,QAAAA,GAAYC,GAAKtB,EAAAuB,KAAAF,GAEhBE,KAAKD,IAAMA,EACXC,KAAKC,eAAgB,EACrBD,KAAKE,IAAM1B,EAAEwB,KAAKD,KAAKI,KAAK,6BAA6B,GDiF1D,MA5DAnB,GAAac,IACZJ,IAAK,OACLX,MAAO,WCnBPiB,KAAKI,gBACLJ,KAAKK,gBDuBLX,IAAK,gBACLX,MAAO,WCrBQ,GAAAuB,GAAAN,KACXC,EAAgBD,KAAKC,cACrBM,EAAQ/B,EAAEwB,KAAKD,KAAKI,KAAK,SAAS,GAClCK,EAAWD,EAAME,aAAa,gBAIlC,IAHiB,QAAbD,GAAmC,gBAAbA,GACzBD,EAAMG,aAAa,YAAY,GAEf,eAAbF,GAA0C,gBAAbA,EAA4B,CAC5D,GAAIG,GAAcJ,EAAMK,WACJC,KAAhBF,GACHA,EAAYG,KAAK,SAACC,GACjB,GAAIC,GAAW,GAAIC,sBAAqB,SAACC,GACxCA,EAAQC,QAAQ,SAACC,GACgB,IAA5BA,EAAMC,mBAA4Bd,EAAMe,QAAWrB,EAE5CM,EAAMe,SACZhB,EAAKJ,MACR1B,EAAE8B,EAAKJ,KAAKqB,SAAS,UACrB/C,EAAE+B,GAAOiB,YAAY,WAEtBjB,EAAMK,OACNX,GAAgB,GAPhBM,EAAMkB,YAWRC,UAAW,KACRpB,GAAKJ,IACRc,EAASW,QAAQrB,EAAKJ,KAEtBc,EAASW,QAAQpB,SD6BrBb,IAAK,aACLX,MAAO,WCvBK,GAAA6C,GAAA5B,KACR6B,EAASrD,EAAEwB,KAAKD,KAChBQ,EAAQsB,EAAO1B,KAAK,SAAS,EACjC3B,GAAEwB,KAAKE,KAAK4B,GAAG,QAAS,WACvBtD,EAAEoD,EAAK1B,KAAKqB,SAAS,UACrB/C,EAAE+B,GAAOiB,YAAY,UACrBjB,EAAMK,OACNL,EAAMwB,OAAQ,QD8BTjC,OAEqBkC,KAAK1D,EAASC,EAAoB","file":"1742452116000.blk-video-and-text-block-chunk.js","sourcesContent":["webpackJsonpUpdateBris([83],{\n\n/***/ 396:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/* WEBPACK VAR INJECTION */(function($) {\n\nObject.defineProperty(exports, \"__esModule\", {\n\tvalue: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\n// CONSTANTS are all caps.\nvar NS = 'VideoAndTextBlock';\nvar CLS = 'videoTextBlock';\nvar BLK = '.' + CLS + '-';\n\nvar VideoAndTextBlock = exports.VideoAndTextBlock = function () {\n\tfunction VideoAndTextBlock($el) {\n\t\t_classCallCheck(this, VideoAndTextBlock);\n\n\t\t// $el is the blk node return by the loadVideoFeature function\n\t\tthis.$el = $el;\n\t\tthis.enterViewPort = false;\n\t\tthis.img = $(this.$el).find('.videoTextBlock-thumbnail')[0];\n\t}\n\n\t_createClass(VideoAndTextBlock, [{\n\t\tkey: 'init',\n\t\tvalue: function init() {\n\t\t\tthis.controlsVideo();\n\t\t\tthis.imageClick();\n\t\t}\n\t}, {\n\t\tkey: 'controlsVideo',\n\t\tvalue: function controlsVideo() {\n\t\t\tvar _this = this;\n\n\t\t\tvar enterViewPort = this.enterViewPort;\n\t\t\tvar video = $(this.$el).find('video')[0];\n\t\t\tvar autoPlay = video.getAttribute('data-autoplay');\n\t\t\tif (autoPlay === 'off' || autoPlay === 'video_audio') {\n\t\t\t\tvideo.setAttribute('controls', true);\n\t\t\t}\n\t\t\tif (autoPlay === 'video_only' || autoPlay === 'video_audio') {\n\t\t\t\tvar playPromise = video.play();\n\t\t\t\tif (playPromise !== undefined) {\n\t\t\t\t\tplayPromise.then(function (_) {\n\t\t\t\t\t\tvar observer = new IntersectionObserver(function (entries) {\n\t\t\t\t\t\t\tentries.forEach(function (entry) {\n\t\t\t\t\t\t\t\tif (entry.intersectionRatio !== 1 && !video.paused && !enterViewPort) {\n\t\t\t\t\t\t\t\t\tvideo.pause();\n\t\t\t\t\t\t\t\t} else if (video.paused) {\n\t\t\t\t\t\t\t\t\tif (_this.img) {\n\t\t\t\t\t\t\t\t\t\t$(_this.img).addClass('d-none');\n\t\t\t\t\t\t\t\t\t\t$(video).removeClass('d-none');\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tvideo.play();\n\t\t\t\t\t\t\t\t\tenterViewPort = true;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}, { threshold: 0.75 });\n\t\t\t\t\t\tif (_this.img) {\n\t\t\t\t\t\t\tobserver.observe(_this.img);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tobserver.observe(video);\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}, {\n\t\tkey: 'imageClick',\n\t\tvalue: function imageClick() {\n\t\t\tvar _this2 = this;\n\n\t\t\tvar $block = $(this.$el);\n\t\t\tvar video = $block.find('video')[0];\n\t\t\t$(this.img).on('click', function () {\n\t\t\t\t$(_this2.img).addClass('d-none');\n\t\t\t\t$(video).removeClass('d-none');\n\t\t\t\tvideo.play();\n\t\t\t\tvideo.muted = false;\n\t\t\t});\n\t\t}\n\t}]);\n\n\treturn VideoAndTextBlock;\n}();\n/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1)))\n\n/***/ })\n\n});\n\n\n// WEBPACK FOOTER //\n// 1742452116000.blk-video-and-text-block-chunk.js","// CONSTANTS are all caps.\nconst NS = 'VideoAndTextBlock';\nconst CLS = 'videoTextBlock';\nconst BLK = '.' + CLS + '-';\n\nexport class VideoAndTextBlock {\n\tconstructor($el) {\n\t\t// $el is the blk node return by the loadVideoFeature function\n\t\tthis.$el = $el;\n\t\tthis.enterViewPort = false;\n\t\tthis.img = $(this.$el).find('.videoTextBlock-thumbnail')[0];\n\t}\n\n\tinit() {\n\t\tthis.controlsVideo();\n\t\tthis.imageClick();\n\t}\n\n\tcontrolsVideo() {\n\t\tlet enterViewPort = this.enterViewPort;\n\t\tlet video = $(this.$el).find('video')[0];\n\t\tlet autoPlay = video.getAttribute('data-autoplay');\n\t\tif (autoPlay === 'off' || autoPlay === 'video_audio') {\n\t\t\tvideo.setAttribute('controls', true);\n\t\t}\n\t\tif (autoPlay === 'video_only' || autoPlay === 'video_audio') {\n\t\t\tlet playPromise = video.play();\n\t\t\tif (playPromise !== undefined) {\n\t\t\t\tplayPromise.then((_) => {\n\t\t\t\t\tlet observer = new IntersectionObserver((entries) => {\n\t\t\t\t\t\tentries.forEach((entry) => {\n\t\t\t\t\t\t\tif (entry.intersectionRatio !== 1 && !video.paused && !enterViewPort) {\n\t\t\t\t\t\t\t\tvideo.pause();\n\t\t\t\t\t\t\t} else if (video.paused) {\n\t\t\t\t\t\t\t\tif (this.img) {\n\t\t\t\t\t\t\t\t\t$(this.img).addClass('d-none');\n\t\t\t\t\t\t\t\t\t$(video).removeClass('d-none');\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tvideo.play();\n\t\t\t\t\t\t\t\tenterViewPort = true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t},\n\t\t\t\t\t{threshold: 0.75});\n\t\t\t\t\tif (this.img) {\n\t\t\t\t\t\tobserver.observe(this.img);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tobserver.observe(video);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}\n\n\timageClick() {\n\t\tlet $block = $(this.$el);\n\t\tlet video = $block.find('video')[0];\n\t\t$(this.img).on('click', () => {\n\t\t\t$(this.img).addClass('d-none');\n\t\t\t$(video).removeClass('d-none');\n\t\t\tvideo.play();\n\t\t\tvideo.muted = false;\n\t\t});\n\t}\n}\n\n\n\n// WEBPACK FOOTER //\n// D:/AzureDevops/vsts-agent-win-x64-2.202.1_06/_work/151/s/FrontEnd/src/views/blocks/videoAndTextBlock/js/videoAndTextBlock.js"],"sourceRoot":""}