var VueDemi=function(n,r,v){if(n.install)return n;if(!r)return console.error("[vue-demi] no Vue instance found, please be sure to import `vue` before `vue-demi`."),n;if(r.version.slice(0,4)==="2.7."){let o=function(i,c){var f,y={},h={config:r.config,use:r.use.bind(r),mixin:r.mixin.bind(r),component:r.component.bind(r),provide:function(u,d){return y[u]=d,this},directive:function(u,d){return d?(r.directive(u,d),h):r.directive(u)},mount:function(u,d){return f||(f=new r(Object.assign({propsData:c},i,{provide:Object.assign(y,i.provide)})),f.$mount(u,d),f)},unmount:function(){f&&(f.$destroy(),f=void 0)}};return h};var U=o;for(var e in r)n[e]=r[e];n.isVue2=!0,n.isVue3=!1,n.install=function(){},n.Vue=r,n.Vue2=r,n.version=r.version,n.warn=r.util.warn,n.createApp=o}else if(r.version.slice(0,2)==="2.")if(v){for(var e in v)n[e]=v[e];n.isVue2=!0,n.isVue3=!1,n.install=function(){},n.Vue=r,n.Vue2=r,n.version=r.version}else console.error("[vue-demi] no VueCompositionAPI instance found, please be sure to import `@vue/composition-api` before `vue-demi`.");else if(r.version.slice(0,2)==="3."){for(var e in r)n[e]=r[e];n.isVue2=!1,n.isVue3=!0,n.install=function(){},n.Vue=r,n.Vue2=void 0,n.version=r.version,n.set=function(o,i,c){return Array.isArray(o)?(o.length=Math.max(o.length,i),o.splice(i,1,c),c):(o[i]=c,c)},n.del=function(o,i){if(Array.isArray(o)){o.splice(i,1);return}delete o[i]}}else console.error("[vue-demi] Vue version "+r.version+" is unsupported.");return n}(this.VueDemi=this.VueDemi||(typeof VueDemi<"u"?VueDemi:{}),this.Vue||(typeof Vue<"u"?Vue:void 0),this.VueCompositionAPI||(typeof VueCompositionAPI<"u"?VueCompositionAPI:void 0));(function(n,r,v,e){"use strict";var U=Object.defineProperty,o=Object.defineProperties,i=Object.getOwnPropertyDescriptors,c=Object.getOwnPropertySymbols,f=Object.prototype.hasOwnProperty,y=Object.prototype.propertyIsEnumerable,h=(a,t,s)=>t in a?U(a,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):a[t]=s,u=(a,t)=>{for(var s in t||(t={}))f.call(t,s)&&h(a,s,t[s]);if(c)for(var s of c(t))y.call(t,s)&&h(a,s,t[s]);return a},d=(a,t)=>o(a,i(t));const R=v.default||v;function E(a,t,s={}){const{validateOption:S={},immediate:P=!0,manual:b=!1}=s,A=r.toRef(a),p=e.shallowRef(null),_=e.ref(!0),w=e.ref(!P||b),j=e.computed(()=>{var l;return((l=p.value)==null?void 0:l.errors)||[]}),I=e.computed(()=>{var l;return((l=p.value)==null?void 0:l.fields)||{}}),g=e.computed(()=>new R(r.toValue(t))),x=async()=>{_.value=!1,w.value=!1;try{await g.value.validate(A.value,S),w.value=!0,p.value=null}catch(l){p.value=l}finally{_.value=!0}return{pass:w.value,errorInfo:p.value,errors:j.value,errorFields:I.value}};b||e.watch([A,g],()=>x(),{immediate:P,deep:!0});const F={isFinished:_,pass:w,errors:j,errorInfo:p,errorFields:I,execute:x};function $(){return new Promise((l,O)=>{r.until(_).toBe(!0).then(()=>l(F)).catch(B=>O(B))})}return d(u({},F),{then(l,O){return $().then(l,O)}})}n.useAsyncValidator=E})(this.VueUse=this.VueUse||{},VueUse,AsyncValidator,VueDemi);