import{o as i,c as f,w as a,u as s,b as n,d as m,e as _,a as t,f as d,g as l,h as c,t as r,F as h,D as p}from"./app-SC54XQDl.js";import{i as g,c as y}from"./app-Ba7ZqSpq.js";import{_ as b}from"./app-2eNgyX55.js";import{_ as k}from"./app-DFulsyXy.js";import{_ as v}from"./app-T1ysvErZ.js";import{_ as w}from"./app-DWUwCFNm.js";import{D as x}from"./app-ZeVDYyDS.js";import{_ as R}from"./app-D9UgVOV0.js";import{_ as C}from"./app-Cft_lrsr.js";import"./app-CL60OiIv.js";import"./app-D9TrJBlL.js";import"./app-_Ovp2dOH.js";import"./app-BjSCO7rC.js";import"./app-Dhl-Bw0H.js";import"./app-B2C_dtYI.js";import"./app-COidJXl1.js";import"./app-CNHjdV6U.js";import"./app-C28obFWS.js";import"./app-CkINxBL9.js";import"./app-PPG0ZS4d.js";import"./app--Lj8zATS.js";import"./app-Ch8j4za4.js";import"./app-C2mBgI5Z.js";import"./app-qhR41k1m.js";import"./app-CS3AUTAk.js";import"./app-CCkWSX4Q.js";function $(){g(this),this.isRequesting=!1,this.isOk=!1,this.message="",this.failKeys=[],this.before=function(){this.isRequesting=!0,this.isOk=!1,this.message="",this.failKeys=[]},this.success=function(o){this.isOk=!0,this.$NotifyReloadSuccess("任务提交成功")()},this.fail=function(o){this.message=o.message,o.data.failKeys!=null&&(this.failKeys=o.data.failKeys)},this.done=function(){this.isRequesting=!1}}const q=t("p",{class:"!mb-4"},"可以在这里批量预热一组URL。",-1),D=["value"],O=["value"],B=t("td",null,"URL列表",-1),K=t("p",{class:"comment"},"每行一个URL。",-1),N=t("td",{class:"title"},"操作结果",-1),S={key:0},F={key:1,class:"red"},I={key:2,class:"fail-keys-box"},L={class:"red"},fe={__name:"fetch",setup(o){const e=y(new $);return(V,U)=>(i(),f(C,{ctx:s(e)},{default:a(()=>[n(b,{ctx:s(e),"active-tab":"fetch"},null,8,["ctx"]),m(t("div",null,[n(R,{"disable-spacing":""},{default:a(()=>[d("没有开启缓存，暂时无法预热缓存。")]),_:1})],512),[[_,s(e).webConfig.cache==null||!s(e).webConfig.cache.isOn]]),m(t("div",null,[q,n(k,{action:"$",onBefore:s(e).before,onSuccess:s(e).success,onFail:s(e).fail,onDone:s(e).done,timeout:"3600"},{default:a(()=>[t("input",{type:"hidden",name:"serverId",value:s(e).serverId},null,8,D),t("input",{type:"hidden",name:"webId",value:s(e).webId},null,8,O),n(x,null,{default:a(()=>[t("tbody",null,[t("tr",null,[B,t("td",null,[n(v,{name:"keys",rows:"10",class:"w-full",autofocus:""}),K])]),t("tr",null,[N,t("td",null,[s(e).isRequesting?(i(),l("div",S,"数据发送中...")):c("",!0),!s(e).isRequesting&&!s(e).isOk&&s(e).message.length>0?(i(),l("span",F,"失败："+r(s(e).message),1)):c("",!0),!s(e).isRequesting&&!s(e).isOk&&s(e).failKeys.length>0?(i(),l("div",I,[(i(!0),l(h,null,p(s(e).failKeys,u=>(i(),l("div",null,[t("span",L,r(u.key)+": "+r(u.reason),1)]))),256))])):c("",!0)])])])]),_:1}),s(e).isRequesting?c("",!0):(i(),f(w,{key:0},{default:a(()=>[d("提交")]),_:1}))]),_:1},8,["onBefore","onSuccess","onFail","onDone"])],512),[[_,s(e).webConfig.cache!=null&&s(e).webConfig.cache.isOn]])]),_:1},8,["ctx"]))}};export{fe as default};
