1"use strict";(self.webpackChunkvouchercloud_web=self.webpackChunkvouchercloud_web||[]).push([[7610],{7610:function(e,o,t){t.r(o),t.d(o,{LazyVideo:function(){return v},default:function(){return h}});var n=t(5215),i=t(172),c=t(7402),r=t(5994),l=t(2485),a=t.n(l),u=new Set(["https:","http:"]),d="about:blank",s=function(e){try{var o=new URL(e);return u.has(o.protocol)?e:d}catch(e){return d}};function v(e){var o=e.embedUrl,t=e.width,l=e.height,u=e.videoTitle,d=e.startTimeInSeconds,v=e.showSubtitles,h=void 0===v||v,f=e.openOnParam,y=e.id,m=e.className,b=e.children,w=(0,r.J0)(!1),p=w[0],k=w[1],L=a()("lazy-video",m),C=s(o),g=C.includes("?")?"&":"?",z=function(){try{return new URL(C).hostname.toLowerCase()}catch(e){return""}}(),E="youtu.be"===z||"youtube.com"===z||z.endsWith(".youtube.com")||"youtube-nocookie.com"===z||z.endsWith(".youtube-nocookie.com"),_=[("vimeo.com"===z||z.endsWith(".vimeo.com"))&&h?"texttrack=en":null,"autoplay=1",d?"start="+d:null,E&&h?"cc_load_policy=1":null].filter(Boolean).join("&"),J=""+C+g+_;(0,r.vJ)(function(){if(p){var e=function(e){"Escape"===e.key&&k(!1)},o=document.body.style.overflow;return document.body.style.overflow="hidden",document.addEventListener("keydown",e),function(){document.body.style.overflow=o,document.removeEventListener("keydown",e)}}},[p]),(0,r.vJ)(function(){if(y){var e='[data-open-lazy-video="'+y+'"]',o=function(o){var t,n,i=null===(n=null===(t=o.target)||void 0===t?void 0:t.closest)||void 0===n?void 0:n.call(t,e);i&&(i instanceof HTMLAnchorElement&&o.preventDefault(),k(!0))};return document.addEventListener("click",o),function(){return document.removeEventListener("click",o)}}},[y]),(0,r.vJ)(function(){if(f)try{new URLSearchParams(window.location.search).has(f)&&k(!0)}catch(e){}},[f]);var S=function(e){null==e||e.preventDefault(),k(!1)},U=p&&(0,c.d5)((0,i.h)("div",{class:"lazy-video-overlay",onClick:S},(0,i.h)("button",{type:"button",class:"lazy-video-close",onClick:S,"aria-label":"Close video"},"Ã"),(0,i.h)("div",{class:"lazy-video-lightbox",onClick:function(e){return e.stopPropagation()}},(0,i.h)("iframe",(0,n.Cl)({},{allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share",allowfullscreen:!0,frameborder:"0",width:t,height:l,id:y?y+"_video":void 0,src:J,title:u})))),document.body);return(0,i.h)("div",{id:y,class:L},b,U)}var h=v}}]);
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.