drill.init(async(e,i)=>{await e("./image.css");let t=await e("util/selecteSource"),a=await e("util/syncPannelSelected"),{code:c}=await e("./image.dcode"),l=$(c),{pnameEle:p,picEle:h,picWidthEle:n,picHeightEle:d,eqRatioBtn:s}=l.marks,r=$.xdata({pname:"",picUrl:"",picWidth:"",picHeight:""});return r.watch("pname",e=>p.text=e.val),r.watch("picUrl",e=>{e.val?h.style["background-image"]=`url(${e.val})`:h.style["background-image"]=""}),r.watch("picWidth",e=>{n.text=e.val}),r.watch("picHeight",e=>d.text=e.val),a(i,r,e=>{e&&"p-pic"==e.tag?l.display="":l.display="none"}),h.on("click",async e=>{let a=await t();if(a){let e=i.seek("[selected=1]")[0];e.picUrl=a.url,e.pname=a.name,(()=>{let i=new Image;i.onload=function(){e.picWidth=i.width,e.picHeight=i.height,e=null},i.src=a.url})()}}),s.on("click",e=>{let t=i.seek("[selected=1]")[0];t.h.includes("bw")?t.h=(r.picHeight/r.picWidth*100).toFixed(2)+"bw":t.h.includes("px")?t.h=Math.floor(r.picHeight/r.picWidth*parseInt(t.w))+"px":t.h.includes("%")&&(t.h=Math.floor(r.picHeight/r.picWidth*parseInt(t.w))+"%")}),l});