Files
yakpanel-core/YakPanel/static/vite/js/index-legacy-Dw_kNaZi.js
2026-04-07 02:04:22 +05:30

8 lines
82 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
System.register(["./index-legacy-DQdImDha.js?v=1773287522785","./index-legacy-DWPn48Vb.js?v=1773287522785","./index.vue_vue_type_script_setup_true_lang-legacy-BWPgT9-g.js?v=1773287522785","./index.vue_vue_type_script_setup_true_lang-legacy-BBkGleHZ.js?v=1773287522785","./index.vue_vue_type_script_setup_true_lang-legacy-BtQUnlS_.js?v=1773287522785","./index.vue_vue_type_script_setup_true_lang-legacy-IFFYkvEY.js?v=1773287522785","./index.vue_vue_type_script_setup_true_lang-legacy-CvnE2rtV.js?v=1773287522785","./vue-core-legacy-Cn1vuJ3s.js?v=1773287522785","./useLoading-legacy-IiShPpjk.js?v=1773287522785","./useTableData-legacy-3kc3lnk4.js?v=1773287522785","./useTableColumns-legacy-DP6ypvsQ.js?v=1773287522785","./index-legacy-BFkuWVH1.js?v=1773287522785","./index-legacy-sO5zj2jA.js?v=1773287522785","./index-legacy-DEYz4m3y.js?v=1773287522785","./index-legacy-hh1mlQOF.js?v=1773287522785","./naive-ui-legacy-BW82sq8q.js?v=1773287522785","./index-legacy-Cv0QQQJ6.js?v=1773287522785","./index-legacy-DgZ0-E4f.js?v=1773287522785","./index.vue_vue_type_script_setup_true_lang-legacy-LjZ-8uGn.js?v=1773287522785","./index.vue_vue_type_script_setup_true_lang-legacy-BtujQJPk.js?v=1773287522785","./index-legacy-DaNJUJqN.js?v=1773287522785","./prismjs-legacy-BN0FEcG9.js?v=1773287522785","./index-legacy-DGWsVoxN.js?v=1773287522785","./index-legacy-BJO1GMTD.js?v=1773287522785","./useOperate-legacy-Bh3KhBNp.js?v=1773287522785","./php-legacy-BZUQ59eS.js?v=1773287522785"],(function(e,t){"use strict";var l,a,i,n,o,r,u,s,d,p,c,_,x,y,h,m,v,f,b,g,w,S,k,P,$,C,L,U,T,V,R,j,E,z,N,B,O,q,D,I,A,H,M,K,F,W,Y,G,J,X,Z,Q,ee,te,le,ae,ie,ne,oe,re,ue,se,de,pe,ce,_e,xe,ye,he,me,ve,fe,be,ge,we,Se,ke,Pe,$e,Ce,Le,Ue,Te,Ve,Re,je,Ee,ze,Ne,Be,Oe,qe,De,Ie,Ae,He,Me,Ke,Fe,We,Ye,Ge,Je,Xe,Ze,Qe,et,tt,lt,at,it,nt,ot,rt,ut,st,dt,pt,ct,_t,xt,yt,ht,mt,vt,ft,bt,gt,wt,St;return{setters:[e=>{l=e.d2,a=e.i,i=e.d3,n=e.a3,o=e._,r=e.h,u=e.d4,s=e.d5,d=e.n,p=e.m,c=e.d6,_=e.d7,x=e.d8,y=e.d9,h=e.v,m=e.x,v=e.aF,f=e.da,b=e.db,g=e.dc,w=e.dd,S=e.de,k=e.df,P=e.dg,$=e.dh,C=e.di,L=e.dj,U=e.dk,T=e.dl,V=e.dm,R=e.dn,j=e.dp,E=e.dq,z=e.dr,N=e.ds,B=e.dt,O=e.du,q=e.dv,D=e.dw,I=e.dx,A=e.dy,H=e.dz,M=e.dA,K=e.dB,F=e.dC,W=e.dD,Y=e.dE,G=e.dF,J=e.P,X=e.aK,Z=e.at,Q=e.au,ee=e.p,te=e.t,le=e.dG,ae=e.af,ie=e.dH,ne=e.ap,oe=e.c$},e=>{re=e._},e=>{ue=e._},e=>{se=e._},e=>{de=e._},e=>{pe=e._},e=>{ce=e._},e=>{_e=e.a4,xe=e.r,ye=e.i,he=e.p,me=e.a0,ve=e.k,fe=e.R,be=e.$,ge=e.Z,we=e._,Se=e.a9,ke=e.aa,Pe=e.X,$e=e.S,Ce=e.j,Le=e.a6,Ue=e.e,Te=e.N,Ve=e.ak,Re=e.F,je=e.a8,Ee=e.o,ze=e.s,Ne=e.n,Be=e.a3,Oe=e.u,qe=e.x,De=e.w},e=>{Ie=e.u},e=>{Ae=e.u},e=>{He=e.u,Me=e._,Ke=e.e,Fe=e.l,We=e.o},e=>{Ye=e.u},e=>{Ge=e._},e=>{Je=e._},e=>{Xe=e._},e=>{Ze=e.B,Qe=e.a1,et=e.b,tt=e.a8,lt=e.k,at=e._,it=e.a6,nt=e.a7,ot=e.a0,rt=e.e,ut=e.aV,st=e.al,dt=e.aW,pt=e.ap,ct=e.a9,_t=e.a2},e=>{xt=e._},e=>{yt=e._},e=>{ht=e._},e=>{mt=e._},e=>{vt=e.default},e=>{ft=e.a},e=>{bt=e._},e=>{gt=e._},e=>{wt=e.u},e=>{St=e.d}],execute:function(){e("a",Lt);const kt=e("u",_e("site-proxy",(()=>{const e=xe(!1);return{siteName:xe("1111"),proxyPath:xe("1111"),isRefresh:e,setRefresh:t=>{e.value=t}}}))),Pt=Symbol("server-list");async function $t(e){const{message:t}=await i({site_name:e});if(a(t))return t}async function Ct(e,t){const{message:i}=await l({site_name:e,proxy_path:t});if(a(i))return i}function Lt(){return ye(Pt)}const{t:Ut}=n.global;function Tt({delDomain:e}){return{key:"action",title:Ut("Public.Table.Action"),width:80,align:"right",render:t=>me(Xe,{options:[{label:Ut("Public.Btn.Del"),onClick:()=>{r({title:`${Ut("Site.Batch.index_12")} [${t.name}]`,content:Ut("Site.Batch.index_13"),onConfirm:async({hide:l})=>{await e(t),l()}})}}]},null)}}const Vt={class:"flex justify-between items-center mb-24px"},Rt={class:"w-400px"},jt={class:"pr-40px"},Et=ve({__name:"index",setup(e,{expose:t}){const{t:l}=fe(),{data:i}=Lt(),n=xe(""),r=async()=>{""!==n.value.trim()?(await c({id:i.id,site_name:i.name,domains:n.value.trim().split("\n").join(",")}),n.value="",g()):p.error(l("Site.Proxy.index_59"))},_=async e=>{await u({id:i.id,site_name:i.name,domain:e.name,port:e.port}),g()},{keys:x,table:y,columns:h}=Ae([{type:"selection",width:40},{key:"name",title:Ut("Site.TableRow.index_19"),render:e=>me(o,{href:`http://${e.name}:${e.port}`,target:"_blank"},{default:()=>[e.name]})},{key:"port",title:Ut("Site.TableRow.index_16"),width:100},Tt({delDomain:_})]),m=()=>{y.data.length>1?h.value[h.value.length-1]=Tt({delDomain:_}):h.value[h.value.length-1]={key:"action",title:Ut("Public.Table.Action"),width:80,align:"right",render:()=>me("span",{class:"text-default"},[Ut("Site.TableOP.index_9")])}},v=[{key:"del",type:"confirm",label:l("Site.Batch.index_20"),confirm:{title:l("Site.Batch.index_21"),desc:l("Site.Batch.index_11"),api:e=>u({id:i.id,site_name:i.name,domain:e.name,port:e.port},!1),done:()=>{g()},columns:[{key:"name",title:l("Site.TableRow.index_19"),ellipsis:{tooltip:{width:"trigger"}}}]}}],{loading:f,setLoading:b}=Ie(),g=async()=>{try{b(!0);const e={id:i.id,site_name:i.name},{message:t}=await s(e);a(t)&&(y.data=d(t.domain_list)?t.domain_list:[],m())}catch(e){p.error(l("Site.Proxy.index_60")),console.error(e)}finally{x.value=[],b(!1)}};return g(),t({init:g}),(e,t)=>{const l=Je,a=Ze,i=pe,o=de,u=ue;return be(),ge("div",null,[we("div",Vt,[we("div",Rt,[me(l,{value:$e(n),"onUpdate:value":t[0]||(t[0]=e=>Pe(n)?n.value=e:null)},{default:Se((()=>[we("p",null,ke(e.$t("Site.PHP.add_site_5")),1),we("p",null,ke(e.$t("Site.PHP.add_site_6")),1),we("p",null,ke(e.$t("Site.PHP.add_site_7")),1)])),_:1},8,["value"])]),we("div",jt,[me(a,{type:"primary",onClick:r},{default:Se((()=>[Ce(ke(e.$t("Site.Cert.index_62")),1)])),_:1})])]),me(u,null,{table:Se((()=>[me(i,{"checked-row-keys":$e(x),"onUpdate:checkedRowKeys":t[1]||(t[1]=e=>Pe(x)?x.value=e:null),loading:$e(f),"max-height":400,data:$e(y).data,columns:$e(h)},null,8,["checked-row-keys","loading","data","columns"])])),pageLeft:Se((()=>[me(o,{"checked-row-keys":$e(x),"onUpdate:checkedRowKeys":t[2]||(t[2]=e=>Pe(x)?x.value=e:null),data:$e(y).data,options:v},null,8,["checked-row-keys","data"])])),_:1})])}}}),zt={class:"p-20px"},Nt={class:"w-280px"},Bt=ve({__name:"form",props:{data:{}},setup(e,{expose:t}){const{t:l}=fe(),a=kt(),{siteName:i}=Le(a),n=e,{getList:o}=n.data,r=xe(null),u=Ue({name:""}),s={name:{required:!0,message:l("Site.Proxy.index_20"),trigger:["blur","input"]}};return t({onConfirm:async({hide:e})=>{await(r.value?.validate()),await _({site_name:i.value,ip_type:"white",ips:u.name}),o?.(),e()}}),(e,t)=>{const l=et,a=Qe,i=ht,n=yt;return be(),ge("div",zt,[me(i,{ref_key:"formRef",ref:r,model:$e(u),rules:s},{default:Se((()=>[me(a,{label:e.$t("Site.Proxy.index_18"),path:"name"},{default:Se((()=>[we("div",Nt,[me(l,{type:"textarea",value:$e(u).name,"onUpdate:value":t[0]||(t[0]=e=>$e(u).name=e),placeholder:e.$t("Site.Proxy.index_20")},null,8,["value","placeholder"])])])),_:1},8,["label"])])),_:1},8,["model"]),me(n,{class:"mt-4px"},{default:Se((()=>[we("li",null,ke(e.$t("Site.Proxy.index_19")),1)])),_:1})])}}}),Ot=ve({__name:"index",setup(e,{expose:t}){const{t:l}=fe(),{loading:i,setLoading:n}=Ie(),o=kt(),{siteName:u}=Le(o),s=async()=>{try{n(!0);const e=await $t(u.value);a(e)&&(p.data=e.ip_limit.ip_white.map((e=>({ip:e}))))}finally{d.value=[],n(!1)}};s(),t({init:s});const{keys:d,table:p,columns:c}=Ae([{type:"selection",width:40},{key:"ip",title:l("Site.Proxy.index_18"),ellipsis:{tooltip:{width:"trigger"}}},He({width:130,options:e=>[{label:l("Public.Btn.Del"),onClick:()=>{r({title:`${l("Site.TableOP.index_6")} [${e.ip}]`,content:l("Site.Proxy.index_23"),onConfirm:async({hide:t})=>{await x({site_name:u.value,ip_type:"white",ip:e.ip}),s(),t()}})}}]})]),_=[{key:"del",label:l("Site.Batch.index_20"),onBatch:e=>{r({title:l("Site.Batch.index_21"),content:l("Site.Batch.index_11"),onConfirm:async()=>{await y({site_name:u.value,ip_type:"white",ips:e.map((e=>e.ip)).join("\n")}),s()}})}}],v=()=>{f.title=l("Site.Proxy.index_22"),f.show=!0},f=h(l("Site.Proxy.index_22"),{getList:s});return(e,t)=>{const l=Ze,a=pe,n=de,o=ue,r=m;return be(),ge("div",null,[me(o,null,{toolsLeft:Se((()=>[me(l,{type:"primary",onClick:v},{default:Se((()=>[Ce(ke(e.$t("Site.Proxy.index_22")),1)])),_:1})])),table:Se((()=>[me(a,{"checked-row-keys":$e(d),"onUpdate:checkedRowKeys":t[0]||(t[0]=e=>Pe(d)?d.value=e:null),"row-key":"ip",loading:$e(i),"max-height":440,data:$e(p).data,columns:$e(c)},null,8,["checked-row-keys","loading","data","columns"])])),pageLeft:Se((()=>[me(n,{"checked-row-keys":$e(d),"onUpdate:checkedRowKeys":t[1]||(t[1]=e=>Pe(d)?d.value=e:null),"row-key":"ip",data:$e(p).data,options:_},null,8,["checked-row-keys","data"])])),_:1}),me(r,{show:$e(f).show,"onUpdate:show":t[2]||(t[2]=e=>$e(f).show=e),title:$e(f).title,data:$e(f).data,width:480,footer:!0,component:Bt},null,8,["show","title","data"])])}}}),qt={class:"p-20px"},Dt={class:"w-280px"},It=ve({__name:"form",props:{data:{}},setup(e,{expose:t}){const{t:l}=fe(),a=kt(),{siteName:i}=Le(a),n=e,{getList:o}=n.data,r=xe(null),u=Ue({name:""}),s={name:{required:!0,message:l("Site.Proxy.index_20"),trigger:["blur","input"]}};return t({onConfirm:async({hide:e})=>{await(r.value?.validate()),await _({site_name:i.value,ip_type:"black",ips:u.name}),o?.(),e()}}),(e,t)=>{const l=et,a=Qe,i=ht,n=yt;return be(),ge("div",qt,[me(i,{ref_key:"formRef",ref:r,model:$e(u),rules:s},{default:Se((()=>[me(a,{label:e.$t("Site.Proxy.index_18"),path:"name"},{default:Se((()=>[we("div",Dt,[me(l,{type:"textarea",value:$e(u).name,"onUpdate:value":t[0]||(t[0]=e=>$e(u).name=e),placeholder:e.$t("Site.Proxy.index_20")},null,8,["value","placeholder"])])])),_:1},8,["label"])])),_:1},8,["model"]),me(n,{class:"mt-4px"},{default:Se((()=>[we("li",null,ke(e.$t("Site.Proxy.index_19")),1)])),_:1})])}}}),At=ve({__name:"index",setup(e,{expose:t}){const{t:l}=fe(),{loading:i,setLoading:n}=Ie(),o=kt(),{siteName:u}=Le(o),s=async()=>{try{n(!0);const e=await $t(u.value);a(e)&&(p.data=e.ip_limit.ip_black.map((e=>({ip:e}))))}finally{d.value=[],n(!1)}};s(),t({init:s});const{keys:d,table:p,columns:c}=Ae([{type:"selection",width:40},{key:"ip",title:l("Site.Proxy.index_18"),ellipsis:{tooltip:{width:"trigger"}}},He({width:130,options:e=>[{label:l("Public.Btn.Del"),onClick:()=>{r({title:`${l("Site.TableOP.index_6")} [${e.ip}]`,content:l("Site.Proxy.index_23"),onConfirm:async({hide:t})=>{await x({site_name:u.value,ip_type:"black",ip:e.ip}),s(),t()}})}}]})]),_=[{key:"del",label:l("Site.Batch.index_20"),onBatch:e=>{r({title:l("Site.Batch.index_21"),content:l("Site.Batch.index_11"),onConfirm:async()=>{await y({site_name:u.value,ip_type:"black",ips:e.map((e=>e.ip)).join("\n")}),s()}})}}],v=()=>{f.title=l("Site.Proxy.index_21"),f.show=!0},f=h(l("Site.Proxy.index_21"),{getList:s});return(e,t)=>{const l=Ze,a=pe,n=de,o=ue,r=m;return be(),ge("div",null,[me(o,null,{toolsLeft:Se((()=>[me(l,{type:"primary",onClick:v},{default:Se((()=>[Ce(ke(e.$t("Site.Proxy.index_21")),1)])),_:1})])),table:Se((()=>[me(a,{"checked-row-keys":$e(d),"onUpdate:checkedRowKeys":t[0]||(t[0]=e=>Pe(d)?d.value=e:null),"row-key":"ip",loading:$e(i),"max-height":440,data:$e(p).data,columns:$e(c)},null,8,["checked-row-keys","loading","data","columns"])])),pageLeft:Se((()=>[me(n,{"checked-row-keys":$e(d),"onUpdate:checkedRowKeys":t[1]||(t[1]=e=>Pe(d)?d.value=e:null),"row-key":"ip",data:$e(p).data,options:_},null,8,["checked-row-keys","data"])])),_:1}),me(r,{show:$e(f).show,"onUpdate:show":t[2]||(t[2]=e=>$e(f).show=e),title:$e(f).title,data:$e(f).data,width:480,footer:!0,component:It},null,8,["show","title","data"])])}}}),Ht={class:"p-20px"},Mt={class:"w-280px"},Kt={class:"w-280px"},Ft={class:"w-280px"},Wt={class:"w-280px"},Yt=ve({__name:"form",props:{data:{}},setup(e,{expose:t}){const{t:l}=fe(),a=kt(),{siteName:i}=Le(a),n=e,{isEdit:o,row:r,getList:u}=n.data,s=xe(null),d=Ue({name:v(5),auth_path:"",username:"",password:""}),p={name:{required:!0,message:l("Site.Placeholder.Index_4"),trigger:["blur","input"]},auth_path:{required:!0,message:l("Site.Placeholder.Index_5"),trigger:["blur","input"]},username:{required:!0,message:l("Site.Placeholder.Index_6"),trigger:["blur","input"]},password:{required:!0,message:l("Site.Placeholder.Index_8"),trigger:["blur","input"]}};return o&&r&&(d.name=r.auth_name,d.auth_path=r.auth_path),t({onConfirm:async({hide:e})=>{await(s.value?.validate()),o?await f({...Te(d),site_name:i.value}):await b({...Te(d),site_name:i.value}),u?.(),e()}}),(e,t)=>{const l=et,a=Qe,i=ht,n=yt;return be(),ge("div",Ht,[me(i,{ref_key:"formRef",ref:s,model:$e(d),rules:p},{default:Se((()=>[me(a,{label:e.$t("Site.TableRow.index_2"),path:"name"},{default:Se((()=>[we("div",Mt,[me(l,{value:$e(d).name,"onUpdate:value":t[0]||(t[0]=e=>$e(d).name=e),disabled:$e(o),placeholder:""},null,8,["value","disabled"])])])),_:1},8,["label"]),me(a,{label:e.$t("Site.TableRow.index_15"),path:"auth_path"},{default:Se((()=>[we("div",Kt,[me(l,{value:$e(d).auth_path,"onUpdate:value":t[1]||(t[1]=e=>$e(d).auth_path=e),disabled:$e(o),placeholder:e.$t("Site.Proxy.index_42")},null,8,["value","disabled","placeholder"])])])),_:1},8,["label"]),me(a,{label:e.$t("Public.Table.Username"),path:"username"},{default:Se((()=>[we("div",Ft,[me(l,{value:$e(d).username,"onUpdate:value":t[2]||(t[2]=e=>$e(d).username=e)},null,8,["value"])])])),_:1},8,["label"]),me(a,{label:e.$t("Public.Table.Password"),path:"password"},{default:Se((()=>[we("div",Wt,[me(l,{value:$e(d).password,"onUpdate:value":t[3]||(t[3]=e=>$e(d).password=e)},null,8,["value"])])])),_:1},8,["label"])])),_:1},8,["model"]),me(n,{class:"mt-4px"},{default:Se((()=>[we("li",null,ke(e.$t("Site.Proxy.index_43")),1),we("li",null,ke(e.$t("Site.Proxy.index_44")),1)])),_:1})])}}}),Gt=ve({__name:"index",setup(e,{expose:t}){const{t:l}=fe(),{loading:i,setLoading:n}=Ie(),o=kt(),{siteName:u}=Le(o),s=async()=>{try{n(!0);const e=await $t(u.value);a(e)&&(p.data=e.basic_auth)}finally{n(!1)}};s(),t({init:s});const{keys:d,table:p,columns:c}=Ae([{key:"auth_name",title:l("Site.TableRow.index_2"),ellipsis:{tooltip:{width:"trigger"}}},{key:"auth_path",title:l("Site.TableRow.index_15"),ellipsis:{tooltip:{width:"trigger"}}},He({width:130,options:e=>[{label:l("Site.TableOP.index_7"),onClick:()=>{y(e)}},{label:l("Public.Btn.Del"),onClick:()=>{r({title:`${l("Site.Proxy.index_48")} [${e.auth_name}]`,content:l("Site.Proxy.index_49"),onConfirm:async({hide:t})=>{await g({site_name:u.value,auth_path:e.auth_path,name:e.auth_name}),s(),t()}})}}]})]),_=h(l("Site.Proxy.index_45"),{isEdit:!1,getList:s}),x=()=>{_.data.isEdit=!1,_.title=l("Site.Proxy.index_45"),_.show=!0},y=e=>{_.data.row=e,_.data.isEdit=!0,_.title=l("Site.Proxy.index_50"),_.show=!0};return(e,t)=>{const l=Ze,a=pe,n=ue,o=yt,r=m;return be(),ge("div",null,[me(n,null,{toolsLeft:Se((()=>[me(l,{type:"primary",onClick:x},{default:Se((()=>[Ce(ke(e.$t("Site.Proxy.index_45")),1)])),_:1})])),table:Se((()=>[me(a,{"checked-row-keys":$e(d),"onUpdate:checkedRowKeys":t[0]||(t[0]=e=>Pe(d)?d.value=e:null),"row-key":"name",loading:$e(i),"max-height":440,data:$e(p).data,columns:$e(c)},null,8,["checked-row-keys","loading","data","columns"])])),_:1}),me(o,{class:"mt-16px"},{default:Se((()=>[we("li",null,ke(e.$t("Site.Proxy.index_46")),1),we("li",null,ke(e.$t("Site.Proxy.index_47")),1)])),_:1}),me(r,{show:$e(_).show,"onUpdate:show":t[1]||(t[1]=e=>$e(_).show=e),title:$e(_).title,data:$e(_).data,width:480,footer:!0,component:Yt},null,8,["show","title","data"])])}}}),Jt={class:"p-20px"},Xt={key:0},Zt=ve({__name:"index",setup(e,{expose:t}){const{t:l}=fe(),i=kt(),{siteName:n}=Le(i),o=xe(null),u=Ue({switchValue:!1,inputValue:1,selectValue:"m"}),s=async()=>{const e=await $t(n.value);a(e)&&(u.switchValue=e.proxy_cache.cache_status,e.proxy_cache.expires.length>1&&(u.inputValue=Number(e.proxy_cache.expires.slice(0,-1)),u.selectValue=e.proxy_cache.expires.slice(-1)))};s(),t({init:s});const d={inputValue:{required:!0,validator(e,t){if(!t)return new Error(l("Site.Proxy.index_26"))},trigger:["input","blur"]}},p=[{label:l("Public.Unit.Minute"),value:"m"},{label:l("Public.Unit.Hour"),value:"h"},{label:l("Public.Unit.Day"),value:"d"}],c=async()=>{await(o.value?.validate());let e={site_name:n.value,cache_status:u.switchValue?1:0,expires:`${u.inputValue}${u.selectValue}`};await w(e),s()},_=()=>{const e=`${l("Site.Proxy.index_27")} [${n.value}]`;r({title:e,content:l("Site.Proxy.index_28"),onConfirm:async()=>{await S({site_name:n.value})}})};return(e,t)=>{const l=tt,a=Qe,i=at,n=it,r=lt,s=Ze,x=nt,y=ot,h=yt;return be(),ge(Re,null,[we("div",Jt,[me(x,{ref_key:"formRef",ref:o,"label-width":100,model:$e(u),rules:d,"label-placement":"left"},{default:Se((()=>[me(a,{label:e.$t("Site.Proxy.index_24")},{default:Se((()=>[me(l,{value:$e(u).switchValue,"onUpdate:value":[t[0]||(t[0]=e=>$e(u).switchValue=e),c]},null,8,["value"])])),_:1},8,["label"]),$e(u).switchValue?(be(),ge("div",Xt,[me(r,null,{default:Se((()=>[me(a,{label:e.$t("Site.Proxy.index_25"),path:"inputValue"},{default:Se((()=>[me(i,{"show-button":!1,value:$e(u).inputValue,"onUpdate:value":t[1]||(t[1]=e=>$e(u).inputValue=e)},null,8,["value"])])),_:1},8,["label"]),me(a,null,{default:Se((()=>[me(n,{class:"w-90px",value:$e(u).selectValue,"onUpdate:value":t[2]||(t[2]=e=>$e(u).selectValue=e),placeholder:e.$t("Site.Proxy.index_26"),options:p},null,8,["value","placeholder"])])),_:1})])),_:1}),me(a,{label:" "},{default:Se((()=>[me(s,{type:"primary",onClick:c},{default:Se((()=>[Ce(ke(e.$t("Site.Cert.index_60")),1)])),_:1})])),_:1})])):Ve("",!0)])),_:1},8,["model"]),me(y),me(s,{class:"mt-20px",onClick:_},{default:Se((()=>[Ce(ke(e.$t("Site.Proxy.index_27")),1)])),_:1})]),me(h,null,{default:Se((()=>[we("li",null,ke(e.$t("Site.Proxy.index_28")),1),we("li",null,ke(e.$t("Site.Proxy.index_29")),1),we("li",null,ke(e.$t("Site.Proxy.index_30")),1),we("li",null,ke(e.$t("Site.Proxy.index_31")),1),we("li",null,ke(e.$t("Site.Proxy.index_32"))+" css|js|jpg|jpeg|gif|png|webp|woff|eot|ttf|svg|ico|css.map|js.map ",1)])),_:1})],64)}}}),Qt={class:"p-20px"},el={key:0},tl=ve({__name:"index",setup(e,{expose:t}){const{t:l}=fe(),i=kt(),{siteName:n}=Le(i),o=async()=>{const e=await $t(n.value);if(a(e)){u.switchValue=e.gzip.gzip_status,u.inputType=e.gzip.gzip_types,u.selectLevel=Number(e.gzip.gzip_comp_level);let t="",l="m";e.gzip.gzip_min_length&&e.gzip.gzip_min_length.length>1&&(t=e.gzip.gzip_min_length.slice(0,-1),l=e.gzip.gzip_min_length.slice(-1)),u.inputValue=Number(t),u.selectLength=l}};o(),t({init:o});const r=xe(null),u=Ue({switchValue:!0,inputType:"",selectLevel:1,selectLength:"m",inputValue:1}),s={inputType:{required:!0,message:l("Site.Proxy.index_41"),trigger:"blur"},inputValue:{required:!0,trigger:"blur",validator:(e,t)=>{if(!t)return new Error(l("Site.Proxy.index_41"))}}},d=[{label:"k",value:"k"},{label:"m",value:"m"}],p=[{label:"1",value:1},{label:"2",value:2},{label:"3",value:3},{label:"4",value:4},{label:"5",value:5},{label:"6",value:6},{label:"7",value:7},{label:"8",value:8},{label:"9",value:9}],c=async()=>{await(r.value?.validate());let e={site_name:n.value,gzip_status:u.switchValue?1:0,gzip_min_length:`${u.inputValue}${u.selectLength}`,gzip_comp_level:u.selectLevel,gzip_types:u.inputType};await k(e),o()};return(e,t)=>{const l=tt,a=Qe,i=et,n=it,o=at,_=lt,x=Ze,y=nt,h=yt;return be(),ge("div",Qt,[me(y,{ref_key:"formRef",ref:r,"label-width":150,model:$e(u),rules:s,"label-placement":"left"},{default:Se((()=>[me(a,{label:e.$t("Site.Proxy.index_34")},{default:Se((()=>[me(l,{value:$e(u).switchValue,"onUpdate:value":[t[0]||(t[0]=e=>$e(u).switchValue=e),c]},null,8,["value"])])),_:1},8,["label"]),$e(u).switchValue?(be(),ge("div",el,[me(a,{label:e.$t("Site.Proxy.index_35"),path:"inputType"},{default:Se((()=>[me(i,{value:$e(u).inputType,"onUpdate:value":t[1]||(t[1]=e=>$e(u).inputType=e),type:"textarea",placeholder:"Please input"},null,8,["value"])])),_:1},8,["label"]),me(a,{label:e.$t("Site.Proxy.index_36")},{default:Se((()=>[me(n,{value:$e(u).selectLevel,"onUpdate:value":t[2]||(t[2]=e=>$e(u).selectLevel=e),options:p},null,8,["value"])])),_:1},8,["label"]),me(_,null,{default:Se((()=>[me(a,{label:e.$t("Site.Proxy.index_37"),path:"inputValue"},{default:Se((()=>[me(o,{"show-button":!1,value:$e(u).inputValue,"onUpdate:value":t[3]||(t[3]=e=>$e(u).inputValue=e)},null,8,["value"])])),_:1},8,["label"]),me(a,null,{default:Se((()=>[me(n,{class:"w-90px",value:$e(u).selectLength,"onUpdate:value":t[4]||(t[4]=e=>$e(u).selectLength=e),options:d},null,8,["value"])])),_:1})])),_:1}),me(a,{label:" "},{default:Se((()=>[me(x,{type:"primary",onClick:c},{default:Se((()=>[Ce(ke(e.$t("Site.Cert.index_60")),1)])),_:1})])),_:1})])):Ve("",!0)])),_:1},8,["model"]),me(h,null,{default:Se((()=>[we("li",null,ke(e.$t("Site.Proxy.index_38")),1),we("li",null,ke(e.$t("Site.Proxy.index_39")),1),we("li",null,ke(e.$t("Site.Proxy.index_40")),1)])),_:1})])}}}),ll={class:"p-20px"},al=ve({__name:"index",setup(e,{expose:t}){const{t:l}=fe(),i=kt(),{siteName:n}=Le(i),o=async()=>{const e=await $t(n.value);a(e)&&(u.selectValue=e.proxy_log.log_type,u.inputValue=e.proxy_log.rsyslog_host,u.unx=e.proxy_log.log_path)};o(),t({init:o});const r=xe(null),u=Ue({inputValue:"",selectValue:"default",unx:""}),s={inputValue:{required:!0,message:l("Site.Proxy.index_41"),trigger:"blur"},unx:{required:!0,message:l("Site.Proxy.index_41"),trigger:["blur","input"]}},d=[{label:l("Site.Proxy.index_54"),value:"default"},{label:l("Site.Proxy.index_55"),value:"off"},{label:l("Site.Proxy.index_56"),value:"file"},{label:l("Site.Proxy.index_57"),value:"rsyslog"}],p=async()=>{await(r.value?.validate());let e={site_name:n.value,log_type:u.selectValue,log_path:"file"===u.selectValue?u.unx:"rsyslog"===u.selectValue?u.inputValue:""};await P(e),o()};return(e,t)=>{const l=it,a=Qe,i=mt,n=et,o=Ze,c=nt;return be(),ge("div",ll,[me(c,{ref_key:"formRef",ref:r,"label-width":150,model:$e(u),rules:s,"label-placement":"left"},{default:Se((()=>[me(a,{label:e.$t("Site.Proxy.index_51")},{default:Se((()=>[me(l,{class:"w-300px",value:$e(u).selectValue,"onUpdate:value":t[0]||(t[0]=e=>$e(u).selectValue=e),options:d},null,8,["value"])])),_:1},8,["label"]),"file"==$e(u).selectValue?(be(),je(a,{key:0,label:e.$t("Site.Proxy.index_52"),path:"unx"},{default:Se((()=>[me(i,{class:"w-400px","checked-type":["dir"],value:$e(u).unx,"onUpdate:value":t[1]||(t[1]=e=>$e(u).unx=e)},null,8,["value"])])),_:1},8,["label"])):Ve("",!0),"rsyslog"==$e(u).selectValue?(be(),je(a,{key:1,label:e.$t("Site.Proxy.index_53"),path:"inputValue"},{default:Se((()=>[me(n,{class:"w-300px!",value:$e(u).inputValue,"onUpdate:value":t[2]||(t[2]=e=>$e(u).inputValue=e),placeholder:e.$t("Site.Proxy.index_41")},null,8,["value","placeholder"])])),_:1},8,["label"])):Ve("",!0),me(a,{label:" "},{default:Se((()=>[me(o,{type:"primary",onClick:p},{default:Se((()=>[Ce(ke(e.$t("Site.Cert.index_60")),1)])),_:1})])),_:1})])),_:1},8,["model"])])}}}),il={class:"p-20px"},nl=ve({__name:"index",setup(e,{expose:t}){const l=kt(),{siteName:i}=Le(l),n=async()=>{const e=await $t(i.value);a(e)&&(r.switchValue=e.websocket.websocket_status)};n(),t({init:n});const o=xe(null),r=Ue({switchValue:!1}),u=async()=>{await(o.value?.validate()),$({site_name:i.value,websocket_status:r.switchValue?1:0})};return(e,t)=>{const l=tt,a=Qe,i=nt;return be(),ge("div",il,[me(i,{ref_key:"formRef",ref:o,"label-width":150,model:$e(r),"label-placement":"left"},{default:Se((()=>[me(a,{label:e.$t("Site.Proxy.index_58")},{default:Se((()=>[me(l,{value:$e(r).switchValue,"onUpdate:value":[t[0]||(t[0]=e=>$e(r).switchValue=e),u]},null,8,["value"])])),_:1},8,["label"])])),_:1},8,["model"])])}}}),ol=ve({__name:"index",setup(e){const{t:t}=fe(),l=xe("cache"),a=[{key:"cache",label:t("Site.Lable.index_31"),component:Zt},{key:"compressed",label:t("Site.Proxy.index_61"),component:tl},{key:"black",label:t("Site.Proxy.index_62"),component:At},{key:"white",label:t("Site.Proxy.index_63"),component:Ot},{key:"http",label:t("Site.Proxy.index_64"),component:Gt},{key:"log",label:t("Site.Proxy.index_51"),component:al},{key:"websocket",label:t("Site.Proxy.index_65"),component:nl}];return(e,t)=>{const i=xt;return be(),je(i,{value:$e(l),"onUpdate:value":t[0]||(t[0]=e=>Pe(l)?l.value=e:null),options:a},null,8,["value"])}}});var rl,ul={exports:{}},sl=(rl||(rl=1,function(e){var t;t=function(){return function(){var e={686:function(e,t,l){l.d(t,{default:function(){return w}});var a=l(279),i=l.n(a),n=l(370),o=l.n(n),r=l(817),u=l.n(r);function s(e){try{return document.execCommand(e)}catch(t){return!1}}var d=function(e){var t=u()(e);return s("cut"),t},p=function(e,t){var l=function(e){var t="rtl"===document.documentElement.getAttribute("dir"),l=document.createElement("textarea");l.style.fontSize="12pt",l.style.border="0",l.style.padding="0",l.style.margin="0",l.style.position="absolute",l.style[t?"right":"left"]="-9999px";var a=window.pageYOffset||document.documentElement.scrollTop;return l.style.top="".concat(a,"px"),l.setAttribute("readonly",""),l.value=e,l}(e);t.container.appendChild(l);var a=u()(l);return s("copy"),l.remove(),a},c=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{container:document.body},l="";return"string"==typeof e?l=p(e,t):e instanceof HTMLInputElement&&!["text","search","url","tel","password"].includes(null==e?void 0:e.type)?l=p(e.value,t):(l=u()(e),s("copy")),l};function _(e){return _="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_(e)}var x=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.action,l=void 0===t?"copy":t,a=e.container,i=e.target,n=e.text;if("copy"!==l&&"cut"!==l)throw new Error('Invalid "action" value, use either "copy" or "cut"');if(void 0!==i){if(!i||"object"!==_(i)||1!==i.nodeType)throw new Error('Invalid "target" value, use a valid Element');if("copy"===l&&i.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if("cut"===l&&(i.hasAttribute("readonly")||i.hasAttribute("disabled")))throw new Error('Invalid "target" attribute. You can\'t cut text from elements with "readonly" or "disabled" attributes')}return n?c(n,{container:a}):i?"cut"===l?d(i):c(i,{container:a}):void 0};function y(e){return y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},y(e)}function h(e,t){for(var l=0;l<t.length;l++){var a=t[l];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}function m(e,t){return m=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},m(e,t)}function v(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var l,a,i,n=f(e);if(t){var o=f(this).constructor;l=Reflect.construct(n,arguments,o)}else l=n.apply(this,arguments);return a=this,!(i=l)||"object"!==y(i)&&"function"!=typeof i?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(a):i}}function f(e){return f=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},f(e)}function b(e,t){var l="data-clipboard-".concat(e);if(t.hasAttribute(l))return t.getAttribute(l)}var g=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&m(e,t)}(n,e);var t,l,a,i=v(n);function n(e,t){var l;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),(l=i.call(this)).resolveOptions(t),l.listenClick(e),l}return t=n,l=[{key:"resolveOptions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.action="function"==typeof e.action?e.action:this.defaultAction,this.target="function"==typeof e.target?e.target:this.defaultTarget,this.text="function"==typeof e.text?e.text:this.defaultText,this.container="object"===y(e.container)?e.container:document.body}},{key:"listenClick",value:function(e){var t=this;this.listener=o()(e,"click",(function(e){return t.onClick(e)}))}},{key:"onClick",value:function(e){var t=e.delegateTarget||e.currentTarget,l=this.action(t)||"copy",a=x({action:l,container:this.container,target:this.target(t),text:this.text(t)});this.emit(a?"success":"error",{action:l,text:a,trigger:t,clearSelection:function(){t&&t.focus(),window.getSelection().removeAllRanges()}})}},{key:"defaultAction",value:function(e){return b("action",e)}},{key:"defaultTarget",value:function(e){var t=b("target",e);if(t)return document.querySelector(t)}},{key:"defaultText",value:function(e){return b("text",e)}},{key:"destroy",value:function(){this.listener.destroy()}}],a=[{key:"copy",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{container:document.body};return c(e,t)}},{key:"cut",value:function(e){return d(e)}},{key:"isSupported",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["copy","cut"],t="string"==typeof e?[e]:e,l=!!document.queryCommandSupported;return t.forEach((function(e){l=l&&!!document.queryCommandSupported(e)})),l}}],l&&h(t.prototype,l),a&&h(t,a),n}(i()),w=g},828:function(e){if("undefined"!=typeof Element&&!Element.prototype.matches){var t=Element.prototype;t.matches=t.matchesSelector||t.mozMatchesSelector||t.msMatchesSelector||t.oMatchesSelector||t.webkitMatchesSelector}e.exports=function(e,t){for(;e&&9!==e.nodeType;){if("function"==typeof e.matches&&e.matches(t))return e;e=e.parentNode}}},438:function(e,t,l){var a=l(828);function i(e,t,l,a,i){var o=n.apply(this,arguments);return e.addEventListener(l,o,i),{destroy:function(){e.removeEventListener(l,o,i)}}}function n(e,t,l,i){return function(l){l.delegateTarget=a(l.target,t),l.delegateTarget&&i.call(e,l)}}e.exports=function(e,t,l,a,n){return"function"==typeof e.addEventListener?i.apply(null,arguments):"function"==typeof l?i.bind(null,document).apply(null,arguments):("string"==typeof e&&(e=document.querySelectorAll(e)),Array.prototype.map.call(e,(function(e){return i(e,t,l,a,n)})))}},879:function(e,t){t.node=function(e){return void 0!==e&&e instanceof HTMLElement&&1===e.nodeType},t.nodeList=function(e){var l=Object.prototype.toString.call(e);return void 0!==e&&("[object NodeList]"===l||"[object HTMLCollection]"===l)&&"length"in e&&(0===e.length||t.node(e[0]))},t.string=function(e){return"string"==typeof e||e instanceof String},t.fn=function(e){return"[object Function]"===Object.prototype.toString.call(e)}},370:function(e,t,l){var a=l(879),i=l(438);e.exports=function(e,t,l){if(!e&&!t&&!l)throw new Error("Missing required arguments");if(!a.string(t))throw new TypeError("Second argument must be a String");if(!a.fn(l))throw new TypeError("Third argument must be a Function");if(a.node(e))return function(e,t,l){return e.addEventListener(t,l),{destroy:function(){e.removeEventListener(t,l)}}}(e,t,l);if(a.nodeList(e))return function(e,t,l){return Array.prototype.forEach.call(e,(function(e){e.addEventListener(t,l)})),{destroy:function(){Array.prototype.forEach.call(e,(function(e){e.removeEventListener(t,l)}))}}}(e,t,l);if(a.string(e))return function(e,t,l){return i(document.body,e,t,l)}(e,t,l);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList")}},817:function(e){e.exports=function(e){var t;if("SELECT"===e.nodeName)e.focus(),t=e.value;else if("INPUT"===e.nodeName||"TEXTAREA"===e.nodeName){var l=e.hasAttribute("readonly");l||e.setAttribute("readonly",""),e.select(),e.setSelectionRange(0,e.value.length),l||e.removeAttribute("readonly"),t=e.value}else{e.hasAttribute("contenteditable")&&e.focus();var a=window.getSelection(),i=document.createRange();i.selectNodeContents(e),a.removeAllRanges(),a.addRange(i),t=a.toString()}return t}},279:function(e){function t(){}t.prototype={on:function(e,t,l){var a=this.e||(this.e={});return(a[e]||(a[e]=[])).push({fn:t,ctx:l}),this},once:function(e,t,l){var a=this;function i(){a.off(e,i),t.apply(l,arguments)}return i._=t,this.on(e,i,l)},emit:function(e){for(var t=[].slice.call(arguments,1),l=((this.e||(this.e={}))[e]||[]).slice(),a=0,i=l.length;a<i;a++)l[a].fn.apply(l[a].ctx,t);return this},off:function(e,t){var l=this.e||(this.e={}),a=l[e],i=[];if(a&&t)for(var n=0,o=a.length;n<o;n++)a[n].fn!==t&&a[n].fn._!==t&&i.push(a[n]);return i.length?l[e]=i:delete l[e],this}},e.exports=t,e.exports.TinyEmitter=t}},t={};function l(a){if(t[a])return t[a].exports;var i=t[a]={exports:{}};return e[a](i,i.exports,l),i.exports}return l.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return l.d(t,{a:t}),t},l.d=function(e,t){for(var a in t)l.o(t,a)&&!l.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},l.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},l(686)}().default},e.exports=t()}(ul)),ul.exports);
/*!
* clipboard.js v2.0.11
* https://clipboardjs.com/
*
* Licensed MIT © Zeno Rocha
*/const dl=ft(sl),pl=e=>({toClipboard:(e,t)=>new Promise(((l,a)=>{const i=document.createElement("button"),n=new dl(i,{text:()=>e,action:()=>"copy",container:void 0!==t?t:document.body});n.on("success",(e=>{n.destroy(),l(e)})),n.on("error",(e=>{n.destroy(),a(e)})),document.body.appendChild(i),i.click(),document.body.removeChild(i)}))}),cl={class:"mb-10px"},_l=ve({__name:"index",setup(e,{expose:t}){const{t:l}=fe(),{data:i}=Lt(),n=xe(""),o=xe(""),r=xe({readOnly:!0}),{toClipboard:u}=pl();let s=xe();const d=async()=>{(async()=>{const{message:e}=await C({site_name:i.name});a(e)&&(o.value=e.site_conf)})()};return Ee((()=>{d()})),t({init:d}),(e,t)=>{const a=Ze;return be(),ge(Re,null,[we("div",cl,ke(e.$t("Site.Proxy.index_73")),1),me(vt,{path:$e(n),"onUpdate:path":t[0]||(t[0]=e=>Pe(n)?n.value=e:null),value:$e(o),"onUpdate:value":t[1]||(t[1]=e=>Pe(o)?o.value=e:null),config:$e(r),height:530,readOnly:!0,"show-tips":!1},null,8,["path","value","config"]),me(a,{class:"mt-10px",ref_key:"copyBtn",ref:s,onClick:t[2]||(t[2]=e=>(async e=>{try{await u(e,s.value.$el),p.success(l("Site.Cert.index_1"))}catch(t){console.error(t),p.success(l("Site.Cert.index_2"))}})($e(o)))},{default:Se((()=>[Ce(ke(e.$t("Public.Btn.Copy")),1)])),_:1},512)],64)}}}),xl={key:0},yl={href:"https://nginx.org/en/docs/http/ngx_http_core_module.html#server",target:"_blank",class:"text-#20a53a"},hl={key:1},ml={href:"https://nginx.org/en/docs/http/ngx_http_core_module.html#http",target:"_blank",class:"text-#20a53a"},vl=ve({__name:"index",setup(e,{expose:t}){const{t:l}=fe(),{data:i}=Lt(),n=xe(""),o=xe(""),r=xe("server_block"),u=[{value:"server_block",label:"server"},{value:"http_block",label:"http"}],s=async()=>{await L({site_name:i.name,conf_type:r.value,body:o.value}),_()},{toClipboard:d}=pl();let c=xe();const _=async()=>{(async()=>{const{message:e}=await C({site_name:i.name});a(e)&&(o.value=e[r.value])})()};return Ee((()=>{_()})),t({init:_}),(e,t)=>{const a=it,i=lt,x=Ze,y=yt;return be(),ge(Re,null,[me(i,{class:"items-center mb-10px"},{default:Se((()=>[Ce(ke(e.$t("Site.Proxy.index_68"))+" ",1),me(a,{class:"w-200px",value:$e(r),"onUpdate:value":[t[0]||(t[0]=e=>Pe(r)?r.value=e:null),_],options:u},null,8,["value"])])),_:1}),me(vt,{path:$e(n),"onUpdate:path":t[1]||(t[1]=e=>Pe(n)?n.value=e:null),value:$e(o),"onUpdate:value":t[2]||(t[2]=e=>Pe(o)?o.value=e:null),config:u,height:400,"show-tips":!1},null,8,["path","value"]),me(i,{class:"mt-10px mb-10px"},{default:Se((()=>[me(x,{type:"primary",onClick:s},{default:Se((()=>[Ce(ke(e.$t("Site.Cert.index_60")),1)])),_:1}),me(x,{ref_key:"copyBtn",ref:c,onClick:t[3]||(t[3]=e=>(async e=>{try{await d(e,c.value.$el),p.success(l("Site.Cert.index_1"))}catch(t){console.error(t),p.success(l("Site.Cert.index_2"))}})($e(o)))},{default:Se((()=>[Ce(ke(e.$t("Public.Btn.Copy")),1)])),_:1},512)])),_:1}),me(y,null,{default:Se((()=>[we("li",null,ke(e.$t("Site.Proxy.index_69")),1),we("li",null,ke(e.$t("Site.Proxy.index_70")),1),"server_block"==$e(r)?(be(),ge("li",xl,[Ce(ke(e.$t("Site.Proxy.index_71"))+" ",1),we("a",yl,ke(e.$t("Site.Proxy.index_72")),1)])):(be(),ge("li",hl,[Ce(ke(e.$t("Site.Proxy.index_71"))+" ",1),we("a",ml,ke(e.$t("Site.Proxy.index_72")),1)]))])),_:1})],64)}}}),fl=ve({__name:"index",setup(e){const{t:t}=fe(),l=xe("main"),a=[{key:"main",label:t("Site.Proxy.index_66"),component:_l},{key:"customize",label:t("Site.Proxy.index_67"),component:vl}];return(e,t)=>{const i=xt;return be(),je(i,{value:$e(l),"onUpdate:value":t[0]||(t[0]=e=>Pe(l)?l.value=e:null),options:a},null,8,["value"])}}}),bl={class:"px-20px py-24px"},gl={class:"w-120px"},wl={class:"w-120px"},Sl={class:"w-200px"},kl={class:"w-200px"},Pl={class:"w-200px"},$l=ve({__name:"form",props:{data:{}},setup(e,{expose:t}){const{t:l}=fe(),i=e,{isEdit:n,siteId:o,siteName:r,row:u,getList:p}=i.data,c=xe(null),_=Ue({redirectname:`${(new Date).valueOf()}`,type:1,holdpath:1,domainorpath:"domain",redirecttype:"301",redirectpath:"",redirectdomain:[],tourl:"http://"}),x={redirectdomain:{trigger:["change"],validator:()=>0!==_.redirectdomain.length||new Error(l("Site.RulesError.index_23"))},redirectpath:{trigger:["blur","input"],validator:()=>""!==_.redirectpath.trim()||new Error(l("Site.RulesError.index_24"))},tourl:{trigger:["blur","input"],validator:()=>""!==_.tourl.trim()||new Error("Site.RulesError.index_25")}},y=[{label:"Domain name",value:"domain"},{label:"Path",value:"path"}],h=[{label:"301",value:"301"},{label:"302",value:"302"}],m=xe([]),v=()=>{_.redirectdomain=[],_.redirectpath=""},{loading:f,setLoading:b}=Ie();return n&&u&&(_.redirectname=u.redirectname,_.type=u.type,_.holdpath=u.holdpath,_.redirecttype=u.redirecttype,_.redirectpath=u.redirectpath,_.domainorpath=u.domainorpath,_.redirectdomain=u.redirectdomain,_.tourl=u.tourl),(async()=>{try{b(!0);const{message:e}=await s({site_name:r,id:o});a(e)&&(m.value=d(e.domain_list)?e.domain_list.map((e=>({label:e.name,value:e.name}))):[])}finally{b(!1)}})(),t({onConfirm:async({hide:e})=>{await(c.value?.validate());const t={...Te(_),site_name:r};n?await T(t):await U(t),p?.(),e()}}),(e,t)=>{const l=tt,a=Qe,i=lt,n=it,o=et,r=ht,u=yt;return be(),ge("div",bl,[me(r,{ref_key:"formRef",ref:c,model:$e(_),rules:x},{default:Se((()=>[me(i,{size:60},{default:Se((()=>[me(a,{label:e.$t("Site.Lable.index_34")},{default:Se((()=>[me(l,{value:$e(_).type,"onUpdate:value":t[0]||(t[0]=e=>$e(_).type=e),"checked-value":1,"unchecked-value":0},null,8,["value"])])),_:1},8,["label"]),me(a,{label:e.$t("Site.TableRow.index_13"),"label-width":"120"},{default:Se((()=>[me(l,{value:$e(_).holdpath,"onUpdate:value":t[1]||(t[1]=e=>$e(_).holdpath=e),"checked-value":1,"unchecked-value":0},null,8,["value"])])),_:1},8,["label"])])),_:1}),me(i,{size:30},{default:Se((()=>[me(a,{label:e.$t("Site.TableRow.index_11")},{default:Se((()=>[we("div",gl,[me(n,{value:$e(_).domainorpath,"onUpdate:value":[t[2]||(t[2]=e=>$e(_).domainorpath=e),v],options:y},null,8,["value"])])])),_:1},8,["label"]),me(a,{label:e.$t("Site.TableRow.index_12"),"label-width":"70"},{default:Se((()=>[we("div",wl,[me(n,{value:$e(_).redirecttype,"onUpdate:value":t[3]||(t[3]=e=>$e(_).redirecttype=e),options:h},null,8,["value"])])])),_:1},8,["label"])])),_:1}),"domain"===$e(_).domainorpath?(be(),je(a,{key:0,label:e.$t("Site.Lable.index_32"),path:"redirectdomain"},{default:Se((()=>[we("div",Sl,[me(n,{value:$e(_).redirectdomain,"onUpdate:value":t[4]||(t[4]=e=>$e(_).redirectdomain=e),multiple:!0,loading:$e(f),options:$e(m),"max-tag-count":"responsive",placeholder:"Select domain"},null,8,["value","loading","options"])])])),_:1},8,["label"])):Ve("",!0),"path"===$e(_).domainorpath?(be(),je(a,{key:1,label:e.$t("Site.Lable.index_30"),path:"redirectpath"},{default:Se((()=>[we("div",kl,[me(o,{value:$e(_).redirectpath,"onUpdate:value":t[5]||(t[5]=e=>$e(_).redirectpath=e),placeholder:""},null,8,["value"])])])),_:1},8,["label"])):Ve("",!0),me(a,{label:e.$t("Site.Lable.index_33"),path:"tourl"},{default:Se((()=>[we("div",Pl,[me(o,{value:$e(_).tourl,"onUpdate:value":t[6]||(t[6]=e=>$e(_).tourl=e),placeholder:""},null,8,["value"])])])),_:1},8,["label"])])),_:1},8,["model"]),me(u,{class:"mt-12px"},{default:Se((()=>[we("li",null,ke(e.$t("Site.Config.index_77")),1),we("li",null,ke(e.$t("Site.Config.index_78")),1),we("li",null,ke(e.$t("Site.Config.index_79")),1),we("li",null,ke(e.$t("Site.Config.index_80")),1),we("li",null,ke(e.$t("Site.Config.index_81")),1),we("li",null,ke(e.$t("Site.Config.index_82")),1)])),_:1})])}}}),Cl={class:"p-20px"},Ll={class:"mt-12px"},Ul=ve({__name:"config",props:{data:{}},emits:["close"],setup(e,{emit:t}){const l=e,{row:i,getList:n}=l.data,o=t,r=xe(""),u=xe(""),s=async()=>{const{message:e}=await R({path:i.redirect_conf_file,data:r.value,encoding:u.value});a(e)&&p.success(e.msg),n?.(),o("close")};return(async()=>{const{message:e}=await V({path:i.redirect_conf_file});a(e)&&(r.value=e.data,u.value=e.encoding)})(),(e,t)=>{const l=Ze,a=yt;return be(),ge("div",Cl,[me(vt,{value:$e(r),"onUpdate:value":t[0]||(t[0]=e=>Pe(r)?r.value=e:null),height:350,"show-tips":!0},null,8,["value"]),we("div",Ll,[me(l,{type:"primary",onClick:s},{default:Se((()=>[Ce(ke(e.$t("Site.Cert.index_60")),1)])),_:1})]),me(a,{class:"mt-24px"},{default:Se((()=>[we("li",null,ke(e.$t("Site.Config.index_83")),1)])),_:1})])}}}),Tl=ve({__name:"index",setup(e,{expose:t}){const{t:l}=fe(),{data:a}=Lt(),i=e=>({site_name:e.sitename,redirectname:e.redirectname,tourl:e.tourl,redirectdomain:e.redirectdomain,redirectpath:e.redirectpath,redirecttype:e.redirecttype,domainorpath:e.domainorpath}),{keys:n,table:o,columns:u}=Ae([{title:l("Site.TableRow.index_9"),key:"name",ellipsis:{tooltip:{width:"trigger"}},render:e=>"domain"===e.domainorpath&&e.redirectdomain.length?e.redirectdomain.join("、"):e.redirectpath},{title:l("Site.TableRow.index_11"),key:"name",width:90,render:e=>"domain"===e.domainorpath?"Domain":"Approach"},{key:"tourl",title:l("Site.TableRow.index_10"),width:140},{key:"type",title:l("Site.TableRow.index_14"),width:100,render:e=>me(Me,{value:e.type,"checked-value":1,"unchecked-value":0,"checked-title":"Running","unchecked-title":"Paused",onClick:async t=>{await T({...i(e),type:t,holdpath:e.holdpath,errorpage:0}),e.type=t}},null)},He({width:120,options:e=>[{label:l("Site.TableOP.index_2"),onClick:()=>{f(e)}},{label:l("Site.TableOP.index_7"),onClick:()=>{y(e)}},{label:l("Public.Btn.Del"),onClick:()=>{r({title:`${l("Site.Batch.index_14")} [${e.redirectname}]`,content:l("Site.Batch.index_15"),onConfirm:async({hide:t})=>{await j({site_name:a.name,redirectname:e.redirectname}),c(),t()}})}}]})]),{loading:s,setLoading:p}=Ie(),c=async()=>{try{p(!0);const{message:e}=await E({sitename:a.name});o.data=d(e)?e:[]}finally{n.value=[],p(!1)}},_=h(l("Site.Config.index_74"),{row:void 0,siteId:a.id,siteName:a.name,isEdit:!1,getList:c}),x=()=>{_.data.row=void 0,_.data.isEdit=!1,_.title=l("Site.Config.index_74"),_.show=!0},y=e=>{_.data.row=e,_.data.isEdit=!0,_.title=`${l("Site.Config.index_75")} [${e.redirectname}]`,_.show=!0},v=h("",{row:void 0,siteName:a.name,getList:c}),f=e=>{v.data.row=e,v.title=`${l("Site.Config.index_76")} [${e.redirectname}]`,v.show=!0};return c(),t({init:c}),(e,t)=>{const l=Ze,a=pe,i=ue,r=yt,d=m;return be(),ge("div",null,[me(i,null,{toolsLeft:Se((()=>[me(l,{type:"primary",onClick:x},{default:Se((()=>[Ce(ke(e.$t("Site.Config.index_73")),1)])),_:1})])),table:Se((()=>[me(a,{"checked-row-keys":$e(n),"onUpdate:checkedRowKeys":t[0]||(t[0]=e=>Pe(n)?n.value=e:null),"row-key":"redirectname",loading:$e(s),"max-height":440,data:$e(o).data,columns:$e(u)},null,8,["checked-row-keys","loading","data","columns"])])),_:1}),me(r,{class:"mt-20px"},{default:Se((()=>[we("li",null,ke(e.$t("Site.Config.index_84")),1)])),_:1}),me(d,{show:$e(_).show,"onUpdate:show":t[1]||(t[1]=e=>$e(_).show=e),title:$e(_).title,data:$e(_).data,width:660,footer:!0,component:$l},null,8,["show","title","data"]),me(d,{show:$e(v).show,"onUpdate:show":t[2]||(t[2]=e=>$e(v).show=e),title:$e(v).title,data:$e(v).data,width:580,component:Ul},null,8,["show","title","data"])])}}}),Vl={class:"m-15px"},Rl={class:"list-none!"},jl={class:"list-none!"},El={class:"list-none!"},zl=ve({__name:"form",props:{data:{}},setup(e,{expose:t}){const{t:l}=fe(),a=e,{getList:i,siteName:n}=a.data,o=()=>{"2"===c.proxy_type?c.proxy_host="$http_host":c.proxy_host=""},r=e=>{if("2"===c.proxy_type)return void(c.proxy_host="$http_host");let t=e.replace(/^http[s]?:\/\//,"");t=t.replace(/(:|\?|\/|\\)(.*)$/,""),u.value||(c.proxy_host=t)},u=xe(!1),s=()=>{c.proxy_host&&"$http_host"!==c.proxy_host&&(u.value=!0)},d=xe(null),p=[{label:l("Site.Proxy.index_11"),value:"1"},{label:l("Site.Proxy.index_12"),value:"2"}],c=Ue({proxy_path:"",proxy_type:"1",url:"http://",unx:"",proxy_host:"$http_host",remark:"",keepuri:1,rewrite:[{key:"",value:""}]}),_=xe([{key:"",value:""}]),x={proxy_path:{required:!0,trigger:["blur","change"],validator:(e,t)=>{if(""===t.trim())return new Error(l("Site.RulesError.index_33"))}},url:{required:!0,trigger:["blur","change"],validator:(e,t)=>{if(!t.replace(/^http[s]?:\/\//,""))return new Error(l("Site.Proxy.index_14"));const a=/^(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])$/;let i=t.replace(/^http[s]?:\/\//,"");return i=i.replace(/(:|\?|\/|\\)(.*)$/,""),u.value||(a.test(i)?c.proxy_host="$http_host":c.proxy_host=i),!0}},unx:{required:!0,message:l("Site.PHP.add_site_26"),trigger:["blur","change"]},proxy_host:{required:!0,message:l("Site.PHP.add_site_26"),trigger:["blur","change"]}};return t({onConfirm:async()=>{await(d.value?.validate());const e=_.value.filter((e=>""!==e.key||""!==e.value)).map((e=>({dir1:e.key,dir2:e.value})));let t={keepuri:c.keepuri,site_name:n,remark:c.remark,proxy_type:"1"==c.proxy_type?"http":"unix",proxy_pass:"1"==c.proxy_type?c.url:c.unx,proxy_path:c.proxy_path,proxy_host:c.proxy_host,rewritedir:JSON.stringify(e)};await z(t),i?.()}}),(e,t)=>{const l=tt,a=Qe,i=et,n=it,u=mt,y=lt,h=rt,m=ut,v=ht,f=yt;return be(),ge("div",Vl,[me(v,{ref_key:"formRef",ref:d,model:$e(c),rules:x},{default:Se((()=>["1"==$e(c).proxy_type?(be(),je(a,{key:0,label:"Show Proxy Path"},{default:Se((()=>[me(l,{value:$e(c).keepuri,"onUpdate:value":t[0]||(t[0]=e=>$e(c).keepuri=e),"checked-value":1,"unchecked-value":0},null,8,["value"])])),_:1})):Ve("",!0),me(a,{label:e.$t("Site.TableRow.index_32"),path:"proxy_path",class:"w-570px"},{default:Se((()=>[me(i,{value:$e(c).proxy_path,"onUpdate:value":t[1]||(t[1]=e=>$e(c).proxy_path=e),placeholder:e.$t("Site.Placeholder.Index_9")},null,8,["value","placeholder"])])),_:1},8,["label"]),me(y,null,{default:Se((()=>[me(a,{label:e.$t("Site.Proxy.index_1")},{default:Se((()=>[me(n,{value:$e(c).proxy_type,"onUpdate:value":[t[2]||(t[2]=e=>$e(c).proxy_type=e),o],options:p,class:"w-120px"},null,8,["value"])])),_:1},8,["label"]),"1"==$e(c).proxy_type?(be(),je(a,{key:0,path:"url",class:"w-310px"},{default:Se((()=>[me(i,{value:$e(c).url,"onUpdate:value":t[3]||(t[3]=e=>$e(c).url=e),onInput:r},null,8,["value"])])),_:1})):(be(),je(a,{key:1,path:"unx",class:"w-310px"},{default:Se((()=>[me(u,{"checked-type":["dir","file"],value:$e(c).unx,"onUpdate:value":t[4]||(t[4]=e=>$e(c).unx=e),onChange:r},null,8,["value"])])),_:1}))])),_:1}),me(a,{label:e.$t("Site.Proxy.index_2"),path:"proxy_host",class:"w-570px"},{default:Se((()=>[me(h,{trigger:"hover"},{trigger:Se((()=>[me(i,{value:$e(c).proxy_host,"onUpdate:value":t[5]||(t[5]=e=>$e(c).proxy_host=e),onBlur:s},null,8,["value"])])),default:Se((()=>[Ce(" "+ke(e.$t("Site.Proxy.index_75")),1)])),_:1})])),_:1},8,["label"]),"1"==$e(c).proxy_type?(be(),je(a,{key:1,label:"URL Rewrite"},{default:Se((()=>[me(m,{class:"w-440px",min:1,value:$e(_),"onUpdate:value":t[6]||(t[6]=e=>Pe(_)?_.value=e:null),preset:"pair","key-placeholder":"/aaa","value-placeholder":"/bbb"},null,8,["value"])])),_:1})):Ve("",!0),me(a,{label:e.$t("Site.Proxy.index_3"),class:"w-570px"},{default:Se((()=>[me(i,{value:$e(c).remark,"onUpdate:value":t[7]||(t[7]=e=>$e(c).remark=e),placeholder:e.$t("Site.Proxy.index_5")},null,8,["value","placeholder"])])),_:1},8,["label"])])),_:1},8,["model"]),me(f,{class:"mt-16px"},{default:Se((()=>[we("li",null,ke(e.$t("Site.Proxy.index_76")),1),we("li",null,ke(e.$t("Site.Proxy.index_77")),1),we("li",Rl,ke(e.$t("Site.Proxy.index_78")),1),we("li",jl,ke(e.$t("Site.Proxy.index_79")),1),we("li",El,ke(e.$t("Site.Proxy.index_80")),1)])),_:1})])}}}),Nl={class:"p-20px"},Bl={class:"w-280px"},Ol=ve({__name:"form",props:{data:{}},setup(e,{expose:t}){const{t:l}=fe(),a=kt(),{siteName:i,proxyPath:n}=Le(a),o=e,{getList:r}=o.data,u=xe(null),s=Ue({name:""}),d={name:{required:!0,message:l("Site.Proxy.index_20"),trigger:["blur","input"]}};return t({onConfirm:async({hide:e})=>{await(u.value?.validate()),await N({site_name:i.value,proxy_path:n.value,ip_type:"white",ips:s.name}),r?.(),e()}}),(e,t)=>{const l=et,a=Qe,i=ht,n=yt;return be(),ge("div",Nl,[me(i,{ref_key:"formRef",ref:u,model:$e(s),rules:d},{default:Se((()=>[me(a,{label:e.$t("Site.Proxy.index_18"),path:"name"},{default:Se((()=>[we("div",Bl,[me(l,{type:"textarea",value:$e(s).name,"onUpdate:value":t[0]||(t[0]=e=>$e(s).name=e),placeholder:e.$t("Site.Proxy.index_20")},null,8,["value","placeholder"])])])),_:1},8,["label"])])),_:1},8,["model"]),me(n,{class:"mt-4px"},{default:Se((()=>[we("li",null,ke(e.$t("Site.Proxy.index_19")),1)])),_:1})])}}}),ql=ve({__name:"index",setup(e,{expose:t}){const{t:l}=fe(),{loading:i,setLoading:n}=Ie(),o=kt(),{siteName:u,proxyPath:s}=Le(o),d=async()=>{try{n(!0);const e=await Ct(u.value,s.value);a(e)&&(c.data=e.ip_limit.ip_white.map((e=>({ip:e}))))}finally{p.value=[],n(!1)}};d(),t({init:d});const{keys:p,table:c,columns:_}=Ae([{type:"selection",width:40},{key:"ip",title:l("Site.Proxy.index_18"),ellipsis:{tooltip:{width:"trigger"}}},He({width:130,options:e=>[{label:l("Public.Btn.Del"),onClick:()=>{r({title:`${l("Site.TableOP.index_6")} [${e.ip}]`,content:l("Site.Proxy.index_23"),onConfirm:async()=>{await B({site_name:u.value,proxy_path:s.value,ip_type:"white",ip:e.ip}),d()}})}}]})]),x=[{key:"del",label:l("Site.Batch.index_20"),onBatch:e=>{r({title:l("Site.Batch.index_21"),content:l("Site.Batch.index_11"),onConfirm:async()=>{await O({site_name:u.value,proxy_path:s.value,ip_type:"white",ips:e.map((e=>e.ip)).join("\n")}),d()}})}}],y=()=>{v.title=l("Site.Proxy.index_22"),v.show=!0},v=h(l("Site.Proxy.index_22"),{getList:d});return(e,t)=>{const l=Ze,a=pe,n=de,o=ue,r=m;return be(),ge("div",null,[me(o,null,{toolsLeft:Se((()=>[me(l,{type:"primary",onClick:y},{default:Se((()=>[Ce(ke(e.$t("Site.Proxy.index_22")),1)])),_:1})])),table:Se((()=>[me(a,{"checked-row-keys":$e(p),"onUpdate:checkedRowKeys":t[0]||(t[0]=e=>Pe(p)?p.value=e:null),"row-key":"ip",loading:$e(i),"max-height":440,data:$e(c).data,columns:$e(_)},null,8,["checked-row-keys","loading","data","columns"])])),pageLeft:Se((()=>[me(n,{"checked-row-keys":$e(p),"onUpdate:checkedRowKeys":t[1]||(t[1]=e=>Pe(p)?p.value=e:null),"row-key":"ip",data:$e(c).data,options:x},null,8,["checked-row-keys","data"])])),_:1}),me(r,{show:$e(v).show,"onUpdate:show":t[2]||(t[2]=e=>$e(v).show=e),title:$e(v).title,data:$e(v).data,width:480,footer:!0,component:Ol},null,8,["show","title","data"])])}}}),Dl={class:"p-20px"},Il={class:"w-280px"},Al=ve({__name:"form",props:{data:{}},setup(e,{expose:t}){const{t:l}=fe(),a=kt(),{siteName:i,proxyPath:n}=Le(a),o=e,{getList:r}=o.data,u=xe(null),s=Ue({name:""}),d={name:{required:!0,message:l("Site.Proxy.index_20"),trigger:["blur","input"]}};return t({onConfirm:async({hide:e})=>{await(u.value?.validate()),await N({site_name:i.value,proxy_path:n.value,ip_type:"black",ips:s.name}),r?.(),e()}}),(e,t)=>{const l=et,a=Qe,i=ht,n=yt;return be(),ge("div",Dl,[me(i,{ref_key:"formRef",ref:u,model:$e(s),rules:d},{default:Se((()=>[me(a,{label:e.$t("Site.Proxy.index_18"),path:"name"},{default:Se((()=>[we("div",Il,[me(l,{type:"textarea",value:$e(s).name,"onUpdate:value":t[0]||(t[0]=e=>$e(s).name=e),placeholder:e.$t("Site.Proxy.index_20")},null,8,["value","placeholder"])])])),_:1},8,["label"])])),_:1},8,["model"]),me(n,{class:"mt-4px"},{default:Se((()=>[we("li",null,ke(e.$t("Site.Proxy.index_19")),1)])),_:1})])}}}),Hl=ve({__name:"index",setup(e,{expose:t}){const{t:l}=fe(),{loading:i,setLoading:n}=Ie(),o=kt(),{siteName:u,proxyPath:s}=Le(o),d=async()=>{try{n(!0);const e=await Ct(u.value,s.value);a(e)&&(c.data=e.ip_limit.ip_black.map((e=>({ip:e}))))}finally{p.value=[],n(!1)}};d(),t({init:d});const{keys:p,table:c,columns:_}=Ae([{type:"selection",width:40},{key:"ip",title:l("Site.Proxy.index_18"),ellipsis:{tooltip:{width:"trigger"}}},He({width:130,options:e=>[{label:l("Public.Btn.Del"),onClick:()=>{r({title:`${l("Site.TableOP.index_6")} [${e.ip}]`,content:l("Site.Proxy.index_23"),onConfirm:async()=>{await B({site_name:u.value,proxy_path:s.value,ip_type:"black",ip:e.ip}),d()}})}}]})]),x=[{key:"del",label:l("Site.Batch.index_20"),onBatch:e=>{r({title:l("Site.Batch.index_21"),content:l("Site.Batch.index_11"),onConfirm:async()=>{await O({site_name:u.value,proxy_path:s.value,ip_type:"black",ips:e.map((e=>e.ip)).join("\n")}),d()}})}}],y=()=>{v.title=l("Site.Proxy.index_21"),v.show=!0},v=h(l("Site.Proxy.index_21"),{getList:d});return(e,t)=>{const l=Ze,a=pe,n=de,o=ue,r=m;return be(),ge("div",null,[me(o,null,{toolsLeft:Se((()=>[me(l,{type:"primary",onClick:y},{default:Se((()=>[Ce(ke(e.$t("Site.Proxy.index_21")),1)])),_:1})])),table:Se((()=>[me(a,{"checked-row-keys":$e(p),"onUpdate:checkedRowKeys":t[0]||(t[0]=e=>Pe(p)?p.value=e:null),"row-key":"ip",loading:$e(i),"max-height":440,data:$e(c).data,columns:$e(_)},null,8,["checked-row-keys","loading","data","columns"])])),pageLeft:Se((()=>[me(n,{"checked-row-keys":$e(p),"onUpdate:checkedRowKeys":t[1]||(t[1]=e=>Pe(p)?p.value=e:null),"row-key":"ip",data:$e(c).data,options:x},null,8,["checked-row-keys","data"])])),_:1}),me(r,{show:$e(v).show,"onUpdate:show":t[2]||(t[2]=e=>$e(v).show=e),title:$e(v).title,data:$e(v).data,width:480,footer:!0,component:Al},null,8,["show","title","data"])])}}}),Ml={class:"p-20px"},Kl={key:0},Fl=ve({__name:"index",setup(e,{expose:t}){const{t:l}=fe(),i=kt(),{siteName:n,proxyPath:o}=Le(i),r=xe(null),u=Ue({switchValue:!1,inputValue:1,selectValue:"m"}),s=async()=>{const e=await Ct(n.value,o.value);a(e)&&(u.switchValue=e.proxy_cache.cache_status,e.proxy_cache.expires.length>1&&(u.inputValue=Number(e.proxy_cache.expires.slice(0,-1)),u.selectValue=e.proxy_cache.expires.slice(-1)))};s(),t({init:s});const d={inputValue:{required:!0,validator(e,t){if(!t)return new Error(l("Site.Proxy.index_26"))},trigger:["input","blur"]}},p=[{label:l("Public.Unit.Minute"),value:"m"},{label:l("Public.Unit.Hour"),value:"h"},{label:l("Public.Unit.Day"),value:"d"}],c=async()=>{await(r.value?.validate());let e={site_name:n.value,proxy_path:o.value,cache_status:u.switchValue?1:0,expires:`${u.inputValue}${u.selectValue}`};await q(e),s()};return(e,t)=>{const l=tt,a=Qe,i=at,n=it,o=lt,s=Ze,_=nt,x=yt;return be(),ge(Re,null,[we("div",Ml,[me(_,{ref_key:"formRef",ref:r,"label-width":100,model:$e(u),rules:d,"label-placement":"left"},{default:Se((()=>[me(a,{label:e.$t("Site.Proxy.index_24")},{default:Se((()=>[me(l,{value:$e(u).switchValue,"onUpdate:value":[t[0]||(t[0]=e=>$e(u).switchValue=e),c]},null,8,["value"])])),_:1},8,["label"]),$e(u).switchValue?(be(),ge("div",Kl,[me(o,null,{default:Se((()=>[me(a,{label:e.$t("Site.Proxy.index_25"),path:"inputValue"},{default:Se((()=>[me(i,{"show-button":!1,value:$e(u).inputValue,"onUpdate:value":t[1]||(t[1]=e=>$e(u).inputValue=e)},null,8,["value"])])),_:1},8,["label"]),me(a,null,{default:Se((()=>[me(n,{class:"w-90px",value:$e(u).selectValue,"onUpdate:value":t[2]||(t[2]=e=>$e(u).selectValue=e),options:p},null,8,["value"])])),_:1})])),_:1}),me(a,{label:" "},{default:Se((()=>[me(s,{type:"primary",onClick:c},{default:Se((()=>[Ce(ke(e.$t("Site.Cert.index_60")),1)])),_:1})])),_:1})])):Ve("",!0)])),_:1},8,["model"])]),me(x,null,{default:Se((()=>[we("li",null,ke(e.$t("Site.Proxy.index_28")),1),we("li",null,ke(e.$t("Site.Proxy.index_29")),1),we("li",null,ke(e.$t("Site.Proxy.index_30")),1),we("li",null,ke(e.$t("Site.Proxy.index_31")),1),we("li",null,ke(e.$t("Site.Proxy.index_32"))+" css|js|jpg|jpeg|gif|png|webp|woff|eot|ttf|svg|ico|css.map|js.map ",1)])),_:1})],64)}}}),Wl={class:"p-20px"},Yl={key:0},Gl=ve({__name:"index",setup(e,{expose:t}){const{t:l}=fe(),i=kt(),{siteName:n,proxyPath:o}=Le(i),r=async()=>{const e=await Ct(n.value,o.value);if(a(e)){s.switchValue=e.gzip.gzip_status,s.inputType=e.gzip.gzip_types,s.selectLevel=Number(e.gzip.gzip_comp_level);let t="",l="m";e.gzip.gzip_min_length&&e.gzip.gzip_min_length.length>1&&(t=e.gzip.gzip_min_length.slice(0,-1),l=e.gzip.gzip_min_length.slice(-1)),s.inputValue=Number(t),s.selectLength=l}};r(),t({init:r});const u=xe(null),s=Ue({switchValue:!0,inputType:"",selectLevel:1,selectLength:"m",inputValue:1}),d={inputType:{required:!0,message:l("Site.Proxy.index_41"),trigger:"blur"},inputValue:{required:!0,trigger:"blur",validator:(e,t)=>{if(!t)return new Error(l("Site.Proxy.index_41"))}}},p=[{label:"k",value:"k"},{label:"m",value:"m"}],c=[{label:"1",value:1},{label:"2",value:2},{label:"3",value:3},{label:"4",value:4},{label:"5",value:5},{label:"6",value:6},{label:"7",value:7},{label:"8",value:8},{label:"9",value:9}],_=async()=>{await(u.value?.validate());let e={site_name:n.value,proxy_path:o.value,gzip_status:s.switchValue?1:0,gzip_min_length:`${s.inputValue}${s.selectLength}`,gzip_comp_level:s.selectLevel,gzip_types:s.inputType};await D(e),r()};return(e,t)=>{const l=tt,a=Qe,i=et,n=it,o=at,r=lt,x=Ze,y=nt,h=yt;return be(),ge("div",Wl,[me(y,{ref_key:"formRef",ref:u,"label-width":150,model:$e(s),rules:d,"label-placement":"left"},{default:Se((()=>[me(a,{label:e.$t("Site.Proxy.index_34")},{default:Se((()=>[me(l,{value:$e(s).switchValue,"onUpdate:value":[t[0]||(t[0]=e=>$e(s).switchValue=e),_]},null,8,["value"])])),_:1},8,["label"]),$e(s).switchValue?(be(),ge("div",Yl,[me(a,{label:e.$t("Site.Proxy.index_35"),path:"inputType"},{default:Se((()=>[me(i,{value:$e(s).inputType,"onUpdate:value":t[1]||(t[1]=e=>$e(s).inputType=e),type:"textarea",placeholder:e.$t("Site.Proxy.index_41")},null,8,["value","placeholder"])])),_:1},8,["label"]),me(a,{label:e.$t("Site.Proxy.index_36")},{default:Se((()=>[me(n,{value:$e(s).selectLevel,"onUpdate:value":t[2]||(t[2]=e=>$e(s).selectLevel=e),placeholder:"Select",options:c},null,8,["value"])])),_:1},8,["label"]),me(r,null,{default:Se((()=>[me(a,{label:e.$t("Site.Proxy.index_37"),path:"inputValue"},{default:Se((()=>[me(o,{"show-button":!1,value:$e(s).inputValue,"onUpdate:value":t[3]||(t[3]=e=>$e(s).inputValue=e)},null,8,["value"])])),_:1},8,["label"]),me(a,null,{default:Se((()=>[me(n,{class:"w-90px",value:$e(s).selectLength,"onUpdate:value":t[4]||(t[4]=e=>$e(s).selectLength=e),options:p},null,8,["value"])])),_:1})])),_:1}),me(a,{label:" "},{default:Se((()=>[me(x,{type:"primary",onClick:_},{default:Se((()=>[Ce(ke(e.$t("Site.Cert.index_60")),1)])),_:1})])),_:1})])):Ve("",!0)])),_:1},8,["model"]),me(h,null,{default:Se((()=>[we("li",null,ke(e.$t("Site.Proxy.index_38")),1),we("li",null,ke(e.$t("Site.Proxy.index_39")),1),we("li",null,ke(e.$t("Site.Proxy.index_40")),1)])),_:1})])}}}),Jl={class:"p-20px"},Xl=ve({__name:"index",setup(e,{expose:t}){const{t:l}=fe(),i=kt(),{siteName:n,proxyPath:o}=Le(i),r=xe(!1),u=async()=>{const e=await Ct(n.value,o.value);a(e)&&(d.proxy_type=e.proxy_type?"http":"unix",d.proxy_pass=e.proxy_pass,d.proxy_host=e.proxy_host,d.proxy_path=e.proxy_path,d.remark=e.remark,r.value=e.global_websocket,d.websocket=e.websocket?.websocket_status,d.proxy_connect_timeout=e.timeout?.proxy_connect_timeout,d.proxy_send_timeout=e.timeout?.proxy_send_timeout,d.proxy_read_timeout=e.timeout?.proxy_read_timeout,d.keepuri=e.keepuri,p.value=e.rewritedir.length?e.rewritedir.map((e=>({key:e.dir1,value:e.dir2}))):[{key:"",value:""}])};u(),t({init:u});const s=xe(null),d=Ue({keepuri:1,proxy_path:"",proxy_pass:"",proxy_host:"",proxy_type:"http",remark:"",websocket:!1,proxy_connect_timeout:"",proxy_send_timeout:"",proxy_read_timeout:"",rewrite:[{key:"",value:""}]}),p=xe([{key:"",value:""}]),c={proxy_path:{required:!0,message:l("Site.Proxy.index_41"),trigger:"blur"},proxy_pass:{required:!0,message:l("Site.Proxy.index_41"),trigger:"blur"},proxy_host:{required:!0,message:l("Site.Proxy.index_41"),trigger:"blur"},proxy_connect_timeout:{required:!0,message:l("Site.Proxy.index_41"),trigger:"blur"},proxy_send_timeout:{required:!0,message:l("Site.Proxy.index_41"),trigger:"blur"},proxy_read_timeout:{required:!0,message:l("Site.Proxy.index_41"),trigger:"blur"}},_=[{label:l("Site.Proxy.index_11"),value:"http"},{label:l("Site.Proxy.index_12"),value:"unix"}],x=async()=>{await(s.value?.validate());const e=p.value.filter((e=>""!==e.key||""!==e.value)).map((e=>({dir1:e.key,dir2:e.value})));let t={site_name:n.value,proxy_path:d.proxy_path,proxy_pass:d.proxy_pass,proxy_host:d.proxy_host,proxy_type:d.proxy_type,remark:d.remark,websocket:d.websocket?1:0,proxy_connect_timeout:d.proxy_connect_timeout,proxy_send_timeout:d.proxy_send_timeout,proxy_read_timeout:d.proxy_read_timeout,keepuri:d.keepuri,rewritedir:JSON.stringify(e)};await I(t),u()};return(e,t)=>{const l=tt,a=Qe,i=et,n=it,o=ut,u=st,y=rt,h=bt,m=Ze,v=nt;return be(),ge("div",Jl,[me(v,{ref_key:"formRef",ref:s,"label-width":180,model:$e(d),rules:c,"label-placement":"left"},{default:Se((()=>["http"===$e(d).proxy_type?(be(),je(a,{key:0,label:"Show Proxy Path"},{default:Se((()=>[me(l,{value:$e(d).keepuri,"onUpdate:value":t[0]||(t[0]=e=>$e(d).keepuri=e),"checked-value":1,"unchecked-value":0},null,8,["value"])])),_:1})):Ve("",!0),me(a,{label:e.$t("Site.TableRow.index_21"),path:"proxy_path"},{default:Se((()=>[me(i,{class:"w-400px!",value:$e(d).proxy_path,"onUpdate:value":t[1]||(t[1]=e=>$e(d).proxy_path=e),disabled:""},null,8,["value"])])),_:1},8,["label"]),me(a,{label:e.$t("Site.Proxy.index_1")},{default:Se((()=>[me(n,{class:"w-200px",value:$e(d).proxy_type,"onUpdate:value":t[2]||(t[2]=e=>$e(d).proxy_type=e),options:_},null,8,["value"])])),_:1},8,["label"]),me(a,{label:" ",path:"proxy_pass"},{default:Se((()=>[me(i,{class:"w-400px!",value:$e(d).proxy_pass,"onUpdate:value":t[3]||(t[3]=e=>$e(d).proxy_pass=e),placeholder:e.$t("Site.Proxy.index_41")},null,8,["value","placeholder"])])),_:1}),me(a,{label:e.$t("Site.Proxy.index_2"),path:"proxy_host"},{default:Se((()=>[me(i,{class:"w-400px!",value:$e(d).proxy_host,"onUpdate:value":t[4]||(t[4]=e=>$e(d).proxy_host=e),placeholder:e.$t("Site.Proxy.index_41")},null,8,["value","placeholder"])])),_:1},8,["label"]),"http"===$e(d).proxy_type?(be(),je(a,{key:1,label:"URL Rewrite"},{default:Se((()=>[me(o,{class:"w-400px",min:1,value:$e(p),"onUpdate:value":t[5]||(t[5]=e=>Pe(p)?p.value=e:null),preset:"pair","key-placeholder":"/aaa","value-placeholder":"/bbb"},null,8,["value"])])),_:1})):Ve("",!0),me(a,{label:e.$t("Docker.Container.create.index_46")},{default:Se((()=>[me(i,{class:"w-400px!",value:$e(d).remark,"onUpdate:value":t[6]||(t[6]=e=>$e(d).remark=e),placeholder:e.$t("Site.Proxy.index_41")},null,8,["value","placeholder"])])),_:1},8,["label"]),me(a,{label:e.$t("Site.Proxy.index_58")},{default:Se((()=>[me(y,{trigger:"hover"},{trigger:Se((()=>[me(u,{checked:$e(d).websocket,"onUpdate:checked":t[7]||(t[7]=e=>$e(d).websocket=e),disabled:$e(r)},null,8,["checked","disabled"])])),default:Se((()=>[Ce(" "+ke(e.$t("Site.Tips.index_16")),1)])),_:1})])),_:1},8,["label"]),me(a,{label:e.$t("Site.Lable.index_42"),path:"proxy_connect_timeout"},{default:Se((()=>[me(h,ze(e.$attrs,{class:"w-400px!",value:$e(d).proxy_connect_timeout,"onUpdate:value":t[8]||(t[8]=e=>$e(d).proxy_connect_timeout=e),text:"Sec"}),null,16,["value"])])),_:1},8,["label"]),me(a,{label:e.$t("Site.Lable.index_43"),path:"proxy_send_timeout"},{default:Se((()=>[me(h,ze(e.$attrs,{class:"w-400px!",value:$e(d).proxy_send_timeout,"onUpdate:value":t[9]||(t[9]=e=>$e(d).proxy_send_timeout=e),text:"Sec"}),null,16,["value"])])),_:1},8,["label"]),me(a,{label:e.$t("Site.Lable.index_44"),path:"proxy_read_timeout"},{default:Se((()=>[me(h,ze(e.$attrs,{class:"w-400px!",value:$e(d).proxy_read_timeout,"onUpdate:value":t[10]||(t[10]=e=>$e(d).proxy_read_timeout=e),text:"Sec"}),null,16,["value"])])),_:1},8,["label"]),me(a,{label:" "},{default:Se((()=>[me(m,{type:"primary",onClick:x},{default:Se((()=>[Ce(ke(e.$t("Site.Cert.index_60")),1)])),_:1})])),_:1})])),_:1},8,["model"])])}}}),Zl={class:"p-20px"},Ql=ve({__name:"index",setup(e,{expose:t}){const{t:l}=fe(),i=kt(),{siteName:n,proxyPath:o}=Le(i),r=async()=>{const e=await Ct(n.value,o.value);a(e)&&(s.configValue=e.custom_conf)};r(),t({init:r});const u=xe(null),s=Ue({configValue:""}),d={configValue:{required:!0,message:l("Site.Proxy.index_41"),trigger:"blur"}},p=async()=>{await(u.value?.validate()),await A({site_name:n.value,proxy_path:o.value,custom_conf:s.configValue}),r()};return(e,t)=>{const l=et,a=Qe,i=Ze,n=nt,o=yt;return be(),ge("div",Zl,[me(n,{ref_key:"formRef",ref:u,"label-width":180,model:$e(s),rules:d,"label-placement":"left"},{default:Se((()=>[me(a,{label:e.$t("Site.TableRow.index_21"),path:"configValue"},{default:Se((()=>[me(l,{class:"w-400px!",rows:6,type:"textarea",value:$e(s).configValue,"onUpdate:value":t[0]||(t[0]=e=>$e(s).configValue=e),placeholder:'Line by line configuration, please end with, for example\nproxy_set_header Cookie "cookie_name=cookie_value";\nallow 192.168.1.0/24;\naccess_log /www/wwwlogs/xxx.log;'},null,8,["value"])])),_:1},8,["label"]),me(a,{label:" "},{default:Se((()=>[me(i,{type:"primary",onClick:p},{default:Se((()=>[Ce(ke(e.$t("Site.Cert.index_60")),1)])),_:1})])),_:1})])),_:1},8,["model"]),me(o,null,{default:Se((()=>[we("li",null,ke(e.$t("Site.Tips.index_1")),1),we("li",null,[Ce(ke(e.$t("Site.Tips.index_2")),1),t[1]||(t[1]=we("br",null,null,-1)),Ce(" "+ke(e.$t("Site.Tips.index_4")),1),t[2]||(t[2]=we("br",null,null,-1)),Ce(" "+ke(e.$t("Site.Tips.index_5")),1),t[3]||(t[3]=we("br",null,null,-1)),Ce(" "+ke(e.$t("Site.Tips.index_6")),1),t[4]||(t[4]=we("br",null,null,-1)),Ce(" "+ke(e.$t("Site.Tips.index_7")),1),t[5]||(t[5]=we("br",null,null,-1)),t[6]||(t[6]=Ce(" limit_except POST{")),t[7]||(t[7]=we("br",null,null,-1)),t[8]||(t[8]=Ce(" allow 192.168.1.0/24;")),t[9]||(t[9]=we("br",null,null,-1)),t[10]||(t[10]=Ce(" deny all;")),t[11]||(t[11]=we("br",null,null,-1)),t[12]||(t[12]=Ce(" }")),t[13]||(t[13]=we("br",null,null,-1)),Ce(" "+ke(e.$t("Site.Tips.index_11")),1)]),we("li",null,ke(e.$t("Site.Tips.index_3")),1)])),_:1})])}}}),ea={class:"p-20px"},ta=ve({__name:"form",props:{data:{}},setup(e,{expose:t}){const{t:l}=fe(),a=kt(),{siteName:i,proxyPath:n}=Le(a),o=e,{getList:r}=o.data,u=xe(l("Site.Tips.index_15")),s=xe(null),d=Ue({oldstr:"",newstr:"",sub_type:[]}),p=()=>{c(d.sub_type)},c=e=>{const t=e.includes("i")?l("Site.Tips.index_12"):"",a=e.includes("o")?l("Site.Tips.index_13"):"",i=e.includes("r")?l("Site.Tips.index_14"):"";switch(e.length){case 0:u.value=`${l("Site.Lable.index_48")} ${d.oldstr} ${l("Site.Lable.index_51")} ${d.newstr}`;break;case 1:u.value=`${l("Site.Lable.index_49")} ${a?`${l("Docker.Container.index_26.index_2")}`:""} ${d.oldstr} ${l("Site.Lable.index_51")} ${d.newstr}${l("Site.Lable.index_50")} ${t||a||i}`;break;case 2:u.value=`${l("Site.Lable.index_49")} ${a?`${l("Docker.Container.index_26.index_2")}`:""} ${d.oldstr} ${l("Site.Lable.index_51")} ${d.newstr}${l("Site.Lable.index_50")} ${t||a||i} ${l("Site.Lable.index_52")} ${i||a||t}`;break;case 3:u.value=`${l("Site.Lable.index_49")} ${d.oldstr} ${l("Site.Lable.index_51")} ${d.newstr} ${l("Site.Lable.index_50")} ${t}${a} ${l("Site.Lable.index_52")} s${i}`}},_={oldstr:{required:!0,message:l("Site.Proxy.index_41"),trigger:["blur","input"]}};return t({onConfirm:async({hide:e})=>{await(s.value?.validate());let t={site_name:i.value,proxy_path:n.value,oldstr:d.oldstr,newstr:d.newstr,sub_type:d.sub_type?d.sub_type.join(""):"g"};await H(t),r?.(),e()}}),(e,t)=>{const l=et,a=Qe,i=st,n=pt,o=dt,r=ht;return be(),ge("div",ea,[me(r,{ref_key:"formRef",ref:s,model:$e(d),rules:_},{default:Se((()=>[me(a,{label:e.$t("Site.Lable.index_19"),path:"oldstr"},{default:Se((()=>[me(l,{class:"w-280px",value:$e(d).oldstr,"onUpdate:value":t[0]||(t[0]=e=>$e(d).oldstr=e),placeholder:e.$t("Site.Placeholder.Index_10"),onInput:p},null,8,["value","placeholder"])])),_:1},8,["label"]),me(a,{label:e.$t("Site.Lable.index_15")},{default:Se((()=>[me(l,{class:"w-280px",value:$e(d).newstr,"onUpdate:value":t[1]||(t[1]=e=>$e(d).newstr=e),placeholder:e.$t("Site.Placeholder.Index_10"),onInput:p},null,8,["value","placeholder"])])),_:1},8,["label"]),me(a,{label:" "},{default:Se((()=>[me(o,{value:$e(d).sub_type,"onUpdate:value":[t[2]||(t[2]=e=>$e(d).sub_type=e),c]},{default:Se((()=>[me(n,{"item-style":"display: flex;"},{default:Se((()=>[me(i,{value:"i",label:e.$t("Site.Tips.index_12")},null,8,["label"]),me(i,{value:"o",label:e.$t("Site.Tips.index_13")},null,8,["label"]),me(i,{value:"r",label:e.$t("Site.Tips.index_14")},null,8,["label"])])),_:1})])),_:1},8,["value"])])),_:1}),me(a,{label:" "},{default:Se((()=>[Ce(ke($e(u)),1)])),_:1})])),_:1},8,["model"])])}}}),la=ve({__name:"index",setup(e,{expose:t}){const{t:l}=fe(),{loading:i,setLoading:n}=Ie(),o=kt(),{siteName:r,proxyPath:u}=Le(o),s=async()=>{try{n(!0);const e=await Ct(r.value,u.value);a(e)&&(p.data=e.sub_filter.sub_filter_str)}finally{d.value=[],n(!1)}};s(),t({init:s});const{keys:d,table:p,columns:c}=Ae([{key:"oldstr",title:l("Site.Lable.index_19"),width:200,ellipsis:{tooltip:{width:"trigger"}}},{key:"newstr",title:l("Site.Lable.index_15"),width:250,ellipsis:{tooltip:{width:"trigger"}}},{key:"sub_type",title:l("Site.Lable.index_16"),ellipsis:{tooltip:{width:"trigger"}}},He({width:130,options:e=>[{label:l("Public.Btn.Del"),onClick:async()=>{await M({site_name:r.value,proxy_path:u.value,newstr:e.newstr,oldstr:e.oldstr}),s()}}]})]),_=()=>{x.title=`${l("Site.Proxy.index_81")} [${u.value}]`,x.show=!0},x=h(`${l("Site.Proxy.index_81")} [${u.value}]`,{getList:s});return(e,t)=>{const l=Ze,a=pe,n=ue,o=yt,r=m;return be(),ge("div",null,[me(n,null,{toolsLeft:Se((()=>[me(l,{type:"primary",onClick:_},{default:Se((()=>[Ce(ke(e.$t("Site.Proxy.index_81")),1)])),_:1})])),table:Se((()=>[me(a,{"checked-row-keys":$e(d),"onUpdate:checkedRowKeys":t[0]||(t[0]=e=>Pe(d)?d.value=e:null),"row-key":"ip",loading:$e(i),"max-height":440,data:$e(p).data,columns:$e(c)},null,8,["checked-row-keys","loading","data","columns"])])),_:1}),me(o,{class:"mt-16px"},{default:Se((()=>[we("li",null,"g"+ke(e.$t("Site.Tips.index_18")),1),we("li",null,"i"+ke(e.$t("Site.Tips.index_12")),1),we("li",null,"o"+ke(e.$t("Site.Tips.index_13")),1),we("li",null,"r"+ke(e.$t("Site.Tips.index_14")),1)])),_:1}),me(r,{show:$e(x).show,"onUpdate:show":t[1]||(t[1]=e=>$e(x).show=e),title:$e(x).title,data:$e(x).data,width:600,footer:!0,component:ta},null,8,["show","title","data"])])}}}),aa=ve({__name:"index",setup(e){const{t:t}=fe(),l=xe("reverse"),a=[{key:"reverse",label:t("Site.Config.index_23"),component:Xl},{key:"config",label:t("Site.Config.index_10"),component:Ql},{key:"replace",label:t("Site.Config.index_22"),component:la},{key:"cache",label:t("Site.Lable.index_31"),component:Fl},{key:"compressed",label:t("Site.Proxy.index_61"),component:Gl},{key:"black",label:t("Site.Proxy.index_62"),component:Hl},{key:"white",label:t("Site.Proxy.index_63"),component:ql}];return(e,t)=>{const i=xt;return be(),je(i,{class:"p-20px",value:$e(l),"onUpdate:value":t[0]||(t[0]=e=>Pe(l)?l.value=e:null),options:a},null,8,["value"])}}}),ia=ve({__name:"index",setup(e,{expose:t}){const{t:a}=fe(),i=kt(),{proxyPath:n}=Le(i),{data:o}=Lt(),{keys:u,table:s,columns:c}=Ae([{key:"proxy_path",title:a("Site.TableRow.index_32"),width:100,ellipsis:{tooltip:{width:"trigger"}}},{key:"proxy_pass",title:a("Site.Proxy.index_1"),width:100,ellipsis:{tooltip:{width:"trigger"}}},Ke({key:"remark",title:a("Site.Proxy.index_3"),width:"8%",onBlur:async(e,t)=>{await K({site_name:o.name,proxy_path:t.proxy_path,remark:e})}}),He({width:120,options:e=>[{label:a("Public.Btn.Set"),onClick:()=>{g(e)}},{label:a("Public.Btn.Del"),onClick:()=>{"/"!==e.proxy_path?r({title:`${a("Site.Batch.index_16")} [${e.proxy_path}]`,content:`${a("Site.Batch.index_17")} [${e.proxy_path}]?`,onConfirm:async({hide:t})=>{await F({site_name:o.name,proxy_path:e.proxy_path}),y(),t()}}):p.error(a("Site.Proxy.index_74"))}}]})]),{loading:_,setLoading:x}=Ie(),y=async()=>{try{x(!0);const{message:e}=await l({site_name:o.name});s.data=d(e)?e:[]}finally{u.value=[],x(!1)}},v=h(a("Site.Config.index_86"),{row:void 0,siteName:o.name,getList:y}),f=()=>{v.data.row=void 0,v.title=a("Site.Config.index_92"),v.show=!0},b=h("",{row:void 0,siteName:o.name,getList:y}),g=e=>{n.value=e.proxy_path,b.title=`${a("Site.Config.index_93")} [${e.proxy_path}]`,b.show=!0};return y(),t({init:y}),(e,t)=>{const l=Ze,a=pe,i=ue,n=m;return be(),ge("div",null,[me(i,null,{toolsLeft:Se((()=>[me(l,{type:"primary",onClick:f},{default:Se((()=>[Ce(ke(e.$t("Site.Config.index_85")),1)])),_:1})])),table:Se((()=>[me(a,{"checked-row-keys":$e(u),"onUpdate:checkedRowKeys":t[0]||(t[0]=e=>Pe(u)?u.value=e:null),"row-key":"proxyname",loading:$e(_),"max-height":440,data:$e(s).data,columns:$e(c)},null,8,["checked-row-keys","loading","data","columns"])])),_:1}),me(n,{show:$e(v).show,"onUpdate:show":t[1]||(t[1]=e=>$e(v).show=e),title:$e(v).title,data:$e(v).data,width:660,footer:!0,component:zl},null,8,["show","title","data"]),me(n,{show:$e(b).show,"onUpdate:show":t[2]||(t[2]=e=>$e(b).show=e),title:$e(b).title,width:800,"min-height":650,component:aa},null,8,["show","title"])])}}}),na={class:"pt-8px"},oa={class:"w-300px"},ra={class:"w-300px"},ua={class:"w-300px"},sa={class:"flex flex-col"},da=ve({__name:"index",setup(e,{expose:t}){const{t:l}=fe(),{data:i}=Lt(),n=xe(null),o=xe(!1),r=Ue({fix:"",domains:"",return_rule:"",status:!1,none:!1}),u={fix:{trigger:["blur","change"],validator:()=>""!==r.fix.trim()||new Error(l("Site.RulesError.index_330"))},return_rule:{trigger:["blur","change"],validator:()=>""!==r.return_rule.trim()||new Error(l("Site.RulesError.index_330"))}},s=e=>{e?o.value=!1:(o.value=!0,r.none=!1)},d=async()=>{await(n.value?.validate()),await W({id:i.id,name:i.name,fix:r.fix,domains:r.domains.trim().split("\n").join(","),return_rule:r.return_rule,status:r.status,http_status:!!r.none}),p()},p=async()=>{const{message:e}=await Y({id:i.id,name:i.name});a(e)&&(r.fix=e.fix,r.domains=e.domains.split(",").join("\n"),r.return_rule=e.return_rule,r.status=e.status,r.none=e.http_status)};return p(),t({init:p}),(e,t)=>{const l=et,a=Qe,i=st,p=Ze,c=ht,_=yt;return be(),ge("div",na,[me(c,{ref_key:"formRef",ref:n,class:"px-8px",model:$e(r),rules:u},{default:Se((()=>[me(a,{label:e.$t("Site.Lable.index_6"),path:"fix"},{default:Se((()=>[we("div",oa,[me(l,{value:$e(r).fix,"onUpdate:value":t[0]||(t[0]=e=>$e(r).fix=e),placeholder:""},null,8,["value"])])])),_:1},8,["label"]),me(a,{label:e.$t("Site.Lable.index_7")},{default:Se((()=>[we("div",ra,[me(l,{value:$e(r).domains,"onUpdate:value":t[1]||(t[1]=e=>$e(r).domains=e),type:"textarea",autosize:{minRows:6,maxRows:6},placeholder:""},null,8,["value"])])])),_:1},8,["label"]),me(a,{label:e.$t("Site.Lable.index_13"),path:"return_rule"},{default:Se((()=>[we("div",ua,[me(l,{value:$e(r).return_rule,"onUpdate:value":t[2]||(t[2]=e=>$e(r).return_rule=e),placeholder:""},null,8,["value"])])])),_:1},8,["label"]),me(a,{label:" "},{default:Se((()=>[we("div",sa,[me(i,{checked:$e(r).status,"onUpdate:checked":[t[3]||(t[3]=e=>$e(r).status=e),s]},{default:Se((()=>[Ce(ke(e.$t("Site.Config.index_94")),1)])),_:1},8,["checked"]),me(i,{checked:$e(r).none,"onUpdate:checked":t[4]||(t[4]=e=>$e(r).none=e),class:"mt-16px",disabled:$e(o)},{default:Se((()=>[Ce(ke(e.$t("Site.Config.index_95")),1)])),_:1},8,["checked","disabled"])])])),_:1}),me(a,{label:" ","show-feedback":!1},{default:Se((()=>[me(p,{type:"primary",onClick:d},{default:Se((()=>[Ce(ke(e.$t("Site.Cert.index_60")),1)])),_:1})])),_:1})])),_:1},8,["model"]),me(_,{class:"mt-20px"},{default:Se((()=>[we("li",null,[Ce(ke(e.$t("Site.Config.index_96")),1),t[5]||(t[5]=we("br",null,null,-1)),Ce(" "+ke(e.$t("Site.Config.index_97")),1)]),we("li",null,ke(e.$t("Site.Config.index_98")),1),we("li",null,ke(e.$t("Site.Config.index_99")),1)])),_:1})])}}}),pa={class:"mb-10px"},ca=ve({__name:"index",setup(e,{expose:t}){const{data:l}=Lt(),i=xe("None"),n=xe(0),{loading:o,setLoading:r}=Ie(),u=async()=>{try{r(!0);const{message:e}=await G({site_name:l.name,type:"access"});a(e)&&(i.value=e.msg?e.msg:"None",n.value=e.size)}finally{r(!1)}};return u(),t({init:u}),(e,t)=>{const l=gt,a=ct;return be(),je(a,{class:"h-560px",show:$e(o)},{default:Se((()=>[we("div",pa,ke(e.$t("Site.Cert.index_3"))+": "+ke($e(n)),1),me(l,{log:$e(i)},null,8,["log"])])),_:1},8,["show"])}}}),_a={class:"mb-10px"},xa=ve({__name:"index",setup(e,{expose:t}){const{data:l}=Lt(),i=xe("None"),n=xe(0),{loading:o,setLoading:r}=Ie(),u=async()=>{try{r(!0);const{message:e}=await G({site_name:l.name,type:"error"});a(e)&&(i.value=e.msg?e.msg:"None",n.value=e.size)}finally{r(!1)}};return u(),t({init:u}),(e,t)=>{const l=gt,a=ct;return be(),je(a,{class:"h-560px",show:$e(o)},{default:Se((()=>[we("div",_a,ke(e.$t("Site.Cert.index_3"))+": "+ke($e(n)),1),me(l,{log:$e(i)},null,8,["log"])])),_:1},8,["show"])}}}),ya=ve({__name:"index",setup(e,{expose:t}){const{t:l}=fe(),{config:a}=Lt(),i=xe("access"),n=xe(),o=[{key:"access",label:l("Site.Config.index_100"),component:ca},{key:"error",label:l("Site.Config.index_101"),component:xa}];return i.value=a.subMenu||"access",a.subMenu="",t({init:()=>{i.value="access",Ne((()=>{n.value?.init()}))}}),(e,t)=>{const l=xt;return be(),je(l,{value:$e(i),"onUpdate:value":t[0]||(t[0]=e=>Pe(i)?i.value=e:null),ref_key:"tabsRef",ref:n,options:o},null,8,["value"])}}}),ha=ve({__name:"index",props:{siteInfo:{},config:{}},setup(e){const l=Be((()=>J((()=>t.import("./index-legacy-BTEApMFA.js?v=1773287522785")),void 0))),a=kt(),{siteName:i}=Le(a),{t:n}=fe(),o=e,{siteInfo:r,config:u}=o;i.value=o.siteInfo.name;const s=xe();r&&he(Pt,{data:r,config:u});const d=xe("domain"),p=[{key:"domain",label:n("Site.Config.index_1"),component:Et},{key:"proxy_pass",label:n("Site.Config.index_8"),component:ia},{key:"config",label:n("Site.Config.index_10"),component:ol},{key:"file",label:n("Site.Config.index_15"),component:fl},{key:"ssl",label:()=>me(Re,null,[n("Site.Config.index_11")]),component:l},{key:"redirect",label:n("Site.Config.index_21"),component:Tl},{key:"hotlink",label:n("Site.Config.index_24"),component:da},{key:"logs",label:n("Site.Config.index_25"),component:ya}];return d.value=u.menu||"domain",u.menu="",Ee((()=>{window.siteConfigInit=s.value.init})),(e,t)=>{const l=Ge;return be(),je(l,{value:$e(d),"onUpdate:value":t[0]||(t[0]=e=>Pe(d)?d.value=e:null),ref_key:"tabsRef",ref:s,data:p},null,8,["value"])}}}),ma=Ye(),{t:va}=n.global;function fa({onClick:e}){return{key:"name",title:va("Site.Lable.index_1"),width:"12%",minWidth:120,sorter:"default",render:t=>me(o,{onClick:()=>{e(t)}},{default:()=>[t.name]})}}function ba({onClick:e}){return{key:"proxy_pass",title:va("Site.TableRow.index_31"),minWidth:70,render:t=>me(o,{onClick:()=>{e(t)}},{default:()=>[t.proxy_pass]})}}function ga({onClick:e}){return{key:"ssl",title:"SSL",width:"12%",minWidth:100,render:t=>{let l;const{ssl:i}=t;return a(i)?me(o,{type:i.endtime<0?"error":"primary",onClick:()=>{e(t)}},{default:()=>[i.endtime<0?va("Site.PHP.index_28"):va("Site.PHP.index_29",[i.endtime])]}):me(o,{type:"warning",onClick:()=>{e(t)}},"function"==typeof(n=l=va("Site.PHP.index_30"))||"[object Object]"===Object.prototype.toString.call(n)&&!Oe(n)?l:{default:()=>[l]});var n}}}function wa({onClick:e}){const{openSiteWaf:l}=wt();return{key:"action",title:va("Site.TableRow.index_30"),width:200,align:"right",render:a=>me(Xe,{options:[{label:va("Site.PHP.index_14"),onClick:async()=>{await X({source:142}),await Z("monitor"),Q({name:"monitor",title:"Website statistics-v2",admin:!0})}},{label:va("Layout.Sider.wap_1"),show:"nginx"===ma.webserver||"apache"===ma.webserver,onClick:()=>{l(a.name)}},{label:va("Site.TableOP.index_2"),onClick:()=>{e(a)}},{label:va("Public.Btn.Del"),onClick:()=>{var e;e=[a],ee({title:`${va("Site.Tips.index_17")} - [${e[0].name}]`,width:500,minHeight:72,footer:!0,data:{rows:e},component:Be((()=>J((()=>t.import("./index-legacy-B-_yhN8O.js?v=1773287522785")),void 0)))})}}]},null)}}const Sa={class:"w-860px h-700px"},ka=ve({__name:"index",setup(e){const l=Be((()=>J((()=>t.import("./index-legacy-D26uHowo.js?v=1773287522785")),void 0))),{t:i}=fe(),n=Ye(),r=kt(),u=te(),{isFree:s,siteMonitorStatus:p}=Le(u),{web:c}=Le(n),_=xe(!1),x=h(i("Site.Proxy.index_82")),y=()=>{x.show=!0},v=()=>{V()},f=qe({}),b=async()=>{if(s.value&&!p.value)return;const{message:e}=await St(oe(),"proxy");a(e)&&(f.value=e)},g=e=>{$.value.forEach((t=>{const l=t;l.key===e.columnKey?l.sortOrder=e.order:l.sortOrder=!1}));const t="descend"===e.order?"desc":"ascend"===e.order?"asc":"";"requests"===e.columnKey&&(L.p=1,L.limit=L.limit>100?100:L.limit,L.re_order=t,V())},w=Ue({show:!1,title:"",siteInfo:null,config:{menu:"",subMenu:""}}),S=(e,t={})=>{w.title=i("Site.PHP.index_13",[e.name,e.addtime]),w.siteInfo=e,w.config=Object.assign({menu:"",subMenu:""},t),w.show=!0},{keys:k,table:P,columns:$}=Ae([{type:"selection",width:40},fa({onClick:e=>{S(e)}}),ba({onClick:e=>{S(e,{menu:"proxy_pass"})}}),ga({onClick:e=>{S(e,{menu:"ssl"})}}),Ke({width:"14%",onBlur:async(e,t)=>{await le({id:t.id,ps:e})}}),Fe({monitorMap:f,getMonitorData:b}),wa({onClick:e=>{S(e)}})]),C=[{key:"Project",label:i("Site.Cert.index_6"),onBatch:e=>{ee({title:i("Site.Cert.index_7"),content:i("Site.Cert.index_8"),width:500,minHeight:72,footer:!0,data:{rows:e},component:Be((()=>J((()=>t.import("./index-legacy-B-_yhN8O.js?v=1773287522785")),void 0)))})}}],L=Ue({p:1,limit:10,search:"",re_order:""}),{loading:U,setLoading:T}=Ie(!0),V=async()=>{try{T(!0);const{message:e}=await ie(L);a(e)?a(e.data)&&(P.data=d(e.data.data)?e.data.data:[],P.total=ne(e.data.page)):(P.data=[],P.total=0)}finally{k.value=[],T(!1)}};De((()=>r.isRefresh),(e=>{e&&(n.setRefresh(!1),V())})),De((()=>u.taskCount),(()=>{R()}));const R=async()=>{try{await n.getPHPConfig(),n.web.setup?(_.value=!0,V(),b()):(_.value=!1,T(!1))}catch{T(!1)}};return R(),(e,t)=>{const a=o,i=Ze,n=ce,r=pe,u=de,s=se,d=ue,p=m,_=re,h=_t;return be(),je(h,null,{default:Se((()=>[me(_,{install:$e(c).setup&&"nginx"==$e(c).type},{desc:Se((()=>[we("span",null,ke(e.$t("Site.Cert.index_4")),1),me(a,{class:"ml-4px",onClick:t[0]||(t[0]=e=>$e(ae)("nginx"))},{default:Se((()=>[Ce(ke(e.$t("Site.PHP.index_2")),1)])),_:1})])),default:Se((()=>[me(d,{class:"p-16px",feedback:!0},{toolsLeft:Se((()=>[me(i,{type:"primary",onClick:y},{default:Se((()=>[Ce(ke(e.$t("Site.Cert.index_5")),1)])),_:1}),me(i,{onClick:t[1]||(t[1]=e=>$e(We)(!0))},{default:Se((()=>[Ce(ke(e.$t("Statistics")),1)])),_:1})])),toolsRight:Se((()=>[me(n,{value:$e(L).search,"onUpdate:value":t[2]||(t[2]=e=>$e(L).search=e),placeholder:e.$t("Site.Placeholder.Index_11"),onSearch:V},null,8,["value","placeholder"])])),table:Se((()=>[me(r,{"checked-row-keys":$e(k),"onUpdate:checkedRowKeys":t[3]||(t[3]=e=>Pe(k)?k.value=e:null),loading:$e(U),data:$e(P).data,columns:$e($),"onUpdate:sorter":g},null,8,["checked-row-keys","loading","data","columns"])])),pageLeft:Se((()=>[me(u,{"checked-row-keys":$e(k),"onUpdate:checkedRowKeys":t[4]||(t[4]=e=>Pe(k)?k.value=e:null),data:$e(P).data,options:C},null,8,["checked-row-keys","data"])])),pageRight:Se((()=>[me(s,{page:$e(L).p,"onUpdate:page":t[5]||(t[5]=e=>$e(L).p=e),"page-size":$e(L).limit,"onUpdate:pageSize":t[6]||(t[6]=e=>$e(L).limit=e),"item-count":$e(P).total,"store-key":"site-php-page",onRefresh:V},null,8,["page","page-size","item-count"])])),_:1}),me(p,{show:$e(x).show,"onUpdate:show":t[7]||(t[7]=e=>$e(x).show=e),title:$e(x).title,width:640,"min-height":400,footer:!0,data:{onRefresh:v},component:$e(l)},null,8,["show","title","data","component"]),me(p,{show:$e(w).show,"onUpdate:show":t[8]||(t[8]=e=>$e(w).show=e),title:$e(w).title},{default:Se((()=>[we("div",Sa,[me(ha,{"site-info":$e(w).siteInfo,config:$e(w).config},null,8,["site-info","config"])])])),_:1},8,["show","title"])])),_:1},8,["install"])])),_:1})}}}),Pa=Object.freeze(Object.defineProperty({__proto__:null,default:ka},Symbol.toStringTag,{value:"Module"}));e("i",Pa)}}}));