1import{M as Ue,f as T,N as Ve,O as ze,o as m,c as y,a as v,b as E,h as oe,w as L,d as D,P as ce,k as d,_ as q,F as Y,G as me,g as W,T as je,t as k,l as U,Q as fe,s as $,H as He,R as We,A as _,m as N,S as Ke,U as K,y as ve,x as ee,i as Ge,v as Ye,n as qe,V as Je,W as Xe,X as Qe,Y as Ze,Z as en,$ as nn}from"./BXR-8fPG.js";import{b as tn,_ as on,u as ln}from"./CYQXHMgP.js";import{c as an,u as sn,a as rn,b as dn,d as un,_ as cn,e as fn,f as H,g as pn}from"./1KvCz4S8.js";import{u as mn}from"./Ju5Bhz8V.js";const vn=Ue("/startvideo-loop.mp4"),gn={class:"relative h-dvh min-h-dvh w-full snap-start snap-always flex flex-col items-center justify-start overflow-hidden"},hn={class:"relative z-10 flex flex-col items-center justify-center text-white pt-[45vh] pb-[calc(1.25rem+env(safe-area-inset-bottom))]"},yn={class:"glow-button-wrapper mt-6 mb-2"},wn={class:"mt-3 px-4 py-2 bg-black/50 backdrop-blur-sm rounded-lg text-center max-w-sm text-xs sm:text-sm leading-snug text-gray-200 shadow-[0_6px_20px_rgba(0,0,0,0.35)]",role:"note","aria-label":"Rechtlicher Hinweis zu AGB und Datenschutzerklärung"},xn={class:"m-0"},_n={class:"m-0 mt-1"},Sn=T({__name:"FeedWelcomeSlide",emits:["next"],setup(l,{emit:a}){const n=a,{open:o}=Ve(),{open:c}=ze();function e(){n("next")}return(f,u)=>{const s=oe;return m(),y("section",gn,[u[8]||(u[8]=v("video",{src:vn,autoplay:"",loop:"",muted:"",playsinline:"",class:"absolute inset-0 w-full h-full object-cover z-0","aria-hidden":"true"},null,-1)),v("div",hn,[u[7]||(u[7]=v("div",{class:"w-full my-4 flex flex-col justify-center items-center bg-black/50 py-4 px-8"},[v("img",{src:tn,alt:"Sloplo",class:"w-[70%] max-w-full"}),v("p",{class:"text-lg text-gray-300 mt-4 mb-0"}," Wer braucht noch mehr KI-Videos? Du! ")],-1)),v("div",yn,[E(s,{size:"xl",class:"px-10 py-5 text-2xl text-white bg-primary hover:bg-primary/90 relative z-[1] rounded-[calc(0.5rem-3px)]","aria-label":"Hier starten â zum ersten Video mit Ton",onClick:e},{default:L(()=>[...u[2]||(u[2]=[D(" Los geht's » ",-1)])]),_:1})]),v("div",wn,[v("p",xn,[u[3]||(u[3]=D(" Mit Tippen auf âLos gehtâsâ akzeptierst du unsere ",-1)),v("button",{type:"button",class:"underline underline-offset-4 hover:text-white focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-white/60 rounded px-1 py-0.5","aria-label":"AGB öffnen",onClick:u[0]||(u[0]=ce((...t)=>d(o)&&d(o)(...t),["stop"]))}
1," AGB "),u[4]||(u[4]=D(". ",-1))]),v("p",_n,[u[5]||(u[5]=D(" Informationen zur Datenverarbeitung findest du in der ",-1)),v("button",{type:"button",class:"underline underline-offset-4 hover:text-white focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-white/60 rounded px-1 py-0.5","aria-label":"Datenschutzerklärung öffnen",onClick:u[1]||(u[1]=ce((...t)=>d(c)&&d(c)(...t),["stop"]))}," Datenschutzerklärung "),u[6]||(u[6]=D(". ",-1))])])])])}}}),Cn=Object.assign(q(Sn,[["__scopeId","data-v-148789f5"]]),{__name:"FeedWelcomeSlide"}),bn=T({__name:"FeedSlideWindow",props:{windowSlice:{},activeIndex:{},muted:{type:Boolean},paused:{type:Boolean},descriptionOpen:{type:Boolean},commentsOpen:{type:Boolean},panelMode:{},isInLoadRange:{type:Function},isInPreloadRange:{type:Function}},emits:["setSlideRef","setVideoSlideRef","welcomeNext","togglePlayPause","toggleMute","toggleDescription","toggleComments","setPanelMode","closePanel","openChannel","openBotChat"],setup(l,{emit:a}){const n=l,o=a;return(c,e)=>{const f=Cn,u=on;return m(!0),y(Y,null,me(n.windowSlice,s=>(m(),y(Y,{key:s.id},[s.type==="welcome"?(m(),y("div",{key:0,ref_for:!0,ref:t=>o("setSlideRef",t,s.globalIndex),class:"h-dvh min-h-dvh w-full shrink-0 snap-start snap-always"},[E(f,{onNext:e[0]||(e[0]=t=>o("welcomeNext"))})],512)):(m(),W(u,{key:1,ref_for:!0,ref:t=>{o("setSlideRef",t?.$el,s.globalIndex),o("setVideoSlideRef",t,s.globalIndex)},video:s.video,"should-load":n.isInLoadRange(s.globalIndex),"preload-full":n.isInPreloadRange(s.globalIndex),muted:n.muted,paused:n.paused&&n.activeIndex===s.globalIndex,"description-open":n.descriptionOpen&&n.activeIndex===s.globalIndex,"comments-open":n.commentsOpen&&n.activeIndex===s.globalIndex,"is-active":n.activeIndex===s.globalIndex,"panel-mode":n.panelMode,onTogglePlayPause:e[1]||(e[1]=t=>o("togglePlayPause")),onToggleMute:e[2]||(e[2]=t=>o("toggleMute")),onToggleDescription:e[3]||(e[3]=t=>o("toggleDescription")),onToggleComments:e[4]||(e[4]=t=>o("toggleComments")),onSetPanelMode:e[5]||(e[5]=t=>o("setPanelMode",t)),onClosePanel:e[6]||(e[6]=t=>o("closePanel")),onOpenChannel:e[7]||(e[7]=t=>o("openChannel")),onOpenBotChat:e[8]||(e[8]=t=>o("openBotChat",t))},null,8,["video","should-load","preload-full","muted","paused","description-open","comments-open","is-active","panel-mode"]))],64))),128)}}}),Pn=Object.assign(bn,{__name:"FeedSlideWindow"}),$n={key:0,class:"fixed bottom-6 left-1/2 -translate-x-1/2 z-10 flex items-center gap-3 rounded-xl bg-red-950/90 px-4 py-2.5 text-sm text-red-200 shadow-lg backdrop-blur-sm"},Rn=T({__name:"FeedStatusOverlay",props:{show:{type:Boolean},message:{}},emits:["retry"],setup(l,{emit:a}){const n=l,o=a;return(c,e)=>{const f=oe;return m(),W(je,{name:"fade"},{default:L(()=>[n.show?(m(),y("div",$n,[v("span",null,k(n.message??"Nachladen fehlgeschlagen"),1),E(f,{size:"xs",variant:"soft",color:"error",onClick:e[0]||(e[0]=u=>o("retry"))},{default:L(()=>[...e[1]||(e[1]=[D(" Erneut ",-1)])]),_:1})])):U("",!0)]),_:1})}}}),In=Object.assign(q(Rn,[["__scopeId","data-v-3576a09b"]]),{__name:"FeedStatusOverlay"}
1),Fn={key:0,class:"h-dvh w-full flex items-center justify-center"},kn={key:1,class:"h-dvh w-full flex flex-col items-center justify-center gap-4"},En=T({__name:"FeedMainPanel",props:{isLoading:{type:Boolean},hasVideos:{type:Boolean},hasInitialError:{type:Boolean},spacerTopStyle:{},spacerBottomStyle:{},windowSlice:{},activeIndex:{},muted:{type:Boolean},paused:{type:Boolean},descriptionOpen:{type:Boolean},commentsOpen:{type:Boolean},panelMode:{},loadMoreError:{type:Boolean},isInLoadRange:{type:Function},isInPreloadRange:{type:Function}},emits:["retryLoad","retryLoadMore","setContainerRef","setSlideRef","setVideoSlideRef","welcomeNext","togglePlayPause","toggleMute","toggleDescription","toggleComments","setPanelMode","closePanel","openChannel","openBotChat"],setup(l,{emit:a}){const n=l,o=a;return(c,e)=>{const f=oe,u=Pn,s=In;return m(),y("div",{ref:t=>o("setContainerRef",t),tabindex:"0",class:"scroll-container h-dvh min-w-full w-full shrink-0 snap-start snap-always overflow-y-auto overflow-x-hidden snap-y snap-mandatory outline-none",style:{"-webkit-overflow-scrolling":"touch","overscroll-behavior-y":"none","scrollbar-width":"none"}},[n.isLoading&&!n.hasVideos?(m(),y("div",Fn,[...e[13]||(e[13]=[v("span",{class:"text-gray-400 text-sm animate-pulse"},"Ladenâ¦",-1)])])):n.hasInitialError&&!n.hasVideos?(m(),y("div",kn,[e[15]||(e[15]=v("p",{class:"text-gray-400 text-sm"}," Feed konnte nicht geladen werden. ",-1)),E(f,{size:"sm",variant:"outline",onClick:e[0]||(e[0]=t=>o("retryLoad"))},{default:L(()=>[...e[14]||(e[14]=[D(" Erneut versuchen ",-1)])]),_:1})])):(m(),y(Y,{key:2},[v("div",{style:fe({height:n.spacerTopStyle}),"aria-hidden":"true"},null,4),E(u,{"window-slice":n.windowSlice,"active-index":n.activeIndex,muted:n.muted,paused:n.paused,"description-open":n.descriptionOpen,"comments-open":n.commentsOpen,"panel-mode":n.panelMode,"is-in-load-range":n.isInLoadRange,"is-in-preload-range":n.isInPreloadRange,onSetSlideRef:e[1]||(e[1]=(t,p)=>o("setSlideRef",t,p)),onSetVideoSlideRef:e[2]||(e[2]=(t,p)=>o("setVideoSlideRef",t,p)),onWelcomeNext:e[3]||(e[3]=t=>o("welcomeNext")),onTogglePlayPause:e[4]||(e[4]=t=>o("togglePlayPause")),onToggleMute:e[5]||(e[5]=t=>o("toggleMute")),onToggleDescription:e[6]||(e[6]=t=>o("toggleDescription")),onToggleComments:e[7]||(e[7]=t=>o("toggleComments")),onSetPanelMode:e[8]||(e[8]=t=>o("setPanelMode",t)),onClosePanel:e[9]||(e[9]=t=>o("closePanel")),onOpenChannel:e[10]||(e[10]=t=>o("openChannel")),onOpenBotChat:e[11]||(e[11]=t=>o("openBotChat",t))},null,8,["window-slice","active-index","muted","paused","description-open","comments-open","panel-mode","is-in-load-range","is-in-preload-range"]),v("div",{style:fe({height:n.spacerBottomStyle}),"aria-hidden":"true"},null,4)],64)),E(s,{show:n.loadMoreError,onRetry:e[12]||(e[12]=t=>o("retryLoadMore"))},null,8,["show"])],512)}}}),On=Object.assign(q(En,[["__scopeId","data-v-265dd9de"]]),{__name:"FeedMainPanel"}),An={class:"min-h-dvh w-full bg-gray-900 text-white flex flex-col"},Mn={class:"w-full h-[25vh] min-h-[120px] bg-gray-800 shrink-0 overflow-hidden"},Nn=["src","alt"],Tn={key:1,class:"w-full h-full flex items-center justify-center bg-gradient-to-br from-gray-700 to-gray-800"},Bn={class:"p-4 pb-2 shrink-0"},Dn={class:"text-xl font-semibold"},Ln={key:0,class:"mt-2 text-gray-400 text-sm"},Un={class:"p-4 pt-2 flex-1 overflow-y-auto"},Vn={key:0,class:"flex items-center justify-center py-12"},zn={key:1,class:"grid grid-cols-3 gap-2"},jn=["aria-label","onClick"],Hn=["src","alt","onError"],Wn={key:1,class:"flex items-center justify-center w-full h-full text-xs text-gray-500 text-center px-1"},Kn={key:2,class:"absolute bottom-0 left-0 right-0 z-10 bg-gradient-to-t from-black/80 to-transparent px-2 pt-6 pb-2 text-white text-xs font-medium line-clamp-2"},Gn=T({__name:"FeedChannelPanel",props:{channel:{},fromVideoId:{},loading:{type:Boolean}},emits:["openVideo"],setup(l,{emit:a}){const n=l,o=a,c=_(!1),e=N(()=>!!n.channel.avatarUrl&&!c.value);$(()=>n.channel.id,()=>{c.value=!1});const f=Ke(new Set);return $(()=>n.channel.id,()=>{f.clear()}),(u,s)=>{const t=He;return m(),y("div",An,[v("header",Mn,[d(e)?(m(),y("img",{key:0,src:l.channel.avatarUrl,alt:l.channel.name,class:"w-full h-full object-cover",onError:s[0]||(s[0]=p=>c.value=!0)},null,40,Nn)):(m(),y("div",Tn,[E(t,{name:"i-lucide-user",class:"w-16 h-16 text-gray-500"})]))]),v("div",Bn,[v("h1",Dn,k(l.channel.name),1),l.channel.description?.trim()?(m(),y("p",Ln,k(l.channel.description),1)):U("",!0)]),v("div",Un,[s[2]||(s[2]=v("h2",{class:"text-sm font-medium text-gray-500 mb-3"}," Videos ",-1)),l.channel.videos.length===0&&l.loading?(m(),y("div",Vn,[...s[1]||(s[1]=[v("span",{class:"text-gray-500 text-sm animate-pulse"},"Videos ladenâ¦",-1)])])):(m(),y("div",zn,[(m(!0),y(Y,null,me(l.channel.videos,p=>(m(),y("button",{key:p.id,type:"button",class:We(["aspect-[9/16] w-full rounded-lg overflow-hidden bg-gray-800 relative cursor-pointer hover:ring-2 hover:ring-white/30 transition",{"ring-2 ring-primary-500":p.id===l.fromVideoId}]),"aria-label":`Video abspielen: ${p.title?.trim()||"Video"}`,onClick:h=>o("openVideo",p.id)},[p.posterUrl&&!d(f).has(p.id)?(m(),y("img",{key:0,src:p.posterUrl,alt:p.description??"",class:"absolute inset-0 w-full h-full object-cover",onError:h=>d(f).add(p.id)},null,40,Hn)):(m(),y("span",Wn,k(p.description??p.id.slice(0,8)),1
1)),p.title?.trim()?(m(),y("span",Kn,k(p.title.trim()),1)):U("",!0)],10,jn))),128))]))])])}}}),Yn=Object.assign(Gn,{__name:"FeedChannelPanel"}),qn=T({__name:"FeedNavigationPanels",emits:["setHorizontalContainerRef","setChannelPanelRef","setChannelFeedPanelRef"],setup(l,{emit:a}){const n=a;return(o,c)=>(m(),y("div",{ref:e=>n("setHorizontalContainerRef",e),class:"horizontal-container horizontal-container--landscape h-dvh w-full flex overflow-x-auto snap-x snap-mandatory",style:{"-webkit-overflow-scrolling":"touch","scrollbar-width":"none"}},[K(o.$slots,"main",{},void 0,!0),v("div",{ref:e=>n("setChannelPanelRef",e),class:"h-dvh min-w-full w-full shrink-0 snap-start snap-always overflow-y-auto overflow-x-hidden bg-gray-900"},[K(o.$slots,"channel",{},void 0,!0)],512),v("div",{ref:e=>n("setChannelFeedPanelRef",e),class:"h-dvh min-w-full w-full shrink-0 snap-start snap-always overflow-hidden bg-gray-900"},[K(o.$slots,"channelFeed",{},void 0,!0)],512)],512))}}),Jn=Object.assign(q(qn,[["__scopeId","data-v-c8c32e97"]]),{__name:"FeedNavigationPanels"}),Xn={class:"fixed bottom-4 left-4 right-4 z-30 rounded-lg bg-black/80 text-green-400 p-3 font-mono text-xs pointer-events-none"},Qn=T({__name:"FeedDevOverlay",props:{activeIndex:{},windowIds:{},windowStart:{},windowEnd:{},touchActive:{type:Boolean}},setup(l){const a=l,n=N(()=>`[${a.windowStart}..${a.windowEnd}]`),o=N(()=>a.windowEnd-a.windowStart+1);return(c,e)=>(m(),y("div",Xn,[v("div",null,"activeIndex: "+k(l.activeIndex),1),v("div",null,"window: "+k(d(n))+" ("+k(d(o))+" slots)",1),v("div",null,"allIds: "+k(l.windowIds.join(", ")||"[]"),1),v("div",null,"Touch: "+k(l.touchActive?"aktiv":"â"),1)]))}}),Zn=Object.assign(Qn,{__name:"FeedDevOverlay"}),ne="feed_seed_v1",te="feed_snapshotAt_v1",le="feed_seen_v1",et=720*60*60*1e3,nt=500;function tt(){if(typeof localStorage>"u")return"";try{const l=localStorage.getItem(ne);if(l)return l;const a=crypto.randomUUID();return localStorage.setItem(ne,a),a}catch{return""}}function ot(){if(typeof localStorage>"u")return new Date().toISOString();try{const l=localStorage.getItem(te);if(l)return l;const a=new Date().toISOString();return localStorage.setItem(te,a),a}catch{return new Date().toISOString()}}function lt(){const l=new Map;if(typeof localStorage>"u")return l;try{const a=localStorage.getItem(le);if(!a)return l;const n=JSON.parse(a);if(!Array.isArray(n))return l;const c=Date.now()-et;for(const e of n)if(e!=null&&typeof e=="object"&&typeof e.id=="string"&&typeof e.seenAt=="number"&&e.seenAt>=c){const f=e,u=l.get(f.id);(!u||f.seenAt>u)&&l.set(f.id,f.seenAt)}}catch{}return l}function at(l){if(!(typeof localStorage>"u"))try{const a=[];for(const[o,c]of l)a.push({id:o,seenAt:c});a.sort((o,c)=>c.seenAt-o.seenAt);const n=a.slice(0,nt);localStorage.setItem(le,JSON.stringify(n))}catch{}}function st(){const l=_(""),a=_("");let n=null;function o(){l.value||(l.value=tt(),a.value=ot())}function c(){return n||(n=lt()),n}function e(h){return o(),c().has(h)}function f(h){o();const w=c();w.set(h,Date.now()),at(w)}function u(){if(!(typeof localStorage>"u"))try{localStorage.removeItem(ne),localStorage.removeItem(te),l.value="",a.value=""}catch{}}function s(){if(!(typeof localStorage>"u"))try{localStorage.removeItem(le),n=new Map}catch{}}function t(){return o(),l.value}function p(){return o(),a.value}return{getSeedValue:t,getSnapshotAtValue:p,hasSeen:e,markSeen:f,resetSession:u,clearSeenHistory:s}}const rt=.05;function it(l){const a=_("feed"),n=_(null),o=_(null),c=_(null),e=_(null);function f(g){const S=l.horizontalContainerRef.value;if(!S||S.clientWidth===0){e.value=g;return}e.value=null;const I=g*S.clientWidth;S.scrollTo({left:I,behavior:"smooth"})}function u(g,S){n.value=g,o.value=S,f(1),ee(()=>{l.channelPanelRef?.value?.scrollTo({top:0})})}function s(){f(0)}function t(g){c.value=g,f(2),ee(()=>{l.channelFeedPanelRef?.value?.scrollTo({top:0})})}function p(){f(1)}let h=null,w=0;function R(){w=0;const g=l.horizontalContainerRef.value;if(!g)return;const S=g.scrollLeft,I=g.clientWidth;if(S>=I*1.5)a.value="channelFeed";else if(S>=I*.5){const F=l.getChannelContext?.()??null;if(F?.ownerType==="user"&&!n.value){g.scrollTo({left:0,behavior:"instant"}),a.value="feed",l.onUserSwipeOpenProfile?.(F.urlName);return}a.value="channel"}else{if(S>=I*rt&&l.getChannelContext){const F=l.getChannelContext();F?.ownerType==="channel"&&(n.value=F.urlName,o.value=F.videoId)}a.value="feed"}}function M(){w&&cancelAnimationFrame(w),w=requestAnimationFrame(R)}function O(){V();const g=l.horizontalContainerRef.value;g&&(g.addEventListener("scroll",M,{passive:!0}),h=()=>{g.removeEventListener("scroll",M),w&&cancelAnimationFrame(w),w=0})}function V(){h?.(),h=null}return $(()=>l.horizontalContainerRef.value,(g,S)=>{if(S&&V(),g&&(O(),e.value!==null)){const I=e.value;e.value=null;const F=I*g.clientWidth;g.scrollTo({left:F,behavior:"instant"});const J=["feed","channel","channelFeed"];a.value=J[I]}},{flush:"post"}),$(a,g=>{g==="feed"?(n.value=null,o.value=null,c.value=null):g==="channel"&&(c.value=null)}),ve(V),{currentPanel:a,channelUrlName:n,fromVideoId:o,channelFeedVideoId:c,openChannel:u,closeChannel:s,openChannelFeed:t,closeChannelFeed:p,scrollToPanel:f}}const dt=5;function ut(l){const a=_(!1);function n(){a.value=!0}function o(){if(a.value)return!1;const c=l.containerRef.value;return c?c.scrollTop<=dt:!1}return{welcomeCTAPassed:a,markPassed:n,shouldBlockScrollDown:o}}function ct(l){const a=_(null),n=_(!1),o=_(null);let c=0;async function e(s){const t=await $fetch(`/api/channels/${s}`);return{id:t.id,name:t.name,description:t.description,urlName:t.urlName,avatarUrl:t.avatarUrl,iconUrl:"",videos:t.videos}}async function f(s){const[t,p]=await Promise.all([$fetch(`/api/users/${s}`),$fetch(`/api/users/${s}/videos`)]),h=p.videos.map(w=>({id:w.id,posterUrl:`/hls/${w.id}/poster.jpg`,description:w.description??null,masterUrl:w.masterUrl,title:w.title??null,createdAt:typeof w.createdAt=="string"?w.createdAt:w.createdAt?.toISOString?.()??"",commentCount:w.commentCount??0}));return{id:t.id,name:t.name,description:t.profileText??null,urlName:t.urlName??s,avatarUrl:t.avatarUrl??"",iconUrl:t.iconUrl??"",videos:h}}$(()=>l.channelUrlName.value,async s=>{const t=++c;if(!s){a.value=null,o.value=null;return}const p=l.activeVideoIndex.value,h=p>=0?l.videos.value[p]:null,w=h?.owner?.urlName===s?h.owner.type:null;h?.owner?.urlName===s&&(a.value={id:h.owner.id,name:h.owner.name,description:h.owner.description??null,urlName:h.owner.urlName,avatarUrl:h.owner.avatarUrl,iconUrl:h.owner.iconUrl,videos:[]},o.value=h.owner.type),n.value=!0;try{if(w==="user"){const R=await f(s);if(t!==c)return;a.value=R,o.value="user"}else try{const R=await e(s);if(t!==c)return;a.value=R,o.value="channel"}catch{if(t!==c)return;const R=await f(s);if(t!==c)return;a.value=R,o.value="user"}}catch{t===c&&(a.value=null,o.value=null)}finally{t===c&&(n.value=!1)}});const u=N(()=>{const s=a.value;return s?an(s.videos,s):null});return{channelDetail:a,channelLoading:n,channelFeedProvider:u,detailType:o}}
1const ft={class:"h-dvh w-full flex justify-center bg-gray-900"},pt={key:0,class:"h-dvh w-full flex items-center justify-center"},mt={key:2,class:"h-dvh w-full flex items-center justify-center text-gray-600 text-sm"},vt={key:1,class:"absolute inset-0 z-50 bg-gray-900"},B=1,pe=2,gt=1,ht=T({__name:"FeedRoot",setup(l){const a=_(null),n=_(null),o=_(null),c=_(null),e=st(),f=pn(e),{videos:u,isLoading:s,error:t,loadMoreError:p,retryLoadMore:h,init:w,ensureAhead:R}=fn(f),M=N(()=>B+u.value.length),{activeIndex:O,settledIndex:V}=sn({containerRef:n,totalCount:M}),g=new Map;function S(r,i){const C=H(r);C?g.set(i,C):g.delete(i)}function I(r){a.value=H(r)}function F(r){o.value=H(r)}function J(r){c.value=H(r)}function ge(r){n.value=H(r)}function he(r){return g.get(r)}const x=ln({onMarkSeen:e.markSeen});function ye(r){const i=O.value,C=Math.max(B,i-gt),j=Math.min(M.value-1,i+pe);return r>=C&&r<=j}function we(r){const i=O.value,C=Math.min(M.value-1,i+pe);return r>=i&&r<=C}const G=new Map;function xe(r,i){const C=r;C?.getVideoEl?G.set(i,C):G.delete(i)}function _e(r){return G.get(r)?.getVideoEl()??null}const{markPassed:Se,shouldBlockScrollDown:Ce}=ut({containerRef:n}),{goToIndex:be,touchActive:ae,isScrolling:Pe}=rn({containerRef:n,totalCount:M,getSlideElement:he,shouldBlockScrollDown:Ce}),{windowStart:$e,windowEnd:Re,windowSlice:Ie,spacerTopStyle:Fe,spacerBottomStyle:ke}=dn({videos:u,anchorIndex:V,totalCount:M,containerRef:n,isUserInteracting:()=>ae.value||Pe.value});function Ee(){Se(),be(1)}function Oe(){const r=O.value-B;if(r<0)return null;const i=u.value[r];return i?.owner?{urlName:i.owner.urlName,videoId:i.id,ownerType:i.owner.type}:null}const z=_(null);function se(r){z.value=r,x.pauseAll()}function Ae(){z.value=null,x.resumeActive()}function Me(r){qe(`/user/${encodeURIComponent(r)}/chat`)}const b=it({horizontalContainerRef:a,channelPanelRef:o,channelFeedPanelRef:c,getChannelContext:Oe,onUserSwipeOpenProfile:se}),P=mn();P&&($(()=>b.currentPanel.value,r=>{P.currentPanel.value=r},{immediate:!0}),P.closeChannel.value=b.closeChannel,P.closeChannelFeed.value=b.closeChannelFeed),ve(()=>{g.clear(),G.clear(),P&&(P.currentPanel.value="feed",P.userProfileOverlayOpen.value=!1,P.closeChannel.value=()=>{},P.closeChannelFeed.value=()=>{})});const X=N(()=>O.value-B),{channelDetail:Q,channelLoading:re,channelFeedProvider:ie}=ct({channelUrlName:b.channelUrlName,activeVideoIndex:X,videos:u});P&&$(z,r=>{P.userProfileOverlayOpen.value=!!r},{immediate:!0});function de(){const r=X.value;if(r<0)return;const i=u.value[r];if(i?.owner){if(i.owner.type==="user"){se(i.owner.urlName);return}b.openChannel(i.owner.urlName,i.id)}}const ue=Ge();$(()=>({path:ue.path,urlName:ue.params.urlName}),({path:r,urlName:i})=>{r.startsWith("/channel/")&&typeof i=="string"&&i&&b.openChannel(i,null)},{immediate:!0}),$(()=>b.currentPanel.value,r=>{r==="channel"&&!b.channelUrlName.value&&de()}),$(()=>b.currentPanel.value,r=>{r!=="feed"?x.pauseAll():x.resumeActive()}),$(O,(r,i)=>{const C=X.value;C>=0&&R(C),r!==i&&r>=B?ee(()=>{const j=_e(r),Z=u.value[r-B];x.onSlideChanged(j,Z?.id??null)}):r<B&&x.onSlideChanged(null,null)});const Ne=N(()=>["welcome",...u.value.map(r=>r.id)]),Te=N(()=>!1);return Ye(async()=>{x.setupWatchLifecycle(),await w(),R(0)}),(r,i)=>{const C=On,j=Yn,Z=un,Be=Jn,De=Zn,Le=cn;return m(),y("div",ft,[E(Be,{onSetHorizontalContainerRef:I,onSetChannelPanelRef:F,onSetChannelFeedPanelRef:J},{main:L(()=>[E(C,{"is-loading":d(s),"has-videos":d(u).length>0,"has-initial-error":!!d(t),"spacer-top-style":d(Fe),"spacer-bottom-style":d(ke),"window-slice":d(Ie),"active-index":d(O),muted:d(x).muted.value,paused:d(x).paused.value,"description-open":d(x).descriptionOpen.value,"comments-open":d(x).commentsOpen.value,"panel-mode":d(x).panelMode.value,"load-more-error":!!d(p),"is-in-load-range":ye,"is-in-preload-range":we,onRetryLoad:i[0]||(i[0]=A=>d(w)()),onRetryLoadMore:i[1]||(i[1]=A=>d(h)()),onSetContainerRef:ge,onSetSlideRef:S,onSetVideoSlideRef:xe,onWelcomeNext:Ee,onTogglePlayPause:i[2]||(i[2]=A=>d(x).togglePlayPause()),onToggleMute:i[3]||(i[3]=A=>d(x).toggleMute()),onToggleDescription:i[4]||(i[4]=A=>d(x).toggleDescription()),onToggleComments:i[5]||(i[5]=A=>d(x).toggleComments()),onSetPanelMode:d(x).setPanelMode,onClosePanel:i[6]||(i[6]=A=>d(x).closePanel()),onOpenChannel:i[7]||(i[7]=A=>de()),onOpenBotChat:Me},null,8,["is-loading","has-videos","has-initial-error","spacer-top-style","spacer-bottom-style","window-slice","active-index","muted","paused","description-open","comments-open","panel-mode","load-more-error","onSetPanelMode"])]),channel:L(()=>[d(re)&&!d(Q)?(m(),y("div",pt,[...i[9]||(i[9]=[v("span",{class:"text-gray-400 text-sm animate-pulse"}
1,"Profil ladenâ¦",-1)])])):d(Q)?(m(),W(j,{key:1,channel:d(Q),loading:d(re),"from-video-id":d(b).fromVideoId.value,onOpenVideo:i[8]||(i[8]=A=>d(b).openChannelFeed(A))},null,8,["channel","loading","from-video-id"])):(m(),y("div",mt," Kein Profil verfügbar "))]),channelFeed:L(()=>[d(b).currentPanel.value==="channelFeed"&&d(ie)?(m(),W(Z,{key:0,provider:d(ie),"start-video-id":d(b).channelFeedVideoId.value},null,8,["provider","start-video-id"])):U("",!0)]),_:1}),d(Te)?(m(),W(De,{key:0,"active-index":d(O),"window-ids":d(Ne),"window-start":d($e),"window-end":d(Re),"touch-active":d(ae)},null,8,["active-index","window-ids","window-start","window-end","touch-active"])):U("",!0),d(z)?(m(),y("div",vt,[E(Le,{"url-name":d(z),onBack:Ae},null,8,["url-name"])])):U("",!0)])}}}),St=Object.assign(ht,{__name:"FeedRoot"}),Ct=Object.assign({name:"NuxtErrorBoundary",inheritAttrs:!1},{__name:"NuxtErrorBoundary",emits:["error"],setup(l,{expose:a,emit:n}){const o=n,c=en(null);function e(){c.value=null}{let f=function(...s){const[t,p,h]=s;o("error",t),u.hooks.callHook("vue:error",t,p,h),c.value=t};const u=Je();Xe((s,t,p)=>(u.isHydrating?nn(()=>f(s,t,p)):f(s,t,p),!1))}return a({error:c,clearError:e}),(f,u)=>c.value?K(f.$slots,"error",Qe(Ze({key:0},{error:c.value,clearError:e}))):K(f.$slots,"default",{key:1})}});export{St as _,Ct as a};
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.