PageSourceSearch

https://www.pharmaron.com/wp-content/themes/pharmaron/js/lightboxes-VideoLightbox.aecef47f62a8ff7b143f.js

js pharmaron.com collected 2026-10-03 23:44:12 UTC 13,158 bytes, 2 lines download raw bytes

1(self.webpackChunkpharmaron=self.webpackChunkpharmaron||[]).push([[37,727,708],{5725:function(t,e,n){"use strict";n.r(e),n.d(e,{default:function(){return l}});var r=n(3029),o=n(2901),i=n(4467),a=(n(115),n(8772),n(2e3)),c=n(6750),l=function(){return(0,o.A)((function t(e){var n=this;(0,r.A)(this,t),(0,i.A)(this,"closeButtonClass","basicLightbox__close"),(0,i.A)(this,"closeButtonEventAdded",!1),(0,i.A)(this,"handleClick",(function(t){n.handleClickCallback(t)})),(0,i.A)(this,"handleClickCallback",(function(t){n.lightbox=n.getLightbox(),n.lightbox&&(t.preventDefault(),n.lightboxEl=n.lightbox.element(),n.lightboxImage=n.lightboxEl.querySelector("img"),n.galleryItem&&n.lightboxEl.addEventListener("click",n.handlePrevNext),n.lightbox.show())})),(0,i.A)(this,"handleOnShow",(function(){n.lightboxEl.querySelector(".".concat(n.closeButtonClass)).addEventListener("click",(function(){n.lightbox.close()})),document.documentElement.classList.add("lightbox-open"),(0,c.disableScroll)(),n.afterOnShow()})),(0,i.A)(this,"handleOnClose",(function(){document.documentElement.classList.remove("lightbox-open"),(0,c.enableScroll)(),n.galleryItem&&setTimeout((function(){n.resetGallery()}),500),n.afterOnClose()})),(0,i.A)(this,"handlePrevNext",(function(t){var e,r=t.target.closest(".basicLightbox__prev"),o=t.target.closest(".basicLightbox__next");r?e=n.prevGalleryItem:o&&(e=n.nextGalleryItem),e&&n.updateLightBoxImage(e)})),this.el=e,this.image=this.el.querySelector("img"),this.addImageLinkClass(),this.galleryItem=this.el.closest(".blocks-gallery-item"),this.galleryItem&&(this.allGalleryItems=this.galleryItem.parentElement.children,this.setPrevNextItems()),this.el.addEventListener("click",this.handleClick),this.el.classList.add("lightbox-link")}),[{key:"getImageLinkClass",value:function(){return"enlarge"}},{key:"addImageLinkClass",value:function(){this.image&&this.el.classList.add(this.getImageLinkClass())}},{key:"getLightbox",value:function(){var t=this.getHTML();return!!t&&a.create(t,this.getOptions())}},{key:"getHTML",value:function(){var t=this.getInnerHTML();return!!t&&"".concat(this.getCloseHTML()).concat(t)}},{key:"getCloseHTML",value:function(){return'<button tabindex="1" class="'.concat(this.closeButtonClass,' basicLightbox__button no-button-style">\n\t\t\t<span class="screen-reader-text">Close</span>\n\t\t\t<span class="dashicons dashicons-no-alt"></span>\n\t\t</button>')}},{key:"getPrevHtml",value:function(){return this.prevGalleryItem?'<button class="basicLightbox__prev">\n\t\t\t\t<span class="screen-reader-text">Close</span>\n\t\t\t\t<span class="dashicons dashicons-arrow-left-alt"></span>\n\t\t\t</button>':""}},{key:"getNextHtml",value:function(){return this.nextGalleryItem?'<button class="basicLightbox__next">\n\t\t\t\t<span class="screen-reader-text">Close</span>\n\t\t\t\t<span class="dashicons dashicons-arrow-right-alt"></span>\n\t\t\t</button>':""}},{key:"getInnerHTML",value:function(){var t=this.el.getAttribute("href"),e=this.image?this.image.getAttribute("alt"):"";return'<div class="basicLightbox__image">\n\t\t\t'.concat(this.getPrevHtml(),'\n\t\t\t<img src="').concat(t,'" alt="').concat(e,'" />\n\t\t\t').concat(this.getNextHtml(),"\n\t\t</div>")}},{key:"getOptions",value:function(){var t=this;return{onShow:function(){t.handleOnShow()},onClose:function(){t.handleOnClose()}}}},{key:"updateLightBoxImage",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0]||this.galleryItem;if(t){var e=t.querySelector("a"),n=t.querySelector("img");e&&n&&(this.lightboxImage.setAttribute("src",e.href),this.lightboxImage.setAttribute("alt",n.alt),this.setPrevNextItems(t))}}},{key:"setPrevNextItems",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0]||this.galleryItem;t&&(this.prevGalleryItem=t.previousElementSibling||this.allGalleryItems[this.allGalleryItems.length-1],this.nextGalleryItem=t.nextElementSibling||this.allGalleryItems[0])}},{key:"resetGallery",value:function(){this.updateLightBoxImage(),this.setPrevNextItems()}},{key:"afterOnShow",value:function(){}},{key:"afterOnClose",value:function(){}}])}()},3239:function(t,e,n){"use strict";n.r(e),n.d(e,{default:function(){return f}});var r=n(3029),o=n(2901),i=n(2284);
1function a(t){return a=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},a(t)}function c(t,e){return c=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},c(t,e)}n(7136),n(5086),n(4606),n(3719),n(6255);var l=n(4448),s=n(5725),u=[{regex:l.videoFileRegex,iframe:!1,getSrc:function(t){return t.href}},{regex:l.youtubeRegex,iframe:!0,getSrc:function(t){var e=t.href,n=t.matches;return null===e.match(l.youtubePageRegex)&&"https://www.youtube.com/embed/".concat(n[1],"?autoplay=1&hd=1&rel=0")}},{regex:l.vimeoRegex,iframe:!0,getSrc:function(t){var e=t.matches;return"https://player.vimeo.com/video/".concat(e[4],"?autoplay=1")}},{regex:l.wistiaRegex,iframe:!0,getSrc:function(t){var e=t.matches;return"https://fast.wistia.net/embed/iframe/".concat(e[4],"?autoplay=1")}},{regex:l.cincopaRegex,iframe:!0,getSrc:function(t){var e=t.matches;return"https://rtcdn.cincopa.com/iframe.aspx?fid=".concat(e[1],"&autoplay=1")}}],f=function(t){function e(){return(0,r.A)(this,e),t=this,o=arguments,n=a(n=e),function(t,e){return!e||"object"!==(0,i.A)(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}(t,function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){return!1}}()?Reflect.construct(n,o||[],a(t).constructor):n.apply(t,o));var t,n,o}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&c(t,e)}(e,t),(0,o.A)(e,[{key:"getImageLinkClass",value:function(){return"play-btn"}},{key:"getInnerHTML",value:function(){for(var t=this,e=this.el.getAttribute("href")||this.el.getAttribute("data-href"),n=!1,r=!0,o=0;o<u.length;o++){var i=u[o],a=e.match(i.regex);if(null!==a&&(n=i.getSrc({href:e,matches:a}),r=u[o].iframe),n)break}if(n){var c="";return r?c='<iframe allow="autoplay" src="'.concat(n,'" frameborder="0" allowfullscreen></iframe>'):(c='<video controls src="'.concat(n,'"></video>'),this.afterOnShow=function(){var e=t.lightboxEl.querySelector("video");e&&e.play()}),!!c&&'<div class="basicLightbox__video"><div class="responsive-video">'.concat(c,"</div></div>")}}}])}(s.default)},4448:function(t,e,n){"use strict";n.r(e),n.d(e,{cincopaRegex:function(){return u},imageLinkQuerySelector:function(){return r},videoFileRegex:function(){return i},videoLinkQuerySelector:function(){return o},vimeoRegex:function(){return l},wistiaRegex:function(){return s},youtubePageRegex:function(){return c},youtubeRegex:function(){return a}});var r='a[href*=".jpg"],a[href*=".gif"],a[href*=".png"],a[href*=".svg"]',o='[href*="youtube.com"],[href*="youtu.be"],[href*="vimeo.com"],[href*="wistia.com"],[href*="cincopa.com"],[href*="videos.pharmaron.com"],[href*=".mp4"],[href*=".ogg"],[href*=".webm"],[data-href*="youtube.com"],[data-href*="youtu.be"],[data-href*="vimeo.com"],[data-href*="wistia.com"],[data-href*=".mp4"],[data-href*=".ogg"],[data-href*=".webm"],[data-href*="cincopa.com"],[data-href*="videos.pharmaron.com"]',i=/(.mp4|.ogg|.webm)/,a=/(?:youtube\.com\/\S*(?:(?:\/e(?:mbed))?\/|watch\/?\?(?:\S*?&?v=))|youtu\.be\/)([a-zA-Z0-9_-]{6,11})/,c=/youtube.com\/user|youtube.com\/channel/,l=/(http|https)?:\/\/(www\.)?vimeo.com\/(?:channels\/(?:\w+\/)?|groups\/([^/]*)\/videos\/|)(\d+)(?:|\/\?)/,s=/(?:https?:\/\/(.+)?(wistia.com|wi.st)\/(medias|embed)\/)(.*)/,u=/(?:https?:\/\/)?(?:\S+\.)?(?:cincopa\.com|videos\.pharmaron\.com)\/(?:watch\/)([\w!-]+)/},2e3:function(t){t.exports=function t(e,n,r){function o(a,c){if(!n[a]){if(!e[a]){if(i)return i(a,!0);var l=new Error("Cannot find module '"+a+"'");throw l.code="MODULE_NOT_FOUND",l}var s=n[a]={exports:{}};e[a][0].call(s.exports,(function(t){return o(e[a][1][t]||t)}),s,s.exports,t,e,n,r)}return n[a].exports}for(var i=void 0,a=0;a<r.length;a++)o(r[a]);return o}({1:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.create=n.visible=void 0;var r=function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=document.createElement("div");return n.innerHTML=t.trim(),!0===e?n.children:n.firstChild},o=function(t,e){var n=t.children;return 1===n.length&&n[0].tagName===e},i=function(t){return null!=(t=t||document.querySelector(".basicLightbox"))&&!0===t.ownerDocument.body.contains(t)};n.visible=i,n.create=function(t,e){var n=function(t,e){var n=r('\n\t\t<div class="basicLightbox '.concat(e.className,'">\n\t\t\t<div class="basicLightbox__placeholder" role="dialog"></div>\n\t\t</div>\n\t')),i=n.querySelector(".basicLightbox__placeholder");t.forEach((function(t){return i.appendChild(t)}));var a=o(i,"IMG"),c=o(i,"VIDEO"),l=o(i,"IFRAME");return!0===a&&n.classList.add("basicLightbox--img"),!0===c&&n.classList.add("basicLightbox--video"),!0===l&&n.classList.add("basicLightbox--iframe"),n}(t=function(t){var e="string"==typeof t,n=t instanceof HTMLElement==1;if(!1===e&&!1===n)throw new Error("Content must be a DOM element/node or string");return!0===e?Array.from(r(t,!0)):"TEMPLATE"===t.tagName?[t.content.cloneNode(!0)]:Array.from(t.children)}(t),e=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(null==(t=Object.assign({},t)).closable&&(t.closable=!0),null==t.className&&(t.className=""),null==t.onShow&&(t.onShow=function(){}),null==t.onClose&&(t.onClose=function(){}),"boolean"!=typeof t.closable)throw new Error("Property `closable` must be a boolean");if("string"!=typeof t.className)throw new Error("Property `className` must be a string");if("function"!=typeof t.onShow)throw new Error("Property `onShow` must be a function");if("function"!=typeof t.onClose)throw new Error("Property `onClose` must be a function");return t}(e)),a=function(t){return!1!==e.onClose(c)&&function(t,e){return t.classList.remove("basicLightbox--visible"),setTimeout((function(){return!1===i(t)||t.parentElement.removeChild(t),e()}),410),!0}(n,(function(){if("function"==typeof t)return t(c)}))};!0===e.closable&&n.addEventListener("click",(function(t){t.target===n&&a()}));var c={element:function(){return n},visible:function(){return i(n)},show:function(t){return!1!==e.onShow(c)&&function(t,e){return document.body.appendChild(t),setTimeout((function(){requestAnimationFrame((function(){return t.classList.add("basicLightbox--visible"),e()}))}),10),!0}(n,(function(){if("function"==typeof t)return t(c)}))},close:a};return c}},{}]},{},[1])(1)},7234:function(t,e,n){"use strict";var r=n(7804).charAt;
1t.exports=function(t,e,n){return e+(n?r(t,e).length:1)}},8891:function(t,e,n){"use strict";var r=n(4601),o=n(5335),i=[].slice,a={};t.exports=Function.bind||function(t){var e=r(this),n=i.call(arguments,1),c=function(){var r=n.concat(i.call(arguments));return this instanceof c?function(t,e,n){if(!(e in a)){for(var r=[],o=0;o<e;o++)r[o]="a["+o+"]";a[e]=Function("C,a","return new C("+r.join(",")+")")}return a[e](t,n)}(e,r.length,r):e.apply(t,r)};return o(e.prototype)&&(c.prototype=e.prototype),c}},4606:function(t,e,n){var r=n(1605),o=n(6492),i=n(7849),a=n(3938),c=n(5335),l=n(3105),s=n(8891),u=n(2074),f=o("Reflect","construct"),h=u((function(){function t(){}return!(f((function(){}),[],t)instanceof t)})),m=!u((function(){f((function(){}))})),g=h||m;r({target:"Reflect",stat:!0,forced:g,sham:g},{construct:function(t,e){i(t),a(e);var n=arguments.length<3?t:i(arguments[2]);if(m&&!h)return f(t,e,n);if(t==n){switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3])}var r=[null];return r.push.apply(r,e),new(s.apply(t,r))}var o=n.prototype,u=l(c(o)?o:Object.prototype),g=Function.apply.call(t,u,e);return c(g)?g:u}})},3719:function(t,e,n){var r=n(1605),o=n(200),i=n(5282);r({global:!0},{Reflect:{}}),i(o.Reflect,"Reflect",!0)},6255:function(t,e,n){"use strict";var r=n(779),o=n(3938),i=n(3747),a=n(5362),c=n(1229),l=n(6457),s=n(7234),u=n(6793);r("match",(function(t,e,n){return[function(e){var n=c(this),r=null==e?void 0:l(e,t);return r?r.call(e,n):new RegExp(e)[t](a(n))},function(t){var r=o(this),c=a(t),l=n(e,r,c);if(l.done)return l.value;if(!r.global)return u(r,c);var f=r.unicode;r.lastIndex=0;for(var h,m=[],g=0;null!==(h=u(r,c));){var d=a(h[0]);m[g]=d,""===d&&(r.lastIndex=s(c,i(r.lastIndex),f)),g++}return 0===g?null:m}]}))},2284:function(t,e,n){"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}n.d(e,{A:function(){return r}})}}]);
2//# sourceMappingURL=lightboxes-VideoLightbox.aecef47f62a8ff7b143f.js.map

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.