1import{h as W,al as X,q as k,e as G,o as n,c as i,y as e,V as p,W as U,a as s,t as v,S as Y,X as _,A as l,a$ as T,_ as H}from"./DNV9k830.js";import{l as K,m as Q}from"./xaWVjZvf.js";import"./DU_SzPs-.js";import"./DclYgslW.js";function ee(){const w=k(!0),f=k(!1),b=()=>{if(typeof window<"u"&&window.UC_UI)try{const d=window.UC_UI.getServicesBaseInfo?.();if(d){const m=d.find(r=>r.name?.toLowerCase().includes("youtube")||r.id?.toLowerCase().includes("youtube"));if(m){w.value=m.consent?.status??!0;return}}}catch(d){console.warn("[useYouTubeConsent] Error checking consent:",d)}w.value=!0},a=d=>{setTimeout(()=>{b()},100)},y=()=>{f.value=!0,b()};return W(()=>{typeof window<"u"&&(window.UC_UI&&y(),window.addEventListener("UC_UI_INITIALIZED",y),window.addEventListener("UC_UI_CMP_EVENT",a),window.addEventListener("ucEvent",a),window.addEventListener("consent-updated",a))}),X(()=>{typeof window<"u"&&(window.removeEventListener("UC_UI_INITIALIZED",y),window.removeEventListener("UC_UI_CMP_EVENT",a),window.removeEventListener("ucEvent",a),window.removeEventListener("consent-updated",a))}),{isYouTubeAllowed:w,isUsercentricsReady:f,checkYouTubeConsent:b}}const te={class:"flex w-full flex-col not-prose"},oe=["data-sb-field-path","data-contentful-entry-id"],ne=["src","title"],ie={key:1,class:"uc-embedding-container h-full w-full"},se={class:"uc-embedding-wrapper"},le={class:"uc-embedding-buttons"},ae=["data-sb-field-path","data-contentful-entry-id"],de=["src"],re=["src"],ue=["data-sb-field-path","data-contentful-entry-id"],ce=["src"],fe=["src"],be=["data-contentful-entry-id"],we="play.svg",ye=G({__name:"video-block",props:{youtubeVideo:{default:""},youTubeVideoControls:{type:Boolean,default:!0},youTubeVideoShowInfo:{type:Boolean,default:!1},youTubeVideoRel:{type:Boolean,default:!1},youTubeVideoEnableJsApi:{type:Boolean,default:!1},isYouTubeVideoAutoplayble:{type:Boolean,default:!1},bynderVideo:{default:void 0},previewImage:{default:void 0},caption:{default:""},captionClass:{default:void 0},componentStyle:{default:"style-1"},annotationPrefix:{default:""},videoClass:{default:void 0},__metadata:{default:void 0},name:{default:""}},setup(w){const f=w,{annotationPrefix:b,videoClass:a,captionClass:y,__metadata:d,name:m,bynderVideo:r,previewImage:A,youtubeVideo:I,youTubeVideoControls:j,youTubeVideoShowInfo:P,youTubeVideoRel:M,youTubeVideoEnableJsApi:R,isYouTubeVideoAutoplayble:V}=f,h=l(()=>f.componentStyle==="style-2"),E=l(()=>f.caption?.trim()||""),S=l(()=>h.value?"w-full":"w-full aspect-16/9"),{isYouTubeAllowed:N,checkYouTubeConsent:D}=ee(),L=()=>{typeof window<"u"&&window.UC_UI?.showSecondLayer&&window.UC_UI.showSecondLayer()},Z=()=>{if(typeof window<"u"){if(window.UC_UI)try{const o=window.UC_UI.getServicesBaseInfo?.()?.find(c=>c.name?.toLowerCase().includes("youtube")||c.id?.toLowerCase().includes("youtube"));if(o?.id&&window.UC_UI.acceptService){window.UC_UI.acceptService(o.id),setTimeout(()=>D(),200);return}}catch(t){console.warn("[video-block] Could not accept YouTube directly:",t)}L()}},F=l(()=>T(r?.selectedFile?.url||r?.original||r?.videoPreviewURLs?.[0]||void 0)),J=l(()=>T(r?.thumbnails?.original)),q=l(()=>F.value||J.value||void 0),x=l(()=>Q(I)),B=l(()=>K(x.value)),z=l(()=>{if(!x.value)return"";const t=new URLSearchParams;if(t.set("playsinline","1"),t.set("controls",j?"1":"0"),t.set("rel",M?"1":"0"),t.set("showinfo",P?"1":"0"),t.set("modestbranding","1"),R){t.set("enablejsapi","1");const o=window.location.origin;t.set("origin",o)}return V&&(t.set("autoplay","1"),t.set("mute","1")),`${B.value}?${t.toString()}`}),O=l(()=>z.value||B.value),$=l(()=>q.value||we),u=k(V),C=l(()=>T(A?.url||r?.thumbnails?.webimage||r?.src||void 0)),g=[`${b}`,`${b}.url#@src`];return(t,o)=>(n(),i("div",te,[e(I)?(n(),i("div",{key:0,"data-sb-field-path":g.join(" ").trim(),class:p(("cn"in t?t.cn:e(U))(e(S),e(h)&&"relative isolate",e(a)??"")),"data-contentful-entry-id":e(d)?.id,"data-contentful-field-id":"youtubeVideo"},[e(N)?(n(),i("iframe",{key:0,src:e(O),title:e(m)||"YouTube video player",width:"560",height:"315",frameborder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture;
1 web-share",referrerpolicy:"strict-origin-when-cross-origin",allowfullscreen:"",class:p(e(h)?"absolute -inset-px h-[calc(100%+2px)] w-[calc(100%+2px)] max-w-none border-0":"block h-full w-full border-0")},null,10,ne)):(n(),i("div",ie,[s("div",se,[s("h3",null,v(t.$t("youtubeConsentTitle")),1),s("p",null,v(t.$t("youtubeConsentText")),1),s("div",le,[s("button",{class:"uc-embedding-more-info",type:"button",onClick:L},v(t.$t("youtubeConsentMoreInfo")),1),s("button",{class:"uc-embedding-accept",type:"button",onClick:Z},v(t.$t("youtubeConsentAccept")),1)])])]))],10,oe)):e(h)?(n(),i("div",{key:1,class:p(("cn"in t?t.cn:e(U))("relative w-full",e(a)??"")),"data-sb-field-path":g.join(" ").trim(),"data-contentful-entry-id":e(d)?.id,"data-contentful-field-id":"bynderVideoUrl"},[e(u)?(n(),i("video",{key:1,src:e($),autoplay:"",playsinline:"",controls:"",class:"h-full w-full object-cover",onEnded:o[2]||(o[2]=c=>u.value=!1)},null,40,re)):(n(),i(Y,{key:0},[e(C)?(n(),i("img",{key:0,src:e(C),alt:"Video preview",class:"absolute inset-0 h-full w-full cursor-pointer object-cover",onClick:o[0]||(o[0]=c=>u.value=!0)},null,8,de)):_("",!0),s("button",{type:"button",class:"absolute inset-0 flex cursor-pointer items-center justify-center","aria-label":"Play video",onClick:o[1]||(o[1]=c=>u.value=!0)},[...o[5]||(o[5]=[s("span",{class:"flex h-16 w-16 items-center justify-center rounded-full bg-black/55 text-white shadow-sm sm:h-20 sm:w-20"},[s("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",class:"ml-1 h-8 w-8 sm:h-10 sm:w-10","aria-hidden":"true"},[s("path",{"fill-rule":"evenodd",d:"M4.5 5.653c0-1.427 1.529-2.33 2.779-1.643l11.54 6.347c1.295.712 1.295 2.573 0 3.286L7.28 19.99A1.905 1.905 0 0 1 4.5 18.347V5.653Z","clip-rule":"evenodd"})])],-1)])])],64))],10,ae)):(n(),i("div",{key:2,class:p(("cn"in t?t.cn:e(U))(e(S),"relative",e(a)??"")),"data-sb-field-path":g.join(" ").trim(),"data-contentful-entry-id":e(d)?.id,"data-contentful-field-id":"bynderVideoUrl"},[e(u)?(n(),i("video",{key:1,src:e($),autoplay:"",controls:"",class:"h-full w-full"},null,8,fe)):(n(),i(Y,{key:0},[e(C)?(n(),i("img",{key:0,src:e(C),alt:"Video preview",class:"absolute inset-0 h-full w-full object-cover cursor-pointer",onClick:o[3]||(o[3]=c=>u.value=!0)},null,8,ce)):_("",!0),s("button",{class:"absolute inset-0 flex items-center justify-center bg-black/20 hover:bg-black/40 transition-colors cursor-pointer","aria-label":"Play video",type:"button",onClick:o[4]||(o[4]=c=>u.value=!0)},[...o[6]||(o[6]=[s("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",class:"h-16 w-16 text-white"},[s("path",{"fill-rule":"evenodd",d:"M4.5 5.653c0-1.427 1.529-2.33 2.779-1.643l11.54 6.347c1.295.712 1.295 2.573 0 3.286L7.28 19.99A1.905 1.905 0 0 1 4.5 18.347V5.653Z","clip-rule":"evenodd"})],-1)])])],64))],10,ue)),e(E)?(n(),i("p",{key:3,class:p(["mt-2 text-left text-sm text-grey",e(y)]),"data-sb-field-path":".caption","data-contentful-entry-id":e(d)?.id,"data-contentful-field-id":"caption"},v(e(E)),11,be)):_("",!0)]))}}),Ce=Object.assign(H(ye,[["__scopeId","data-v-3a05ac24"]]),{__name:"PrimitiveVideoBlock"});export{Ce as default};
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.