1import{_ as B}from"./BGFm77PD.js";import{S as M,_ as K,C as A}from"./Jb_8QThL.js";import{u as E}from"./yhrUApBQ.js";import{u as F}from"./CpQ52AZc.js";import{d as W,s as b,r as j,f as a,I as c,C as _,j as r,w as i,a_ as z,F as u,i as l,B as k,aK as L,g as s,h as m,W as h}from"./Du_l-ZPp.js";const O={class:"grid grid-rows-1 gap-2rem grid-cols-[repeat(4,minmax(82.28%,1fr))] md:grid-cols-[repeat(4,minmax(38.05%,1fr))] lg:grid-cols-[repeat(4,minmax(23%,1fr))] overflow-x-hidden"},P={class:"modal-content w-90vw lg:w-[min(80vw,1200px)] p-2 lg:p-4 rounded-lg bg-[--color-background-base-surface-1] shadow-xl box-shadow-[1px_1px_1px_black]"},U=["src"],Q=W({__name:"CmsElementWsnycYoutubeVideos",props:{content:{}},setup(w){const p=w,g=b(()=>{var o,e,t;return(t=(e=(o=p.content)==null?void 0:o.config)==null?void 0:e.videos)==null?void 0:t.value}),f=b(()=>{var o,e,t;return((t=(e=(o=p.content)==null?void 0:o.config)==null?void 0:e.backgroundColor)==null?void 0:t.value)||"var(--color-background-base-surface-2)"}),C=o=>({videoID:o.videoID,relatedVideos:"rel=0&",loop:o.loop?`loop=1&playlist=${o.videoID}&`:"",showControls:o.showControls?"controls=0&":"",start:Number.parseInt(o.start)!==0?`start=${o.start}&`:"",end:Number.parseInt(o.end)!==0?`end=${o.end}&`:"",disableKeyboard:"disablekb=1"}),v=o=>{const e=C(o);return`https://www.youtube-nocookie.com/embed/ ${e.videoID}? ${e.relatedVideos} ${e.loop} ${e.showControls} ${e.start} ${e.end} ${e.disableKeyboard}`.replace(/ /g,"")},x=o=>{var e;return((e=o==null?void 0:o.media)==null?void 0:e.url)||o.originalThumbnail},d=j(null),{isOpen:y,open:V,close:I}=E(),$=o=>{d.value=v(o),V()},S=o=>{o.target.closest(".modal-content")||I()},T={itemsToShow:1.2,gap:32,wrapAround:!0,snapAlign:"start",breakpoints:{768:{itemsToShow:2.5},1024:{itemsToShow:4}}};h("openVideoInModal",$),h("getVideoThumbnail",x);const{isClient:D}=F();return(o,e)=>{const t=B,N=K;return s(),a("div",null,[r(D)?(s(),c(r(A),z({key:0,class:"wsnyc-youtube-videos"},T),{addons:i(()=>[m(N)]),default:i(()=>[(s(!0),a(u,null,k(g.value,n=>(s(),c(r(M),{key:n.videoID},{default:i(()=>[m(t,{video:n,"background-color":f.value},null,8,["video","background-color"])]),_:2},1024))),128))]),_:1},16)):(s(),a(u,{key:1},[l("div",O,[(s(!0),a(u,null,k(g.value,n=>(s(),a("div",{key:n.videoID,class:"flex-1"},[m(t,{video:n,"background-color":f.value},null,8,["video","background-color"])]))),128))]),e[0]||(e[0]=l("div",{class:"h-30px mt-4 lg:hidden w-ful"},null,-1))],64)),r(y)?(s(),c(L,{key:2,to:"body"},[l("div",{onClick:S,class:"modal-backdrop fixed top-0 left-0 bottom-0 right-0 grid place-items-center z-2"},[l("div",P,[r(d)?(s(),a("iframe",{key:0,class:"w-full inset-0 aspect-video",src:r(d)},null,8,U)):_("",!0)])])])):_("",!0)])}}});export{Q 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.