import{q as P}from"./scene.17037962789732.js";import"./scene.1703796278973.js";const I=(i,r)=>new Promise(f=>{const t=r.branches.filter(o=>!!o);P({...r,branches:t},i).then(o=>{o.success&&f(o.result)})}),R=(i,r)=>{var o,u;const f=(i==null?void 0:i.properties)||[],t=(i==null?void 0:i.functions)||[];if((r==null?void 0:r.messageType)==="READ_PROPERTY"&&((o=r==null?void 0:r.properties)!=null&&o[0])){const n=f.find(c=>{var p;return c.id===((p=r==null?void 0:r.properties)==null?void 0:p[0])});return n==null?void 0:n.id}else if((r==null?void 0:r.messageType)==="INVOKE_FUNCTION"&&(r!=null&&r.functionId)){const n=t.find(c=>c.id===(r==null?void 0:r.functionId));return n==null?void 0:n.id}else if((r==null?void 0:r.messageType)==="WRITE_PROPERTY"){const n=(u=Object.keys(r==null?void 0:r.properties))==null?void 0:u[0];if(n){const c=f.find(p=>p.id===n);return c==null?void 0:c.id}return!1}return!1};export{I as g,R as i};
