import{M as h}from"./MkNote-Y7yPCL5J.js";import{_ as E}from"./MkDateSeparatedList.vue_vue_type_style_index_0_lang-bpwwzSpi.js";import{M as k}from"./MkPagination-urywMrXv.js";import{r as M,i as y,ao as I,a as T,n as N}from"./app-JmgyQoR0.js";import{b as C,a as n,e as B,_ as G,o as S,a7 as b,h as p,i as u,j as r,u as a,z as d,E as w,l as x,x as H}from"./vue-y3KLWBaS.js";const q={class:"_fullinfo"},z=["src"],D=C({__name:"MkNotes",props:{pagination:{},noGap:{type:Boolean}},setup(V,{expose:f}){const s=n(),i=n(),t=n(),l=n(document.documentElement.clientHeight*-.5);function v(){s.value&&I(s.value,{top:0,behavior:"smooth"})}function c(){t.value||!T.state.enableInfiniteScroll||(t.value=setInterval(()=>{const e=document.documentElement.clientHeight;document.documentElement.scrollHeight-document.documentElement.scrollTop>Math.max(e*3,e+4e3)||document.documentElement.scrollTop-l.value<e||(i.value.prefetchMore(),l.value=document.documentElement.scrollTop)},100))}function m(){t.value&&(clearInterval(t.value),t.value=void 0)}return B(c),G(c),S(m),b(m),f({pagingComponent:i,scrollTop:v}),(e,_)=>(p(),u(k,{ref_key:"pagingComponent",ref:i,pagination:e.pagination},{empty:r(()=>[a("div",q,[a("img",{src:d(M).images.info,class:"_ghost",alt:"Info"},null,8,z),a("div",null,w(d(y).ts.noNotes),1)])]),default:r(({items:g})=>[a("div",{class:H(["giivymft",{noGap:e.noGap}]),ref_key:"tlEl",ref:s},[x(E,{ref:"notes",items:g,direction:e.pagination.reversed?"up":"down",reversed:e.pagination.reversed,"no-gap":e.noGap,class:"notes"},{default:r(({item:o})=>[(p(),u(h,{key:o._featuredId_||o._prId_||o.id,class:"qtqtichx",note:o},null,8,["note"]))]),_:2},1032,["items","direction","reversed","no-gap"])],2)]),_:1},8,["pagination"]))}}),U=N(D,[["__scopeId","data-v-fe034336"]]);export{U as X};
