text: var t=(i,s,n)=>new Promise((r,c)=>{var d=o=>{try{a(n.next(o))}catch(l){c(l)}},e=o=>{try{a(n.throw(o))}catch(l){c(l)}},a=o=>o.done?r(o.value):Promise.resolve(o.value).then(d,e);a((n=n.apply(i,s)).next())});import{ai as u,av as h,aA as y}from"./index.9eb02b52.js";import{r as f,aj as F,u as m,S as w,$ as p}from"./vendor.7bee64cc.js";function g(i){const s=f(null),n=f(!1);function r(){return t(this,null,function*(){const e=m(s);return e||h("The form instance has not been obtained, please make sure that the form has been rendered when performing the form operation!"),yield p(),e})}function c(e){F(()=>{s.value=null,n.value=null}),!(m(n)&&u()&&e===m(s))&&(s.value=e,n.value=!0,w(()=>i,()=>{i&&e.setProps(y(i))},{immediate:!0,deep:!0}))}return[c,{scrollToField:(e,a)=>t(this,null,function*(){(yield r()).scrollToField(e,a)}),setProps:e=>t(this,null,function*(){(yield r()).setProps(e)}),updateSchema:e=>t(this,null,function*(){(yield r()).updateSchema(e)}),resetSchema:e=>t(this,null,function*(){(yield r()).resetSchema(e)}),clearValidate:e=>t(this,null,function*(){(yield r()).clearValidate(e)}),resetFields:()=>t(this,null,function*(){r().then(e=>t(this,null,function*(){yield e.resetFields()}))}),removeSchemaByFiled:e=>t(this,null,function*(){var a;(a=m(s))==null||a.removeSchemaByFiled(e)}),getFieldsValue:()=>{var e;return(e=m(s))==null?void 0:e.getFieldsValue()},setFieldsValue:e=>t(this,null,function*(){(yield r()).setFieldsValue(e)}),appendSchemaByField:(e,a,o)=>t(this,null,function*(){(yield r()).appendSchemaByField(e,a,o)}),submit:()=>t(this,null,function*(){return(yield r()).submit()}),validate:e=>t(this,null,function*(){return(yield r()).validate(e)}),validateFields:e=>t(this,null,function*(){return(yield r()).validateFields(e)})}]}export{g as u};
  