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

2 lines
9.3 KiB
JavaScript

System.register(["./index-legacy-sO5zj2jA.js?v=1773287522785","./index-legacy-Cv0QQQJ6.js?v=1773287522785","./index-legacy-De9vt8IT.js?v=1773287522785","./index-legacy-DaNJUJqN.js?v=1773287522785","./naive-ui-legacy-BW82sq8q.js?v=1773287522785","./vue-core-legacy-Cn1vuJ3s.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-legacy-DQdImDha.js?v=1773287522785","./useLoading-legacy-IiShPpjk.js?v=1773287522785","./php-legacy-BZUQ59eS.js?v=1773287522785","./theme-monokai-legacy-fuYB_bfX.js?v=1773287522785","./ace-legacy-ConAV8RQ.js?v=1773287522785","./prismjs-legacy-BN0FEcG9.js?v=1773287522785","./file-legacy-Bt6Hxu9s.js?v=1773287522785"],(function(e,l){"use strict";var a,n,t,i,s,d,r,o,u,p,c,_,v,P,h,f,g,x,b,m,y,w,C,S,I,k,H,$,j,R,F,U,X,N,D,L,B,q,E,T,Z,z,A,O,W,M,Q;return{setters:[e=>{a=e._},e=>{n=e._},e=>{t=e.u},e=>{i=e.default},e=>{s=e.B,d=e.a1,r=e.a6,o=e.a8,u=e.k,p=e.b,c=e.a9},e=>{_=e.k,v=e.R,P=e.r,h=e.o,f=e.$,g=e.Z,x=e.a0,b=e.S,m=e.X,y=e._,w=e.a9,C=e.j,S=e.aa,I=e.n,k=e.e,H=e.N,$=e.a8,j=e.F,R=e.ak},e=>{F=e._},e=>{U=e._},e=>{X=e.hS,N=e.i,D=e.n,L=e.ao,B=e.hT,q=e.cm,E=e.hU,T=e.m,Z=e.l},e=>{z=e.u},e=>{A=e.N,O=e.O,W=e.P,M=e.Q,Q=e.R},null,null,null,null],execute:function(){const l={class:"mt-12px"},V=_({__name:"DefaultPage",setup(e){const{t:a}=v(),d=t(),r=P(null),o=P("index"),u=new Map([["index",{label:a("Site.PHP.index_51"),path:"/www/server/panel/data/defaultDoc.html"}],["404",{label:a("Site.PHP.index_52"),path:"/www/server/panel/data/404.html"}],["blank",{label:a("Site.PHP.index_53"),path:"nginx"===d.web.type?"/www/server/nginx/html/index.html":"/www/server/apache/htdocs/index.html"}],["stop",{label:a("Site.PHP.index_54"),path:"/www/server/stop/index.html"}]]),p=(()=>{const e=[];return u.forEach(((l,a)=>{e.push({key:a,label:l.label})})),e})(),c=()=>u.get(o.value)?.path||"",_=P(c()),k=()=>{_.value=c()},H=()=>{I((()=>{r.value?.getContent()}))},$=async()=>{r.value?.saveFile()};return h((()=>{r.value?.getContent()})),(e,a)=>{const t=n,d=s;return f(),g("div",null,[x(t,{value:b(o),"onUpdate:value":[a[0]||(a[0]=e=>m(o)?o.value=e:null),k],options:b(p),onClick:H},null,8,["value","options"]),x(i,{ref_key:"configRef",ref:r,path:b(_),"onUpdate:path":a[1]||(a[1]=e=>m(_)?_.value=e:null),height:440,"show-encoding":!0},null,8,["path"]),y("div",l,[x(d,{type:"primary",onClick:$},{default:w((()=>[C(S(e.$t("Site.Cert.index_60")),1)])),_:1})])])}}}),G={class:"w-300px"},J=_({__name:"DefaultSite",setup(e,{expose:l}){const{t:a}=v(),n=P(null),{loading:t,setLoading:i}=z(),o=k({name:"0"}),u=P([]),p=async()=>{try{i(!0);const{message:e}=await X();if(N(e)){const{sites:l,defaultSite:a}=e;u.value=D(l)?l.map((e=>({label:e.name,value:e.name}))):[],c(),o.name=L(a)?a:"0"}}finally{i(!1)}},c=()=>{u.value.unshift({label:a("Site.PHP.index_58"),value:"0"})},_=async()=>{await(n.value?.validate()),await B(H(o))};return c(),p(),l({init:p}),(e,l)=>{const a=r,i=d,p=s,c=U,v=F;return f(),g("div",null,[x(c,{ref_key:"formRef",ref:n,model:b(o)},{default:w((()=>[x(i,{label:e.$t("Site.PHP.index_11")},{default:w((()=>[y("div",G,[x(a,{value:b(o).name,"onUpdate:value":l[0]||(l[0]=e=>b(o).name=e),class:"name-select",loading:b(t),options:b(u)},null,8,["value","loading","options"])])])),_:1},8,["label"]),x(i,{label:" "},{default:w((()=>[x(p,{type:"primary",onClick:_},{default:w((()=>[C(S(e.$t("Public.Btn.Save")),1)])),_:1})])),_:1})])),_:1},8,["model"]),x(v,{class:"mt-20px"},{default:w((()=>[y("li",null,S(e.$t("Site.PHP.index_56")),1),y("li",null,S(e.$t("Site.PHP.index_57")),1)])),_:1})])}}}),K={class:"w-300px"},Y=_({__name:"PhpVersion",setup(e,{expose:l}){const{t:a}=v(),n=P(null),{loading:t,setLoading:i}=z(),o=k({php_version:null}),u={php_version:{required:!0,message:a("Site.PHP.index_67"),trigger:"change"}},p=P([]),c=async()=>{try{i(!0);const{message:e}=await q();if(N(e)){const l=D(e.versions)?e.versions:[];p.value=l.map((e=>({label:e.name,value:e.version}))),N(e.select)&&(o.php_version=`${e.select.version}`)}}finally{i(!1)}},_=async()=>{await(n.value?.validate());const e=(()=>{const e=o.php_version;if(null===e)throw T.error(a("Site.PHP.index_67")),new Error(a("Site.PHP.index_67"));return{php_version:e}})();await E(e)};return c(),l({init:c}),(e,l)=>{const a=r,i=d,c=s,v=U,P=F;return f(),g("div",null,[x(v,{ref_key:"formRef",ref:n,model:b(o),rules:u},{default:w((()=>[x(i,{label:e.$t("Site.PHP.index_55"),path:"php_version"},{default:w((()=>[y("div",K,[x(a,{value:b(o).php_version,"onUpdate:value":l[0]||(l[0]=e=>b(o).php_version=e),class:"php-version-select",loading:b(t),options:b(p)},null,8,["value","loading","options"])])])),_:1},8,["label"]),x(i,{label:" "},{default:w((()=>[x(c,{type:"primary",onClick:_},{default:w((()=>[C(S(e.$t("Public.Btn.Save")),1)])),_:1})])),_:1})])),_:1},8,["model"]),x(P,{class:"mt-20px"},{default:w((()=>[y("li",null,S(e.$t("Site.PHP.index_68")),1),y("li",null,S(e.$t("Site.PHP.index_69")),1)])),_:1})])}}}),ee={class:"w-300px"},le=_({__name:"Https",setup(e,{expose:l}){const{loading:a,setLoading:n}=z(),t=k({value:!1}),i=async()=>{try{n(!0),await A()}catch{t.value=!t.value}finally{n(!1)}},s=async()=>{try{n(!0);const{message:e}=await O();N(e)&&(t.value=e.result)}finally{n(!1)}};return s(),l({init:s}),(e,l)=>{const n=o,s=d,r=U,u=F;return f(),g("div",null,[x(r,{model:b(t)},{default:w((()=>[x(s,{label:e.$t("Site.PHP.index_86")},{default:w((()=>[y("div",ee,[x(n,{value:b(t).value,"onUpdate:value":[l[0]||(l[0]=e=>b(t).value=e),i],loading:b(a)},null,8,["value","loading"])])])),_:1},8,["label"])])),_:1},8,["model"]),x(u,{class:"mt-8px"},{default:w((()=>[y("li",null,S(e.$t("Site.PHP.index_87")),1),y("li",null,S(e.$t("Site.PHP.index_88")),1)])),_:1})])}}}),ae={class:"text-font2"},ne={class:"text-#6c7688 p-10px rounded-10px border-solid border-2px border-[var(--site-global-ip-white-ips-border)]"},te=["textContent"],ie=_({__name:"global",setup(e,{expose:l}){const{loading:a,setLoading:n}=z(),{loading:t,setLoading:i}=z(),_=k({cdn_ip_parse:!1,cdn_ip_parse_header:null,cdn_ip_white_ips:"Cf-Connecting-IP"}),v=[{value:"X-Forwarded-For",label:"X-Forwarded-For"},{value:"X-Real-IP",label:"X-Real-IP"},{value:"X-Forwarded",label:"X-Forwarded"},{value:"Forwarded-For",label:"Forwarded-For"},{value:"Forwarded",label:"Forwarded"},{value:"True-Client-IP",label:"True-Client-IP"},{value:"Client-IP",label:"Client-IP"},{value:"Ali-Cdn-Real-IP",label:"Ali-Cdn-Real-IP"},{value:"Cdn-Src-IP",label:"Cdn-Src-IP"},{value:"Cdn-Real-IP",label:"Cdn-Real-IP"},{value:"Cf-Connecting-IP",label:"Cf-Connecting-IP"},{value:"X-Cluster-Client-IP",label:"X-Cluster-Client-IP"},{value:"Wl-Proxy-Client-IP",label:"Wl-Proxy-Client-IP"},{value:"Proxy-Client-IP",label:"Proxy-Client-IP"}],P=async()=>{try{i(!0);const{message:e}=await W({header_cdn:_.cdn_ip_parse_header});N(e)&&(_.cdn_ip_white_ips=e.result)}finally{i(!1)}},h=async()=>{const e={cdn_switch:_.cdn_ip_parse?1:0,header_cdn:_.cdn_ip_parse_header,white_ips:_.cdn_ip_white_ips};M(e)},m=async()=>{try{n(!0);const{message:e}=await Q();N(e)&&(_.cdn_ip_parse=e.cdn_status,_.cdn_ip_parse_header=e.header_cdn||"Cf-Connecting-IP",_.cdn_ip_white_ips=e.white_ips,_.cdn_ip_parse||P())}finally{n(!1)}};return m(),l({init:m}),(e,l)=>{const n=o,i=u,m=d,I=r,k=Z,H=p,F=s,X=U,N=c;return f(),$(N,{show:b(a)},{default:w((()=>[x(X,{model:b(_)},{default:w((()=>[x(m,{label:e.$t("CDN Resolution")},{default:w((()=>[x(i,{class:"items-center"},{default:w((()=>[x(n,{value:b(_).cdn_ip_parse,"onUpdate:value":l[0]||(l[0]=e=>b(_).cdn_ip_parse=e)},null,8,["value"]),y("span",ae,"*"+S(e.$t("Only Nginx service is supported")),1)])),_:1})])),_:1},8,["label"]),b(_).cdn_ip_parse?(f(),g(j,{key:0},[x(m,{label:e.$t("Request header")},{default:w((()=>[x(i,{class:"items-center"},{default:w((()=>[x(I,{filterable:"",class:"w-400px",value:b(_).cdn_ip_parse_header,"onUpdate:value":[l[1]||(l[1]=e=>b(_).cdn_ip_parse_header=e),P],options:v},null,8,["value"])])),_:1})])),_:1},8,["label"]),x(m,{label:e.$t("CDN IP whitelist")},{default:w((()=>[x(i,{class:"flex-col! bg-[var(--site-global-ip-white-ips-bg)] p-12px rounded-10px border-solid border-2px border-[var(--site-global-ip-white-ips-border)] w-500px"},{default:w((()=>[y("div",ne,[x(k,{name:"base-info",size:"17",color:"#ffae45"}),y("span",{textContent:S(e.$t("Each line contains one IP address; nginx will only replace the IP addresses in the request header from the following IP ranges."))},null,8,te)]),x(H,{loading:b(t),value:b(_).cdn_ip_white_ips,"onUpdate:value":l[2]||(l[2]=e=>b(_).cdn_ip_white_ips=e),placeholder:e.$t("Ftp.Placeholder.Index_3"),type:"textarea",autosize:{minRows:6,maxRows:12},"input-props":{spellcheck:!1}},null,8,["loading","value","placeholder"])])),_:1})])),_:1},8,["label"])],64)):R("",!0),x(m,{label:" "},{default:w((()=>[x(F,{type:"primary",onClick:h},{default:w((()=>[C(S(e.$t("Public.Btn.Save")),1)])),_:1})])),_:1})])),_:1},8,["model"])])),_:1},8,["show"])}}}),se={class:"h-full"};e("default",_({__name:"index",props:{menu:{type:String,default:"default-page"}},setup(e){const{t:l}=v(),n=P(e.menu),t=[{key:"default-page",label:l("Site.PHP.index_5"),component:V},{key:"default-site",label:l("Site.PHP.index_6"),component:J},{key:"php-version",label:l("Site.PHP.index_7"),component:Y},{key:"https",label:l("Site.PHP.index_86"),component:le},{key:"global",label:l("CDN Resolution"),component:ie}];return(e,l)=>{const i=a;return f(),g("div",se,[x(i,{value:b(n),"onUpdate:value":l[0]||(l[0]=e=>m(n)?n.value=e:null),data:t},null,8,["value"])])}}}))}}}));