1import{W as v,R as g,d as h,A as i,E as t,c as d,l as a,q as y,k,w as R,bh as q,n as E,f as m,H as p,aW as Q,F as j,y as H,a5 as C,j as D,bi as W,b8 as Y,x as U,bj as z,r as O}from"./vendor-vuetify-DaY1MzuL.js";import{B as X,Q as S,f as G,_ as J,k as Z,s as ee,M as B,g as te,A as F}from"./index-CkbxFzmV.js";import{u as L}from"./useMutation-C7f8cywE.js";import{c as ae}from"./players-BFerMziS.js";import{_ as se}from"./EmptyPlaceholder.vue_vue_type_style_index_0_lang-1Ip15eFc.js";import{b as N}from"./route-block-BIO7NrfO.js";import"./vendor-sentry-CdlvO8A5.js";try{let e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="4f42830f-6265-4a38-a31e-72bd96b0e436",e._sentryDebugIdIdentifier="sentry-dbid-4f42830f-6265-4a38-a31e-72bd96b0e436")}catch{}const ne=1440*6e4;function oe(e){return X({queryKey:[S.videoMetadata,g(()=>v(e))],queryFn:()=>G.getVideoMetadata(v(e)),enabled:()=>!!v(e),staleTime:1/0,gcTime:ne})}const ie={key:0,class:"d-flex flex-column ga-3"},le={class:"tx-subtitle-3"},re=["innerHTML"],de=h({__name:"VideoMetaInfo",props:{link:{}},setup(e){const n=e,{data:s}=oe(()=>n.link);return(b,w)=>i(s)?(t(),d("div",ie,[a("div",null,[a("h4",le,y(i(s).title),1),a("div",null,y(i(s).description),1)]),a("div",{class:"video-embed mt-auto inner-block",innerHTML:i(s).html},null,8,re)])):k("",!0)}}),ce=J(de,[["__scopeId","data-v-4a648934"]]),ue={class:"video-notes-writer"},fe={key:1,class:"flex-grow-1 d-flex justify-center align-center"},pe={class:"d-flex justify-space-between flex-wrap ga-4"},me={class:"link-wrapper"},ye=["href"],_e={class:"time mb-3"},ve={class:"actions"},ge={class:"input-wrapper"},he=h({__name:"VideosNotes",props:{playerId:{}},setup(e){const{confirm:n}=te(),s=e,b=Z(),{data:w,isFetching:$}=ae(()=>s.playerId),c=g(()=>w.value?.clientFields?.videoLinks??[]),I=()=>b.invalidateQueries({queryKey:[S.playerBaseInfo]}),x=L({mutationFn:r=>F.players.videoNotes.post(s.playerId,r),onSuccess:I}),V=L({mutationFn:r=>F.players.videoNotes.delete(s.playerId,r),onSuccess:I}),u=g(()=>$.value||x.isPending.value||V.isPending.value),l=O("");R(()=>c.value.length,P);function M(){A()}function A(){l.value&&x.mutate(l.value,{onSuccess:()=>l.value=""})}async function K(r){await n("Are you sure you want to delete the video?")&&V.mutate(r)}const f=q("containerRef");function P(){E(()=>{f.value&&f.value.scrollTo({top:f.value.scrollHeight,behavior:"smooth"})})}return(r,_)=>(t(),d("div",ue,[c.value.length===0&&!u.value?(t(),m(se,{key:0})):c.value.length===0?(t(),d("div",fe,[p(Q,{indeterminate:"",color:"primary"})])):(t(),d("div",{key:2,ref_key:"containerRef",ref:f,class:"videos-list"},[(t(!0),d(j,null,H(c.value,(o,T)=>(t(),d("div",{key:T,class:"note block background pa-4"},[a("div",pe,[a("div",me,[a("a",{class:"link",href:o.link,target:"_blank"},y(o.link),9,ye),a("div",_e,y(i(ee).dateFromBackendFullToLocalWithTime(o.createdAt)),1)]),a("div",ve,[p(C,{variant:"text",color:"error",size:"x-small",rounded:"",icon:i(B).delete,"aria-label":"Delete video",loading:u.value,onClick:be=>K(T)},null,8,["icon","loading","onClick"])])]),(t(),m(ce,{key:o.link,class:"flex-grow-1",link:o.link},null,8,["link"]))]))),128))],512)),a("div",ge,[p(z,{modelValue:l.value,"onUpdate:modelValue":_[0]||(_[0]=o=>l.value=o),readonly:u.value,"auto-grow":"",rows:"1","max-rows":"3",label:"Video link",placeholder:"Put a link...","hide-details":"",class:"background",onKeydown:Y(U(M,["exact","prevent"]),["enter"])},{"append-inner":D(()=>[p(W,null,{default:D(()=>[l.value.length>0?(t(),m(C,{key:0,color:"",variant:"text",tile:"",icon:i(B).send,density:"compact","aria-label":"Send",loading:u.value,onClick:M},null,8,["icon","loading"])):k("",!0)]),_:1})]),_:1},8,["modelValue","readonly","onKeydown"])])]))}}),ke=h({__name:"videos",props:{dbId:{},playerInfoTM:{},playerInfoDB:{}},setup(e){return(n,s)=>e.dbId?(t(),m(he,{key:0,"player-id":e.dbId},null,8,["player-id"])):k("",!0)}});typeof N=="function"&&N(ke);export{ke as default}; 2//# sourceMappingURL=videos-CRP-q4of.js.map
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.