import{n as o,k as c,o as h,l as a,K as u,aM as l}from"./entry-1ceb179.js";const f=/^\.?\//;function i(t="",e){return t.endsWith("/")?t:t+"/"}function g(t=""){return t.startsWith("/")}function m(t=""){return g(t)?t:"/"+t}function d(t){return t&&t!=="/"}function p(t,...e){let r=t||"";for(const n of e.filter(s=>d(s)))if(r){const s=n.replace(f,"");r=i(r)+s}else r=n;return r}const _="img",y={__name:"ProseImg",props:{src:{type:String,default:""},alt:{type:String,default:""},width:{type:[String,Number],default:void 0},height:{type:[String,Number],default:void 0}},setup(t){const e=t,r=o(()=>{if(e.src?.startsWith("/")&&!e.src.startsWith("//")){const n=m(i(l().app.baseURL));if(n!=="/"&&!e.src.startsWith(n))return p(n,e.src)}return e.src});return(n,s)=>(h(),c(u(a(_)),{src:a(r),alt:e.alt,width:e.width,height:e.height},null,8,["src","alt","width","height"]))}};export{y as default};
