https://www.bfm.my/_next/static/chunks/1362-34d66e336f19077d.js?dpl=dpl_nU7uCKzBzo26cbTkEmatgCwYozNF
1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1362],{41422:function(e,t,n){n.d(t,{V:function(){return a},o:function(){return i}});var o=n(94715);let i=async(e,t,n)=>{let i="";if(e.Length&&e.Length.length>0&&(i=" (or",e.Length.forEach(e=>{"Up to 10 minutes"==e?i+=" mp3_duration: [0, 600]":"From 10 to 30 minutes"==e?i+=" mp3_duration: [601, 1800]":"From 30 to 60 minutes"==e?i+=" mp3_duration: [1801, 3600]":"More than 60 minutes"==e&&(i+=" mp3_duration: [3601, 9999999]")}),i+=")"),e.Date&&e.Date.length>0){if("Custom"===e.Date[0]&&"string"==typeof e.Date[1])try{let t=JSON.parse(e.Date[1]);if(t.From&&t.To){let[e,n,o]=t.From.split(" / "),[a,r,l]=t.To.split(" / "),s=new Date("".concat(o,"-").concat(n,"-").concat(e,"T00:00:00")),c=new Date("".concat(l,"-").concat(r,"-").concat(a,"T23:59:59")),d=Math.floor(s.getTime()/1e3),u=Math.floor(c.getTime()/1e3);i+=" interviewtime: [".concat(d,", ").concat(u,"]")}}catch(e){}else i+=" (or",e.Date.forEach(e=>{if("Today"==e){let e=new Date,t=new Date(e.getFullYear(),e.getMonth(),e.getDate()),n=new Date(e.getFullYear(),e.getMonth(),e.getDate(),23,59,59);i+=" interviewtime: [".concat(Math.floor(t.getTime()/1e3),", ").concat(Math.floor(n.getTime()/1e3),"]")}else if("Yesterday"==e){let e=new Date;e.setDate(e.getDate()-1);let t=new Date(e.getFullYear(),e.getMonth(),e.getDate()),n=new Date(e.getFullYear(),e.getMonth(),e.getDate(),23,59,59);i+=" interviewtime: [".concat(Math.floor(t.getTime()/1e3),", ").concat(Math.floor(n.getTime()/1e3),"]")}else if("Last 7 days"==e){let e=new Date,t=new Date;t.setDate(e.getDate()-6);let n=new Date(t.getFullYear(),t.getMonth(),t.getDate()),o=new Date(e.getFullYear(),e.getMonth(),e.getDate(),23,59,59);i+=" interviewtime: [".concat(Math.floor(n.getTime()/1e3),", ").concat(Math.floor(o.getTime()/1e3),"]")}else if("Last 14 days"==e){let e=new Date,t=new Date;t.setDate(e.getDate()-13);let n=new Date(t.getFullYear(),t.getMonth(),t.getDate()),o=new Date(e.getFullYear(),e.getMonth(),e.getDate(),23,59,59);i+=" interviewtime: [".concat(Math.floor(n.getTime()/1e3),", ").concat(Math.floor(o.getTime()/1e3),"]")}else if("Last 30 days"==e){let e=new Date,t=new Date;t.setDate(e.getDate()-29);let n=new Date(t.getFullYear(),t.getMonth(),t.getDate()),o=new Date(e.getFullYear(),e.getMonth(),e.getDate(),23,59,59);i+=" interviewtime: [".concat(Math.floor(n.getTime()/1e3),", ").concat(Math.floor(o.getTime()/1e3),"]")}else if("Last 365 days"==e){let e=new Date,t=new Date;t.setDate(e.getDate()-364);let n=new Date(t.getFullYear(),t.getMonth(),t.getDate()),o=new Date(e.getFullYear(),e.getMonth(),e.getDate(),23,59,59);i+=" interviewtime: [".concat(Math.floor(n.getTime()/1e3),", ").concat(Math.floor(o.getTime()/1e3),"]")}}),i+=")"}if(e.Show&&e.Show.length>0&&(i+=" (or",e.Show.forEach(e=>{e=e.replace(/'/g,"\\'"),i+=" show_name: '".concat(e,"'")}),i+=")"),e.Category&&e.Category.length>0){let t=await (0,o.KU)(),n=Object.keys(t).reduce((e,n)=>(e[n.toLowerCase()]=t[n],e),{}),a=[];e.Category.forEach(e=>{let t=e.toLowerCase();a=[...a,...n[t]]}),i+=" (or",a.forEach(e=>{i+=" category: '".concat(e,"'")}),i+=")"}e.Type&&e.Type.length>0&&(i+=" (or",e.Type.forEach(e=>{i+=" content_type: '".concat(e,"'")}),i+=")"),t(i),n("initial",i)};async function a(e){let t="";if(e.Length&&e.Length.length>0&&(t=" (or",e.Length.forEach(e=>{"Up to 10 minutes"==e?t+=" mp3_duration: [0, 600]":"From 10 to 30 minutes"==e?t+=" mp3_duration: [601, 1800]":"From 30 to 60 minutes"==e?t+=" mp3_duration: [1801, 3600]":"More than 60 minutes"==e&&(t+=" mp3_duration: [3601, 9999999]")}),t+=")"),e.Date&&e.Date.length>0){if("Custom"===e.Date[0]&&"string"==typeof e.Date[1])try{let n=JSON.parse(e.Date[1]);if(n.From&&n.To){let[e,o,i]=n.From.split(" / "),[a,r,l]=n.To.split(" / "),s=new Date("".concat(i,"-").concat(o,"-").concat(e,"T00:00:00")),c=new Date("".concat(l,"-").concat(r,"-").concat(a,"T23:59:59")),d=Math.floor(s.getTime()/1e3),u=Math.floor(c.getTime()/1e3);t+=" interviewtime: [".concat(d,", ").concat(u,"]")}}catch(e){}else t+=" (or",e.Date.forEach(e=>{if("Today"==e){let e=new Date,n=new Date(e.getFullYear(),e.getMonth(),e.getDate()),o=new Date(e.getFullYear(),e.getMonth(),e.getDate(),23,59,59);t+=" interviewtime: [".concat(Math.floor(n.getTime()/1e3),", ").concat(Math.floor(o.getTime()/1e3),"]")}else if("Yesterday"==e){let e=new Date;e.setDate(e.getDate()-1);let n=new Date(e.getFullYear(),e.getMonth(),e.getDate()),o=new Date(e.getFullYear(),e.getMonth(),e.getDate(),23,59,59);t+=" interviewtime: [".concat(Math.floor(n.getTime()/1e3),", ").concat(Math.floor(o.getTime()/1e3),"]")}else if("Last 7 days"==e){let e=new Date,n=new Date;n.setDate(e.getDate()-6);let o=new Date(n.getFullYear(),n.getMonth(),n.getDate()),i=new Date(e.getFullYear(),e.getMonth(),e.getDate(),23,59,59);t+=" interviewtime: [".concat(Math.floor(o.getTime()/1e3),", ").concat(Math.floor(i.getTime()/1e3),"]")}else if("Last 14 days"==e){let e=new Date,n=new Date;n.setDate(e.getDate()-13);let o=new Date(n.getFullYear(),n.getMonth(),n.getDate()),i=new Date(e.getFullYear(),e.getMonth(),e.getDate(),23,59,59);t+=" interviewtime: [".concat(Math.floor(o.getTime()/1e3),", ").concat(Math.floor(i.getTime()/1e3),"]")}else if("Last 30 days"==e){let e=new Date,n=new Date;n.setDate(e.getDate()-29);let o=new Date(n.getFullYear(),n.getMonth(),n.getDate()),i=new Date(e.getFullYear(),e.getMonth(),e.getDate(),23,59,59);t+=" interviewtime: [".concat(Math.floor(o.getTime()/1e3),", ").concat(Math.floor(i.getTime()/1e3),"]")}else if("Last 365 days"==e){let e=new Date,n=new Date;n.setDate(e.getDate()-364);let o=new Date(n.getFullYear(),n.getMonth(),n.getDate()),i=new Date(e.getFullYear(),e.getMonth(),e.getDate(),23,59,59);t+=" interviewtime: [".concat(Math.floor(o.getTime()/1e3),", ").concat(Math.floor(i.getTime()/1e3),"]")}}),t+=")"}if(e.Show&&e.Show.length>
10&&(t+=" (or",e.Show.forEach(e=>{e=e.replace(/'/g,"\\'"),t+=" show_name: '".concat(e,"'")}),t+=")"),e.Category&&e.Category.length>0){let n=await (0,o.KU)(),i=Object.keys(n).reduce((e,t)=>(e[t.toLowerCase()]=n[t],e),{}),a=[];e.Category.forEach(e=>{let t=e.toLowerCase();a=[...a,...i[t]]}),t+=" (or",a.forEach(e=>{t+=" category: '".concat(e,"'")}),t+=")"}return e.Type&&e.Type.length>0&&(t+=" (or",e.Type.forEach(e=>{t+=" content_type: '".concat(e,"'")}),t+=")"),t}},86589:function(e,t,n){var o=n(57437),i=n(63832),a=n(94013),r=n(46387);t.Z=function(e){let{label:t,loading:n=!1,...l}=e;return(0,o.jsx)(i.Z,{sx:{width:"100%",paddingX:"5px"},children:n?(0,o.jsxs)(a.Z,{variant:"outlined",...l,sx:{display:"flex",justifyContent:"center",alignItems:"center",gap:"10px",width:"100%",backgroundColor:"#FFC121",color:"#000",border:"1px solid #000 !important",borderRadius:"30px",height:"42px",fontSize:"16px",fontWeight:600,textTransform:"none",transition:"all 0s","&:hover":{backgroundColor:"#000",color:"#FFC121",borderColor:"#000"}},children:[(0,o.jsx)(i.Z,{component:"img",src:"/loading.gif",sx:{width:"25px",height:"25px"}}),(0,o.jsx)(r.Z,{sx:{fontSize:"16px",fontWeight:600,color:"#000"},children:"Loading"})]}):(0,o.jsx)(a.Z,{variant:"outlined",...l,sx:{width:"100%",backgroundColor:"#FFC121",color:"#000",border:"1px solid #000 !important",borderRadius:"30px",height:"42px",fontSize:"16px",fontWeight:600,textTransform:"none",transition:"all 0s","&:hover":{backgroundColor:"#000",color:"#FFC121",borderColor:"#000"}},children:t})})}},80657:function(e,t,n){var o=n(57437),i=n(42563),a=n(4344),r=n(13970),l=n(27760),s=n(63832),c=n(46387),d=n(33145),u=n(27648);t.Z=function(e){var t,n,p,f,g,h,v,m,x,w,y,b,D,k,_,j,T,C,S,F,M,I,Z,E,Y,W,L,A,O,z,P,R,N;let{structureType:U="content",largePost:V,image:B="/bfm-222-logo.png",showImage:H="/bfm-222-logo.png"}=e,J="",Q="",X="",G=[],$="",q="",K="",ee="",et="",en=null===(t=V.fields)||void 0===t?void 0:t.content_type;if(null===(n=V.fields)||void 0===n||n.omny_embed,"content"===U&&(J=(0,i.QF)((null===(p=V.content)||void 0===p?void 0:p.web_link_url)||""),$=(null===(f=V.content)||void 0===f?void 0:f.type)||"",q=(null===(g=V.content)||void 0===g?void 0:g.title)||q,K=(null===(h=V.content)||void 0===h?void 0:h.description)||K,ee=(null===(v=V.content)||void 0===v?void 0:v.duration)||ee,et=(null===(m=V.content)||void 0===m?void 0:m.published_at)||et,"podcast"===$?(Q=(null===(b=V.content)||void 0===b?void 0:null===(y=b.assets)||void 0===y?void 0:null===(w=y.find(e=>{var t;return(null===(t=e.content_link)||void 0===t?void 0:t.type)==="audio"}))||void 0===w?void 0:null===(x=w.content_link)||void 0===x?void 0:x.url)||"",G=[{showTitle:V.collection?V.collection.name:"BFM Show",pageTitle:(null===(D=V.content)||void 0===D?void 0:D.title)||q,omnyEmbed:"none",audioUrl:Q,image:H,podcastId:(null===(k=V.content)||void 0===k?void 0:k.id)||"",slug:J}]):"video"===$&&(X=(null===(C=V.content)||void 0===C?void 0:null===(T=C.assets)||void 0===T?void 0:null===(j=T.find(e=>{var t;return(null===(t=e.content_link)||void 0===t?void 0:t.type)==="video"}))||void 0===j?void 0:null===(_=j.content_link)||void 0===_?void 0:_.url)||"")),"fields"===U){if(J=(null===(S=V.fields)||void 0===S?void 0:S.slug)||"",$=(null===(F=V.fields)||void 0===F?void 0:F.content_type)||"",q=(null===(M=V.fields)||void 0===M?void 0:M.pagetitle)||q,K=(null===(I=V.fields)||void 0===I?void 0:I.content)||K,et=(null===(Z=V.fields)||void 0===Z?void 0:Z.interviewtime)||et,"event"===$){let e=null===(E=V.fields)||void 0===E?void 0:E.image;if("string"==typeof e&&e.trim().startsWith("{"))try{let t=JSON.parse(e);B=t.homeSlider||t.homeSliderWebp||"/bfm-222-logo.png"}catch(e){B="/bfm-222-logo.png"}else B=e||"/bfm-222-logo.png"}if("podcast"===$)Q=(null===(Y=V.fields)||void 0===Y?void 0:Y.asset_url)||(null===(W=V.fields)||void 0===W?void 0:W.mp3)||"",ee=(null===(L=V.fields)||void 0===L?void 0:L.mp3_duration)||ee,G=[{showTitle:(null===(A=V.fields)||void 0===A?void 0:A.show_name)||"BFM Show",beltName:null===(O=V.fields)||void 0===O?void 0:O.belt_name,pageTitle:q,audioUrl:Q,image:H,podcastId:V.id||"",slug:J}];else if("video"===$){ee=(null===(z=V.fields)||void 0===z?void 0:z.content_duration)||ee;try{X=(null===(P=JSON.parse((null===(R=V.fields)||void 0===R?void 0:R.asset_url)||"[]").find(e=>"original"===e.source))||void 0===P?void 0:P.url)||""}catch(e){X=(null===(N=V.fields)||void 0===N?void 0:N.asset_url)||""}}}function eo(e){switch(e){case"podcast":case"video":return"#000";default:return"#fff"}}return(0,o.jsx)(s.Z,{sx:{overflow:"hidden",display:"flex",position:"relative",borderRadius:"0px 6px 6px 0px",width:"100%",height:"auto",aspectRatio:"1.91 / 1"},children:(0,o.jsxs)(s.Z,{sx:{width:"100%",height:"100%",borderWidth:"0px 0px 0px 1px",borderStyle:"solid",borderColor:"#000",position:"relative",display:"flex",flexWrap:"wrap",alignContent:"space-between",padding:"10px 10px 15px 10px",gap:"15p
1x",zIndex:2,color:"#fff",overflow:"hidden","&:hover":{backgroundColor:"".concat(function(e){switch(e){case"podcast":return"#ffc424";case"video":return"#F1F1F1";case"article":return"#686464";default:return"#000"}}($)),color:"".concat(eo($)),"& .image-overlay":{opacity:0},"& .hover-title":{bottom:"100px"},"& .hover-description":{opacity:1,transform:"translateY(0)"},"& .play-button":{border:"2px solid ".concat(eo($))},"& .play-icon path":{fill:"".concat(eo($)," !important")},"& .play-time":{color:"".concat(eo($))},"& .hover-collapse":{opacity:1,transform:"translateY(0)",visibility:"visible"}}},children:[(0,o.jsx)(s.Z,{className:"image-overlay",sx:{position:"absolute",top:0,left:0,width:"100%",height:"100%",zIndex:1},children:(0,o.jsx)(d.default,{src:B,alt:"Background",priority:!0,fill:!0,sizes:"(max-width: 768px) 100vw, 1440px"})}),(0,o.jsx)(s.Z,{className:"image-overlay",sx:{position:"absolute",top:0,left:0,width:"100%",height:"100%",backgroundImage:"linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.8))",zIndex:2}}),(0,o.jsxs)(s.Z,{sx:{display:"flex",justifyContent:"space-between",width:"100%",zIndex:5},children:[(0,o.jsxs)(s.Z,{sx:{fontSize:"14px",fontStyle:"italic"},children:[$.charAt(0).toUpperCase()+$.slice(1).toLowerCase(),"s"]}),(0,o.jsxs)(s.Z,{className:"hover-collapse",sx:{display:"flex",gap:"10px",opacity:0,visibility:"hidden",transform:"translateY(-10px)",transition:"opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease",alignItems:"start"},children:[(0,o.jsx)(l.p,{id:V.id,size:"24px"}),(0,o.jsx)(a.Z,{color:"article"===$||"event"===$?"white":"black",marginTop:"0px",height:"24px",width:"24px",pointer:!1,shareLink:"".concat("https://www.bfm.my/","content/").concat($,"/").concat(J),contentType:en,title:q})]})]}),(0,o.jsxs)(s.Z,{sx:{zIndex:4,position:"relative",width:"100%"},children:[(0,o.jsxs)(u.default,{href:"event"===$?"/content/events/".concat(J):"/content/".concat($,"/").concat(J),children:[(0,o.jsx)(s.Z,{className:"hover-title",sx:{width:"100%",fontSize:{xs:"24px",md:"28px",custom1000:"32px",custom1100:"36px",custom1367:"40px"},letterSpacing:"0px",fontWeight:600,marginBottom:"10px",position:"absolute",bottom:"40px",transition:"color 0.3s ease, bottom 0.3s ease",overflow:"hidden",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:2,textOverflow:"ellipsis",lineHeight:1.2},children:q}),(0,o.jsx)(s.Z,{className:"hover-description",sx:{fontSize:"18px",fontWeight:500,lineHeight:1.2,color:"".concat(eo($)),marginBottom:"10px",overflow:"hidden",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:2,textOverflow:"ellipsis",position:"absolute",bottom:"40px",opacity:0,transform:"translateY(10px)",transition:"opacity 0.3s ease, transform 0.3s ease"},children:(0,i.ld)(K)})]}),"article"!==$&&"event"!==$&&(0,o.jsxs)(s.Z,{sx:{display:"flex",alignItems:"center",gap:"5px"},children:[(0,o.jsx)(r.Z,{structureType:U,playTime:(0,i.ZC)(Number.parseFloat(ee)),type:$,item:V,playlist:G,videoUrl:"video"===$?X:void 0}),(0,o.jsxs)(c.Z,{sx:{fontSize:"14px",fontWeight:400,letterSpacing:"0px",fontStyle:"italic"},children:["\xb7"," ","content"===U?(0,i.I_)(et):(0,i.Yj)(et)," ","\xb7"," ","content"===U?(0,i.NH)(et):(0,i.pn)(Number.parseFloat(et))]})]})]})]})})}},2506:function(e,t,n){var o=n(57437),i=n(42563),a=n(4344),r=n(13970),l=n(27760),s=n(84928),c=n(63832),d=n(31691),u=n(33145),p=n(27648);t.Z=function(e){var t,n,f,g,h,v,m,x,w,y,b,D,k,_,j,T,C,S;let{structureType:F="content",item:M,index:I,label:Z,playlist:E,showImage:Y,...W}=e,L=(0,d.Z)(),A="",O="",z="",P="",R="",N="",U="",V=null===(t=M.fields)||void 0===t?void 0:t.content_type;null===(n=M.fields)||void 0===n||n.omny_embed,"content"===F&&(A=(null===(f=M.content)||void 0===f?void 0:f.id)||"",O=(0,i.QF)((null===(g=M.content)||void 0===g?void 0:g.web_link_url)||""),z=(null===(h=M.content)||void 0===h?void 0:h.type)||z,P=(null===(v=M.content)||void 0===v?void 0:v.published_at)||P,R=(null===(m=M.content)||void 0===m?void 0:m.duration)||R,N=(null===(x=M.content)||void 0===x?void 0:x.description)||N,U=(null===(w=M.content)||void 0===w?void 0:w.title)||U),"fields"===F&&(A=M.id||"",O=(null===(y=M.fields)||void 0===y?void 0:y.slug)||"",z=(null===(b=M.fields)||void 0===b?void 0:b.content_type)||z,P=(null===(D=M.fields)||void 0===D?void 0:D.interviewtime)||P,R=(null===(k=M.fields)||void 0===k?void 0:k.mp3_duration)||R,N=(null===(_=M.fields)||void 0===_?void 0:_.content)||N,U=(null===(j=M.fields)||void 0===j?void 0:j.pagetitle)||U,(null===(T=M.fields)||void 0===T?void 0:T.content_type)==="event"&&(Y=(0,s.dI)(null===(C=M.fields)||void 0===C?void 0:C.image,s.lD,s.F5),(null===(S=M.fields)||void 0===S?void 0:S.slug)&&(O=M.fields.slug)));let B=e=>{switch(e){case"podcast":return"Podcasts";case"article":return"Articles";case"video":return"Videos";case"event":return"Events";default:return"Unknown"}};return(0,o.jsx)(o.Fragment,{children:M&&(0,o.jsxs)(c.Z,{...W,sx:{width:"100%",height:"150px",padding:"15px 0",display:"flex",position:"relative",backgroundColor:"dark"===L.palette.mode?L.palette.background.default:"transparent",borderBottom:"1px solid ".concat("dark"===L.palette.mode?"#444":"#D4D4D4"),borderTop:0===I?"1px solid ".concat("dark"===L.palette.mode?"#444":"#D4D4D4"):"none"},children:[(0,o.jsxs)(p.default,{href:"events"===z||"event"===z?"/events/".concat(O):"/content/".concat(z,"/").concat(O),style:{position:"relative"},children:[(0,o.jsx)(c.Z,{sx:{width:"110px",height:"120px",borderRadius:"6px",overflow:"hidden",backgroundColor:"dark"===L.palette.mode?L.palette.background.paper:"#f5f5f5",border:"dark"===L.palette.mode?"1px solid ".concat(L.palette.divider):"1px solid #e0e0e0",marginRight:"10px",transition:"border-color 0s, background-color 0s"},children:(0,o.jsx)(u.default,{alt:"story image",src:Y,width:110,height:120,style:{width:"100%",height:"100%",objectFit:"cover",display:"block"}})}),Z&&(0,o.jsx)(c.Z,{sx:{position:"absolute",top:"0",left:"0",backgroundColor:"dark"===L.palette.mode?L.palette.background.paper:L.palette.common.black,color:"dark"===L.palette.mode?L.palette.text.primary:L.palette.common.white,padding:"8px 13px",borderTopLeftRadius:"6px",borderBottomRightRadius:"6px",fontSize:"14px",fontWeight:600},children:I+1})]}),(0,o.jsxs)(c.Z,{sx:{display:"flex",flexDirection:"column",justifyContent:"space-between",width:"100%"},children:[(0,o.jsxs)(c.Z,{children:[(0,o.jsx)(c.Z,{sx:{fontWeight:400,fontSize:"14px",fontStyle:"italic",color:"dark"===L.palette.mode?L.palette.text.secondary:"#626262",display:"flex",justifyContent:"space-between"},children:"article"!==z&&"event"!==z?(0,o.jsxs)(c.Z,{children:[B(z)," \xb7"," ","content"===F?(0,i.I_)(P):(0,i.Yj)(P)," ","\xb7"," ",(0,i.ZC)(Number.parseFloat(R))]}):(0,o.jsxs)(c.Z,{children:[B(z)," \xb7"," ","content"===F?(0,i.I_)(P):(0,i.Yj)(P)]})}),(0,o.jsx)(p.default,{href:"events"===z||"event"===z?"/events/".concat(O):"/content/".concat(z,"/").concat(O),children:(0,o.jsx)(c.Z,{sx:{fontWeight:600,fontSize:"16px",color:"dark"===L.palette.mode?L.palette.text.primary:"#000",paddingTop:"5px",lineHeight:1.2,overflow:"hidden",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:2,textOverflow:"ellipsis"},children:U})})]}),"podcast"===z&&(0,o.jsxs)(c.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",paddingRight:"10px"},children:[(0,o.jsxs)(c.Z,{sx:{display:"flex",alignItems:"center",gap:"10px"},children:[(0,o.jsx)(l.p,{id:A,size:"22px",color:"dark"===L.palette.mode?"white":"black"}),(0,o.jsx)(a.Z,{color:"dark"===L.palette.mode?"white":"black",marginTop:"5px",height:"22px",width:"22px",pointer:!1,shareLink:"".concat("https://www.bfm.my/","content/").concat(z,"/").concat(O),contentType:V,title:U})]}),(0,o.jsx)(r.Z,{mobile:!0,structureType:F,item:M,playlist:E,color:"dark"===L.palette.mode?L.palette.common.white:L.palette.common.black,bgColor:"dark"===L.palette.mode?L.palette.background.default:L.palette.common.white,hoverBgColor:"dark"===L.palette.mode?L.palette.common.white:L.palette.grey[900],hoverBtnColor:"dark"===L.palette.mode?L.palette.common.black:L.palette.common.white,borderColor:"dark"===L.palette.mode?L.palette.common.white:L.palette.common.black})]}),("article"===z||"event"===z)&&(0,o.jsx)(p.default,{href:"event"===z?"/events/".concat(O):"/content/".concat(z,"/").concat(O),children:(0,o.jsx)(c.Z,{sx:{color:"dark"===L.palette.mode?L.palette.text.secondary:"#626262",fontSize:"14px",fontWeight:600,lineHeight:1.2,overflow:"hidden",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:2,textOverflow:"ellipsis"},children:(0,i.ld)(N)||""})})]})]})})}},3261:function(e,t,n){n.d(t,{Z:function(){return w}});var o=n(57437),i=n(42563),a=n(4344),r=n(41904),l=n(27760),s=n(76605),c=n(12699),d=n.n(c),u=n(63832),p=n(46387),f=n(59832),g=n(31691),h=n(33145),v=n(27648),m=n(2265),x=function(e){let{...t}=e,n=(0,g.Z)(),i="dark"===n.palette.mode;return(0,o.jsx)(u.Z,{sx:{display:"flex",alignItems:"center",padding:"5px",zIndex:3},children:(0,o.jsx)(f.Z,{...t,sx:{...t.sx,transition:"all 0s","&:hover":{"& path":{fill:i?n.palette.text.secondary:"#ccc"}}},children:(0,o.jsx)(d(),{path:s.P_p,size:"60px",color:i?n.palette.text.primary:"#fff"})})})},w=function(e){var t,n,c,w,y,b,D,k,_,j,T,C,S,F,M,I,Z,E,Y;let{structureType:W="content",item:L,index:A,showName:O}=e,z=(0,m.useRef)(null),[P,R]=(0,m.useState)(!1),N=(0,r.U)(e=>e.toggleIsPlaying),U=(0,r.U)(e=>e.object.isPlaying),V=(0,g.Z)();(0,m.useEffect)(()=>
1{if(U){var e;null===(e=z.current)||void 0===e||e.pause()}},[U]);let B="",H="/bfm-222-logo.png",J="",Q="",X="",G="",$="";if("content"===W){B=(null===(t=L.content)||void 0===t?void 0:t.id)||"",Q=(0,i.QF)((null===(n=L.content)||void 0===n?void 0:n.web_link_url)||""),X=(null===(c=L.content)||void 0===c?void 0:c.type)||X,G=(null===(w=L.content)||void 0===w?void 0:w.title)||G,$=(null===(y=L.content)||void 0===y?void 0:y.published_at)||$;let e=null===(D=L.content)||void 0===D?void 0:null===(b=D.images)||void 0===b?void 0:b.find(e=>"default"===e.key),o=null==e?void 0:null===(k=e.sources)||void 0===k?void 0:k.find(e=>"animated"===e.key||"default"===e.key);o&&(H=o.url);let a=null===(j=L.content)||void 0===j?void 0:null===(_=j.assets)||void 0===_?void 0:_.find(e=>{var t;return(null===(t=e.content_link)||void 0===t?void 0:t.type)==="video"});J=(null==a?void 0:null===(T=a.content_link)||void 0===T?void 0:T.url)||J}if("fields"===W){B=L.id||"",Q=(null===(C=L.fields)||void 0===C?void 0:C.slug)||"",H=(null===(S=L.fields)||void 0===S?void 0:S.image)||H,X=(null===(F=L.fields)||void 0===F?void 0:F.content_type)||X,G=(null===(M=L.fields)||void 0===M?void 0:M.pagetitle)||G,$=(null===(I=L.fields)||void 0===I?void 0:I.interviewtime)||$;try{J=(null===(Z=JSON.parse(null===(E=L.fields)||void 0===E?void 0:E.asset_url).find(e=>"original"===e.source))||void 0===Z?void 0:Z.url)||J}catch(e){J=(null===(Y=L.fields)||void 0===Y?void 0:Y.asset_url)||J}}return(0,o.jsxs)(u.Z,{sx:{width:"100%",padding:"15px 0",position:"relative",borderBottom:"1px solid ".concat("dark"===V.palette.mode?"#444":"#D4D4D4"),borderTop:0===A?"1px solid ".concat("dark"===V.palette.mode?"#444":"#D4D4D4"):"none"},children:[P?(0,o.jsxs)(u.Z,{sx:{width:"100%",height:"250px",backgroundColor:"#000",borderRadius:"6px",textAlign:"center",border:"dark"===V.palette.mode?"1px solid #444":"none"},children:[(0,o.jsxs)(u.Z,{component:"video",controls:!0,autoPlay:!0,playsInline:!0,controlsList:"nodownload",ref:z,onPlay:()=>N(!1),sx:{width:"auto",maxWidth:"100%",height:"100%",objectFit:"cover",borderRadius:"6px",zIndex:1,filter:"dark"===V.palette.mode?"brightness(1.1) contrast(1.1)":"none",boxShadow:"dark"===V.palette.mode?"inset 0 0 0 1px rgba(255, 255, 255, 0.1)":"none"},children:[(0,o.jsx)("source",{src:J}),"Your browser does not support the video tag."]}),(0,o.jsx)(f.Z,{sx:{position:"absolute",top:"20px",right:"5px",backgroundColor:"dark"===V.palette.mode?"rgba(255, 255, 255, 0.9)":"#fff",color:(V.palette.mode,"#000"),zIndex:1e3,transition:"all 0s","&:hover":{backgroundColor:"dark"===V.palette.mode?"rgba(255, 255, 255, 0.8)":"rgba(255, 255, 255, 0.9)"},"& svg":{color:"#000000"},"& span.MuiTouchRipple-root":{color:"#000000"}},disableRipple:!0,onClick:()=>{R(!1)},"aria-label":"close video",children:(0,o.jsx)(d(),{path:s.r5M,size:"20px"})})]}):(0,o.jsxs)(u.Z,{sx:{width:"100%",height:"auto",aspectRatio:"2.22 / 1",borderRadius:"6px",overflow:"hidden",backgroundColor:"dark"===V.palette.mode?V.palette.background.paper:"#f5f5f5",border:"dark"===V.palette.mode?"1px solid ".concat(V.palette.divider):"1px solid #e0e0e0",display:"flex",justifyContent:"center",alignItems:"center",zIndex:2,position:"relative",transition:"border-color 0s, background-color 0s"},children:[(0,o.jsx)(u.Z,{sx:{width:"100%",height:"100%",position:"absolute",top:0,left:0,"::before":{content:'""',position:"absolute",top:0,left:0,width:"100%",height:"100%",backgroundColor:"dark"===V.palette.mode?"rgba(0, 0, 0, 0.4)":"rgba(0, 0, 0, 0.3)",zIndex:1}},children:(0,o.jsx)(h.default,{alt:"video gif",src:H,fill:!0,sizes:"(max-width: 768px) 100vw, 1440px",unoptimized:!0,style:{objectFit:"cover"}})}),(0,o.jsx)(x,{onClick:()=>{N(!1),R(!0)}})]}),(0,o.jsx)(v.default,{href:"/content/".concat(X,"/").concat(Q),children:(0,o.jsx)(p.Z,{sx:{fontSize:"16px",fontWeight:600,lineHeight:"21.6px",color:"dark"===V.palette.mode?V.palette.text.primary:"#000",paddingTop:"10px"},children:G})}),(0,o.jsxs)(u.Z,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,o.jsxs)(u.Z,{sx:{fontWeight:400,fontSize:"14px",fontStyle:"italic",color:"dark"===V.palette.mode?V.palette.text.secondary:"#626262",paddingTop:"10px"},children:[O," \xb7"," ","content"===W?(0,i.I_)($):(0,i.Yj)($)]}),(0,o.jsxs)(u.Z,{sx:{display:"flex",alignItems:"center",gap:"5px"},children:[(0,o.jsx)(l.p,{id:B,size:"22px",color:"dark"===V.palette.mode?"white":"black"}),(0,o.jsx)(a.Z,{color:"dark"===V.palette.mode?"white":"grey",marginTop:"2.5px",height:"22px",width:"22px",pointer:!1,shareLink:"".concat("https://www.bfm.my/","content/").concat(X,"/").concat(Q)})]})]})]})}},69280:function(e,t,n){n.r(t),n.d(t,{AuthContext:function(){return p},AuthProvider:function(){return f}});var o=n(57437),i=n(28036),a=n(87678),r=n(58979),l=n(2265),s=n(99376),c=n(43301),d=n(30773),u=n(11614);let p=(0,l.createContext)({user:null,refreshUser:()=>Promise.resolve(),signUpWithEmailAndPassword:()=>Promise.resolve(),signInWithEmailAndPassword:()=>Promise.resolve(),signInWithApple:()=>Promise.resolve(!1),signInWithGoogle:()=>Promise.resolve(!1),signInWithFacebook:()=>
1Promise.resolve(!1),requestAccountDeletion:()=>Promise.resolve(),cancelAccountDeletion:()=>Promise.resolve(),signOut:()=>Promise.resolve()});function f(e){let{initialUser:t,children:n}=e,{setTimestamp:f,podcastHistory:g}=(0,l.useContext)(d.SessionContext),h=function(e){let t=(0,s.useRouter)(),[n,o]=(0,l.useState)(null!=e?e:null);return(0,l.useEffect)(()=>{o(null!=e?e:null)},[e]),(0,l.useEffect)(()=>(0,i.MX)(async n=>{if(n){let e=await n.getIdToken();(0,u.setCookie)("__session",e,{maxAge:3600,path:"/",sameSite:"lax"}),o(n)}else(0,u.deleteCookie)("__session",{path:"/"}),o(null);(null==e?void 0:e.uid)!==(null==n?void 0:n.uid)&&t.refresh()}),[e,t]),n}(t);async function v(e){if(Array.isArray(g)&&g.length>0){let t=g.map(e=>e.id);await (0,i.yP)(i.db,e,t)}}async function m(e){f(Date.now()),v(e.user.uid)}async function x(e){var t,n;let o=await (0,c.rh)(i.I8,e),a=null!==(n=null===(t=(0,c.gK)(o))||void 0===t?void 0:t.isNewUser)&&void 0!==n&&n;return await m(o),a}async function w(e,t){let n=await (0,c.Xb)(i.I8,e,t);(0,c.w$)(n.user,(0,r.jA)("https://www.bfm.my/")).catch(()=>{}),await m(n)}async function y(e,t){let n=await (0,c.e5)(i.I8,e,t);await m(n)}async function b(){return x(new c.O4("apple.com"))}async function D(){return x(new c._O)}async function k(){return x(new c.hJ)}async function _(){let e=i.I8.currentUser;e&&e.reload()}async function j(){let e=i.I8.currentUser;if(!e)throw Error("You must be signed in to delete your account.");if(!1===await (0,i.VA)(i.db,"users/".concat(e.uid),{deletion:(0,a.a5)(new Date)}))throw Error("Could not schedule your account for deletion. Please try again.");await i.I8.signOut()}async function T(){let e=i.I8.currentUser;if(!e)throw Error("You must be signed in to reactivate your account.");if(!1===await (0,i.SR)(i.db,"users/".concat(e.uid,"/deletion")))throw Error("Could not reactivate your account. Please try again.")}async function C(){await i.I8.signOut(),(0,u.deleteCookie)("__session",{path:"/"})}return(0,o.jsx)(p.Provider,{value:{user:h,refreshUser:_,signUpWithEmailAndPassword:w,signInWithEmailAndPassword:y,signInWithApple:b,signInWithFacebook:D,signInWithGoogle:k,requestAccountDeletion:j,cancelAccountDeletion:T,signOut:C},children:n})}},31269:function(e,t,n){n.d(t,{V:function(){return o.AuthContext}});var o=n(69280)},30773:function(e,t,n){n.r(t),n.d(t,{SessionContext:function(){return l},SessionProvider:function(){return s}});var o=n(57437),i=n(2265);function a(e){let{key:t,initialValue:n}=e,[o,a]=(0,i.useState)(n),r=(0,i.useRef)(!0);return(0,i.useEffect)(()=>{if(r.current){let e=localStorage.getItem(t);e?a(JSON.parse(e)):a(n),r.current=!1;return}try{localStorage.setItem(t,JSON.stringify(o))}catch(e){console.error("Error: localStorage.setItem() failed")}},[o,t,n]),(0,i.useEffect)(()=>{function e(e){let{key:n,newValue:o}=e;n===t&&a(JSON.parse(o||""))}return window.addEventListener("storage",e),()=>window.removeEventListener("storage",e)}),[o,a]}var r=n(31269);let l=(0,i.createContext)({timestamp:0,setTimestamp:()=>{},podcastHistory:[],setPodcastHistory:()=>{},playedLive:!1,setPlayedLive:()=>{}});function s(e){let{children:t}=e,[n,s]=a({key:"session_timestamp",initialValue:Date.now()}),[c,d]=a({key:"podcast_history",initialValue:[]}),[u,p]=a({key:"played_live",initialValue:!1}),{refreshUser:f}=(0,i.useContext)(r.V);return(0,i.useEffect)(()=>{f()},[n]),(0,o.jsx)(l.Provider,{value:{timestamp:n,setTimestamp:s,podcastHistory:c,setPodcastHistory:d,playedLive:u,setPlayedLive:p},children:t})}},87678:function(e,t,n){n.d(t,{Gj:function(){return s},Hn:function(){return i},Jx:function(){return l},a5:function(){return a},n3:function(){return o},s5:function(){return r}});let o=30,i="DELETE";function a(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o,n=new Date(e.getTime());return n.setUTCDate(n.getUTCDate()+t),{status:"pending",requested_at:e.toISOString(),purge_after:n.toISOString()}}function r(e){return(null==e?void 0:e.status)==="pending"}function l(e){var t;let n=Date.parse(null!==(t=null==e?void 0:e.purge_after)&&void 0!==t?t:"");return Number.isNaN(n)?null:new Date(n)}function s(e){return e.trim()===i}},58979:function(e,t,n){function o(e){if(!e)return;let t=e.endsWith("/")?e:"".concat(e,"/");return{url:"".concat(t).concat("auth/action"),handleCodeInApp:!1}}n.d(t,{Lt:function(){return r},jA:function(){return o},mY:function(){return a}});let i=new Set(["verifyEmail","recoverEmail"]);function a(e){let{mode:t,oobCode:n}=e;return n?"signIn"===t?"signIn":t&&i.has(t)?"apply":"delegate":"landing"}function r(e,t){if(!e)return null;let n=t.startsWith("?")?t:"?".concat(t);return"https://".concat(e,"/__/auth/action").concat(n)}},28036:function(e,t,n){n.d(t,{Ve:function(){return f},SP:function(){return h},I8:function(){return o.I},yP:function(){return p},db:function(){return o.db},SR:function(){return r.SR},xt:function(){return g},tQ:function(){return v},s1:function(){return u},Wt:function(){return m},MX:function(){return a},QG:function(){return x},Ex:function(){return w},ic:function(){return y},VA:function(){return r.VA},Ts:function(){return c},Al:function(){return d},FM:function(){return b.useRealtimeData}}),n(60532);var o=n(21906);n(83079),(0,n(12119).$)("f3761e2ad0cb8dde6b887d9476f1b45750b66a59");var i=n(43301);function a(e){return(0,i.MX)(o.I,e)}var r=n(74135);let l=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i,s=/^\d+$/;async function c(e,t,n,o,i){let a={...n,elapsed_time:i,date:new Date().toISOString().split("T")[0],created_at:new Date().valueOf()};await (0,r.VA)(e,"users/".concat(t,"/history_v3/").concat(o),a)}async function d(e,t,n){return await (0,r.VA)(e,"users/".concat(t),n)}async function u(e,t,n){return await (0,r.Yu)(e,"users/".concat(t,"/history_v3/").concat(n))}async function p(e,t,n){let o={};
1n.forEach(e=>{o[e]={elapsed_time:0,completed:!1,date:new Date().toISOString().split("T")[0],created_at:new Date().valueOf()}}),await (0,r.VA)(e,"users/".concat(t,"/history_v3"),o)}async function f(e,t,n){await p(e,t,[n])}async function g(e,t,n){await (0,r.SR)(e,"users/".concat(t,"/history_v3/").concat(n))}async function h(e,t,n){if(!function(e){if("string"!=typeof e)return!1;let t=e.trim();return l.test(t)||s.test(t)}(n))throw Error('Refusing to save "'.concat(n,'": not a content id. ')+"Pass the content's own id rather than the id of the component rendering it.");let o={[n]:{created_at:new Date().valueOf()}};await (0,r.VA)(e,"users/".concat(t,"/saved_content_v3"),o)}async function v(e,t,n){await (0,r.SR)(e,"users/".concat(t,"/saved_content_v3/").concat(n))}async function m(e,t){return await (0,r.Yu)(e,"users/".concat(t,"/interests_v3"))}async function x(e,t,n){return await (0,r.a_)(e,"users/".concat(t,"/interests_v3"),n)}async function w(e,t,n){return await (0,r.VA)(e,"users/".concat(t),{onboarding:{completedAt:n}})}async function y(e,t,n,o){return await (0,r.VA)(e,"users/".concat(t,"/terms"),{acceptedAt:n,version:o})}var b=n(19835)},74135:function(e,t,n){n.d(t,{SR:function(){return l},VA:function(){return r},Yu:function(){return i},a_:function(){return a}});var o=n(17292);async function i(e,t){let n=await (0,o.U2)((0,o.iH)(e,t));return n.exists()?n.val():null}async function a(e,t,n){try{let i=(0,o.iH)(e,t);return await (0,o.t8)(i,n),(await (0,o.U2)(i)).val()}catch(e){return console.error("Error setting data in Firebase:",e),!1}}async function r(e,t,n){try{let i=(0,o.iH)(e,t);return await (0,o.Vx)(i,n),(await (0,o.U2)(i)).val()}catch(e){return console.error("Error updating data in Firebase:",e),!1}}async function l(e,t){try{let n=(0,o.iH)(e,t);return await (0,o.Od)(n),!0}catch(e){return console.error("Error deleting data in Firebase:",e),!1}}}}]);
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.