1import{f as p,C as se,M as F,m as O,G as B,o as l,e as V,w as h,a as o,u as t,b as e,d as G,g as N,y as E,bB as ve,v as J,c as r,F as T,j as R,t as x,h as A,J as ae,r as K,q as Q,B as ge,E as xe,s as L,aU as be,i as ye,H as we,I as ke,N as Ce,_ as $e}from"./app-f96b9a38.js";import Pe from"./CabinetLayout-2ac69e36.js";import Me from"./PodcastTabs-3155fc3f.js";import{u as Ee}from"./vue-composable.esm-bundler-11aa148c.js";import{d as Se}from"./debounce-57bb86d4.js";import{p as le}from"./pluralize-31e79adb.js";import{P as oe}from"./Pagination-f728c1ba.js";import{_ as de}from"./LoadingIcon-9ac274f8.js";import{P as Ie}from"./PlusCircledIcon-c92b5020.js";import{_ as ce}from"./FormPrimaryButton-0c835555.js";import{_ as Ae}from"./CloseIcon-82975fa5.js";import{u as je}from"./useAuthStore-bd281680.js";import{j as Oe,h as ne,_ as Be,U as Ve,S as ze}from"./transition-d5d1ed5a.js";import{_ as Le}from"./Modal-046c4c5e.js";import{_ as Te}from"./FormSecondaryButton-d2d32ab6.js";import{_ as qe}from"./_plugin-vue_export-helper-c27b6911.js";import{S as He,b as Ue,M as ie,g as De}from"./menu-6e48567b.js";import Fe from"./PodcastMenuButtons-f5c7fb3e.js";import Ne from"./PodcastRssRedirectedAlert-b4ebe183.js";import Re from"./PodcastImportProcess-8bc5be68.js";import"./MainFooter-763d8833.js";import"./CookieNotification-5c729a3c.js";import"./CabinetAside-b507a808.js";import"./useDarkMode-eb5341a5.js";import"./StatsIcon-2edff3fb.js";import"./KnowledgebaseIcon-e039e069.js";import"./SettingsIcon-17514e01.js";import"./ReportBugButton-3cf539b2.js";import"./FormTextarea-aff24f0e.js";import"./FormInputLabel-5489c904.js";import"./v4-a960c1f4.js";import"./FormTextInput-85d75d75.js";import"./dom-cadfdd7e.js";import"./hidden-e39bbb26.js";import"./focus-management-dccaee5f.js";import"./micro-task-89dcd6af.js";import"./description-9a269291.js";import"./use-outside-click-f54ccb8d.js";import"./AdSlot-a2b1f874.js";import"./vue.runtime.esm-bundler-cbd40ca6.js";import"./switch-97e49124.js";import"./use-resolve-button-type-e81962cc.js";import"./MainAuthUserMenu-64843d4c.js";import"./FavoriteIcon-d21876e3.js";import"./ChevronLeftIcon-ff15d7a3.js";import"./CabinetMainNavMobile-cc0ad8f4.js";import"./MainNavMobileMenu-8fcb8fd4.js";import"./RecommendationIcon-375aa968.js";import"./EpisodeIcon-bc94c554.js";import"./ImpersonationHeader-65abc4f8.js";import"./isObject-a1be2107.js";import"./PodcastPlaylistIcon-048cb04c.js";import"./SocialShareModal-5c52f41e.js";import"./VKIcon-293b1bd0.js";import"./OdnoklassnikiIcon-487f3d97.js";import"./CopyToClipboardButton-2f3e7452.js";import"./Alert-026cbf0b.js";import"./FormSection-649b63d4.js";import"./FormDefaultButton-044a04f0.js";const Qe=e("div",{class:"fixed inset-0 bg-black bg-opacity-25"},null,-1),We={class:"fixed inset-0 overflow-y-auto"},Ge={class:"flex min-h-full items-center justify-center p-4 text-center"},Je={class:"mt-2"},Ke={class:"mb-3 flex items-center justify-between px-3 py-1"},Ye=["onClick"],Xe={class:"truncate text-xs font-medium"},Ze=e("span",{class:"h-4 w-4 flex-shrink-0"},null,-1),et={key:0,class:"flex items-center justify-center py-16"},tt={__name:"EpisodeAddMultipleToPodcastPlaylist",props:{podcast:{type:Object,required:!0},episodes:{type:Array,required:!0},showInitial:{type:Boolean,required:!0}},emits:["close","resetSelection"],setup(n,{emit:b}){const f=n;let i=je(),v=p(f.showInitial),d=p(!1),S=p(!1),w=p([]),g=p("");se(()=>f.showInitial,u=>v.value=u),se(v,u=>{if(u){if(!i.isAuthenticated()){F("ÐÐ»Ñ Ð´Ð¾Ð±Ð°Ð²Ð»ÐµÐ½Ð¸Ñ Ñпизодов в плÑйлиÑÑ Ð½Ñжно войÑи на ÑайÑ"),k();return}z()}});let k=()=>{v.value=!1,b("close")},q=u=>{I(),H(u)},I=()=>{k(),S.value=!1,w.value=[]},_=async()=>{let u=g.value;g.value="",await $(u),z()},$=u=>{if(!i.isAuthenticated()){F("ÐÐ»Ñ ÑÐ¾Ð·Ð´Ð°Ð½Ð¸Ñ Ð¿Ð»ÑйлиÑÑа нÑжно войÑи на ÑайÑ");return}return O.post(`/api/podcasts/${f.podcast.id}/podcast-playlists`,{name:u,is_public:!0}).then(()=>ae("ÐлÑйлиÑÑ Ñоздан")).catch(y=>{y.response.status===403&&y.response.data.message==="Your email address is not verified."?F("ÐодÑвеÑдиÑе Ð²Ð°Ñ email адÑÐµÑ Ð´Ð»Ñ Ð¸ÑполÑÐ·Ð¾Ð²Ð°Ð½Ð¸Ñ Ð²ÑеÑ
ÑÑнкÑий ÑайÑа"):B("ÐÑибка пÑи Ñоздании плÑйлиÑÑа")})},H=u=>{if(!i.isAuthenticated()){F("ÐÐ»Ñ Ð´Ð¾Ð±Ð°Ð²Ð»ÐµÐ½Ð¸Ñ Ñпизода в плÑйлиÑÑ Ð½Ñжно войÑи на ÑайÑ");return}return O.post(`/api/podcast-playlists/${u}/episodes`,{episodes:f.episodes,skipPreviouslyAttached:!0}).then(()=>ae("Ðпизод добавлен в подбоÑкÑ")).catch(()=>B("ÐÑибка пÑи добавлении Ñпизода в плÑйлиÑÑ")).finally(()=>b("resetSelection"))},z=()=>(d.value=!0,O.get(`/api/public-podcast-playlists?include=publicEpisodes&sort=-created_at&filter[podcast_id]=${f.podcast.id}`).then(u=>{w.value=u.data.data,S.value=!0}
1).catch(()=>B("ÐÑибка пÑи полÑÑении ÑпиÑка плÑйлиÑÑов")).finally(()=>d.value=!1));return(u,y)=>(l(),V(t(ze),{appear:"",show:t(v),as:"template"},{default:h(()=>[o(t(Oe),{as:"div",class:"relative z-50",onClose:t(k)},{default:h(()=>[o(t(ne),{as:"template",enter:"duration-300 ease-out","enter-from":"opacity-0","enter-to":"opacity-100",leave:"duration-200 ease-in","leave-from":"opacity-100","leave-to":"opacity-0"},{default:h(()=>[Qe]),_:1}),e("div",We,[e("div",Ge,[o(t(ne),{as:"template",enter:"duration-300 ease-out","enter-from":"opacity-0 scale-95","enter-to":"opacity-100 scale-100",leave:"duration-200 ease-in","leave-from":"opacity-100 scale-100","leave-to":"opacity-0 scale-95"},{default:h(()=>[o(t(Be),{class:"relative w-full max-w-sm transform overflow-hidden rounded-2xl bg-neutral-100 px-4 py-8 text-left align-middle shadow-xl transition-all dark:bg-neutral-700"},{default:h(()=>[o(t(Ve),{as:"h4",class:"mb-6 px-3 font-semibold leading-6 text-brand-300 dark:text-neutral-100 lg:px-10 lg:text-lg"},{default:h(()=>[G(" ÐобавиÑÑ Ð² подбоÑÐºÑ ")]),_:1}),e("div",Je,[e("div",Ke,[N(e("input",{"onUpdate:modelValue":y[0]||(y[0]=C=>E(g)?g.value=C:g=C),type:"text",class:"w-full rounded border border-brand-100 py-1 ring-0 dark:border-0 dark:bg-neutral-900 dark:placeholder-neutral-400",placeholder:"ÐовÑй плейлиÑÑ",onKeyup:y[1]||(y[1]=ve((...C)=>t(_)&&t(_)(...C),["enter"]))},null,544),[[J,t(g)]])]),e("ul",null,[(l(!0),r(T,null,R(t(w),C=>(l(),r("li",{key:C.id,class:"mb-1"},[e("button",{type:"button",class:"flex w-full items-center justify-between space-x-5 truncate rounded-lg border border-transparent px-3 py-2 text-left text-brand-300 hover:border-brand-100 dark:text-neutral-100 dark:hover:border-neutral-100",title:"ÐобавиÑÑ Ð² плÑйлиÑÑ",onClick:U=>t(q)(C.id)},[e("span",Xe,x(C.name),1),Ze],8,Ye)]))),128))]),t(d)&&t(w).length===0?(l(),r("div",et,[o(de,{class:"h-8 w-8 text-brand-300 dark:text-neutral-300"})])):A("",!0)]),e("button",{type:"button",class:"absolute right-0 top-0 mr-5 mt-5 py-1 text-brand-200 hover:text-brand-300 dark:text-neutral-300",onClick:y[2]||(y[2]=(...C)=>t(k)&&t(k)(...C))},[o(Ae,{class:"h-6 w-6"})])]),_:1})]),_:1})])])]),_:1},8,["onClose"])]),_:1},8,["show"]))}},st={class:"mb-4 text-center text-sm text-brand-100 dark:text-neutral-400"},at={class:"flex justify-center"},re={__name:"EpisodeGroupActionModalButton",props:{buttonText:{type:String,required:!0},modalText:{type:String,required:!0},question:{type:String,required:!0},buttonClass:{type:String,default:""}},emits:["onConfirm"],setup(n,{emit:b}){let f=p(!1),i=()=>{f.value=!1};return(v,d)=>{const S=K("FormDangerButton");return l(),r(T,null,[e("button",{class:Q(["flex items-center justify-center rounded-md px-5 py-1 text-sm text-neutral-100 transition-colors duration-300 dark:text-neutral-700 md:px-7 md:py-1.5 lg:px-8",n.buttonClass]),onClick:d[0]||(d[0]=w=>E(f)?f.value=!0:f=!0)},x(n.buttonText),3),o(S,{text:"{{ buttonText }}"}),o(Le,{title:n.modalText,"show-initial":t(f),"bg-classes":"bg-neutral-100 dark:bg-neutral-800","max-width-classes":"max-w-lg",onClose:t(i)},{default:h(()=>[e("p",st,x(n.question),1),ge(v.$slots,"default"),e("div",at,[o(Te,{text:"ÐеÑ",class:"mr-6",onClick:t(i)},null,8,["onClick"]),o(ce,{text:"ÐодÑвеÑдиÑÑ",onClick:d[1]||(d[1]=w=>b("onConfirm"))})])]),_:3},8,["title","show-initial","onClose"])],64)}}};const c=n=>(we("data-v-6f7a427a"),n=n(),ke(),n),lt={class:"full-shadow rounded-2xl px-4 py-6 sm:px-5 md:px-14 md:py-9 lg:pr-24"},ot={class:"flex items-center"},nt=c(()=>e("h4",{class:"section-heading mr-10"},"Ðои ÑпизодÑ",-1)),it=c(()=>e("span",{class:"ml-1 hidden sm:ml-2 sm:inline-block"},"ÐовÑй Ñпизод",-1)),rt={key:0,class:"flex flex-row flex-wrap items-center md:flex-nowrap"},dt={class:"mb-2 mr-10 basis-full text-brand-300 dark:text-neutral-400 md:basis-auto"},ct=c(()=>e("p",{class:"mb-4 text-center text-sm text-brand-300 dark:text-neutral-400"},' ÐÐ¿Ð¸Ð·Ð¾Ð´Ñ ÑнÑÑÑе Ñ Ð¿ÑбликаÑии поменÑÑÑ Ñвой ÑÑаÑÑÑ Ð½Ð° "ÑеÑновик" и бÑдÑÑ Ð²Ð¸Ð´Ð½Ñ ÑолÑко авÑоÑÑ Ð¿Ð¾Ð´ÐºÐ°ÑÑа в кабинеÑе. ',-1)),ut=c(()=>e("p",{class:"mb-4 text-center text-sm text-brand-300 dark:text-neutral-400"},"УдаленнÑе ÑÐ¿Ð¸Ð·Ð¾Ð´Ñ Ð½Ðµ Ð¿Ð¾Ð´Ð»ÐµÐ¶Ð°Ñ Ð²Ð¾ÑÑÑановлениÑ!",-1)),pt={class:"mb-5 sm:hidden"},mt={class:"mb-8 w-full border-collapse text-left"},ht={class:"text-sm"},ft={class:"h-16 text-brand-100 dark:text-neutral-400 [&>th]:pb-3.5 [&>th]:font-normal"},_t={class:"hidden pr-3 xs:table-cell"},vt=["checked"],gt=c(()=>e("th",{class:"sm:text-center"},[e("span",{class:"sm:hidden"},"Ðпизод"),e("span",{class:"hidden sm:inline"},"Ðбложка")],-1)),xt=c(()=>e("th",null,[e("span",{class:"hidden sm:inline"},"Ðазвание")],-1)),bt={class:"hidden lg:table-cell lg:pr-6 xl:pr-10"},yt=c(()=>e("span",{class:"mr-1.5 leading-tight"},"ÐаÑа пÑбликаÑии",-1)),wt={key:0,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",class:"h-6 w-6"},kt=c(()=>e("path",{"fill-rule":"evenodd",d:"M14.77 12.79a.75.75 0 01-1.06-.02L10 8.832 6.29 12.77a.75.75 0 11-1.08-1.04l4.25-4.5a.75.75 0 011.08 0l4.25 4.5a.75.75 0 01-.02 1.06z","clip-rule":"evenodd"},null,-1)),Ct=[kt],$t={key:1,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",class:"h-6 w-6"},Pt=c(()=>e("path",{"fill-rule":"evenodd",d:"M5.23 7.21a.75.75 0 011.06.02L10 11.168l3.71-3.938a.75.75 0 111.08 1.04l-4.25 4.5a.75.75 0 01-1.08 0l-4.25-4.5a.75.75 0 01.02-1.06z","clip-rule":"evenodd"},null,-1)),Mt=[Pt],Et=c(()=>e("span",{class:"mr-0.5"},"СÑаÑÑÑ",-1)),St=c(()=>e("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 3c2.755 0 5.455.232 8.083.678.533.09.917.556.917 1.096v1.044a2.25 2.25 0 01-.659 1.591l-5.432 5.432a2.25 2.25 0 00-.659 1.591v2.927a2.25 2.25 0 01-1.244 2.013L9.75 21v-6.568a2.25 2.25 0 00-.659-1.591L3.659 7.409A2.25 2.25 0 013 5.818V4.774c0-.54.384-1.006.917-1.096A48.32 48.32
10 0112 3z"},null,-1)),It=[St],At={class:"flex items-center px-2 py-2"},jt=["checked"],Ot={class:"ml-2 text-sm font-medium focus:ring-violet-300"},Bt={key:0,class:"text-sm"},Vt={class:"hidden pr-3 xs:table-cell"},zt=["checked","onChange"],Lt={class:"pr-2 sm:text-center"},Tt=["src"],qt={class:"w-full pr-3 align-top"},Ht={class:"line-clamp-1"},Ut={class:"hidden font-medium leading-tight text-brand-100 dark:text-neutral-400 lg:block"},Dt={key:0},Ft={class:"block text-brand-100 dark:text-neutral-400 lg:hidden"},Nt={class:"hidden whitespace-nowrap pr-3 md:pr-10 lg:table-cell"},Rt={class:"text-brand-300 dark:text-neutral-100"},Qt={class:"whitespace-nowrap pr-3 text-right sm:text-left md:pr-10"},Wt={class:"inline-flex sm:hidden"},Gt={key:0,xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"h-6 w-6 text-[#00881c]"},Jt=c(()=>e("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M9 12.75L11.25 15 15 9.75M21 12a9 9 0 11-18 0 9 9 0 0118 0z"},null,-1)),Kt=[Jt],Yt={key:1,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",class:"h-6 w-6 text-neutral-400"},Xt=c(()=>e("path",{"fill-rule":"evenodd",d:"M6.75 2.25A.75.75 0 017.5 3v1.5h9V3A.75.75 0 0118 3v1.5h.75a3 3 0 013 3v11.25a3 3 0 01-3 3H5.25a3 3 0 01-3-3V7.5a3 3 0 013-3H6V3a.75.75 0 01.75-.75zm13.5 9a1.5 1.5 0 00-1.5-1.5H5.25a1.5 1.5 0 00-1.5 1.5v7.5a1.5 1.5 0 001.5 1.5h13.5a1.5 1.5 0 001.5-1.5v-7.5z","clip-rule":"evenodd"},null,-1)),Zt=[Xt],es={key:2,xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"h-6 w-6 text-neutral-400"},ts=c(()=>e("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 9v3.75m9-.75a9 9 0 11-18 0 9 9 0 0118 0zm-9 3.75h.008v.008H12v-.008z"},null,-1)),ss=[ts],as={key:3,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",class:"h-6 w-6 text-neutral-400 opacity-80"},ls=c(()=>e("path",{d:"M21.731 2.269a2.625 2.625 0 00-3.712 0l-1.157 1.157 3.712 3.712 1.157-1.157a2.625 2.625 0 000-3.712zM19.513 8.199l-3.712-3.712-8.4 8.4a5.25 5.25 0 00-1.32 2.214l-.8 2.685a.75.75 0 00.933.933l2.685-.8a5.25 5.25 0 002.214-1.32l8.4-8.4z"},null,-1)),os=c(()=>e("path",{d:"M5.25 5.25a3 3 0 00-3 3v10.5a3 3 0 003 3h10.5a3 3 0 003-3V13.5a.75.75 0 00-1.5 0v5.25a1.5 1.5 0 01-1.5 1.5H5.25a1.5 1.5 0 01-1.5-1.5V8.25a1.5 1.5 0 011.5-1.5h5.25a.75.75 0 000-1.5H5.25z"},null,-1)),ns=[ls,os],is={class:"sm:hidden md:inline-block"},rs={key:0,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",class:"h-4 w-4"},ds=c(()=>e("path",{"fill-rule":"evenodd",d:"M16.704 4.153a.75.75 0 01.143 1.052l-8 10.5a.75.75 0 01-1.127.075l-4.5-4.5a.75.75 0 011.06-1.06l3.894 3.893 7.48-9.817a.75.75 0 011.05-.143z","clip-rule":"evenodd"},null,-1)),cs=[ds],us={key:1,xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"h-4 w-4"},ps=c(()=>e("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6.75 3v2.25M17.25 3v2.25M3 18.75V7.5a2.25 2.25 0 012.25-2.25h13.5A2.25 2.25 0 0121 7.5v11.25m-18 0A2.25 2.25 0 005.25 21h13.5A2.25 2.25 0 0021 18.75m-18 0v-7.5A2.25 2.25 0 015.25 9h13.5A2.25 2.25 0 0121 11.25v7.5"},null,-1)),ms=[ps],hs={key:2,xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"h-4 w-4"},fs=c(()=>e("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 9v3.75m9-.75a9 9 0 11-18 0 9 9 0 0118 0zm-9 3.75h.008v.008H12v-.008z"},null,-1)),_s=[fs],vs={key:3,xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"h-4 w-4"},gs=c(()=>e("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M16.862 4.487l1.687-1.688a1.875 1.875 0 112.652 2.652L10.582 16.07a4.5 4.5 0 01-1.897 1.13L6 18l.8-2.685a4.5 4.5 0 011.13-1.897l8.932-8.931zm0 0L19.5 7.125M18 14v4.75A2.25 2.25 0 0115.75 21H5.25A2.25 2.25 0 013 18.75V8.25A2.25 2.25 0 015.25 6H10"},null,-1)),xs=[gs],bs={class:"ml-1"},ys={key:1},ws={colspan:"5",class:"text-sm text-brand-100 dark:text-neutral-400"},ks={class:"flex justify-between"},Cs={class:"flex flex-col sm:flex-row sm:items-center"},$s={class:"text-sm text-brand-300 dark:text-neutral-100 sm:mr-6"},Ps=c(()=>e("span",{class:"hidden xs:inline"},"ÐÑего:",-1)),Ms={class:"flex items-center"},Es=c(()=>e("span",{class:"text-sm text-brand-300 dark:text-neutral-300"},"ÐоказÑваÑÑ: ",-1)),Ss=["value"],Is={class:"hidden justify-end xs:flex"},As={class:"flex justify-end xs:hidden"},js={__name:"MyEpisodeList",props:{podcast:{type:Object,required:!0},paginatedEpisodesInitial:{type:Object,required:!0},importing:{type:Boolean,default:!1}},setup(n){const b=n;let f=p(),i=p([]),v=p(!1),d=p(b.paginatedEpisodesInitial),S=p(d.value.meta.current_page),w=p(d.value.meta.total),g=p(d.value.meta.per_page),k=[10,30,50,70];k.includes(g.value)||(k.push(g.value),k=k.sort((m,a)=>m-a));let q=p(),I=p(!1),_=p(""),$=p(!1),H=p(!1),z=null,u=p(""),y=p(!1);xe(()=>{b.importing&&(z=setInterval(()=>M(S.value),4e3))});let C=L(()=>[{label:"ÐпÑбликованнÑй",value:"public"},{label:"Удален",value:"deleted"},{label:"ЧеÑновик",value:"draft"},{label:"ÐÐµÑ Ñайла",value:"audio-missing"},{label:"ÐапланиÑован",value:"scheduled"}]),U=L(()=>i.value.length+" "+le("Ñпизод",i.value.length)),ue=L(()=>{const m=d.value.data,a=i.value;return m.filter(P=>a.indexOf(P.id)===-1).length===0}),pe=L(()=>{const m=d.value.data,a=i.value;return m.filter(s=>a.indexOf(s.id)>=0).length}),me=m=>{const a=d.value.data,P=i.value;let s;m.target.checked?s=a.filter(j=>P.indexOf(j.id)===-1):s=a.filter(j=>P.indexOf(j.id)>
1=0),s.forEach(j=>{Y(j)})},Y=m=>{const a=i.value.indexOf(m.id);a>=0?i.value.splice(a,1):i.value.push(m.id)},he=async()=>{$.value=!0,await O.post(`/api/podcasts/${b.podcast.id}/unpublish-episodes`,{episodes:i.value}).then(()=>W()).catch(()=>{B("ÐÑибка пÑи загÑÑзке Ñпизодов")}).finally(()=>{$.value=!1}),M()},fe=m=>{u.value=m,M()},X=()=>{y.value=!y.value,M()},Z=()=>{u.value="",M()},_e=async()=>{$.value=!0,await O.post(`/api/podcasts/${b.podcast.id}/delete-episodes`,{episodes:i.value}).then(()=>W()).catch(()=>{B("ÐÑибка пÑи загÑÑзке Ñпизодов")}).finally(()=>{$.value=!1}),M()},W=()=>{i.value=[]},ee=async(m=1)=>{await M(m),f.value.scrollIntoView({block:"center",behavior:"smooth"})},te=async()=>{let m=d.value.meta.current_page;await M(1),m!==1&&f.value.scrollIntoView({block:"center",behavior:"smooth"})},M=(m=1)=>{$.value=!0;let a=`&filter[podcast_id]=${b.podcast.id}&filter[name_has_words_starting_with]=${_.value}&filter[status]=${u.value}`;const P=b.fetchUrl??"/api/my-episodes";return O.get(P+`?include=podcast.authors${a}&page=${m}&per_page=${g.value}&sort=${y.value?"":"-"}published_at`).then(s=>{d.value=s.data,S.value=m,w.value=d.value.meta.total,H.value=_.value!==""||!!u.value}).catch(()=>{B("ÐÑибка пÑи загÑÑзке Ñпизодов")}).finally(()=>{$.value=!1})},D=Se(()=>{_.value!==null&&(_.value.length>=3||_.value.length===0)&&M()},400);return Ee(q,()=>{I.value&&_.value==""&&(I.value=!1)}),be(()=>{clearInterval(z)}),(m,a)=>{const P=K("Link");return l(),r("div",lt,[e("div",{ref_key:"headingElement",ref:f,class:"mb-4 flex items-center justify-between lg:mb-6"},[e("div",ot,[nt,N(e("input",{ref_key:"episodeSearchInput",ref:q,"onUpdate:modelValue":a[0]||(a[0]=s=>E(_)?_.value=s:_=s),type:"text",placeholder:"ÐоиÑк по Ñпизодам",class:Q(["episode-list-paginated-search-input-expandable hidden rounded-2xl border-0 pl-9 text-sm outline-0 ring-0 transition-all duration-500 dark:text-neutral-100 dark:placeholder-neutral-300 sm:inline-block",[t(I)?"w-56 bg-brand-gray-300 dark:bg-neutral-700":"w-0 cursor-pointer"]]),onInput:a[1]||(a[1]=(...s)=>t(D)&&t(D)(...s)),onClick:a[2]||(a[2]=s=>E(I)?I.value=!0:I=!0)},null,34),[[J,t(_)]]),t($)?(l(),V(de,{key:0,class:"h-4 w-4 text-brand-300 dark:text-neutral-100 sm:ml-5"})):A("",!0)]),o(P,{href:`/my/podcasts/${n.podcast.id}/episodes/create`,class:"flex items-center rounded-lg bg-brand-300 px-3 py-1 text-sm text-neutral-100 transition-opacity duration-200 hover:opacity-80 dark:bg-neutral-100 dark:text-neutral-700 sm:px-4 sm:py-1.5",title:"СоздаÑÑ Ð½Ð¾Ð²Ñй Ñпизод"},{default:h(()=>[o(Ie,{class:"h-4 w-4 flex-shrink-0"}),it]),_:1},8,["href"])],512),t(pe)?(l(),r("div",rt,[e("div",dt,"ÐÑбÑано: "+x(t(U)),1),o(ce,{class:"mb-2 mr-4",text:"ÐобавиÑÑ Ð² подбоÑкÑ",onClick:a[3]||(a[3]=s=>E(v)?v.value=!0:v=!0)}),o(re,{"modal-text":`ÐÑ Ð´ÐµÐ¹ÑÑвиÑелÑно Ñ
оÑиÑе ÑнÑÑÑ ${t(U)} Ñ Ð¿ÑбликаÑии?`,"button-class":"bg-brand-300 hover:opacity-90 dark:bg-neutral-100 mr-4 mb-2","button-text":"СнÑÑÑ Ñ Ð¿ÑбликаÑии",onOnConfirm:t(he)},{default:h(()=>[ct]),_:1},8,["modal-text","onOnConfirm"]),o(re,{"modal-text":`ÐÑ Ð´ÐµÐ¹ÑÑвиÑелÑно Ñ
оÑиÑе ÑдалиÑÑ ${t(U)}?`,"button-class":"bg-[#e25140] hover:opacity-90 mb-2","button-text":"УдалиÑÑ",onOnConfirm:t(_e)},{default:h(()=>[ut]),_:1},8,["modal-text","onOnConfirm"])])):A("",!0),e("div",pt,[N(e("input",{"onUpdate:modelValue":a[4]||(a[4]=s=>E(_)?_.value=s:_=s),type:"text",placeholder:"ÐоиÑк по Ñпизодам",class:"w-full max-w-xs rounded-2xl border-0 bg-brand-gray-300 text-sm outline-0 ring-0 dark:bg-neutral-700 dark:text-neutral-100 dark:placeholder-neutral-300",onInput:a[5]||(a[5]=(...s)=>t(D)&&t(D)(...s))},null,544),[[J,t(_)]])]),e("div",null,[e("table",mt,[e("thead",ht,[e("tr",ft,[e("th",_t,[e("input",{type:"checkbox",class:"h-5 w-5 cursor-pointer rounded border border-brand-100 bg-neutral-100 checked:bg-brand-300 checked:text-brand-300 dark:border-neutral-400 dark:bg-neutral-800 xl:h-5 xl:w-5",checked:t(ue),onChange:a[6]||(a[6]=s=>t(me)(s))},null,40,vt)]),gt,xt,e("th",bt,[e("button",{type:"button",class:"flex items-center text-left",title:"ÐоменÑÑÑ ÑоÑÑиÑÐ¾Ð²ÐºÑ Ð¿Ð¾ даÑе",onClick:a[7]||(a[7]=(...s)=>t(X)&&t(X)(...s))},[yt,e("span",null,[t(y)?(l(),r("svg",wt,Ct)):(l(),r("svg",$t,Mt))])])]),e("th",null,[o(t(De),{as:"div",class:"relative inline-block"},{default:h(()=>[o(t(He),{class:"inline-flex items-center justify-between"},{default:h(()=>[Et,(l(),r("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:Q(["h-4 w-4",["h-4 w-4",t(u).length?"fill-current text-brand-300 dark:text-neutral-100":"fill-none"]])},It,2))]),_:1}),o(t(Ue),{class:"absolute right-0 z-50 mt-2 w-44 origin-top-right divide-y divide-gray-100 rounded-md bg-white shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none dark:bg-neutral-800 md:left-0"},{default:h(()=>[(l(!0),r(T,null,R(t(C),s=>(l(),V(t(ie),{key:s.value,onClick:j=>t(fe)(s.value)},{default:h(()=>[e("div",At,[e("label",null,[e("input",{name:"status-filter",type:"radio",value:"{{ status.value }}",checked:t(u)===s.value,class:"h-4 w-4 border-gray-300 bg-gray-100 checked:bg-brand-300 dark:border-gray-600 dark:checked:bg-neutral-700"},null,8,jt),e("span",Ot,x(s.label),1)])])]),_:2},1032,["onClick"]))),128)),o(t(ie),null,{default:h(()=>[e("button",{type:"button",class:"block px-4 px-2 py-2 text-sm tracking-tighter",onClick:a[8]||(a[8]=(...s)=>t(Z)&&t(Z)(...s))}," СбÑооÑиÑÑ ÑилÑÑÑ ")]),_:1})]),_:1})]),_:1})])])]),t(d).data.length?(l(),r("tbody",Bt,[(l(!0),r(T,null,R(t(d).data,s=>(l(),r("tr",{key:s.id,class:"[&>td]:pb-5"},[e("td",Vt,[e("input",{type:"checkbox",class:"h-5 w-5 cursor-pointer rounded border border-brand-100 bg-neutral-100 checked:bg-brand-300 checked:text-brand-300 dark:border-neutral-400 dark:bg-neutral-800 xl:h-5 xl:w-5",checked:t(i).indexOf(s.id)>=0,onChange:j=>t(Y)(s)},null,40,zt)]),e("td",Lt,[o(P,{href:`/my/podcasts/${s.podcast.id}/episodes/${s.id}/edit`},{default:h(()=>[e("img",{src:s.cover_image.xs||s.podcast.cover_image.xs,class:"inline-block h-auto w-10 rounded"},null,8,Tt)]),_:2},1032,["href"])]),e("td",qt,[e("div",null,[o(P,{href:`/my/podcasts/${s.podcast.id}/episodes/${s.id}/edit`,class:"inline-block font-medium leading-tight text-brand-300 transition-opacity duration-200 hover:opacity-80 dark:text-neutral-100"},{default:h(()=>[e("span",Ht,x(s.name),1)]),_:2},1032,["href"]),e("span",Ut,[s.season?(l(),r("span",Dt,"Сезон "+x(s.season)+", ",1)):A("",!0),e("span",null,x(s.season?"Ñпизод":"Ðпизод"),1),G(" â"+x(s.number),1)]),e("span",Ft,x(s.human_publish_date),1)])]),e("td",Nt,[e("span",Rt,x(s.human_publish_date),1)]),e("td",Qt,[e("span",Wt,[s.status==="public"?(l(),r("svg",Gt,Kt)):s.status==="scheduled"?(l(),r("svg",Yt,Zt)):s.status==="audio-missing"?(l(),r("svg",es,ss)):s.status==="draft"?(l(),r("svg",as,ns)):A("",!0)]),e("span",{class:Q(["hidden w-full w-40 items-center justify-center rounded px-3 py-1 sm:inline-flex sm:rounded-none",s.status==="public"?"bg-[#d9fcdd] text-[#00881c] dark:bg-green-200":"",s.status==="scheduled"?"bg-[#e9eaf2] text-[#a6aaca]":"",s.status==="audio-missing"?"bg-[#e9eaf2] text-[#a6aaca]":"",s.status==="draft"?"bg-[#e9eaf2] text-[#a6aaca]":"",s.status==="deleted"?"bg-[#e9eaf2] text-[#a6aaca] opacity-70":""])},[e("span",is,[s.status==="public"?(l(),r("svg",rs,cs)):s.status==="scheduled"?(l(),r("svg",us,ms)):s.status==="audio-missing"?(l(),r("svg",hs,_s)):s.status==="draft"?(l(),r("svg",vs,xs)):A("",!0)]),e("span",bs,x(n.importing&&s.status==="audio-missing"?"импоÑÑиÑÑеÑÑÑ":s.human_status),1)],2)])]))),128))])):(l(),r("tbody",ys,[e("tr",null,[e("td",ws,x(t(H)?"ÐÐ¿Ð¸Ð·Ð¾Ð´Ñ Ð½Ðµ найденÑ":"РподкаÑÑе пока Ð½ÐµÑ Ñпизодов"),1)])]))]),e("div",ks,[e("div",Cs,[e("span",$s,[Ps,G(" "+x(n.podcast.episodes_count)+" "+x(t(le)("Ñпизод",t(w))),1)]),e("span",Ms,[Es,N(e("select",{"onUpdate:modelValue":a[9]||(a[9]=s=>E(g)?g.value=s:g=s),class:"appearance-none border-0 bg-transparent py-0 text-sm text-brand-300 focus:ring-0 dark:text-neutral-300",onChange:a[
110]||(a[10]=(...s)=>t(te)&&t(te)(...s))},[(l(!0),r(T,null,R(t(k),s=>(l(),r("option",{key:s,value:s},x(s),9,Ss))),128))],544),[[ye,t(g)]])])]),e("div",Is,[o(oe,{data:t(d),loading:t($),limit:1,"with-page-input":"",onPaginationChangePage:t(ee)},null,8,["data","loading","onPaginationChangePage"])]),e("div",As,[o(oe,{data:t(d),loading:t($),limit:1,onPaginationChangePage:t(ee)},null,8,["data","loading","onPaginationChangePage"])])])]),o(tt,{podcast:n.podcast,episodes:t(i),"show-initial":t(v),onClose:a[11]||(a[11]=s=>E(v)?v.value=!1:v=!1),onResetSelection:t(W)},null,8,["podcast","episodes","show-initial","onResetSelection"])])}}},Os=qe(js,[["__scopeId","data-v-6f7a427a"]]),qa={__name:"IndexView",props:{podcast:{type:Object,required:!0},podcastImport:{type:Object,default:null},paginatedEpisodesInitial:{type:Object,required:!0}},setup(n){const b=n;let f=Ce(()=>$e(()=>import("./PlayerConstructionModal-663510d2.js"),["assets/PlayerConstructionModal-663510d2.js","assets/app-f96b9a38.js","assets/app-cec8f6c9.css","assets/CopyToClipboardButton-2f3e7452.js","assets/vue-composable.esm-bundler-11aa148c.js","assets/CloseIcon-82975fa5.js","assets/PlayerConstructionModal-c39eb11e.css"])),i=p(!1),v=()=>{i.value=!i.value},d=L(()=>b.podcastImport&&b.podcastImport.job_batch.attemptedJobProgress<100);return(S,w)=>{const g=K("Head");return l(),V(Pe,{heading:n.podcast.name,"heading-back-link":"/my/podcasts"},{default:h(()=>[e("div",null,[o(g,{title:`${n.podcast.name} - ÑпизодÑ`},null,8,["title"]),n.podcastImport?(l(),V(Re,{key:0,"podcast-import-initial":n.podcastImport,"podster-rss-url":n.podcast.rss_url,class:"mb-8"},null,8,["podcast-import-initial","podster-rss-url"])):A("",!0),o(Me,{podcast:n.podcast,class:"mb-10"},null,8,["podcast"]),o(Fe,{podcast:n.podcast,class:"mb-6",onOpenPlayerConstruction:w[0]||(w[0]=k=>E(i)?i.value=!0:i=!0)},null,8,["podcast"]),o(Ne,{podcast:n.podcast,class:"mb-6"},null,8,["podcast"]),o(Os,{podcast:n.podcast,"paginated-episodes-initial":n.paginatedEpisodesInitial,importing:t(d)},null,8,["podcast","paginated-episodes-initial","importing"]),t(i)?(l(),V(t(f),{key:1,podcast:n.podcast,"modal-page":"podcast",onCloseModal:t(v)},null,8,["podcast","onCloseModal"])):A("",!0)])]),_:1},8,["heading"])}}};export{qa 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.