import{d as e,a as r,c as t,U as a,e as l,g as o,k as s,f as i}from"./index-ip5gDR6L.js";import{_ as c}from"./_plugin-vue_export-helper-BCo6x5W8.js";const n=["innerHTML"],u=c(e({__name:"index",props:{size:{default:500},themeColor:{default:"var(--el-color-primary)"},src:{}},setup(e){const c=e,u=r(""),p=t(()=>{const e="number"==typeof c.size?`${c.size}px`:c.size;return{width:e,height:e}}),v={"#C7DEFF":"var(--el-color-primary-light-6)","#071F4D":"var(--el-color-primary-dark-2)","#00E4E5":"var(--el-color-primary-light-1)","#006EFF":"var(--el-color-primary)","#fff":"var(--default-box-color)","#ffffff":"var(--default-box-color)","#DEEBFC":"var(--el-color-primary-light-7)"},f=()=>{return e=this,r=null,t=function*(){if(c.src)try{const e=yield fetch(c.src);if(!e.ok)throw new Error(`HTTP error! status: ${e.status}`);const r=yield e.text();u.value=(e=>Object.entries(v).reduce((e,[r,t])=>{const a=new RegExp(`fill="${r}"`,"gi"),l=new RegExp(`stroke="${r}"`,"gi");return e.replace(a,`fill="${t}"`).replace(l,`stroke="${t}"`)},e))(r)}catch(e){u.value=""}else u.value=""},new Promise((a,l)=>{var o=e=>{try{i(t.next(e))}catch(r){l(r)}},s=e=>{try{i(t.throw(e))}catch(r){l(r)}},i=e=>e.done?a(e.value):Promise.resolve(e.value).then(o,s);i((t=t.apply(e,r)).next())});var e,r,t};return a(()=>{f()}),(r,t)=>(i(),l("div",{class:"theme-svg",style:o(p.value)},[e.src?(i(),l("div",{key:0,class:"svg-container",innerHTML:u.value},null,8,n)):s("",!0)],4))}}),[["__scopeId","data-v-14d9c663"]]);export{u as _};
