System.register(["./index.vue_vue_type_script_setup_true_lang-legacy.js?v=1764830988434","./index-legacy97.js?v=1764830988434","./vue-legacy.js?v=1764830988434","./page_layout-legacy.js?v=1764830988434","./naive-legacy.js?v=1764830988434","./__commonjsHelpers__-legacy.js?v=1764830988434","./common-legacy.js?v=1764830988434","./public-legacy.js?v=1764830988434"],function(e,a){"use strict";var r,l,t,n,o,d,s,c,u,p,i,v,_,f,x,g,S,m,y,h,b,w,k;return{setters:[e=>{r=e._},e=>{l=e._},e=>{t=e.k,n=e.P,o=e.r,d=e.e,s=e.R,c=e.V,u=e.W,p=e.a3,i=e.j,v=e.S,_=e.a4,f=e.au,x=e.H,g=e.U,S=e.N},e=>{m=e.m,y=e.dB,h=e.p},e=>{b=e.dk,w=e.da,k=e.dR},null,null,null],execute:function(){var a=document.createElement("style");a.textContent=".n-alert[data-v-a1f4ee4d]{margin-bottom:16px;--n-content-text-color: #20a53a;--n-color: #e9f8ec}.drag-box[data-v-a1f4ee4d]{width:100%;padding:5px;border:2px dashed #ccc;border-radius:6px}.hover[data-v-a1f4ee4d]{border-color:#20a53a}\n/*$vite$:1*/",document.head.appendChild(a);const L={class:"p-20px"};e("default",h(t({__name:"index",props:{onRefresh:{}},setup(e,{expose:a}){const{t:t}=n(),h=e,{onRefresh:j}=h,$=o(!1),D=o(!1),R=(e,a)=>{a.preventDefault(),$.value="key"!==e&&$.value,D.value="cert"!==e&&D.value;const r=a.dataTransfer?.files;if(!r||0===r.length)return m.error(t("SSL.index_38"));const l=r[0],n=l.name.split(".").pop()?.toLowerCase();if(![".pem",".crt",".cer",".key",".der",".pfx",".p12",".p7b",".p7c",".csr"].includes(`.${n}`))return m.error(t("SSL.index_38"));if(window.FileReader){const a=new FileReader;a.onload=a=>{a.target?.result&&(U[e]=a.target.result)},a.onerror=()=>{m.error(t("SSL.index_39"))},a.readAsText(l)}else m.error(t("SSL.index_40"))},C=o(null),U=d({key:"",cert:""}),F={key:{required:!0,trigger:"change",message:t("SSL.index_35")},cert:{required:!0,trigger:"change",message:t("SSL.index_37")}};return a({onConfirm:async()=>{await(C.value?.validate()),await y(S(U)),m.success(t("Component.UploadFile.index_9")),j?.()}}),(e,a)=>{const t=b,n=l,o=k,d=w,S=r;return c(),s("div",L,[u(t,{type:"success","show-icon":!1},{default:p(()=>[i(_(e.$t("SSL.index_33"))+" ",1),a[8]||(a[8]=v("div",{class:"pt-5px"},"Supported formats: pem, crt, cer, key, der, pfx, p12, p7b, p7c, csr. ",-1))]),_:1,__:[8]}),u(S,{ref_key:"formRef",ref:C,model:g(U),rules:F,"label-placement":"top"},{default:p(()=>[u(d,{class:"w-full flex-nowrap!"},{default:p(()=>[u(o,{label:e.$t("SSL.index_34"),path:"key",class:"w-full"},{default:p(()=>[v("div",{class:x(["drag-box",{hover:g($)}]),onDrop:a[1]||(a[1]=e=>R("key",e)),onDragover:a[2]||(a[2]=f(e=>$.value=!0,["prevent"])),onDragleave:a[3]||(a[3]=f(e=>$.value=!1,["prevent"]))},[u(n,{value:g(U).key,"onUpdate:value":a[0]||(a[0]=e=>g(U).key=e),rows:16,placeholder:e.$t("SSL.index_35")},null,8,["value","placeholder"])],34)]),_:1},8,["label"]),u(o,{label:e.$t("SSL.index_36"),path:"cert",class:"w-full"},{default:p(()=>[v("div",{class:x(["drag-box",{hover:g(D)}]),onDrop:a[5]||(a[5]=e=>R("cert",e)),onDragover:a[6]||(a[6]=f(e=>D.value=!0,["prevent"])),onDragleave:a[7]||(a[7]=f(e=>D.value=!1,["prevent"]))},[u(n,{value:g(U).cert,"onUpdate:value":a[4]||(a[4]=e=>g(U).cert=e),rows:16,placeholder:e.$t("SSL.index_37")},null,8,["value","placeholder"])],34)]),_:1},8,["label"])]),_:1})]),_:1},8,["model"])])}}}),[["__scopeId","data-v-a1f4ee4d"]]))}}});
