System.register(["./public-legacy.js?v=1764830988434","./index.vue_vue_type_script_setup_true_lang-legacy.js?v=1764830988434","./page_layout-legacy.js?v=1764830988434","./site-legacy.js?v=1764830988434","./naive-legacy.js?v=1764830988434","./vue-legacy.js?v=1764830988434"],function(e,t){"use strict";var a,l,i,s,u,n,r,d,_,o,c,p,f,x,m,v,g,h,b,y,S,k;return{setters:[e=>{a=e._},e=>{l=e._},e=>{i=e.d},e=>{s=e.aG,u=e.Y},e=>{n=e.dR,r=e.au,d=e._,_=e.aC},e=>{o=e.k,c=e.P,p=e.t,f=e.r,x=e.e,m=e.R,v=e.V,g=e.W,h=e.U,b=e.a3,y=e.S,S=e.j,k=e.a4}],execute:function(){const t={class:"w-300px"},w={class:"w-300px"},$={class:"w-300px"},j={class:"flex flex-col"};e("_",o({__name:"form",props:{site:{}},emits:["changeHotlink"],setup(e,{expose:o,emit:C}){const{t:R}=c(),U=C,E=p(e,"site"),L=f(null),H=x({fix:"",domains:"",return_rule:"",status:!1,http_status:!1}),z={fix:{trigger:["blur","change"],validator:()=>""!==H.fix.trim()||new Error(R("Site.RulesError.index_330"))},return_rule:{trigger:["blur","change"],validator:()=>""!==H.return_rule.trim()||new Error(R("Site.RulesError.index_330"))}},G=()=>{V()},P=()=>{V()},V=async()=>{await(L.value?.validate()),await s({id:E.value.id,name:E.value.name,fix:H.fix,domains:H.domains.trim().split("\n").join(","),return_rule:H.return_rule,status:H.status,http_status:H.http_status}),U("changeHotlink",H.status),W()},W=async()=>{const{message:e}=await u({id:E.value.id,name:E.value.name});i(e)&&(H.fix=e.fix,H.domains=e.domains.split(",").join("\n"),H.return_rule=e.return_rule,H.status=e.status,H.http_status="true"===e.http_status||!0===e.http_status)};return W(),o({init:W}),(e,i)=>{const s=r,u=n,o=d,c=_,p=l,f=a;return v(),m("div",null,[g(p,{ref_key:"formRef",ref:L,class:"px-8px",model:h(H),rules:z},{default:b(()=>[g(u,{label:e.$t("Site.Lable.index_6"),path:"fix"},{default:b(()=>[y("div",t,[g(s,{value:h(H).fix,"onUpdate:value":i[0]||(i[0]=e=>h(H).fix=e),disabled:h(H).status,placeholder:""},null,8,["value","disabled"])])]),_:1},8,["label"]),g(u,{label:e.$t("Site.Lable.index_7")},{default:b(()=>[y("div",w,[g(s,{value:h(H).domains,"onUpdate:value":i[1]||(i[1]=e=>h(H).domains=e),type:"textarea",autosize:{minRows:6,maxRows:6},placeholder:""},null,8,["value"])])]),_:1},8,["label"]),g(u,{label:e.$t("Site.Lable.index_13"),path:"return_rule"},{default:b(()=>[y("div",$,[g(s,{value:h(H).return_rule,"onUpdate:value":i[2]||(i[2]=e=>h(H).return_rule=e),disabled:h(H).status,placeholder:""},null,8,["value","disabled"])])]),_:1},8,["label"]),g(u,{label:" "},{default:b(()=>[y("div",j,[g(o,{checked:h(H).status,"onUpdate:checked":[i[3]||(i[3]=e=>h(H).status=e),G]},{default:b(()=>[S(k(e.$t("Site.Config.index_94")),1)]),_:1},8,["checked"]),g(o,{checked:h(H).http_status,"onUpdate:checked":[i[4]||(i[4]=e=>h(H).http_status=e),P],class:"mt-16px"},{default:b(()=>[S(k(e.$t("Site.Config.index_95")),1)]),_:1},8,["checked"])])]),_:1}),g(u,{label:" ","show-feedback":!1},{default:b(()=>[g(c,{type:"primary",onClick:V},{default:b(()=>[S(k(e.$t("Site.Cert.index_60")),1)]),_:1})]),_:1})]),_:1},8,["model"]),g(f,{class:"mt-20px"},{default:b(()=>[y("li",null,[S(k(e.$t("Site.Config.index_96")),1),i[5]||(i[5]=y("br",null,null,-1)),S(" "+k(e.$t("Site.Config.index_97")),1)]),y("li",null,k(e.$t("Site.Config.index_98")),1),y("li",null,k(e.$t("Site.Config.index_99")),1)]),_:1})])}}}))}}});
