(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[392],{11112:function(t,e,r){Promise.resolve().then(r.bind(r,44601))},44601:function(t,e,r){"use strict";r.r(e),r.d(e,{default:function(){return f}});var a=r(57437),n=r(76301),o=r(85323),i=r(97500),c=r(67489),l=r(36699),s=r(96947),d=t=>{console.log("renderFilterDropdown",t);let{tempFilteredValue:e,setTempFilteredValue:r,confirm:o,clear:i,close:c}=t;return(0,a.jsx)(n.Qc,{value:e[0],showClear:!0,prefix:(0,a.jsx)(s.Z,{}),placeholder:"搜索... ",onChange:t=>{let e=t?[t]:[];r(e),o({filteredValue:e})},style:{width:200,margin:5}})},u=r(34595),h=r(61255);function f(){let{Header:t,Footer:e,Sider:r,Content:s}=n.Layout,{data:f,error:g,isLoading:x}=(0,o.ZP)("/v1/streamer-info",i._i);if(x)return(0,a.jsx)(n.yC,{size:"large"});let{Text:w}=n.Typography,p=[{title:"名称",dataIndex:"name",onFilter:(t,e)=>e.name.includes(t),renderFilterDropdown:d},{title:"标题",dataIndex:"title",render:(t,e,r)=>(0,a.jsx)(w,{strong:!0,children:t}),onFilter:(t,e)=>e.title.includes(t),renderFilterDropdown:d},{title:"链接",dataIndex:"url"},{title:"封面",dataIndex:"live_cover_path"},{title:"更新日期",dataIndex:"date",defaultSortOrder:"descend",sorter:(t,e)=>t.date-e.date>0?1:-1,render:t=>(0,l.cE)(t)}];return(0,a.jsx)(u.a,{children:(0,a.jsxs)(h.Z,{children:[(0,a.jsx)(t,{style:{backgroundColor:"var(--semi-color-bg-1)"},children:(0,a.jsxs)("div",{style:{display:"flex",alignItems:"center",padding:"0 20px",height:"60px",backgroundColor:"var(--semi-color-bg-1)",boxShadow:"0 1px 2px 0 rgb(0 0 0 / 0.05)"},children:[(0,a.jsx)("div",{style:{backgroundColor:"rgb(250 102 76)",borderRadius:"var(--semi-border-radius-large)",color:"var(--semi-color-bg-0)",display:"flex",padding:"6px"},children:(0,a.jsx)(c.Z,{size:"large"})}),(0,a.jsx)("h4",{style:{marginLeft:"12px",margin:0},children:"直播历史"})]})}),(0,a.jsx)(s,{style:{paddingLeft:12,paddingRight:12,backgroundColor:"var(--semi-color-bg-0)"},children:(0,a.jsx)("main",{children:(0,a.jsx)(n.iA,{size:"small",rowKey:"id",columns:p,dataSource:f,expandedRowRender:(t,e)=>(0,a.jsxs)(a.Fragment,{children:["文件列表：",t.files.map(t=>(0,a.jsxs)("div",{children:["\xa0\xa0文件名：",t.file]},t.id))]})})})})]})})}},97500:function(t,e,r){"use strict";async function a(t,e){let{arg:r}=e,a=localStorage.getItem("auth"),n={"Content-Type":"application/json"};a&&(n.Authorization="Basic ".concat(a));let o=await fetch(""+t,{method:"POST",headers:n,body:JSON.stringify(r)});if(!(o.status>=200&&o.status<300))throw Error(await o.text());let i=await o.json();if(!o.ok)throw Error(i.message);return i}r.d(e,{_i:function(){return n},gz:function(){return c},hw:function(){return i},sj:function(){return o},wG:function(){return a}});let n=async function(){for(var t=arguments.length,e=Array(t),r=0;r<t;r++)e[r]=arguments[r];let a=localStorage.getItem("auth"),n=e[1]||{},o=n.headers||{};if(a){let t={};o instanceof Headers?o.forEach((e,r)=>{t[r]=e}):t=Array.isArray(o)?Object.fromEntries(o):{...o},t.Authorization="Basic ".concat(a);let r=await fetch(""+e[0],{...n,headers:t});if(!r.ok)throw Error(await r.text());return r.json()}let i=await fetch(""+e[0],{...n,headers:o});if(!i.ok)throw Error(await i.text());return i.json()},o=async(t,e)=>{let r=localStorage.getItem("auth"),a=e||{},n=a.headers||{};if(r){let e={};n instanceof Headers?n.forEach((t,r)=>{e[r]=t}):e=Array.isArray(n)?Object.fromEntries(n):{...n},e.Authorization="Basic ".concat(r);let o=await fetch(""+t,{...a,headers:e});if(!o.ok)throw Error(await o.text());return o}let o=await fetch(""+t,{...a,headers:n});if(!o.ok)throw Error(await o.text());return o};async function i(t,e){let{arg:r}=e,a=localStorage.getItem("auth"),n={};a&&(n.Authorization="Basic ".concat(a));let o=await fetch("".concat("").concat(t,"/").concat(r),{method:"DELETE",headers:n});if(!o.ok)throw Error(await o.text());return o}async function c(t,e){let{arg:r}=e,a=localStorage.getItem("auth"),n={"Content-Type":"application/json"};a&&(n.Authorization="Basic ".concat(a));let o=await fetch("".concat("").concat(t),{method:"PUT",headers:n,body:JSON.stringify(r)});if(!o.ok)throw Error(await o.text());return o}}},function(t){t.O(0,[916,737,877,623,290,852,191,147,429,597,326,301,987,323,896,789,971,117,744],function(){return t(t.s=11112)}),_N_E=t.O()}]);