import{_ as F,f as B}from"./index.f1458219.js";import{B as I,ac as S}from"./MoreFeedback.7a64cae1.js";import{N as C,o as e,c as a,a0 as x,ak as d,X as u,ab as T,S as w,y as v,dN as N,aW as $,l as p,A,b4 as D,m as E,a as c,V as k,Y as g,Z as y,_ as H,a3 as R}from"./index.2e2ba873.js";import{u as V,N as P}from"./App.4a38a252.js";import{I as z}from"./ico_tips.620cad59.js";import"./modulepreload-polyfill.b7f2da20.js";import"./ico_max_exit.795e9ef8.js";import"./plugin-vue_export-helper.21dcd24c.js";import"./index.36d4c5c3.js";import"./style.488e5a30.js";import"./isUdf.1a76b9f4.js";import"./btn_devtools.210a42a8.js";import"./ico_pin.548219aa.js";/* empty css               */import"./theme-map.83df99de.js";import"./index.53c6cc19.js";const O={class:"ranking_card p_relative"},j={key:0,class:"ranking_card--badge order_1st"},K={key:1,class:"ranking_card--badge order_2nd"},L={key:2,class:"ranking_card--badge order_3rd"},W=["textContent"],G=C({__name:"RankingCard",props:{idx:Number,info:{type:Object,default:()=>({})},rootRef:{type:Object}},setup(t){function _(r){T({type:"ogv",seasonId:r.sid,fromSpmid:`${w.homeHot}.pv`})}return(r,i)=>(e(),a("div",O,[t.info.order===1?(e(),a("div",j)):t.info.order===2?(e(),a("div",K)):t.info.order===3?(e(),a("div",L)):(e(),a("div",{key:3,class:"ranking_card--badge order_th",textContent:x(t.info.order)},null,8,W)),t.info.type==="video"?(e(),d(u(I),{key:4,info:t.info.videoInfo,"is-rcmd":"","img-lazy":"eager","disable-frame":"","disable-scale":"",iid:"pc_app_hots_ranking","scroll-wrap":".home_hots",rootRef:t.rootRef,isFirstCard:t.idx===0},null,8,["info","rootRef","isFirstCard"])):(e(),d(u(S),{key:5,onClickBangumi:_,info:t.info.bangumiInfo,"img-lazy":"eager","disable-frame":"","disable-scale":"","scroll-wrap":".home_hots",rootRef:t.rootRef,isFirstCard:t.idx===0},null,8,["info","rootRef","isFirstCard"]))]))}});const J={class:"home_hots_ranking"},M={class:"home_hots--tabs--shim"},X={class:"home_hots_ranking--tips"},Y=R(" \u6392\u884C\u699C\u6839\u636E\u7A3F\u4EF6\u5185\u5BB9\u8D28\u91CF\uFF0C\u8FD1\u671F\u7684\u6570\u636E\u7EFC\u5408\u5C55\u793A\uFF0C\u52A8\u6001\u66F4\u65B0 "),Z={class:"home_hots_ranking--filter flex_row flex_wrap w_100"},q=["onClick"],Q=c("span",{class:"gamepad-cursor","data-tp":"rankingItems"},null,-1),U={key:1,class:"home_hots_ranking--content pt_lg row gutter_md"},pe=C({__name:"Ranking",setup(t){const{homeHotsRef:_}=v(N()),r=$(),i=p(!1),o=A({activeTypeIndex:-1,list:[]}),{kvSDK:b}=v(D()),m=p([{name:"\u5168\u7AD9",tid:0,slug:"all"}]),h=async()=>{if(!i.value){o.list=[],i.value=!0;try{o.list=await B(m.value[o.activeTypeIndex]),i.value=!1,r.flashPageCursors(100)}catch(s){console.log(s),i.value=!1}}},f=s=>{s===o.activeTypeIndex&&o.list.length||(o.activeTypeIndex=s,o.list=[],h())};return V("HomeHotsRanking",async()=>{o.activeTypeIndex!==0?f(0):h()}),E(()=>{(async()=>{const s=JSON.parse(await b.value.get("app.rank")||"[]");s.length&&(m.value=s)})(),f(0)}),(s,ee)=>(e(),a("div",J,[c("div",M,[c("div",X,[k(u(z)),Y])]),c("div",Z,[(e(!0),a(g,null,y(m.value,(n,l)=>(e(),a("div",{key:n.slug,class:H(["home_hots_ranking--filter--type text_center cs_pointer p_relative",{"is-active":o.activeTypeIndex===l}]),onClick:te=>f(l)},[R(x(n.name)+" ",1),Q],10,q))),128))]),o.list.length?(e(),a("div",U,[(e(!0),a(g,null,y(o.list,(n,l)=>(e(),a("div",{class:"home_hots_all--video col_3 col_sm_1_5 mb_xxl",key:n.aid},[k(G,{info:n,idx:l,rootRef:u(_)},null,8,["info","idx","rootRef"])]))),128))])):(e(),a(g,{key:0},[i.value?(e(),d(F,{key:0})):(e(),d(P,{key:1}))],64))]))}});export{pe as default};
