1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/Audio-DIM3heHH.js","assets/index-sUPB-bMu.js","assets/index-CjsJg3P0.css","assets/Audio-DLXquh6p.css"])))=>i.map(i=>d[i]); 2import{_ as T,m as E,c,o as n,a as e,t as a,n as C,j as S,k as b,b as r,g as i,w as m,Z as _,F as P,s as v,e as y,a1 as D,a0 as O,ak as M,f as L,p as w,d as R}from"./index-sUPB-bMu.js";import $ from"./ShareButtons-pL-O_6lt.js";import{m as H}from"./menuItemNameMixin-D-Sxrcvm.js";const q={name:"QueueItem",props:{data:{type:Object,required:!0},isActive:{type:Boolean,required:!1,default:!1}},methods:{...E(["podcastSetPlaying"]),selectItem(){this.podcastSetPlaying({background:this.data.background,title:this.data.title,description:this.data.description,position:this.data.id,published_at:this.data.published_at,audio_file:this.data.audio_file})}}},X={class:"queue-item__content"},B={class:"queue-item__data"},G={class:"title"},Q={class:"queue-item__bottom"},U={class:"queue-item__rigth"},V={class:"published"};function j(t,s,d,u,p,o){return n(),c("div",{class:C(["queue-item",{"queue-item--is-active":d.isActive}]),onClick:s[0]||(s[0]=(...g)=>o.selectItem&&o.selectItem(...g))},[e("div",X,[e("div",B,[e("h3",G,a(d.data.title),1),e("div",Q,[e("div",U,[e("p",V,a(t.$t("PODCAST.INDEX.TEXT.PUBLISHED"))+" "+a(t.$dayjs(d.data.published_at).format("L")),1)])])])])],2)}const W=T(q,[["render",j],["__scopeId","data-v-ee867b72"]]),Y=b(()=>w(()=>import("./Audio-DIM3heHH.js"),__vite__mapDeps([0,1,2,3]))),F={name:"PodcastIndex",components:{QueueItem:W,AudioPlayer:Y,ShareButtons:$},mixins:[H],data(){return{pageMessage:null}},computed:{...S(["podcastList","podcastPlaying","churchMenuItems","podcastLoading","podcastEndList"]),itemNamePodcast(){return this.churchMenuItems.find(s=>s.codigo.includes("INPCAPP_PODCAST_ANCHOR")).codigo},podcastId(){const t=this.churchMenuItems.find(s=>s.codigo.match(new RegExp("^INPCAPP_PODCAST_ANCHOR_")));return t?/^(INPCAPP_PODCAST_ANCHOR_)(.*)/gm.exec(t.codigo)[2]:null},podcastProvider(){return"ANCHOR"},isLoading(){return!this.pageMessage&&(!this.churchMenuItems||!this.podcastList)},totalQueue(){return this.podcastList?this.podcastList.length:0},hasNext(){return this.podcastPlaying&&this.podcastPlaying.position<this.totalQueue},hasPrev(){return this.podcastPlaying&&this.podcastPlaying.position>1},playerBackground(){return this.podcastPlaying.background?this.podcastPlaying.background:"/img/placeholder/podcast-cover.png"},hasSmallWidth(){return window.screen.width<480}},watch:{podcastPlaying:{async handler(t){await this.$router.replace({name:"podcastIndex",query:{episode:t.position}}).catch(()=>{})},deep:!0},podcastList(){this.checkIfHasContent(),this.selectContentToShow()}},created(){this.getData(),this.$useHead({title:`${this.podcastPlaying.title} - ${this.$t("PODCAST.MODULE_NAME")}`})},mounted(){this.checkIfHasContent(),this.selectContentToShow()},methods:{...E(["podcastGetAnchorData","churchGetMenuItems","podcastSetPlaying","getMoreAnchorData"]),trackControl(t=null){let s=0;if(!(t==="next"&&this.podcastPlaying&&this.podcastPlaying.position>=this.totalQueue)&&!(t==="prev"&&this.podcastPlaying&&this.podcastPlaying.position<=0)){switch(t){case"next":s=this.podcastPlaying.position+1;break;case"prev":s=this.podcastPlaying.position-1;break;case"random":s=Math.floor(Math.random()*(this.totalQueue-0+1))+0;break;default:s=0;break}this.selectContentToShow(s)}},selectContentToShow(t=null){let s=1;if(!(this.isLoading||!this.totalQueue))switch(t!==null?s=t:Number(this.$route.query.episode)&&(s=Number(this.$route.query.episode)),this.podcastProvider){case"ANCHOR":this.processPodcastData(this.podcastList.find(d=>d.id===s));break}},processPodcastData(t){if(t)switch(this.podcastProvider){case"ANCHOR":this.setTrackToPlay({title:t.title,audio_file:t.audio_file,published_at:t.published_at,position:t.id});break}},async getData(){try{await this.churchGetMenuItems()}catch{this.setPageMessage("ERROR");return}if(!this.podcastId){this.setPageMessage("ERROR");return}switch(this.podcastProvider){case"ANCHOR":this.getAnchorData();break}},async getAnchorData(){if(!(this.podcastList&&this.podcastList.length))try{await this.podcastGetAnchorData(this.podcastId),this.trackControl()}catch{this.setPageMessage("ERROR")}},setTrackToPlay({background:t=null,title:s,description:d=null,position:u=0,published_at:p,audio_file:o}){this.podcastSetPlaying({background:t,title:s,description:d,position:u,published_at:p,audio_file:o})},setPageMessage(t=null){switch(t){case"NO_CONTENT":this.pageMessage={type:"warning",message:this.$t("PODCAST.INDEX.TEXT.MESSAGE.NO_CONTENT")};break;case"ERROR":this.pageMessage={type:"error",message:this.$t("PODCAST.INDEX.TEXT.MESSAGE.ERROR")};break;default:this.pageMessage=null;break}},checkIfHasContent(){if(!this.isLoading&&!this.totalQueue){this.setPageMessage("NO_CONTENT");return}this.setPageMessage()}}},z={class:"podcast"},Z={key:0,class:"podcast__loading"},J={class:"playing"},K={class:"playing__title"},x={class:"playing__title__content"},tt={class:"playing__timeline"},et={class:"playing__controls"},st={class:"play"},at={class:"queue"},ot={class:"queue__content"},it={class:"content__text"},nt={key:0,class:"notfound__content"},ct={class:"notfound__content__ilustration"},dt={class:"notfound__content__title"},lt={class:"notfound__content__subtitle"},rt={key:1,class:"podcast__content"},ht={class:"podcast__playing"},_t={key:0,class:"player-data"},ut={class:"player-data__content"},pt=["src","alt"],gt={class:"player-data__info"},mt={class:"player-data__title"},Pt={class:"title"},yt={class:"player-data__description"},ft={class:"published"},vt={class:"player-data__description__share"},Tt={class:"player-data__player"},Et={class:"podcast__queue"},Ct={class:"queue"},It={class:"queue__header"},kt={class:"title"},At={class:"queue__content scroll-content"},Nt={class:"podcast__content__button__content"};function St(t,s,d,u,p,o){const g=r("PageContentHeader"),l=r("skeleton-element"),f=r("SvgElement"),I=r("router-link"),k=r("share-buttons"),A=r("AudioPlayer"),N=r("QueueItem");return n(),c("div",z,[i(g,{padded:!0,leftmobile:!0,"to-route":"churchHome"},{default:m(()=>[_(a(t.menuItemName(o.itemNamePodcast)||t.$t("PODCAST.MODULE_NAME")),1
2)]),_:1}),o.isLoading?(n(),c("div",Z,[e("div",J,[e("div",K,[i(l,{width:"7rem",height:"100%"}),e("div",x,[i(l,{class:"line"}),i(l,{class:"line"})])]),e("div",tt,[i(l,{width:"100%",height:"100%"})]),e("div",et,[e("div",st,[i(l,{width:"100%",height:"100%"})])])]),e("div",at,[e("div",ot,[(n(),c(P,null,v(3,h=>e("div",{key:h,class:"content"},[e("div",it,[i(l,{class:"line"}),i(l,{class:"line"})])])),64))])])])):(n(),c(P,{key:1},[t.podcastList.length?y("",!0):(n(),c("div",nt,[e("div",ct,[s[1]||(s[1]=e("div",{class:"cover"},null,-1)),i(f,{name:"IlustraPodcasts",type:"other",class:"notfound-icon"})]),e("h1",dt,a(t.$t("PODCAST.EMPTY.TITLE")),1),e("h2",lt,a(t.$t("PODCAST.EMPTY.SUBTITLE")),1),i(I,{to:{name:"churchHome"},class:"btn btn--color-primary notfound__content__button"},{default:m(()=>[_(a(t.$t("PODCAST.EMPTY.BUTTON")),1)]),_:1})])),t.podcastList&&t.podcastList.length?(n(),c("div",rt,[e("section",ht,[t.podcastPlaying?(n(),c("div",_t,[e("div",ut,[e("img",{src:o.playerBackground,alt:t.podcastPlaying.title,class:"player-data__image"},null,8,pt),e("div",gt,[e("div",mt,[e("h1",Pt,a(t.podcastPlaying.title),1)]),e("div",yt,[e("p",ft,a(t.$t("PODCAST.INDEX.TEXT.PUBLISHED"))+" "+a(t.$dayjs(t.podcastPlaying.published_at).format("L")),1),e("div",vt,[i(k,{text:t.podcastPlaying.title,url:t.$route.fullPath,direction:"left",type:o.hasSmallWidth?"small":"large"},O({_:2},[o.hasSmallWidth?void 0:{name:"default",fn:m(()=>[_(a(t.$t("PODCAST.INDEX.TEXT.SHARE")),1)]),key:"0"}]),1032,["text","url","type"])])])])]),e("div",Tt,[i(A,{src:t.podcastPlaying.audio_file,"has-next":o.hasNext,"has-prev":o.hasPrev,onGetTrack:o.trackControl},null,8,["src","has-next","has-prev","onGetTrack"])])])):y("",!0)]),e("section",Et,[e("div",Ct,[e("div",It,[e("p",kt,a(t.$t("PODCAST.INDEX.TEXT.EPISODES"))+" - "+a(t.podcastPlaying.position)+"/"+a(t.podcastList.length),1)]),e("div",At,[(n(!0),c(P,null,v(t.podcastList,h=>(n(),R(N,{key:h.id,data:h,"is-active":h.id===t.podcastPlaying.position},null,8,["data","is-active"]))),128))])])]),D(e("button",{class:C(["podcast__content__button",{"btn--disabled":t.podcastLoading}]),onClick:s[0]||(s[0]=L(h=>t.getMoreAnchorData(o.podcastId),["prevent"]))},[e("span",Nt,[_(a(t.$t("PODCAST.INDEX.MESSAGE.VIEW_MORE"))+" ",1),i(f,{type:"icon",name:"CirclePlus",title:"CirclePlus"})])],2),[[M,!t.podcastEndList]])])):y("",!0)],64))])}const Mt=T(F,[["render",St],["__scopeId","data-v-61d10b69"]]);export{Mt 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.