import{t as p}from"./debounce-Xd493GvO.js";import{r as i}from"./request-CEvu378m.js";import{d as v}from"./index-M_JNBppB.js";import{r as d,ax as q,c as f,w as m,j as _,X as w,ag as V,y as j,z as x}from"./vue-BJk78QHK.js";import"./element-3_pOinej.js";import"./utils-YI6ye1sf.js";import"./threejs-BafxXW5-.js";import"./vxe-Dx3zSILm.js";const z=Object.assign({name:"PercentPond"},{__name:"PercentPond",props:{propValue:{type:Object,default:()=>({})},request:{type:Object,default:()=>({})},element:{type:Object,default:()=>({})}},setup(g){const e=g,o=d(null),r=d(0),a=q(),h=f(()=>{const t=e.element.style.width,n=e.element.style.height;return{width:t,height:n}}),y=f(()=>v(e.propValue.config));return m(h,p(t=>{r.value++},500),{deep:!0}),m(()=>e.propValue,p(t=>{r.value++},500),{deep:!0}),_(()=>{var t,n;e.request&&(o.value=i(e.request,e.element.propValue.config,"value","")),((n=(t=e.request)==null?void 0:t.global)==null?void 0:n.length)>0&&a.watch(()=>a.state.globalKey,()=>{e.request.global.forEach(s=>{const u=a.state.globalKey.findIndex(l=>l.globalKey===s);if(u>-1){const l=[a.state.globalKey[u].globalKey,a.state.globalKey[u].globalValue],c=e.request.data.findIndex(b=>b[0]===l[0]);c>-1?e.request.data[c][1]=l[1]:e.request.data.push(l)}}),o.value(),o.value=i(e.request,e.element.propValue.config,"value","")},{deep:!0})}),w(()=>{e.request&&o.value&&o.value()}),(t,n)=>{const s=V("dv-percent-pond");return x(),j(s,{key:r.value,config:y.value,style:{width:"100%",height:"100%"}},null,8,["config"])}}});export{z as default};
