1import{ah as fetchInfiniteData,d as defineComponent,w as watch,o as openBlock,c as createElementBlock,a as unref,e as createVNode,f as withCtx,s as createTextVNode,t as toDisplayString,q as hUi,g as createBaseVNode,F as Fragment,k as renderList,v as createBlock,m as mergeProps,T as _sfc_main$4,h as createCommentVNode,j as computed,D as fetchData,a4 as useQueryClient,y as ref,a5 as prefetchData,aj as API_WIDGETS_PATH,I as useRoute,J as useAdaptive,a8 as useCommonMeta,O as onMounted,p as _sfc_main$5,l as normalizeClass,a7 as _sfc_main$7,n as nextTick}from"../main-sKWLCJQt.js";import{u as useAnchorRubrics,p as preparePosition}from"./position-info-D0reXS_4.js";import{_ as _sfc_main$6}from"./anchor-tabs.type_style-ClsrDwEq.js";import{_ as _sfc_main$3}from"./base-video-card.vue_vue_type_script_setup_true_lang-DyMJ0Boi.js";import{u as usePreloadServer}from"./use-preload-server-Di9Y96X6.js";import"./views.vue_vue_type_script_setup_true_lang-BMJHNZIu.js";import"./img-card.vue_vue_type_script_setup_true_lang-Bc2urnVG.js";const _hoisted_1$2=["data-size"],_hoisted_2$2={class:"video-list__block"},_sfc_main$2=defineComponent({__name:"VideoTilesInfinite",props:{title:{},type:{}},emits:["recalculate"],setup(e,{emit:t}){const a=e,s=t,o=computed(()=>{if(!(null==n?void 0:n.value))return[];const e=[];return n.value.pages.forEach(({data:t})=>e.push(t.items)),e.flat()}),i=()=>{unref(r)||unref(c)()},{data:n,hasNextPage:l,isFetchingNextPage:r,fetchNextPage:c}=(d=a.type,fetchInfiniteData(["video/".concat(d)],{size:6}));var d;return watch(o,()=>{s("recalculate")},{flush:"post"}),(t,a)=>{const s=hUi,n=_sfc_main$4;return openBlock(),createElementBlock("div",{class:"video-tiles","data-size":unref(o).length},[createVNode(s,{type:"subheading",size:"l",class:"video-tiles__title"},{default:withCtx(()=>[createTextVNode(toDisplayString(e.title),1)]),_:1}),createBaseVNode("div",_hoisted_2$2,[(openBlock(!0),createElementBlock(Fragment,null,renderList(unref(o),(e,t)=>(openBlock(),createBlock(unref(_sfc_main$3),mergeProps({key:e.id,class:"video-tiles__card"},{ref_for:!0},e,{"data-position":t}),null,16,["data-position"]))),128))]),unref(l)?(openBlock(),createBlock(n,{key:0,size:"l",disabled:unref(r),class:"video-tiles__btn",onClick:i},{default:withCtx(()=>[...a[0]||(a[0]=[createTextVNode(" ÐоказаÑÑ ÐµÑе ",-1)])]),_:1},8,["disabled"])):createCommentVNode("",!0)],8,_hoisted_1$2)}}}),_hoisted_1$1=["data-size"],_hoisted_2$1={class:"video-list__block"},_sfc_main$1=defineComponent({__name:"VideoTilesSimple",props:{title:{},type:{}},setup(e){const t=e,{data:a}=(s=t.type,fetchData(["recently"===s?s:"video/".concat(s)]));var s;return(t,s)=>{var o;const i=hUi;return openBlock(),createElementBlock("div",{class:"video-tiles","data-size":null==(o=unref(a))?void 0:o.length},[createVNode(i,{type:"subheading",size:"l",class:"video-tiles__title"},{default:withCtx(()=>[createTextVNode(toDisplayString(e.title),1)]),_:1}),createBaseVNode("div",_hoisted_2$1,[(openBlock(!0),createElementBlock(Fragment,null,renderList(unref(a),(e,t)=>(openBlock(),createBlock(unref(_sfc_main$3),mergeProps({key:e.id,class:"video-tiles__card"},{ref_for:!0},e,{"data-position":t}),null,16,["data-position"]))),128))])],8,_hoisted_1$1)}}}),setData=(e,t)=>{var a;e.getQueryData(["video/new"])||e.setQueryData(["video/new"],{pages:[{data:t.new||{items:[],pagination:{}},nextCursor:(null==(a=t.new)?void 0:a.pagination.next_page)||null}],pageParams:[1]}),e.getQueryData(["video/popular"])||e.setQueryData(["video/popular"],{data:t.popular}),e.getQueryData(["recently"])||e.setQueryData(["recently"],{data:t.recently})},RUBRICS=[{name:"Ðовое на ÑайÑе",shortcat:"new"},{name:"ÐопÑлÑÑное",shortcat:"popular"},{name:"Ðедавно в ÑÑиÑе",shortcat:"recently"}],TABS=[{title:"Ðовое",keyTab:"new"},{title:"ÐопÑлÑÑное",keyTab:"popular"},{title:"Ðедавно в ÑÑиÑе",keyTab:"recently"}],_hoisted_1={class:"video-all"},_hoisted_2={class:"video-all__content"},_hoisted_3={key:0,class:"video-all__navigation"},_hoisted_4={class:"video-all__rubrics"},_hoisted_5={key:0,class:"video-all__lists"},__default__=defineComponent({methods:{preloadPage:async e=>{const t=await prefetchData({client:e,path:API_WIDGETS_PATH,queryKey:["video/list"]}),a=e.getQueryData(["video/list"]);return(null==a?void 0:a.data)&&setData(e,null==a?void 0:a.data),t}}}),_sfc_main=defineComponent({...__default__,__name:"VideoAll",setup(e){const t=useRoute(),a=ref(""),s=useAdaptive(),{data:o}=(()=>{const e=useQueryClient(),{suspense:t,data:a,isFetching:s}=fetchData(["video/list"],{},{enabled:ref(!1)});return usePreloadServer(async()=>{await t(),(null==a?void 0:a.value)&&setData(e,null==a?void 0:a.value)}),{data:a,isFetching:s}})(),i=computed(()=>"mobile"===s.getBPName()||"tablet"===s.getBPName());useAnchorRubrics(a,RUBRICS);function n(){nextTick(preparePosition)}return useCommonMeta({title:"Ðидео",description:"ÐопÑлÑÑнÑе Ñолики, вÑе новÑе видеоÑÑжеÑÑ, полнÑе вÑпÑÑки пеÑÐµÐ´Ð°Ñ ÐТÐ. СмоÑÑиÑе на ÑайÑе ÐТÐ",pfx:!0}),onMounted(()=>{n()}),(e,s)=>{const l=hUi,r=_sfc_main$5,c=_sfc_main$7;return openBlock(),createElementBlock("div",_hoisted_1,[createVNode(l,{type:"heading",size:"l",tag:"h1",class:"video-all__title"},{default:withCtx(()=>[...s[0]||(s[0]=[createTextVNode("Ðидео",-1)])]),_:1}),createBaseVNode("div",_hoisted_2,[createVNode(c,null,{default:withCtx(()=>[unref(i)?(openBlock(),createBlock(unref(_sfc_main$6),{key:1,headers:unref(TABS),class:"video-all__tabs"},null,8,["headers"])):(openBlock(),createElementBlock("div",_hoisted_3,[createBaseVNode("ul",_hoisted_4,[(openBlock(!0),createElementBlock(Fragment,null,renderList(unref(RUBRICS),e=>(openBlock(),createBlock(l,{key:e.shortcat,type:"caption",size:"xs",tag:"li",class:"video-all__rubric"},{default:withCtx(()=>[createVNode(r,{link:{...unref(t),hash:"#".concat(e.shortcat)},title:e.name,"no-smooth":unref(i),class:normalizeClass({"active-rubric":unref(a)===e.shortcat,"hov-b":unref(a)!==e.shortcat})},null,8,["link","title","no-smooth","class"])]),_:2},1024))),128))])]))]),_:1}),unref(o)?(openBlock(),createElementBlock("div",_hoisted_5,[unref(o).new?(openBlock(),createBlock(unref(_sfc_main$2),{key:0,id:"new",title:"Ðовое на ÑайÑе",type:"new",class:"video-all__block",onRecalculate:n})):createCommentVNode("",!0),unref(o).popular?(openBlock(),createBlock(unref(_sfc_main$1),{key:1,id:"popular",title:"ÐопÑлÑÑное",type:"popular",class:"video-all__block"})):createCommentVNode("",!0),unref(o).recently?(openBlock(),createBlock(unref(_sfc_main$1),{key:2,id:"recently",title:"Ðедавно в ÑÑиÑе",type:"recently",class:"video-all__block"})):createCommentVNode("",!0)])):createCommentVNode("",!0)])])}}});
1export{_sfc_main 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.