PageSourceSearch

https://familiesforlife.sg/assets/FeaturedVideoSetting.2989d029.js

js familiesforlife.sg collected 2026-10-03 20:16:20 UTC 2,661 bytes, 1 lines download raw bytes

1import{r as e,G as a,P as l,Q as t,H as o,b as u,d}from"./element-plus.80abf16b.js";import{c1 as s,bM as n,c2 as r,c7 as i,c8 as v,ca as m,cg as c,ce as p,c3 as f,cI as b,bI as g,ep as h,eq as _}from"./commonmodules.b9c1dd40.js";import{_ as V,a as w}from"./index.d3bd9396.js";import"./lodash-es.480d1bd8.js";import"./axios.1263d4b1.js";import"./vue-router.5e13d197.js";const D=e=>(h("data-v-2e459b53"),e=e(),_(),e),I=D((()=>m("label",null,"Video Embed Code",-1))),y=D((()=>m("label",null,"Align",-1))),j={class:"dialog-footer"};var x=V(s({__name:"FeaturedVideoSetting",props:{domId:null,title:null,componentData:null,save:{type:Function}},setup(s,{expose:h}){const _=s,V=n(""),D=n({widgetTitle:"Featured Video",width:"100%",height:"100%",webpartDomId:`camps_featuredvideo_${w.randomWord(!1,4)}`,align:"left"}),x=n([{name:"Left",value:"left"},{name:"Center",value:"center"},{name:"Right",value:"right"}]),C=n(!1),k=()=>{V.value="",C.value=!C.value,C.value&&(null==_?void 0:_.componentData)&&(D.value=JSON.parse(_.componentData))},P=()=>{var e,a;if(D.value.videoID){if(!/^<iframe(([^<>])*?)src="(([^<>])*?)><\/iframe>$/gi.test(D.value.videoID))return V.value="Please enter a valid video embed code.",!1;let l=null==(a=null==(e=D.value.videoID.match(/(http|https){1}:\/\/[^"'\s]*/))?void 0:e.at(0))?void 0:a.toLowerCase();if(!l||!l.startsWith("https://www.youtube.com"))return V.value="Please enter a YouTube video embed code.",!1;if(!l.includes("controls=0"))return V.value='Please uncheck "Show player controls" in YouTube and paste the embed code.',!1}return V.value="",!0},S=()=>{P()&&(_.save(D.value),k())};return h({toggleDialog:k}),(n,h)=>{const _=e,w=a,F=l,T=t,U=o,L=u,W=d;return r(),i(W,{modelValue:C.value,"onUpdate:modelValue":h[3]||(h[3]=e=>C.value=e),title:s.title,width:"520px",class:"camps-setting-dialog","close-on-click-modal":!1},{footer:v((()=>[m("span",j,[c(L,{type:"primary",onClick:S},{default:v((()=>[p("Save")])),_:1}),c(L,{onClick:k},{default:v((()=>[p("Cancel")])),_:1})])])),default:v((()=>[c(U,null,{default:v((()=>[c(w,{error:V.value},{default:v((()=>[I,c(_,{modelValue:D.value.videoID,"onUpdate:modelValue":h[0]||(h[0]=e=>D.value.videoID=e),type:"textarea",rows:"6",autosize:"",onBlur:h[1]||(h[1]=e=>P())},null,8,["modelValue"])])),_:1},8,["error"]),c(w,null,{default:v((()=>[y,c(T,{modelValue:D.value.align,"onUpdate:modelValue":h[2]||(h[2]=e=>D.value.align=e)},{default:v((()=>[(r(!0),f(g,null,b(x.value,(e=>(r(),i(F,{key:e.value,label:e.name,value:e.value},null,8,["label","value"])))),128))])),_:1},8,["modelValue"])])),_:1})])),_:1})])),_:1},8,["modelValue","title"])}}}),[["__scopeId","data-v-2e459b53"]]);export{x 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.