@archbiz/element-plus 0.1.0 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/element-plus.cjs +3 -15
- package/dist/element-plus.css +8 -0
- package/dist/element-plus.min.js +3 -3
- package/dist/element-plus.umd.js +3 -15
- package/package.json +5 -6
- package/dist/style.css +0 -7
package/dist/element-plus.umd.js
CHANGED
|
@@ -1,21 +1,9 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Archbiz
|
|
3
|
-
* @archbiz/element-plus v0.1.
|
|
3
|
+
* @archbiz/element-plus v0.1.2
|
|
4
4
|
* (c) 2018-2026 Dio Zhu
|
|
5
5
|
* Released under the MIT License.
|
|
6
6
|
*/
|
|
7
|
-
(function(Y,D){typeof exports=="object"&&typeof module!="undefined"?D(exports,require("element-plus"),require("vue"),require("@element-plus/icons-vue"),require("vue-router"),require("vxe-pc-ui")):typeof define=="function"&&define.amd?define(["exports","element-plus","vue","@element-plus/icons-vue","vue-router","vxe-pc-ui"],D):(Y=typeof globalThis!="undefined"?globalThis:Y||self,D(Y.ArchbizKitElementPlus={},Y.ElementPlus,Y.Vue,Y.ElementPlusIconsVue,Y.VueRouter,Y.VxeUI))})(this,function(Y,D,l,ke,ut,Mt){"use strict";var Qw=Object.defineProperty,Zw=Object.defineProperties;var Xw=Object.getOwnPropertyDescriptors;var cn=Object.getOwnPropertySymbols;var As=Object.prototype.hasOwnProperty,Os=Object.prototype.propertyIsEnumerable;var Bi=(Y,D,l)=>D in Y?Qw(Y,D,{enumerable:!0,configurable:!0,writable:!0,value:l}):Y[D]=l,M=(Y,D)=>{for(var l in D||(D={}))As.call(D,l)&&Bi(Y,l,D[l]);if(cn)for(var l of cn(D))Os.call(D,l)&&Bi(Y,l,D[l]);return Y},ne=(Y,D)=>Zw(Y,Xw(D));var xr=(Y,D)=>{var l={};for(var ke in Y)As.call(Y,ke)&&D.indexOf(ke)<0&&(l[ke]=Y[ke]);if(Y!=null&&cn)for(var ke of cn(Y))D.indexOf(ke)<0&&Os.call(Y,ke)&&(l[ke]=Y[ke]);return l};var ve=(Y,D,l)=>Bi(Y,typeof D!="symbol"?D+"":D,l);var ye=(Y,D,l)=>new Promise((ke,ut)=>{var Mt=Ye=>{try{qt(l.next(Ye))}catch(Yt){ut(Yt)}},un=Ye=>{try{qt(l.throw(Ye))}catch(Yt){ut(Yt)}},qt=Ye=>Ye.done?ke(Ye.value):Promise.resolve(Ye.value).then(Mt,un);qt((l=l.apply(Y,D)).next())});var Cs,$s;function un(e){e.useApp((t,r)=>{r.component(D.ElForm.name)||r.use(D.ElForm),r.component(D.ElButton.name)||r.use(D.ElButton),r.component(D.ElRow.name)||r.use(D.ElRow),r.component(D.ElCol.name)||r.use(D.ElCol),r.component(D.ElInput.name)||r.use(D.ElInput),r.component(D.ElInputNumber.name)||r.use(D.ElInputNumber),r.component(D.ElCascader.name)||r.use(D.ElCascader),r.component(D.ElPopover.name)||r.use(D.ElPopover),r.component(D.ElTooltip.name)||r.use(D.ElTooltip),r.component(D.ElAutocomplete.name)||r.use(D.ElAutocomplete),r.component(D.ElCheckboxGroup.name)||r.use(D.ElCheckboxGroup),r.component(D.ElCheckboxButton.name)||r.use(D.ElCheckboxButton),r.component(D.ElRadioGroup.name)||r.use(D.ElRadioGroup),r.component(D.ElRadioButton.name)||r.use(D.ElRadioButton),r.component(D.ElRadio.name)||r.use(D.ElRadio),r.component(D.ElDialog.name)||r.use(D.ElDialog),r.component(D.ElDivider.name)||r.use(D.ElDivider),r.component(D.ElCheckbox.name)||r.use(D.ElCheckbox),r.component(D.ElSelect.name)||r.use(D.ElSelect),r.component(D.ElTree.name)||r.use(D.ElTree),r.component(D.ElUpload.name)||r.use(D.ElUpload),r.component(D.ElSlider.name)||r.use(D.ElSlider),r.component(D.ElRate.name)||r.use(D.ElRate),r.component(D.ElColorPicker.name)||r.use(D.ElColorPicker),r.component(D.ElSwitch.name)||r.use(D.ElSwitch),r.component(D.ElDatePicker.name)||r.use(D.ElDatePicker),r.component(D.ElIcon.name)||r.use(D.ElIcon),r.component(D.ElTimePicker.name)||r.use(D.ElTimePicker),r.component(D.ElProgress.name)||r.use(D.ElProgress),r.component(D.ElInputTag.name)||r.use(D.ElInputTag),r.component(D.ElText.name)||r.use(D.ElText),r.component(D.ElTransfer.name)||r.use(D.ElTransfer),r.component(D.ElTreeSelect.name)||r.use(D.ElTreeSelect),r.component(D.ElMention.name)||r.use(D.ElMention)})}const qt=(e,t)=>{const{AbForm:r}=t||{};r.use(un),e.use(r)};var Ye=typeof global=="object"&&global&&global.Object===Object&&global,Yt=typeof self=="object"&&self&&self.Object===Object&&self,je=Ye||Yt||Function("return this")(),Ge=je.Symbol,ji=Object.prototype,Rs=ji.hasOwnProperty,Ms=ji.toString,Gt=Ge?Ge.toStringTag:void 0;function Ds(e){var t=Rs.call(e,Gt),r=e[Gt];try{e[Gt]=void 0;var n=!0}catch(o){}var i=Ms.call(e);return n&&(t?e[Gt]=r:delete e[Gt]),i}var Ps=Object.prototype,Is=Ps.toString;function Bs(e){return Is.call(e)}var js="[object Null]",Ns="[object Undefined]",Ni=Ge?Ge.toStringTag:void 0;function gt(e){return e==null?e===void 0?Ns:js:Ni&&Ni in Object(e)?Ds(e):Bs(e)}function We(e){return e!=null&&typeof e=="object"}var Vs="[object Symbol]";function Sr(e){return typeof e=="symbol"||We(e)&>(e)==Vs}function Vi(e,t){for(var r=-1,n=e==null?0:e.length,i=Array(n);++r<n;)i[r]=t(e[r],r,e);return i}var Ee=Array.isArray,Li=Ge?Ge.prototype:void 0,Hi=Li?Li.toString:void 0;function zi(e){if(typeof e=="string")return e;if(Ee(e))return Vi(e,zi)+"";if(Sr(e))return Hi?Hi.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}var Ls=/\s/;function Hs(e){for(var t=e.length;t--&&Ls.test(e.charAt(t)););return t}var zs=/^\s+/;function Us(e){return e&&e.slice(0,Hs(e)+1).replace(zs,"")}function Oe(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Ui=NaN,qs=/^[-+]0x[0-9a-f]+$/i,Ys=/^0b[01]+$/i,Gs=/^0o[0-7]+$/i,Ws=parseInt;function qi(e){if(typeof e=="number")return e;if(Sr(e))return Ui;if(Oe(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Oe(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=Us(e);var r=Ys.test(e);return r||Gs.test(e)?Ws(e.slice(2),r?2:8):qs.test(e)?Ui:+e}function Cr(e){return e}var Js="[object AsyncFunction]",Ks="[object Function]",Qs="[object GeneratorFunction]",Zs="[object Proxy]";function dn(e){if(!Oe(e))return!1;var t=gt(e);return t==Ks||t==Qs||t==Js||t==Zs}var fn=je["__core-js_shared__"],Yi=function(){var e=/[^.]+$/.exec(fn&&fn.keys&&fn.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function Xs(e){return!!Yi&&Yi in e}var ec=Function.prototype,tc=ec.toString;function yt(e){if(e!=null){try{return tc.call(e)}catch(t){}try{return e+""}catch(t){}}return""}var rc=/[\\^$.*+?()[\]{}|]/g,nc=/^\[object .+?Constructor\]$/,ic=Function.prototype,oc=Object.prototype,ac=ic.toString,lc=oc.hasOwnProperty,sc=RegExp("^"+ac.call(lc).replace(rc,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function cc(e){if(!Oe(e)||Xs(e))return!1;var t=dn(e)?sc:nc;return t.test(yt(e))}function uc(e,t){return e==null?void 0:e[t]}function bt(e,t){var r=uc(e,t);return cc(r)?r:void 0}var pn=bt(je,"WeakMap"),Gi=Object.create,dc=function(){function e(){}return function(t){if(!Oe(t))return{};if(Gi)return Gi(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}();function fc(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}function pc(){}function hc(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}var mc=800,gc=16,yc=Date.now;function bc(e){var t=0,r=0;return function(){var n=yc(),i=gc-(n-r);if(r=n,i>0){if(++t>=mc)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function wc(e){return function(){return e}}var $r=function(){try{var e=bt(Object,"defineProperty");return e({},"",{}),e}catch(t){}}(),vc=$r?function(e,t){return $r(e,"toString",{configurable:!0,enumerable:!1,value:wc(t),writable:!0})}:Cr,xc=bc(vc);function Wi(e,t){for(var r=-1,n=e==null?0:e.length;++r<n&&t(e[r],r,e)!==!1;);return e}function Sc(e,t,r,n){for(var i=e.length,o=r+-1;++o<i;)if(t(e[o],o,e))return o;return-1}function Cc(e){return e!==e}function $c(e,t,r){for(var n=r-1,i=e.length;++n<i;)if(e[n]===t)return n;return-1}function Tc(e,t,r){return t===t?$c(e,t,r):Sc(e,Cc,r)}function Ec(e,t){var r=e==null?0:e.length;return!!r&&Tc(e,t,0)>-1}var kc=9007199254740991,_c=/^(?:0|[1-9]\d*)$/;function Tr(e,t){var r=typeof e;return t=t==null?kc:t,!!t&&(r=="number"||r!="symbol"&&_c.test(e))&&e>-1&&e%1==0&&e<t}function hn(e,t,r){t=="__proto__"&&$r?$r(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function Wt(e,t){return e===t||e!==e&&t!==t}var Fc=Object.prototype,Ac=Fc.hasOwnProperty;function mn(e,t,r){var n=e[t];(!(Ac.call(e,t)&&Wt(n,r))||r===void 0&&!(t in e))&&hn(e,t,r)}function Oc(e,t,r,n){var i=!r;r||(r={});for(var o=-1,a=t.length;++o<a;){var s=t[o],c=void 0;c===void 0&&(c=e[s]),i?hn(r,s,c):mn(r,s,c)}return r}var Ji=Math.max;function Rc(e,t,r){return t=Ji(t===void 0?e.length-1:t,0),function(){for(var n=arguments,i=-1,o=Ji(n.length-t,0),a=Array(o);++i<o;)a[i]=n[t+i];i=-1;for(var s=Array(t+1);++i<t;)s[i]=n[i];return s[t]=r(a),fc(e,this,s)}}function Mc(e,t){return xc(Rc(e,t,Cr),e+"")}var Dc=9007199254740991;function gn(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Dc}function Dt(e){return e!=null&&gn(e.length)&&!dn(e)}function Pc(e,t,r){if(!Oe(r))return!1;var n=typeof t;return(n=="number"?Dt(r)&&Tr(t,r.length):n=="string"&&t in r)?Wt(r[t],e):!1}function Ic(e){return Mc(function(t,r){var n=-1,i=r.length,o=i>1?r[i-1]:void 0,a=i>2?r[2]:void 0;for(o=e.length>3&&typeof o=="function"?(i--,o):void 0,a&&Pc(r[0],r[1],a)&&(o=i<3?void 0:o,i=1),t=Object(t);++n<i;){var s=r[n];s&&e(t,s,n,o)}return t})}var Bc=Object.prototype;function yn(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||Bc;return e===r}function jc(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var Nc="[object Arguments]";function Ki(e){return We(e)&>(e)==Nc}var Qi=Object.prototype,Vc=Qi.hasOwnProperty,Lc=Qi.propertyIsEnumerable,Er=Ki(function(){return arguments}())?Ki:function(e){return We(e)&&Vc.call(e,"callee")&&!Lc.call(e,"callee")};function Hc(){return!1}var Zi=typeof Y=="object"&&Y&&!Y.nodeType&&Y,Xi=Zi&&typeof module=="object"&&module&&!module.nodeType&&module,zc=Xi&&Xi.exports===Zi,eo=zc?je.Buffer:void 0,Uc=eo?eo.isBuffer:void 0,Jt=Uc||Hc,qc="[object Arguments]",Yc="[object Array]",Gc="[object Boolean]",Wc="[object Date]",Jc="[object Error]",Kc="[object Function]",Qc="[object Map]",Zc="[object Number]",Xc="[object Object]",eu="[object RegExp]",tu="[object Set]",ru="[object String]",nu="[object WeakMap]",iu="[object ArrayBuffer]",ou="[object DataView]",au="[object Float32Array]",lu="[object Float64Array]",su="[object Int8Array]",cu="[object Int16Array]",uu="[object Int32Array]",du="[object Uint8Array]",fu="[object Uint8ClampedArray]",pu="[object Uint16Array]",hu="[object Uint32Array]",ge={};ge[au]=ge[lu]=ge[su]=ge[cu]=ge[uu]=ge[du]=ge[fu]=ge[pu]=ge[hu]=!0,ge[qc]=ge[Yc]=ge[iu]=ge[Gc]=ge[ou]=ge[Wc]=ge[Jc]=ge[Kc]=ge[Qc]=ge[Zc]=ge[Xc]=ge[eu]=ge[tu]=ge[ru]=ge[nu]=!1;function mu(e){return We(e)&&gn(e.length)&&!!ge[gt(e)]}function bn(e){return function(t){return e(t)}}var to=typeof Y=="object"&&Y&&!Y.nodeType&&Y,Kt=to&&typeof module=="object"&&module&&!module.nodeType&&module,gu=Kt&&Kt.exports===to,wn=gu&&Ye.process,Pt=function(){try{var e=Kt&&Kt.require&&Kt.require("util").types;return e||wn&&wn.binding&&wn.binding("util")}catch(t){}}(),ro=Pt&&Pt.isTypedArray,vn=ro?bn(ro):mu,yu=Object.prototype,bu=yu.hasOwnProperty;function no(e,t){var r=Ee(e),n=!r&&Er(e),i=!r&&!n&&Jt(e),o=!r&&!n&&!i&&vn(e),a=r||n||i||o,s=a?jc(e.length,String):[],c=s.length;for(var u in e)(t||bu.call(e,u))&&!(a&&(u=="length"||i&&(u=="offset"||u=="parent")||o&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||Tr(u,c)))&&s.push(u);return s}function io(e,t){return function(r){return e(t(r))}}var wu=io(Object.keys,Object),vu=Object.prototype,xu=vu.hasOwnProperty;function Su(e){if(!yn(e))return wu(e);var t=[];for(var r in Object(e))xu.call(e,r)&&r!="constructor"&&t.push(r);return t}function xn(e){return Dt(e)?no(e):Su(e)}function Cu(e){var t=[];if(e!=null)for(var r in Object(e))t.push(r);return t}var $u=Object.prototype,Tu=$u.hasOwnProperty;function Eu(e){if(!Oe(e))return Cu(e);var t=yn(e),r=[];for(var n in e)n=="constructor"&&(t||!Tu.call(e,n))||r.push(n);return r}function oo(e){return Dt(e)?no(e,!0):Eu(e)}var ku=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,_u=/^\w*$/;function Sn(e,t){if(Ee(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||Sr(e)?!0:_u.test(e)||!ku.test(e)||t!=null&&e in Object(t)}var Qt=bt(Object,"create");function Fu(){this.__data__=Qt?Qt(null):{},this.size=0}function Au(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var Ou="__lodash_hash_undefined__",Ru=Object.prototype,Mu=Ru.hasOwnProperty;function Du(e){var t=this.__data__;if(Qt){var r=t[e];return r===Ou?void 0:r}return Mu.call(t,e)?t[e]:void 0}var Pu=Object.prototype,Iu=Pu.hasOwnProperty;function Bu(e){var t=this.__data__;return Qt?t[e]!==void 0:Iu.call(t,e)}var ju="__lodash_hash_undefined__";function Nu(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Qt&&t===void 0?ju:t,this}function wt(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}wt.prototype.clear=Fu,wt.prototype.delete=Au,wt.prototype.get=Du,wt.prototype.has=Bu,wt.prototype.set=Nu;function Vu(){this.__data__=[],this.size=0}function kr(e,t){for(var r=e.length;r--;)if(Wt(e[r][0],t))return r;return-1}var Lu=Array.prototype,Hu=Lu.splice;function zu(e){var t=this.__data__,r=kr(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():Hu.call(t,r,1),--this.size,!0}function Uu(e){var t=this.__data__,r=kr(t,e);return r<0?void 0:t[r][1]}function qu(e){return kr(this.__data__,e)>-1}function Yu(e,t){var r=this.__data__,n=kr(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}function nt(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}nt.prototype.clear=Vu,nt.prototype.delete=zu,nt.prototype.get=Uu,nt.prototype.has=qu,nt.prototype.set=Yu;var Zt=bt(je,"Map");function Gu(){this.size=0,this.__data__={hash:new wt,map:new(Zt||nt),string:new wt}}function Wu(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function _r(e,t){var r=e.__data__;return Wu(t)?r[typeof t=="string"?"string":"hash"]:r.map}function Ju(e){var t=_r(this,e).delete(e);return this.size-=t?1:0,t}function Ku(e){return _r(this,e).get(e)}function Qu(e){return _r(this,e).has(e)}function Zu(e,t){var r=_r(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}function it(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}it.prototype.clear=Gu,it.prototype.delete=Ju,it.prototype.get=Ku,it.prototype.has=Qu,it.prototype.set=Zu;var Xu="Expected a function";function Cn(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(Xu);var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var a=e.apply(this,n);return r.cache=o.set(i,a)||o,a};return r.cache=new(Cn.Cache||it),r}Cn.Cache=it;var ed=500;function td(e){var t=Cn(e,function(n){return r.size===ed&&r.clear(),n}),r=t.cache;return t}var rd=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,nd=/\\(\\)?/g,id=td(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(rd,function(r,n,i,o){t.push(i?o.replace(nd,"$1"):n||r)}),t});function ao(e){return e==null?"":zi(e)}function $n(e,t){return Ee(e)?e:Sn(e,t)?[e]:id(ao(e))}function Xt(e){if(typeof e=="string"||Sr(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function lo(e,t){t=$n(t,e);for(var r=0,n=t.length;e!=null&&r<n;)e=e[Xt(t[r++])];return r&&r==n?e:void 0}function Je(e,t,r){var n=e==null?void 0:lo(e,t);return n===void 0?r:n}function od(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e}var so=io(Object.getPrototypeOf,Object),ad="[object Object]",ld=Function.prototype,sd=Object.prototype,co=ld.toString,cd=sd.hasOwnProperty,ud=co.call(Object);function dd(e){if(!We(e)||gt(e)!=ad)return!1;var t=so(e);if(t===null)return!0;var r=cd.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&co.call(r)==ud}function fd(){if(!arguments.length)return[];var e=arguments[0];return Ee(e)?e:[e]}function pd(){this.__data__=new nt,this.size=0}function hd(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function md(e){return this.__data__.get(e)}function gd(e){return this.__data__.has(e)}var yd=200;function bd(e,t){var r=this.__data__;if(r instanceof nt){var n=r.__data__;if(!Zt||n.length<yd-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new it(n)}return r.set(e,t),this.size=r.size,this}function Ne(e){var t=this.__data__=new nt(e);this.size=t.size}Ne.prototype.clear=pd,Ne.prototype.delete=hd,Ne.prototype.get=md,Ne.prototype.has=gd,Ne.prototype.set=bd;var uo=typeof Y=="object"&&Y&&!Y.nodeType&&Y,fo=uo&&typeof module=="object"&&module&&!module.nodeType&&module,wd=fo&&fo.exports===uo,po=wd?je.Buffer:void 0,ho=po?po.allocUnsafe:void 0;function mo(e,t){if(t)return e.slice();var r=e.length,n=ho?ho(r):new e.constructor(r);return e.copy(n),n}function go(e,t){for(var r=-1,n=e==null?0:e.length,i=0,o=[];++r<n;){var a=e[r];t(a,r,e)&&(o[i++]=a)}return o}function vd(){return[]}var xd=Object.prototype,Sd=xd.propertyIsEnumerable,yo=Object.getOwnPropertySymbols,Cd=yo?function(e){return e==null?[]:(e=Object(e),go(yo(e),function(t){return Sd.call(e,t)}))}:vd;function $d(e,t,r){var n=t(e);return Ee(e)?n:od(n,r(e))}function Tn(e){return $d(e,xn,Cd)}var En=bt(je,"DataView"),kn=bt(je,"Promise"),It=bt(je,"Set"),bo="[object Map]",Td="[object Object]",wo="[object Promise]",vo="[object Set]",xo="[object WeakMap]",So="[object DataView]",Ed=yt(En),kd=yt(Zt),_d=yt(kn),Fd=yt(It),Ad=yt(pn),Ve=gt;(En&&Ve(new En(new ArrayBuffer(1)))!=So||Zt&&Ve(new Zt)!=bo||kn&&Ve(kn.resolve())!=wo||It&&Ve(new It)!=vo||pn&&Ve(new pn)!=xo)&&(Ve=function(e){var t=gt(e),r=t==Td?e.constructor:void 0,n=r?yt(r):"";if(n)switch(n){case Ed:return So;case kd:return bo;case _d:return wo;case Fd:return vo;case Ad:return xo}return t});var Od=Object.prototype,Rd=Od.hasOwnProperty;function Md(e){var t=e.length,r=new e.constructor(t);return t&&typeof e[0]=="string"&&Rd.call(e,"index")&&(r.index=e.index,r.input=e.input),r}var Fr=je.Uint8Array;function _n(e){var t=new e.constructor(e.byteLength);return new Fr(t).set(new Fr(e)),t}function Dd(e,t){var r=_n(e.buffer);return new e.constructor(r,e.byteOffset,e.byteLength)}var Pd=/\w*$/;function Id(e){var t=new e.constructor(e.source,Pd.exec(e));return t.lastIndex=e.lastIndex,t}var Co=Ge?Ge.prototype:void 0,$o=Co?Co.valueOf:void 0;function Bd(e){return $o?Object($o.call(e)):{}}function To(e,t){var r=t?_n(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}var jd="[object Boolean]",Nd="[object Date]",Vd="[object Map]",Ld="[object Number]",Hd="[object RegExp]",zd="[object Set]",Ud="[object String]",qd="[object Symbol]",Yd="[object ArrayBuffer]",Gd="[object DataView]",Wd="[object Float32Array]",Jd="[object Float64Array]",Kd="[object Int8Array]",Qd="[object Int16Array]",Zd="[object Int32Array]",Xd="[object Uint8Array]",ef="[object Uint8ClampedArray]",tf="[object Uint16Array]",rf="[object Uint32Array]";function nf(e,t,r){var n=e.constructor;switch(t){case Yd:return _n(e);case jd:case Nd:return new n(+e);case Gd:return Dd(e);case Wd:case Jd:case Kd:case Qd:case Zd:case Xd:case ef:case tf:case rf:return To(e,r);case Vd:return new n;case Ld:case Ud:return new n(e);case Hd:return Id(e);case zd:return new n;case qd:return Bd(e)}}function Eo(e){return typeof e.constructor=="function"&&!yn(e)?dc(so(e)):{}}var of="[object Map]";function af(e){return We(e)&&Ve(e)==of}var ko=Pt&&Pt.isMap,lf=ko?bn(ko):af,sf="[object Set]";function cf(e){return We(e)&&Ve(e)==sf}var _o=Pt&&Pt.isSet,uf=_o?bn(_o):cf,df=1,Fo="[object Arguments]",ff="[object Array]",pf="[object Boolean]",hf="[object Date]",mf="[object Error]",Ao="[object Function]",gf="[object GeneratorFunction]",yf="[object Map]",bf="[object Number]",Oo="[object Object]",wf="[object RegExp]",vf="[object Set]",xf="[object String]",Sf="[object Symbol]",Cf="[object WeakMap]",$f="[object ArrayBuffer]",Tf="[object DataView]",Ef="[object Float32Array]",kf="[object Float64Array]",_f="[object Int8Array]",Ff="[object Int16Array]",Af="[object Int32Array]",Of="[object Uint8Array]",Rf="[object Uint8ClampedArray]",Mf="[object Uint16Array]",Df="[object Uint32Array]",he={};he[Fo]=he[ff]=he[$f]=he[Tf]=he[pf]=he[hf]=he[Ef]=he[kf]=he[_f]=he[Ff]=he[Af]=he[yf]=he[bf]=he[Oo]=he[wf]=he[vf]=he[xf]=he[Sf]=he[Of]=he[Rf]=he[Mf]=he[Df]=!0,he[mf]=he[Ao]=he[Cf]=!1;function er(e,t,r,n,i,o){var a,s=t&df;if(r&&(a=i?r(e,n,i,o):r(e)),a!==void 0)return a;if(!Oe(e))return e;var c=Ee(e);if(c)a=Md(e);else{var u=Ve(e),d=u==Ao||u==gf;if(Jt(e))return mo(e,s);if(u==Oo||u==Fo||d&&!i)a=d?{}:Eo(e);else{if(!he[u])return i?e:{};a=nf(e,u,s)}}o||(o=new Ne);var f=o.get(e);if(f)return f;o.set(e,a),uf(e)?e.forEach(function(m){a.add(er(m,t,r,m,e,o))}):lf(e)&&e.forEach(function(m,g){a.set(g,er(m,t,r,g,e,o))});var h=Tn,p=c?void 0:h(e);return Wi(p||e,function(m,g){p&&(g=m,m=e[g]),mn(a,g,er(m,t,r,g,e,o))}),a}var Pf=1,If=4;function dt(e){return er(e,Pf|If)}var Bf=1,jf=4;function Nf(e,t){return t=typeof t=="function"?t:void 0,er(e,Bf|jf,t)}function Vf(e){for(var t=-1,r=e==null?0:e.length,n=0,i=[];++t<r;){var o=e[t];o&&(i[n++]=o)}return i}var Lf="__lodash_hash_undefined__";function Hf(e){return this.__data__.set(e,Lf),this}function zf(e){return this.__data__.has(e)}function tr(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new it;++t<r;)this.add(e[t])}tr.prototype.add=tr.prototype.push=Hf,tr.prototype.has=zf;function Uf(e,t){for(var r=-1,n=e==null?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}function Ro(e,t){return e.has(t)}var qf=1,Yf=2;function Mo(e,t,r,n,i,o){var a=r&qf,s=e.length,c=t.length;if(s!=c&&!(a&&c>s))return!1;var u=o.get(e),d=o.get(t);if(u&&d)return u==t&&d==e;var f=-1,h=!0,p=r&Yf?new tr:void 0;for(o.set(e,t),o.set(t,e);++f<s;){var m=e[f],g=t[f];if(n)var y=a?n(g,m,f,t,e,o):n(m,g,f,e,t,o);if(y!==void 0){if(y)continue;h=!1;break}if(p){if(!Uf(t,function(b,S){if(!Ro(p,S)&&(m===b||i(m,b,r,n,o)))return p.push(S)})){h=!1;break}}else if(!(m===g||i(m,g,r,n,o))){h=!1;break}}return o.delete(e),o.delete(t),h}function Gf(e){var t=-1,r=Array(e.size);return e.forEach(function(n,i){r[++t]=[i,n]}),r}function Fn(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var Wf=1,Jf=2,Kf="[object Boolean]",Qf="[object Date]",Zf="[object Error]",Xf="[object Map]",ep="[object Number]",tp="[object RegExp]",rp="[object Set]",np="[object String]",ip="[object Symbol]",op="[object ArrayBuffer]",ap="[object DataView]",Do=Ge?Ge.prototype:void 0,An=Do?Do.valueOf:void 0;function lp(e,t,r,n,i,o,a){switch(r){case ap:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case op:return!(e.byteLength!=t.byteLength||!o(new Fr(e),new Fr(t)));case Kf:case Qf:case ep:return Wt(+e,+t);case Zf:return e.name==t.name&&e.message==t.message;case tp:case np:return e==t+"";case Xf:var s=Gf;case rp:var c=n&Wf;if(s||(s=Fn),e.size!=t.size&&!c)return!1;var u=a.get(e);if(u)return u==t;n|=Jf,a.set(e,t);var d=Mo(s(e),s(t),n,i,o,a);return a.delete(e),d;case ip:if(An)return An.call(e)==An.call(t)}return!1}var sp=1,cp=Object.prototype,up=cp.hasOwnProperty;function dp(e,t,r,n,i,o){var a=r&sp,s=Tn(e),c=s.length,u=Tn(t),d=u.length;if(c!=d&&!a)return!1;for(var f=c;f--;){var h=s[f];if(!(a?h in t:up.call(t,h)))return!1}var p=o.get(e),m=o.get(t);if(p&&m)return p==t&&m==e;var g=!0;o.set(e,t),o.set(t,e);for(var y=a;++f<c;){h=s[f];var b=e[h],S=t[h];if(n)var $=a?n(S,b,h,t,e,o):n(b,S,h,e,t,o);if(!($===void 0?b===S||i(b,S,r,n,o):$)){g=!1;break}y||(y=h=="constructor")}if(g&&!y){var L=e.constructor,R=t.constructor;L!=R&&"constructor"in e&&"constructor"in t&&!(typeof L=="function"&&L instanceof L&&typeof R=="function"&&R instanceof R)&&(g=!1)}return o.delete(e),o.delete(t),g}var fp=1,Po="[object Arguments]",Io="[object Array]",Ar="[object Object]",pp=Object.prototype,Bo=pp.hasOwnProperty;function hp(e,t,r,n,i,o){var a=Ee(e),s=Ee(t),c=a?Io:Ve(e),u=s?Io:Ve(t);c=c==Po?Ar:c,u=u==Po?Ar:u;var d=c==Ar,f=u==Ar,h=c==u;if(h&&Jt(e)){if(!Jt(t))return!1;a=!0,d=!1}if(h&&!d)return o||(o=new Ne),a||vn(e)?Mo(e,t,r,n,i,o):lp(e,t,c,r,n,i,o);if(!(r&fp)){var p=d&&Bo.call(e,"__wrapped__"),m=f&&Bo.call(t,"__wrapped__");if(p||m){var g=p?e.value():e,y=m?t.value():t;return o||(o=new Ne),i(g,y,r,n,o)}}return h?(o||(o=new Ne),dp(e,t,r,n,i,o)):!1}function Or(e,t,r,n,i){return e===t?!0:e==null||t==null||!We(e)&&!We(t)?e!==e&&t!==t:hp(e,t,r,n,Or,i)}var mp=1,gp=2;function yp(e,t,r,n){var i=r.length,o=i;if(e==null)return!o;for(e=Object(e);i--;){var a=r[i];if(a[2]?a[1]!==e[a[0]]:!(a[0]in e))return!1}for(;++i<o;){a=r[i];var s=a[0],c=e[s],u=a[1];if(a[2]){if(c===void 0&&!(s in e))return!1}else{var d=new Ne,f;if(!(f===void 0?Or(u,c,mp|gp,n,d):f))return!1}}return!0}function jo(e){return e===e&&!Oe(e)}function bp(e){for(var t=xn(e),r=t.length;r--;){var n=t[r],i=e[n];t[r]=[n,i,jo(i)]}return t}function No(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}function wp(e){var t=bp(e);return t.length==1&&t[0][2]?No(t[0][0],t[0][1]):function(r){return r===e||yp(r,e,t)}}function vp(e,t){return e!=null&&t in Object(e)}function xp(e,t,r){t=$n(t,e);for(var n=-1,i=t.length,o=!1;++n<i;){var a=Xt(t[n]);if(!(o=e!=null&&r(e,a)))break;e=e[a]}return o||++n!=i?o:(i=e==null?0:e.length,!!i&&gn(i)&&Tr(a,i)&&(Ee(e)||Er(e)))}function Sp(e,t){return e!=null&&xp(e,t,vp)}var Cp=1,$p=2;function Tp(e,t){return Sn(e)&&jo(t)?No(Xt(e),t):function(r){var n=Je(r,e);return n===void 0&&n===t?Sp(r,e):Or(t,n,Cp|$p)}}function Ep(e){return function(t){return t==null?void 0:t[e]}}function kp(e){return function(t){return lo(t,e)}}function _p(e){return Sn(e)?Ep(Xt(e)):kp(e)}function Vo(e){return typeof e=="function"?e:e==null?Cr:typeof e=="object"?Ee(e)?Tp(e[0],e[1]):wp(e):_p(e)}function Fp(e){return function(t,r,n){for(var i=-1,o=Object(t),a=n(t),s=a.length;s--;){var c=a[++i];if(r(o[c],c,o)===!1)break}return t}}var Lo=Fp();function Ap(e,t){return e&&Lo(e,t,xn)}function Op(e,t){return function(r,n){if(r==null)return r;if(!Dt(r))return e(r,n);for(var i=r.length,o=-1,a=Object(r);++o<i&&n(a[o],o,a)!==!1;);return r}}var On=Op(Ap),Rn=function(){return je.Date.now()},Rp="Expected a function",Mp=Math.max,Dp=Math.min;function Pp(e,t,r){var n,i,o,a,s,c,u=0,d=!1,f=!1,h=!0;if(typeof e!="function")throw new TypeError(Rp);t=qi(t)||0,Oe(r)&&(d=!!r.leading,f="maxWait"in r,o=f?Mp(qi(r.maxWait)||0,t):o,h="trailing"in r?!!r.trailing:h);function p(T){var E=n,k=i;return n=i=void 0,u=T,a=e.apply(k,E),a}function m(T){return u=T,s=setTimeout(b,t),d?p(T):a}function g(T){var E=T-c,k=T-u,V=t-E;return f?Dp(V,o-k):V}function y(T){var E=T-c,k=T-u;return c===void 0||E>=t||E<0||f&&k>=o}function b(){var T=Rn();if(y(T))return S(T);s=setTimeout(b,g(T))}function S(T){return s=void 0,h&&n?p(T):(n=i=void 0,a)}function $(){s!==void 0&&clearTimeout(s),u=0,n=c=i=s=void 0}function L(){return s===void 0?a:S(Rn())}function R(){var T=Rn(),E=y(T);if(n=arguments,i=this,c=T,E){if(s===void 0)return m(c);if(f)return clearTimeout(s),s=setTimeout(b,t),p(c)}return s===void 0&&(s=setTimeout(b,t)),a}return R.cancel=$,R.flush=L,R}function Mn(e,t,r){(r!==void 0&&!Wt(e[t],r)||r===void 0&&!(t in e))&&hn(e,t,r)}function Ip(e){return We(e)&&Dt(e)}function Dn(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}function Bp(e){return Oc(e,oo(e))}function jp(e,t,r,n,i,o,a){var s=Dn(e,r),c=Dn(t,r),u=a.get(c);if(u){Mn(e,r,u);return}var d=o?o(s,c,r+"",e,t,a):void 0,f=d===void 0;if(f){var h=Ee(c),p=!h&&Jt(c),m=!h&&!p&&vn(c);d=c,h||p||m?Ee(s)?d=s:Ip(s)?d=hc(s):p?(f=!1,d=mo(c,!0)):m?(f=!1,d=To(c,!0)):d=[]:dd(c)||Er(c)?(d=s,Er(s)?d=Bp(s):(!Oe(s)||dn(s))&&(d=Eo(c))):f=!1}f&&(a.set(c,d),i(d,c,n,o,a),a.delete(c)),Mn(e,r,d)}function Ho(e,t,r,n,i){e!==t&&Lo(t,function(o,a){if(i||(i=new Ne),Oe(o))jp(e,t,a,r,Ho,n,i);else{var s=n?n(Dn(e,a),o,a+"",e,t,i):void 0;s===void 0&&(s=o),Mn(e,a,s)}},oo)}function Np(e){return typeof e=="function"?e:Cr}function zo(e,t){var r=Ee(e)?Wi:On;return r(e,Np(t))}function Vp(e,t){var r=[];return On(e,function(n,i,o){t(n,i,o)&&r.push(n)}),r}function vt(e,t){var r=Ee(e)?go:Vp;return r(e,Vo(t))}function Lp(e,t){var r=-1,n=Dt(e)?Array(e.length):[];return On(e,function(i,o,a){n[++r]=t(i,o,a)}),n}function Uo(e,t){var r=Ee(e)?Vi:Lp;return r(e,Vo(t))}function Rr(e,t){return Or(e,t)}var Mr=Ic(function(e,t,r){Ho(e,t,r)});function Hp(e,t,r,n){if(!Oe(e))return e;t=$n(t,e);for(var i=-1,o=t.length,a=o-1,s=e;s!=null&&++i<o;){var c=Xt(t[i]),u=r;if(c==="__proto__"||c==="constructor"||c==="prototype")return e;if(i!=a){var d=s[c];u=void 0,u===void 0&&(u=Oe(d)?d:Tr(t[i+1])?[]:{})}mn(s,c,u),s=s[c]}return e}function Se(e,t,r){return e==null?e:Hp(e,t,r)}function zp(e){return ao(e).toLowerCase()}var Up=1/0,qp=It&&1/Fn(new It([,-0]))[1]==Up?function(e){return new It(e)}:pc,Yp=200;function Gp(e,t,r){var n=-1,i=Ec,o=e.length,a=!0,s=[],c=s;if(o>=Yp){var u=qp(e);if(u)return Fn(u);a=!1,i=Ro,c=new tr}else c=s;e:for(;++n<o;){var d=e[n],f=d;if(d=d!==0?d:0,a&&f===f){for(var h=c.length;h--;)if(c[h]===f)continue e;s.push(d)}else i(c,f,r)||(c!==s&&c.push(f),s.push(d))}return s}function Wp(e){return e&&e.length?Gp(e):[]}const qo={search:"Search",reset:"Reset",expand:"Expand",unexpand:"Unexpand",pleaseEnter:"Please enter ",pleaseSelect:"Please select ",rangeStart:"start ",rangeEnd:"end ",today:"Today",yesterday:"Yesterday",lastWeek:"Last week",last7:"Last seven days",last30:"Last 30 days",thisMonth:"This month",thisYear:"This year",min:"Min",max:"Max",table:{total:"Total"},timePeriodOutOfRange:"The current period is outside the selectable range",upload:{select:"Select files",tip:"Allowed formats and maximum size",uploading:"Uploading",preview:"Preview",download:"Download",delete:"Delete",retry:"Retry association",setCover:"Set cover",unsetCover:"Unset cover",tooMany:"File count exceeds the limit",invalidType:"File type is not allowed",tooLarge:"File size exceeds the limit",failed:"File upload failed",missingBusinessId:"Business ID or file ID is missing"},action:{detail:"Detail",create:"Create",del:"Delete",edit:"Edit",export:"Export",save:"Save",cancel:"Cancel",return:"Return"}},Yo={search:"查询",reset:"重置",expand:"展开",unexpand:"收起",pleaseEnter:"请输入",pleaseSelect:"请选择",rangeStart:"开始",rangeEnd:"结束",today:"今天",yesterday:"昨天",lastWeek:"上周",last7:"最近七天",last30:"最近 30 天",thisMonth:"本月",thisYear:"今年",min:"最小",max:"最大",table:{total:"合计"},timePeriodOutOfRange:"已有时段超出可选范围",upload:{select:"选择文件",tip:"支持的格式及最大大小",uploading:"上传中",preview:"预览",download:"下载",delete:"删除",retry:"重试关联",setCover:"设为封面",unsetCover:"取消封面",tooMany:"文件数量超过限制",invalidType:"文件格式不符合要求",tooLarge:"文件大小超过限制",failed:"文件上传失败",missingBusinessId:"缺少业务主键或文件标识"},action:{detail:"详情",create:"新增",del:"删除",edit:"编辑",export:"导出",save:"保存",cancel:"取消",return:"返回"}},Ce=(e="localStorage")=>({wsCache:e==="localStorage"?window.localStorage:window.sessionStorage,setLang:Go,getLang:rr,isZhCN:xt,setTheme:Wo,getTheme:Jo,isDark:Ko,setCurrentSize:Qo,getCurrentSize:Zo,setUser:Xo,getUser:ea}),ot={IS_DARK:"isDark",LANG:"lang",THEME:"theme",LAYOUT:"layout",CURRENT_SIZE:"currentSize",USER:"user"},Go=(e="")=>{const{wsCache:t}=Ce();t.setItem(ot.LANG,e)},rr=()=>{const{wsCache:e}=Ce();return e.getItem(ot.LANG)},xt=()=>{const e=rr()||"";return!e||zp(e)==="zh-cn"},Wo=e=>{const{wsCache:t}=Ce();t.setItem(ot.THEME,JSON.stringify(e||"{}"))},Jo=()=>{const{wsCache:e}=Ce(),t=e.getItem(ot.THEME);return t?JSON.parse(t):void 0},Ko=()=>window.matchMedia("(prefers-color-scheme: dark)").matches,Qo=(e="")=>{const{wsCache:t}=Ce();t.setItem(ot.CURRENT_SIZE,e)},Zo=()=>{const{wsCache:e}=Ce();return e.getItem(ot.CURRENT_SIZE)},Xo=e=>{const{wsCache:t}=Ce();t.setItem(ot.USER,JSON.stringify(e||"{}"))},ea=()=>{const{wsCache:e}=Ce(),t=e.getItem(ot.USER),r=t?JSON.parse(t):{};return r.permissions=new Set(r.permissions||[]),r},Jp=rr()||"zh-cn",Ke=e=>({t:r=>Je(Jp==="zh-cn"?Yo:qo,r,r)});function Kp(e){const t=new Set(e.map(n=>n.field).filter(Boolean)),r=new Set;return e.flatMap(n=>{if(n.rangeFields===void 0)return[];const i=n.rangeFields;if(typeof n.field!="string"||!n.field||!Array.isArray(i)||!i.length||i.some(o=>typeof o!="string"||!o||t.has(o)||r.has(o))||new Set(i).size!==i.length)throw new TypeError(`Invalid rangeFields for search rule "${n.field}": expected distinct fields that do not conflict with other rules.`);return i.forEach(o=>r.add(o)),[{field:n.field,fields:i,trimTrailingNulls:n.type==="cascader"}]})}function Qp(e,t,r){if(!t.length||e==null&&!r.size)return e;const n=M({},e);for(const{field:i,fields:o,trimTrailingNulls:a}of t)if(o.some(s=>Object.prototype.hasOwnProperty.call(n,s))){const s=o.map(c=>{var u;return(u=n[c])!=null?u:null});if(a)for(;s.length&&s[s.length-1]===null;)s.pop();n[i]=s.every(c=>c===null)?null:s,o.forEach(c=>delete n[c])}else r.has(i)&&!Object.prototype.hasOwnProperty.call(n,i)&&(n[i]=null);return n}function Zp(e,t){if(!t.length||e==null)return e;const r=M({},e);for(const{field:n,fields:i}of t){if(!Object.prototype.hasOwnProperty.call(r,n))continue;const o=r[n];if(o!=null&&o!==""&&!Array.isArray(o))throw new TypeError(`Invalid range value for search rule "${n}": expected an array or an empty value.`);i.forEach((a,s)=>{var c;r[a]=Array.isArray(o)&&(c=o[s])!=null?c:null}),delete r[n]}return r}const Xp=((e,t)=>{const r=e.__vccOpts||e;for(const[n,i]of t)r[n]=i;return r})(l.defineComponent({name:"AbSearch",__name:"ab-search",props:l.mergeModels({rule:{},compactMode:{type:Boolean,default:!1},collapse:{type:Boolean}},{modelValue:{},modelModifiers:{}}),emits:l.mergeModels(["update:modelValue","query","reset"],["update:modelValue"]),setup(e,{emit:t}){const r=t,n=e,i=l.inject("abTableRef",null),{t:o}=Ke(),a=l.useModel(e,"modelValue"),s=l.ref(n.collapse),c=l.ref(),u=l.ref(),d=l.computed(()=>Kp(n.rule.map(V))),f=l.reactive(new Set);l.watch(()=>d.value.map(({field:_,fields:F})=>({field:_,present:a.value!=null&&F.some(A=>Object.prototype.hasOwnProperty.call(a.value,A))})),_=>{const F=new Set(_.map(({field:A})=>A));for(const A of f)F.has(A)||f.delete(A);for(const{field:A,present:C}of _)C&&f.add(A)},{immediate:!0,flush:"sync"});const h=l.computed(()=>Qp(a.value,d.value,f));let p;function m(_,F){const A=M({},p!=null?p:h.value);for(const C of F.fields())Object.prototype.hasOwnProperty.call(_,C)?A[C]=_[C]:delete A[C];p=A,a.value=Zp(A,d.value),l.nextTick(()=>{p===A&&(p=void 0)})}const g=l.reactive({type:"ElFormItem",native:!0,props:{justify:"end"},class:"ab-form-item ab-search__operates",children:[{type:"ElButton",native:!0,children:[{type:"icon",props:{icon:"ep:search"}},o("search")],props:{type:"primary"},on:{click:U}},{type:"ElButton",native:!0,children:[{type:"icon",props:{icon:"ep:refresh"}},o("reset")],props:{type:"default"},on:{click:k}},{type:"ElButton",native:!0,children:[o("expand")],props:{type:"primary",link:!0,icon:l.markRaw(ke.ArrowDown)},on:{click:x}}]});l.watchEffect(()=>{g.children[2].children=[o(s.value?"unexpand":"expand")],g.children[2].props.icon=s.value?l.markRaw(ke.ArrowUp):l.markRaw(ke.ArrowDown)}),l.watch(()=>n.rule,()=>{s.value=n.collapse});const y=l.computed(()=>[...n.rule.filter(_=>V(_).hidden!==!0),g]),b=l.computed(()=>n.rule.filter(_=>V(_).hidden===!0).map(_=>l.shallowReactive(ne(M({},V(_)),{hidden:!1}))));function S(_,F=new Set){for(const A of _){if(!A||typeof A!="object")continue;const C=V(A);if(typeof C.field=="string"&&F.add(C.field),Array.isArray(C.children)&&S(C.children,F),Array.isArray(C.control))for(const B of C.control)Array.isArray(B.rule)&&S(B.rule,F)}return F}const $=l.computed(()=>S(y.value)),L=l.computed(()=>S(b.value));function R(_){if(h.value==null)return h.value;const F=M({},h.value);for(const A of _)delete F[A];return F}const T=l.computed(_=>{const F=R(L.value);return Rr(F,_)?_:F}),E=l.computed(_=>{const F=R($.value);return Rr(F,_)?_:F});l.watch(()=>a.value,_=>q());function k(){return ye(this,null,function*(){var _,F;(_=c.value)==null||_.resetFields(),yield l.nextTick(),(F=u.value)==null||F.resetFields()})}function V(_){return typeof _.getRule=="function"?_.getRule():_}function q(){var _;(_=i==null?void 0:i.value)==null||_.reload(),r("query",a.value)}function U(){return ye(this,null,function*(){yield l.nextTick(),q()})}function x(){s.value=!s.value}return(_,F)=>{const A=l.resolveComponent("ab-form");return l.openBlock(),l.createElementBlock("section",{class:l.normalizeClass(["ab-search",e.compactMode?"compact":""])},[l.createVNode(A,{rule:y.value,"model-value":T.value,"onUpdate:modelValue":F[0]||(F[0]=C=>m(C,c.value)),api:c.value,"onUpdate:api":F[1]||(F[1]=C=>c.value=C)},null,8,["rule","model-value","api"]),l.createVNode(l.Transition,{name:"ab-search-expand",mode:"out-in",appear:"",persisted:""},{default:l.withCtx(()=>[l.withDirectives(l.createElementVNode("div",null,[l.createVNode(A,{rule:b.value,"model-value":E.value,"onUpdate:modelValue":F[2]||(F[2]=C=>m(C,u.value)),api:u.value,"onUpdate:api":F[3]||(F[3]=C=>u.value=C)},null,8,["rule","model-value","api"])],512),[[l.vShow,s.value]])]),_:1})],2)}}}),[["__scopeId","data-v-bfc6a8b4"]]),eh=(e,t)=>{e.component("ab-search",Xp)};function Bt(e){let t=e.replace(/([A-Z])/g,"-$1").toLocaleLowerCase();return t.indexOf("-")===0&&(t=t.substr(1)),t}function ta(e){return e.replace(e[0],e[0].toLocaleUpperCase())}function Pe(e,t,r){e&&t&&(e[t]=r)}function St(e,t){e&&t&&delete e[t]}var ra=e=>Object.prototype.toString.call(e).slice(8,-1),j={type(e,t){return Object.prototype.toString.call(e)==="[object "+t+"]"},Undef(e){return e==null},Element(e){return typeof e=="object"&&!!e&&"nodeType"in e&&e.nodeType===1&&!j.Object(e)},trueArray(e){return Array.isArray(e)&&e.length>0},Function(e){let t=ra(e);return t==="Function"||t==="AsyncFunction"},getType(e){return ra(e)},empty(e){return e==null||Array.isArray(e)&&Array.isArray(e)&&!e.length?!0:typeof e=="string"&&!e},Date:e=>j.type(e,"Date"),Object:e=>j.type(e,"Object"),String:e=>j.type(e,"String"),Boolean:e=>j.type(e,"Boolean"),Array:e=>j.type(e,"Array"),Number:e=>j.type(e,"Number")};function ue(e,t){return{}.hasOwnProperty.call(e,t)}function Dr(e,t={},r){for(let n in t)if(Object.prototype.hasOwnProperty.call(t,n)){let i=Reflect.get(t,n);if(Array.isArray(i)||j.Object(i)){let o=Reflect.get(e,n)===void 0;if(Array.isArray(i))o&&Pe(e,n,[]);else{let a=i;if(a._clone&&r!==void 0)if(r)i=a.getRule(),o&&Pe(e,n,{});else{Pe(e,n,a._clone());continue}else o&&Pe(e,n,{})}Reflect.set(e,n,Dr(Reflect.get(e,n),i,r))}else if(Pe(e,n,i),!j.Undef(i)){let o=i;j.Undef(o.__json)||Reflect.set(Reflect.get(e,n),"__json",o.__json),j.Undef(o.__origin)||Reflect.set(Reflect.get(e,n),"__origin",o.__origin)}}return r!==void 0&&Array.isArray(e)?e.filter(n=>!n||!n.__ctrl):e}function Ct(e){return Dr({},{value:e}).value}function na(e,t,r){return`[archbiz ${e}]: ${t}`}function Pn(e,t){console.error(na("err",e))}function th(e){Pn(e instanceof Error?e.toString():String(e)),console.error(e)}var ia=["props"],oa=["class","style","directives"],aa=["on","hook"],In="[[T-FORM-PREFIX-",Bn="-T-FORM-SUFFIX]]";function jn(e){return Function(`return ${e}`)()}function nr(e,t){let r=Dr(Array.isArray(e)?[]:{},e,!0),n=JSON.stringify(r,function(i,o){var c;if(typeof o=="object"&&o&&Reflect.get(o,"_isVue")===!0)return;if(typeof o!="function")return o;let a=o;if(a.__json)return a.__json;let s=(c=a.__origin)!=null?c:o;if(!a.__emit)return`${In}${s}${Bn}`},t);if(n===void 0)throw TypeError("Unable to serialize the provided value as JSON.");return n}function Qe(e,t){if(typeof e!="string"||e.length<=4)return e;let r=e.trim(),n=!1;try{if(r.indexOf(Bn)>0&&r.indexOf(In)===0)r=r.replace(Bn,"").replace(In,""),n=!0;else if(r.indexOf("$FN:")===0)r=r.substring(4),n=!0;else if(r.indexOf("$EXEC:")===0)r=r.substring(6),n=!0;else if(r.indexOf("$GLOBAL:")===0){let o=r.substring(8),a=function(...s){let c=s[0].api.getGlobalEvent(o);if(typeof c=="function")return c.apply(this,s)};return a.__json=e,a.__inject=!0,a}else if(r.indexOf("$FNX:")===0){let o=jn(`function($inject){
|
|
8
|
-
${r.substring(5)}
|
|
9
|
-
}`);return o.__json=e,o.__inject=!0,o}else(!t&&r.indexOf("function ")===0&&r!=="function "||!t&&r.indexOf("function(")===0&&r!=="function(")&&(n=!0);if(!n)return e;let i;try{i=jn(r)}catch(o){i=jn(`function ${r}`)}return i.__json=e,i}catch(i){Pn(`解析失败:${r}
|
|
7
|
+
(function(e,t){typeof exports==`object`&&typeof module<`u`?t(exports,require("element-plus"),require("vue"),require("@element-plus/icons-vue"),require("vue-router"),require("vxe-pc-ui")):typeof define==`function`&&define.amd?define([`exports`,`element-plus`,`vue`,`@element-plus/icons-vue`,`vue-router`,`vxe-pc-ui`],t):(e=typeof globalThis<`u`?globalThis:e||self,t(e.ArchbizKitElementPlus={},e.ElementPlus,e.Vue,e.ElementPlusIconsVue,e.VueRouter,e.VxeUI))})(this,function(e,t,n,r,i,a){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var o=Object.create,s=Object.defineProperty,c=Object.getOwnPropertyDescriptor,l=Object.getOwnPropertyNames,u=Object.getPrototypeOf,d=Object.prototype.hasOwnProperty,f=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t,t.exports),e=null),t.exports),p=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=l(t),a=0,o=i.length,u;a<o;a++)u=i[a],!d.call(e,u)&&u!==n&&s(e,u,{get:(e=>t[e]).bind(null,u),enumerable:!(r=c(t,u))||r.enumerable});return e},m=(e,t,n)=>(n=e==null?{}:o(u(e)),p(t||!e||!e.__esModule||!d.call(e,`default`)?s(n,`default`,{value:e,enumerable:!0}):n,e));function h(e){e.useApp((e,n)=>{n.component(t.ElForm.name)||n.use(t.ElForm),n.component(t.ElButton.name)||n.use(t.ElButton),n.component(t.ElRow.name)||n.use(t.ElRow),n.component(t.ElCol.name)||n.use(t.ElCol),n.component(t.ElInput.name)||n.use(t.ElInput),n.component(t.ElInputNumber.name)||n.use(t.ElInputNumber),n.component(t.ElCascader.name)||n.use(t.ElCascader),n.component(t.ElPopover.name)||n.use(t.ElPopover),n.component(t.ElTooltip.name)||n.use(t.ElTooltip),n.component(t.ElAutocomplete.name)||n.use(t.ElAutocomplete),n.component(t.ElCheckboxGroup.name)||n.use(t.ElCheckboxGroup),n.component(t.ElCheckboxButton.name)||n.use(t.ElCheckboxButton),n.component(t.ElRadioGroup.name)||n.use(t.ElRadioGroup),n.component(t.ElRadioButton.name)||n.use(t.ElRadioButton),n.component(t.ElRadio.name)||n.use(t.ElRadio),n.component(t.ElDialog.name)||n.use(t.ElDialog),n.component(t.ElDivider.name)||n.use(t.ElDivider),n.component(t.ElCheckbox.name)||n.use(t.ElCheckbox),n.component(t.ElSelect.name)||n.use(t.ElSelect),n.component(t.ElTree.name)||n.use(t.ElTree),n.component(t.ElUpload.name)||n.use(t.ElUpload),n.component(t.ElSlider.name)||n.use(t.ElSlider),n.component(t.ElRate.name)||n.use(t.ElRate),n.component(t.ElColorPicker.name)||n.use(t.ElColorPicker),n.component(t.ElSwitch.name)||n.use(t.ElSwitch),n.component(t.ElDatePicker.name)||n.use(t.ElDatePicker),n.component(t.ElIcon.name)||n.use(t.ElIcon),n.component(t.ElTimePicker.name)||n.use(t.ElTimePicker),n.component(t.ElProgress.name)||n.use(t.ElProgress),n.component(t.ElInputTag.name)||n.use(t.ElInputTag),n.component(t.ElText.name)||n.use(t.ElText),n.component(t.ElTransfer.name)||n.use(t.ElTransfer),n.component(t.ElTreeSelect.name)||n.use(t.ElTreeSelect),n.component(t.ElMention.name)||n.use(t.ElMention)})}var g=(e,t)=>{let{AbForm:n}=t||{};n.use(h),e.use(n)},_=typeof global==`object`&&global&&global.Object===Object&&global,v=typeof self==`object`&&self&&self.Object===Object&&self,y=_||v||Function(`return this`)(),b=y.Symbol,x=Object.prototype,S=x.hasOwnProperty,C=x.toString,w=b?b.toStringTag:void 0;function T(e){var t=S.call(e,w),n=e[w];try{e[w]=void 0;var r=!0}catch(e){}var i=C.call(e);return r&&(t?e[w]=n:delete e[w]),i}var E=Object.prototype.toString;function D(e){return E.call(e)}var ee=`[object Null]`,O=`[object Undefined]`,te=b?b.toStringTag:void 0;function k(e){return e==null?e===void 0?O:ee:te&&te in Object(e)?T(e):D(e)}function A(e){return typeof e==`object`&&!!e}var ne=`[object Symbol]`;function j(e){return typeof e==`symbol`||A(e)&&k(e)==ne}function M(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}var N=Array.isArray,re=1/0,ie=b?b.prototype:void 0,ae=ie?ie.toString:void 0;function oe(e){if(typeof e==`string`)return e;if(N(e))return M(e,oe)+``;if(j(e))return ae?ae.call(e):``;var t=e+``;return t==`0`&&1/e==-re?`-0`:t}var se=/\s/;function ce(e){for(var t=e.length;t--&&se.test(e.charAt(t)););return t}var le=/^\s+/;function ue(e){return e&&e.slice(0,ce(e)+1).replace(le,``)}function P(e){var t=typeof e;return e!=null&&(t==`object`||t==`function`)}var de=NaN,fe=/^[-+]0x[0-9a-f]+$/i,pe=/^0b[01]+$/i,me=/^0o[0-7]+$/i,he=parseInt;function ge(e){if(typeof e==`number`)return e;if(j(e))return de;if(P(e)){var t=typeof e.valueOf==`function`?e.valueOf():e;e=P(t)?t+``:t}if(typeof e!=`string`)return e===0?e:+e;e=ue(e);var n=pe.test(e);return n||me.test(e)?he(e.slice(2),n?2:8):fe.test(e)?de:+e}function _e(e){return e}var ve=`[object AsyncFunction]`,ye=`[object Function]`,be=`[object GeneratorFunction]`,xe=`[object Proxy]`;function Se(e){if(!P(e))return!1;var t=k(e);return t==ye||t==be||t==ve||t==xe}var Ce=y[`__core-js_shared__`],we=function(){var e=/[^.]+$/.exec(Ce&&Ce.keys&&Ce.keys.IE_PROTO||``);return e?`Symbol(src)_1.`+e:``}();function Te(e){return!!we&&we in e}var Ee=Function.prototype.toString;function De(e){if(e!=null){try{return Ee.call(e)}catch(e){}try{return e+``}catch(e){}}return``}var Oe=/[\\^$.*+?()[\]{}|]/g,ke=/^\[object .+?Constructor\]$/,Ae=Function.prototype,je=Object.prototype,Me=Ae.toString,Ne=je.hasOwnProperty,Pe=RegExp(`^`+Me.call(Ne).replace(Oe,`\\$&`).replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,`$1.*?`)+`$`);function Fe(e){return!P(e)||Te(e)?!1:(Se(e)?Pe:ke).test(De(e))}function Ie(e,t){return e==null?void 0:e[t]}function Le(e,t){var n=Ie(e,t);return Fe(n)?n:void 0}var Re=Le(y,`WeakMap`),ze=Object.create,Be=function(){function e(){}return function(t){if(!P(t))return{};if(ze)return ze(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function Ve(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function He(){}function Ue(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}var We=800,Ge=16,Ke=Date.now;function qe(e){var t=0,n=0;return function(){var r=Ke(),i=Ge-(r-n);if(n=r,i>0){if(++t>=We)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function Je(e){return function(){return e}}var Ye=function(){try{var e=Le(Object,`defineProperty`);return e({},``,{}),e}catch(e){}}(),Xe=qe(Ye?function(e,t){return Ye(e,`toString`,{configurable:!0,enumerable:!1,value:Je(t),writable:!0})}:_e);function Ze(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e}function Qe(e,t,n,r){for(var i=e.length,a=n+(r?1:-1);r?a--:++a<i;)if(t(e[a],a,e))return a;return-1}function $e(e){return e!==e}function et(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}function tt(e,t,n){return t===t?et(e,t,n):Qe(e,$e,n)}function nt(e,t){return!!(e!=null&&e.length)&&tt(e,t,0)>-1}var rt=9007199254740991,it=/^(?:0|[1-9]\d*)$/;function at(e,t){var n=typeof e;return t=t==null?rt:t,!!t&&(n==`number`||n!=`symbol`&&it.test(e))&&e>-1&&e%1==0&&e<t}function ot(e,t,n){t==`__proto__`&&Ye?Ye(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function st(e,t){return e===t||e!==e&&t!==t}var ct=Object.prototype.hasOwnProperty;function lt(e,t,n){var r=e[t];(!(ct.call(e,t)&&st(r,n))||n===void 0&&!(t in e))&&ot(e,t,n)}function ut(e,t,n,r){var i=!n;n||(n={});for(var a=-1,o=t.length;++a<o;){var s=t[a],c=r?r(n[s],e[s],s,n,e):void 0;c===void 0&&(c=e[s]),i?ot(n,s,c):lt(n,s,c)}return n}var dt=Math.max;function ft(e,t,n){return t=dt(t===void 0?e.length-1:t,0),function(){for(var r=arguments,i=-1,a=dt(r.length-t,0),o=Array(a);++i<a;)o[i]=r[t+i];i=-1;for(var s=Array(t+1);++i<t;)s[i]=r[i];return s[t]=n(o),Ve(e,this,s)}}function pt(e,t){return Xe(ft(e,t,_e),e+``)}var mt=9007199254740991;function ht(e){return typeof e==`number`&&e>-1&&e%1==0&&e<=mt}function gt(e){return e!=null&&ht(e.length)&&!Se(e)}function _t(e,t,n){if(!P(n))return!1;var r=typeof t;return(r==`number`?gt(n)&&at(t,n.length):r==`string`&&t in n)?st(n[t],e):!1}function vt(e){return pt(function(t,n){var r=-1,i=n.length,a=i>1?n[i-1]:void 0,o=i>2?n[2]:void 0;for(a=e.length>3&&typeof a==`function`?(i--,a):void 0,o&&_t(n[0],n[1],o)&&(a=i<3?void 0:a,i=1),t=Object(t);++r<i;){var s=n[r];s&&e(t,s,r,a)}return t})}var yt=Object.prototype;function bt(e){var t=e&&e.constructor;return e===(typeof t==`function`&&t.prototype||yt)}function xt(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var St=`[object Arguments]`;function Ct(e){return A(e)&&k(e)==St}var wt=Object.prototype,Tt=wt.hasOwnProperty,Et=wt.propertyIsEnumerable,Dt=Ct(function(){return arguments}())?Ct:function(e){return A(e)&&Tt.call(e,`callee`)&&!Et.call(e,`callee`)};function Ot(){return!1}var kt=typeof e==`object`&&e&&!e.nodeType&&e,At=kt&&typeof module==`object`&&module&&!module.nodeType&&module,jt=At&&At.exports===kt?y.Buffer:void 0,Mt=(jt?jt.isBuffer:void 0)||Ot,Nt=`[object Arguments]`,Pt=`[object Array]`,Ft=`[object Boolean]`,It=`[object Date]`,Lt=`[object Error]`,Rt=`[object Function]`,zt=`[object Map]`,Bt=`[object Number]`,Vt=`[object Object]`,Ht=`[object RegExp]`,Ut=`[object Set]`,Wt=`[object String]`,Gt=`[object WeakMap]`,Kt=`[object ArrayBuffer]`,qt=`[object DataView]`,Jt=`[object Float32Array]`,Yt=`[object Float64Array]`,Xt=`[object Int8Array]`,Zt=`[object Int16Array]`,Qt=`[object Int32Array]`,$t=`[object Uint8Array]`,en=`[object Uint8ClampedArray]`,tn=`[object Uint16Array]`,nn=`[object Uint32Array]`,F={};F[Jt]=F[Yt]=F[Xt]=F[Zt]=F[Qt]=F[$t]=F[en]=F[tn]=F[nn]=!0,F[Nt]=F[Pt]=F[Kt]=F[Ft]=F[qt]=F[It]=F[Lt]=F[Rt]=F[zt]=F[Bt]=F[Vt]=F[Ht]=F[Ut]=F[Wt]=F[Gt]=!1;function rn(e){return A(e)&&ht(e.length)&&!!F[k(e)]}function an(e){return function(t){return e(t)}}var on=typeof e==`object`&&e&&!e.nodeType&&e,sn=on&&typeof module==`object`&&module&&!module.nodeType&&module,cn=sn&&sn.exports===on&&_.process,ln=function(){try{return sn&&sn.require&&sn.require(`util`).types||cn&&cn.binding&&cn.binding(`util`)}catch(e){}}(),un=ln&&ln.isTypedArray,dn=un?an(un):rn,fn=Object.prototype.hasOwnProperty;function pn(e,t){var n=N(e),r=!n&&Dt(e),i=!n&&!r&&Mt(e),a=!n&&!r&&!i&&dn(e),o=n||r||i||a,s=o?xt(e.length,String):[],c=s.length;for(var l in e)(t||fn.call(e,l))&&!(o&&(l==`length`||i&&(l==`offset`||l==`parent`)||a&&(l==`buffer`||l==`byteLength`||l==`byteOffset`)||at(l,c)))&&s.push(l);return s}function mn(e,t){return function(n){return e(t(n))}}var hn=mn(Object.keys,Object),gn=Object.prototype.hasOwnProperty;function _n(e){if(!bt(e))return hn(e);var t=[];for(var n in Object(e))gn.call(e,n)&&n!=`constructor`&&t.push(n);return t}function vn(e){return gt(e)?pn(e):_n(e)}function yn(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var bn=Object.prototype.hasOwnProperty;function xn(e){if(!P(e))return yn(e);var t=bt(e),n=[];for(var r in e)(r!=`constructor`||!t&&bn.call(e,r))&&n.push(r);return n}function Sn(e){return gt(e)?pn(e,!0):xn(e)}var Cn=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,wn=/^\w*$/;function Tn(e,t){if(N(e))return!1;var n=typeof e;return n==`number`||n==`symbol`||n==`boolean`||e==null||j(e)?!0:wn.test(e)||!Cn.test(e)||t!=null&&e in Object(t)}var En=Le(Object,`create`);function Dn(){this.__data__=En?En(null):{},this.size=0}function On(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=+!!t,t}var kn=`__lodash_hash_undefined__`,An=Object.prototype.hasOwnProperty;function jn(e){var t=this.__data__;if(En){var n=t[e];return n===kn?void 0:n}return An.call(t,e)?t[e]:void 0}var Mn=Object.prototype.hasOwnProperty;function Nn(e){var t=this.__data__;return En?t[e]!==void 0:Mn.call(t,e)}var Pn=`__lodash_hash_undefined__`;function Fn(e,t){var n=this.__data__;return this.size+=+!this.has(e),n[e]=En&&t===void 0?Pn:t,this}function In(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}In.prototype.clear=Dn,In.prototype.delete=On,In.prototype.get=jn,In.prototype.has=Nn,In.prototype.set=Fn;function Ln(){this.__data__=[],this.size=0}function Rn(e,t){for(var n=e.length;n--;)if(st(e[n][0],t))return n;return-1}var zn=Array.prototype.splice;function Bn(e){var t=this.__data__,n=Rn(t,e);return n<0?!1:(n==t.length-1?t.pop():zn.call(t,n,1),--this.size,!0)}function Vn(e){var t=this.__data__,n=Rn(t,e);return n<0?void 0:t[n][1]}function Hn(e){return Rn(this.__data__,e)>-1}function Un(e,t){var n=this.__data__,r=Rn(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function Wn(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Wn.prototype.clear=Ln,Wn.prototype.delete=Bn,Wn.prototype.get=Vn,Wn.prototype.has=Hn,Wn.prototype.set=Un;var Gn=Le(y,`Map`);function Kn(){this.size=0,this.__data__={hash:new In,map:new(Gn||Wn),string:new In}}function qn(e){var t=typeof e;return t==`string`||t==`number`||t==`symbol`||t==`boolean`?e!==`__proto__`:e===null}function Jn(e,t){var n=e.__data__;return qn(t)?n[typeof t==`string`?`string`:`hash`]:n.map}function Yn(e){var t=Jn(this,e).delete(e);return this.size-=+!!t,t}function Xn(e){return Jn(this,e).get(e)}function Zn(e){return Jn(this,e).has(e)}function Qn(e,t){var n=Jn(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function $n(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}$n.prototype.clear=Kn,$n.prototype.delete=Yn,$n.prototype.get=Xn,$n.prototype.has=Zn,$n.prototype.set=Qn;var er=`Expected a function`;function tr(e,t){if(typeof e!=`function`||t!=null&&typeof t!=`function`)throw TypeError(er);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],a=n.cache;if(a.has(i))return a.get(i);var o=e.apply(this,r);return n.cache=a.set(i,o)||a,o};return n.cache=new(tr.Cache||$n),n}tr.Cache=$n;var nr=500;function rr(e){var t=tr(e,function(e){return n.size===nr&&n.clear(),e}),n=t.cache;return t}var ir=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ar=/\\(\\)?/g,or=rr(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(``),e.replace(ir,function(e,n,r,i){t.push(r?i.replace(ar,`$1`):n||e)}),t});function sr(e){return e==null?``:oe(e)}function cr(e,t){return N(e)?e:Tn(e,t)?[e]:or(sr(e))}var lr=1/0;function ur(e){if(typeof e==`string`||j(e))return e;var t=e+``;return t==`0`&&1/e==-lr?`-0`:t}function dr(e,t){t=cr(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[ur(t[n++])];return n&&n==r?e:void 0}function fr(e,t,n){var r=e==null?void 0:dr(e,t);return r===void 0?n:r}function pr(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}var mr=mn(Object.getPrototypeOf,Object),hr=`[object Object]`,gr=Function.prototype,_r=Object.prototype,vr=gr.toString,yr=_r.hasOwnProperty,br=vr.call(Object);function xr(e){if(!A(e)||k(e)!=hr)return!1;var t=mr(e);if(t===null)return!0;var n=yr.call(t,`constructor`)&&t.constructor;return typeof n==`function`&&n instanceof n&&vr.call(n)==br}function Sr(){if(!arguments.length)return[];var e=arguments[0];return N(e)?e:[e]}function Cr(){this.__data__=new Wn,this.size=0}function wr(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function Tr(e){return this.__data__.get(e)}function Er(e){return this.__data__.has(e)}var Dr=200;function Or(e,t){var n=this.__data__;if(n instanceof Wn){var r=n.__data__;if(!Gn||r.length<Dr-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new $n(r)}return n.set(e,t),this.size=n.size,this}function kr(e){var t=this.__data__=new Wn(e);this.size=t.size}kr.prototype.clear=Cr,kr.prototype.delete=wr,kr.prototype.get=Tr,kr.prototype.has=Er,kr.prototype.set=Or;function Ar(e,t){return e&&ut(t,vn(t),e)}function jr(e,t){return e&&ut(t,Sn(t),e)}var Mr=typeof e==`object`&&e&&!e.nodeType&&e,Nr=Mr&&typeof module==`object`&&module&&!module.nodeType&&module,Pr=Nr&&Nr.exports===Mr?y.Buffer:void 0,Fr=Pr?Pr.allocUnsafe:void 0;function Ir(e,t){if(t)return e.slice();var n=e.length,r=Fr?Fr(n):new e.constructor(n);return e.copy(r),r}function Lr(e,t){for(var n=-1,r=e==null?0:e.length,i=0,a=[];++n<r;){var o=e[n];t(o,n,e)&&(a[i++]=o)}return a}function Rr(){return[]}var zr=Object.prototype.propertyIsEnumerable,Br=Object.getOwnPropertySymbols,Vr=Br?function(e){return e==null?[]:(e=Object(e),Lr(Br(e),function(t){return zr.call(e,t)}))}:Rr;function Hr(e,t){return ut(e,Vr(e),t)}var Ur=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)pr(t,Vr(e)),e=mr(e);return t}:Rr;function Wr(e,t){return ut(e,Ur(e),t)}function Gr(e,t,n){var r=t(e);return N(e)?r:pr(r,n(e))}function Kr(e){return Gr(e,vn,Vr)}function qr(e){return Gr(e,Sn,Ur)}var Jr=Le(y,`DataView`),Yr=Le(y,`Promise`),Xr=Le(y,`Set`),Zr=`[object Map]`,Qr=`[object Object]`,$r=`[object Promise]`,ei=`[object Set]`,ti=`[object WeakMap]`,ni=`[object DataView]`,ri=De(Jr),ii=De(Gn),ai=De(Yr),oi=De(Xr),si=De(Re),ci=k;(Jr&&ci(new Jr(new ArrayBuffer(1)))!=ni||Gn&&ci(new Gn)!=Zr||Yr&&ci(Yr.resolve())!=$r||Xr&&ci(new Xr)!=ei||Re&&ci(new Re)!=ti)&&(ci=function(e){var t=k(e),n=t==Qr?e.constructor:void 0,r=n?De(n):``;if(r)switch(r){case ri:return ni;case ii:return Zr;case ai:return $r;case oi:return ei;case si:return ti}return t});var li=ci,ui=Object.prototype.hasOwnProperty;function di(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]==`string`&&ui.call(e,`index`)&&(n.index=e.index,n.input=e.input),n}var fi=y.Uint8Array;function pi(e){var t=new e.constructor(e.byteLength);return new fi(t).set(new fi(e)),t}function mi(e,t){var n=t?pi(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}var hi=/\w*$/;function gi(e){var t=new e.constructor(e.source,hi.exec(e));return t.lastIndex=e.lastIndex,t}var _i=b?b.prototype:void 0,vi=_i?_i.valueOf:void 0;function yi(e){return vi?Object(vi.call(e)):{}}function bi(e,t){var n=t?pi(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var xi=`[object Boolean]`,Si=`[object Date]`,Ci=`[object Map]`,wi=`[object Number]`,Ti=`[object RegExp]`,Ei=`[object Set]`,Di=`[object String]`,Oi=`[object Symbol]`,ki=`[object ArrayBuffer]`,Ai=`[object DataView]`,ji=`[object Float32Array]`,Mi=`[object Float64Array]`,Ni=`[object Int8Array]`,Pi=`[object Int16Array]`,Fi=`[object Int32Array]`,Ii=`[object Uint8Array]`,Li=`[object Uint8ClampedArray]`,Ri=`[object Uint16Array]`,zi=`[object Uint32Array]`;function Bi(e,t,n){var r=e.constructor;switch(t){case ki:return pi(e);case xi:case Si:return new r(+e);case Ai:return mi(e,n);case ji:case Mi:case Ni:case Pi:case Fi:case Ii:case Li:case Ri:case zi:return bi(e,n);case Ci:return new r;case wi:case Di:return new r(e);case Ti:return gi(e);case Ei:return new r;case Oi:return yi(e)}}function Vi(e){return typeof e.constructor==`function`&&!bt(e)?Be(mr(e)):{}}var Hi=`[object Map]`;function Ui(e){return A(e)&&li(e)==Hi}var Wi=ln&&ln.isMap,Gi=Wi?an(Wi):Ui,Ki=`[object Set]`;function qi(e){return A(e)&&li(e)==Ki}var Ji=ln&&ln.isSet,Yi=Ji?an(Ji):qi,Xi=1,Zi=2,Qi=4,$i=`[object Arguments]`,ea=`[object Array]`,ta=`[object Boolean]`,na=`[object Date]`,ra=`[object Error]`,ia=`[object Function]`,aa=`[object GeneratorFunction]`,oa=`[object Map]`,sa=`[object Number]`,ca=`[object Object]`,la=`[object RegExp]`,ua=`[object Set]`,da=`[object String]`,fa=`[object Symbol]`,pa=`[object WeakMap]`,ma=`[object ArrayBuffer]`,ha=`[object DataView]`,ga=`[object Float32Array]`,_a=`[object Float64Array]`,va=`[object Int8Array]`,ya=`[object Int16Array]`,ba=`[object Int32Array]`,xa=`[object Uint8Array]`,Sa=`[object Uint8ClampedArray]`,Ca=`[object Uint16Array]`,wa=`[object Uint32Array]`,I={};I[$i]=I[ea]=I[ma]=I[ha]=I[ta]=I[na]=I[ga]=I[_a]=I[va]=I[ya]=I[ba]=I[oa]=I[sa]=I[ca]=I[la]=I[ua]=I[da]=I[fa]=I[xa]=I[Sa]=I[Ca]=I[wa]=!0,I[ra]=I[ia]=I[pa]=!1;function Ta(e,t,n,r,i,a){var o,s=t&Xi,c=t&Zi,l=t&Qi;if(n&&(o=i?n(e,r,i,a):n(e)),o!==void 0)return o;if(!P(e))return e;var u=N(e);if(u){if(o=di(e),!s)return Ue(e,o)}else{var d=li(e),f=d==ia||d==aa;if(Mt(e))return Ir(e,s);if(d==ca||d==$i||f&&!i){if(o=c||f?{}:Vi(e),!s)return c?Wr(e,jr(o,e)):Hr(e,Ar(o,e))}else{if(!I[d])return i?e:{};o=Bi(e,d,s)}}a||(a=new kr);var p=a.get(e);if(p)return p;a.set(e,o),Yi(e)?e.forEach(function(r){o.add(Ta(r,t,n,r,e,a))}):Gi(e)&&e.forEach(function(r,i){o.set(i,Ta(r,t,n,i,e,a))});var m=u?void 0:(l?c?qr:Kr:c?Sn:vn)(e);return Ze(m||e,function(r,i){m&&(i=r,r=e[i]),lt(o,i,Ta(r,t,n,i,e,a))}),o}var Ea=1,Da=4;function Oa(e){return Ta(e,Ea|Da)}var ka=1,Aa=4;function ja(e,t){return t=typeof t==`function`?t:void 0,Ta(e,ka|Aa,t)}function Ma(e){for(var t=-1,n=e==null?0:e.length,r=0,i=[];++t<n;){var a=e[t];a&&(i[r++]=a)}return i}var Na=`__lodash_hash_undefined__`;function Pa(e){return this.__data__.set(e,Na),this}function Fa(e){return this.__data__.has(e)}function Ia(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new $n;++t<n;)this.add(e[t])}Ia.prototype.add=Ia.prototype.push=Pa,Ia.prototype.has=Fa;function La(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function Ra(e,t){return e.has(t)}var za=1,Ba=2;function Va(e,t,n,r,i,a){var o=n&za,s=e.length,c=t.length;if(s!=c&&!(o&&c>s))return!1;var l=a.get(e),u=a.get(t);if(l&&u)return l==t&&u==e;var d=-1,f=!0,p=n&Ba?new Ia:void 0;for(a.set(e,t),a.set(t,e);++d<s;){var m=e[d],h=t[d];if(r)var g=o?r(h,m,d,t,e,a):r(m,h,d,e,t,a);if(g!==void 0){if(g)continue;f=!1;break}if(p){if(!La(t,function(e,t){if(!Ra(p,t)&&(m===e||i(m,e,n,r,a)))return p.push(t)})){f=!1;break}}else if(!(m===h||i(m,h,n,r,a))){f=!1;break}}return a.delete(e),a.delete(t),f}function Ha(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}function Ua(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}var Wa=1,Ga=2,Ka=`[object Boolean]`,qa=`[object Date]`,Ja=`[object Error]`,Ya=`[object Map]`,Xa=`[object Number]`,Za=`[object RegExp]`,Qa=`[object Set]`,$a=`[object String]`,eo=`[object Symbol]`,to=`[object ArrayBuffer]`,no=`[object DataView]`,ro=b?b.prototype:void 0,io=ro?ro.valueOf:void 0;function ao(e,t,n,r,i,a,o){switch(n){case no:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case to:return!(e.byteLength!=t.byteLength||!a(new fi(e),new fi(t)));case Ka:case qa:case Xa:return st(+e,+t);case Ja:return e.name==t.name&&e.message==t.message;case Za:case $a:return e==t+``;case Ya:var s=Ha;case Qa:var c=r&Wa;if(s||(s=Ua),e.size!=t.size&&!c)return!1;var l=o.get(e);if(l)return l==t;r|=Ga,o.set(e,t);var u=Va(s(e),s(t),r,i,a,o);return o.delete(e),u;case eo:if(io)return io.call(e)==io.call(t)}return!1}var oo=1,so=Object.prototype.hasOwnProperty;function co(e,t,n,r,i,a){var o=n&oo,s=Kr(e),c=s.length;if(c!=Kr(t).length&&!o)return!1;for(var l=c;l--;){var u=s[l];if(!(o?u in t:so.call(t,u)))return!1}var d=a.get(e),f=a.get(t);if(d&&f)return d==t&&f==e;var p=!0;a.set(e,t),a.set(t,e);for(var m=o;++l<c;){u=s[l];var h=e[u],g=t[u];if(r)var _=o?r(g,h,u,t,e,a):r(h,g,u,e,t,a);if(!(_===void 0?h===g||i(h,g,n,r,a):_)){p=!1;break}m||(m=u==`constructor`)}if(p&&!m){var v=e.constructor,y=t.constructor;v!=y&&`constructor`in e&&`constructor`in t&&!(typeof v==`function`&&v instanceof v&&typeof y==`function`&&y instanceof y)&&(p=!1)}return a.delete(e),a.delete(t),p}var lo=1,uo=`[object Arguments]`,fo=`[object Array]`,po=`[object Object]`,mo=Object.prototype.hasOwnProperty;function ho(e,t,n,r,i,a){var o=N(e),s=N(t),c=o?fo:li(e),l=s?fo:li(t);c=c==uo?po:c,l=l==uo?po:l;var u=c==po,d=l==po,f=c==l;if(f&&Mt(e)){if(!Mt(t))return!1;o=!0,u=!1}if(f&&!u)return a||(a=new kr),o||dn(e)?Va(e,t,n,r,i,a):ao(e,t,c,n,r,i,a);if(!(n&lo)){var p=u&&mo.call(e,`__wrapped__`),m=d&&mo.call(t,`__wrapped__`);if(p||m){var h=p?e.value():e,g=m?t.value():t;return a||(a=new kr),i(h,g,n,r,a)}}return f?(a||(a=new kr),co(e,t,n,r,i,a)):!1}function go(e,t,n,r,i){return e===t?!0:e==null||t==null||!A(e)&&!A(t)?e!==e&&t!==t:ho(e,t,n,r,go,i)}var _o=1,vo=2;function yo(e,t,n,r){var i=n.length,a=i,o=!r;if(e==null)return!a;for(e=Object(e);i--;){var s=n[i];if(o&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++i<a;){s=n[i];var c=s[0],l=e[c],u=s[1];if(o&&s[2]){if(l===void 0&&!(c in e))return!1}else{var d=new kr;if(r)var f=r(l,u,c,e,t,d);if(!(f===void 0?go(u,l,_o|vo,r,d):f))return!1}}return!0}function bo(e){return e===e&&!P(e)}function xo(e){for(var t=vn(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,bo(i)]}return t}function So(e,t){return function(n){return n!=null&&n[e]===t&&(t!==void 0||e in Object(n))}}function Co(e){var t=xo(e);return t.length==1&&t[0][2]?So(t[0][0],t[0][1]):function(n){return n===e||yo(n,e,t)}}function wo(e,t){return e!=null&&t in Object(e)}function To(e,t,n){t=cr(t,e);for(var r=-1,i=t.length,a=!1;++r<i;){var o=ur(t[r]);if(!(a=e!=null&&n(e,o)))break;e=e[o]}return a||++r!=i?a:(i=e==null?0:e.length,!!i&&ht(i)&&at(o,i)&&(N(e)||Dt(e)))}function Eo(e,t){return e!=null&&To(e,t,wo)}var Do=1,Oo=2;function ko(e,t){return Tn(e)&&bo(t)?So(ur(e),t):function(n){var r=fr(n,e);return r===void 0&&r===t?Eo(n,e):go(t,r,Do|Oo)}}function Ao(e){return function(t){return t==null?void 0:t[e]}}function jo(e){return function(t){return dr(t,e)}}function Mo(e){return Tn(e)?Ao(ur(e)):jo(e)}function No(e){return typeof e==`function`?e:e==null?_e:typeof e==`object`?N(e)?ko(e[0],e[1]):Co(e):Mo(e)}function Po(e){return function(t,n,r){for(var i=-1,a=Object(t),o=r(t),s=o.length;s--;){var c=o[e?s:++i];if(n(a[c],c,a)===!1)break}return t}}var Fo=Po();function Io(e,t){return e&&Fo(e,t,vn)}function Lo(e,t){return function(n,r){if(n==null)return n;if(!gt(n))return e(n,r);for(var i=n.length,a=t?i:-1,o=Object(n);(t?a--:++a<i)&&r(o[a],a,o)!==!1;);return n}}var Ro=Lo(Io),zo=function(){return y.Date.now()},Bo=`Expected a function`,Vo=Math.max,Ho=Math.min;function Uo(e,t,n){var r,i,a,o,s,c,l=0,u=!1,d=!1,f=!0;if(typeof e!=`function`)throw TypeError(Bo);t=ge(t)||0,P(n)&&(u=!!n.leading,d=`maxWait`in n,a=d?Vo(ge(n.maxWait)||0,t):a,f=`trailing`in n?!!n.trailing:f);function p(t){var n=r,a=i;return r=i=void 0,l=t,o=e.apply(a,n),o}function m(e){return l=e,s=setTimeout(_,t),u?p(e):o}function h(e){var n=e-c,r=e-l,i=t-n;return d?Ho(i,a-r):i}function g(e){var n=e-c,r=e-l;return c===void 0||n>=t||n<0||d&&r>=a}function _(){var e=zo();if(g(e))return v(e);s=setTimeout(_,h(e))}function v(e){return s=void 0,f&&r?p(e):(r=i=void 0,o)}function y(){s!==void 0&&clearTimeout(s),l=0,r=c=i=s=void 0}function b(){return s===void 0?o:v(zo())}function x(){var e=zo(),n=g(e);if(r=arguments,i=this,c=e,n){if(s===void 0)return m(c);if(d)return clearTimeout(s),s=setTimeout(_,t),p(c)}return s===void 0&&(s=setTimeout(_,t)),o}return x.cancel=y,x.flush=b,x}function Wo(e,t,n){(n!==void 0&&!st(e[t],n)||n===void 0&&!(t in e))&&ot(e,t,n)}function Go(e){return A(e)&>(e)}function Ko(e,t){if((t!==`constructor`||typeof e[t]!=`function`)&&t!=`__proto__`)return e[t]}function qo(e){return ut(e,Sn(e))}function Jo(e,t,n,r,i,a,o){var s=Ko(e,n),c=Ko(t,n),l=o.get(c);if(l)Wo(e,n,l);else{var u=a?a(s,c,n+``,e,t,o):void 0,d=u===void 0;if(d){var f=N(c),p=!f&&Mt(c),m=!f&&!p&&dn(c);u=c,f||p||m?N(s)?u=s:Go(s)?u=Ue(s):p?(d=!1,u=Ir(c,!0)):m?(d=!1,u=bi(c,!0)):u=[]:xr(c)||Dt(c)?(u=s,Dt(s)?u=qo(s):(!P(s)||Se(s))&&(u=Vi(c))):d=!1}d&&(o.set(c,u),i(u,c,r,a,o),o.delete(c)),Wo(e,n,u)}}function Yo(e,t,n,r,i){e!==t&&Fo(t,function(a,o){if(i||(i=new kr),P(a))Jo(e,t,o,n,Yo,r,i);else{var s=r?r(Ko(e,o),a,o+``,e,t,i):void 0;s===void 0&&(s=a),Wo(e,o,s)}},Sn)}function Xo(e,t,n){for(var r=-1,i=e==null?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}function Zo(e){return typeof e==`function`?e:_e}function Qo(e,t){return(N(e)?Ze:Ro)(e,Zo(t))}function $o(e,t){var n=[];return Ro(e,function(e,r,i){t(e,r,i)&&n.push(e)}),n}function es(e,t){return(N(e)?Lr:$o)(e,No(t,3))}function ts(e,t){var n=-1,r=gt(e)?Array(e.length):[];return Ro(e,function(e,i,a){r[++n]=t(e,i,a)}),r}function ns(e,t){return(N(e)?M:ts)(e,No(t,3))}function rs(e,t){return go(e,t)}var is=vt(function(e,t,n){Yo(e,t,n)});function as(e,t,n,r){if(!P(e))return e;t=cr(t,e);for(var i=-1,a=t.length,o=a-1,s=e;s!=null&&++i<a;){var c=ur(t[i]),l=n;if(c===`__proto__`||c===`constructor`||c===`prototype`)return e;if(i!=o){var u=s[c];l=r?r(u,c,s):void 0,l===void 0&&(l=P(u)?u:at(t[i+1])?[]:{})}lt(s,c,l),s=s[c]}return e}function L(e,t,n){return e==null?e:as(e,t,n)}function os(e){return sr(e).toLowerCase()}var ss=Xr&&1/Ua(new Xr([,-0]))[1]==1/0?function(e){return new Xr(e)}:He,cs=200;function ls(e,t,n){var r=-1,i=nt,a=e.length,o=!0,s=[],c=s;if(n)o=!1,i=Xo;else if(a>=cs){var l=t?null:ss(e);if(l)return Ua(l);o=!1,i=Ra,c=new Ia}else c=t?[]:s;outer:for(;++r<a;){var u=e[r],d=t?t(u):u;if(u=n||u!==0?u:0,o&&d===d){for(var f=c.length;f--;)if(c[f]===d)continue outer;t&&c.push(d),s.push(u)}else i(c,d,n)||(c!==s&&c.push(d),s.push(u))}return s}function us(e){return e&&e.length?ls(e):[]}var ds={search:`Search`,reset:`Reset`,expand:`Expand`,unexpand:`Unexpand`,pleaseEnter:`Please enter `,pleaseSelect:`Please select `,rangeStart:`start `,rangeEnd:`end `,today:`Today`,yesterday:`Yesterday`,lastWeek:`Last week`,last7:`Last seven days`,last30:`Last 30 days`,thisMonth:`This month`,thisYear:`This year`,min:`Min`,max:`Max`,table:{total:`Total`},timePeriodOutOfRange:`The current period is outside the selectable range`,upload:{select:`Select files`,tip:`Allowed formats and maximum size`,uploading:`Uploading`,preview:`Preview`,download:`Download`,delete:`Delete`,retry:`Retry association`,setCover:`Set cover`,unsetCover:`Unset cover`,tooMany:`File count exceeds the limit`,invalidType:`File type is not allowed`,tooLarge:`File size exceeds the limit`,failed:`File upload failed`,missingBusinessId:`Business ID or file ID is missing`},action:{detail:`Detail`,create:`Create`,del:`Delete`,edit:`Edit`,export:`Export`,save:`Save`,cancel:`Cancel`,return:`Return`}},fs={search:`查询`,reset:`重置`,expand:`展开`,unexpand:`收起`,pleaseEnter:`请输入`,pleaseSelect:`请选择`,rangeStart:`开始`,rangeEnd:`结束`,today:`今天`,yesterday:`昨天`,lastWeek:`上周`,last7:`最近七天`,last30:`最近 30 天`,thisMonth:`本月`,thisYear:`今年`,min:`最小`,max:`最大`,table:{total:`合计`},timePeriodOutOfRange:`已有时段超出可选范围`,upload:{select:`选择文件`,tip:`支持的格式及最大大小`,uploading:`上传中`,preview:`预览`,download:`下载`,delete:`删除`,retry:`重试关联`,setCover:`设为封面`,unsetCover:`取消封面`,tooMany:`文件数量超过限制`,invalidType:`文件格式不符合要求`,tooLarge:`文件大小超过限制`,failed:`文件上传失败`,missingBusinessId:`缺少业务主键或文件标识`},action:{detail:`详情`,create:`新增`,del:`删除`,edit:`编辑`,export:`导出`,save:`保存`,cancel:`取消`,return:`返回`}},R=(e=`localStorage`)=>({wsCache:e===`localStorage`?window.localStorage:window.sessionStorage,setLang:ms,getLang:hs,isZhCN:gs,setTheme:_s,getTheme:vs,isDark:ys,setCurrentSize:bs,getCurrentSize:xs,setUser:Ss,getUser:Cs}),ps={IS_DARK:`isDark`,LANG:`lang`,THEME:`theme`,LAYOUT:`layout`,CURRENT_SIZE:`currentSize`,USER:`user`},ms=(e=``)=>{let{wsCache:t}=R();t.setItem(ps.LANG,e)},hs=()=>{let{wsCache:e}=R();return e.getItem(ps.LANG)},gs=()=>{let e=hs()||``;return!e||os(e)===`zh-cn`},_s=e=>{let{wsCache:t}=R();t.setItem(ps.THEME,JSON.stringify(e||`{}`))},vs=()=>{let{wsCache:e}=R(),t=e.getItem(ps.THEME);return t?JSON.parse(t):void 0},ys=()=>window.matchMedia(`(prefers-color-scheme: dark)`).matches,bs=(e=``)=>{let{wsCache:t}=R();t.setItem(ps.CURRENT_SIZE,e)},xs=()=>{let{wsCache:e}=R();return e.getItem(ps.CURRENT_SIZE)},Ss=e=>{let{wsCache:t}=R();t.setItem(ps.USER,JSON.stringify(e||`{}`))},Cs=()=>{let{wsCache:e}=R(),t=e.getItem(ps.USER),n=t?JSON.parse(t):{};return n.permissions=new Set(n.permissions||[]),n},ws=hs()||`zh-cn`,z=e=>({t:e=>fr(ws===`zh-cn`?fs:ds,e,e)});function Ts(e){"@babel/helpers - typeof";return Ts=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},Ts(e)}function Es(e,t){if(Ts(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(Ts(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function Ds(e){var t=Es(e,`string`);return Ts(t)==`symbol`?t:t+``}function B(e,t,n){return(t=Ds(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Os(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function V(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Os(Object(n),!0).forEach(function(t){B(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Os(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function ks(e){let t=new Set(e.map(e=>e.field).filter(Boolean)),n=new Set;return e.flatMap(e=>{if(e.rangeFields===void 0)return[];let r=e.rangeFields;if(typeof e.field!=`string`||!e.field||!Array.isArray(r)||!r.length||r.some(e=>typeof e!=`string`||!e||t.has(e)||n.has(e))||new Set(r).size!==r.length)throw TypeError(`Invalid rangeFields for search rule "${e.field}": expected distinct fields that do not conflict with other rules.`);return r.forEach(e=>n.add(e)),[{field:e.field,fields:r,trimTrailingNulls:e.type===`cascader`}]})}function As(e,t,n){if(!t.length||e==null&&!n.size)return e;let r=V({},e);for(let{field:e,fields:i,trimTrailingNulls:a}of t)if(i.some(e=>Object.prototype.hasOwnProperty.call(r,e))){let t=i.map(e=>{var t;return(t=r[e])==null?null:t});if(a)for(;t.length&&t[t.length-1]===null;)t.pop();r[e]=t.every(e=>e===null)?null:t,i.forEach(e=>delete r[e])}else n.has(e)&&!Object.prototype.hasOwnProperty.call(r,e)&&(r[e]=null);return r}function js(e,t){if(!t.length||e==null)return e;let n=V({},e);for(let{field:e,fields:r}of t){if(!Object.prototype.hasOwnProperty.call(n,e))continue;let t=n[e];if(t!=null&&t!==``&&!Array.isArray(t))throw TypeError(`Invalid range value for search rule "${e}": expected an array or an empty value.`);r.forEach((e,r)=>{var i;n[e]=Array.isArray(t)?(i=t[r])==null?null:i:null}),delete n[e]}return n}function Ms(e,t,n,r,i,a,o){try{var s=e[a](o),c=s.value}catch(e){n(e);return}s.done?t(c):Promise.resolve(c).then(r,i)}function H(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var a=e.apply(t,n);function o(e){Ms(a,r,i,o,s,`next`,e)}function s(e){Ms(a,r,i,o,s,`throw`,e)}o(void 0)})}}var Ns=((e,t)=>{let n=e.__vccOpts||e;for(let[e,r]of t)n[e]=r;return n})((0,n.defineComponent)(V(V({},{name:`AbSearch`}),{},{__name:`ab-search`,props:(0,n.mergeModels)({rule:{},compactMode:{type:Boolean,default:!1},collapse:{type:Boolean}},{modelValue:{},modelModifiers:{}}),emits:(0,n.mergeModels)([`update:modelValue`,`query`,`reset`],[`update:modelValue`]),setup(e,{emit:t}){let i=t,a=e,o=(0,n.inject)(`abTableRef`,null),{t:s}=z(),c=(0,n.useModel)(e,`modelValue`),l=(0,n.ref)(a.collapse),u=(0,n.ref)(),d=(0,n.ref)(),f=(0,n.computed)(()=>ks(a.rule.map(ee))),p=(0,n.reactive)(new Set);(0,n.watch)(()=>f.value.map(({field:e,fields:t})=>({field:e,present:c.value!=null&&t.some(e=>Object.prototype.hasOwnProperty.call(c.value,e))})),e=>{let t=new Set(e.map(({field:e})=>e));for(let e of p)t.has(e)||p.delete(e);for(let{field:t,present:n}of e)n&&p.add(t)},{immediate:!0,flush:`sync`});let m=(0,n.computed)(()=>As(c.value,f.value,p)),h;function g(e,t){var r;let i=V({},(r=h)==null?m.value:r);for(let n of t.fields())Object.prototype.hasOwnProperty.call(e,n)?i[n]=e[n]:delete i[n];h=i,c.value=js(i,f.value),(0,n.nextTick)(()=>{h===i&&(h=void 0)})}let _=(0,n.reactive)({type:`ElFormItem`,native:!0,props:{justify:`end`},class:`ab-form-item ab-search__operates`,children:[{type:`ElButton`,native:!0,children:[{type:`icon`,props:{icon:`ep:search`}},s(`search`)],props:{type:`primary`},on:{click:te}},{type:`ElButton`,native:!0,children:[{type:`icon`,props:{icon:`ep:refresh`}},s(`reset`)],props:{type:`default`},on:{click:E}},{type:`ElButton`,native:!0,children:[s(`expand`)],props:{type:`primary`,link:!0,icon:(0,n.markRaw)(r.ArrowDown)},on:{click:A}}]});(0,n.watchEffect)(()=>{_.children[2].children=[s(l.value?`unexpand`:`expand`)],_.children[2].props.icon=l.value?(0,n.markRaw)(r.ArrowUp):(0,n.markRaw)(r.ArrowDown)}),(0,n.watch)(()=>a.rule,()=>{l.value=a.collapse});let v=(0,n.computed)(()=>[...a.rule.filter(e=>ee(e).hidden!==!0),_]),y=(0,n.computed)(()=>a.rule.filter(e=>ee(e).hidden===!0).map(e=>(0,n.shallowReactive)(V(V({},ee(e)),{},{hidden:!1}))));function b(e,t=new Set){for(let n of e){if(!n||typeof n!=`object`)continue;let e=ee(n);if(typeof e.field==`string`&&t.add(e.field),Array.isArray(e.children)&&b(e.children,t),Array.isArray(e.control))for(let n of e.control)Array.isArray(n.rule)&&b(n.rule,t)}return t}let x=(0,n.computed)(()=>b(v.value)),S=(0,n.computed)(()=>b(y.value));function C(e){if(m.value==null)return m.value;let t=V({},m.value);for(let n of e)delete t[n];return t}let w=(0,n.computed)(e=>{let t=C(S.value);return rs(t,e)?e:t}),T=(0,n.computed)(e=>{let t=C(x.value);return rs(t,e)?e:t});(0,n.watch)(()=>c.value,e=>O());function E(){return D.apply(this,arguments)}function D(){return D=H(function*(){var e,t;(e=u.value)==null||e.resetFields(),yield(0,n.nextTick)(),(t=d.value)==null||t.resetFields()}),D.apply(this,arguments)}function ee(e){return typeof e.getRule==`function`?e.getRule():e}function O(){var e;o==null||(e=o.value)==null||e.reload(),i(`query`,c.value)}function te(){return k.apply(this,arguments)}function k(){return k=H(function*(){yield(0,n.nextTick)(),O()}),k.apply(this,arguments)}function A(){l.value=!l.value}return(t,r)=>{let i=(0,n.resolveComponent)(`ab-form`);return(0,n.openBlock)(),(0,n.createElementBlock)(`section`,{class:(0,n.normalizeClass)([`ab-search`,e.compactMode?`compact`:``])},[(0,n.createVNode)(i,{rule:v.value,"model-value":w.value,"onUpdate:modelValue":r[0]||(r[0]=e=>g(e,u.value)),api:u.value,"onUpdate:api":r[1]||(r[1]=e=>u.value=e)},null,8,[`rule`,`model-value`,`api`]),(0,n.createVNode)(n.Transition,{name:`ab-search-expand`,mode:`out-in`,appear:``,persisted:``},{default:(0,n.withCtx)(()=>[(0,n.withDirectives)((0,n.createElementVNode)(`div`,null,[(0,n.createVNode)(i,{rule:y.value,"model-value":T.value,"onUpdate:modelValue":r[2]||(r[2]=e=>g(e,d.value)),api:d.value,"onUpdate:api":r[3]||(r[3]=e=>d.value=e)},null,8,[`rule`,`model-value`,`api`])],512),[[n.vShow,l.value]])]),_:1})],2)}}})),[[`__scopeId`,`data-v-bfc6a8b4`]]),Ps=(e,t)=>{e.component(`ab-search`,Ns)};function Fs(e){let t=e.replace(/([A-Z])/g,`-$1`).toLocaleLowerCase();return t.indexOf(`-`)===0&&(t=t.substr(1)),t}function Is(e){return e.replace(e[0],e[0].toLocaleUpperCase())}function U(e,t,n){e&&t&&(e[t]=n)}function Ls(e,t){e&&t&&delete e[t]}var Rs=e=>Object.prototype.toString.call(e).slice(8,-1),W={type(e,t){return Object.prototype.toString.call(e)===`[object `+t+`]`},Undef(e){return e==null},Element(e){return typeof e==`object`&&!!e&&`nodeType`in e&&e.nodeType===1&&!W.Object(e)},trueArray(e){return Array.isArray(e)&&e.length>0},Function(e){let t=Rs(e);return t===`Function`||t===`AsyncFunction`},getType(e){return Rs(e)},empty(e){return e==null||Array.isArray(e)&&Array.isArray(e)&&!e.length?!0:typeof e==`string`&&!e},Date:e=>W.type(e,`Date`),Object:e=>W.type(e,`Object`),String:e=>W.type(e,`String`),Boolean:e=>W.type(e,`Boolean`),Array:e=>W.type(e,`Array`),Number:e=>W.type(e,`Number`)};function G(e,t){return{}.hasOwnProperty.call(e,t)}function zs(e,t={},n){for(let r in t)if(Object.prototype.hasOwnProperty.call(t,r)){let i=Reflect.get(t,r);if(Array.isArray(i)||W.Object(i)){let t=Reflect.get(e,r)===void 0;if(Array.isArray(i))t&&U(e,r,[]);else{let a=i;if(a._clone&&n!==void 0){if(n)i=a.getRule(),t&&U(e,r,{});else{U(e,r,a._clone());continue}}else t&&U(e,r,{})}Reflect.set(e,r,zs(Reflect.get(e,r),i,n))}else if(U(e,r,i),!W.Undef(i)){let t=i;W.Undef(t.__json)||Reflect.set(Reflect.get(e,r),`__json`,t.__json),W.Undef(t.__origin)||Reflect.set(Reflect.get(e,r),`__origin`,t.__origin)}}return n!==void 0&&Array.isArray(e)?e.filter(e=>!e||!e.__ctrl):e}function Bs(e){return zs({},{value:e}).value}function Vs(e,t,n){return`[archbiz ${e}]: ${t}`+(n?`
|
|
10
8
|
|
|
11
|
-
err: ${String(i)}`);return}}function la(e,t){return JSON.parse(e,function(r,n){return typeof n=="string"?Qe(n,t):n})}var at=(e,t={},r={})=>{let n=[...ia,...r.normal||[]],i=[...oa,...r.array||[]],o=[...aa,...r.functional||[]],a=r.props||[];return e.reduce((s,c)=>{for(let u in c)if(s[u])if(a.indexOf(u)>-1)s[u]=at([c[u]],s[u]);else if(n.indexOf(u)>-1)s[u]=M(M({},s[u]),c[u]);else if(i.indexOf(u)>-1){let d=s[u]instanceof Array?s[u]:[s[u]],f=c[u]instanceof Array?c[u]:[c[u]];s[u]=[...d,...f]}else if(o.indexOf(u)>-1)for(let d in c[u])if(s[u][d]){let f=s[u][d]instanceof Array?s[u][d]:[s[u][d]],h=c[u][d]instanceof Array?c[u][d]:[c[u][d]];s[u][d]=[...f,...h]}else s[u][d]=c[u][d];else if(u==="hook")for(let d in c[u])s[u][d]?s[u][d]=rh(s[u][d],c[u][d]):s[u][d]=c[u][d];else s[u]=c[u];else s[u]=n.indexOf(u)>-1||o.indexOf(u)>-1||a.indexOf(u)>-1?M({},c[u]):i.indexOf(u)>-1?c[u]instanceof Array?[...c[u]]:typeof c[u]=="object"?M({},c[u]):c[u]:c[u];return s},t)},rh=(e,t)=>function(...r){e&&e.apply(this,r),t&&t.apply(this,r)};function ft(e,t){let r=null;return function(...n){r!==null&&clearTimeout(r),r=setTimeout(()=>e.apply(this,n),t)}}function pt(e,t,r){let n=e,i;return(t||"").split(".").forEach(o=>{i&&(n[i]&&typeof n[i]=="object"||(n[i]={}),n=n[i]),i=o}),n[String(i)]=r,n}function ee(e,...t){return(Object.assign||function(r,...n){for(let i of n)for(let o in i)Object.prototype.hasOwnProperty.call(i,o)&&Pe(r,o,Reflect.get(i,o));return r})(e,...t)}function sa(e){return typeof e!="object"||!e?e:Array.isArray(e)?[...e]:M({},e)}function nh(e=new Map){let t={$on(r,n){let i=e.get(r);i&&i.push(n)||e.set(r,[n])},$once(r,n){n._once=!0,t.$on(r,n)},$off(r,n){let i=e.get(r);i&&i.splice(i.indexOf(n)>>>0,1)},$emit(r,...n){(e.get(r)||[]).slice().forEach(i=>{"_once"in i&&i._once&&(t.$off(r,i),delete i._once),i(...n)}),(e.get("*")||[]).slice().forEach(i=>{i(r,n)})}};return t}function ih(e){return e&&typeof e=="object"&&typeof e.then=="function"}function Nn(e){return ih(e)?e:Promise.resolve(e)}function $t(e){return Array.isArray(e)?e:e==null||e===""?[]:[e]}function Me(e){return ca(e==null?void 0:e.replace(/(-[a-z])/g,function(t){return t.replace("-","").toLocaleUpperCase()}))}function ca(e){return e==null?void 0:e.replace(e[0],e[0].toLowerCase())}function ir(e){return e?typeof e=="object"?JSON.stringify(e,null,2):String(e):""}var oh=0;function Pr(){let e=370+ ++oh;return"F"+Math.random().toString(36).substr(3,3)+(+`${Date.now()}`).toString(36)+e.toString(36)+"c"}function ua(e,t,r={}){let{valueField:n="value",childrenField:i="children"}=r;for(let o of e){if(o[n]===t)return o;if(Array.isArray(o[i])){let a=ua(o[i],t,r);if(a)return a}}}var ah={black:"#182327"},lh={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},Le={h:0,s:0,l:0},Ir={h:0,s:0,l:0};function Vn(e,t,r){return r<0&&(r+=1),r>1&&--r,r<1/6?e+(t-e)*6*r:r<.5?t:r<2/3?e+(t-e)*6*(2/3-r):e}var sh=/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3}|[A-Fa-f0-9]{8})$|rgb\(\s*\d+\s*,\s*\d+\s*,\s*\d+\s*\)|rgba\(\s*\d+\s*,\s*\d+\s*,\s*\d+\s*,\s*[\d.]+\s*\)/,da=class Rt{constructor(t,r,n,i){ve(this,"isColor",!0);ve(this,"r",1);ve(this,"g",1);ve(this,"b",1);ve(this,"a",1);return r===void 0&&n===void 0?this.set(t):this.setRGBA(t,r,n,i)}static isColor(t){return typeof t=="string"?sh.test(t):typeof t=="number"&&Number.isInteger(t)&&t>=0&&t<=16777215&&t.toString(6).length===6}static getRandomStyle(t){return t?Ze.random().setA(t).getStyle():Ze.random().getStyle()}static getDarken(t,r=.8){return Ze.set(t).getHSL(Br),Ze.setHSL(Br.h,Br.s,Br.l*r).getStyle()}static getLighten(t,r=1.2){return this.getDarken(t,r)}static getContrast(t){return Ze.set(t),Ze.getContrastString()}static getArray(t){return Ze.set(t).toArray()}static getComplementary(t){return Ze.set(t),Ze.getComplementaryString()}static getMoreTransparent(t,r){return Ze.set(t).setA(r).getStyle()}set(t){return t&&t.isColor?this.copy(t):typeof t=="number"?this.setHex(t):typeof t=="string"&&this.setStyle(t),this}random(){return this.setHex(Math.floor(Math.random()*(1<<24)))}setScalar(t){return this.r=t,this.g=t,this.b=t,this.a=1,this}setHex(t){return t=Math.floor(t),this.r=(t>>16&255)/255,this.g=(t>>8&255)/255,this.b=(t&255)/255,this.a=1,this}setR(t){return this.r=t,this}setG(t){return this.g=t,this}setB(t){return this.b=t,this}setA(t){return this.a=t,this}setRGB(t,r,n){return this.setRGBA(t,r,n,this.a)}setRGBA(t,r,n,i=1){return this.r=t,this.g=r,this.b=n,this.a=i,this}setHSL(t,r,n,i=1){if(t=ch(t,1),r=or(r,0,1),n=or(n,0,1),r===0)this.r=this.g=this.b=n;else{let o=n<=.5?n*(1+r):n+r-n*r,a=2*n-o;this.r=Vn(a,o,t+1/3),this.g=Vn(a,o,t),this.b=Vn(a,o,t-1/3)}return this.a=i,this}setStyle(t){let r;if(r=/^((?:rgb|hsl)a?)\(([^\)]*)\)/.exec(t)){let n,i=r[1],o=r[2];switch(i){case"rgb":case"rgba":if(n=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(o))return this.r=Math.min(255,parseInt(n[1],10))/255,this.g=Math.min(255,parseInt(n[2],10))/255,this.b=Math.min(255,parseInt(n[3],10))/255,this.a=Math.max(Math.min(1,n[4]===void 0?1:parseFloat(n[4])),0),this;if(n=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(o))return this.r=Math.min(100,parseInt(n[1],10))/100,this.g=Math.min(100,parseInt(n[2],10))/100,this.b=Math.min(100,parseInt(n[3],10))/100,this.a=Math.max(Math.min(1,n[4]===void 0?1:parseFloat(n[4])),0),this;break;case"hsl":case"hsla":if(n=/^\s*(\d*\.?\d+)\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(o)){let a=parseFloat(n[1])/360,s=parseInt(n[2],10)/100,c=parseInt(n[3],10)/100,u=Math.max(Math.min(1,n[4]===void 0?1:parseFloat(n[4])),0);return this.setHSL(a,s,c,u)}}}else if(r=/^\#([A-Fa-f\d]+)$/.exec(t)){let n=r[1],i=n.length;if(i===3)return this.r=parseInt(n.charAt(0)+n.charAt(0),16)/255,this.g=parseInt(n.charAt(1)+n.charAt(1),16)/255,this.b=parseInt(n.charAt(2)+n.charAt(2),16)/255,this.a=1,this;if(i===6)return this.r=parseInt(n.charAt(0)+n.charAt(1),16)/255,this.g=parseInt(n.charAt(2)+n.charAt(3),16)/255,this.b=parseInt(n.charAt(4)+n.charAt(5),16)/255,this.a=1,this}return t&&t.length>0?this.setColorName(t):this}setColorName(t){let r=lh[t.toLowerCase()];return r===void 0?console.warn("Color: Unknown color "+t):this.setHex(r),this}clone(){return new Rt(this.r,this.g,this.b,this.a)}copy(t){return this.r=t.r,this.g=t.g,this.b=t.b,this.a=t.a,this}getRGB(t=new Rt){return t.setRGB(this.r,this.g,this.b)}getRGBByBg(t=new Rt){let r=this.a,n=r*this.r+(1-r)*t.r,i=r*this.g+(1-r)*t.g,o=r*this.b+(1-r)*t.b;return new Rt(n,i,o)}getHex(){return or(this.r*255,0,255)<<16^or(this.g*255,0,255)<<8^or(this.b*255,0,255)}getHSL(t){let r=this.r,n=this.g,i=this.b,o=Math.max(r,n,i),a=Math.min(r,n,i),s=0,c,u=(a+o)/2;if(a===o)s=0,c=0;else{let d=o-a;switch(c=u<=.5?d/(o+a):d/(2-o-a),o){case r:s=(n-i)/d+(n<i?6:0);break;case n:s=(i-r)/d+2;break;case i:s=(r-n)/d+4}s/=6}return t.h=s,t.s=c,t.l=u,t}getStyle(){return this.a===1?`rgb(${this.r*255|0},${this.g*255|0},${this.b*255|0})`:`rgba(${this.r*255|0},${this.g*255|0},${this.b*255|0},${this.a||1})`}getHexString(){return"#"+("000000"+this.getHex().toString(16)).slice(-6)}getBrightness(){let t=(this.r*255*299+this.g*255*587+this.b*255*144)/1e3;return t+=(255-t)*(255-this.a*255)/255,t}getContrastString(){return this.getBrightness()>125?"#2f2f2f":"#f2f2f2"}getComplementary(t=new Rt){let r=this.toArray(),n=[0,0,0,1];for(let i=0;i<r.length;i++)if(i<3)n[i]=1-r[i];else if(i===3)r[i]>1||r[i]<=0?n[i]=1:n[i]=Math.max(Math.min(parseFloat(r[i].toFixed(2)),1),0);else continue;return t.setRGBA(n[0],n[1],n[2],parseFloat(n[3].toFixed(2)))}getComplementaryString(){return this.getComplementary().getStyle()}getLightenOrDarken(t){if(t===void 0||t>=1)return this.getHexString();let r=this.getRGBByBg(),n=r.r*t+(1-t),i=r.g*t+(1-t),o=r.b*t+(1-t);return new Rt(n,i,o).getHexString()}getNormalized(){return[parseFloat(Math.max(Math.min(this.r,1),0).toFixed(2)),parseFloat(Math.max(Math.min(this.g,1),0).toFixed(2)),parseFloat(Math.max(Math.min(this.b,1),0).toFixed(2)),parseFloat(Math.max(Math.min(this.a,1),0).toFixed(2))]}getNormalized3(){return[parseFloat(Math.max(Math.min(this.r,1),0).toFixed(2)),parseFloat(Math.max(Math.min(this.g,1),0).toFixed(2)),parseFloat(Math.max(Math.min(this.b,1),0).toFixed(2))]}offsetHSL(t,r,n){return this.getHSL(Le),Le.h+=t,Le.s+=r,Le.l+=n,this.setHSL(Le.h,Le.s,Le.l),this}add(t){return this.r+=t.r,this.g+=t.g,this.b+=t.b,this}addColors(t,r){return this.r=t.r+r.r,this.g=t.g+r.g,this.b=t.b+r.b,this}addScalar(t){return this.r+=t,this.g+=t,this.b+=t,this}sub(t){return this.r=Math.max(0,this.r-t.r),this.g=Math.max(0,this.g-t.g),this.b=Math.max(0,this.b-t.b),this}multiply(t){return this.r*=t.r,this.g*=t.g,this.b*=t.b,this}multiplyScalar(t){return this.r*=t,this.g*=t,this.b*=t,this}lerp(t,r){return this.r+=(t.r-this.r)*r,this.g+=(t.g-this.g)*r,this.b+=(t.b-this.b)*r,this}lerpColors(t,r,n){return this.r=t.r+(r.r-t.r)*n,this.g=t.g+(r.g-t.g)*n,this.b=t.b+(r.b-t.b)*n,this}lerpHSL(t,r){this.getHSL(Le),t.getHSL(Ir);let n=Ln(Le.h,Ir.h,r),i=Ln(Le.s,Ir.s,r),o=Ln(Le.l,Ir.l,r);return this.setHSL(n,i,o),this}equals(t){return t.r===this.r&&t.g===this.g&&t.b===this.b}fromArray(t,r=0){return this.r=t[r],this.g=t[r+1],this.b=t[r+2],this.a=t[r+3],this}toArray(t=[0,0,0,0],r=0){return t[r]=this.r,t[r+1]=this.g,t[r+2]=this.b,t[r+3]=this.a,t}fromBufferAttribute(t,r){return this.r=t.getX(r),this.g=t.getY(r),this.b=t.getZ(r),t.normalized===!0&&(this.r/=255,this.g/=255,this.b/=255),this}toJSON(){return this.getHex()}*[Symbol.iterator](){yield this.r,yield this.g,yield this.b}},or=(e,t,r)=>Math.max(t,Math.min(r,e)),ch=(e,t)=>(e%t+t)%t,Ln=(e,t,r)=>(1-r)*e+r*t,Ze=new da,Br={h:0,s:0,l:0};function fa(){let e=window.localStorage.getItem("user"),t=e?JSON.parse(e):{};return t.permissions=new Set(t.permissions||[]),t}function Hn(e,t){let r=!1;return!(e!=null&&e.length)&&!(t!=null&&t.length)||(e&&e.length>0&&(r=dh(e)),t&&t.length>0&&(r||(r=fh(t))),r)}var uh="*:*:*",dh=(e=[])=>{var r;let t=fa();return((r=t==null?void 0:t.permissions)==null?void 0:r.has(uh))||e.some(n=>{var i;return(i=t==null?void 0:t.permissions)==null?void 0:i.has(n)})};function fh(e){var t;if(e&&e instanceof Array&&e.length>0){let r=e;return!!(((t=fa())==null?void 0:t.roles)||[]).some(n=>n==="super_admin"||r.includes(n))}return console.error("permission.hasRole"),!1}var ar=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function jt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var pa={exports:{}};(function(e,t){(function(r,n){e.exports=n()})(ar,function(){var r=1e3,n=6e4,i=36e5,o="millisecond",a="second",s="minute",c="hour",u="day",d="week",f="month",h="quarter",p="year",m="date",g="Invalid Date",y=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,b=/\[([^\]]+)]|YYYY|YY|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,S={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(F){var A=["th","st","nd","rd"],C=F%100;return"["+F+(A[(C-20)%10]||A[C]||A[0])+"]"}},$=function(F,A,C){var B=String(F);return!B||B.length>=A?F:""+Array(A+1-B.length).join(C)+F},L={s:$,z:function(F){var A=-F.utcOffset(),C=Math.abs(A),B=Math.floor(C/60),I=C%60;return(A<=0?"+":"-")+$(B,2,"0")+":"+$(I,2,"0")},m:function F(A,C){if(A.date()<C.date())return-F(C,A);var B=12*(C.year()-A.year())+(C.month()-A.month()),I=A.clone().add(B,f),W=C-I<0,Z=A.clone().add(B+(W?-1:1),f);return+(-(B+(C-I)/(W?I-Z:Z-I))||0)},a:function(F){return F<0?Math.ceil(F)||0:Math.floor(F)},p:function(F){return{M:f,y:p,w:d,d:u,D:m,h:c,m:s,s:a,ms:o,Q:h}[F]||String(F||"").toLowerCase().replace(/s$/,"")},u:function(F){return F===void 0}},R="en",T={};T[R]=S;var E="$isDayjsObject",k=function(F){return F instanceof x||!(!F||!F[E])},V=function F(A,C,B){var I;if(!A)return R;if(typeof A=="string"){var W=A.toLowerCase();T[W]&&(I=W),C&&(T[W]=C,I=W);var Z=A.split("-");if(!I&&Z.length>1)return F(Z[0])}else{var X=A.name;T[X]=A,I=X}return!B&&I&&(R=I),I||!B&&R},q=function(F,A){if(k(F))return F.clone();var C=typeof A=="object"?A:{};return C.date=F,C.args=arguments,new x(C)},U=L;U.l=V,U.i=k,U.w=function(F,A){return q(F,{locale:A.$L,utc:A.$u,x:A.$x,$offset:A.$offset})};var x=function(){function F(C){this.$L=V(C.locale,null,!0),this.parse(C),this.$x=this.$x||C.x||{},this[E]=!0}var A=F.prototype;return A.parse=function(C){this.$d=function(B){var I=B.date,W=B.utc;if(I===null)return new Date(NaN);if(U.u(I))return new Date;if(I instanceof Date)return new Date(I);if(typeof I=="string"&&!/Z$/i.test(I)){var Z=I.match(y);if(Z){var X=Z[2]-1||0,P=(Z[7]||"0").substring(0,3);return W?new Date(Date.UTC(Z[1],X,Z[3]||1,Z[4]||0,Z[5]||0,Z[6]||0,P)):new Date(Z[1],X,Z[3]||1,Z[4]||0,Z[5]||0,Z[6]||0,P)}}return new Date(I)}(C),this.init()},A.init=function(){var C=this.$d;this.$y=C.getFullYear(),this.$M=C.getMonth(),this.$D=C.getDate(),this.$W=C.getDay(),this.$H=C.getHours(),this.$m=C.getMinutes(),this.$s=C.getSeconds(),this.$ms=C.getMilliseconds()},A.$utils=function(){return U},A.isValid=function(){return this.$d.toString()!==g},A.isSame=function(C,B){var I=q(C);return this.startOf(B)<=I&&I<=this.endOf(B)},A.isAfter=function(C,B){return q(C)<this.startOf(B)},A.isBefore=function(C,B){return this.endOf(B)<q(C)},A.$g=function(C,B,I){return U.u(C)?this[B]:this.set(I,C)},A.unix=function(){return Math.floor(this.valueOf()/1e3)},A.valueOf=function(){return this.$d.getTime()},A.startOf=function(C,B){var I=this,W=!!U.u(B)||B,Z=U.p(C),X=function(v,O){var N=U.w(I.$u?Date.UTC(I.$y,O,v):new Date(I.$y,O,v),I);return W?N:N.endOf(u)},P=function(v,O){return U.w(I.toDate()[v].apply(I.toDate("s"),(W?[0,0,0,0]:[23,59,59,999]).slice(O)),I)},H=this.$W,G=this.$M,ie=this.$D,pe="set"+(this.$u?"UTC":"");switch(Z){case p:return W?X(1,0):X(31,11);case f:return W?X(1,G):X(0,G+1);case d:var K=this.$locale().weekStart||0,w=(H<K?H+7:H)-K;return X(W?ie-w:ie+(6-w),G);case u:case m:return P(pe+"Hours",0);case c:return P(pe+"Minutes",1);case s:return P(pe+"Seconds",2);case a:return P(pe+"Milliseconds",3);default:return this.clone()}},A.endOf=function(C){return this.startOf(C,!1)},A.$set=function(C,B){var I,W=U.p(C),Z="set"+(this.$u?"UTC":""),X=(I={},I[u]=Z+"Date",I[m]=Z+"Date",I[f]=Z+"Month",I[p]=Z+"FullYear",I[c]=Z+"Hours",I[s]=Z+"Minutes",I[a]=Z+"Seconds",I[o]=Z+"Milliseconds",I)[W],P=W===u?this.$D+(B-this.$W):B;if(W===f||W===p){var H=this.clone().set(m,1);H.$d[X](P),H.init(),this.$d=H.set(m,Math.min(this.$D,H.daysInMonth())).$d}else X&&this.$d[X](P);return this.init(),this},A.set=function(C,B){return this.clone().$set(C,B)},A.get=function(C){return this[U.p(C)]()},A.add=function(C,B){var I,W=this;C=Number(C);var Z=U.p(B),X=function(G){var ie=q(W);return U.w(ie.date(ie.date()+Math.round(G*C)),W)};if(Z===f)return this.set(f,this.$M+C);if(Z===p)return this.set(p,this.$y+C);if(Z===u)return X(1);if(Z===d)return X(7);var P=(I={},I[s]=n,I[c]=i,I[a]=r,I)[Z]||1,H=this.$d.getTime()+C*P;return U.w(H,this)},A.subtract=function(C,B){return this.add(-1*C,B)},A.format=function(C){var B=this,I=this.$locale();if(!this.isValid())return I.invalidDate||g;var W=C||"YYYY-MM-DDTHH:mm:ssZ",Z=U.z(this),X=this.$H,P=this.$m,H=this.$M,G=I.weekdays,ie=I.months,pe=I.meridiem,K=function(O,N,z,ae){return O&&(O[N]||O(B,W))||z[N].slice(0,ae)},w=function(O){return U.s(X%12||12,O,"0")},v=pe||function(O,N,z){var ae=O<12?"AM":"PM";return z?ae.toLowerCase():ae};return W.replace(b,function(O,N){return N||function(z){switch(z){case"YY":return String(B.$y).slice(-2);case"YYYY":return U.s(B.$y,4,"0");case"M":return H+1;case"MM":return U.s(H+1,2,"0");case"MMM":return K(I.monthsShort,H,ie,3);case"MMMM":return K(ie,H);case"D":return B.$D;case"DD":return U.s(B.$D,2,"0");case"d":return String(B.$W);case"dd":return K(I.weekdaysMin,B.$W,G,2);case"ddd":return K(I.weekdaysShort,B.$W,G,3);case"dddd":return G[B.$W];case"H":return String(X);case"HH":return U.s(X,2,"0");case"h":return w(1);case"hh":return w(2);case"a":return v(X,P,!0);case"A":return v(X,P,!1);case"m":return String(P);case"mm":return U.s(P,2,"0");case"s":return String(B.$s);case"ss":return U.s(B.$s,2,"0");case"SSS":return U.s(B.$ms,3,"0");case"Z":return Z}return null}(O)||Z.replace(":","")})},A.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},A.diff=function(C,B,I){var W,Z=this,X=U.p(B),P=q(C),H=(P.utcOffset()-this.utcOffset())*n,G=this-P,ie=function(){return U.m(Z,P)};switch(X){case p:W=ie()/12;break;case f:W=ie();break;case h:W=ie()/3;break;case d:W=(G-H)/6048e5;break;case u:W=(G-H)/864e5;break;case c:W=G/i;break;case s:W=G/n;break;case a:W=G/r;break;default:W=G}return I?W:U.a(W)},A.daysInMonth=function(){return this.endOf(f).$D},A.$locale=function(){return T[this.$L]},A.locale=function(C,B){if(!C)return this.$L;var I=this.clone(),W=V(C,B,!0);return W&&(I.$L=W),I},A.clone=function(){return U.w(this.$d,this)},A.toDate=function(){return new Date(this.valueOf())},A.toJSON=function(){return this.isValid()?this.toISOString():null},A.toISOString=function(){return this.$d.toISOString()},A.toString=function(){return this.$d.toUTCString()},F}(),_=x.prototype;return q.prototype=_,[["$ms",o],["$s",a],["$m",s],["$H",c],["$W",u],["$M",f],["$y",p],["$D",m]].forEach(function(F){_[F[1]]=function(A){return this.$g(A,F[0],F[1])}}),q.extend=function(F,A){return F.$i||(F(A,x,q),F.$i=!0),q},q.locale=V,q.isDayjs=k,q.unix=function(F){return q(1e3*F)},q.en=T[R],q.Ls=T,q.p={},q})})(pa);var ph=pa.exports;const de=jt(ph);var hh={exports:{}};(function(e,t){(function(r,n){e.exports=n()})(ar,function(){var r,n,i=1e3,o=6e4,a=36e5,s=864e5,c=31536e6,u=2628e6,d=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,f=/\[([^\]]+)]|YYYY|YY|Y|M{1,2}|D{1,2}|H{1,2}|m{1,2}|s{1,2}|SSS/g,h={years:c,months:u,days:s,hours:a,minutes:o,seconds:i,milliseconds:1,weeks:6048e5},p=function(T){return T instanceof L},m=function(T,E,k){return new L(T,k,E.$l)},g=function(T){return n.p(T)+"s"},y=function(T){return T<0},b=function(T){return y(T)?Math.ceil(T):Math.floor(T)},S=function(T){return Math.abs(T)},$=function(T,E){return T?y(T)?{negative:!0,format:""+S(T)+E}:{negative:!1,format:""+T+E}:{negative:!1,format:""}},L=function(){function T(k,V,q){var U=this;if(this.$d={},this.$l=q,k===void 0&&(this.$ms=0,this.parseFromMilliseconds()),V)return m(k*h[g(V)],this);if(typeof k=="number")return this.$ms=k,this.parseFromMilliseconds(),this;if(typeof k=="object")return Object.keys(k).forEach(function(F){U.$d[g(F)]=k[F]}),this.calMilliseconds(),this;if(typeof k=="string"){var x=k.match(d);if(x){var _=x.slice(2).map(function(F){return F!=null?Number(F):0});return this.$d.years=_[0],this.$d.months=_[1],this.$d.weeks=_[2],this.$d.days=_[3],this.$d.hours=_[4],this.$d.minutes=_[5],this.$d.seconds=_[6],this.calMilliseconds(),this}}return this}var E=T.prototype;return E.calMilliseconds=function(){var k=this;this.$ms=Object.keys(this.$d).reduce(function(V,q){return V+(k.$d[q]||0)*h[q]},0)},E.parseFromMilliseconds=function(){var k=this.$ms;this.$d.years=b(k/c),k%=c,this.$d.months=b(k/u),k%=u,this.$d.days=b(k/s),k%=s,this.$d.hours=b(k/a),k%=a,this.$d.minutes=b(k/o),k%=o,this.$d.seconds=b(k/i),k%=i,this.$d.milliseconds=k},E.toISOString=function(){var k=$(this.$d.years,"Y"),V=$(this.$d.months,"M"),q=+this.$d.days||0;this.$d.weeks&&(q+=7*this.$d.weeks);var U=$(q,"D"),x=$(this.$d.hours,"H"),_=$(this.$d.minutes,"M"),F=this.$d.seconds||0;this.$d.milliseconds&&(F+=this.$d.milliseconds/1e3,F=Math.round(1e3*F)/1e3);var A=$(F,"S"),C=k.negative||V.negative||U.negative||x.negative||_.negative||A.negative,B=x.format||_.format||A.format?"T":"",I=(C?"-":"")+"P"+k.format+V.format+U.format+B+x.format+_.format+A.format;return I==="P"||I==="-P"?"P0D":I},E.toJSON=function(){return this.toISOString()},E.format=function(k){var V=k||"YYYY-MM-DDTHH:mm:ss",q={Y:this.$d.years,YY:n.s(this.$d.years,2,"0"),YYYY:n.s(this.$d.years,4,"0"),M:this.$d.months,MM:n.s(this.$d.months,2,"0"),D:this.$d.days,DD:n.s(this.$d.days,2,"0"),H:this.$d.hours,HH:n.s(this.$d.hours,2,"0"),m:this.$d.minutes,mm:n.s(this.$d.minutes,2,"0"),s:this.$d.seconds,ss:n.s(this.$d.seconds,2,"0"),SSS:n.s(this.$d.milliseconds,3,"0")};return V.replace(f,function(U,x){return x||String(q[U])})},E.as=function(k){return this.$ms/h[g(k)]},E.get=function(k){var V=this.$ms,q=g(k);return q==="milliseconds"?V%=1e3:V=q==="weeks"?b(V/h[q]):this.$d[q],V||0},E.add=function(k,V,q){var U;return U=V?k*h[g(V)]:p(k)?k.$ms:m(k,this).$ms,m(this.$ms+U*(q?-1:1),this)},E.subtract=function(k,V){return this.add(k,V,!0)},E.locale=function(k){var V=this.clone();return V.$l=k,V},E.clone=function(){return m(this.$ms,this)},E.humanize=function(k){return r().add(this.$ms,"ms").locale(this.$l).fromNow(!k)},E.valueOf=function(){return this.asMilliseconds()},E.milliseconds=function(){return this.get("milliseconds")},E.asMilliseconds=function(){return this.as("milliseconds")},E.seconds=function(){return this.get("seconds")},E.asSeconds=function(){return this.as("seconds")},E.minutes=function(){return this.get("minutes")},E.asMinutes=function(){return this.as("minutes")},E.hours=function(){return this.get("hours")},E.asHours=function(){return this.as("hours")},E.days=function(){return this.get("days")},E.asDays=function(){return this.as("days")},E.weeks=function(){return this.get("weeks")},E.asWeeks=function(){return this.as("weeks")},E.months=function(){return this.get("months")},E.asMonths=function(){return this.as("months")},E.years=function(){return this.get("years")},E.asYears=function(){return this.as("years")},T}(),R=function(T,E,k){return T.add(E.years()*k,"y").add(E.months()*k,"M").add(E.days()*k,"d").add(E.hours()*k,"h").add(E.minutes()*k,"m").add(E.seconds()*k,"s").add(E.milliseconds()*k,"ms")};return function(T,E,k){r=k,n=k().$utils(),k.duration=function(U,x){var _=k.locale();return m(U,{$l:_},x)},k.isDuration=p;var V=E.prototype.add,q=E.prototype.subtract;E.prototype.add=function(U,x){return p(U)?R(this,U,1):V.bind(this)(U,x)},E.prototype.subtract=function(U,x){return p(U)?R(this,U,-1):q.bind(this)(U,x)}}})})(hh);var ha={exports:{}};(function(e,t){(function(r,n){e.exports=n()})(ar,function(){return function(r,n){var i=n.prototype,o=i.format;i.format=function(a){var s=this,c=this.$locale();if(!this.isValid())return o.bind(this)(a);var u=this.$utils(),d=(a||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,function(f){switch(f){case"Q":return Math.ceil((s.$M+1)/3);case"Do":return c.ordinal(s.$D);case"gggg":return s.weekYear();case"GGGG":return s.isoWeekYear();case"wo":return c.ordinal(s.week(),"W");case"w":case"ww":return u.s(s.week(),f==="w"?1:2,"0");case"W":case"WW":return u.s(s.isoWeek(),f==="W"?1:2,"0");case"k":case"kk":return u.s(String(s.$H===0?24:s.$H),f==="k"?1:2,"0");case"X":return Math.floor(s.$d.getTime()/1e3);case"x":return s.$d.getTime();case"z":return"["+s.offsetName()+"]";case"zzz":return"["+s.offsetName("long")+"]";default:return f}});return o.bind(this)(d)}}})})(ha);var mh=ha.exports;const gh=jt(mh);var ma={exports:{}};(function(e,t){(function(r,n){e.exports=n()})(ar,function(){var r="day";return function(n,i,o){var a=function(u){return u.add(4-u.isoWeekday(),r)},s=i.prototype;s.isoWeekYear=function(){return a(this).year()},s.isoWeek=function(u){if(!this.$utils().u(u))return this.add(7*(u-this.isoWeek()),r);var d,f,h,p,m=a(this),g=(d=this.isoWeekYear(),f=this.$u,h=(f?o.utc:o)().year(d).startOf("year"),p=4-h.isoWeekday(),h.isoWeekday()>4&&(p+=7),h.add(p,r));return m.diff(g,"week")+1},s.isoWeekday=function(u){return this.$utils().u(u)?this.day()||7:this.day(this.day()%7?u:u-7)};var c=s.startOf;s.startOf=function(u,d){var f=this.$utils(),h=!!f.u(d)||d;return f.p(u)==="isoweek"?h?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):c.bind(this)(u,d)}}})})(ma);var yh=ma.exports;const bh=jt(yh);var ga={exports:{}};(function(e,t){(function(r,n){e.exports=n()})(ar,function(){var r={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},n=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,i=/\d/,o=/\d\d/,a=/\d\d?/,s=/\d*[^-_:/,()\s\d]+/,c={},u=function(y){return(y=+y)+(y>68?1900:2e3)},d=function(y){return function(b){this[y]=+b}},f=[/[+-]\d\d:?(\d\d)?|Z/,function(y){(this.zone||(this.zone={})).offset=function(b){if(!b||b==="Z")return 0;var S=b.match(/([+-]|\d\d)/g),$=60*S[1]+(+S[2]||0);return $===0?0:S[0]==="+"?-$:$}(y)}],h=function(y){var b=c[y];return b&&(b.indexOf?b:b.s.concat(b.f))},p=function(y,b){var S,$=c.meridiem;if($){for(var L=1;L<=24;L+=1)if(y.indexOf($(L,0,b))>-1){S=L>12;break}}else S=y===(b?"pm":"PM");return S},m={A:[s,function(y){this.afternoon=p(y,!1)}],a:[s,function(y){this.afternoon=p(y,!0)}],Q:[i,function(y){this.month=3*(y-1)+1}],S:[i,function(y){this.milliseconds=100*+y}],SS:[o,function(y){this.milliseconds=10*+y}],SSS:[/\d{3}/,function(y){this.milliseconds=+y}],s:[a,d("seconds")],ss:[a,d("seconds")],m:[a,d("minutes")],mm:[a,d("minutes")],H:[a,d("hours")],h:[a,d("hours")],HH:[a,d("hours")],hh:[a,d("hours")],D:[a,d("day")],DD:[o,d("day")],Do:[s,function(y){var b=c.ordinal,S=y.match(/\d+/);if(this.day=S[0],b)for(var $=1;$<=31;$+=1)b($).replace(/\[|\]/g,"")===y&&(this.day=$)}],w:[a,d("week")],ww:[o,d("week")],M:[a,d("month")],MM:[o,d("month")],MMM:[s,function(y){var b=h("months"),S=(h("monthsShort")||b.map(function($){return $.slice(0,3)})).indexOf(y)+1;if(S<1)throw new Error;this.month=S%12||S}],MMMM:[s,function(y){var b=h("months").indexOf(y)+1;if(b<1)throw new Error;this.month=b%12||b}],Y:[/[+-]?\d+/,d("year")],YY:[o,function(y){this.year=u(y)}],YYYY:[/\d{4}/,d("year")],Z:f,ZZ:f};function g(y){var b,S;b=y,S=c&&c.formats;for(var $=(y=b.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(q,U,x){var _=x&&x.toUpperCase();return U||S[x]||r[x]||S[_].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(F,A,C){return A||C.slice(1)})})).match(n),L=$.length,R=0;R<L;R+=1){var T=$[R],E=m[T],k=E&&E[0],V=E&&E[1];$[R]=V?{regex:k,parser:V}:T.replace(/^\[|\]$/g,"")}return function(q){for(var U={},x=0,_=0;x<L;x+=1){var F=$[x];if(typeof F=="string")_+=F.length;else{var A=F.regex,C=F.parser,B=q.slice(_),I=A.exec(B)[0];C.call(U,I),q=q.replace(I,"")}}return function(W){var Z=W.afternoon;if(Z!==void 0){var X=W.hours;Z?X<12&&(W.hours+=12):X===12&&(W.hours=0),delete W.afternoon}}(U),U}}return function(y,b,S){S.p.customParseFormat=!0,y&&y.parseTwoDigitYear&&(u=y.parseTwoDigitYear);var $=b.prototype,L=$.parse;$.parse=function(R){var T=R.date,E=R.utc,k=R.args;this.$u=E;var V=k[1];if(typeof V=="string"){var q=k[2]===!0,U=k[3]===!0,x=q||U,_=k[2];U&&(_=k[2]),c=this.$locale(),!q&&_&&(c=S.Ls[_]),this.$d=function(B,I,W,Z){try{if(["x","X"].indexOf(I)>-1)return new Date((I==="X"?1e3:1)*B);var X=g(I)(B),P=X.year,H=X.month,G=X.day,ie=X.hours,pe=X.minutes,K=X.seconds,w=X.milliseconds,v=X.zone,O=X.week,N=new Date,z=G||(P||H?1:N.getDate()),ae=P||N.getFullYear(),oe=0;P&&!H||(oe=H>0?H-1:N.getMonth());var me,Ae=ie||0,Te=pe||0,De=K||0,we=w||0;return v?new Date(Date.UTC(ae,oe,z,Ae,Te,De,we+60*v.offset*1e3)):W?new Date(Date.UTC(ae,oe,z,Ae,Te,De,we)):(me=new Date(ae,oe,z,Ae,Te,De,we),O&&(me=Z(me).week(O).toDate()),me)}catch(Be){return new Date("")}}(T,V,E,S),this.init(),_&&_!==!0&&(this.$L=this.locale(_).$L),x&&T!=this.format(V)&&(this.$d=new Date("")),c={}}else if(V instanceof Array)for(var F=V.length,A=1;A<=F;A+=1){k[1]=V[A-1];var C=S.apply(this,k);if(C.isValid()){this.$d=C.$d,this.$L=C.$L,this.init();break}A===F&&(this.$d=new Date(""))}else L.call(this,R)}}})})(ga);var wh=ga.exports;const vh=jt(wh),xh=rr()==="zh-cn";de.extend(bh),de.extend(gh),de.extend(vh);function lt(e){return typeof e=="undefined"||e==="undefined"||e==="null"||e===null||e===""||isNaN(e)}function Sh(e){if(lt(e))return e;let t="";return xh?t=Intl.NumberFormat("zh-CN",{style:"currency",currency:"CNY"}).format(e):t=Intl.NumberFormat("en-US",{style:"currency",currency:"USD"}).format(e),t}function Ch(e){return lt(e)?e:(Math.round(e*100)/100).toLocaleString()}function $h(e){return lt(e)?e:Math.round(e*100)/100+" %"}function _e(e,t="YYYY-MM-DD"){if(e==null||e==="")return e;const r=de(e);return r.isValid()?r.format(t):e}function Th(e,t,r="label",n){const i=[];if(Array.isArray(t)&&!t.length)return"";if(Array.isArray(t))for(let a=0,s=t.length;a<s;a++)t[a]=String(t[a]).trim().normalize();else t=String(t).trim().normalize();if(!(e!=null&&e.length))return lt(t)?"":t;const o=a=>!0;return Array.isArray(t)?i.push(...vt(e,a=>t.includes(String(a.value))&&o())):i.push(...vt(e,a=>(a.value===t||String(a.value)===String(t))&&o())),i!=null&&i.length?Wp(Vf(Uo(i,r))).join("、"):Array.isArray(t)||lt(t)?"":t}const ya=({cellValue:e}={},t="YYYY-MM-DD HH:mm")=>_e(e,t),zn=({cellValue:e}={},t="YYYY")=>_e(e,t),Un=({cellValue:e}={},t="Q")=>e==null||e===""||!de(e).isValid()?e:xt()?_e(e,"YYYY")+"年"+_e(e,t)+"季度":"Quarter "+_e(e,t)+", "+_e(e,"YYYY"),qn=({cellValue:e}={},t="MM")=>e==null||e===""||!de(e).isValid()?e:xt()?_e(e,"YYYY")+"年 "+_e(e,t)+"月":_e(e,t)+"/"+_e(e,"YYYY"),Eh=({cellValue:e}={},t="W")=>{if(e==null||e==="")return e;const r=typeof e=="string"&&/^(\d{4})-(\d{1,2})(?:st|nd|rd|th|周)$/i.exec(e);if(!r&&!de(e).isValid())return e;const n=r?r[1]:_e(e,"GGGG"),i=r?r[2]:_e(e,t);return xt()?n+"年第"+i+"周":"Week "+i+", "+n},ba=({cellValue:e,itemValue:t}={})=>((typeof e=="undefined"||e===null)&&(e=t),lt(e)?e:Ch(e)),wa=({cellValue:e}={})=>lt(e)?e:$h(e),va=({cellValue:e,itemValue:t}={})=>(lt(e)&&(e=t),lt(e)?e:Sh(e)),kh=new Map([["radio",Sa],["checkbox",Sa],["switch",_h],["treeSelect",Fh],["cascader",Ah],["inputNumber",()=>typeof ba=="function"?ba:void 0],["inputCurrency",()=>typeof va=="function"?va:void 0],["inputPercent",()=>typeof wa=="function"?wa:void 0],["datePicker",Oh],["timePicker",Rh]]);function Yn(e){var n;if(typeof e.formatter=="function")return ne(M({},e),{formatter:e.formatter});const t=kh.get((n=e.type)!=null?n:"");let r;return t?r=t(e):Array.isArray(e.options)&&e.options.length>0&&(r=Mh(e)),ne(M({},e),{formatter:r})}function xa(e,t){if(typeof e!="string"||typeof t!="string"||t==="YYYY-wo")return e;const r=t==="x"||t==="X"?de(Number(e)*(t==="X"?1e3:1)):de(e,t,!0);return r.isValid()?r:e}function Sa(e){var r;const t=((r=e.props)==null?void 0:r.options)||e.options;return({cellValue:n})=>n==null||n===""?"":(Array.isArray(n)?n:[n]).map(o=>{var s,c;const a=Array.isArray(t)?t.find(u=>(u==null?void 0:u.value)===o):void 0;return(c=(s=a==null?void 0:a.label)!=null?s:o)!=null?c:""}).join("、")}function _h(e){return({cellValue:t})=>{var a;const{activeValue:r=!0,inactiveValue:n=!1,activeText:i,inactiveText:o}=(a=e.props)!=null?a:{};return t===r?i||(xt()?"开启":"On"):t===n?o||(xt()?"关闭":"Off"):t!=null?t:""}}function Fh(e){var s,c,u,d,f,h,p;const t=(s=e.props)!=null?s:{},r=(c=t.props)!=null?c:{},n=e.optionsTo==="props.data"&&Array.isArray(e.options)?e.options:t.data,i=(f=(d=(u=r.value)!=null?u:t.nodeKey)!=null?d:t.valueKey)!=null?f:"value",o=(h=r.label)!=null?h:"label",a=(p=r.children)!=null?p:"children";return({cellValue:m})=>m==null||m===""?"":(Array.isArray(m)?m:[m]).map(y=>{var S;const b=Array.isArray(n)?ua(n,y,{valueField:i,childrenField:a}):void 0;return(S=b==null?void 0:b[o])!=null?S:y}).join("、")}function Ca(e,t,r,n){for(const i of e){if(Rr(i[r],t))return[i];const o=i[n];if(Array.isArray(o)){const a=Ca(o,t,r,n);if(a)return[i,...a]}}}function Ah(e){var f,h,p,m,g,y;const t=(f=e.props)!=null?f:{},r=(h=t.props)!=null?h:{},n=e.optionsTo==="props.options"&&Array.isArray(e.options)?e.options:t.options,i=(p=r.value)!=null?p:"value",o=(m=r.label)!=null?m:"label",a=(g=r.children)!=null?g:"children",s=Array.isArray(n)?n:[],c=(y=t.separator)!=null?y:" / ",u=t.showAllLevels!==!1;function d(b){let S;if(r.emitPath===!1){const $=Ca(s,b,i,a);S=$?$.map(L=>{var R;return(R=L[o])!=null?R:L[i]}):[b]}else{const $=Array.isArray(b)?b:[b];let L=s;S=$.map(R=>{var k;const T=L.find(V=>Rr(V[i],R)),E=T==null?void 0:T[a];return L=Array.isArray(E)?E:[],(k=T==null?void 0:T[o])!=null?k:R})}return(u?S:S.slice(-1)).join(c)}return({cellValue:b})=>b==null||b===""?"":r.multiple===!0?(Array.isArray(b)?b:[b]).map(d).join("、"):d(b)}const Gn={year:zn,years:zn,yearrange:zn,quarter:Un,quarters:Un,quarterrange:Un,month:qn,months:qn,monthrange:qn,week:Eh,datetime:ya,datetimerange:ya};function Oh(e){var n,i;const t=(i=(n=e.props)==null?void 0:n.type)!=null?i:"date",r=o=>{var s,c,u,d;if(o==null||o==="")return"";const a=xa(o,(s=e.props)==null?void 0:s.valueFormat);return(c=e.props)!=null&&c.format?_e(a,e.props.format):(d=(u=Gn[t])==null?void 0:u.call(Gn,{cellValue:a}))!=null?d:_e(a)};return({cellValue:o})=>{var s,c;if(!Array.isArray(o))return r(o);if(o.every(u=>u==null||u===""))return"";const a=t.endsWith("range")?(c=(s=e.props)==null?void 0:s.rangeSeparator)!=null?c:" - ":"、";return o.map(r).join(a)}}function Rh(e){const t=r=>{var i,o,a,s;if(r==null||r==="")return"";const n=xa(r,(o=(i=e.props)==null?void 0:i.valueFormat)!=null?o:"HH:mm");return _e(n,(s=(a=e.props)==null?void 0:a.format)!=null?s:"HH:mm")};return({cellValue:r})=>{var n,i;return Array.isArray(r)?r.every(o=>o==null||o==="")?"":r.map(t).join((i=(n=e.props)==null?void 0:n.rangeSeparator)!=null?i:" - "):t(r)}}function Mh(e){return({cellValue:t})=>Th(e.options,t)}function $a(e="small"){return e==="large"?"medium":e==="default"?"small":"mini"}const fe={DETAIL:"detail",DEL:"del",ADD:"add",EDIT:"edit",SAVE:"save",CREATE:"create",READ:"read",UPDATE:"update",EXPORT:"export",OPERATE:"OPERATE"};function Ta(e){let t=0;for(const r of e)r.group&&(t=Math.max(t,fd(r.group).length));return t+1}const Ea=()=>{const{t:e}=Ke();return{info(t){D.ElMessage.info(t)},error(t){D.ElMessage.error(t)},success(t){D.ElMessage.success(t)},warning(t){D.ElMessage.warning(t)},alert(t){D.ElMessageBox.alert(t,e("common.confirmTitle"))},alertError(t){D.ElMessageBox.alert(t,e("common.confirmTitle"),{type:"error"})},alertSuccess(t){D.ElMessageBox.alert(t,e("common.confirmTitle"),{type:"success"})},alertWarning(t){D.ElMessageBox.alert(t,e("common.confirmTitle"),{type:"warning"})},notify(t){D.ElNotification.info(t)},notifyError(t){D.ElNotification.error(t)},notifySuccess(t){D.ElNotification.success(t)},notifyWarning(t){D.ElNotification.warning(t)},confirm(t,r){return D.ElMessageBox.confirm(t,r||e("common.confirmTitle"),{confirmButtonText:e("common.ok"),cancelButtonText:e("common.cancel"),type:"warning"})},delConfirm(t,r){return D.ElMessageBox.confirm(t||e("common.delMessage"),r||e("common.confirmTitle"),{confirmButtonText:e("common.ok"),cancelButtonText:e("common.cancel"),type:"warning"})},exportConfirm(t,r){return D.ElMessageBox.confirm(t||e("common.exportMessage"),r||e("common.confirmTitle"),{confirmButtonText:e("common.ok"),cancelButtonText:e("common.cancel"),type:"warning"})},prompt(t,r){return D.ElMessageBox.prompt(t,r,{confirmButtonText:e("common.ok"),cancelButtonText:e("common.cancel"),type:"warning"})}}},jr=l.defineComponent({name:"AbTableOperate",__name:"ab-table-operate",props:l.mergeModels({rule:{},modelValue:{},idField:{},idFieldTable:{},permiPrefix:{},api:{},link:{type:Boolean},plain:{type:Boolean},deleteHandler:{},readonly:{type:Boolean}},{api:{},apiModifiers:{}}),emits:l.mergeModels(["refresh","operated"],["update:api"]),setup(e,{expose:t,emit:r}){const n=r,i=e,{t:o}=Ke(),a=Ea(),s=l.inject("abTableDetailRef",void 0),c=l.inject("abTableRef",void 0),{wsCache:u}=Ce(),d=l.computed(()=>u.getCurrentSize||"default"),f=l.useModel(e,"api"),h=l.computed(()=>{var L;if(!i.rule||Array.isArray(i.rule)&&!((L=i.rule)!=null&&L.length))return;const $=Array.isArray(i.rule)?{type:"ElRow",children:[...dt(i.rule)],native:!0}:ne(M({},dt(i.rule)),{native:!0});return delete $.field,zo($==null?void 0:$.children,R=>{Se(R,"props.plain",i.plain),Se(R,"props.link",i.link),Se(R,"props.size",d.value),R.field===fe.CREATE?(Se(R,"children",[{type:"icon",props:{icon:"ep:plus"}},o(`action.${fe.CREATE}`)]),Se(R,"props",{type:"primary",plain:i.plain,link:i.link}),Je(R,"on.click")||Se(R,"on.click",m),i.permiPrefix&&!Je(R,"computed.hidden")&&Se(R,"computed.hidden",p)):R.field===fe.DETAIL?(Se(R,"children",[{type:"icon",props:{icon:"ep:view"}},o(`action.${fe.DETAIL}`)]),Se(R,"props",{type:"primary",plain:i.plain,link:i.link}),Je(R,"on.click")||Se(R,"on.click",g)):R.field===fe.DEL?(Se(R,"children",[{type:"icon",props:{icon:"ep:delete"}},o(`action.${fe.DEL}`)]),Se(R,"props",{type:"danger",plain:i.plain,link:i.link}),Je(R,"on.click")||Se(R,"on.click",b),i.permiPrefix&&!Je(R,"computed.hidden")&&Se(R,"computed.hidden",y)):R.field===fe.EXPORT&&(Se(R,"children",[{type:"icon",props:{icon:"ep:download"}},o(`action.${fe.EXPORT}`)]),Se(R,"props",{type:"warning",plain:i.plain,link:i.link}),i.permiPrefix&&!Je(R,"computed.hidden")&&Se(R,"computed.hidden",S)),Se(R,"native",!0)}),[$]});function p(){return!Hn([`${i.permiPrefix}:create`],["admin"])}function m(){var $,L;typeof(($=s==null?void 0:s.value)==null?void 0:$.toggle)=="function"&&((L=s==null?void 0:s.value)==null||L.toggle(!0,i.modelValue,!1))}function g(){var $,L;typeof(($=s==null?void 0:s.value)==null?void 0:$.toggle)=="function"&&((L=s==null?void 0:s.value)==null||L.toggle(!0,i.modelValue,i.readonly))}function y(){return!Hn([`${i.permiPrefix}:delete`],["admin"])}function b(){return ye(this,null,function*(){var L,R;(yield a.delConfirm().catch(T=>T))==="confirm"&&(typeof i.deleteHandler=="function"&&i.idField&&(yield i.deleteHandler((L=i.modelValue)==null?void 0:L[i.idField])),yield l.nextTick(),(R=c==null?void 0:c.value)==null||R.remove(i.modelValue),n("refresh"))})}function S(){return!Hn([`${i.permiPrefix}:export`],["admin"])}return t({}),($,L)=>{const R=l.resolveComponent("ab-form");return l.openBlock(),l.createBlock(R,{rule:h.value,"model-value":e.modelValue,api:f.value,"onUpdate:api":L[0]||(L[0]=T=>f.value=T)},null,8,["rule","model-value","api"])}}}),Dh={class:"ab-table-detail__title"},ka=l.defineComponent({name:"AbTableDetail",__name:"ab-table-detail",props:l.mergeModels({title:{},id:{},idField:{},idFieldTable:{},modelValue:{},visible:{type:Boolean},rule:{},validRules:{},permiPrefix:{},getHandler:{},createHandler:{},updateHandler:{},deleteHandler:{},vertical:{type:Boolean},detailLevel:{default:1},editable:{type:Boolean,default:!0},readonly:{type:Boolean,default:!0}},{modelValue:{},modelModifiers:{}}),emits:l.mergeModels(["open"],["update:modelValue"]),setup(e,{expose:t,emit:r}){const n=r,i=e,{t:o}=Ke(),a=ut.useRoute(),s=l.ref(),c=l.ref({}),u=l.ref({}),d=l.useModel(e,"modelValue");l.ref(i.vertical);const f=l.ref(i.visible),h=l.ref(i.readonly);l.watch(()=>i.readonly,x=>h.value=x,{immediate:!0});const p=l.computed(()=>i.detailLevel&&i.detailLevel<5?`${76-i.detailLevel*8}%`:"32%");i.id;const m=l.computed(()=>{var x,_;return!((x=d.value)!=null&&x[i.idField])||((_=d.value)==null?void 0:_[i.idField])==="new"}),g=l.computed(()=>m.value?`${o("action.create")} - ${i.title||(a==null?void 0:a.meta.title)||""}`:h.value?`${o("action.detail")} - ${i.title||(a==null?void 0:a.meta.title)||""}`:`${o("action.edit")} - ${i.title||(a==null?void 0:a.meta.title)||""}`),y=l.computed(()=>{var x;return((x=i.rule)!=null?x:[]).map(_=>typeof _.getRule=="function"?_.getRule():_)}),b=()=>{var x;h.value=!1,(x=c.value)==null||x.refresh()},S=()=>ye(this,null,function*(){E.value=!0;let x;m.value&&typeof i.createHandler=="function"?(x=yield i.createHandler(d.value),x&&(d.value[i.idField]=x),yield l.nextTick()):!m.value&&typeof i.updateHandler=="function"&&(x=yield i.updateHandler(d.value)),console.warn("saveHandler: ",JSON.stringify(d.value,null,2)),E.value=!1}),$=()=>{var x;h.value=!0,(x=c.value)==null||x.refresh()},L=()=>V(),R=l.computed(()=>{const x=dt(y.value.find(_=>_.type!==fe.OPERATE&&_.field===fe.OPERATE));if(x)return x.children=vt(x==null?void 0:x.children,_=>_.field!==fe.DETAIL),x!=null&&x.children&&Array.isArray(x==null?void 0:x.children)&&x.children.push({type:"ElButton",children:[{type:"icon",props:{icon:"ep:edit-pen"}},o("action.edit")],props:{type:"primary"},computed:{hidden:!h.value},on:{click:b}},{type:"ElButton",children:[{type:"icon",props:{icon:"ep:check"}},o("action.save")],props:{type:"success",plain:!0},computed:{hidden:h.value},on:{click:S}},{type:"ElButton",children:[{type:"icon",props:{icon:"ep:refresh-right"}},o("action.cancel")],computed:{hidden:h.value},on:{click:$}},{type:"ElButton",children:[{type:"icon",props:{icon:"ep:back"}},o("action.return")],on:{click:L}}),x}),T=l.computed(()=>l.reactive(y.value.filter(x=>x.type!==fe.OPERATE&&x.field!==fe.OPERATE).map(x=>dt(x)))),E=l.ref(!1),k=(x=void 0,_=!1)=>ye(this,null,function*(){var F,A;if(h.value=_,f.value=!0,E.value=!0,typeof i.getHandler=="function"&&(x!=null&&x[i.idField])){const C=yield i.getHandler(x==null?void 0:x[i.idField]);d.value=C||{}}else{const C=dt(x)||{};(F=i.rule)==null||F.forEach(B=>{const I=typeof B.getRule=="function"?B.getRule():B;I.field&&I.field!==fe.OPERATE&&typeof(C==null?void 0:C[I.field])=="undefined"&&typeof I.edit=="undefined"&&typeof I.itemRender=="undefined"&&(C[I.field]="")}),d.value=C}yield l.nextTick(),(A=c.value)==null||A.refresh(),n("open",d.value),E.value=!1}),V=()=>{h.value=!0,f.value=!1,d.value={}};return t({open:k,close:V,toggle:(x=!1,_=void 0,F=!1)=>x?k(_,F):V(),reload:()=>ye(this,null,function*(){if(typeof i.getHandler!="function"||!d.value[i.idField]){console.error("abTableDetail.reload: no getHandler or no idField!");return}const x=yield i.getHandler(d.value[i.idField]);k(x,h.value)})}),(x,_)=>{const F=l.resolveComponent("ab-form"),A=l.resolveComponent("el-drawer"),C=l.resolveDirective("loading");return l.openBlock(),l.createBlock(A,{modelValue:f.value,"onUpdate:modelValue":_[3]||(_[3]=B=>f.value=B),"show-close":!1,"append-to-body":"","close-on-click-modal":"","close-on-press-escape":"","destroy-on-close":"",size:p.value,class:"ab-table-detail","header-class":"ab-table-detail__header"},{header:l.withCtx(()=>[l.createElementVNode("div",Dh,l.toDisplayString(g.value),1),l.withDirectives(l.createVNode(jr,{class:"ab-table-detail__opr","permi-prefix":e.permiPrefix,rule:R.value,"model-value":d.value,api:u.value,"onUpdate:api":_[0]||(_[0]=B=>u.value=B),plain:"",readonly:h.value},null,8,["permi-prefix","rule","model-value","api","readonly"]),[[C,E.value]])]),default:l.withCtx(()=>[l.withDirectives(l.createVNode(F,{ref_key:"formRef",ref:s,rule:T.value,modelValue:d.value,"onUpdate:modelValue":_[1]||(_[1]=B=>d.value=B),api:c.value,"onUpdate:api":_[2]||(_[2]=B=>c.value=B),"id-field":e.idField,"id-field-table":e.idFieldTable,readonly:h.value},null,8,["rule","modelValue","api","id-field","id-field-table","readonly"]),[[C,E.value]])]),_:1},8,["modelValue","size"])}}});function _a(e){return typeof e=="object"&&e!==null&&"name"in e&&typeof e.name=="string"}function Ph(e){return typeof e=="string"||typeof e=="function"||_a(e)}function Wn(e){return e==null||typeof e=="string"||typeof e=="number"?e:String(e)}function Fa(e){if(e!=null)return typeof e=="string"||typeof e=="number"?e:String(e)}function Ih(e,t,r){if(t==null||t==="")return;if(typeof e=="function")return e(r);if(typeof e=="string")return{name:e,query:{id:Wn(t)}};if(!_a(e))return;const n={name:e.name},i=e.query;typeof i=="string"?n.query={[i]:Wn(t)}:i&&(n.query={},Object.keys(i).forEach(a=>{const s=i[a];n.query[a]=Wn(r[s])}));const o=e.params;if(typeof o=="string"){const a=Fa(t);a!==void 0&&(n.params={[o]:a})}else o&&(n.params={},Object.keys(o).forEach(a=>{const s=o[a],c=Fa(r[s]);c!==void 0&&(n.params[a]=c)}));return n}const Bh={class:"ab-router-link"},Aa=l.defineComponent({name:"AbRouterLink",__name:"ab-router-link",props:{link:{},value:{},row:{}},setup(e){const t=e,r=l.computed(()=>Ih(t.link,t.value,t.row));return(n,i)=>{const o=l.resolveComponent("ab-icon");return l.openBlock(),l.createElementBlock("div",Bh,[l.createVNode(o,{icon:"ep:link",size:16}),r.value?(l.openBlock(),l.createBlock(l.unref(ut.RouterLink),{key:0,to:r.value,class:"ab-router-link"},{default:l.withCtx(()=>[l.renderSlot(n.$slots,"default")]),_:3},8,["to"])):l.renderSlot(n.$slots,"default",{},void 0,void 0,1)])}}}),jh=l.defineComponent({name:"AbTableColumn",__name:"ab-table-column",props:{rule:{},idField:{},idFieldTable:{},permiPrefix:{},sortable:{type:Boolean},deleteHandler:{},readonly:{type:Boolean}},emits:["refresh","operated"],setup(e,{emit:t}){const r=t,n=e;l.inject("abTableRef",null);const i=l.computed(()=>{var u;return!((u=n.rule)!=null&&u.hidden)}),o=l.computed(()=>n.sortable!==!1&&n.rule.sortable!==!1&&n.rule.sortFieldTable!==!1&&(n.rule.sortable===!0||n.rule.sortFieldTable!==void 0||!!n.idFieldTable)),a=l.computed(()=>{var u,d,f,h,p;return ne(M({},n.rule.params),{sortField:(d=n.rule.sortField)!=null?d:(u=n.rule.params)==null?void 0:u.sortField,sortFieldTable:typeof n.rule.sortFieldTable=="string"?n.rule.sortFieldTable:(p=(h=(f=n.rule.params)==null?void 0:f.sortFieldTable)!=null?h:n.idFieldTable)!=null?p:""})}),s=l.computed(()=>Yn(n.rule).formatter);function c({cellValue:u,row:d,column:f}={}){var h,p,m,g,y;typeof((p=(h=n.rule)==null?void 0:h.on)==null?void 0:p.change)=="function"&&((y=(g=(m=n.rule)==null?void 0:m.on)==null?void 0:g.change)==null||y.call(g,{cellValue:u,row:d,column:f}))}return l.inject("abTableDetailRef",void 0),(u,d)=>{var m,g,y,b,S;const f=l.resolveComponent("el-switch"),h=l.resolveComponent("ab-icon"),p=l.resolveComponent("vxe-column");return e.rule.field?(l.openBlock(),l.createBlock(p,{key:1,title:e.rule.title,field:e.rule.field,sortable:o.value,params:a.value,width:((m=e.rule)==null?void 0:m.width)||"auto","min-width":(g=e.rule)==null?void 0:g.minWidth,align:(y=e.rule)==null?void 0:y.align,fixed:(b=e.rule)==null?void 0:b.fixed,visible:i.value,"class-name":(S=e.rule)!=null&&S.cellArrow?"items-center":""},{default:l.withCtx($=>{var L,R;return[e.rule.type==="ElRow"&&e.rule.field===l.unref(fe).OPERATE?(l.openBlock(),l.createBlock(jr,{key:0,"id-field":e.idField,"permi-prefix":e.permiPrefix,rule:e.rule,"model-value":$.row,"delete-handler":e.deleteHandler,readonly:e.readonly,link:"",onRefresh:d[0]||(d[0]=T=>r("refresh"))},null,8,["id-field","permi-prefix","rule","model-value","delete-handler","readonly"])):e.rule.field?(l.openBlock(),l.createElementBlock(l.Fragment,{key:1},[(L=e.rule)!=null&&L.cellRender?(l.openBlock(),l.createElementBlock(l.Fragment,{key:0},[e.rule.type==="switch"?(l.openBlock(),l.createBlock(f,l.mergeProps({key:0},e.rule.props,{modelValue:$.row[e.rule.field],"onUpdate:modelValue":T=>$.row[e.rule.field]=T,onChange:T=>c({cellValue:$.row[e.rule.field],column:$.column,row:$.row})}),null,16,["modelValue","onUpdate:modelValue","onChange"])):(l.openBlock(),l.createElementBlock(l.Fragment,{key:1},[l.createTextVNode(l.toDisplayString(e.rule.type),1)],64))],64)):e.rule.link?(l.openBlock(),l.createBlock(Aa,{key:1,link:e.rule.link,value:$.row[e.rule.field],row:$.row},{default:l.withCtx(()=>[s.value?(l.openBlock(),l.createElementBlock(l.Fragment,{key:0},[l.createTextVNode(l.toDisplayString(s.value({cellValue:$.row[e.rule.field],column:$.column,row:$.row})),1)],64)):(l.openBlock(),l.createElementBlock(l.Fragment,{key:1},[l.createTextVNode(l.toDisplayString($.row[e.rule.field]),1)],64))]),_:2},1032,["link","value","row"])):s.value?(l.openBlock(),l.createElementBlock(l.Fragment,{key:2},[l.createTextVNode(l.toDisplayString(s.value({cellValue:$.row[e.rule.field],column:$.column,row:$.row})),1)],64)):(l.openBlock(),l.createElementBlock(l.Fragment,{key:3},[l.createTextVNode(l.toDisplayString($.row[e.rule.field]),1)],64))],64)):l.createCommentVNode("",!0),(R=e.rule)!=null&&R.cellArrow?(l.openBlock(),l.createBlock(h,{key:2,icon:$.row[e.rule.field]<0?"streamline:graph-arrow-decrease":"streamline:graph-arrow-increase",class:l.normalizeClass($.row[e.rule.field]<0?"danger":"success")},null,8,["icon","class"])):l.createCommentVNode("",!0)]}),_:1},8,["title","field","sortable","params","width","min-width","align","fixed","visible","class-name"])):(l.openBlock(),l.createElementBlock(l.Fragment,{key:0},[],64))}}}),Nh=l.defineComponent({name:"AbTableColumns",__name:"ab-table-columns",props:{rule:{},idx:{},idField:{},idFieldTable:{},permiPrefix:{},sortable:{type:Boolean},deleteHandler:{},readonly:{type:Boolean}},emits:["refresh"],setup(e,{emit:t}){const r=t,n=e,i=l.computed(()=>{const{field:o,children:a}=n.rule;return!!(a!=null&&a.length)&&(o?o!==fe.OPERATE:!n.rule.type&&!!n.rule.title)});return(o,a)=>{var u,d,f;const s=l.resolveComponent("ab-table-columns",!0),c=l.resolveComponent("vxe-colgroup");return i.value?(l.openBlock(),l.createBlock(c,{key:0,field:e.rule.field,title:(u=e.rule)==null?void 0:u.title,"header-align":((d=e.rule)==null?void 0:d.groupAlign)||((f=e.rule)==null?void 0:f.align)||"center"},{default:l.withCtx(()=>{var h;return[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList((h=e.rule)==null?void 0:h.children,(p,m)=>(l.openBlock(),l.createBlock(s,l.mergeProps({key:p.field||`${e.idx}_${m}`,ref_for:!0},ne(M({},n),{rule:p,idx:m}),{"id-field":e.idField,onRefresh:a[0]||(a[0]=g=>r("refresh"))}),null,16,["id-field"]))),128))]}),_:1},8,["field","title","header-align"])):(l.openBlock(),l.createBlock(jh,{key:1,rule:e.rule,"id-field":e.idField,"id-field-table":e.idFieldTable,"permi-prefix":e.permiPrefix,sortable:e.sortable,"delete-handler":e.deleteHandler,readonly:e.readonly,onRefresh:a[1]||(a[1]=h=>r("refresh"))},null,8,["rule","id-field","id-field-table","permi-prefix","sortable","delete-handler","readonly"]))}}});function Nr(e,t){if(!e||e===t)return;let r=e.props.abFormInject;if(r)return r;if(e.parent)return Nr(e.parent,t)}function Oa(){let e=l.getCurrentInstance();if(!e)throw Error("AbForm lifecycle hook requires an active Vue component.");return e}function Vh(){return typeof document<"u"&&typeof document.createElement=="function"&&document.head!=null}function Lh(e,t,r){return l.defineComponent({name:"AbForm"+(e.isMobile?"Mobile":""),components:t,directives:r,props:{rule:{type:Array,required:!0,default:()=>[]},option:{type:Object,default:()=>({})},extendOption:Boolean,driver:[String,Object],modelValue:Object,idField:String,idFieldTable:String,disabled:{type:Boolean,default:void 0},readonly:{type:Boolean,default:void 0},preview:{type:Boolean,default:void 0},index:[String,Number],api:Object,locale:[String,Object],t:Function,name:String,subForm:{type:Boolean,default:!0},inFor:Boolean},emits:["update:api","update:modelValue","mounted","beforeUnmount","submit","reset","change","emit-event","control","remove-rule","remove-field","sync","reload","repeat-field","update","validate-field-fail","validate-fail","created"],render(){return this.fc.render()},setup(n){let i=Oa();l.provide("parentFC",i);let o=l.inject("parentFC",null),a=o!=null?o:i;if(o)for(;a.setupState.parent;)a=a.setupState.parent;let{rule:s,modelValue:c,subForm:u,inFor:d}=l.toRefs(n),f=l.reactive({ctxInject:{},destroyed:!1,isShow:!0,unique:1,renderRule:[...s.value||[]]}),h=JSON.stringify(c.value||{}),p=new e(i),m=p.api(),g=d.value,y=()=>{if(o){let E=Nr(i,o);if(E){let k;if(g){let V=E.getSubForm();k=Array.isArray(V)?[...V]:V?[V]:[],k.push(m)}else k=m;E.subForm(k)}}},b=()=>{let E=Nr(i,o);if(E)if(g){let k=$t(E.getSubForm()),V=k.indexOf(m);V>-1&&k.splice(V,1)}else E.subForm()},S=null;l.onBeforeMount(()=>{Vh()&&l.watchEffect(()=>{let E="",k=n.option&&n.option.globalClass||{};Object.keys(k).forEach(V=>{let q="",U=k[V].style;U&&Object.keys(U).forEach(x=>{q+=Bt(x)+":"+U[x]+";"}),k[V].content&&(q+=k[V].content+";"),q&&(E+=`.${V}{${q}}`)}),n.option&&n.option.style&&(E+=n.option.style),S||(S=document.createElement("style"),S.type="text/css",document.head.appendChild(S)),S.innerHTML=E||""})});let $=ft(()=>{p.bus.$emit("$loadData.$topForm")},100),L=ft(function(){p.bus.$emit("$loadData.$scopeForm")},100),R=ft(()=>{p.bus.$emit("$loadData.$form")},100),T=(...E)=>{p.bus.$emit("change-$form."+String(E[0]))};return l.onMounted(()=>{o&&(m.top.bus.$on("$loadData.$form",$),m.top.bus.$on("change",T)),m!==m.scope&&m.scope.bus.$on("$loadData.$scopeForm",L),p.mounted()}),l.onBeforeUnmount(()=>{o&&(m.top.bus.$off("$loadData.$form",$),m.top.bus.$off("change",T)),m!==m.scope&&m.scope.bus.$off("$loadData.$scopeForm",L),b(),f.destroyed=!0,p.unmount(),S&&S.parentNode&&S.parentNode.removeChild(S)}),l.onUpdated(()=>{p.updated()}),y(),l.watch(()=>n.option,()=>{p.initOptions(),m.refresh()},{deep:!0,flush:"sync"}),l.watch(()=>[...s.value],E=>{p.$handle.isBreakWatch()||E.length===f.renderRule.length&&E.every(k=>f.renderRule.indexOf(k)>-1)||(p.$handle.updateAppendData(),p.$handle.reloadRule(s.value),i.setupState.renderRule())}),l.watch(()=>[n.disabled,n.preview,n.readonly],()=>{m.refresh()}),l.watch(c,E=>{if(nr(E||{})===h)return;let k=E!=null?E:{};m.config.forceCoverValue?m.coverValue(k):m.setValue(k)},{deep:!0,flush:"post"}),l.watch(()=>n.index,()=>{m.coverValue({}),p.$handle.updateAppendData(),l.nextTick(()=>{l.nextTick(()=>{m.clearValidateState()})})},{flush:"sync"}),ne(M({fc:l.markRaw(p),parent:o&&l.markRaw(o),top:l.markRaw(a),fapi:l.markRaw(m)},l.toRefs(f)),{getGroupInject:()=>Nr(i,o),refresh(){++f.unique},renderRule(){f.renderRule=[...s.value||[]]},updateValue(E){if(f.destroyed)return;let k=nr(E);h!==k&&(h=k,i.emit("update:modelValue",E),l.nextTick(()=>{R(),o?u.value||L():($(),L())}))}})},created(){let n=Oa();n.emit("update:api",n.setupState.fapi),n.setupState.fc.init()}})}var Ra=["type","slot","ignore","emitPrefix","value","name","native","hidden","display","inject","options","emit","link","prefix","suffix","update","sync","optionsTo","key","slotUpdate","computed","preview","component","cache","modelEmit"],Jn=["validate","children","control"],Kn=["effect","deep","renderSlots"];function Ma(){return[...Ra,...ia,...oa,...aa,...Jn,...Kn]}function Qn(e,t){return{value:e,enumerable:!1,configurable:!1,writable:!0}}function Da(e,t){return Pa([e],t||!1)[0]}function Pa(e,t){return Dr([],[...e],t||!1)}var Hh={array:Jn,normal:Kn};function st(e,t){return at(Array.isArray(t)?t:[t],e,Hh),e}function Ia(e){let t=typeof e.getRule=="function"?e.getRule():e;return t.type||(t.type="text"),t}function zh(e,t){return e?(Object.keys(t||{}).forEach(r=>{t!=null&&t[r]&&(e[r]=st(e[r]||{},t[r]))}),e):t}function Ba(e,t){Object.defineProperties(e,Object.keys(t).reduce((r,n)=>(r[n]={get(){return t[n]()}},r),{}))}function Xe(e){return e?e.__fc__||(e.__origin__?e.__origin__.__fc__:null):null}function te(e,t){try{return e()}catch(r){th(r)}return t}function Vr(){let e={},t=r=>r||"default";return{setSlot(r,n){r=t(r),!n||Array.isArray(n)&&n.length||(e[r]||(e[r]=[]),e[r].push(n))},getSlot(r,n){r=t(r);let i=[];return(e[r]||[]).forEach(o=>{if(Array.isArray(o))i.push(...o);else if(j.Function(o)){let a=o(...n||[]);Array.isArray(a)?i.push(...a):i.push(a)}else j.Undef(o)||i.push(o)}),i},getSlots(){let r={};return Object.keys(e).forEach(n=>{r[n]=(...i)=>this.getSlot(n,i)}),r},slotLen(r){return r=t(r),e[r]?e[r].length:0},mergeBag(r){if(!r)return this;let n=r,i=j.Function(n.getSlots)?n.getSlots():r;return Array.isArray(r)||l.isVNode(r)?this.setSlot(void 0,()=>r):Object.keys(i).forEach(o=>{this.setSlot(o,i[o])}),this}}}function ja(e){let t=M({},e.props||{}),r=e.on||{};return Object.keys(r).forEach(n=>{n.indexOf("-")>0&&(n=Me(n));let i=`on${ta(n)}`;Array.isArray(t[i])?t[i]=[...t[i],r[n]]:t[i]?t[i]=[t[i],r[n]]:t[i]=r[n]}),t.key=e.key,t.ref=e.ref,t.class=e.class,t.id=e.id,t.style=e.style,t.slot&&delete t.slot,t}function Lr(e,t){return Object.setPrototypeOf(e,t),e}var Na=(e,t)=>typeof e=="string"?String(t):typeof e=="number"?Number(t):t,Nt={"==":(e,t)=>JSON.stringify(e)===JSON.stringify(Na(e,t)),"!=":(e,t)=>!Nt["=="](e,t),">":(e,t)=>e>t,">=":(e,t)=>e>=t,"<":(e,t)=>e<t,"<=":(e,t)=>e<=t,on(e,t){let r=e;return r&&r.indexOf&&r.indexOf(Na(r[0],t))>-1},notOn(e,t){return!Nt.on(e,t)},in(e,t){let r=t;return r&&r.indexOf&&r.indexOf(e)>-1},notIn(e,t){return!Nt.in(e,t)},between(e,t){let r=t;return e>r[0]&&e<r[1]},notBetween(e,t){let r=t;return e<r[0]||e>r[1]},empty(e){return j.empty(e)},notEmpty(e){return!j.empty(e)},pattern(e,t){return new RegExp(t,"g").test(e)}};function Fe(e,t){return(typeof t=="string"?t.split("."):t||[]).forEach(r=>{e!=null&&(e=e[r])}),e}function Uh(e){let t=/{{\s*(.*?)\s*}}/g,r,n={};for(;(r=t.exec(e))!==null;)r[1]&&(n[r[1]]=!0);return Object.keys(n)}function Va(e){let t=e.split("."),r=[],n="";return t.forEach((i,o)=>{o===0?n=i:n+="."+i,r.push(n)}),r.join(" && ")}function La(e){let t=[],r="",n=0;for(let i=0;i<e.length;i++){let o=e[i];o==="["?(n===0&&r&&(t.push({type:"key",value:r}),r=""),n++,r+=o):o==="]"?(n--,r+=o,n===0&&(t.push({type:"bracket",value:La(r.slice(1,-1))}),r="")):o==="."&&n===0?r&&(r=(t.push({type:"key",value:r}),"")):r+=o}return r&&t.push({type:"key",value:r}),t.map(i=>i.type==="key"?{key:i.value}:{children:i.value})}function Ha(){return{props:{},on:{},options:[],children:[],hidden:!1,display:!0,value:void 0}}var za=class{constructor(e,t,r,n,i){ve(this,"_data");ve(this,"event");this._data=ne(M({},Ha()),{type:e,title:t,field:r,value:n,props:i||{}}),this.event=this.on}getRule(){return this._data}setProp(e,t){return Pe(this._data,e,t),this}modelField(e){return this._data.modelField=e,this}on(e,t){return this.setAttribute("on",e,t,arguments.length>=2)}setAttribute(e,t,r,n=!1){let i=n?{[t]:r}:t;return st(this._data,{[e]:i}),this}_clone(){let e=new this.constructor;return e._data=Da(this._data),e}};function Ua(e){e.forEach(t=>{Object.defineProperty(za.prototype,t,{configurable:!0,enumerable:!0,writable:!0,value:function(r,n){return this.setAttribute(t,r,n,arguments.length>=2)}})})}Ua(Ma());function $e(e,t){return(r,n,i,o={})=>{let a=new za(e,r,n,i,o);return typeof t=="function"?t(a):t&&a.setAttribute("props",t),a}}var qh=$e("");function Yh(e,t,r){let n=qh("",t);return n._data.type=e,n._data.title=r,n}function Gh(){return{create:Yh,factory:$e}}function Wh(e,t){return Object.assign(Error(`fail to ${e} ${t.status}'`),{status:t.status,url:e})}function qa(e){let t=e.responseText||e.response;if(!t)return t;try{return JSON.parse(t)}catch(r){return t}}function Ya(e){if(typeof XMLHttpRequest>"u")return;let t=new XMLHttpRequest,r=e.action||"";t.upload&&e.onProgress&&t.upload.addEventListener("progress",a=>{var c;let s=a;s.percent=s.total>0?s.loaded/s.total*100:0,(c=e.onProgress)==null||c.call(e,s)});let n=e.query;if(n){let a=typeof n=="string"?n:Object.keys(n).reduce((c,u)=>{let d=n[u];return c[u]=d==null?"":String(d),c},{}),s=new URLSearchParams(a).toString();s&&(r+=r.includes("?")?`&${s}`:`?${s}`)}t.onerror=a=>{var s;(s=e.onError)==null||s.call(e,a)},t.onload=()=>{var a;t.status<200||t.status>=300?(a=e.onError)==null||a.call(e,Wh(r,t),qa(t)):e.onSuccess(qa(t))},t.open(e.method||"get",r,!0);let i=null;if(e.data||e.file)if(e.file||(e.dataType||"").toLowerCase()!=="json"){let a=new FormData;Object.keys(e.data||{}).forEach(s=>{var u;let c=(u=e.data)==null?void 0:u[s];a.append(s,typeof Blob<"u"&&c instanceof Blob?c:String(c))}),i=a}else i=JSON.stringify(e.data||{}),t.setRequestHeader("content-type","application/json");e.file&&i instanceof FormData&&i.append(String(e.filename),e.file,e.file.name),e.withCredentials&&"withCredentials"in t&&(t.withCredentials=!0);let o=e.headers||{};Object.keys(o).forEach(a=>{o[a]!=null&&t.setRequestHeader(a,o[a])}),t.send(i)}function Ga(e,t,r){return new Promise((n,i)=>{(t||Ya)(ne(M({},e),{onSuccess(o){let a=c=>c,s=Qe(e.parse);typeof s=="function"?a=(c,u,d)=>s(c,u,d):typeof s=="string"&&(a=c=>Fe(c,s)),Nn(a(o,e.targetRule,r)).then(n)},onError(o){i(o)}}))})}function lr(e){return Ct(e)}function Jh(e){function t(o){return j.Undef(o)?o=e.fields():Array.isArray(o)||(o=[o]),o}function r(o,a,s){j.Undef(o)?o=Object.keys(M(M({},e.fieldCtx),e.nameCtx)):Array.isArray(o)||(o=[o]),o.forEach(c=>{let u=e.fieldCtx[c]||e.nameCtx[c];u&&u.forEach(d=>{Pe(d.rule,a,s),e.$render.clearCache(d)})})}function n(){let o=e.subForm;return Object.keys(o).reduce((a,s)=>{let c=o[s];return c&&(Array.isArray(c)?a.push(...c):a.push(c)),a},[])}let i={get isScope(){return e.vm.props.subForm===!1},get isPreview(){return e.preview},get config(){return e.options},set config(o){e.fc.options.value=o},get options(){return e.options},set options(o){e.fc.options.value=o},get form(){return e.form},get rule(){return e.rules},get parent(){return e.vm.setupState.parent&&e.vm.setupState.parent.setupState.fapi},get top(){return i.parent?i.parent.top:i},get scope(){let o=e.vm;for(;o&&o.setupState.fapi;)if(o.props.subForm)o=o.setupState.parent;else return o.setupState.fapi;return i.top},get children(){return n()},get siblings(){let o=e.vm.setupState.getGroupInject();if(o){let a=o.getSubForm();if(Array.isArray(a))return[...a]}},get index(){let o=i.siblings;if(o){let a=o.indexOf(i);return a>-1?a:void 0}},get formulas(){return M({},e.fc.formulas)},formData(o){if(o==null||typeof o=="boolean"){let a={};return Object.keys(e.form).forEach(s=>{(o===!0||e.ignoreFields.indexOf(s)===-1)&&(a[s]=lr(e.form[s]))}),a}return t(o).reduce((a,s)=>(a[s]=i.getValue(s),a),{})},getValue(o){let a=e.getFieldCtx(o);return a?lr(a.rule.value):e.options.appendValue!==!1&&ue(e.appendData,o)?lr(e.appendData[o]):void 0},coverValue(o){let a=M({},o||{});e.deferSyncValue(()=>{e.appendData={},i.fields().forEach(s=>{let c=e.fieldCtx[s];if(c){let u=ue(o,s);c.forEach(d=>{d.rule.value=u?o[s]:void 0}),delete a[s]}}),ee(e.appendData,a)},!0)},setValue(o){let a=o;arguments.length>=2&&(a={[o]:arguments[1]}),e.deferSyncValue(()=>{Object.keys(a).forEach(s=>{let c=e.fieldCtx[s];if(!c)return e.appendData[s]=a[s];c.forEach(u=>{u.rule.value=a[s]})})},!0)},removeField(o){let a=e.getCtx(o);return e.deferSyncValue(()=>{e.getCtxs(o).forEach(s=>{s.rm()})},!0),a?a.origin:void 0},removeRule(o){let a=o&&Xe(o);if(a)return a.rm(),a.origin},fields:()=>e.fields(),append:(o,a,s)=>{let c=e.sort.length-1,u,d=e.getCtx(a);if(d)if(s){if(u=d.getPending("children",d.rule.children),!Array.isArray(u))return;c=d.rule.children.length-1}else c=d.root.indexOf(d.origin),u=d.root;else u=e.rules;u.splice(c+1,0,o)},prepend:(o,a,s)=>{let c=0,u,d=e.getCtx(a);if(d)if(s){if(u=d.getPending("children",d.rule.children),!Array.isArray(u))return}else c=d.root.indexOf(d.origin),u=d.root;else u=e.rules;u.splice(c,0,o)},hidden(o,a){r(a,"hidden",!!o),e.refresh()},hiddenStatus(o){let a=e.getCtx(o);if(a)return!!a.rule.hidden},display(o,a){r(a,"display",!!o),e.refresh()},displayStatus(o){let a=e.getCtx(o);if(a)return!!a.rule.display},disabled(o,a){t(a).forEach(s=>{e.getCtxs(s).forEach(c=>{Pe(c.rule.props,"disabled",!!o)})}),e.refresh()},all(o){return Object.keys(e.ctxs).map(a=>{let s=e.ctxs[a];return o?s.origin:s.rule})},model(o){return e.fields().reduce((a,s)=>{let c=e.fieldCtx[s][0];return a[s]=o?c.origin:c.rule,a},{})},component(o){return Object.keys(e.nameCtx).reduce((a,s)=>{let c=e.nameCtx[s].map(u=>o?u.origin:u.rule);return a[s]=c.length===1?c[0]:c,a},{})},bind(){return i.form},reload:o=>{e.reloadRule(o)},updateOptions(o){e.fc.updateOptions(o),i.refresh()},onSubmit(o){i.updateOptions({onSubmit:o})},sync:o=>{if(Array.isArray(o)){o.forEach(s=>i.sync(s));return}let a=j.Object(o)?Xe(o):e.getCtxs(o);a&&(a=Array.isArray(a)?a:[a],a.forEach(s=>{if(!s.deleted){let c=e.subForm[s.id];c&&(Array.isArray(c)?c.forEach(u=>{u.refresh()}):c&&c.refresh()),e.$render.clearCache(s)}}),e.refresh())},refresh:()=>{n().forEach(o=>{o.refresh()}),e.$render.clearCacheAll(),e.refresh()},refreshOptions(){e.$manager.updateOptions(e.options),i.refresh()},hideForm:o=>{e.vm.setupState.isShow=!o},changeStatus:()=>e.changeStatus,clearChangeStatus:()=>{e.changeStatus=!1},updateRule(o,a){e.getCtxs(o).forEach(s=>{ee(s.rule,a)})},updateRules(o){Object.keys(o).forEach(a=>{i.updateRule(a,o[a])})},mergeRule:(o,a)=>{e.getCtxs(o).forEach(s=>{st(s.rule,a)})},mergeRules(o){Object.keys(o).forEach(a=>{i.mergeRule(a,o[a])})},getRule:(o,a)=>{let s=e.getCtx(o);if(s)return a?s.origin:s.rule},findType(o,a){let s;return Object.keys(e.ctxs).forEach(c=>{let u=e.ctxs[c];u.rule.type===o&&(s=a?u.origin:u.rule)}),s},findTypes(o,a){let s=[];return Object.keys(e.ctxs).forEach(c=>{let u=e.ctxs[c];u.rule.type===o&&s.push(a?u.origin:u.rule)}),s},getRenderRule:o=>{let a=e.getCtx(o);if(a)return a.prop},getRefRule:o=>{let a=e.getCtxs(o);if(a){let s=a.map(c=>c.rule);return s.length===1?s[0]:s}},setEffect(o,a,s){let c=e.getCtx(o);c&&a&&(a[0]==="$"&&(a=a.substr(1)),ue(c.rule,"$"+a)&&Pe(c.rule,"$"+a,s),ue(c.rule,"effect")||(c.rule.effect={}),Pe(c.rule.effect,a,s))},clearEffectData(o,a){let s=e.getCtx(o);s&&(a&&a[0]==="$"&&(a=a.substr(1)),s.clearEffectData(a),i.sync(o))},updateValidate(o,a,s){s?i.mergeRule(o,{validate:a}):r(o,"validate",a)},updateValidates(o,a){Object.keys(o).forEach(s=>{i.updateValidate(s,o[s],a)})},refreshValidate(){i.refresh()},resetFields(o){t(o).forEach(a=>{e.getCtxs(a).forEach(s=>{e.$render.clearCache(s),s.rule.value=lr(s.defaultValue)})}),l.nextTick(()=>{l.nextTick(()=>{l.nextTick(()=>{i.clearValidateState(o)})})}),o!=null||(j.Function(e.options.onReset)&&te(()=>e.options.onReset(i)),e.vm.emit("reset",i))},method(o,a){let s=i.el(o);if(!s||!s[a])throw Error(na("err",`${a} 方法不存在`));return(...c)=>s[a](...c)},exec(o,a,...s){return te(()=>i.method(o,a)(...s))},toJson(o){return nr(i.rule,o)},trigger(o,a,...s){let c=i.el(o);c&&c.$emit(a,...s)},el(o){let a=e.getCtx(o);if(a)return a.el||e.vm.refs[a.ref]},scrollTo(o,a={block:"center",inline:"nearest",behavior:"smooth"}){let s=i.el(o);if(!s)return;let c=s.$el===void 0?s:s.$el;if(!c)return;let u=c.nodeType===1?c:c.firstElementChild;u&&typeof u.scrollIntoView=="function"&&u.scrollIntoView(a)},focus(o){let a=i.el(o);if(!a)return;let s=d=>!d||typeof d.focus!="function"?!1:(te(()=>d.focus()),!0);if(s(a))return;let c=a.$el===void 0?a:a.$el;if(s(c))return;let u=c&&(c.nodeType===1?c:c.firstElementChild);s(u)||u&&u.querySelector&&s(u.querySelector('input:not([type=hidden]):not([disabled]),textarea:not([disabled]),select:not([disabled]),[tabindex]:not([tabindex="-1"])'))},closeModal:o=>{e.bus.$emit("fc:closeModal:"+o)},getSubForm(o){let a=e.getCtx(o);return a?e.subForm[a.id]:void 0},getChildrenRuleList(o){let a=typeof o=="object",s=a?Xe(o):e.getCtx(o),c=s?s.rule:a?o:i.getRule(o);if(!c)return[];let u=[];return(d=>{d&&d.forEach(f=>{typeof f=="object"&&(f.field&&u.push(f),u.push(...i.getChildrenRuleList(f)))})})(s?s.loadChildrenPending():c.children),u},getParentRule(o){return(typeof o=="object"?Xe(o):e.getCtx(o)).parent.rule},getParentSubRule(o){let a=typeof o=="object"?Xe(o):e.getCtx(o);if(a){let s=a.getParentGroup();if(s)return s.rule}},getChildrenFormData(o,a){return i.getChildrenRuleList(o).reduce((s,c)=>((c.ignore!==!0||a===!0)&&(s[c.field]=lr(c.value)),s),{})},setChildrenFormData(o,a,s){let c=i.getChildrenRuleList(o);e.deferSyncValue(()=>{c.forEach(u=>{ue(a,u.field)?u.value=a[u.field]:s&&(u.value=void 0)})})},getGlobalEvent(o){let a=i.options.globalEvent[o];if(a)return typeof a=="object"&&(a=a.handle),Qe(a)},getGlobalData(o){return new Promise((a,s)=>{let c=i.options.globalData[o];c?c.type==="fetch"?i.fetch(c).then(u=>{a(u)}).catch(s):a(c.data):a(e.fc.loadData[o])})},emitGlobalEvent(o,...a){let s=i.getGlobalEvent(o);if(s){let c=e.getInjectData({},void 0);return c.args=[...a],a.unshift(c),s.apply(null,a)}},setGlobalData(o,a){i.setData("$globalData."+o,a)},setGlobalVar(o,a){i.setData("$var."+o,a)},renderRule(o,a,s){let c=typeof o=="object"?Xe(o):e.getCtx(o);return c?e.$render.createRuleVnode(c,a,s):void 0},renderChildren(o,a,s){let c=typeof o=="object"?Xe(o):e.getCtx(o);return c?e.$render.createChildrenVnodes(c,a,s):void 0},nextTick(o){e.bus.$once("next-tick",o),e.refresh()},nextRefresh(o){e.nextRefresh(),o&&te(o)},deferSyncValue(o,a){e.deferSyncValue(o,a)},emit(o,...a){e.vm.emitsOptions&&!e.vm.emitsOptions[o]&&(e.vm.emitsOptions[o]=null),e.vm.emit(o,...a)},bus:e.bus,getCurrenabFormRule(){var o;return(o=e.vm.setupState.getGroupInject())==null?void 0:o.rule},fetch(o){return new Promise((a,s)=>{let c=M({},o);c=e.loadFetchVar(c);let u=d=>{te(()=>c.onError&&c.onError(d)),s(d)};e.beforeFetch(c).then(()=>Ga(c,e.fc.create.fetch,i).then(d=>{te(()=>c.onSuccess&&c.onSuccess(d)),a(d)}).catch(d=>{u(d)})).catch(d=>{u(d)})})},watchFetch(o,a,s,c){return e.fc.watchLoadData((u,d)=>{let f=M({},o);if(f=e.loadFetchVar(f,u),c&&c(f,d)===!1)return;let h=p=>{te(()=>f.onError&&f.onError(p)),s&&s(p)};e.beforeFetch(f).then(()=>Ga(f,e.fc.create.fetch,i).then(p=>{te(()=>f.onSuccess&&f.onSuccess(p)),a&&a(p,d)}).catch(p=>{h(p)})).catch(p=>{h(p)})},o.wait==null?1e3:o.wait)},getData(o,a){return e.fc.get?e.fc.get(o,a):e.fc.getLoadData(o,a)},watchData(o){return e.fc.watchLoadData((a,s)=>{te(()=>o(a,s))})},setData(o,a,s){return e.fc.setData(o,a,s)},refreshData(o){return e.fc.refreshData(o)},t(o,a){return e.fc.t(o,a)},getLocale(){return e.fc.getLocale()},helper:{tidyFields:t,props:r}};return["on","once","off"].forEach(o=>{i[o]=function(...a){e.bus[`$${o}`](...a)}}),i.changeValue=i.changeField=i.setValue,i}function Kh(e){ee(e.prototype,{initCache(){this.clearCacheAll()},clearCache(t){if(t.rule.cache)return;let r=this.cache[t.id];r?((r.use===!0||r.parent)&&this.$handle.refresh(),r.parent&&this.clearCache(r.parent),this.cache[t.id]=null):t.parent&&this.clearCache(t.parent)},clearCacheAll(){this.cache={}},setCache(t,r,n){this.cache[t.id]={vnode:r,use:!1,parent:n,slot:t.rule.slot}},getCache(t){let r=this.cache[t.id];if(r)return r.use=!0,r.vnode}})}var Vt={init(e){},toFormValue(e,t){return e},toValue(e,t){return e},mounted(e){},render(e,t){return t.$handle.fc.renderDriver&&t.$handle.fc.renderDriver.defaultRender?t.$handle.fc.renderDriver.defaultRender(t,e):t.$render.defaultRender(t,e)},preview(e,t){return t.$handle.fc.renderDriver&&t.$handle.fc.renderDriver.defaultPreview?t.$handle.fc.renderDriver.defaultPreview(t,e):this.render(e,t)},mergeProp(e){}};function Wa(e,t){let{key:r,origin:n,def:i,onLoad:o,onReload:a,onUpdate:s}=t;if(e.pending[r]&&e.pending[r].origin===n)return e.getPending(r,i);delete e.pending[r];let c=n;if(j.Function(n)){let u=n,d=te(()=>u({rule:e.rule,api:e.$api,update:f=>{let h=f||i,p=e.getPending(r,i);e.setPending(r,n,h),s&&s(h,p)},reload:()=>{let f=e.getPending(r,i);delete e.pending[r],a&&a(f),e.$api&&e.$api.sync(e.rule)}}));d&&j.Function(d.then)?(d.then(f=>{let h=f||i;e.setPending(r,n,h),o&&o(h),e.$api&&e.$api.sync(e.rule)}).catch(f=>{console.error(f)}),c=i,e.setPending(r,n,c)):(c=d||i,e.setPending(r,n,c),o&&o(c))}return c}function Ja(e,t,r={}){let n=M({key:"options",origin:t,def:[]},r);return"loadPending"in e?e.loadPending(n):Wa(e,n)}function Qh(e){ee(e.prototype,{initRender(){this.cacheConfig={}},getTypeSlot(t){let r=n=>{if(n){let i;return t.rule.field&&(i=n.slots["field-"+Bt(t.rule.field)]||n.slots["field-"+t.rule.field]),i||(i=n.slots["type-"+Bt(t.type)]||n.slots["type-"+t.type]),i||r(n.setupState.parent)}};return r(this.vm)},render(){if(!this.vm.setupState.isShow)return;this.$manager.beforeRender(),this.applyShowNumber(this.$manager.rule);let t=Vr();return this.sort.forEach(r=>{this.renderSlot(t,this.$handle.ctxs[r])}),this.$manager.render(t)},applyShowNumber(t){let r=this.$handle.options||{};if(!r.showNumber||!t)return;t.class=this.mergeClass(t.class,"is-numbered"),r.showNumber==="chinese"&&(t.class=this.mergeClass(t.class,"is-number-chinese"));let n=r.numberColor,i=(r.form||{}).style;t.style=n?j.String(i)?`${i};--ab-number-color:${n}`:Array.isArray(i)?i.concat({"--ab-number-color":n}):ne(M({},i||{}),{"--ab-number-color":n}):i},renderSlot(t,r,n){if(this.isFragment(r)){r.initProp(),this.mergeGlobal(r),r.initNone();let i=this.renderChildren(r.loadChildrenPending(),r),o=i.default;o&&t.setSlot(r.rule.slot,()=>o()),delete i.default,t.mergeBag(i)}else t.setSlot(r.rule.slot,this.renderCtx(r,n))},mergeGlobal(t){if(!this.$handle.options.global)return;let{trueType:r,originType:n,type:i}=t;this.cacheConfig[r]||(this.cacheConfig[r]=l.computed(()=>{let o=this.$handle.options.global;return st({},[o["*"]||o.default||{},o[n]||o[i]||{}])})),t.prop=st({},[this.cacheConfig[t.trueType].value,t.prop])},setOptions(t){let r=Ja(t,t.prop.options);t.prop.options=r,t.prop.optionsTo&&r&&pt(t.prop,t.prop.optionsTo,r)},deepSet(t){let r=t.prop.deep;r&&Object.keys(r).sort((n,i)=>n.length<i.length?-1:1).forEach(n=>{pt(t.prop,n,r[n])})},parseSide(t,r){return j.Object(t)?st({props:{abFormInject:r.prop.props.abFormInject}},t):t},renderSides(t,r,n){let i=r[n?"rule":"prop"];return[this.renderRule(this.parseSide(i.prefix,r)),t,this.renderRule(this.parseSide(i.suffix,r))]},renderId(t,r){let n=this.$handle[r==="field"?"fieldCtx":"nameCtx"][t];return n?n.map(i=>this.renderCtx(i,i.parent)):void 0},renderCtx(t,r){var n;try{if(t.type==="hidden")return;let i=t.rule;if(this.force||!this.cache[t.id]||((n=this.cache[t.id])==null?void 0:n.slot)!==i.slot){let o;t.initProp(),this.mergeGlobal(t),t.initNone(),this.$manager.tidyRule(t),this.deepSet(t),this.setOptions(t),this.ctxProp(t);let a=t.prop;a.preview=!!(a.preview==null?this.$handle.preview:a.preview),a.props.abFormInject=this.injectProp(t);let s=a.cache!==!1,c=a.preview;if(a.hidden){this.setCache(t,void 0,r);return}o=(...u)=>{var g,y,b,S,$,L;let d={rule:i,prop:a,preview:c,api:this.$handle.api,model:a.model||{},slotValue:u};u.length&&i.slotUpdate&&te(()=>i.slotUpdate(d));let f={},h=t.loadChildrenPending();t.parser.renderChildren?f=t.parser.renderChildren(h,t):t.parser.loadChildren!==!1&&(f=this.renderChildren(h,t)),Object.keys(a.renderSlots||{}).forEach(R=>{f[R]=(...T)=>{if(j.Function(a.renderSlots[R]))return te(()=>a.renderSlots[R](...T));let E=this.parseSide(a.renderSlots[R],t);return this.renderRule(E)}});let p=this.getTypeSlot(t),m;if(p)d.children=f,m=p(d);else{let R=sa(f);if(c)m=t.parser.preview(R,t);else{let T=t.parser,E=T!==Vt,k=E&&Object.prototype.hasOwnProperty.call(T,"render");if(E&&!k&&t.input&&((b=(y=(g=t.$handle)==null?void 0:g.vm)==null?void 0:y.props)==null?void 0:b.readonly)===!0){let V=typeof this.$handle.getParser=="function"?this.$handle.getParser({type:"text",originType:"text",trueType:"text"}):(S=this.fc.parsers)==null?void 0:S.text;m=V&&V!==T?V.render(R,t):T.render(R,t)}else m=T.render(R,t)}}return m=this.renderSides(m,t),($=a.title)!=null&&$.show&&(a.wrap=M({show:!0},a.wrap||{}),a.native||(a.native=!1)),(t.input||!j.Undef(a.native)||((L=a.col)==null?void 0:L.show)===!0)&&a.native!==!0&&(this.fc.targeabFormDriver("updateWrap",t),m=this.$manager.makeWrap(t,m)),t.none&&(m=Array.isArray(m)?m.map(R=>!R||!R.__v_isVNode?R:this.none(R)):this.none(m)),s&&this.setCache(t,()=>this.stable(m),r),m},this.setCache(t,o,r)}return(...o)=>{let a=this.getCache(t);if(a)return a(...o);if(this.cache[t.id])return;let s=this.renderCtx(t,t.parent);if(s)return s()}}catch(i){console.error(i);return}},none(t){if(t)return t.props.class=this.mergeClass(t.props.class,"ab-none"),t},mergeClass(t,r){if(Array.isArray(t))t.push(r);else return t?[t,r]:r;return t},stable(t){return(Array.isArray(t)?t:[t]).forEach(r=>{r&&r.__v_isVNode&&r.children&&typeof r.children=="object"&&(r.children.$stable=!0,this.stable(r.children))}),t},getModelField(t){var r,n,i;return t.prop.modelField||t.parser.modelField||((r=this.fc.modelFields)==null?void 0:r[this.vNode.aliasMap[t.type]])||((n=this.fc.modelFields)==null?void 0:n[t.type])||((i=this.fc.modelFields)==null?void 0:i[t.originType])||"modelValue"},isFragment(t){return t.type==="fragment"||t.type==="template"},injectProp(t){let r=this.vm.setupState;if(!r.ctxInject[t.id]){let i={api:this.$handle.api,form:this.fc.create,subForm:o=>{this.$handle.addSubForm(t,o)},getSubForm:()=>this.$handle.subForm[t.id],slots:()=>this.vm.setupState.top.slots,getWrap:()=>this.vm.refs[t.wrapRef],options:[],children:[],preview:!1,get readonly(){return t.$handle.vm.props.readonly},get idField(){return t.$handle.vm.props.idField},get idFieldTable(){return t.$handle.vm.props.idFieldTable},get formValue(){return t.$handle.vm.props.modelValue},id:t.id,field:t.field,rule:t.rule,input:t.input,t:(...o)=>this.$handle.api.t(...o),updateValue:o=>{this.$handle.onUpdateValue(t,o)}};r.ctxInject[t.id]=i}let n=r.ctxInject[t.id];return ee(n,{preview:t.prop.preview,options:t.prop.options,children:t.loadChildrenPending()}),n},ensureCtxHandlers(t){if(t.handlers)return t.handlers;let r=this,n={vnodeMounted(i){i.el.__rule__=t.rule,r.onMounted(t,i.el)},vnodeBeforeUnmount(){r.$handle.effect(t,"beforeUnmount"),r.$handle.targetHook(t,"beforeUnmount")},fcUpdateValue(i){r.$handle.onUpdateValue(t,i)},fcEl(i){t.exportEl=i,i&&((i.$el||i).__rule__=t.rule)},modelCallback(i){r.tmpInput&&r.tmpInput(t.field,i,t.rule),r.onInput(t,i)},modelEmit(){r.onEmitInput(t)}};return t.handlers=n,n},ctxProp(t){let{ref:r,key:n,rule:i}=t;this.$manager.mergeProp(t),t.parser.mergeProp(t);let o=this.ensureCtxHandlers(t),a=[{ref:r,key:i.key||`${n}fc`,slot:void 0,on:{vnodeMounted:o.vnodeMounted,vnodeBeforeUnmount:o.vnodeBeforeUnmount,"fc.updateValue":o.fcUpdateValue,"fc.el":o.fcEl}}];if(t.input){this.vm.props.disabled===!0&&(t.prop.props.disabled=!0);let s=this.getModelField(t),c={callback:o.modelCallback,modelField:s,value:this.$handle.geabFormData(t)};a.push({on:M({[`update:${s}`]:c.callback},t.prop.modelEmit?{[t.prop.modelEmit]:o.modelEmit}:{}),props:{[s]:c.value}}),t.prop.model=c}return at(a,t.prop),t.prop},onMounted(t,r){t.el=this.vm.refs[t.ref]||r,t.parser.mounted(t),this.$handle.effect(t,"mounted"),this.$handle.targetHook(t,"mounted")},onInput(t,r){t.prop.modelEmit?this.$handle.onBaseInput(t,r):this.$handle.onInput(t,r)},onEmitInput(t){this.$handle.setValue(t,t.parser.toValue(t.modelValue,t),t.modelValue)},renderChildren(t,r){if(!j.trueArray(t))return{};let n=Vr();return t.map(i=>{if(i){if(j.String(i)||j.Number(i))return n.setSlot(null,`${i}`);if(i.__fc__)return this.renderSlot(n,i.__fc__,r);i.type&&l.nextTick(()=>{this.$handle.loadChildren(t,r),this.$handle.refresh()})}}),n.getSlots()},defaultRender(t,r){let n=t.prop;return n.component?typeof n.component=="string"?this.vNode.make(n.component,n,r):this.vNode.makeComponent(n.component,n,r):this.vNode[t.type]?this.vNode[t.type](n,r):this.vNode[t.originType]?this.vNode[t.originType](n,r):this.vNode.make(ca(n.type),n,r)},createChildrenVnodes(t,r,n){this.force=n!==!1,this.tmpInput=r;let i=this.renderChildren(t.rule.children,t);return this.force=!1,this.tmpInput=null,i},createRuleVnode(t,r,n){this.force=n!==!1,this.tmpInput=r;let i=Vr();return this.renderSlot(i,t,t.parent),this.force=!1,this.tmpInput=null,i.getSlots()},renderRule(t,r,n){if(!t)return;if(j.String(t)||j.Number(t))return`${t}`;let i;if(n)i=t.type;else if(i=t.is,t.type){i=Me(t.type);let s=this.vNode.aliasMap[i];s&&(i=Me(s))}if(!i)return;let o=Vr();j.trueArray(t.children)&&t.children.forEach(s=>{s&&o.setSlot(s==null?void 0:s.slot,()=>this.renderRule(s))});let a=M({},t);return delete a.type,delete a.is,this.vNode.make(i,a,o.mergeBag(r).getSlots())}})}var Zh=1;function Zn(e){ee(this,{$handle:e,fc:e.fc,vm:e.vm,$manager:e.$manager,vNode:new e.fc.CreateNode(e),force:!1,tmpInput:null,id:Zh++}),Ba(this,{options(){return e.options},sort(){return e.sort}}),this.initCache(),this.initRender()}Kh(Zn),Qh(Zn);function Xh(e){ee(e.prototype,{parseInjectEvent(t,r){let n=t.inject||this.options.injectEvent;return this.parseEventLst(t,r,n)},parseEventLst(t,r,n,i){return Object.keys(r).forEach(o=>{let a=this.parseEvent(t,r[o],n,i);a&&(r[o]=a)}),r},parseEvent(t,r,n,i){if(j.Function(r)&&(n!==!1&&!j.Undef(n)||r.__inject))return this.inject(t,r,n);if(!i&&Array.isArray(r)&&r[0]&&(j.String(r[0])||j.Function(r[0])))return this.parseEventLst(t,r,n,!0);if(j.String(r)){let o=Qe(r);if(o&&r!==o){let a=o;return a.__inject?this.parseEvent(t,a,n,!0):a}}},parseEmit(t){let r={},n=t.rule,{emitPrefix:i,field:o,name:a,inject:s}=n,c=n.emit||[];return j.trueArray(c)&&c.forEach(u=>{if(!u)return;let d,f=i||o||a;if(j.Object(u)&&(d=u.inject,u=u.name,f=u.prefix||f),f){let h=Bt(`${f}-${u}`),p=(...m)=>{this.vm.emitsOptions&&!this.vm.emitsOptions[h]&&(this.vm.emitsOptions[h]=null),this.vm.emit(h,...m),this.vm.emit("emit-event",h,...m),this.bus.$emit(h,...m)};if(p.__emit=!0,!d&&s===!1)r[Me(u)]=p;else{let m=d||s||this.options.injectEvent;r[Me(u)]=j.Undef(m)?p:this.inject(n,p,m)}}}),t.computed.on=r,r},getInjectData(t,r){let n=t.__fc__&&t.__fc__.$api,{option:i,rule:o}=(t.__fc__&&t.__fc__.$handle.vm||this.vm).props;return{$f:n||this.api,api:n||this.api,rule:o,self:t.__origin__,option:i,inject:r}},inject(t,r,n){if(r.__origin){if(this.watching&&!this.loading)return r;r=r.__origin}let i=this,o=function(...a){let s=i.getInjectData(t,n);return s.args=[...a],a.unshift(s),r.apply(this,a)};return o.__origin=r,o.__json=r.__json,o},loadStrVar(t,r,n){if(t&&typeof t=="string"&&t.indexOf("{{")>-1&&t.indexOf("}}")>-1){let i=t,o=Uh(t),a=u=>{let d=!1,f;if(n&&u.indexOf("$form.")===0){let h=u.split(".");h.shift(),ue(n.value,h[0])&&(d=!0,f=r?r({id:"$form."+h[0]+"_"+n.rule.__fc__.id,getValue:()=>Fe(n.value,h)}):Fe(n.value,h))}return d||(f=r?r(u):this.fc.getLoadData(u)),f},s=u=>{let d=[];u.forEach(h=>{h.key?d.push(h.key):h.children&&d.push(s(h.children))});let f=!1;return d.forEach((h,p)=>{h!=null&&(h.indexOf("'")===0||h.indexOf('"')===0)&&(d[p]=h.slice(1,-1),f=!0)}),d.length===1&&(f||!isNaN(Number(d[0])))?d[0]:a(d.join("."))},c;if(o.forEach(u=>{let d=u.split("||"),f=d[0].trim();if(f){let h=(d[1]||"").trim(),p=La(f),m=te(()=>s(p));(m==null||m==="")&&d.length>1&&(m=h),c=m,t=t.replaceAll(`{{${u}}}`,m!=null?m:"")}}),o.length===1&&i===`{{${o[0]}}}`)return c}return t},loadFetchVar(t,r,n){let i;n&&n.__fc__&&(i=n.__fc__.getParentGroup()),!i&&t.targetRule&&t.targetRule.__fc__&&(i=t.targetRule.__fc__.getParentGroup());let o=a=>this.loadStrVar(a,r,i?{rule:n,value:this.subRuleData[i.id]||{}}:null);return t.action=o(t.action||""),["headers","data","query"].forEach(a=>{if(t[a]){let s=Array.isArray(t[a])?[]:{};Object.keys(t[a]).forEach(c=>{s[o(c)]=o(t[a][c])}),t[a]=s}}),t}})}var Ka=["hook:updated","hook:mounted"];function em(e){ee(e.prototype,{usePage(){let t=this.options.page;if(!t)return;let r=25,n=tm(this.rules);if(j.Object(t)){let i=t;i.first&&(r=parseInt(String(i.first),10)||r),i.limit&&(n=parseInt(String(i.limit),10)||n)}ee(this,{first:r,limit:n,pageEnd:this.rules.length<=r}),this.bus.$on("page-end",()=>this.vm.emit("page-end",this.api)),this.pageLoad()},pageLoad(){let t=()=>{this.pageEnd?(this.bus.$off(Ka,t),this.bus.$emit("page-end")):(this.first+=this.limit,this.pageEnd=this.rules.length<=this.first,this.loadRule(),this.refresh())};this.bus.$on(Ka,t)}})}function tm(e){return e.length<31?31:Math.ceil(e.length/3)}function rm(e){ee(e.prototype,{clearNextTick(){this.nextTick&&clearTimeout(this.nextTick),this.nextTick=null},bindNextTick(t){this.clearNextTick(),this.nextTick=setTimeout(()=>{t(),this.nextTick=null},10)},render(){return++this.loadedId,this.vm.setupState.unique>0?this.$render.render():(this.vm.setupState.unique=1,[])}})}function nm(e){Object.defineProperties(e.origin,{__fc__:Qn(l.markRaw(e))}),e.rule!==e.origin&&Object.defineProperties(e.rule,{__fc__:Qn(l.markRaw(e))})}function Qa(e,t,r){let n=Pr(),i=!!t.field;ee(this,{id:n,ref:n,wrapRef:n+"fi",rule:t,origin:t.__origin__||t,name:t.name,pending:{},none:!1,watch:[],linkOn:[],root:[],ctrlRule:[],children:[],parent:null,group:t.subRule?this:null,cacheConfig:null,prop:M({},t),computed:{},payload:{},refRule:{},handlers:null,input:i,el:void 0,exportEl:void 0,defaultValue:i?Ct(r):void 0,field:t.field||void 0}),this.updateKey(),nm(this),this.update(e,!0)}ee(Qa.prototype,{getParentGroup(){let e=this.parent;for(;e;){if(e.group)return e;e=e.parent}},loadChildrenPending(){let e=this.rule.children||[];return Array.isArray(e)?e:this.loadPending({key:"children",origin:e,def:[],onLoad:t=>{this.$handle&&this.$handle.loadChildren(t,this)},onUpdate:(t,r)=>{this.$handle&&(t===r?this.$handle.loadChildren(t,this):this.$handle.updateChildren(this,t,r))},onReload:t=>{this.$handle?this.$handle.updateChildren(this,[],t):delete this.pending.children}})},loadPending(e){return Wa(this,e)},getPending(e,t){return this.pending[e]&&this.pending[e].value||t},setPending(e,t,r){this.pending[e]={origin:t,value:l.reactive(r)}},effectData(e){return this.payload[e]||(this.payload[e]={}),this.payload[e]},clearEffectData(e){e===void 0?this.payload={}:delete this.payload[e]},updateKey(e){this.key=Pr(),e&&this.parent&&this.parent.updateKey(e)},updateType(){this.originType=this.rule.type,this.type=Me(this.rule.type),this.trueType=this.$handle.getType(this.originType)},setParser(e){this.parser=e,e.init(this)},initProp(){var t,r,n;let e=M({},this.rule);delete e.children,delete e.validate,this.prop=st({},[e,...Object.keys(this.payload).map(i=>this.payload[i]),this.computed]),e.col&&((t=e.col)==null?void 0:t.show)!==!1&&(this.prop.col.show=!0),this.prop.validate=[...((n=(r=this.refRule)==null?void 0:r.__$validate)==null?void 0:n.value)||[],...this.prop.validate||[]]},initNone(){this.none=!(j.Undef(this.prop.display)||this.prop.display)},hasHidden(){return!!this.rule.hidden||(this.parent?this.parent.hasHidden():!1)},injectValidate(){return this.prop.validate},check(e){return this.vm===e.vm},unwatch(){this.watch.forEach(e=>e()),this.watch=[],Object.keys(this.refRule).forEach(e=>{e.indexOf("__$")!==0&&delete this.refRule[e]})},unlink(){this.linkOn.forEach(e=>e()),this.linkOn=[]},link(){this.unlink(),this.$handle.appendLink(this)},watchTo(){this.$handle.watchCtx(this)},delete(){this.unwatch(),this.unlink(),this.rmCtrl(),this.parent&&this.parent.children.splice(this.parent.children.indexOf(this)>>>0,1),ee(this,{deleted:!0,computed:{},parent:null,children:[],cacheConfig:null,none:!1,handlers:null,el:void 0,exportEl:void 0})},rmCtrl(){this.ctrlRule.forEach(e=>e.__fc__&&e.__fc__.rm()),this.ctrlRule=[]},rm(){let e=()=>{let t=this.root.indexOf(this.origin);t>-1&&(this.root.splice(t,1),this.$handle&&this.$handle.refresh())};this.deleted?e():this.$handle.noWatch(()=>{this.$handle.deferSyncValue(()=>{this.rmCtrl(),e(),this.$handle.rmCtx(this),ee(this,{root:[]})},this.input)})},update(e,t){ee(this,{deleted:!1,$handle:e,$render:e.$render,$api:e.api,vm:e.vm,vNode:e.$render.vNode,updated:!1,cacheValue:this.rule.value}),!t&&this.unwatch(),this.watchTo(),this.link(),this.updateType()}});function im(e){ee(e.prototype,{nextRefresh(t){let r=this.loadedId;l.nextTick(()=>{r===this.loadedId&&(t?t():this.refresh())})},parseRule(t){let r=Ia(t);return Object.defineProperties(r,{__origin__:Qn(t)}),om(r),this.appendValue(r),[r,r.prefix,r.suffix].forEach(n=>{n&&this.loadFn(n,r)}),this.loadCtrl(r),r.update&&(r.update=Qe(r.update)),r},loadFn(t,r){["on","props","deep"].forEach(n=>{t[n]&&this.parseInjectEvent(r,t[n])})},loadCtrl(t){t.control&&t.control.forEach(r=>{r.handle&&(r.handle=Qe(r.handle))})},syncProp(t){let r=t.rule,n=r.sync;j.trueArray(n)&&at([{on:n.reduce((i,o)=>(i[typeof o=="object"&&o.event||`update:${o}`]=a=>{r.props[typeof o=="object"&&o.prop||o]=a,this.vm.emit("sync",o,a,r,this.fapi)},i),{})}],t.computed)},loadRule(){this.cycleLoad=!1,this.loading=!0,this.pageEnd&&this.bus.$emit("load-start"),this.deferSyncValue(()=>{if(this._loadRule(this.rules),this.loading=!1,this.cycleLoad&&this.pageEnd)return this.loadRule();this.syncForm(),this.pageEnd&&this.bus.$emit("load-end"),this.vm.setupState.renderRule()})},loadChildren(t,r){if(this.cycleLoad=!1,this.loading=!0,this.bus.$emit("load-start"),this._loadRule(t,r),this.loading=!1,this.cycleLoad)return this.loadRule();this.syncForm(),this.bus.$emit("load-end"),this.$render.clearCache(r)},_loadRule(t,r){let n=a=>{let s=t[a-1];if(!s||!s.__fc__)return a>0?n(a-1):-1;let c=this.sort.indexOf(s.__fc__.id);return c>-1?c:n(a-1)},i=(a,s)=>{j.trueArray(a)&&this._loadRule(a,s)},o=t.map((a,s)=>{if(r&&!j.Object(a)||!this.pageEnd&&!r&&s>=this.first)return;if(a.__fc__&&a.__fc__.root===t&&this.ctxs[a.__fc__.id])return i(a.__fc__.loadChildrenPending(),a.__fc__),a.__fc__;let c=Ia(a),u=()=>!!(c.field&&this.fieldCtx[c.field]&&this.fieldCtx[c.field][0]!==a.__fc__);this.fc.targeabFormDriver("loadRule",{rule:c,api:this.api},this.fc),this.ruleEffect(c,"init",{repeat:u()}),u()&&this.vm.emit("repeat-field",a,this.api);let d=a.__fc__||null,f=!1,h=d!==null,p=c.value;if(h){let y=d;if(p=y.defaultValue,y.deleted){if(Za(y))return;y.update(this)}else if(!y.check(this)){if(Za(y))return;t[s]=a=a._clone?a._clone():la(nr(a)),d=null,f=!0}}if(d)d.originType!==d.rule.type&&d.updateType(),this.bindParser(d),this.appendValue(d.rule),d.parent&&d.parent!==r&&this.rmSubRuleData(d);else{let y=this.parseRule(a);d=new Qa(this,y,p),this.bindParser(d)}this.parseEmit(d),this.syncProp(d),d.parent=r||null,d.root=t,this.setCtx(d),!f&&!h&&(this.effect(d,"load"),this.targetHook(d,"load")),this.effect(d,"created");let m=d.loadChildrenPending();if(d.parser.loadChildren===!1||i(m,d),!r){let y=n(s);y>-1||!s?this.sort.splice(y+1,0,d.id):this.sort.push(d.id)}let g=d.rule;return d.updated||(d.updated=!0,j.Function(g.update)&&this.bus.$once("load-end",()=>{this.refreshUpdate(d,g.value,"init")}),this.effect(d,"loaded")),this.refreshControl(d)&&(this.cycleLoad=!0),d}).filter(a=>!!a);r&&(r.children=o)},refreshControl(t){return t.input&&t.rule.control&&this.useCtrl(t)},useCtrl(t){let r=am(t),n=[],i=this.api;if(!r.length)return!1;for(let s=0;s<r.length;s++){let c=r[s],u=c.handle||function(f){let h=Nt;return(h[c.condition||"=="]||h["=="])(f,c.value)};if(!j.trueArray(c.rule))continue;let d=ne(M({},c),{valid:te(()=>u(t.rule.value,i)),ctrl:lm(t,c.rule),isHidden:j.String(c.rule[0])});d.valid&&d.ctrl||!d.valid&&!d.ctrl&&!d.isHidden||n.push(d)}if(!n.length)return!1;let o=[],a=!1;return this.deferSyncValue(()=>{n.reverse().forEach(({isHidden:s,valid:c,rule:u,prepend:d,append:f,child:h,ctrl:p,method:m})=>{if(s)c?t.ctrlRule.push({__ctrl:!0,children:u,valid:c}):p&&t.ctrlRule.splice(t.ctrlRule.indexOf(p)>>>0,1),o[c?"push":"unshift"](()=>{m==="disabled"||m==="enabled"?this.api.disabled(!c,u):m==="display"||m==="show"?this.api.display(c,u):m==="required"?(u.forEach(g=>{this.api.setEffect(g,"required",c)}),c||this.api.clearValidateState(u)):this.api.hidden(!c,u)});else if(c){a=!0;let g={type:"fragment",native:!0,__ctrl:!0,children:u};t.ctrlRule.push(g),this.bus.$once("load-start",()=>{d?i.prepend(g,d,h):f||h?i.append(g,f||t.id,h):t.root.splice(t.root.indexOf(t.origin)+1,0,g)})}else{t.ctrlRule.splice(t.ctrlRule.indexOf(p),1);let g=Xe(p);g&&g.rm()}})}),o.length&&(this.loading?o.length&&this.bus.$once("load-end",()=>{o.forEach(s=>s())}):o.length&&l.nextTick(()=>{o.forEach(s=>s())})),this.vm.emit("control",t.origin,this.api),this.effect(t,"control"),a},reloadRule(t){return this._reloadRule(t)},_reloadRule(t){t||(t=this.rules);let r=M({},this.ctxs);this.clearNextTick(),this.initData(t),this.fc.rules=t,this.deferSyncValue(()=>{this.bus.$once("load-end",()=>{Object.keys(r).filter(n=>this.ctxs[n]===void 0).forEach(n=>this.rmCtx(r[n])),this.$render.clearCacheAll()}),this.reloading=!0,this.loadRule(),this.reloading=!1,this.refresh(),this.bus.$emit("reloading",this.api)}),this.bus.$off("next-tick",this.nextReload),this.bus.$once("next-tick",this.nextReload),this.bus.$emit("update",this.api)},refresh(){this.vm.setupState.refresh()}})}function om(e){let t=Ha();return Object.keys(t).forEach(r=>{ue(e,r)||(e[r]=t[r])}),e}function am(e){let t=e.rule.control||[];return j.Object(t)?[t]:t}function lm(e,t){for(let r=0;r<e.ctrlRule.length;r++){let n=e.ctrlRule[r];if(n.children===t)return n}}function Za(e){return!!e.rule.__ctrl}function sm(e){ee(e.prototype,{setValue(t,r,n,i){t.deleted||(t.rule.value=r,this.changeStatus=!0,this.seabFormData(t,n),this.$render.clearCache(t),this.nextRefresh(),this.syncValue(),this.valueChange(t,r),this.vm.emit("change",t.field,r,t.origin,this.api,i||!1),this.effect(t,"value"),this.targetHook(t,"value",{value:r}),this.emitEvent("change",t.field,r,{rule:t.origin,api:this.api,setFlag:i||!1}),i&&l.nextTick(()=>{l.nextTick(()=>{l.nextTick(()=>{this.api.clearValidateState(t.id)})})}),this.$manager.fieldChange(t,r,n,i))},onInput(t,r){let n;t.input&&(this.isQuote(t,n=t.parser.toValue(r,t))||this.isChange(t,r))&&this.setValue(t,n,r)},onUpdateValue(t,r){this.deferSyncValue(()=>{let n=t.getParentGroup(),i=n?this.subRuleData[n.id]:null,o={};Object.keys(r||{}).forEach(a=>{i&&ue(i,a)?o[a]=r[a]:ue(this.api.form,a)?this.api.form[a]=r[a]:this.api.top!==this.api&&ue(this.api.top.form,a)&&(this.api.top.form[a]=r[a])}),Object.keys(o).length&&this.api.setChildrenFormData(n.rule,o)})},onBaseInput(t,r){this.seabFormData(t,r),this.$render.clearCache(t),this.nextRefresh()},seabFormData(t,r){t.modelValue=r;let n=t.getParentGroup();n&&(this.subRuleData[n.id]||(this.subRuleData[n.id]={}),this.subRuleData[n.id][t.field]=t.rule.value),Pe(this.formData,t.id,r)},rmSubRuleData(t){let r=t.getParentGroup();r&&this.subRuleData[r.id]&&delete this.subRuleData[r.id][t.field]},geabFormData(t){return this.formData[t.id]},syncForm(){let t=l.reactive({}),r=this.fields(),n=[];this.options.appendValue!==!1&&Object.keys(this.appendData).forEach(i=>{r.indexOf(i)===-1&&(t[i]=l.toRef(this.appendData,i))}),r.forEach(i=>{let o=(this.fieldCtx[i]||[]).filter(a=>!this.isIgnore(a))[0];o||(o=this.fieldCtx[i][0],n.push(i)),t[i]=l.toRef(o.rule,"value")}),this.form=t,this.ignoreFields=n,this.syncValue()},isIgnore(t){return t.rule.ignore===!0||(t.rule.ignore==="hidden"||this.options.ignoreHiddenFields)&&t.hasHidden()},appendValue(t){(t.field&&ue(this.appendData,t.field)||j.Undef(t.value)&&this.options.forceCoverValue)&&(t.value=this.appendData[t.field],delete this.appendData[t.field])},addSubForm(t,r){this.subForm[t.id]=r},deferSyncValue(t,r){this.deferSyncFn||(this.deferSyncFn=t),this.deferSyncFn.sync||(this.deferSyncFn.sync=r),te(t),this.deferSyncFn===t&&(this.deferSyncFn=null,t.sync&&this.syncForm())},syncValue(){if(this.deferSyncFn)return this.deferSyncFn.sync=!0;let t={};Object.keys(this.form).forEach(r=>{this.ignoreFields.indexOf(r)===-1&&(t[r]=this.form[r])}),this.vm.setupState.updateValue(t)},isChange(t,r){let n=this.geabFormData(t);if(n===r)return!1;let i=typeof n;return i===typeof r&&(i==="string"||i==="boolean"||i==="number"&&Number.isFinite(n)&&Number.isFinite(r))?!0:JSON.stringify(n,Xa)!==JSON.stringify(r,Xa)},isQuote(t,r){return(r instanceof Function||j.Object(r)||Array.isArray(r))&&r===t.rule.value},refreshUpdate(t,r,n,i){if(j.Function(t.rule.update)){let o=te(()=>t.rule.update(r,t.origin,this.api,{origin:n||"change",linkField:i}));if(o===void 0)return;t.rule.hidden=o===!0}},valueChange(t,r){this.refreshRule(t,r),this.bus.$emit("change-"+t.field,r)},refreshRule(t,r,n,i){this.refreshControl(t)&&(this.$render.clearCacheAll(),this.loadRule(),this.bus.$emit("update",this.api),this.refresh()),this.refreshUpdate(t,r,n,i)},appendLink(t){let r=t.rule.link;j.trueArray(r)&&r.forEach(n=>{let i=()=>this.refreshRule(t,t.rule.value,"link",n);this.bus.$on("change-"+n,i),t.linkOn.push(()=>this.bus.$off("change-"+n,i))})},fields(){return Object.keys(this.fieldCtx)}})}function Xa(e,t){return typeof t=="function"?""+t:t}var cm=["field","value","vm","template","name","config","control","inject","sync","payload","optionsTo","update","slotUpdate","computed","component","cache"],sr=Symbol("oldValue"),um=["$condition","$variableVal","$val","$form","$scope","$group","$rule"],dm=["$formulas","$form","$scope","$group","$rule","$api"],Hr=new Map,fm=1e3;function el(e,t){let r=e.join(",")+"|"+t,n=Hr.get(r);return n||(Hr.size>=fm&&Hr.clear(),n=Function(...e,t),Hr.set(r,n)),n}function pm(e){ee(e.prototype,{scheduleComputedUpdate(t){(this._computedQueue||(this._computedQueue=[])).push(t),this._computedFlushing||this._computedScheduled||(this._computedScheduled=!0,setTimeout(()=>{this._computedScheduled=!1,this._computedFlushing=!0;try{let r=this._computedQueue||[];this._computedQueue=[];for(let n=0;n<r.length;n++)te(r[n]),this._computedQueue&&this._computedQueue.length&&(r.push(...this._computedQueue),this._computedQueue=[])}finally{this._computedFlushing=!1}}))},getCtx(t){return this.getFieldCtx(t)||this.getNameCtx(t)[0]||this.ctxs[t]},getCtxs(t){return this.fieldCtx[t]||this.nameCtx[t]||(this.ctxs[t]?[this.ctxs[t]]:[])},setIdCtx(t,r,n){let i=`${n}Ctx`;this[i][r]?this[i][r].push(t):this[i][r]=[t]},rmIdCtx(t,r,n){let i=`${n}Ctx`,o=this[i][r];if(!o)return!1;let a=o.splice(o.indexOf(t)>>>0,1).length>0;return o.length||delete this[i][r],a},getFieldCtx(t){return(this.fieldCtx[t]||[])[0]},getNameCtx(t){return this.nameCtx[t]||[]},setCtx(t){let{id:r,field:n,name:i,rule:o}=t;this.ctxs[r]=t,i&&this.setIdCtx(t,i,"name"),t.input&&(this.setIdCtx(t,n,"field"),this.seabFormData(t,t.parser.toFormValue(o.value,t)),this.isMounted&&!this.reloading&&this.vm.emit("change",t.field,o.value,t.origin,this.api,!1,!0))},getParser(t){let r=this.fc.parsers,n=this.fc.renderDriver,i=Me(t.type)||t.type;if(n){let o=n.parsers||{},a=o[t.originType]||o[i]||o[t.trueType];if(a)return a}return r[t.originType]||r[i]||r[t.trueType]||Vt},bindParser(t){t.setParser(this.getParser(t))},getType(t){let r=this.fc.CreateNode.aliasMap,n=r[t]||r[Me(t)||t]||t;return Me(n)},noWatch(t){this.noWatchFn||(this.noWatchFn=t),te(t),this.noWatchFn===t&&(this.noWatchFn=null)},watchCtx(t){let r=Ma().filter(a=>a[0]!=="_"&&a[0]!=="$"&&cm.indexOf(a)===-1),n={},i=(a,s,c)=>(u,d)=>{let f=s.value;if(!this.isBreakWatch())if(c&&t.parser.loadChildren===!1)this.$render.clearCache(t),this.nextRefresh();else{if(this.watching=!0,l.nextTick(()=>{this.targetHook(t,"watch",{key:a,oldValue:d,newValue:f})}),a==="hidden"&&!!f!=!!d&&l.nextTick(()=>{this.targetHook(t,"hidden",{value:f})}),a==="ignore"&&t.input||a==="hidden"&&(t.rule.ignore==="hidden"||this.options.ignoreHiddenFields))this.syncForm();else if(a==="link"){t.link();return}else["props","on","deep"].indexOf(a)>-1?(this.parseInjectEvent(t.rule,f||{}),a==="props"&&t.input&&this.seabFormData(t,t.parser.toFormValue(t.rule.value,t))):a==="emit"?this.parseEmit(t):["prefix","suffix"].indexOf(a)>-1?f&&this.loadFn(f,t.rule):a==="type"?(t.updateType(),this.bindParser(t)):c&&(j.Function(d)&&(d=t.getPending("children",[])),j.Function(f)&&(f=t.loadChildrenPending()),this.updateChildren(t,f,d));this.$render.clearCache(t),this.refresh(),this.watching=!1}},o=(a,s=!1)=>{if(n[a])return;n[a]=!0;let c=t.refRule[a],u=a==="children",d=i(a,c,u);t.watch.push(l.watch(u?()=>j.Function(c.value)?c.value:[...c.value||[]]:()=>c.value,d,{deep:!u,flush:u?"sync":"pre"})),s&&d(c.value,void 0)};if(r.forEach(a=>{t.refRule[a]=l.toRef(t.rule,a),ue(t.rule,a)&&o(a)}),t.watch.push(l.watch(()=>Object.keys(t.rule).join("|"),()=>{r.forEach(a=>{!n[a]&&ue(t.rule,a)&&o(a,!0)})})),t.refRule.__$title=l.computed(()=>{let a=(typeof t.rule.title=="object"?t.rule.title.title:t.rule.title)||"";if(a){let s=a.match(/^\{\{\s*\$t\.(.+)\s*\}\}$/);s&&(a=this.api.t(s[1]))}return a}),t.refRule.__$info=l.computed(()=>{let a=(typeof t.rule.info=="object"?t.rule.info.info:t.rule.info)||"";if(a){let s=a.match(/^\{\{\s*\$t\.(.+)\s*\}\}$/);s&&(a=this.api.t(s[1]))}return a}),t.refRule.__$validate=l.computed(()=>{let a=s=>{var u,d;let c=s.match(/^\{\{\s*\$t\.(.+)\s*\}\}$/);return c?this.api.t(c[1],{title:(d=(u=t.refRule)==null?void 0:u.__$title)==null?void 0:d.value}):s};return $t(t.rule.validate).map(s=>{let c=M({},s);if(c.message&&(c.message=a(c.message)),j.Function(c.validator)){let u=t;c.validator=function(...d){return s.validator.call({that:this,id:u.id,field:u.field,rule:u.rule,api:u.$handle.api},...d)}}if(c.adapter){if(typeof c.error=="object"){let u=M({},c.error);Object.keys(u).forEach(d=>{u[d]=a(u[d])}),c.error=u}return this.adapterValidate(c,t)}return c})}),t.input){let a=l.toRef(t.rule,"value");t.watch.push(l.watch(()=>a.value,()=>{let s=t.parser.toFormValue(a.value,t);this.isChange(t,s)&&this.setValue(t,a.value,s,!0)}))}this.bus.$once("load-end",()=>{let a=t.rule.computed;a&&(typeof a!="object"&&(a={value:a}),Object.keys(a).forEach(s=>{let c=l.computed(()=>{let d=a[s];if(!d)return;let f=this.compute(t,d);return(d.linkage||d.linkageVariable)&&f===sr?sr:f}),u=d=>{s==="value"?this.onInput(t,d):s[0]==="$"?this.api.setEffect(t.id,s,d):pt(t.rule,s,d)};(s==="value"?[void 0,null,""].indexOf(t.rule.value)>-1:c.value!==Fe(t.rule,s))&&u(c.value),t.watch.push(l.watch(c,d=>{d!==sr&&this.scheduleComputedUpdate(()=>u(d))},{deep:!0}))}))}),this.watchEffect(t)},adapterValidate(t,r){return this.$manager.adapterValidate({required:t.required,message:t.message,trigger:t.trigger},(n,i)=>{if((t.beforeValidate&&te(()=>t.beforeValidate({value:n,api:this.api,validate:t,rule:r.rule})))===!1)i();else{let o=this.validator(r,n,t);if(o){let a="";typeof t.error=="object"&&(a=t.error[o]||t.error.default),!a&&typeof t.message=="string"&&(a=t.message),a||(a=this.getValidateMessage(r,{key:o,rule:t[o]})),i(a)}else if(t.validator){let a=t.validator&&te(()=>t.validator(n,i));a&&j.Function(a.then)&&a.then(()=>i()).catch(s=>i(s))}else i()}})},getValidateMessage(t,r){var i,o;let n=Array.isArray(r.rule)?r.rule.join(","):""+r.rule;return this.api.t(r.key==="required"?r.key:"validate."+r.key,{[r.key]:n,title:(o=(i=t.refRule)==null?void 0:i.__$title)==null?void 0:o.value})},validator(t,r,n){if(j.empty(r))return n.required?"required":void 0;for(let[i,o]of Object.entries(n))switch(i){case"len":case"maxLen":case"minLen":let a=c=>i==="len"?c===o:i==="maxLen"?c<=o:c>=o;if(Array.isArray(r)){if(!a(r.length))return i}else{if(typeof r=="object")return i;if(!a((""+r).length))return i}break;case"pattern":if(!(typeof o=="string"?new RegExp(o):o).test(""+r))return i;break;case"uppercase":if(o&&(typeof r!="string"||!/^[A-Z]*$/.test(r)))return i;break;case"lowercase":if(o&&(typeof r!="string"||!/^[a-z]*$/.test(r)))return i;break;case"min":case"max":case"positive":case"negative":case"integer":case"number":let s=Number(r);if(Number.isNaN(s)||i==="min"&&s<o||i==="max"&&s>o||i==="positive"&&s<=0||i==="negative"&&s>=0||i==="integer"&&!Number.isInteger(s))return i;break;case"equal":if(r!==o)return i;break;case"enum":if(Array.isArray(o)&&!o.includes(r))return i;break;case"hasKeys":if(typeof r!="object"||Array.isArray(o)&&o.some(c=>!(c in r)))return i;break;case"email":if(!/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(""+r))return i;break;case"url":if(!RegExp("^(?!mailto:)(?:(?:http|https|ftp)://)(?:\\S+(?::\\S*)?@)?(?:(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[0-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]+-?)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]+-?)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))|localhost)(?::\\d{2,5})?(?:(/|\\?|#)[^\\s]*)?$","i").test(""+r))return i;break;case"ip":if(!/^(2(5[0-5]{1}|[0-4]\d{1})|[0-1]?\d{1,2})(\.(2(5[0-5]{1}|[0-4]\d{1})|[0-1]?\d{1,2})){3}$/.test(""+r))return i;break;case"phone":if(!/^(?:(?:\+|00)86)?1[3-9]\d{9}$/.test(""+r))return i;break;case"computed":if(!this.compute(t,o))return i}},compute(t,r){let n;if(typeof r=="object"){let i=t.getParentGroup(),o=c=>{if(c=Array.isArray(c)?{mode:"AND",group:c}:c,!j.trueArray(c.group))return!0;let u=c.mode==="OR",d=!0;for(let f=0;f<c.group.length;f++){let h=c.group[f],p,m=null,g=null;if(h.variable)g=this.fc.getLoadData(h.variable);else if(h.field)m=Va(h.field||"");else if(!h.mode)return!0;let y=h.compare;if(y&&(y=Va(y||"")),p=h.mode?o(h):Nt[h.condition]?j.Function(h.handler)?te(()=>h.handler(this.api,t.rule)):te(()=>el(um,`with($form){with($scope){with(this){with($group){ return $condition['${h.condition}'](${h.variable?"$variableVal":m}, ${y||"$val"}); }}}}`).call(this.api.form,Nt,g,h.value,this.api.top.form,this.api.top===this.api.scope?{}:this.api.scope.form,i&&this.subRuleData[i.id]||{},t.rule)):!1,u&&p)return!0;u||d&&(d=p)}return!u&&d},a=r,s=o(a);return s=a.invert===!0?!s:s,a.linkage?s?te(()=>this.computeValue(a.linkage,t,i),void 0):sr:a.linkageVariable?s?te(()=>this.fc.getLoadData(a.linkageVariable),void 0):sr:s}if(j.Function(r)){let i=r;n=()=>i(this.api.form,this.api,t.rule)}else{let i=t.getParentGroup();n=()=>this.computeValue(r,t,i)}return te(n,void 0)},computeValue(t,r,n){let i=this,o=Object.keys(this.fc.formulas).reduce((a,s)=>(a[s]=function(...c){return i.fc.formulas[s].call({that:this,rule:r.rule,api:i.api,fc:i.fc},...c)},a),{});return te(()=>el(dm,`with($form){with($scope){with(this){with($group){with($formulas){ return ${t} }}}}}`).call(this.api.form,o,this.api.top.form,this.api.top===this.api.scope?{}:this.api.scope.form,n&&this.subRuleData[n.id]||{},r.rule,this.api),void 0)},updateChildren(t,r,n){this.deferSyncValue(()=>{n&&n.forEach(i=>{(r||[]).indexOf(i)===-1&&i&&!j.String(i)&&i.__fc__&&i.__fc__.parent===t&&this.rmCtx(i.__fc__)}),j.trueArray(r)&&(this.loadChildren(r,t),this.bus.$emit("update",this.api))})},rmSub(t){j.trueArray(t)&&t.forEach(r=>{r&&r.__fc__&&this.rmCtx(r.__fc__)})},rmCtx(t){if(t.deleted)return;let{id:r,field:n,input:i,name:o}=t;St(this.ctxs,r),St(this.formData,r),St(this.subForm,r),St(this.vm.setupState.ctxInject,r);let a=t.getParentGroup();a&&this.subRuleData[a.id]&&St(this.subRuleData[a.id],n),t.group&&St(this.subRuleData,r),i&&this.rmIdCtx(t,n,"field"),o&&this.rmIdCtx(t,o,"name"),i&&!ue(this.fieldCtx,n)&&St(this.form,n),this.deferSyncValue(()=>{if(!this.reloading){if(t.parser.loadChildren!==!1){let c=t.getPending("children",t.rule.children);j.trueArray(c)&&c.forEach(u=>u&&u.__fc__&&this.rmCtx(u.__fc__))}t.root===this.rules&&this.vm.setupState.renderRule()}},i);let s=this.sort.indexOf(r);return s>-1&&this.sort.splice(s,1),this.$render.clearCache(t),t.delete(),this.effect(t,"deleted"),this.targetHook(t,"deleted"),i&&!this.fieldCtx[n]&&this.vm.emit("remove-field",n,t.rule,this.api),t.rule.__ctrl||this.vm.emit("remove-rule",t.rule,this.api),t}})}function hm(e){ee(e.prototype,{mounted(){let t=()=>{this.isMounted=!0,this.lifecycle("mounted")};this.pageEnd?t():this.bus.$once("page-end",t)},lifecycle(t){this.fc.targeabFormDriver(t,this.api,this.fc),this.vm.emit(t,this.api),this.emitEvent(t,this.api)},emitEvent(t,...r){let n=this.options[t]||this.options[Me("on-"+t)||"on-"+t];if(n){let i=Qe(n);j.Function(i)&&te(()=>i(...r))}this.bus.$emit(t,...r)},targetHook(t,r,n){var c,u,d,f;let i=(u=(c=t.prop)==null?void 0:c.hook)==null?void 0:u[r],o=(h,p)=>{h&&(Array.isArray(h)?h:[h]).forEach(m=>{te(()=>m(ne(M({args:Object.values(n||{})},n||{}),{self:t.rule,rule:t.rule,parent:p==null?void 0:p.rule,$f:this.api,api:this.api,option:this.vm.props.option})))})};o(i);let a="deep"+ta(r),s=t.parent;for(;s;)o((f=(d=s.prop)==null?void 0:d.hook)==null?void 0:f[a],s),s=s.parent}})}function mm(e){ee(e.prototype,{useProvider(){let t=this.fc.providers;Object.keys(t).forEach(r=>{let n=t[r];j.Function(n)&&(n=n(this.fc)),n._c=ym(n),this.onEffect(n,r),this.providers[r]=n})},onEffect(t,r){let n=[];(t._c||["*"]).forEach(i=>{let o=i==="*"?"*":this.getType(i);n.indexOf(o)>-1||(n.push(o),this.bus.$on(`p:${r||t.name}:${o}:${+!!t.input}`,(a,s)=>{t[a]&&t[a](...s)}))}),t._used=n},watchEffect(t){let r={required:()=>{var i,o;return(ue(t.rule,"$required")?t.rule.$required:(o=(i=t.rule)==null?void 0:i.effect)==null?void 0:o.required)||!1}},n=t.rule.effect||{};Object.keys(n).forEach(i=>{r[i]=()=>n[i]}),Object.keys(t.rule).forEach(i=>{i[0]==="$"&&(r[i.substr(1)]=()=>t.rule[i])}),Object.keys(r).forEach(i=>{t.watch.push(l.watch(r[i],o=>{this.effect(t,"watch",{[i]:o})},{deep:!0}))})},ruleEffect(t,r,n){this.emitEffect({rule:t,input:!!t.field,type:this.getType(t.type)},r,n)},effect(t,r,n){this.emitEffect({rule:t.rule,input:t.input,type:t.trueType,ctx:t,custom:n},r)},getEffect(t,r){if(ue(t,"$"+r))return t["$"+r];if(ue(t,"effect")&&ue(t.effect,r))return t.effect[r]},emitEffect({ctx:t,rule:r,input:n,type:i,custom:o},a,s){if(!i||["fcFragment","fragment"].indexOf(i)>-1)return;let c=o||Object.keys(r).reduce((u,d)=>(d[0]==="$"&&(u[d.substr(1)]=r[d]),u),M({},r.effect||{}));Object.keys(c).forEach(u=>{let d=this.providers[u];if(!d||d.input&&!n)return;let f;if(!d._c)f="*";else if(d._used&&d._used.indexOf(i)>-1)f=i;else return;let h=M({value:c[u],getValue:()=>this.getEffect(r,u)},s||{});t&&(h.getProp=()=>t.effectData(u),h.clearProp=()=>t.clearEffectData(u),h.mergeProp=p=>st(h.getProp(),[p]),h.id=t.id),this.bus.$emit(`p:${u}:${f}:${+!!d.input}`,a,[h,r,this.api])})}})}function gm(e){return e.filter(function(t,r,n){return n.indexOf(t,0)===r})}function ym(e){let t=e.components;if(Array.isArray(t)){let r=gm(t.filter(n=>n!=="*"));return r.length?r:!1}return j.String(t)?[t]:!1}function et(e){Ba(this,{options(){return e.options.value||{}},bus(){return e.bus},preview(){return e.vm.props.preview==null?e.vm.setupState.parent&&e.vm.setupState.parent.props.preview!=null?e.vm.setupState.parent.props.preview:e.options.value.preview||!1:e.vm.props.preview}}),ee(this,{fc:e,vm:e.vm,watching:!1,loading:!1,reloading:!1,noWatchFn:null,deferSyncFn:null,isMounted:!1,formData:l.reactive({}),subRuleData:l.reactive({}),subForm:{},form:l.reactive({}),appendData:{},ignoreFields:[],providers:{},cycleLoad:null,loadedId:1,nextTick:null,changeStatus:!1,pageEnd:!0,nextReload:()=>{this.lifecycle("reload")}}),this.initData(e.rules),this.$manager=new e.manager(this),this.$render=Reflect.construct(Zn,[this]),this.api=e.extendApiFn.reduce((t,r)=>{let n=te(()=>r(t,this));return n&&n!==t&&ee(t,n),t},Jh(this))}ee(et.prototype,{initData(e){ee(this,{ctxs:{},fieldCtx:{},nameCtx:{},sort:[],rules:e})},init(){this.updateAppendData(),this.useProvider(),this.usePage(),this.loadRule(),this.$manager.__init(),this.lifecycle("created")},updateAppendData(){this.appendData=M(M(M({},Ct(this.options.formData||{})),this.fc.vm.props.modelValue||{}),this.appendData)},isBreakWatch(){return this.loading||this.noWatchFn||this.reloading},globalBeforeFetch(e){return new Promise((t,r)=>{let n=this.options.beforeFetch&&te(()=>this.options.beforeFetch(e,{api:this.api}));n&&j.Function(n.then)?n.then(t).catch(r):t()})},beforeFetch(e){return new Promise((t,r)=>{let n=e&&e.beforeFetch&&te(()=>e.beforeFetch(e,{api:this.api}));n&&j.Function(n.then)?n.then(t).catch(r):n===!1?r():t()}).then(()=>this.globalBeforeFetch(e))},beforeSubmit(e){return new Promise((t,r)=>{let n=this.options.beforeSubmit&&te(()=>this.options.beforeSubmit(e,{api:this.api}));n&&j.Function(n.then)?n.then(t).catch(r):n===!1?r():t()})}}),Xh(et),em(et),rm(et),im(et),sm(et),pm(et),hm(et),mm(et);var Xn=l.defineComponent({name:"fcFragment",inheritAttrs:!1,props:["vnode"],render(){return this.vnode}});function bm(e){return Object.keys(e).map(t=>{let r=e[t],n=l.resolveDirective(t);if(n)return[n,r.value,r.arg,r.modifiers||{}]}).filter(t=>!!t)}function tl(e,t){let r=e.directives;return r?(Array.isArray(r)||(r=[r]),l.withDirectives(t,r.reduce((n,i)=>n.concat(bm(i)),[]))):t}function wm(){let e={};const r=class r{constructor(i){ve(this,"aliasMap",e);ve(this,"vm");ve(this,"handle");this.vm=i.vm,this.handle=i}make(i,o,a){return tl(o,this.h(i,ja(o),a))}makeComponent(i,o,a){try{return tl(o,l.createVNode(i,ja(o),a))}catch(s){return console.error(s),l.createVNode("")}}h(i,o,a){let s=this.vm||l.getCurrentInstance();if(!s)throw Error("Cannot create a node outside a component instance");let c=s.appContext.config.isNativeTag(i),u=this.handle.fc.prop.components[i];!u&&c&&delete o.abFormInject;try{return l.createVNode(u||(c?i:l.resolveComponent(i)),o,a)}catch(d){return console.error(d),l.createVNode("")}}static alias(i,o){e[i]=o}static use(i){Object.keys(i).forEach(o=>{let a=Bt(o),s=o.toLocaleLowerCase(),c=i[o];r.alias(o,c),[o,a,s].forEach(u=>{Object.assign(r.prototype,{[u]:function(d,f){return this.make(e[o]||u,d,f)}})})})}};ve(r,"aliasMap",e);let t=r;return t}function vm(e){class t extends xm{}return Object.assign(t.prototype,e),t}var xm=class{constructor(e){ve(this,"$handle");ve(this,"vm");ve(this,"$render");ve(this,"$r");ve(this,"options");ve(this,"ref");ve(this,"mergeOptionsRule");ve(this,"key");this.$handle=e,this.vm=e.vm,this.options={},this.ref="fcForm",this.mergeOptionsRule={normal:["form","row","info","submitBtn","resetBtn"]},this.updateKey(),this.init()}__init(){this.$render=this.$handle.$render,this.$r=(...e)=>this.$render.renderRule(...e)}updateKey(){this.key=Pr()}init(){}update(){}beforeRender(){}form(){return this.vm.refs[this.ref]}adapterValidate(e,t){return e.validator=(r,n,i)=>t(n,i),e}getSlot(e){let t=r=>r.slots[e]||(r.setupState.parent?t(r.setupState.parent):void 0);return t(this.vm)}mergeOptions(e,t){return at(e.map(r=>this.tidyOptions(r)),t,this.mergeOptionsRule)}updateOptions(e){this.$handle.fc.targeabFormDriver("updateOptions",e,{handle:this.$handle,api:this.$handle.api}),this.options=this.mergeOptions([e],this.getDefaultOptions()),this.update()}tidyOptions(e){return e}tidyRule(e){}mergeProp(e){}getDefaultOptions(){return{}}fieldChange(e,t,r,n){}render(e){}};function zr(e,t){return Reflect.get(e,t)}function ei(e,t,r){Reflect.set(e,t,r)}function ti(e,t){Reflect.deleteProperty(e,t)}var Sm=function(e){return{name:"loadData",_fn:[],loaded(t,r,n){this.deleted(t),l.nextTick(()=>{let i=$t(t.getValue()),o=[];i.forEach(a=>{if(a&&(a.attr||a.template||a.handler)){let s=u=>{var p;let d=(p=r==null?void 0:r.__fc__)==null?void 0:p.getParentGroup(),f;f=a.template?e.$handle.loadStrVar(a.template,u,d?{rule:r,value:e.$handle.subRuleData[d.id]||{}}:null):a.handler&&j.Function(a.handler)?a.handler(u,r,n):e.$handle.loadStrVar(`{{${a.attr}}}`,u,d?{rule:r,value:e.$handle.subRuleData[d.id]||{}}:null),(f==null||f==="")&&a.default!=null&&(f=a.default),a.copy!==!1&&(f=Ct(f));let h=a.modify?r:t.getProp();a.to==="child"?h.children?h.children[0]=f:h.children=[f]:pt(h,a.to||"options",f),n.sync(r)},c=e.watchLoadData(u=>s(u));s=ft(s,a.wait||300),a.watch===!1?c():o.push(c)}}),ei(this._fn,t.id,o)})},watch(t,r,n){this.loaded(t,r,n)},deleted(t){var r;(r=zr(this._fn,t.id))==null||r.forEach(n=>{n()}),ti(this._fn,t.id),t.clearProp()}}},Cm=function(e){return{name:"t",_fn:[],loaded(t,r,n){this.deleted(t);let i=t.getValue()||{},o=[];Object.keys(i).forEach(a=>{let s=i[a];if(s){let c=typeof s=="object",u=f=>{let h=c?s:null,p=e.t(c?h==null?void 0:h.attr:s,c&&(h==null?void 0:h.params)||null,f),m=c&&(h!=null&&h.modify)?r:t.getProp();a==="child"?m.children?m.children[0]=p:m.children=[p]:pt(m,a,p),n.sync(r)},d=e.watchLoadData(f=>u(f));u=ft(u,(typeof s=="object"?s.wait:0)||300),typeof s!="object"||s.watch!==!1?o.push(d):d()}}),ei(this._fn,t.id,o)},watch(t,r,n){this.loaded(t,r,n)},deleted(t){var r;(r=zr(this._fn,t.id))==null||r.forEach(n=>{n()}),ti(this._fn,t.id),t.clearProp()}}},rl={name:"componentValidate",load(e,t,r){let n=e.getValue();if(!n||typeof n=="object"&&"method"in n&&n.method===!1)e.clearProp(),r.clearValidateState([t.field]);else{let i=j.Object(n)&&n!==null?n:{method:n},o=i.method,a=ne(M({},i),{validator(...s){let c=Xe(t);if(c&&typeof c=="object"&&"id"in c)return r.exec(c.id,typeof o=="string"?o:"abFormValidate",...s,{attr:e,rule:t,api:r})}});delete a.method,e.getProp().validate=[a]}},watch(e,t,r){rl.load(e,t,r)}},$m={fetch:function(e){function t(i){return typeof i=="string"?{action:i,to:"options"}:i}function r(i,o,a){let s=i.value;n.deleted(i);let c=t(typeof s=="function"?s(o,a):s),u=h=>{h===void 0?i.clearProp():pt(i.getProp(),(c==null?void 0:c.to)||"options",h),h!=null&&(c!=null&&c.key)&&e.$handle.options.globalData[c.key]&&e.fetchCache.set(e.$handle.options.globalData[c.key],{status:!0,data:h}),a.sync(o)};if(!c||!c.action&&!c.key){u(void 0);return}c=Ct(c),c.to||(c.to="options");let d=c.onError,f=()=>!i.getValue()&&(i.clearProp(),a.sync(o),!0);ei(n._fn,i.id,e.watchLoadData(ft((h,p)=>{var y;if(p&&(c==null?void 0:c.watch)===!1)return(y=zr(n._fn,i.id))==null?void 0:y();if(c!=null&&c.key){e.targetRule=o;let b=h(`$globalData.${c.key}`);if(delete e.targetRule,b){if(f())return;u(b)}return}let m=e.$handle.loadFetchVar(Ct(c),h,o),g=ne(M({headers:{}},m),{onSuccess(b,S){if(f())return;let $=R=>S?R:ue(R,"data")?Fe(R,"data"):R,L=Qe(m.parse);typeof L=="function"?$=R=>L(R,o,a):typeof L=="string"&&($=R=>Fe(R,L)),Nn($(b)).then(R=>{u(R)})},onError(b){if(u(void 0),!f())if(typeof d=="function")d(b,o,a);else{let S=b&&typeof b=="object"&&"message"in b?b.message:void 0;Pn(S?String(S):`fetch fail ${m.action||""}`)}}});e.$handle.beforeFetch(g,{rule:o,api:a}).then(()=>{typeof m.action=="function"?Nn(m.action(o,a)).then(b=>{g.onSuccess(b,!0)}).catch(b=>{g.onError(b)}):te(()=>e.create.fetch(g,{inject:i,rule:o,api:a}))}).catch(()=>{})},c.wait||600)))}let n={name:"fetch",_fn:[],loaded(i,o,a){r(i,o,a)},watch(i,o,a){r(i,o,a)},deleted(i){var o;(o=zr(this._fn,i.id))==null||o(),ti(this._fn,i.id),i.clearProp()}};return n},loadData:Sm,t:Cm,componentValidate:rl},Tm={name:"html",loadChildren:!1,render(e,t){return t.prop.props.innerHTML=e.default(),t.vNode.make(t.prop.props.tag||"div",t.prop)},renderChildren(e){return{default:()=>e.filter(t=>j.String(t)).join("")}}};function Em(e){e+="=";let t=decodeURIComponent(document.cookie).split(";");for(let r=0;r<t.length;r++){let n=t[r];for(;n.charAt(0)===" ";)n=n.substring(1);if(n.indexOf(e)===0){n=n.substring(e.length,n.length);try{return JSON.parse(n)}catch(i){return n}}}return null}function km(e){let t=localStorage.getItem(e);if(t)try{return JSON.parse(t)}catch(r){return t}return null}function _m(e){let t=sessionStorage.getItem(e);if(t)try{return JSON.parse(t)}catch(r){return t}return null}function ri(e,t){if(!t)return null;let r=t.split("."),n=r.shift();if(!n)return null;let i=e(n);return r.length?i==null?null:Fe(i,r):i}function Fm(e){return ri(Em,e)}function Am(e){return ri(km,e)}function Om(e){return ri(_m,e)}var Rm=typeof global=="object"&&global&&global.Object===Object&&global,Mm=typeof self=="object"&&self&&self.Object===Object&&self,ni=Rm||Mm||Function("return this")(),Lt=ni.Symbol,nl=Object.prototype,Dm=nl.hasOwnProperty,Pm=nl.toString,cr=Lt?Lt.toStringTag:void 0;function Im(e){var t=Dm.call(e,cr),r=e[cr];try{e[cr]=void 0;var n=!0}catch(o){}var i=Pm.call(e);return n&&(t?e[cr]=r:delete e[cr]),i}var Bm=Object.prototype.toString;function jm(e){return Bm.call(e)}var Nm="[object Null]",Vm="[object Undefined]",il=Lt?Lt.toStringTag:void 0;function ol(e){return e==null?e===void 0?Vm:Nm:il&&il in Object(e)?Im(e):jm(e)}function Lm(e){return typeof e=="object"&&!!e}var Hm="[object Symbol]";function ii(e){return typeof e=="symbol"||Lm(e)&&ol(e)==Hm}function zm(e,t){for(var r=-1,n=e==null?0:e.length,i=Array(n);++r<n;)i[r]=t(e[r],r,e);return i}var oi=Array.isArray,al=Lt?Lt.prototype:void 0,ll=al?al.toString:void 0;function sl(e){if(typeof e=="string")return e;if(oi(e))return zm(e,sl)+"";if(ii(e))return ll?ll.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function cl(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Um="[object AsyncFunction]",qm="[object Function]",Ym="[object GeneratorFunction]",Gm="[object Proxy]";function Wm(e){if(!cl(e))return!1;var t=ol(e);return t==qm||t==Ym||t==Um||t==Gm}var ai=ni["__core-js_shared__"],ul=function(){var e=/[^.]+$/.exec(ai&&ai.keys&&ai.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function Jm(e){return!!ul&&ul in e}var Km=Function.prototype.toString;function Qm(e){if(e!=null){try{return Km.call(e)}catch(t){}try{return e+""}catch(t){}}return""}var Zm=/[\\^$.*+?()[\]{}|]/g,Xm=/^\[object .+?Constructor\]$/,eg=Function.prototype,tg=Object.prototype,rg=eg.toString,ng=tg.hasOwnProperty,ig=RegExp("^"+rg.call(ng).replace(Zm,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function og(e){return!cl(e)||Jm(e)?!1:(Wm(e)?ig:Xm).test(Qm(e))}function ag(e,t){return e==null?void 0:e[t]}function dl(e,t){var r=ag(e,t);return og(r)?r:void 0}function lg(e,t){return e===t||e!==e&&t!==t}var sg=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,cg=/^\w*$/;function ug(e,t){if(oi(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||ii(e)?!0:cg.test(e)||!sg.test(e)||t!=null&&e in Object(t)}var ur=dl(Object,"create"),dg="__lodash_hash_undefined__",fg=Object.prototype.hasOwnProperty,pg=Object.prototype.hasOwnProperty,hg="__lodash_hash_undefined__";function Tt(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Tt.prototype.clear=function(){this.__data__=ur?ur(null):{},this.size=0},Tt.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=+!!t,t},Tt.prototype.get=function(e){var t=this.__data__;if(ur){var r=t[e];return r===dg?void 0:r}return fg.call(t,e)?t[e]:void 0},Tt.prototype.has=function(e){var t=this.__data__;return ur?t[e]!==void 0:pg.call(t,e)},Tt.prototype.set=function(e,t){var r=this.__data__;return this.size+=+!this.has(e),r[e]=ur&&t===void 0?hg:t,this};function Ur(e,t){for(var r=e.length;r--;)if(lg(e[r][0],t))return r;return-1}var mg=Array.prototype.splice;function Ht(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Ht.prototype.clear=function(){this.__data__=[],this.size=0},Ht.prototype.delete=function(e){var t=this.__data__,r=Ur(t,e);return r<0?!1:(r==t.length-1?t.pop():mg.call(t,r,1),--this.size,!0)},Ht.prototype.get=function(e){var t=this.__data__,r=Ur(t,e);return r<0?void 0:t[r][1]},Ht.prototype.has=function(e){return Ur(this.__data__,e)>-1},Ht.prototype.set=function(e,t){var r=this.__data__,n=Ur(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this};var gg=dl(ni,"Map");function yg(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function qr(e,t){var r=e.__data__;return yg(t)?r[typeof t=="string"?"string":"hash"]:r.map}function Et(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Et.prototype.clear=function(){this.size=0,this.__data__={hash:new Tt,map:new(gg||Ht),string:new Tt}},Et.prototype.delete=function(e){var t=qr(this,e).delete(e);return this.size-=+!!t,t},Et.prototype.get=function(e){return qr(this,e).get(e)},Et.prototype.has=function(e){return qr(this,e).has(e)},Et.prototype.set=function(e,t){var r=qr(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this};var bg="Expected a function";function li(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw TypeError(bg);var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var a=e.apply(this,n);return r.cache=o.set(i,a)||o,a};return r.cache=new(li.Cache||Et),r}li.Cache=Et;var wg=500;function vg(e){var t=li(e,function(n){return r.size===wg&&r.clear(),n}),r=t.cache;return t}var xg=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Sg=/\\(\\)?/g,Cg=vg(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(xg,function(r,n,i,o){t.push(i?o.replace(Sg,"$1"):n||r)}),t});function $g(e){return e==null?"":sl(e)}function Tg(e,t){return oi(e)?e:ug(e,t)?[e]:Cg($g(e))}function Eg(e){if(typeof e=="string"||ii(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function kg(e,t){t=Tg(t,e);for(var r=0,n=t.length;e!=null&&r<n;)e=e[Eg(t[r++])];return r&&r==n?e:void 0}function _g(e,t,r){var n=e==null?void 0:kg(e,t);return n===void 0?r:n}var Fg={required:"{title} is required",validate:{url:"{title} is not a valid url",email:"{title} is not a valid email",ip:"{title} {title} is not a valid ip",phone:"{title} {title} is not a valid phone",pattern:"{title} does not match pattern {pattern}",uppercase:"{title} must be all uppercase",lowercase:"{title} must be all lowercased",positive:"{title} is not a positive number",negative:"{title} is not a negative number",equal:"{title} is not equal to {equal}",min:"{title} cannot be less than {min}",max:"{title} cannot be greater than {max}",enum:"{title} must be one of {enum}",hasKeys:"{title} does not contain required fields {hasKeys}",minLen:"{title} must be at least {minLen}",maxLen:"{title} cannot be longer than {maxLen}",len:"{title} must be exactly {len}",integer:"{title} is not an integer",number:"{title} is not an number"}},Ag={required:"{title}不能为空",validate:{url:"{title}不是有效的 url 地址",email:"{title}不是有效的邮箱地址",ip:"{title}不是有效的 IP 地址",phone:"{title}不是正确的手机号",pattern:"{title}必须匹配 {pattern}",uppercase:"{title}必须全大写",lowercase:"{title}必须全小写",positive:"{title}不是正数",negative:"{title}不是负数",equal:"{title}必须等于 {equal}",min:"{title}必须大于等于 {min}",max:"{title}必须小于等于 {max}",enum:"{title}必须是 {enum} 之一",hasKeys:"{title}必须包含 {hasKeys} 字段",minLen:"{title}长度必须大于 {minLen}",maxLen:"{title}长度必须小于 {maxLen}",len:"{title}长度必须为 {len}",integer:"{title}必须为整数",number:"{title}必须为数字"}},Og=((Cs=window.localStorage)==null?void 0:Cs.getItem("lang"))||"zh-cn",Rg=($s=(e=>({t:t=>_g(Og==="zh-cn"?Ag:Fg,t,t)}))())==null?void 0:$s.t;function si(...e){let t=e.length===1?e[0]:e[1],r=e.length===1?t==null?void 0:t.name:e[0];return{id:typeof r=="string"?r:void 0,prop:t}}function Mg(e={}){let t=e.key||[],r=e.array||[],n=e.normal||[];Ra.push(...t),Jn.push(...r),Kn.push(...n),Ua([...t,...r,...n])}var Dg=1,Ie={},fl=Symbol("defValue");function pl(e){let t={[Xn.name||"fcFragment"]:Xn},r={},n={},i={},o={},a=[],s=[],c=e.extendApi?[e.extendApi]:[],u=M({},$m),d=Gh(),f={global:{}},h=e.isMobile===!0,p=l.reactive({$mobile:h}),m=wm(),g={},y={};Mg(e.attrs||{});function b(w){let v=Ie[w];if(Array.isArray(v))return v.map(O=>O.api());if(v)return v.api()}function S(w){a.push(w)}function $(...w){let v=si(...w);v.id&&v.prop&&(n[v.id]=v.prop)}function L(...w){let v=si(...w);v.id&&v.prop&&(u[v.id]=j.Function(v.prop)?v.prop:ne(M({},v.prop),{name:v.id}))}function R(w){m.use(w)}function T(...w){let v=w[0];if(arguments.length===0)return Vt;if(typeof v=="string"&&arguments.length===1)return r[Me(v)||v];let O=si(...w);if(!O.id||!O.prop)return Vt;let N=Me(O.id),z=O.prop,ae=z.merge===!0?r[N]:void 0;r[N]=Lr(z,ae||Vt),d[N]=$e(N),z.maker&&ee(d,z.maker)}function E(w,v){let O,N=v;if(typeof w=="string"){if(O=w,N===void 0)return t[O]}else{let me=w;O=me.displayName||me.name,N=w}if(!O||!N)return;let z=Me(O),ae=Bt(O);t[O]=N,t[z]=N,t[ae]=N,delete m.aliasMap[O],delete m.aliasMap[z],delete m.aliasMap[ae],delete r[O],delete r[z],delete r[ae];let oe=N.abFormParser;oe&&T(O,oe)}function k(){return Lh(G,t,n)}function V(w,v){let O=k();return l.createApp({data(){return l.reactive({rule:w,option:v})},render(){return l.h(O,M({ref:"fc"},this.$data))}})}function q(){return Xn}function U(w,v){let O=Reflect.get(w,"install");return j.Function(O)?O(x,v):typeof w=="function"&&w(x,v),this}let x=function(w,v){let O=V(w,v||{});a.forEach(z=>{te(()=>z(x,O))});let N=document.createElement("div");return((v==null?void 0:v.el)||document.body).appendChild(N),O.mount(N).$refs.fc.fapi};Lr(x,y);function _(w){let v=M({},e);return w?v.inherit={components:t,parsers:r,directives:n,modelFields:i,providers:u,useApps:a,maker:d,formulas:g,loadData:p}:delete v.inherit,pl(v)}function F(w,v){i[w]=v}function A(w,v){g[w]=v}function C(w,v){let O=o[w]||{},N=O.parsers||{};v.parsers&&Object.keys(v.parsers).forEach(z=>{N[z]=Lr(v.parsers[z],Vt)}),v.name=w,o[w]=ne(M(M({},O),v),{parsers:N})}function B(w){w&&Object.keys(Ie).forEach(v=>{(Array.isArray(Ie[v])?Ie[v]:[Ie[v]]).forEach(O=>{O.bus.$emit("$loadData."+w)})})}function I(w,v){pt(p,w,v),B(w)}function W(w,v){let O=(...N)=>te(()=>v(...N));O._driver=!0,I(w,O)}function Z(w,v){let O=(w||"").split(".");w=O.shift()||"";let N=O.join(".");if(ue(p,w)||(p[w]=fl),p[w]!==fl){let z=p[w];return z&&z._driver?z=z(N):O.length&&(z=Fe(z,O)),z==null||z===""?v:z}return v}function X(w){c.push(w)}function P(w){delete p[w],B(w)}function H(w,v){s.push({name:w,callback:v})}function G(w){ee(this,{id:Dg++,create:x,vm:w,manager:vm(e.manager||{}),parsers:r,providers:u,modelFields:i,formulas:g,isMobile:h,rules:w.props.rule,name:w.props.name||Pr(),inFor:w.props.inFor,prop:{components:t,directives:n},get:null,drivers:o,renderDriver:null,refreshData:B,loadData:p,CreateNode:m,bus:nh(),unwatch:new Set,options:l.ref({}),extendApiFn:c,fetchCache:new WeakMap,tmpData:l.reactive({})}),this.unwatch.push=this.unwatch.add.bind(this.unwatch),s.forEach(v=>{this.bus.$on(v.name,v.callback)}),l.nextTick(()=>{l.watch(this.options,()=>{this.$handle.$manager.updateOptions(this.options.value),this.api().refresh()},{deep:!0})}),ee(w.appContext.components,t),ee(w.appContext.directives,n),this.$handle=Reflect.construct(et,[this]),this.name&&(this.inFor?(Ie[this.name]||(Ie[this.name]=[]),Ie[this.name].push(this)):Ie[this.name]=this)}G.isMobile=h,ee(G.prototype,{init(){this.isSub()&&this.unwatch.add(l.watch(()=>this.vm.setupState.parent.setupState.fc.options.value,()=>{this.initOptions(),this.$handle.api.refresh()},{deep:!0,flush:"sync"})),this.vm.props.driver&&(this.renderDriver=typeof this.vm.props.driver=="object"?this.vm.props.driver:this.drivers[String(this.vm.props.driver)]),!this.renderDriver&&this.vm.setupState.parent&&(this.renderDriver=this.vm.setupState.parent.setupState.fc.renderDriver),this.renderDriver||(this.renderDriver=this.drivers.default),this.initOptions(),this.$handle.init()},targeabFormDriver(w,...v){this.bus.$emit(w,...v);let O=this.renderDriver;if(O&&O[w])return te(()=>O[w](...v))},t(w,v,O){let N=O?O("$t."+w):this.globalLanguageDriver(w);return N!=null||(N=""),N&&v&&Object.keys(v).forEach(z=>{let ae=RegExp(`{${z}}`,"g");N=N.replace(ae,v[z])}),N},globalDataDriver(w){var ae;let v=w.split("."),O=v.shift()||"",N=(ae=this.options.value)==null?void 0:ae.globalData,z=N==null?void 0:N[O];if(z){if(z.type==="static")return Fe(z.data,v);{let oe,me=this.fetchCache.get(z);if(me){if(me.status&&(oe=Fe(me.data,v)),!me.loading)return oe;me.loading=!1,this.fetchCache.set(z,me)}else this.fetchCache.set(z,{status:!1});let Ae=ft(()=>{De();let we=this.fetchCache.get(z);N&&Object.values(N).indexOf(z)!==-1?(we&&(we.loading=!0,this.fetchCache.set(z,we)),this.bus.$emit("$loadData.$globalData."+O)):this.fetchCache.delete(z)},z.wait||600),Te=we=>{this.fetchCache.set(z,{status:!0,data:we}),this.bus.$emit("$loadData.$globalData."+O)},De=this.watchLoadData((we,Be)=>{if(Be&&z.watch===!1)return De();if(Be){Ae();return}let He=this.$handle.loadFetchVar(sa(z),we);He.targetRule=this.targetRule,this.$handle.api.fetch(He).then(At=>{Te(At)}).catch(()=>{Te(null)})});return z.watch===!1&&De(),oe}}},getLocale(){let w=this.vm.setupState.top.props.locale;return w&&typeof w=="object"?w.name:typeof w=="string"?w:"zh-cn"},globalLanguageDriver(w){var z;let v=this.vm.setupState.top.props.t,O=this.vm.setupState.top.props.locale,N;return v&&(N=te(()=>v(w))),N==null&&O&&typeof O=="object"&&(N=Fe(O,w)),N!=null||(N=Fe((((z=this.options.value)==null?void 0:z.language)||{})[this.getLocale()]||{},w),N!=null||(N=Rg(w))),N},globalVarDriver(w){var z,ae;let v=w.split("."),O=v.shift()||"",N=(ae=(z=this.options.value)==null?void 0:z.globalVariable)==null?void 0:ae[O];if(N){let oe=j.Function(N)?N:Qe(N.handle);if(oe)return Fe(oe((...me)=>this.$handle.api.getData(...me),this.$handle.api),v)}},setData(w,v,O){O?I(w,v):(pt(this.vm.setupState.top.setupState.fc.tmpData,w,v),this.bus.$emit("$loadData."+w))},getLoadData(w,v){let O=null;if(w!=null){let N=w.split("."),z=N.shift();if(O=Fe(this.vm.setupState.top.setupState.fc.tmpData,w),O!=null)return O;if(z==="$topForm")O=this.$handle.api.top.formData(!0);else if(z==="$scopeForm")O=this.$handle.api.scope.formData(!0);else if(z==="$form")O=this.$handle.api.formData(!0);else if(z==="$options")O=this.options.value;else if(z==="$globalData")O=this.globalDataDriver(N.join(".")),N=[];else if(z==="$var")O=this.globalVarDriver(N.join(".")),N=[];else if(z==="$locale")O=this.getLocale(),N=[];else if(z==="$t")O=this.globalLanguageDriver(N.join(".")),N=[];else{if(z==="$preview")return this.$handle.preview;O=Z(w),N=[]}O&&N.length&&(O=Fe(O,N))}return O==null||O===""?v:O},watchLoadData(w,v){let O={},N=oe=>{this.get||(this.get=z),te(()=>{w(z,oe)}),this.get===z&&(this.get=void 0)},z=(oe,me)=>{let Ae;if(typeof oe=="object"&&(Ae=oe.getValue,oe=oe.id),O[oe])return O[oe].val;let Te=l.computed(()=>Ae?Ae():this.getLoadData(oe,me)),De=oe.split("."),we=De.shift(),Be=De.shift()||"",He=ft(()=>{let ze=Ae?Ae():this.getLoadData(oe,me);if(O[oe])((ze instanceof Function||j.Object(ze)||Array.isArray(ze))&&ze===O[oe].val||JSON.stringify(ze)!==JSON.stringify(O[oe].val))&&(O[oe].val=ze,N(!0));else return},v||0),At=l.watch(Te,ze=>{He()});return this.bus.$on("$loadData."+we,He),Be&&this.bus.$on("$loadData."+we+"."+Be,He),O[oe]={fn:()=>{this.bus.$off("$loadData."+we,He),Be&&this.bus.$off("$loadData."+we+"."+Be,He),At()},val:Te.value},Te.value};N(!1);let ae=()=>{Object.keys(O).forEach(oe=>O[oe].fn()),O={},this.unwatch.delete(ae)};return this.unwatch.add(ae),ae},isSub(){return this.vm.setupState.parent&&this.vm.props.extendOption},initOptions(){this.options.value={};let w=M({formData:{},submitBtn:{},resetBtn:{},globalEvent:{},globalData:{}},Ct(f)),v=this.isSub();v&&(w=this.mergeOptions(w,this.vm.setupState.parent.setupState.fc.options.value||{},!0)),w=this.mergeOptions(w,this.vm.props.option);let O=this.api();this.targeabFormDriver("initOptions",w,{api:O,isSubForm:v}),this.updateOptions(w)},mergeOptions(w,v,O){return v=M({},v||{}),O&&["page","onSubmit","onReset","onCreated","onChange","onMounted","mounted","beforeUnmount","beforeSubmit","onBeforeUnmount","onReload","reload","formData","el","globalClass","style"].forEach(N=>{delete v[N]}),v.global&&(w.global=zh(w.global,v.global),delete v.global),this.$handle.$manager.mergeOptions([v],w),w},updateOptions(w){this.options.value=this.mergeOptions(this.options.value,w),this.$handle.$manager.updateOptions(this.options.value),this.bus.$emit("$loadData.$options")},api(){return this.$handle.api},render(){return this.$handle.render()},mounted(){this.$handle.mounted()},unmount(){if(te(()=>this.$handle.lifecycle("beforeUnmount")),this.name)if(this.inFor){let w=Ie[this.name].indexOf(this);Ie[this.name].splice(w,1)}else delete Ie[this.name];s.forEach(w=>{this.bus.$off(w.name,w.callback)}),this.tmpData={},[...this.unwatch].forEach(w=>w()),this.unwatch.clear(),this.$handle.reloadRule([])},updated(){this.$handle.bindNextTick(()=>this.bus.$emit("next-tick",this.$handle.api))}});function ie(w){ee(w,{version:e.version,ui:e.ui,isMobile:h,extendApi:X,getData:Z,setDataDriver:W,setData:I,removeData:P,refreshData:B,maker:d,component:E,directive:$,setModelField:F,seabFormula:A,setDriver:C,register:L,$vnode:q,parser:T,use:U,factory:_,componentAlias:R,copyRule:Da,copyRules:Pa,mergeRule:st,fetch:Ya,$form:k,parseFn:Qe,parseJson:la,toJson:nr,useApp:S,getApi:b,on:H})}function pe(w){ee(w,{create:x,install(v,O){f=M(M({},f),O||{});let N=`_installedAbForm${h?"Mobile":""}_${e.ui}`,z=v;if(z[N]===!0)return;z[N]=!0;let ae=function(me,Ae={}){return x(me,Ae)};ie(ae),v.config.globalProperties.$abForm=ae;let oe=k();v.component(oe.name,oe),a.forEach(me=>{te(()=>me(w,v))})}})}if(ie(y),pe(y),W("$cookie",Fm),W("$localStorage",Am),W("$sessionStorage",Om),m.use({fragment:"fcFragment"}),e.install&&x.use(e),S((w,v)=>{v.mixin({props:["abFormInject"],emits:["fc.updateValue","fc.el"]})}),T(Tm),e.inherit){let w=e.inherit;w.components&&ee(t,w.components),w.parsers&&ee(r,w.parsers),w.directives&&ee(n,w.directives),w.modelFields&&ee(i,w.modelFields),w.providers&&ee(u,w.providers),w.useApps&&ee(a,w.useApps),w.maker&&ee(d,w.maker),w.loadData&&ee(p,w.loadData),w.formulas&&ee(g,w.formulas)}let K=k();return Lr(K,y),Object.defineProperties(K,{fetch:{get(){return y.fetch},set(w){y.fetch=w}}}),K.util=y,K}const{t:tt}=Ke(),{isZhCN:Pg}=Ce(),Ig=["rgba(1, 1, 1, 0)","#45b787","#21532fff","#6e9bc5","#2775b6","#F26666","#D95970","#ECD2B9","#BF9D8A","#ECDEC0","#D0AC57","#e0e0e0","#beb6b6","#918883","#F2F2F2","#ececec","#2E3032","#182327","rgba(0, 0, 0, 0.5)"],hl={hidden:{hidden:!0},datePicker:{props:{valueFormat:"x"}},timePicker:{props:{format:"HH:mm",valueFormat:"HH:mm"}},select:{props:{showKey:!0,showCode:!0}},treeSelect:{props:{defaultExpandAll:!0,expandOnClickNode:!1}},treeSelectMultiple:{props:{multiple:!0,type:"checked",showCheckbox:!0}},inputNumber:{align:"right"},inputCurrency:{align:"right",children:[{type:"span",slot:"prefix",children:[Pg()?"¥":"$"]}]},inputPercent:{align:"right",children:[{type:"span",slot:"suffix",children:["%"]}]},switch:{align:"center"},colorPicker:{props:{showAlpha:!0,predefine:Ig}},divider:{props:{contentPosition:"left"}}};function ml(e,t={}){const{type:r,disabledDate:n,shortcuts:i}=e||{};let o=hl[r||""];if(r==="datePicker"){if(n===!0&&(o=Mr({},o,{props:{disabledDate:jg}})),i===!0){const p=Je(e,"props.type")==="daterange";o=Mr({},o,{props:{shortcuts:p?Vg:Ng}})}}else r==="treeSelect"&&Je(e,"props.multiple")&&(o=Mr({},o,hl.treeSelectMultiple));if(!o)return e;const a=t.includeChildren!==!1,f=o,{children:s}=f,c=xr(f,["children"]),d=Mr({},a?o:c,e);return a&&s?ne(M({},d),{children:Bg(s,e.children)}):d}function Bg(e,t){if(t===void 0)return e;if(!Array.isArray(t))return t;const r=new Set(t.map(n=>n==null?void 0:n.slot).filter(Boolean));return[...e.filter(n=>!n.slot||!r.has(n.slot)),...t]}function jg(e){return e.getTime()>Date.now()}const Ng=[{text:tt("today"),value:()=>de().startOf("day").valueOf()},{text:tt("yesterday"),value:()=>de().subtract(1,"days").startOf("day").valueOf()},{text:tt("lastWeek"),value:()=>de().subtract(1,"weeks").startOf("week").valueOf()}],Vg=[{text:tt("today"),value:()=>[de().startOf("day").valueOf(),de().endOf("day").valueOf()]},{text:tt("yesterday"),value:()=>[de().subtract(1,"days").startOf("day").valueOf(),de().subtract(1,"days").endOf("day").valueOf()]},{text:tt("lastWeek"),value:()=>[de().subtract(1,"weeks").startOf("week").valueOf(),de().subtract(1,"weeks").endOf("week").valueOf()]},{text:tt("last7"),value:()=>[de().subtract(7,"days").startOf("day").valueOf(),de().endOf("day").valueOf()]},{text:tt("last30"),value:()=>[de().subtract(30,"days").startOf("day").valueOf(),de().endOf("day").valueOf()]},{text:tt("thisMonth"),value:()=>[de().startOf("month").valueOf(),de().endOf("day").valueOf()]},{text:tt("thisYear"),value:()=>[de().startOf("year").valueOf(),de().endOf("day").valueOf()]}];function gl(e,t=[]){var i;const r=[],n=new Map;for(const o of e){const a=typeof o.group=="string"?o.group?[o.group]:[]:(i=o.group)!=null?i:[];if(!Array.isArray(a)||a.some(d=>typeof d!="string"||!d.trim()))throw new TypeError("Table column group must be a non-empty name or an array of non-empty names.");if(!a.length){r.push(o);continue}let s=r;const c=[];let u;for(const d of a){c.push(d);const f=JSON.stringify(c);let h=n.get(f);h||(h={field:`__ab_table_group__${encodeURIComponent(JSON.stringify([t,c]))}`,title:d,children:[]},n.set(f,h),s.push(h)),u=h,s=h.children}u&&o.groupAlign!==void 0&&(u.groupAlign=o.groupAlign),s.push(o)}return r}function Lg(e,t){const r=e.sortData;if(!r)return e;const n=new Map,i=new Set;function o(d,f){var h;for(const p of d){const m=p.getKey();m&&(n.set(m,f),p.defaultVisible===!1&&i.add(m),(h=p.children)!=null&&h.length&&o(p.children,m))}}o(t,null);const a=new Set;function s(d,f){return d.some(h=>{if(!h||typeof h.k!="string"||h.c!==void 0&&!Array.isArray(h.c))return!0;const{k:p,c:m}=h;return a.has(p)||n.has(p)&&n.get(p)!==f?!0:(a.add(p),m?s(m,p):!1)})}if(!(Array.isArray(r)?s(r,null):typeof r!="object"||Object.keys(r).some(d=>n.has(d)&&n.get(d)!==null)))return e;const u=e.visibleData&&M({},e.visibleData);if(u)for(const d of i)u[d]===!0&&delete u[d];return ne(M({},e),{sortData:void 0,visibleData:u})}function Hg(e){const t=l.reactive(new Map),r=new WeakMap,n=new Set;function i(c){return typeof c.getRule=="function"?c.getRule():c}function o(c){let u=r.get(c);if(!u){const f={};u={rule:c,pending:f,getPending(h,p){return f[h]&&f[h].value||p},setPending(h,p,m){f[h]={origin:p,value:l.reactive(m)}}},r.set(c,u)}const d=Ja(u,c.options,{onLoad:f=>t.set(c,f),onUpdate:f=>t.set(c,f),onReload:()=>{t.set(c,[]),o(c)}});t.set(c,d)}function a(c,u){for(const d of c){const f=i(d);u.has(f)||(u.add(f),typeof f.options=="function"?o(f):t.delete(f),Array.isArray(f.children)&&a(f.children,u))}}l.watchEffect(()=>{const c=new Set;a(e(),c);for(const u of n)c.has(u)||(n.delete(u),t.delete(u));c.forEach(u=>n.add(u))});function s(c,u,d){const f=i(c),h=t.get(f),p=[...u,f.field?`field:${f.field}`:`index:${d}`],m=Array.isArray(f.children)?gl(f.children.map((b,S)=>s(b,p,S)),p):f.children,g=Array.isArray(m)&&m.some((b,S)=>b!==f.children[S]);let y=f;return(typeof f.options=="function"||g)&&(y=ne(M(M({},f),typeof f.options=="function"?{options:h}:{}),{children:m})),ml(y,{includeChildren:!1})}return l.computed(()=>gl(e().map((c,u)=>s(c,[],u))))}function yl(e,t){for(const r of e){if(r.field===t)return r;if(r.children){const n=yl(r.children,t);if(n)return n}}}function zg(e,t,r,n){var o;if(!r)return e;const i=(o=r.footerFormatter)!=null?o:Yn(r).formatter;return i?i({cellValue:e,row:t,column:n!=null?n:r}):e}function Ug(e,t,r,n,i){var h;if(typeof e.labelField!="string"||!e.labelField.trim()||!Array.isArray(e.fields))throw new TypeError("AbTable footerSummary requires a labelField and a fields array.");const o=new Set([e.labelField]),a=[],s=[],c=p=>{if(!p.trim()||o.has(p)||["__proto__","constructor","prototype"].includes(p))throw new TypeError(`AbTable footerSummary has an invalid or duplicate field: "${p}".`);o.add(p)};if(["__proto__","constructor","prototype"].includes(e.labelField))throw new TypeError("AbTable footerSummary has an invalid labelField.");for(const p of e.fields)if(typeof p=="string")c(p),a.push(p);else{if(!p||typeof p!="object"||Array.isArray(p)||!Object.keys(p).length)throw new TypeError("AbTable footerSummary fields must be field names or objects of callbacks.");for(const[m,g]of Object.entries(p)){if(c(m),typeof g!="function")throw new TypeError(`AbTable footerSummary handler for "${m}" must be a function.`);s.push([m,g])}}const u={};for(const p of a){let m=null;for(const g of t){const y=g[p];if(!(y==null||typeof y=="string"&&!y.trim())){if(typeof y!="number"&&typeof y!="string"||!Number.isFinite(Number(y)))throw new TypeError(`AbTable footerSummary field "${p}" must contain numbers or numeric strings.`);if(m=(m!=null?m:0)+Number(y),!Number.isFinite(m))throw new RangeError(`AbTable footerSummary total for "${p}" is not finite.`)}}u[p]=m}for(const[p,m]of s){const g=t.length?m({rows:t,totals:Object.freeze(M({},u))}):null;if(g!==null&&(typeof g!="number"||!Number.isFinite(g)))throw new TypeError(`AbTable footerSummary handler for "${p}" must return a finite number or null.`);u[p]=g}const d=M({[e.labelField]:(h=e.label)!=null?h:n},u),f=M({},d);for(const[p,m]of Object.entries(u))f[p]=m===null?"-":zg(m,d,yl(r,p),i(p));return f}const bl=l.defineComponent({name:"AbTable",__name:"ab-table",props:l.mergeModels({id:{},title:{},rule:{default:()=>[]},queryHandler:{},createHandler:{},updateHandler:{},deleteHandler:{},pagerClassName:{},pagerConfig:{},pagerEnable:{type:Boolean,default:!0},locale:{default:"zh-cn"},idField:{},idFieldTable:{},permiPrefix:{},compactMode:{type:Boolean},parentIdField:{},accordion:{type:Boolean},hasChildField:{},lazyMethod:{},isCurrent:{type:Boolean},dragable:{type:Boolean},absDragable:{type:Boolean},rowClassName:{},headerCellClassName:{},cellClassName:{},rowStyle:{},editable:{type:Boolean},singleSelect:{type:Boolean},multiSelect:{type:Boolean},validRules:{},sortable:{type:Boolean,default:!0},sortLocally:{type:Boolean},footerSummary:{},maxHeight:{},offsetTop:{},autoHeight:{type:Boolean},readonly:{type:Boolean,default:!0}},{query:{},queryModifiers:{}}),emits:l.mergeModels(["update:modelValue","changed","cellClick","current-change","after-loaded","operated"],["update:query"]),setup(e,{expose:t,emit:r}){var Ts;const n=r,i=e,{t:o}=Ke(),a=ut.useRoute(),s=l.ref(null),c=l.ref(),u=l.ref();l.inject("abToolbarRef",null);const d=l.ref([]),f=l.ref(i.id||String((Ts=l.getCurrentInstance())==null?void 0:Ts.uid)||a.path),h=Hg(()=>i.rule),p=l.computed(()=>{const J=[];return i.editable&&zo(i.rule||[],Q=>Q.field&&Q.edit?J.push(Q.field):void 0),J}),m=({column:J})=>{var Q;return typeof i.headerCellClassName=="function"?i.headerCellClassName({column:J}):(Q=p.value)!=null&&Q.includes(J.field)?"primary":null},g=l.computed(()=>!(!i.readonly||i.multiSelect||i.singleSelect)),{wsCache:y}=Ce(),b=l.computed(()=>y.getCurrentSize||"default"),S=l.computed(()=>$a(b.value)),$={useKey:!0,resizable:!0},L=l.reactive({useKey:!0,isHover:!0,isCurrent:i.isCurrent,drag:i.dragable}),R=i.compactMode?{padding:!1,height:30}:void 0,T=i.dragable?l.reactive({trigger:"row",showGuidesStatus:!0}):void 0,E=l.reactive({immediate:!0,storage:!0,restoreStore:({$table:J,storeData:Q})=>{const re=Lg(Q,J.getFullColumns());return re!==Q&&console.warn("[AbTable] Saved column order conflicts with current groups; the order and visibility overrides for hidden columns were ignored."),re}}),k=l.reactive({filename:`${i.title||(a==null?void 0:a.meta.title)}_${de().format("YYYYMMDD")}`,columns:Uo(vt(i.rule,J=>J.field!==fe.OPERATE),J=>({field:J.field}))}),V=(J,Q)=>ye(this,null,function*(){var ce;const re=u.value,xe=vt(i.rule,le=>(le==null?void 0:le.field)&&(le==null?void 0:le.field)!=="operate"&&!le.hidden),be=!!i.parentIdField&&((ce=w.value)==null?void 0:ce.expandAll);if(Q){const le=re==null?void 0:re.getCheckboxRecords();if(!(le==null?void 0:le.length))return;re==null||re.exportData({data:le,columns:xe,isAllExpand:be,filename:J})}else re==null||re.exportData({columns:xe,isAllExpand:be,filename:J})}),q=J=>{var Q,re;return(re=(Q=u.value)==null?void 0:Q.getColumnByField)==null?void 0:re.call(Q,J)},U=l.computed(()=>i.footerSummary?[Ug(i.footerSummary,d.value,h.value,o("table.total"),q)]:[]),x=l.useModel(e,"query"),_=l.ref(0),F=l.ref(1),A=l.ref(10),C=l.ref(""),B=l.ref(""),I=l.ref(""),W=l.computed(()=>{var J,Q,re,xe,be,ce,le,Re,Ue,qe;return{pageNo:(Q=(J=i.pagerConfig)==null?void 0:J.pageNoField)!=null?Q:"pageNo",pageSize:(xe=(re=i.pagerConfig)==null?void 0:re.pageSizeField)!=null?xe:"pageSize",sortFieldTable:(ce=(be=i.pagerConfig)==null?void 0:be.sortFieldTableField)!=null?ce:"sortFieldTable",sortField:(Re=(le=i.pagerConfig)==null?void 0:le.sortFieldField)!=null?Re:"sortField",sortType:(qe=(Ue=i.pagerConfig)==null?void 0:Ue.sortTypeField)!=null?qe:"sortType"}}),Z=l.computed(()=>{var J;return((J=i.pagerConfig)==null?void 0:J.layouts)||["Home","PrevJump","PrevPage","Number","NextPage","NextJump","End","Sizes","FullJump","Total"]});function X(){var Re,Ue,qe,mt,Ot,vr;const J=(Re=x.value)!=null?Re:{},Q=W.value,re=(Ue=J[Q.pageNo])!=null?Ue:1,xe=(qe=J[Q.pageSize])!=null?qe:10,be=(mt=J[Q.sortFieldTable])!=null?mt:"",ce=(Ot=J[Q.sortField])!=null?Ot:"",le=(vr=J[Q.sortType])!=null?vr:"";if(!Number.isInteger(re)||Number(re)<1||!Number.isInteger(xe)||Number(xe)<1)throw new TypeError("AbTable pageNo and pageSize must be positive integers.");if(typeof be!="string"||typeof ce!="string"||typeof le!="string")throw new TypeError("AbTable sort fields must be strings.");F.value=Number(re),A.value=Number(xe),C.value=be,B.value=ce,I.value=le}const P=re=>ye(this,[re],function*({currentPage:J,pageSize:Q}){F.value=J,A.value=Q,yield sn()}),H=l.reactive({trigger:"cell",remote:!i.sortLocally}),G=xe=>ye(this,[xe],function*({field:J,order:Q,column:re}){var be,ce,le,Re,Ue;if(!Q)C.value=(be=i.idFieldTable)!=null?be:"",B.value=i.idField||"id",I.value="desc";else{const qe=(Re=(le=(ce=re.params)==null?void 0:ce.sortFieldTable)!=null?le:i.idFieldTable)!=null?Re:"",mt=((Ue=re.params)==null?void 0:Ue.sortField)||J;if(typeof qe!="string"||typeof mt!="string")throw new TypeError("AbTable column sortFieldTable and sortField must be strings.");C.value=qe,B.value=mt.replace(/[A-Z]/g,Ot=>"_"+Ot.toLowerCase()),I.value=Q}yield Pi()}),ie=l.computed(()=>i.editable&&!g.value?{trigger:"click",mode:"row",showStatus:!0}:void 0),pe=l.ref(i.editable),K=l.computed(()=>!i.parentIdField),w=l.computed(()=>{if(!i.parentIdField)return;const J={transform:!0,accordion:i.accordion,rowField:i.idField||"id",parentField:i.parentIdField||"parentId",hasChildField:i.hasChildField||"hasChildren",expandAll:!0};return typeof i.lazyMethod=="function"&&(J.lazy=!0,J.loadMethod=i.lazyMethod),J}),v=i.singleSelect?{labelField:"name",trigger:"row"}:void 0,O=Pp(J=>n("current-change",{newValue:J}),100),N=({row:J,column:Q})=>{if((Q==null?void 0:Q.field)===fe.OPERATE)return;const re=u.value;(!i.editable||g.value)&&(re==null||re.clearCheckboxRow()),re==null||re.setCheckboxRow(J,!0),n("cellClick",{row:J,column:Q})},z=()=>{var Q;const J=(Q=u.value)==null?void 0:Q.getRadioRecord();O(J)},ae=l.computed(()=>i.multiSelect||typeof i.multiSelect=="undefined"&&i.editable);L.isCurrent=ae.value||i.singleSelect||i.absDragable||i.isCurrent;const oe=l.reactive({highlight:i.multiSelect&&i.editable,range:!i.parentIdField}),me=()=>{var Q;const J=(Q=u.value)==null?void 0:Q.getCheckboxRecords();O(J)},Ae=({newValue:J,column:Q})=>{(Q==null?void 0:Q.field)!==fe.OPERATE&&O(J)};let Te=l.ref(i.maxHeight||0);const De={mini:36,small:40,medium:44,large:48};let we=De[S.value||"medium"]||De.medium;const Be=l.ref([10,15,20,50,100]),He=()=>{var Ue,qe,mt,Ot,vr,Es,ks,_s,Fs;if(!i.autoHeight){i.maxHeight&&(Te.value=i.maxHeight);return}(qe=(Ue=u.value)==null?void 0:Ue.cellConfig)!=null&&qe.height&&(we=u.value.cellConfig.height);const J=(mt=s.value)==null?void 0:mt.parentElement,Q=((vr=(Ot=J==null?void 0:J.querySelector(".ab-toolbar"))==null?void 0:Ot.getBoundingClientRect())==null?void 0:vr.height)||0,re=(Ta(i.rule)||0)*we,xe=((_s=(ks=(Es=c.value)==null?void 0:Es.$el)==null?void 0:ks.getBoundingClientRect())==null?void 0:_s.height)||0,be=(((Fs=J==null?void 0:J.getBoundingClientRect())==null?void 0:Fs.height)||500)-Q-xe;if(i.offsetTop){const Ii=window.innerHeight-(i.offsetTop||0);Te.value=Math.max(be,Ii)}else Te.value=be;if(Te.value<=0)return;const ce=Te.value-re-(i.pagerEnable?we*1.5:0);let le=Math.min(Math.max(Math.round(ce/we),10),100);i.footerSummary&&(le-=1);const Re=[...Be.value];Re.includes(le)||(Re.push(le),Re.sort((Ii,Kw)=>Ii-Kw)),Be.value=Re,A.value=le,console.warn("calculateTableHeight: ",Ta(i.rule))},At=l.ref(!1);let ze=0;function sn(){return ye(this,null,function*(){var Q,re;if(!i.queryHandler)return;const J=++ze;At.value=!0;try{const xe=W.value,be=ne(M({},x.value),{[xe.pageNo]:F.value,[xe.pageSize]:A.value,[xe.sortFieldTable]:C.value,[xe.sortField]:B.value,[xe.sortType]:I.value}),ce=yield i.queryHandler(be),le=Array.isArray(ce)?ce:(Q=ce==null?void 0:ce.data)!=null?Q:ce==null?void 0:ce.list;if(!Array.isArray(le))throw new TypeError("AbTable queryHandler must return an array or an object containing a data or list array.");if(J!==ze)return;d.value=le,_.value=Array.isArray(ce)?ce.length:(re=ce.total)!=null?re:le.length}finally{J===ze&&(At.value=!1)}})}l.onMounted(()=>ye(this,null,function*(){X(),He(),yield sn()}));function Jw(){return ye(this,null,function*(){F.value=1,yield sn()})}function Pi(){return ye(this,null,function*(){yield sn()})}return t({reload:Jw,refresh:Pi,resize:()=>He(),tableRef:u,exportData:V}),(J,Q)=>{const re=l.resolveComponent("vxe-table"),xe=l.resolveComponent("vxe-pager");return l.openBlock(),l.createElementBlock("div",{ref_key:"containerRef",ref:s,class:"ab-table"},[l.createVNode(re,{ref_key:"tableRef",ref:u,id:f.value,data:d.value,stripe:K.value,loading:At.value,"column-config":$,"row-config":L,"row-drag-config":l.unref(T),"cell-config":l.unref(R),"custom-config":E,"tree-config":w.value,"row-class-name":e.rowClassName,"header-cell-class-name":m,"cell-class-name":e.cellClassName,"row-style":e.rowStyle,border:"inner",size:S.value,"max-height":l.unref(Te),"edit-config":ie.value,"edit-rules":e.editable?e.validRules:void 0,"keep-source":pe.value,"show-overflow":"","show-header-overflow":"","show-footer-overflow":"","auto-resize":"","show-footer":!!e.footerSummary,"footer-data":U.value,"sort-config":H,onSortChange:G,"radio-config":l.unref(v),onRadioChange:z,"checkbox-config":oe,onCheckboxChange:me,onCheckboxAll:me,onCurrentChange:Ae,"export-config":k,onCellClick:N},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(h),(be,ce)=>(l.openBlock(),l.createBlock(Nh,{key:be.field||ce,rule:be,idx:ce,"id-field":e.idField,"id-field-table":e.idFieldTable,"permi-prefix":e.permiPrefix,sortable:e.sortable,"delete-handler":e.deleteHandler,readonly:e.readonly,onRefresh:Pi},null,8,["rule","idx","id-field","id-field-table","permi-prefix","sortable","delete-handler","readonly"]))),128))]),_:1},8,["id","data","stripe","loading","row-config","row-drag-config","cell-config","custom-config","tree-config","row-class-name","cell-class-name","row-style","size","max-height","edit-config","edit-rules","keep-source","show-footer","footer-data","sort-config","radio-config","checkbox-config","export-config"]),e.pagerEnable?(l.openBlock(),l.createBlock(xe,{key:0,ref_key:"pagerRef",ref:c,"class-name":e.pagerClassName,"page-sizes":Be.value,"current-page":F.value,"onUpdate:currentPage":Q[0]||(Q[0]=be=>F.value=be),"page-size":A.value,"onUpdate:pageSize":Q[1]||(Q[1]=be=>A.value=be),total:_.value,size:S.value,layouts:Z.value,onPageChange:P},null,8,["class-name","page-sizes","current-page","page-size","total","size","layouts"])):l.createCommentVNode("",!0)],512)}}});/**
|
|
12
|
-
* (c) Iconify
|
|
13
|
-
*
|
|
14
|
-
* For the full copyright and license information, please view the license.txt or license.gpl.txt
|
|
15
|
-
* files at https://github.com/iconify/iconify
|
|
16
|
-
*
|
|
17
|
-
* Licensed under MIT.
|
|
18
|
-
*
|
|
19
|
-
* @license MIT
|
|
20
|
-
* @version 3.1.1
|
|
21
|
-
*/const wl=Object.freeze({left:0,top:0,width:16,height:16}),Yr=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),dr=Object.freeze(M(M({},wl),Yr)),ci=Object.freeze(ne(M({},dr),{body:"",hidden:!1}));function qg(e,t){const r={};!e.hFlip!=!t.hFlip&&(r.hFlip=!0),!e.vFlip!=!t.vFlip&&(r.vFlip=!0);const n=((e.rotate||0)+(t.rotate||0))%4;return n&&(r.rotate=n),r}function vl(e,t){const r=qg(e,t);for(const n in ci)n in Yr?n in e&&!(n in r)&&(r[n]=Yr[n]):n in t?r[n]=t[n]:n in e&&(r[n]=e[n]);return r}function Yg(e,t){const r=e.icons,n=e.aliases||Object.create(null),i=Object.create(null);function o(a){if(r[a])return i[a]=[];if(!(a in i)){i[a]=null;const s=n[a]&&n[a].parent,c=s&&o(s);c&&(i[a]=[s].concat(c))}return i[a]}return Object.keys(r).concat(Object.keys(n)).forEach(o),i}function Gg(e,t,r){const n=e.icons,i=e.aliases||Object.create(null);let o={};function a(s){o=vl(n[s]||i[s],o)}return a(t),r.forEach(a),vl(e,o)}function Wg(e,t){const r=[];if(typeof e!="object"||typeof e.icons!="object")return r;e.not_found instanceof Array&&e.not_found.forEach(i=>{t(i,null),r.push(i)});const n=Yg(e);for(const i in n){const o=n[i];o&&(t(i,Gg(e,i,o)),r.push(i))}return r}const fr=/^[a-z0-9]+(-[a-z0-9]+)*$/,zt=(e,t,r,n="")=>{const i=e.split(":");if(e.slice(0,1)==="@"){if(i.length<2||i.length>3)return null;n=i.shift().slice(1)}if(i.length>3||!i.length)return null;if(i.length>1){const s=i.pop(),c=i.pop(),u={provider:i.length>0?i[0]:n,prefix:c,name:s};return t&&!Gr(u)?null:u}const o=i[0],a=o.split("-");if(a.length>1){const s={provider:n,prefix:a.shift(),name:a.join("-")};return t&&!Gr(s)?null:s}if(r&&n===""){const s={provider:n,prefix:"",name:o};return t&&!Gr(s,r)?null:s}return null},Gr=(e,t)=>e?!!((e.provider===""||e.provider.match(fr))&&(t&&e.prefix===""||e.prefix.match(fr))&&e.name.match(fr)):!1,Jg=M({provider:"",aliases:{},not_found:{}},wl);function ui(e,t){for(const r in t)if(r in e&&typeof e[r]!=typeof t[r])return!1;return!0}function Kg(e){if(typeof e!="object"||e===null)return null;const t=e;if(typeof t.prefix!="string"||!e.icons||typeof e.icons!="object"||!ui(e,Jg))return null;const r=t.icons;for(const i in r){const o=r[i];if(!i.match(fr)||typeof o.body!="string"||!ui(o,ci))return null}const n=t.aliases||Object.create(null);for(const i in n){const o=n[i],a=o.parent;if(!i.match(fr)||typeof a!="string"||!r[a]&&!n[a]||!ui(o,ci))return null}return t}const Wr=Object.create(null);function Qg(e,t){return{provider:e,prefix:t,icons:Object.create(null),missing:new Set}}function rt(e,t){const r=Wr[e]||(Wr[e]=Object.create(null));return r[t]||(r[t]=Qg(e,t))}function di(e,t){return Kg(t)?Wg(t,(r,n)=>{n?e.icons[r]=n:e.missing.add(r)}):[]}function Zg(e,t,r){try{if(typeof r.body=="string")return e.icons[t]=M({},r),!0}catch(n){}return!1}function Xg(e,t){let r=[];return(typeof e=="string"?[e]:Object.keys(Wr)).forEach(i=>{(typeof i=="string"&&typeof t=="string"?[t]:Object.keys(Wr[i]||{})).forEach(a=>{const s=rt(i,a);r=r.concat(Object.keys(s.icons).map(c=>(i!==""?"@"+i+":":"")+a+":"+c))})}),r}let fi=!1;function ey(e){return fi}function pr(e){const t=typeof e=="string"?zt(e,!0,fi):e;if(t){const r=rt(t.provider,t.prefix),n=t.name;return r.icons[n]||(r.missing.has(n)?null:void 0)}}function ty(e,t){const r=zt(e,!0,fi);if(!r)return!1;const n=rt(r.provider,r.prefix);return Zg(n,r.name,t)}function xl(e,t){if(typeof e!="object")return!1;typeof t!="string"&&(t=e.provider||"");const r=e.prefix;if(!Gr({provider:t,prefix:r,name:"a"}))return!1;const n=rt(t,r);return!!di(n,e)}function ry(e){return!!pr(e)}function ny(e){const t=pr(e);return t?M(M({},dr),t):null}const Sl=Object.freeze({width:null,height:null}),Cl=Object.freeze(M(M({},Sl),Yr)),iy=/(-?[0-9.]*[0-9]+[0-9.]*)/g,oy=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function pi(e,t,r){if(t===1)return e;if(r=r||100,typeof e=="number")return Math.ceil(e*t*r)/r;if(typeof e!="string")return e;const n=e.split(iy);if(n===null||!n.length)return e;const i=[];let o=n.shift(),a=oy.test(o);for(;;){if(a){const s=parseFloat(o);isNaN(s)?i.push(o):i.push(Math.ceil(s*t*r)/r)}else i.push(o);if(o=n.shift(),o===void 0)return i.join("");a=!a}}const ay=e=>e==="unset"||e==="undefined"||e==="none";function Jr(e,t){const r=M(M({},dr),e),n=M(M({},Cl),t),i={left:r.left,top:r.top,width:r.width,height:r.height};let o=r.body;[r,n].forEach(m=>{const g=[],y=m.hFlip,b=m.vFlip;let S=m.rotate;y?b?S+=2:(g.push("translate("+(i.width+i.left).toString()+" "+(0-i.top).toString()+")"),g.push("scale(-1 1)"),i.top=i.left=0):b&&(g.push("translate("+(0-i.left).toString()+" "+(i.height+i.top).toString()+")"),g.push("scale(1 -1)"),i.top=i.left=0);let $;switch(S<0&&(S-=Math.floor(S/4)*4),S=S%4,S){case 1:$=i.height/2+i.top,g.unshift("rotate(90 "+$.toString()+" "+$.toString()+")");break;case 2:g.unshift("rotate(180 "+(i.width/2+i.left).toString()+" "+(i.height/2+i.top).toString()+")");break;case 3:$=i.width/2+i.left,g.unshift("rotate(-90 "+$.toString()+" "+$.toString()+")");break}S%2===1&&(i.left!==i.top&&($=i.left,i.left=i.top,i.top=$),i.width!==i.height&&($=i.width,i.width=i.height,i.height=$)),g.length&&(o='<g transform="'+g.join(" ")+'">'+o+"</g>")});const a=n.width,s=n.height,c=i.width,u=i.height;let d,f;a===null?(f=s===null?"1em":s==="auto"?u:s,d=pi(f,c/u)):(d=a==="auto"?c:a,f=s===null?pi(d,u/c):s==="auto"?u:s);const h={},p=(m,g)=>{ay(g)||(h[m]=g.toString())};return p("width",d),p("height",f),h.viewBox=i.left.toString()+" "+i.top.toString()+" "+c.toString()+" "+u.toString(),{attributes:h,body:o}}const ly=/\sid="(\S+)"/g,sy="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let cy=0;function $l(e,t=sy){const r=[];let n;for(;n=ly.exec(e);)r.push(n[1]);if(!r.length)return e;const i="suffix"+(Math.random()*16777216|Date.now()).toString(16);return r.forEach(o=>{const a=typeof t=="function"?t(o):t+(cy++).toString(),s=o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+s+')([")]|\\.[a-z])',"g"),"$1"+a+i+"$3")}),e=e.replace(new RegExp(i,"g"),""),e}const kt={local:!0,session:!0},Tl={local:new Set,session:new Set};let hi=!1;function uy(e){hi=e}const El="iconify2",hr="iconify",kl=hr+"-count",_l=hr+"-version",Fl=36e5,dy=168;function mi(e,t){try{return e.getItem(t)}catch(r){}}function gi(e,t,r){try{return e.setItem(t,r),!0}catch(n){}}function Al(e,t){try{e.removeItem(t)}catch(r){}}function yi(e,t){return gi(e,kl,t.toString())}function bi(e){return parseInt(mi(e,kl))||0}let Kr=typeof window=="undefined"?{}:window;function Ol(e){const t=e+"Storage";try{if(Kr&&Kr[t]&&typeof Kr[t].length=="number")return Kr[t]}catch(r){}kt[e]=!1}function Rl(e,t){const r=Ol(e);if(!r)return;const n=mi(r,_l);if(n!==El){if(n){const s=bi(r);for(let c=0;c<s;c++)Al(r,hr+c.toString())}gi(r,_l,El),yi(r,0);return}const i=Math.floor(Date.now()/Fl)-dy,o=s=>{const c=hr+s.toString(),u=mi(r,c);if(typeof u=="string"){try{const d=JSON.parse(u);if(typeof d=="object"&&typeof d.cached=="number"&&d.cached>i&&typeof d.provider=="string"&&typeof d.data=="object"&&typeof d.data.prefix=="string"&&t(d,s))return!0}catch(d){}Al(r,c)}};let a=bi(r);for(let s=a-1;s>=0;s--)o(s)||(s===a-1?(a--,yi(r,a)):Tl[e].add(s))}function Ml(){if(!hi){uy(!0);for(const e in kt)Rl(e,t=>{const r=t.data,n=t.provider,i=r.prefix,o=rt(n,i);if(!di(o,r).length)return!1;const a=r.lastModified||-1;return o.lastModifiedCached=o.lastModifiedCached?Math.min(o.lastModifiedCached,a):a,!0})}}function Dl(e,t){switch(e){case"local":case"session":kt[e]=t;break;case"all":for(const r in kt)kt[r]=t;break}}const wi=Object.create(null);function Pl(e,t){wi[e]=t}function vi(e){return wi[e]||wi[""]}function xi(e){let t;if(typeof e.resources=="string")t=[e.resources];else if(t=e.resources,!(t instanceof Array)||!t.length)return null;return{resources:t,path:e.path||"/",maxURL:e.maxURL||500,rotate:e.rotate||750,timeout:e.timeout||5e3,random:e.random===!0,index:e.index||0,dataAfterTimeout:e.dataAfterTimeout!==!1}}const Qr=Object.create(null),mr=["https://api.simplesvg.com","https://api.unisvg.com"],Zr=[];for(;mr.length>0;)mr.length===1||Math.random()>.5?Zr.push(mr.shift()):Zr.push(mr.pop());Qr[""]=xi({resources:["https://api.iconify.design"].concat(Zr)});function Il(e,t){const r=xi(t);return r===null?!1:(Qr[e]=r,!0)}function Xr(e){return Qr[e]}function fy(){return Object.keys(Qr)}let en=(()=>{let e;try{if(e=fetch,typeof e=="function")return e}catch(t){}})();function py(e){en=e}function hy(){return en}function my(e,t){const r=Xr(e);if(!r)return 0;let n;if(!r.maxURL)n=0;else{let i=0;r.resources.forEach(a=>{i=Math.max(i,a.length)});const o=t+".json?icons=";n=r.maxURL-i-r.path.length-o.length}return n}function gy(e){return e===404}const yy=(e,t,r)=>{const n=[],i=my(e,t),o="icons";let a={type:o,provider:e,prefix:t,icons:[]},s=0;return r.forEach((c,u)=>{s+=c.length+1,s>=i&&u>0&&(n.push(a),a={type:o,provider:e,prefix:t,icons:[]},s=c.length),a.icons.push(c)}),n.push(a),n};function by(e){if(typeof e=="string"){const t=Xr(e);if(t)return t.path}return"/"}const wy={prepare:yy,send:(e,t,r)=>{if(!en){r("abort",424);return}let n=by(t.provider);switch(t.type){case"icons":{const o=t.prefix,s=t.icons.join(","),c=new URLSearchParams({icons:s});n+=o+".json?"+c.toString();break}case"custom":{const o=t.uri;n+=o.slice(0,1)==="/"?o.slice(1):o;break}default:r("abort",400);return}let i=503;en(e+n).then(o=>{const a=o.status;if(a!==200){setTimeout(()=>{r(gy(a)?"abort":"next",a)});return}return i=501,o.json()}).then(o=>{if(typeof o!="object"||o===null){setTimeout(()=>{o===404?r("abort",o):r("next",i)});return}setTimeout(()=>{r("success",o)})}).catch(()=>{r("next",i)})}};function vy(e){const t={loaded:[],missing:[],pending:[]},r=Object.create(null);e.sort((i,o)=>i.provider!==o.provider?i.provider.localeCompare(o.provider):i.prefix!==o.prefix?i.prefix.localeCompare(o.prefix):i.name.localeCompare(o.name));let n={provider:"",prefix:"",name:""};return e.forEach(i=>{if(n.name===i.name&&n.prefix===i.prefix&&n.provider===i.provider)return;n=i;const o=i.provider,a=i.prefix,s=i.name,c=r[o]||(r[o]=Object.create(null)),u=c[a]||(c[a]=rt(o,a));let d;s in u.icons?d=t.loaded:a===""||u.missing.has(s)?d=t.missing:d=t.pending;const f={provider:o,prefix:a,name:s};d.push(f)}),t}function Bl(e,t){e.forEach(r=>{const n=r.loaderCallbacks;n&&(r.loaderCallbacks=n.filter(i=>i.id!==t))})}function xy(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout(()=>{e.pendingCallbacksFlag=!1;const t=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!t.length)return;let r=!1;const n=e.provider,i=e.prefix;t.forEach(o=>{const a=o.icons,s=a.pending.length;a.pending=a.pending.filter(c=>{if(c.prefix!==i)return!0;const u=c.name;if(e.icons[u])a.loaded.push({provider:n,prefix:i,name:u});else if(e.missing.has(u))a.missing.push({provider:n,prefix:i,name:u});else return r=!0,!0;return!1}),a.pending.length!==s&&(r||Bl([e],o.id),o.callback(a.loaded.slice(0),a.missing.slice(0),a.pending.slice(0),o.abort))})}))}let Sy=0;function Cy(e,t,r){const n=Sy++,i=Bl.bind(null,r,n);if(!t.pending.length)return i;const o={id:n,icons:t,callback:e,abort:i};return r.forEach(a=>{(a.loaderCallbacks||(a.loaderCallbacks=[])).push(o)}),i}function $y(e,t=!0,r=!1){const n=[];return e.forEach(i=>{const o=typeof i=="string"?zt(i,t,r):i;o&&n.push(o)}),n}var Ty={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function Ey(e,t,r,n){const i=e.resources.length,o=e.random?Math.floor(Math.random()*i):e.index;let a;if(e.random){let T=e.resources.slice(0);for(a=[];T.length>1;){const E=Math.floor(Math.random()*T.length);a.push(T[E]),T=T.slice(0,E).concat(T.slice(E+1))}a=a.concat(T)}else a=e.resources.slice(o).concat(e.resources.slice(0,o));const s=Date.now();let c="pending",u=0,d,f=null,h=[],p=[];typeof n=="function"&&p.push(n);function m(){f&&(clearTimeout(f),f=null)}function g(){c==="pending"&&(c="aborted"),m(),h.forEach(T=>{T.status==="pending"&&(T.status="aborted")}),h=[]}function y(T,E){E&&(p=[]),typeof T=="function"&&p.push(T)}function b(){return{startTime:s,payload:t,status:c,queriesSent:u,queriesPending:h.length,subscribe:y,abort:g}}function S(){c="failed",p.forEach(T=>{T(void 0,d)})}function $(){h.forEach(T=>{T.status==="pending"&&(T.status="aborted")}),h=[]}function L(T,E,k){const V=E!=="success";switch(h=h.filter(q=>q!==T),c){case"pending":break;case"failed":if(V||!e.dataAfterTimeout)return;break;default:return}if(E==="abort"){d=k,S();return}if(V){d=k,h.length||(a.length?R():S());return}if(m(),$(),!e.random){const q=e.resources.indexOf(T.resource);q!==-1&&q!==e.index&&(e.index=q)}c="completed",p.forEach(q=>{q(k)})}function R(){if(c!=="pending")return;m();const T=a.shift();if(T===void 0){if(h.length){f=setTimeout(()=>{m(),c==="pending"&&($(),S())},e.timeout);return}S();return}const E={status:"pending",resource:T,callback:(k,V)=>{L(E,k,V)}};h.push(E),u++,f=setTimeout(R,e.rotate),r(T,t,E.callback)}return setTimeout(R),b}function jl(e){const t=M(M({},Ty),e);let r=[];function n(){r=r.filter(s=>s().status==="pending")}function i(s,c,u){const d=Ey(t,s,c,(f,h)=>{n(),u&&u(f,h)});return r.push(d),d}function o(s){return r.find(c=>s(c))||null}return{query:i,find:o,setIndex:s=>{t.index=s},getIndex:()=>t.index,cleanup:n}}function Nl(){}const Si=Object.create(null);function ky(e){if(!Si[e]){const t=Xr(e);if(!t)return;const r=jl(t),n={config:t,redundancy:r};Si[e]=n}return Si[e]}function Vl(e,t,r){let n,i;if(typeof e=="string"){const o=vi(e);if(!o)return r(void 0,424),Nl;i=o.send;const a=ky(e);a&&(n=a.redundancy)}else{const o=xi(e);if(o){n=jl(o);const a=e.resources?e.resources[0]:"",s=vi(a);s&&(i=s.send)}}return!n||!i?(r(void 0,424),Nl):n.query(t,i,r)().abort}function _y(e,t){const r=e.lastModifiedCached;if(r&&r>=t)return r===t;if(e.lastModifiedCached=t,r)for(const n in kt)Rl(n,i=>{const o=i.data;return i.provider!==e.provider||o.prefix!==e.prefix||o.lastModified===t});return!0}function Fy(e,t){hi||Ml();function r(n){let i;if(!kt[n]||!(i=Ol(n)))return;const o=Tl[n];let a;if(o.size)o.delete(a=Array.from(o).shift());else if(a=bi(i),!yi(i,a+1))return;const s={cached:Math.floor(Date.now()/Fl),provider:e.provider,data:t};return gi(i,hr+a.toString(),JSON.stringify(s))}t.lastModified&&!_y(e,t.lastModified)||Object.keys(t.icons).length&&(t.not_found&&(t=Object.assign({},t),delete t.not_found),r("local")||r("session"))}function Ll(){}function Ay(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,xy(e)}))}function Oy(e,t){e.iconsToLoad?e.iconsToLoad=e.iconsToLoad.concat(t).sort():e.iconsToLoad=t,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout(()=>{e.iconsQueueFlag=!1;const{provider:r,prefix:n}=e,i=e.iconsToLoad;delete e.iconsToLoad;let o;if(!i||!(o=vi(r)))return;o.prepare(r,n,i).forEach(s=>{Vl(r,s,c=>{if(typeof c!="object")s.icons.forEach(u=>{e.missing.add(u)});else try{const u=di(e,c);if(!u.length)return;const d=e.pendingIcons;d&&u.forEach(f=>{d.delete(f)}),Fy(e,c)}catch(u){console.error(u)}Ay(e)})})}))}const Ry=e=>{const r=rt(e.provider,e.prefix).pendingIcons;return!!(r&&r.has(e.name))},Ci=(e,t)=>{const r=$y(e,!0,ey()),n=vy(r);if(!n.pending.length){let c=!0;return t&&setTimeout(()=>{c&&t(n.loaded,n.missing,n.pending,Ll)}),()=>{c=!1}}const i=Object.create(null),o=[];let a,s;return n.pending.forEach(c=>{const{provider:u,prefix:d}=c;if(d===s&&u===a)return;a=u,s=d,o.push(rt(u,d));const f=i[u]||(i[u]=Object.create(null));f[d]||(f[d]=[])}),n.pending.forEach(c=>{const{provider:u,prefix:d,name:f}=c,h=rt(u,d),p=h.pendingIcons||(h.pendingIcons=new Set);p.has(f)||(p.add(f),i[u][d].push(f))}),o.forEach(c=>{const{provider:u,prefix:d}=c;i[u][d].length&&Oy(c,i[u][d])}),t?Cy(t,n,o):Ll},My=e=>new Promise((t,r)=>{const n=typeof e=="string"?zt(e,!0):e;if(!n){r(e);return}Ci([n||e],i=>{if(i.length&&n){const o=pr(n);if(o){t(M(M({},dr),o));return}}r(e)})});function Hl(e,t){const r=M({},e);for(const n in t){const i=t[n],o=typeof i;n in Sl?(i===null||i&&(o==="string"||o==="number"))&&(r[n]=i):o===typeof r[n]&&(r[n]=n==="rotate"?i%4:i)}return r}const tn=ne(M({},Cl),{inline:!1}),$i="iconify",Ti="iconify-inline",ht="iconifyData"+Date.now();let _t=[];function gr(e){for(let t=0;t<_t.length;t++){const r=_t[t];if((typeof r.node=="function"?r.node():r.node)===e)return r}}function zl(e,t=!1){let r=gr(e);return r?(r.temporary&&(r.temporary=t),r):(r={node:e,temporary:t},_t.push(r),r)}function Dy(){if(document.documentElement)return zl(document.documentElement);_t.push({node:()=>document.documentElement})}function Py(e){_t=_t.filter(t=>e!==t&&e!==(typeof t.node=="function"?t.node():t.node))}function yr(){return _t}function Iy(e){const t=document;t.readyState&&t.readyState!=="loading"?e():t.addEventListener("DOMContentLoaded",e)}let br=null;const By={childList:!0,subtree:!0,attributes:!0};function Ul(e){if(!e.observer)return;const t=e.observer;t.pendingScan||(t.pendingScan=setTimeout(()=>{delete t.pendingScan,br&&br(e)}))}function jy(e,t){if(!e.observer)return;const r=e.observer;if(!r.pendingScan)for(let n=0;n<t.length;n++){const i=t[n];if(i.addedNodes&&i.addedNodes.length>0||i.type==="attributes"&&i.target[ht]!==void 0){r.paused||Ul(e);return}}}function ql(e,t){e.observer.instance.observe(t,By)}function rn(e){let t=e.observer;if(t&&t.instance)return;const r=typeof e.node=="function"?e.node():e.node;!r||!window||(t||(t={paused:0},e.observer=t),t.instance=new window.MutationObserver(jy.bind(null,e)),ql(e,r),t.paused||Ul(e))}function Yl(){yr().forEach(rn)}function Gl(e){if(!e.observer)return;const t=e.observer;t.pendingScan&&(clearTimeout(t.pendingScan),delete t.pendingScan),t.instance&&(t.instance.disconnect(),delete t.instance)}function Ny(e){const t=br!==null;if(br!==e&&(br=e,t&&yr().forEach(Gl)),t){Yl();return}Iy(Yl)}function Ei(e){(e?[e]:yr()).forEach(t=>{if(!t.observer){t.observer={paused:1};return}const r=t.observer;if(r.paused++,r.paused>1||!r.instance)return;r.instance.disconnect()})}function Vy(e){if(e){const t=gr(e);t&&Ei(t)}else Ei()}function ki(e){(e?[e]:yr()).forEach(t=>{if(!t.observer){rn(t);return}const r=t.observer;if(r.paused&&(r.paused--,!r.paused)){const n=typeof t.node=="function"?t.node():t.node;if(n)r.instance?ql(t,n):rn(t);else return}})}function Ly(e){if(e){const t=gr(e);t&&ki(t)}else ki()}function Wl(e,t=!1){const r=zl(e,t);return rn(r),r}function Jl(e){const t=gr(e);t&&(Gl(t),Py(e))}function Hy(e,t){if(e.name!==t.name||e.mode!==t.mode)return!0;const r=e.customisations,n=t.customisations;for(const i in tn)if(r[i]!==n[i])return!0;return!1}function zy(e,t=0){const r=e.replace(/^-?[0-9.]*/,"");function n(i){for(;i<0;)i+=4;return i%4}if(r===""){const i=parseInt(e);return isNaN(i)?0:n(i)}else if(r!==e){let i=0;switch(r){case"%":i=25;break;case"deg":i=90}if(i){let o=parseFloat(e.slice(0,e.length-r.length));return isNaN(o)?0:(o=o/i,o%1===0?n(o):0)}}return t}const Uy=/[\s,]+/;function qy(e,t){t.split(Uy).forEach(r=>{switch(r.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}const Yy=["width","height"],Gy=["inline","hFlip","vFlip"];function Wy(e,t){return e===t||e==="true"?!0:e===""||e==="false"?!1:null}function Jy(e){const t=e.getAttribute("data-icon"),r=typeof t=="string"&&zt(t,!0);if(!r)return null;const n=ne(M({},tn),{inline:e.classList&&e.classList.contains(Ti)});Yy.forEach(s=>{const c=e.getAttribute("data-"+s);c&&(n[s]=c)});const i=e.getAttribute("data-rotate");typeof i=="string"&&(n.rotate=zy(i));const o=e.getAttribute("data-flip");typeof o=="string"&&qy(n,o),Gy.forEach(s=>{const c="data-"+s,u=Wy(e.getAttribute(c),c);typeof u=="boolean"&&(n[s]=u)});const a=e.getAttribute("data-mode");return{name:t,icon:r,customisations:n,mode:a}}const Ky="svg."+$i+", i."+$i+", span."+$i+", i."+Ti+", span."+Ti;function Qy(e){const t=[];return e.querySelectorAll(Ky).forEach(r=>{const n=r[ht]||r.tagName.toLowerCase()!=="svg"?Jy(r):null;n&&t.push({node:r,props:n})}),t}function Kl(e,t){let r=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const n in t)r+=" "+n+'="'+t[n]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+r+">"+e+"</svg>"}let wr;function Zy(){try{wr=window.trustedTypes.createPolicy("iconify",{createHTML:e=>e})}catch(e){wr=null}}function Xy(e){return wr===void 0&&Zy(),wr?wr.createHTML(e):e}function Ql(e){const t=new Set(["iconify"]);return["provider","prefix"].forEach(r=>{e[r]&&t.add("iconify--"+e[r])}),t}function Zl(e,t,r,n){const i=e.classList;if(n){const a=n.classList;Array.from(a).forEach(s=>{i.add(s)})}const o=[];return t.forEach(a=>{i.contains(a)?r.has(a)&&o.push(a):(i.add(a),o.push(a))}),r.forEach(a=>{t.has(a)||i.remove(a)}),o}function Xl(e,t,r){const n=e.style;(r||[]).forEach(o=>{n.removeProperty(o)});const i=[];for(const o in t)n.getPropertyValue(o)||(i.push(o),n.setProperty(o,t[o]));return i}function es(e,t,r){let n;try{n=document.createElement("span")}catch(m){return e}const i=t.customisations,o=Jr(r,i),a=e[ht],s=Kl($l(o.body),M({"aria-hidden":"true",role:"img"},o.attributes));n.innerHTML=Xy(s);const c=n.childNodes[0],u=e.attributes;for(let m=0;m<u.length;m++){const g=u.item(m),y=g.name;y!=="class"&&!c.hasAttribute(y)&&c.setAttribute(y,g.value)}const d=Ql(t.icon),f=Zl(c,d,new Set(a&&a.addedClasses),e),h=Xl(c,i.inline?{"vertical-align":"-0.125em"}:{},a&&a.addedStyles),p=ne(M({},t),{status:"loaded",addedClasses:f,addedStyles:h});return c[ht]=p,e.parentNode&&e.parentNode.replaceChild(c,e),c}function eb(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function tb(e){return"data:image/svg+xml,"+eb(e)}function rb(e){return'url("'+tb(e)+'")'}const nb={display:"inline-block"},_i={"background-color":"currentColor"},ts={"background-color":"transparent"},rs={image:"var(--svg)",repeat:"no-repeat",size:"100% 100%"},ns={"-webkit-mask":_i,mask:_i,background:ts};for(const e in ns){const t=ns[e];for(const r in rs)t[e+"-"+r]=rs[r]}function is(e){return e+(e.match(/^[-0-9.]+$/)?"px":"")}function ib(e,t,r,n){const i=t.customisations,o=Jr(r,i),a=o.attributes,s=e[ht],c=Kl(o.body,ne(M({},a),{width:r.width+"",height:r.height+""})),u=Ql(t.icon),d=Zl(e,u,new Set(s&&s.addedClasses)),f=rb(c),h=M(M({"--svg":f,width:is(a.width),height:is(a.height)},nb),n?_i:ts);i.inline&&(h["vertical-align"]="-0.125em");const p=Xl(e,h,s&&s.addedStyles),m=ne(M({},t),{status:"loaded",addedClasses:d,addedStyles:p});return e[ht]=m,e}let nn=!1;function ob(){nn||(nn=!0,setTimeout(()=>{nn&&(nn=!1,Ut())}))}function Ut(e,t=!1){const r=Object.create(null);function n(i,o){const{provider:a,prefix:s,name:c}=i,u=rt(a,s),d=u.icons[c];if(d)return{status:"loaded",icon:d};if(u.missing.has(c))return{status:"missing"};if(o&&!Ry(i)){const f=r[a]||(r[a]=Object.create(null));(f[s]||(f[s]=new Set)).add(c)}return{status:"loading"}}(e?[e]:yr()).forEach(i=>{const o=typeof i.node=="function"?i.node():i.node;if(!o||!o.querySelectorAll)return;let a=!1,s=!1;function c(u,d,f){if(s||(s=!0,Ei(i)),u.tagName.toUpperCase()!=="SVG"){const h=d.mode,p=h==="mask"||(h==="bg"?!1:h==="style"?f.body.indexOf("currentColor")!==-1:null);if(typeof p=="boolean"){ib(u,d,M(M({},dr),f),p);return}}es(u,d,f)}Qy(o).forEach(({node:u,props:d})=>{const f=u[ht];if(!f){const{status:p,icon:m}=n(d.icon,!0);if(m){c(u,d,m);return}a=a||p==="loading",u[ht]=ne(M({},d),{status:p});return}let h;if(Hy(f,d)){if(h=n(d.icon,f.name!==d.name),!h.icon){a=a||h.status==="loading",Object.assign(f,ne(M({},d),{status:h.status}));return}}else{if(f.status!=="loading")return;if(h=n(d.icon,!1),!h.icon){f.status=h.status;return}}c(u,d,h.icon)}),i.temporary&&!a?Jl(o):t&&a?Wl(o,!0):s&&i.observer&&ki(i)});for(const i in r){const o=r[i];for(const a in o){const s=o[a];Ci(Array.from(s).map(c=>({provider:i,prefix:a,name:c})),ob)}}}function ab(e){const t=gr(e);t?Ut(t):Ut({node:e,temporary:!0},!0)}function os(e,t,r=!1){const n=pr(e);if(!n)return null;const i=zt(e),o=Hl(tn,t||{}),a=es(document.createElement("span"),{name:e,icon:i,customisations:o},n);return r?a.outerHTML:a}function lb(){return"3.1.1"}function sb(e,t){return os(e,t,!1)}function cb(e,t){return os(e,t,!0)}function ub(e,t){const r=pr(e);if(!r)return null;const n=Hl(tn,t||{});return Jr(r,n)}function db(e){e?ab(e):Ut()}if(typeof document!="undefined"&&typeof window!="undefined"){Dy();const e=window;if(e.IconifyPreload!==void 0){const t=e.IconifyPreload,r="Invalid IconifyPreload syntax.";typeof t=="object"&&t!==null&&(t instanceof Array?t:[t]).forEach(n=>{try{(typeof n!="object"||n===null||n instanceof Array||typeof n.icons!="object"||typeof n.prefix!="string"||!xl(n))&&console.error(r)}catch(i){console.error(r)}})}setTimeout(()=>{Ny(Ut),Ut()})}function fb(e,t){Dl(e,t!==!1)}function pb(e){Dl(e,!0)}if(Pl("",wy),typeof document!="undefined"&&typeof window!="undefined"){Ml();const e=window;if(e.IconifyProviders!==void 0){const t=e.IconifyProviders;if(typeof t=="object"&&t!==null)for(const r in t){const n="IconifyProviders["+r+"] is invalid.";try{const i=t[r];if(typeof i!="object"||!i||i.resources===void 0)continue;Il(r,i)||console.error(n)}catch(i){console.error(n)}}}}const as={_api:{getAPIConfig:Xr,setAPIModule:Pl,sendAPIQuery:Vl,setFetch:py,getFetch:hy,listAPIProviders:fy},addAPIProvider:Il,loadIcons:Ci,loadIcon:My,iconExists:ry,getIcon:ny,listIcons:Xg,addIcon:ty,addCollection:xl,replaceIDs:$l,calculateSize:pi,buildIcon:Jr,getVersion:lb,renderSVG:sb,renderHTML:cb,renderIcon:ub,scan:db,observe:Wl,stopObserving:Jl,pauseObserver:Vy,resumeObserver:Ly,enableCache:fb,disableCache:pb};try{self.Iconify===void 0&&(self.Iconify=as)}catch(e){}const hb=["xlink:href"],mb=["data-icon"],gb=l.defineComponent({name:"AbIcon",__name:"ab-icon",props:{icon:{},color:{},size:{default:16},svgClass:{}},setup(e){const t=e,r=l.ref(null),n=l.computed(()=>{var c;return(c=t.icon)==null?void 0:c.startsWith("svg-icon:")}),i=l.computed(()=>{var c;return l.unref(n)?`#icon-${(c=t.icon)==null?void 0:c.split("svg-icon:")[1]}`:t.icon}),o=l.computed(()=>{const{color:c,size:u}=t;return{fontSize:`${u}px`,height:"1em",color:c}}),a=l.computed(()=>{const{svgClass:c}=t;return`iconify ${c}`}),s=c=>ye(this,null,function*(){if(l.unref(n))return;const u=l.unref(r);if(!u||(yield l.nextTick(),!c))return;const d=as.renderSVG(c,{});if(d)u.textContent="",u.appendChild(d);else{const f=document.createElement("span");f.className="iconify",f.dataset.icon=c,u.textContent="",u.appendChild(f)}});return l.watch(()=>t.icon,c=>{s(c)}),(c,u)=>{const d=l.resolveComponent("ElIcon");return l.openBlock(),l.createBlock(d,{class:"ab-icon",color:e.color,size:e.size},{default:l.withCtx(()=>[n.value?(l.openBlock(),l.createElementBlock("svg",{key:0,class:l.normalizeClass(a.value)},[l.createElementVNode("use",{"xlink:href":i.value},null,8,hb)],2)):(l.openBlock(),l.createElementBlock("span",{key:1,ref_key:"elRef",ref:r,class:l.normalizeClass(c.$attrs.class),style:l.normalizeStyle(o.value)},[l.createElementVNode("span",{class:l.normalizeClass(a.value),"data-icon":i.value},null,10,mb)],6))]),_:1},8,["color","size"])}}}),yb=l.defineComponent({name:"AbCheckbox",inheritAttrs:!1,__name:"ab-checkbox",props:{abFormInject:Object,modelValue:{type:Array,default:()=>[]},type:String,options:Array,input:Boolean,inputValue:String},emits:["update:modelValue","fc.el"],setup(e,{emit:t}){const r=e,n=t,i=l.ref(),o=l.computed(()=>r.type==="button"?"ElCheckboxButton":"ElCheckbox"),a=l.toRef(r,"modelValue"),s=l.toRef(r,"inputValue",""),c=l.ref(s.value),u=l.computed(()=>{var m;const p=r.options||((m=r.abFormInject)==null?void 0:m.options)||[];return Array.isArray(p)?p:[]});l.watch(s,p=>{if(!r.input){c.value=p;return}h(p)}),l.watch(a,p=>{if(!s.value&&Array.isArray(p)&&p.length>0&&r.input){const m=u.value.map(y=>y.value);let g=null;p.forEach(y=>{m.indexOf(y)===-1&&(g=y)}),g!=null&&(c.value=g)}},{immediate:!0});function d(p){const b=p,{value:m,label:g}=b;return xr(b,["value","label"])}function f(p){n("update:modelValue",p)}function h(p){const m=[...$t(a.value)],g=m.indexOf(c.value);c.value=p,g>-1&&(m.splice(g,1),m.push(p),f(m))}return l.onMounted(()=>{n("fc.el",i.value)}),(p,m)=>{const g=l.resolveComponent("el-input"),y=l.resolveComponent("el-checkbox-group");return l.openBlock(),l.createBlock(y,l.mergeProps(p.$attrs,{"model-value":a.value===null?void 0:a.value,"onUpdate:modelValue":f,ref_key:"el",ref:i}),l.createSlots({default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(u.value,(b,S)=>(l.openBlock(),l.createBlock(l.resolveDynamicComponent(o.value),l.mergeProps({key:`${o.value}${S}-${b.value}`},{ref_for:!0},d(b),{label:b.value,value:b.value}),{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(b.label||b.value||""),1)]),_:2},1040,["label","value"]))),128)),l.renderSlot(p.$slots,"default"),e.input?(l.openBlock(),l.createBlock(l.resolveDynamicComponent(o.value),{key:0,value:c.value||void 0,label:c.value||void 0},{default:l.withCtx(()=>[l.createVNode(g,{size:"small","model-value":c.value,"onUpdate:modelValue":h},null,8,["model-value"])]),_:1},8,["value","label"])):l.createCommentVNode("",!0)]),_:2},[l.renderList(Object.keys(p.$slots).filter(b=>b!=="default"),b=>({name:b,fn:l.withCtx(S=>[l.renderSlot(p.$slots,b,l.normalizeProps(l.guardReactiveProps(S!=null?S:{})))])}))]),1040,["model-value"])}}}),bb=l.defineComponent({name:"AbRadio",inheritAttrs:!1,__name:"ab-radio",props:{abFormInject:Object,modelValue:{type:[String,Number,Boolean],default:""},options:Array,type:String,input:Boolean,inputValue:String},emits:["update:modelValue","fc.el"],setup(e,{emit:t}){const r=e,n=t,i=l.ref(),o=l.computed(()=>r.type==="button"?"ElRadioButton":"ElRadio"),a=l.toRef(r,"modelValue"),s=l.toRef(r,"inputValue",""),c=l.ref(s.value),u=l.computed(()=>{var m;const p=r.options||((m=r.abFormInject)==null?void 0:m.options)||[];return Array.isArray(p)?p:[]});l.watch(s,p=>{if(!r.input){c.value=p;return}h(p)}),l.watch(a,p=>{!s.value&&p!=null&&r.input&&!u.value.some(m=>m.value===p)&&(c.value=p)},{immediate:!0});function d(p){const b=p,{value:m,label:g}=b;return xr(b,["value","label"])}function f(p){n("update:modelValue",p)}function h(p){const m=c.value;c.value=p,a.value===m&&f(p)}return l.onMounted(()=>{n("fc.el",i.value)}),(p,m)=>{const g=l.resolveComponent("el-input"),y=l.resolveComponent("el-radio-group");return l.openBlock(),l.createBlock(y,l.mergeProps(p.$attrs,{"model-value":a.value,"onUpdate:modelValue":f,ref_key:"el",ref:i}),l.createSlots({default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(u.value,(b,S)=>(l.openBlock(),l.createBlock(l.resolveDynamicComponent(o.value),l.mergeProps({key:`${o.value}${S}-${b.value}`},{ref_for:!0},d(b),{label:b.value,value:b.value}),{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(b.label||b.value||""),1)]),_:2},1040,["label","value"]))),128)),l.renderSlot(p.$slots,"default"),e.input?(l.openBlock(),l.createBlock(l.resolveDynamicComponent(o.value),{key:0,checked:!1,value:c.value||void 0,label:c.value||void 0},{default:l.withCtx(()=>[l.createVNode(g,{size:"small","model-value":c.value,"onUpdate:modelValue":h},null,8,["model-value"])]),_:1},8,["value","label"])):l.createCommentVNode("",!0)]),_:2},[l.renderList(Object.keys(p.$slots).filter(b=>b!=="default"),b=>({name:b,fn:l.withCtx(S=>[l.renderSlot(p.$slots,b,l.normalizeProps(l.guardReactiveProps(S!=null?S:{})))])}))]),1040,["model-value"])}}}),wb={class:"p-option__left"},vb={class:"p-option__right"},xb={class:"p-option__left"},Sb={key:0,class:"p-option__right"},Cb={key:1,class:"p-option__right"},$b=l.defineComponent({name:"AbSelect",inheritAttrs:!1,__name:"ab-select",props:{abFormInject:Object,modelValue:{type:[Array,String,Number,Boolean,Object],default:void 0},type:String,showValue:Boolean,showKey:Boolean,showCode:Boolean},emits:["update:modelValue","fc.el"],setup(e,{emit:t}){const r=e,n=t,i=l.ref(),o=l.toRef(r,"modelValue"),a=l.computed(()=>{var f;const d=(f=r.abFormInject)==null?void 0:f.options;return Array.isArray(d)?d:[]}),{wsCache:s}=Ce(),c=l.computed(()=>s.getCurrentSize||"default");function u(d){n("update:modelValue",d)}return l.onMounted(()=>{n("fc.el",i.value)}),(d,f)=>{const h=l.resolveComponent("el-option"),p=l.resolveComponent("el-option-group"),m=l.resolveComponent("el-select");return l.openBlock(),l.createBlock(m,l.mergeProps(d.$attrs,{"model-value":o.value,"onUpdate:modelValue":u,ref_key:"el",ref:i}),{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(a.value,(g,y)=>{var b,S;return l.openBlock(),l.createElementBlock(l.Fragment,null,[l.unref(ue)(g,"options")?(l.openBlock(),l.createBlock(p,{label:g.label,key:`${y}-${g.label}`},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(j).trueArray(g.options)?g.options:[],($,L)=>(l.openBlock(),l.createBlock(h,l.mergeProps({key:`${L}-${$.value}`},{ref_for:!0},$),null,16))),128))]),_:2},1032,["label"])):(l.openBlock(),l.createElementBlock(l.Fragment,{key:1},[e.showValue?(l.openBlock(),l.createBlock(h,{key:0,label:g==null?void 0:g.label,value:g==null?void 0:g.value,class:l.normalizeClass((b=g==null?void 0:g.class)!=null?b:"")},{default:l.withCtx(()=>[l.createElementVNode("span",wb,l.toDisplayString(g==null?void 0:g.label),1),l.createElementVNode("span",vb,l.toDisplayString(g==null?void 0:g.value),1)]),_:2},1032,["label","value","class"])):e.showKey||e.showCode?(l.openBlock(),l.createBlock(h,{key:1,label:g==null?void 0:g.label,value:g==null?void 0:g.value,size:c.value,class:l.normalizeClass((S=g==null?void 0:g.class)!=null?S:"")},{default:l.withCtx(()=>[l.createElementVNode("span",xb,l.toDisplayString(g==null?void 0:g.label),1),e.showKey?(l.openBlock(),l.createElementBlock("span",Sb,l.toDisplayString(g==null?void 0:g.key),1)):l.createCommentVNode("",!0),e.showCode?(l.openBlock(),l.createElementBlock("span",Cb,l.toDisplayString(g==null?void 0:g.code),1)):l.createCommentVNode("",!0)]),_:2},1032,["label","value","size","class"])):(l.openBlock(),l.createBlock(h,{key:2,label:g==null?void 0:g.label,value:g==null?void 0:g.value},null,8,["label","value"]))],64))],64)}),256)),l.renderSlot(d.$slots,"default")]),_:3},16,["model-value"])}}}),Tb=l.defineComponent({name:"abTree",inheritAttrs:!1,abFormParser:{mergeProp(e){const t=e.prop.props;t.nodeKey||(t.nodeKey="id"),t.props||(t.props={label:"title"})}},props:{type:String,modelValue:{type:[Array,String,Number],default:()=>[]}},emits:["update:modelValue","fc.el"],watch:{modelValue(){this.setValue()}},methods:{updateValue(){if(!this.$refs.tree)return;let e;this.type==="selected"?e=this.$refs.tree.getCurrentKey():e=this.$refs.tree.getCheckedKeys(),this.$emit("update:modelValue",e)},setValue(){if(!this.$refs.tree)return;this.type==="selected"?this.$refs.tree.setCurrentKey(this.modelValue):this.$refs.tree.setCheckedKeys($t(this.modelValue))}},render(){return l.createVNode(l.resolveComponent("ElTree"),l.mergeProps(this.$attrs,{ref:"tree",onCheck:this.updateValue,onNodeClick:this.updateValue}),this.$slots)},mounted(){this.setValue(),this.$emit("fc.el",this.$refs.tree)}}),Eb=l.defineComponent({name:"AbTimePicker",inheritAttrs:!1,__name:"ab-time-picker",props:{modelValue:{}},emits:["update:modelValue","fc.el"],setup(e,{emit:t}){const r=e,n=t,i=l.ref(),o=l.ref(r.modelValue);l.watch(()=>r.modelValue,u=>o.value=u);const{wsCache:a}=Ce(),s=l.computed(()=>a.getCurrentSize||"default");function c(u){n("update:modelValue",u)}return l.onMounted(()=>{n("fc.el",i.value)}),(u,d)=>{const f=l.resolveComponent("el-time-picker");return l.openBlock(),l.createBlock(f,l.mergeProps({ref_key:"el",ref:i},u.$attrs,{modelValue:o.value,"onUpdate:modelValue":d[0]||(d[0]=h=>o.value=h),size:s.value,onChange:c}),null,16,["modelValue","size"])}}}),kb=l.defineComponent({name:"AbColorPicker",inheritAttrs:!1,__name:"ab-color-picker",props:{modelValue:{}},emits:["update:modelValue","fc.el"],setup(e,{emit:t}){const r=e,n=t,i=l.ref(),o=l.ref(r.modelValue);l.watch(()=>r.modelValue,u=>o.value=u);const{wsCache:a}=Ce(),s=l.computed(()=>a.getCurrentSize||"default");function c(u){n("update:modelValue",u)}return l.onMounted(()=>{n("fc.el",i.value)}),(u,d)=>{const f=l.resolveComponent("el-color-picker");return l.openBlock(),l.createBlock(f,l.mergeProps({ref_key:"el",ref:i,class:"ab-color-picker"},u.$attrs,{modelValue:o.value,"onUpdate:modelValue":d[0]||(d[0]=h=>o.value=h),size:s.value,onChange:c}),null,16,["modelValue","size"])}}}),_b={class:"ab-input-range"},Fb={key:0,class:"range-prefix"},Ab={key:3,class:"range-suffix"},Ob=l.defineComponent({name:"AbInputRange",__name:"ab-input-range",props:l.mergeModels({abFormInject:{},prefix:{},suffix:{},clearable:{type:Boolean,default:!0},readonly:{type:Boolean}},{modelValue:{},modelModifiers:{}}),emits:l.mergeModels(["change"],["update:modelValue"]),setup(e,{emit:t}){const r=t,n=e,{t:i}=Ke(),o=l.useModel(e,"modelValue"),a=l.computed(()=>{var h,p,m,g;return[(p=(h=o.value)==null?void 0:h[0])!=null?p:null,(g=(m=o.value)==null?void 0:m[1])!=null?g:null]}),s=l.computed(()=>{var h;return n.readonly===!0||((h=n.abFormInject)==null?void 0:h.readonly)===!0});function c(h,p){const m=[...a.value];return m[h]=p===""?null:p,m}function u(h,p){o.value=c(h,p)}const{wsCache:d}=Ce(),f=l.computed(()=>d.getCurrentSize||"default");return(h,p)=>{var y,b;const m=l.resolveComponent("el-text"),g=l.resolveComponent("el-input");return l.openBlock(),l.createElementBlock("div",_b,[e.prefix?(l.openBlock(),l.createElementBlock("span",Fb,l.toDisplayString(e.prefix),1)):l.createCommentVNode("",!0),s.value?(l.openBlock(),l.createElementBlock(l.Fragment,{key:1},[l.createVNode(m,{class:"ab-input-range__val"},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(a.value[0]),1)]),_:1}),p[4]||(p[4]=l.createElementVNode("span",{class:"range-splitter"}," ~ ",-1)),l.createVNode(m,{class:"ab-input-range__val"},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(a.value[1]),1)]),_:1})],64)):(l.openBlock(),l.createElementBlock(l.Fragment,{key:2},[l.createVNode(g,{"model-value":(y=a.value[0])!=null?y:"",size:f.value,placeholder:l.unref(i)("min"),clearable:e.clearable,class:"ab-input-range__val","onUpdate:modelValue":p[0]||(p[0]=S=>u(0,S)),onChange:p[1]||(p[1]=S=>r("change",c(0,S)))},null,8,["model-value","size","placeholder","clearable"]),p[5]||(p[5]=l.createElementVNode("span",{class:"range-splitter"}," ~ ",-1)),l.createVNode(g,{"model-value":(b=a.value[1])!=null?b:"",size:f.value,placeholder:l.unref(i)("max"),clearable:e.clearable,class:"ab-input-range__val","onUpdate:modelValue":p[2]||(p[2]=S=>u(1,S)),onChange:p[3]||(p[3]=S=>r("change",c(1,S)))},null,8,["model-value","size","placeholder","clearable"])],64)),e.suffix?(l.openBlock(),l.createElementBlock("span",Ab,l.toDisplayString(e.suffix),1)):l.createCommentVNode("",!0)])}}}),Rb={class:"ab-time-period w-full"},Mb={class:"start-time"},Db={key:0},Pb={class:"end-time"},Ib=l.defineComponent({name:"AbTimePeriod",__name:"ab-time-period",props:l.mergeModels({abFormInject:{},startTime:{default:"08:00"},endTime:{default:"18:00"},readonly:{type:Boolean}},{modelValue:{},modelModifiers:{}}),emits:l.mergeModels(["change"],["update:modelValue"]),setup(e,{emit:t}){const r=t,n=e,i=l.useModel(e,"modelValue"),o=l.computed(()=>{var g;return n.readonly===!0||((g=n.abFormInject)==null?void 0:g.readonly)===!0});function a(g){const y=/^(\d{1,2}):(\d{2})(?::(\d{2}))?$/.exec(g.trim()),b=y?Number(y[1]):NaN,S=y?Number(y[2]):NaN,$=y!=null&&y[3]?Number(y[3]):0;if(!y||b>24||S>59||$>59||b===24&&(S!==0||$!==0))throw new TypeError(`Invalid time "${g}": expected HH:mm or HH:mm:ss between 00:00 and 24:00.`);return b*3600+S*60+$}function s(g){const y=Math.floor(g/3600),b=Math.floor(g%3600/60),S=g%60,$=`${String(y).padStart(2,"0")}:${String(b).padStart(2,"0")}`;return S?`${$}:${String(S).padStart(2,"0")}`:$}const c=l.computed(()=>{const g=a(n.startTime),y=a(n.endTime);if(g>=y)throw new RangeError("timePeriod requires startTime before endTime.");return[g,y]}),u=l.computed(()=>{var g,y,b,S,$,L;return[((g=i.value)==null?void 0:g[0])===""?null:(b=(y=i.value)==null?void 0:y[0])!=null?b:null,((S=i.value)==null?void 0:S[1])===""?null:(L=($=i.value)==null?void 0:$[1])!=null?L:null]}),d=l.computed(()=>{const[g,y]=c.value,b=u.value[0]===null?g:a(u.value[0]),S=u.value[1]===null?y:a(u.value[1]);if(u.value[0]!==null&&u.value[1]!==null&&b>S)throw new RangeError("timePeriod start value must be before or equal to end value.");return[b,S]});l.computed(()=>d.value.some(g=>g<c.value[0]||g>c.value[1]));const f=l.computed(()=>{const g=y=>Math.min(c.value[1],Math.max(c.value[0],y));return[g(d.value[0]),g(d.value[1])]});function h(g){if(!Array.isArray(g)||g.length!==2)throw new TypeError("timePeriod slider must provide a pair of values.");return[u.value[0]!==null&&g[0]===f.value[0]?u.value[0]:s(g[0]),u.value[1]!==null&&g[1]===f.value[1]?u.value[1]:s(g[1])]}function p(g){i.value=h(g)}function m(g){r("change",h(g))}return(g,y)=>{var S,$;const b=l.resolveComponent("el-slider");return l.openBlock(),l.createElementBlock("div",Rb,[l.createElementVNode("div",Mb,l.toDisplayString((S=u.value[0])!=null?S:"--:--"),1),o.value?(l.openBlock(),l.createElementBlock("div",Db,"~")):(l.openBlock(),l.createBlock(b,{key:1,class:l.normalizeClass({"is-empty":u.value[0]==null&&u.value[1]==null}),"model-value":f.value,range:"",step:30,min:c.value[0],max:c.value[1],"format-tooltip":s,"format-value-text":s,"onUpdate:modelValue":p,onChange:m},null,8,["class","model-value","min","max"])),l.createElementVNode("div",Pb,l.toDisplayString(($=u.value[1])!=null?$:"--:--"),1)])}}}),ls=Symbol("archbiz-upload-apis");function Bb(e){if(typeof e=="number"&&Number.isFinite(e)||typeof e=="string"&&e.trim()&&e!=="new")return e}function ss(e){const t=e.split(/[?#]/,1)[0].split("/").pop()||e;try{return decodeURIComponent(t)}catch(r){if(r instanceof URIError)return t;throw r}}const jb={class:"ab-upload-file"},Nb={key:1,role:"alert"},Vb={class:"ab-upload-file__list"},Lb={key:0},Hb={key:1,role:"alert"},cs=l.defineComponent({name:"AbUploadFile",__name:"ab-upload-file",props:{modelValue:{},apis:{},abFormInject:{},idFieldTable:{},businessCode:{},fileType:{default:()=>["doc","xls","txt","pdf"]},fileSize:{default:5},limit:{default:5},drag:{type:Boolean},isShowTip:{type:Boolean,default:!0},readonly:{type:Boolean},disabled:{type:Boolean},delEnabled:{type:Boolean,default:!0},preEnabled:{type:Boolean,default:!0},dowEnabled:{type:Boolean,default:!0},coverEnabled:{type:Boolean},autoCover:{type:Boolean}},emits:["update:modelValue","preview","error","reload"],setup(e,{expose:t,emit:r}){const n=e,i=r,{t:o}=Ke(),a=Ea(),s=l.inject(ls,void 0);function c(){var H;const P=(H=n.apis)!=null?H:s;if(!P)throw new Error("Upload APIs are not configured. Pass upload to setupArchbizKit or apis to the component.");return P}c();const u=l.computed(()=>{var P;return n.disabled||n.readonly||((P=n.abFormInject)==null?void 0:P.readonly)===!0}),d=l.computed(()=>{var H;const P=n.abFormInject;return Bb(P!=null&&P.idField?(H=P.formValue)==null?void 0:H[P.idField]:void 0)}),f=l.ref([]),h=l.ref(""),p=l.ref(!1),m=l.ref(!1),g=new Set;let y=1,b=0,S=0,$,L;function R(P){var H,G;return{businessType:(G=n.idFieldTable)!=null?G:(H=n.abFormInject)==null?void 0:H.idFieldTable,businessCode:n.businessCode,businessId:P}}function T(P){a.error(P instanceof Error?P.message:String(P)),i("error",P)}function E(){i("update:modelValue",f.value.flatMap(P=>P.url?[P.url]:[]))}function k(P){const H=P.name.includes(".")?P.name.slice(P.name.lastIndexOf(".")+1).toLowerCase():"";return{url:P.url,name:P.name,extension:H,fileId:P.fileId}}function V(P){return/\.(png|jpe?g|gif|webp|bmp|svg)$/i.test(P)}const q=P=>{if(f.value.length+S>=n.limit)return a.error(o("upload.tooMany")),!1;const H=P.name.includes(".")?P.name.slice(P.name.lastIndexOf(".")+1).toLowerCase():"";return n.fileType.length&&!n.fileType.some(G=>G.toLowerCase().replace(/^\./,"")===H)?(a.error(o("upload.invalidType")),!1):P.size>n.fileSize*1024*1024?(a.error(o("upload.tooLarge")),!1):(S++,!0)};function U(P){S=Math.max(0,S-1);const H=b,G=l.reactive({uid:y++,name:P.file.name,status:"uploading"});f.value.push(G);const ie=ye(this,null,function*(){try{const pe=yield c().upload({file:P.file}),K=pe==null?void 0:pe.data;if(!K||K.id==null||typeof K.url!="string"||!K.url||typeof K.name!="string"||!K.name)throw new TypeError("Upload API must return data with id, name and url.");if(H!==b)return;Object.assign(G,{fileId:K.id,url:K.url,name:K.name,size:K.size,status:"pending"}),E()}catch(pe){throw H===b&&(G.status="failed",G.error=pe instanceof Error?pe.message:String(pe)),pe}});return g.add(ie),ie.then(()=>{g.delete(ie),H===b&&d.value!==void 0&&C()},()=>{g.delete(ie)}),ie}const x=P=>T(P);function _(){return ye(this,null,function*(){yield Promise.allSettled([...g]);const P=f.value.find(H=>H.status==="failed");if(P)throw new Error(P.error||o("upload.failed"))})}function F(P,H){return ye(this,null,function*(){if(L&&(yield L),yield Promise.allSettled([...g]),H!==b||d.value!==P)return;const G=f.value.filter(v=>v.status==="pending"&&v.fileId!=null);if(G.length)try{if(yield c().attach(ne(M({},R(P)),{fileIds:G.map(v=>v.fileId),isCover:n.autoCover&&G.length===1&&V(G[0].name)?1:0})),H!==b||d.value!==P)return;G.forEach(v=>{v.status="recent",v.error=void 0})}catch(v){throw H===b&&d.value===P&&G.forEach(O=>{O.error=v instanceof Error?v.message:String(v)}),v}const ie=yield c().list(ne(M({},R(P)),{pageSize:1e3}));if(!ie||!Array.isArray(ie.list))throw new TypeError("Upload list API must return a list array.");if(H!==b||d.value!==P)return;if(ie.list.some(v=>!v||v.fileId==null||typeof v.name!="string"||!v.name||typeof v.url!="string"||!v.url))throw new TypeError("Upload list entries must have fileId, name and url.");const pe=f.value.filter(v=>v.status!=="linked"&&v.status!=="recent"),K=ie.list.map(v=>({uid:y++,id:v.id,fileId:v.fileId,name:v.name,url:v.url,size:v.size,isCover:v.isCover,status:"linked"})),w=f.value.filter(v=>v.status==="recent"&&!K.some(O=>O.fileId===v.fileId));f.value=[...K,...w,...pe],h.value="",E()})}function A(){const P=d.value;if(P===void 0)return Promise.reject(new Error(o("upload.missingBusinessId")));if($)return $.then(()=>A());const H=F(P,b);return $=H,p.value=!0,H.then(()=>{$===H&&($=void 0,p.value=!1)},()=>{$===H&&($=void 0,p.value=!1)}),H}function C(){const P=b;A().catch(H=>{P===b&&(h.value=H instanceof Error?H.message:String(H),T(H))})}function B(){return ye(this,null,function*(){yield _(),yield A()})}function I(){C()}function W(P){m.value=!0;const H=P();L=H,H.then(()=>{L===H&&(L=void 0,m.value=!1)},()=>{L===H&&(L=void 0,m.value=!1)}),H.catch(T)}function Z(P){W(()=>ye(this,null,function*(){const H=b;if(P.status==="linked"&&d.value!==void 0||P.status==="recent"){const G=d.value;if(G===void 0||P.fileId==null)throw new Error(o("upload.missingBusinessId"));yield c().remove(ne(M({},R(G)),{fileId:P.fileId}))}H===b&&(f.value=f.value.filter(G=>G.uid!==P.uid),E(),i("reload"))}))}function X(P){W(()=>ye(this,null,function*(){const H=b;if(P.id==null)throw new Error(o("upload.missingBusinessId"));const G=P.isCover?0:1;yield c().setCover(P.id,G),H===b&&(P.isCover=G,i("reload"))}))}return l.watch(()=>n.modelValue,P=>{const H=P!=null?P:[],G=f.value,ie=[...G],pe=H.map(K=>{const w=ie.findIndex(v=>v.url===K);return w>=0?ie.splice(w,1)[0]:{uid:y++,name:ss(K),url:K,status:"linked"}});f.value=[...pe,...G.filter(K=>K.status==="uploading"||K.status==="failed")]},{immediate:!0,deep:!0}),l.watch(d,(P,H)=>{var G;H!==void 0&&P!==H&&(b++,$=void 0,p.value=!1,h.value="",f.value=((G=n.modelValue)!=null?G:[]).map(ie=>({uid:y++,name:ss(ie),url:ie,status:"linked"}))),P!==void 0&&C()},{immediate:!0}),l.onBeforeUnmount(()=>{b++}),t({waitForUploads:_,waitForAssociations:B,retryAssociations:I}),(P,H)=>{const G=l.resolveComponent("el-button"),ie=l.resolveComponent("el-upload"),pe=l.resolveComponent("el-link");return l.openBlock(),l.createElementBlock("div",jb,[u.value?l.createCommentVNode("",!0):(l.openBlock(),l.createBlock(ie,{key:0,"show-file-list":!1,drag:e.drag,multiple:e.limit>1,accept:e.fileType.map(K=>`.${K.replace(/^\./,"")}`).join(","),"before-upload":q,"http-request":U,"on-error":x},l.createSlots({default:l.withCtx(()=>[l.createVNode(G,{type:"primary"},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(l.unref(o)("upload.select")),1)]),_:1})]),_:2},[e.isShowTip?{name:"tip",fn:l.withCtx(()=>[l.createElementVNode("div",null,l.toDisplayString(l.unref(o)("upload.tip"))+": "+l.toDisplayString(e.fileType.join("/"))+"; "+l.toDisplayString(e.fileSize)+" MB",1)]),key:"0"}:void 0]),1032,["drag","multiple","accept"])),h.value?(l.openBlock(),l.createElementBlock("div",Nb,[l.createTextVNode(l.toDisplayString(h.value)+" ",1),u.value?l.createCommentVNode("",!0):(l.openBlock(),l.createBlock(G,{key:0,link:"",onClick:I},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(l.unref(o)("upload.retry")),1)]),_:1}))])):l.createCommentVNode("",!0),l.createElementVNode("ul",Vb,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(f.value,K=>(l.openBlock(),l.createElementBlock("li",{key:K.uid,class:"ab-upload-file__item"},[l.createElementVNode("span",null,l.toDisplayString(K.name),1),K.status==="uploading"?(l.openBlock(),l.createElementBlock("span",Lb,l.toDisplayString(l.unref(o)("upload.uploading")),1)):l.createCommentVNode("",!0),K.error?(l.openBlock(),l.createElementBlock("span",Hb,l.toDisplayString(K.error),1)):l.createCommentVNode("",!0),K.url&&e.preEnabled?(l.openBlock(),l.createBlock(G,{key:2,link:"",onClick:w=>i("preview",k(K))},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(l.unref(o)("upload.preview")),1)]),_:1},8,["onClick"])):l.createCommentVNode("",!0),K.url&&e.dowEnabled?(l.openBlock(),l.createBlock(pe,{key:3,href:K.url,target:"_blank",download:""},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(l.unref(o)("upload.download")),1)]),_:1},8,["href"])):l.createCommentVNode("",!0),!u.value&&e.coverEnabled&&K.id!=null&&V(K.name)?(l.openBlock(),l.createBlock(G,{key:4,disabled:p.value||m.value,link:"",onClick:w=>X(K)},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(K.isCover?l.unref(o)("upload.unsetCover"):l.unref(o)("upload.setCover")),1)]),_:2},1032,["disabled","onClick"])):l.createCommentVNode("",!0),!u.value&&K.status==="pending"&&K.error?(l.openBlock(),l.createBlock(G,{key:5,link:"",onClick:I},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(l.unref(o)("upload.retry")),1)]),_:1})):l.createCommentVNode("",!0),!u.value&&e.delEnabled&&K.status!=="uploading"?(l.openBlock(),l.createBlock(G,{key:6,disabled:p.value||m.value,link:"",onClick:w=>Z(K)},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(l.unref(o)("upload.delete")),1)]),_:1},8,["disabled","onClick"])):l.createCommentVNode("",!0)]))),128))])])}}}),zb=[gb,yb,bb,$b,Tb,Eb,kb,Ob,Ib,cs],us={date:"YYYY-MM-DD",month:"YYYY-MM",week:"YYYY-wo",datetime:"YYYY-MM-DD HH:mm:ss",timerange:"HH:mm:ss",daterange:"YYYY-MM-DD",monthrange:"YYYY-MM",datetimerange:"YYYY-MM-DD HH:mm:ss",year:"YYYY"},ds="datePicker",Ub={name:ds,maker:["year","month","date","dates","week","datetime","datetimeRange","dateRange","monthRange"].reduce((e,t)=>(e[t]=$e(ds,{type:t.toLowerCase()}),e),{}),mergeProp(e){var r;const t=e.prop.props;t.valueFormat||(t.valueFormat=us[(r=t.type)!=null?r:""]||us.date)}},Fi="hidden",qb={name:Fi,maker:{[Fi]:(e,t)=>$e(Fi)("",e,t)},render(){return[]}},Ai="input",fs=["password","url","email","text","textarea"].reduce((e,t)=>(e[t]=$e(Ai,{type:t}),e),{});fs.idate=$e(Ai,{type:"date"});const Yb={name:Ai,maker:fs,mergeProp(e){const{props:t}=e.prop;t!=null&&t.autosize&&typeof t.autosize=="object"&&t.autosize.minRows&&(t.rows=t.autosize.minRows||2)}},on={name:"inputNumber"},Gb={name:"textarea",mergeProp(e){const{props:t}=e.prop;t.type="textarea",t.autosize&&typeof t.autosize=="object"&&t.autosize.minRows&&(t.rows=t.autosize.minRows||2)}},ps="slider",Wb={name:ps,maker:{sliderRange:$e(ps,{range:!0})},toFormValue(e,t){let r=Array.isArray(e),n=t.prop.props,i=n.min||0,o;return n.range===!0?o=r?e:[i,parseFloat(e)||i]:o=r?parseFloat(e[0])||i:parseFloat(e),o}},Oi="timePicker",Jb={name:Oi,maker:{time:$e(Oi,e=>e.props.isRange=!1),timeRange:$e(Oi,e=>e.props.isRange=!0)},mergeProp(e){const t=e.prop.props;t.valueFormat||(t.valueFormat="HH:mm:ss")}},Kb={name:"FcRow",render(e,t){return t.vNode.col({props:{span:24}},{default:()=>[t.vNode.row(t.prop,e)]})}},hs={name:"select",toFormValue(e,t){return t.prop.props.multiple&&!Array.isArray(e)?$t(e):e}},Qb=ne(M({},hs),{name:"treeSelect"}),Zb={name:"text",render(e,t){const r=t.$handle.api.getValue(t.field),n=Yn(t.prop).formatter,i=typeof n=="function"?n({cellValue:r,column:t.rule,row:t.$handle.api.formData()}):r,o=String(i!=null?i:"");return Ph(t.prop.link)?l.h(Aa,{link:t.prop.link,value:r,row:t.$handle.api.formData()},{default:()=>o}):l.h(D.ElText,null,{default:()=>o})}},ms={name:"radio"},Xb=ne(M({},ms),{name:"checkbox"}),ew={name:"switch"},tw={name:"cascader"},rw={name:"colorPicker",render(e,t){var r,n,i;if(((i=(n=(r=t==null?void 0:t.$handle)==null?void 0:r.vm)==null?void 0:n.props)==null?void 0:i.readonly)===!0){const o=t.$handle.api.getValue(t.field),a=typeof o=="string"?o:void 0;return l.h("span",{class:"ab-color-picker__readonly",style:{backgroundColor:a,color:a?da.getContrast(a):ah.black},title:a},String(o!=null?o:""))}return t.$render.defaultRender(t,e)}},nw=[Ub,qb,Yb,on,ne(M({},on),{name:"number"}),ne(M({},on),{name:"inputCurrency"}),ne(M({},on),{name:"inputPercent"}),Zb,Gb,Wb,Jb,Kb,hs,Qb,ms,Xb,ew,tw,rw],se="el",iw={input:se+"-input",number:se+"-input-number",inputNumber:se+"-input-number",inputCurrency:se+"-input-number",inputPercent:se+"-input-number",inputRange:"ab-input-range",text:se+"-text",divider:se+"-divider",select:"ab-select",treeSelect:se+"-tree-select",datePicker:se+"-date-picker",timePicker:"ab-time-picker",cascader:se+"-cascader",colorPicker:"ab-colorPicker",timePeriod:"ab-time-period",uploadFile:"ab-upload-file",textarea:se+"-input",button:se+"-button",icon:"ab-icon",slider:se+"-slider",rate:se+"-rate",upload:"ab-upload",popover:se+"-popover",tooltip:se+"-tooltip",timeSelect:se+"-time-select",switch:se+"-switch",checkbox:"ab-checkbox",radio:"ab-radio",formItem:se+"-form-item",form:se+"-form",frame:"ab-frame",col:se+"-col",row:se+"-row",tree:"ab-tree",inputTag:se+"-input-tag",inputOtp:se+"-input-otp",mention:se+"-mention",transfer:se+"-transfer",autoComplete:se+"-autocomplete",auto:se+"-autocomplete",group:"ab-group",array:"ab-group",object:"ab-sub-form",subForm:"ab-sub-form"};function ow(){return{form:{inline:!0,labelPosition:"right",labelWidth:"120px",fieldWidth:"238px",disabled:!1,size:void 0},row:{show:!1,gutter:0},submitBtn:{type:"primary",loading:!1,disabled:!1,innerText:"",show:!1,col:void 0,click:void 0},resetBtn:{type:"default",loading:!1,disabled:!1,innerText:"",show:!1,col:void 0,click:void 0}}}const{t:an}=Ke(),aw=new Set(["input","inputnumber","textarea","password","inputtag"]),gs=new Set(["select","datepicker","timepicker","treeselect","cascader","autocomplete"]);function lw(e){return e.type==="tooltip"}function ys(e,t){ue(e,t)&&j.String(e[t])&&(e[t]={[t]:e[t],show:!0})}function ct(e){return e===!1}function sw(e,t){ue(e,t)&&!j.Object(e[t])&&(e[t]={show:!!e[t]})}function Ri(e){const t=M({},e);return delete t.children,t}const cw={validate(){const e=this.form();return e?e.validate():new Promise(t=>t())},validateField(e){return new Promise((t,r)=>{const n=this.form();n?n.validateField(e,(i,o)=>{o?r(o):t(i)}):t(void 0)})},clearValidateState(e){const t=this.vm.refs[e.wrapRef];t&&t.clearValidate()},fieldChange(e,t,r,n){var i,o;n||(o=(i=this.vm.refs[e.wrapRef])==null?void 0:i.validate("change"))==null||o.catch(()=>{})},tidyOptions(e){return["submitBtn","resetBtn","row","info","wrap","col","title"].forEach(t=>{sw(e,t)}),e},tidyRule({prop:e}){return ys(e,"title"),ys(e,"info"),e},mergeProp(e){var s,c,u,f,h,p,m,g;const d=ml(M(M({},e.rule),e.prop),{includeChildren:((u=(c=(s=this.$handle)==null?void 0:s.vm)==null?void 0:c.props)==null?void 0:u.readonly)!==!0}),{children:r}=d,n=xr(d,["children"]);Object.assign(e.prop,n),r!==e.rule.children&&(e.rule.children=r);const i=String(e.rule.type||e.type||"").replace(/[-_]/g,"").toLowerCase(),o=(m=(h=(f=e.refRule)==null?void 0:f.__$title)==null?void 0:h.value)!=null?m:typeof e.rule.title=="object"?(p=e.rule.title)==null?void 0:p.title:e.rule.title;if((aw.has(i)||gs.has(i))&&o!==void 0&&o!==null&&o!==""){(g=e.prop).props||(g.props={}),this.$handle.api.getLocale();const y=gs.has(i)?an("pleaseSelect"):an("pleaseEnter");ue(e.prop.props,"placeholder")||(e.prop.props.placeholder=`${y}${ir(o)}`);const b=String(e.prop.props.type||"").toLowerCase();(i==="datepicker"||i==="timepicker")&&(b.endsWith("range")||e.prop.props.isRange===!0)&&(ue(e.prop.props,"startPlaceholder")||(e.prop.props.startPlaceholder=`${y}${an("rangeStart")}${ir(o)}`),ue(e.prop.props,"endPlaceholder")||(e.prop.props.endPlaceholder=`${y}${an("rangeEnd")}${ir(o)}`))}const a={info:{trigger:"hover",placement:"top-start",icon:!0},title:{},col:{span:24},wrap:{}};["info","wrap","col","title"].forEach(y=>{e.prop[y]=at([this.options[y]||{},e.prop[y]||{}],a[y])})},getDefaultOptions(){return ow()},update(){const e=this.options.form,t=M({},e);delete t.fieldWidth,this.rule={props:M({},t),on:{submit:r=>{r.preventDefault()}},style:e.style,type:"form"}},beforeRender(){const{key:e,ref:t,$handle:r}=this,n=this.options.form;ee(this.rule,{key:e,ref:t,class:[n.className,n.class,"ab-form",this.$handle.preview?"is-preview":""]}),ee(this.rule.props,{model:r.formData})},render(e){return e.slotLen()&&!this.$handle.preview&&e.setSlot(void 0,()=>this.makeFormBtn()),this.$r(this.rule,ct(this.options.row.show)?e.getSlots():[this.makeRow(e)])},makeWrap(e,t){var h;const r=e.prop,n=`${this.key}${e.key}`,i=r.col,o=this.isTitle(r)&&r.wrap.title!==!1,a=!(i!=null&&i.labelWidth)&&!o?0:i==null?void 0:i.labelWidth,s=e.input?(h=this.options.form)==null?void 0:h.fieldWidth:"",{inline:c,col:u}=this.rule.props,d=r.wrap.class;delete r.wrap.class,delete r.wrap.title;const f=(j.Undef(r.wrap.show)?!e.input:ct(r.wrap.show))?t:this.$r(at([r.wrap,ne(M({props:ne(M({labelWidth:a===void 0?a:ir(a),label:o?r.title.title:void 0},Ri(r.wrap||{})),{prop:e.id,rules:e.injectValidate()}),class:this.$render.mergeClass(d||r.className,"ab-form-item")},s?{style:{"--ab-field-width":ir(s)}}:{}),{key:`${n}fi`,ref:e.wrapRef,type:"formItem"})]),M({default:()=>t},o?{label:()=>this.makeInfo(r,n,e)}:{}));return c===!0||ct(u)||ct(i.show)?f:this.makeCol(r,n,[f])},isTitle(e){if(this.options.form.title===!1)return!1;const t=e.title;return!(!t.title&&!t.native||ct(t.show))},makeInfo(e,t,r){var d,f,h,p,m,g;const n=M({},e.title),i=M({},e.info),o=lw(i),a=this.options.form,s=this.getSlot("title"),c=[s?s({title:(f=(d=r.refRule)==null?void 0:d.__$title)==null?void 0:f.value,rule:r.rule,options:this.options}):((p=(h=r.refRule)==null?void 0:h.__$title)==null?void 0:p.value)+(a.labelSuffix||a["label-suffix"]||"")];if(!ct(i.show)&&(i.info||i.native)&&!ct(i.icon)){const y={type:i.type||"popover",props:Ri(i),key:`${t}pop`};delete y.props.icon,delete y.props.show,delete y.props.info,delete y.props.align,delete y.props.native;const b="content";i.info&&!ue(y.props,b)&&(y.props[b]=(g=(m=r.refRule)==null?void 0:m.__$info)==null?void 0:g.value),c[i.align!=="left"?"unshift":"push"](this.$r(at([i,y]),{[n.slot||(o?"default":"reference")]:()=>this.$r({type:"ElIcon",style:"top:2px",key:`${t}i`},{default:()=>this.$r({type:i.icon===!0?"icon-warning":i.icon})},!0)}))}const u=at([n,{props:Ri(n),key:`${t}tit`,class:"ab-form-title",type:n.type||"span",on:{click:(...y)=>{this.$handle.targetHook(r,"titleClick",{args:y})}}}]);return delete u.props.show,delete u.props.title,delete u.props.native,this.$r(u,c)},makeCol(e,t,r){const n=M({},e.col);return delete n.show,this.$r({class:this.$render.mergeClass(n.class,"ab-form-col"),type:"col",props:n||{span:24},key:`${t}col`},r)},makeRow(e){const t=this.options.row||{};return this.$r({type:"row",props:t,class:this.$render.mergeClass(t.class,"ab-form-row"),key:`${this.key}row`},e)},makeFormBtn(){let e=[];if(ct(this.options.submitBtn.show)||e.push(this.makeSubmitBtn()),ct(this.options.resetBtn.show)||e.push(this.makeResetBtn()),!e.length)return;const t=this.$r({type:"formItem",class:"ab-form-item",key:`${this.key}fb`},e);return this.rule.props.inline===!0?t:this.$r({type:"col",class:"ab-form-col ab-form-footer",props:{span:24},key:`${this.key}fc`},[t])},makeResetBtn(){const e=M({},this.options.resetBtn),t=e.innerText||this.$handle.api.t("reset")||"重置";return delete e.innerText,delete e.click,delete e.col,delete e.show,this.$r({type:"button",props:e,class:"ab-reset-btn",style:{width:e.width},on:{click:()=>{const r=this.$handle.api;this.options.resetBtn.click?this.options.resetBtn.click(r):r.resetFields()}},key:`${this.key}b2`},[t])},makeSubmitBtn(){const e=M({},this.options.submitBtn),t=e.innerText||this.$handle.api.t("submit")||"提交";return delete e.innerText,delete e.click,delete e.col,delete e.show,this.$r({type:"button",props:e,class:"ab-submit-btn",style:{width:e.width},on:{click:()=>{const r=this.$handle.api;this.options.submitBtn.click?this.options.submitBtn.click(r):r.submit().catch(()=>{})}},key:`${this.key}b1`},[t])}},Ft={};uw(Ft),dw(Ft),fw(Ft),pw(Ft),hw(Ft),mw(Ft);function uw(e){["group","tree","switch","upload","autoComplete","checkbox","cascader","colorPicker","datePicker","frame","inputNumber","inputTag","inputOtp","mention","transfer","treeSelect","radio","rate"].forEach(t=>{e[t]=$e(t)}),e.auto=e.autoComplete,e.number=e.inputNumber,e.color=e.colorPicker,e.tag=e.inputTag}function dw(e){e.treeSelectMultiple=$e("treeSelect",{multiple:!0})}function fw(e){const t="select",r="multiple";e.selectMultiple=$e(t,{[r]:!0}),e.selectOne=$e(t,{[r]:!1})}function pw(e){const t="tree",r={treeSelected:"selected",treeChecked:"checked"};Object.keys(r).reduce((n,i)=>(n[i]=$e(t,{type:r[i]}),n),e)}function hw(e){const t="upload",r={image:["image",0],file:["file",0],uploadFileOne:["file",1],uploadImageOne:["image",1]};Object.keys(r).reduce((n,i)=>(n[i]=$e(t,o=>o.props({uploadType:r[i][0],maxLength:r[i][1]})),n),e),e.uploadImage=e.image,e.uploadFile=e.file}function mw(e){const t={frameInputs:["input",0],frameFiles:["file",0],frameImages:["image",0],frameInputOne:["input",1],frameFileOne:["file",1],frameImageOne:["image",1]};return Object.keys(t).reduce((r,n)=>(r[n]=$e("frame",i=>i.props({type:t[n][0],maxLength:t[n][1]})),r),e),e.frameInput=e.frameInputs,e.frameFile=e.frameFiles,e.frameImage=e.frameImages,e}function bs(e,t){return j.Boolean(e)?e={show:e}:!j.Undef(e)&&!j.Object(e)&&(e={show:t}),e}function gw(e,t){return{formEl(){return t.$manager.form()},wrapEl(r){const n=t.getFieldCtx(r);if(n)return t.vm.refs[n.wrapRef]},validate(r){return new Promise((n,i)=>{const o=e.children,a=[t.$manager.validate()];o.filter(s=>!s.isScope).forEach(s=>{a.push(s.validate())}),Promise.all(a).then(()=>{n(!0),r&&r(!0)}).catch(s=>{i(s),r&&r(s),t.vm.emit("validate-fail",s,{api:e}),t.emitEvent("validate-fail",s,{api:e})})})},validateField(r,n){return new Promise((i,o)=>{const s=typeof r=="object"?Xe(r):t.getCtx(r);if(!s){i(null),n&&n(null);return}const c=t.subForm[s.id],u=[t.$manager.validateField(s.id)];$t(c).filter(d=>!d.isScope).forEach(d=>{u.push(d.validate())}),Promise.all(u).then(()=>{i(null),n&&n(null)}).catch(d=>{o(d),n&&n(d),t.vm.emit("validate-field-fail",d,{field:r,api:e})})})},validateFields(r,n){return new Promise((i,o)=>{Array.isArray(r)||(r=[r]);const a=r.map(s=>e.validateField(s));Promise.all(a).then(()=>{i(null),n&&n(null)}).catch(s=>{o(s),n&&n(s)})})},clearValidateState(r,n=!0){e.helper.tidyFields(r).forEach(i=>{n&&this.clearSubValidateState(i),t.getCtxs(i).forEach(o=>{t.$manager.clearValidateState(o)})})},clearSubValidateState(r){e.helper.tidyFields(r).forEach(n=>{t.getCtxs(n).forEach(i=>{const o=t.subForm[i.id];o&&(Array.isArray(o)?o.forEach(a=>{a.clearValidateState()}):o&&o.clearValidateState())})})},btn:{loading:(r=!0)=>{e.submitBtnProps({loading:!!r})},disabled:(r=!0)=>{e.submitBtnProps({disabled:!!r})},show:(r=!0)=>{e.submitBtnProps({show:!!r})}},resetBtn:{loading:(r=!0)=>{e.resetBtnProps({loading:!!r})},disabled:(r=!0)=>{e.resetBtnProps({disabled:!!r})},show:(r=!0)=>{e.resetBtnProps({show:!!r})}},submitBtnProps:(r={})=>{let n=bs(t.options.submitBtn,!0);ee(n,r),t.options.submitBtn=n,e.refreshOptions()},resetBtnProps:(r={})=>{let n=bs(t.options.resetBtn,!1);ee(n,r),t.options.resetBtn=n,e.refreshOptions()},submit(r,n){return new Promise((i,o)=>{(t.options.validateOnSubmit===!1?Promise.resolve():e.validate()).then(()=>{let s=e.formData();t.beforeSubmit(s).then(()=>{j.Function(r)&&te(()=>r(s,e)),j.Function(t.options.onSubmit)&&te(()=>t.options.onSubmit(s,e)),t.vm.emit("submit",s,e),i(s)}).catch(()=>{})}).catch((...s)=>{j.Function(n)&&te(()=>n(e,...s)),o(...s)})})}}}const ws={name:"required",load(e,t,r){const n=yw(e.getValue());let i;if(n.required===!1)e.clearProp(),r==null||r.clearValidateState([t==null?void 0:t.field]);else{const o=M({required:!0,validator(s,c,u){a(),j.empty(c)?u(o.message):u()}},n),a=()=>{var c;const s=(c=t==null?void 0:t.__fc__.refRule.__$title)==null?void 0:c.value;if(i!==s)if(i=s,!n.message)o.message=(r==null?void 0:r.t("required",{title:s}))||s+((r==null?void 0:r.getLocale())==="en"?" is required":"不能为空");else{const u=n.message.match(/^\{\{\s*\$t\.(.+)\s*\}\}$/);u&&(o.message=r==null?void 0:r.t(u[1],{title:s}))}};a(),e.getProp().validate=[o]}r==null||r.sync(t)},watch(e,t,r){ws.load(e,t,r)}};function yw(e){return j.Boolean(e)?{required:e}:j.String(e)?{message:e}:j.Undef(e)?{required:!1}:j.Function(e)?{validator:e}:j.Object(e)?e:{}}function bw(e,t){const r=e;r.componentAlias(iw),zb.forEach(o=>{const a=o;r.component(a.name,a)}),r.register(ws),nw.forEach(o=>{r.parser(o)});const n=Ft;Object.keys(n).forEach(o=>{r.maker[o]=n[o]});const i=typeof window!="undefined"?window.ElementPlus:void 0;i&&r.useApp((o,a)=>{a.use(i)})}function ww(){return pl({ui:"element-plus",version:"0.1.0",manager:cw,extendApi:gw,install:bw,attrs:{normal:["col","wrap"],array:["className"],key:["title","info"]}})}const vs=l.defineComponent({name:"abDrawer",__name:"ab-drawer",props:l.mergeModels({visible:{type:Boolean,default:!1},detailLevel:{default:1}},{visible:{type:Boolean},visibleModifiers:{}}),emits:["update:visible"],setup(e){const t=e,r=l.useModel(e,"visible"),n=l.computed(()=>t.detailLevel&&t.detailLevel<5?`${76-t.detailLevel*8}%`:"32%");return(i,o)=>{const a=l.resolveComponent("el-drawer");return l.openBlock(),l.createBlock(a,{modelValue:r.value,"onUpdate:modelValue":o[0]||(o[0]=s=>r.value=s),"with-header":!1,"show-close":!1,"append-to-body":"","close-on-click-modal":"","close-on-press-escape":"","destroy-on-close":"",size:n.value},{default:l.withCtx(()=>[l.renderSlot(i.$slots,"default")]),_:3},8,["modelValue","size"])}}}),vw=(e,t)=>{e.component("ab-drawer",vs)};var Mi=Object.defineProperty,xw=Object.getOwnPropertyDescriptor,Sw=Object.getOwnPropertyNames,Cw=Object.prototype.hasOwnProperty,$w=(e,t)=>{for(var r in t)Mi(e,r,{get:t[r],enumerable:!0})},Tw=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Sw(t))!Cw.call(e,i)&&i!==r&&Mi(e,i,{get:()=>t[i],enumerable:!(n=xw(t,i))||n.enumerable});return e},Ew=e=>Tw(Mi({},"__esModule",{value:!0}),e),xs={};$w(xs,{default:()=>_w});var kw=Ew(xs),_w={vxe:{base:{pleaseInput:"请输入",pleaseSelect:"请选择",comma:",",fullStop:"。"},loading:{text:"加载中..."},error:{downErr:"下载失败",errLargeData:"当绑定的数据量过大时,应该请使用 {0},否则可能会出现卡顿",groupFixed:"如果使用分组表头,冻结列必须按组设置",groupMouseRange:'分组表头与 "{0}" 不能同时使用,这可能会出现错误',groupTag:'分组列头应该使用 "{0}" 而不是 "{1}",这可能会出现错误',scrollErrProp:'启用虚拟滚动后不支持该参数 "{0}"',errConflicts:'参数 "{0}" 与 "{1}" 有冲突',modelConflicts:'绑定的字段值 "{0}" 与 "{1}" 存在冲突,将会出现错误',notSupportProp:'当启用参数 "{0}" 时不支持 "{1}",应该为 "{2}",否则将会出现错误',reqSupportProp:'当使用 "{0}" 时,应该设置 "{1}",否则可能会出现错误',notConflictProp:'当使用 "{0}" 时,应该设置 "{1}",否则可能会存在功能冲突',unableInsert:"无法插入到指定位置,请检查参数是否正确",useErr:'安装 "{0}" 模块时发生错误,可能顺序不正确,依赖的模块需要在 Table 之前安装',barUnableLink:"工具栏无法关联表格",expandContent:'展开行的插槽应该是 "content",请检查是否正确',reqComp:'缺少 "{0}" 组件,请检查是否正确安装。 https://vxeui.com/#/start/useUI/useGlobal',reqModule:'缺少 "{0}" 模块',reqProp:'缺少必要的 "{0}" 参数,这可能会导致出现错误',emptyProp:'参数 "{0}" 不允许为空',errProp:'不支持的参数 "{0}",可能为 "{1}"',colRepet:'column.{0}="{1}" 重复了,这可能会导致某些功能无法使用',notFunc:'方法 "{0}" 不存在',errFunc:'参数 "{0}" 不是一个方法',notValidators:'全局校验 "{0}" 不存在',notFormats:'全局格式化 "{0}" 不存在',notCommands:'全局指令 "{0}" 不存在',notSlot:'插槽 "{0}" 不存在',noTree:'树结构不支持 "{0}"',noGroup:'数据分组后不支持 "{0}"',notProp:'不支持的参数 "{0}"',returnErr:'参数 "{0}" 的返回值期望是 "{1}" 实际是 "{2}"',notSupportReturn:'当返回值为 "{0}" 时的参数应该使用用 "{1}" 而不是 "{2}"',checkProp:'当数据量过大时可能会导致复选框卡顿,建议设置参数 "{0}" 提升渲染速度',coverProp:'"{0}" 的参数 "{1}" 重复定义,这可能会出现错误',uniField:'字段名 "{0}" 重复定义,这可能会出现错误',repeatKey:'主键重复 {0}="{1}",这可能会出现错误',repeatProp:'参数重复 {0}="{1}",这可能会出现错误',delFunc:'方法 "{0}" 已废弃,请使用 "{1}"',delProp:'参数 "{0}" 已废弃,请使用 "{1}"',delEvent:'事件 "{0}" 已废弃,请使用 "{1}"',removeProp:'参数 "{0}" 已废弃,不建议使用,这可能会导致出现错误',errFormat:'全局的格式化内容应该使用 "VXETable.formats" 定义,挂载 "formatter={0}" 的方式已不建议使用',notType:'不支持的文件类型 "{0}"',notExp:"该浏览器不支持导入/导出功能",impFields:"导入失败,请检查字段名和数据格式是否正确",treeNotImp:"树表格不支持导入",treeCrossDrag:"只能拖拽第一层级",treeDragChild:"父级不能拖拽到自己的子级中",reqPlugin:'扩展插件未安装 "{1}" https://vxeui.com/other{0}/#/{1}/start/npmInstall',errMaxRow:"超过支持的最大数据量 {0} 行,这可能会导致出现错误",useNew:"不建议使用 {0},请使用 {1}",errorVersion:"版本不匹配,当前版本 {0},最低支持版本为 {1}",errMaxVersion:"版本不匹配,当前版本 {0},最高支持版本为 {1}"},table:{emptyText:"暂无数据",allTitle:"全选/取消",seqTitle:"序号",actionTitle:"操作",confirmFilter:"筛选",resetFilter:"重置",allFilter:"全部",sortAsc:"升序:最低到最高",sortDesc:"降序:最高到最低",filter:"对所选的列启用筛选",impSuccess:"成功导入 {0} 条记录",expLoading:"正在导出中",expSuccess:"导出成功",expError:"导出失败",expFilename:"导出_{0}",expOriginFilename:"导出_源_{0}",customTitle:"个性化设置",customAll:"全部",customConfirm:"确认",customClose:"关闭",customCancel:"取消",customRestore:"恢复默认",maxFixedCol:"最大冻结列的数量不能超过 {0} 个",maxGroupCol:"最大分组字段的数量不能超过 {0} 个",dragTip:"移动:{0}",resizeColTip:"宽:{0} 像素",resizeRowTip:"高:{0} 像素",rowGroupContentTotal:"{0}({1})",menuLoading:"加载中..."},grid:{selectOneRecord:"请至少选择一条记录!",deleteSelectRecord:"您确定要删除所选记录吗?",removeSelectRecord:"您确定要移除所选记录吗?",dataUnchanged:"数据未改动!",delSuccess:"成功删除所选记录!",saveSuccess:"保存成功!",operError:"发生错误,操作失败!"},select:{clear:"清除",allChecked:"全选",total:"已选 {0} 项",close:"关闭",search:"搜索",loadingText:"加载中...",emptyText:"暂无数据",maxSize:"最大可选择的数量不能超过 {0} 个",overSizeErr:"已超出最大可选数量 {0} 个,超出部分将被忽略!",searchEmpty:"未匹配到数据!"},list:{allChecked:"全选",dragTip:"移动:{0}"},tree:{searchEmpty:"未匹配到数据!",dragTip:"移动:{0}"},treeSelect:{clearChecked:"清除",allChecked:"全选",allExpand:"全部展开",clearExpand:"全部收起",total:"已选 {0} 项",filterCount:"共找到 {0} 条记录",close:"关闭",search:"搜索",emptyText:"暂无数据"},tableSelect:{filterCount:"共找到 {0} 条记录"},pager:{goto:"前往",gotoTitle:"页数",pagesize:"{0}条/页",total:"共 {0} 条记录",pageClassifier:"页",homePage:"首页",homePageTitle:"首页",prevPage:"上一页",prevPageTitle:"上一页",nextPage:"下一页",nextPageTitle:"下一页",prevJump:"向上跳页",prevJumpTitle:"向上跳页",nextJump:"向下跳页",nextJumpTitle:"向下跳页",endPage:"末页",endPageTitle:"末页"},alert:{title:"系统提示"},button:{confirm:"确认",cancel:"取消",clear:"清除"},filter:{search:"搜索"},custom:{cstmTitle:"个性化设置",cstmRestore:"恢复默认",cstmCancel:"取消",cstmConfirm:"确定",cstmConfirmRestore:"请确认是否恢复成默认列配置?",cstmDragTarget:"移动:{0}",setting:{colSort:"排序",sortHelpTip:"点击图标开始拖动",colTitle:"列标题",colResizable:"列宽(像素)",colVisible:"是否显示",colFixed:"冻结列",colFixedMax:"冻结列({0})",colAlign:"对齐方式",colHeadAlign:"表头对齐方式",colFootAlign:"表尾对齐方式",fixedLeft:"左",fixedUnset:"无",fixedRight:"右",alignLeft:"左",alignCenter:"中",alignRight:"右",moveUp:"上移",moveDn:"下移",putTop:"置顶",putBottom:"置尾",moveUpTitle:"点击向上移动",moveDnTitle:"点击向下移动",putTopTitle:"点击置顶",putBottomTitle:"点击置尾",anLeftTitle:"左对齐",anCenterTitle:"居中",anRightTitle:"右对齐"}},import:{modes:{covering:"覆盖方式(直接覆盖表格数据)",insert:"底部追加(在表格的底部追加新数据)",insertTop:"顶部追加(在表格的顶部追加新数据)",insertBottom:"底部追加(在表格的底部追加新数据)"},impTitle:"导入数据",impFile:"文件名",impSelect:"选择文件",impType:"文件类型",impOpts:"参数设置",impMode:"导入模式",impConfirm:"导入",impCancel:"取消"},export:{types:{csv:"CSV (逗号分隔)(*.csv)",html:"网页(*.html)",xml:"XML 数据(*.xml)",txt:"文本文件(制表符分隔)(*.txt)",xls:"Excel 97-2003 工作簿(*.xls)",xlsx:"Excel 工作簿(*.xlsx)",pdf:"PDF (*.pdf)"},modes:{empty:"空数据",current:"当前数据(当前页的数据)",selected:"选中数据(当前页选中的数据)",all:"全量数据(包括所有分页的数据)"},printTitle:"打印数据",expTitle:"导出数据",expName:"文件名",expNamePlaceholder:"请输入文件名",expSheetName:"标题",expSheetNamePlaceholder:"请输入标题",expType:"保存类型",expMode:"选择数据",expCurrentColumn:"全部字段",expColumn:"选择字段",widthMode:"列宽设置",wModeTitle:"设置打印时列宽的渲染方式",wdModes:{default:"默认",auto:"自适应(根据内容自适应列宽)",scale:"等比例(根据页面比例渲染列宽)"},expOpts:"参数设置",expOptHeader:"表头",expHeaderTitle:"是否需要表头",expOptFooter:"表尾",expFooterTitle:"是否需要表尾",expOptColgroup:"分组表头",expOptTitle:"列标题",expTitleTitle:"是否为列标题,否则显示为列的字段名",expColgroupTitle:"如果存在,则支持带有分组结构的表头",expOptMerge:"合并",expMergeTitle:"如果存在,则支持带有合并结构的单元格",expOptAllExpand:"展开树",expAllExpandTitle:"如果存在,则支持将带有层级结构的数据全部展开",expOptTreeAllExpand:"展开树",expTreeAllExpandTitle:"如果存在,则自动展开所有树层级",expOptRowGroupAllExpand:"展开分组",expRowGroupAllExpandTitle:"如果存在,则自动展开所有分组层级",expOptUseStyle:"样式",expUseStyleTitle:"如果存在,则支持带样式的单元格",expOptOriginal:"源数据",expOriginalTitle:"如果为源数据,则支持导入到表格中",expPrint:"打印",expConfirm:"导出",expCancel:"取消"},modal:{errTitle:"错误提示",zoomMin:"最小化",zoomIn:"最大化",zoomOut:"还原",close:"关闭",miniMaxSize:"最小化窗口的数量不能超过 {0} 个",footPropErr:"show-footer 仅用于启用表尾,需配合 show-confirm-button | show-cancel-button | 插槽使用"},drawer:{close:"关闭"},form:{folding:"收起",unfolding:"展开"},toolbar:{import:"导入",export:"导出",print:"打印",refresh:"刷新",zoomIn:"全屏",zoomOut:"还原",custom:"个性化设置",customAll:"全部",customConfirm:"确认",customRestore:"重置",fixedLeft:"冻结在左侧",fixedRight:"冻结在右侧",cancelFixed:"取消冻结列"},iconPicker:{search:"搜索",emptyText:"暂无数据"},datePicker:{yearTitle:"{0} 年"},dateRangePicker:{pleaseRange:"请选择开始日期与结束日期"},input:{date:{m1:"01 月",m2:"02 月",m3:"03 月",m4:"04 月",m5:"05 月",m6:"06 月",m7:"07 月",m8:"08 月",m9:"09 月",m10:"10 月",m11:"11 月",m12:"12 月",quarterLabel:"{0} 年",monthLabel:"{0} 年",dayLabel:"{0} 年 {1}",labelFormat:{date:"yyyy-MM-dd",time:"HH:mm:ss",datetime:"yyyy-MM-dd HH:mm:ss",week:"yyyy 年第 WW 周",month:"yyyy-MM",quarter:"yyyy 年第 q 季度",year:"yyyy"},weeks:{w:"",w0:"周日",w1:"周一",w2:"周二",w3:"周三",w4:"周四",w5:"周五",w6:"周六"},months:{m0:"一月",m1:"二月",m2:"三月",m3:"四月",m4:"五月",m5:"六月",m6:"七月",m7:"八月",m8:"九月",m9:"十月",m10:"十一月",m11:"十二月"},quarters:{q1:"第一季度",q2:"第二季度",q3:"第三季度",q4:"第四季度"}}},calendar:{yearLabel:"{0} 年",monthLabel:"{0} 月"},cascader:{clearChecked:"清除",allChecked:"全选",total:"已选 {0} 项",close:"关闭",search:"搜索"},numberInput:{currencySymbol:"¥"},imagePreview:{popupTitle:"预览",operBtn:{zoomOut:"缩小",zoomIn:"放大",pctFull:"等比例缩放",pct11:"显示原始尺寸",rotateLeft:"向左旋转",rotateRight:"向右旋转",print:"点击打印图片",download:"点击下载图片"}},upload:{fileBtnText:"点击或拖拽上传",imgBtnText:"点击或拖拽上传",dragPlaceholder:"请把文件拖放到这个区域即可上传",imgSizeHint:"单张{0}",imgCountHint:"最多{0}张",fileTypeHint:"支持 {0} 文件类型",fileSizeHint:"单个文件大小不超过{0}",fileCountHint:"最多可上传{0}个文件",uploadTypeErr:"文件类型不匹配!",overCountErr:"最多只能选择{0}个文件!",overCountExtraErr:"已超出最大数量{0}个,超出的{1}个文件将被忽略!",overSizeErr:"文件大小最大不能超过{0}!",manualUpload:"点击上传",reUpload:"重新上传",uploadProgress:"上传中 {0}%",uploadErr:"上传失败",uploadSuccess:"上传成功",moreBtnText:"更多({0})",moreImgBtnText:"图片({0})",moreFileBtnText:"文件({0})",viewItemTitle:"点击查看",morePopup:{readTitle:"查看列表",imageTitle:"上传图片",fileTitle:"上传文件"}},empty:{defText:"暂无数据"},colorPicker:{clear:"清除",confirm:"确认",copySuccess:"已复制到剪贴板:{0}",hex:"十六进制"},formDesign:{formName:"表单名称",defFormTitle:"未命名的表单",widgetPropTab:"控件属性",widgetFormTab:"表单属性",error:{wdFormUni:"该类型的控件在表单中只允许添加一个",wdSubUni:"该类型的控件在子表中只允许添加一个"},styleSetting:{btn:"样式设置",title:"表单的样式设置",layoutTitle:"控件布局",verticalLayout:"上下布局",horizontalLayout:"横向布局",styleTitle:"标题样式",boldTitle:"标题加粗",fontBold:"加粗",fontNormal:"常规",colonTitle:"显示冒号",colonVisible:"显示",colonHidden:"隐藏",alignTitle:"对齐方式",widthTitle:"标题宽度",alignLeft:"居左",alignRight:"居右",unitPx:"像素",unitPct:"百分比"},widget:{group:{base:"基础控件",layout:"布局控件",system:"系统控件",module:"模块控件",chart:"图表控件",advanced:"高级控件"},copyTitle:"副本_{0}",component:{input:"输入框",textarea:"文本域",select:"下拉选择",row:"一行多列",title:"标题",text:"文本",subtable:"子表",VxeSwitch:"是/否",VxeInput:"输入框",VxeNumberInput:"数字",VxeDatePicker:"日期",VxeTextarea:"文本域",VxeSelect:"下拉选择",VxeTreeSelect:"树形选择",VxeRadioGroup:"单选框",VxeCheckboxGroup:"复选框",VxeUploadFile:"文件",VxeUploadImage:"图片",VxeRate:"评分",VxeSlider:"滑块"},row:{placeholder:"控件位置"}},widgetProp:{name:"控件名称",placeholder:"提示语",required:"必填校验",multiple:"允许多选",displaySetting:{name:"显示设置",pc:"电脑端",mobile:"手机端",visible:"显示",hidden:"隐藏"},dataSource:{name:"数据源",defValue:"选项{0}",addOption:"添加选项",batchEditOption:"批量编辑",batchEditTip:"每行对应一个选项,支持从表格、Excel、WPS 中直接复制粘贴。",batchEditSubTip:"每行对应一个选项,如果是分组,子项可以是空格或制表键开头,支持从表格、Excel、WPS 中直接复制粘贴。",buildOption:"生成选项"},rowProp:{colSize:"列数",col2:"两列",col3:"三列",col4:"四列",col6:"六列",layout:"布局"},textProp:{name:"内容",alignTitle:"对齐方式",alignLeft:"居左",alignCenter:"居中",alignRight:"居右",colorTitle:"字体颜色",sizeTitle:"字体大小",boldTitle:"字体加粗",fontNormal:"常规",fontBold:"加粗"},subtableProp:{seqTitle:"序号",showSeq:"显示序号",showCheckbox:"允许多选",errSubDrag:"子表不支持该控件,请使用其他控件",colPlace:"将控件拖拽进来"},uploadProp:{limitFileCount:"文件数量限制",limitFileSize:"文件大小限制",multiFile:"允许上传多个文件",limitImgCount:"图片数量限制",limitImgSize:"图片大小限制",multiImg:"允许上传多张图片"},rules:{required:"必填字段"}}},listDesign:{fieldSettingTab:"字段设置",listSettingTab:"参数设置",searchTitle:"查询条件",listTitle:"列表字段",searchField:"查询字段",listField:"列表字段",activeBtn:{ActionButtonUpdate:"编辑",ActionButtonDelete:"删除"},search:{addBtn:"编辑",emptyText:"未配置查询条件",editPopupTitle:"编辑查询字段"},searchPopup:{colTitle:"标题",saveBtn:"保存"}},text:{copySuccess:"已复制到剪贴板",copyError:"当前环境不支持该操作"},countdown:{formats:{yyyy:"年",MM:"月",dd:"天",HH:"时",mm:"分",ss:"秒"}},contextMenu:{loadingText:"加载中..."},switch:{onText:"打开",offText:"关闭"},gantt:{tFullFormat:{year:"{yyyy}年",quarter:"{yyyy}年第{q}季度",month:"{yyyy}年{MM}月",week:"{yyyy}年第{W}周",day:"{yyyy}年{MM}月 {eLabel}",date:"{yyyy}年{MM}月{dd}日",hour:"{yyyy}年{MM}月{dd}日{HH}时",minute:"{yyyy}年{MM}月{dd}日{HH}时{mm}分",second:"{yyyy}年{MM}月{dd}日{HH}时{mm}分{ss}秒"},tSimpleFormat:{year:"{yyyy}年",quarter:"{q}季度",month:"{M}月",week:"{W}周",day:"{eLabel}",date:"{d}",hour:"{HH}",minute:"{mm}",second:"{ss}"},stepFormat:{year:"{start.yyyy}~{end.yyyy}年",quarter:"{start.q}~{end.q}季度",month:"{start.M}~{end.M}月",week:"{start.W}~{end.W}周",day:"{eStartLabel}~{eEndLabel}",date:"{start.d}~{end.d}",hour:"{start.HH}~{end.HH}",minute:"{start.mm}~{end.mm}",second:"{start.ss}~{end.ss}"},dayss:{w0:"日",w1:"一",w2:"二",w3:"三",w4:"四",w5:"五",w6:"六"},days:{w0:"日",w1:"一",w2:"二",w3:"三",w4:"四",w5:"五",w6:"六"}},plugins:{extendCellArea:{area:{mergeErr:"无法对合并单元格进行该操作",multiErr:"无法对多重选择区域进行该操作",selectErr:"无法操作指定区域的单元格",extendErr:"若要执行此操作,所有合并的单元格需大小相同",pasteMultiErr:"无法粘贴,需要相同大小的复制的区域和粘贴的区域才能执行此操作",cpInvalidErr:"该操作无法进行,您选择的区域中存在被禁止的列({0})"},fnr:{title:"查找和替换",titleFd:"查找",titleRe:"替换",findLabel:"查找",replaceLabel:"替换",findTitle:"查找内容:",replaceTitle:"替换为:",tabs:{find:"查找",replace:"替换"},filter:{re:"正则表达式",whole:"全词匹配",sensitive:"区分大小写"},btns:{findNext:"查找下一个",findAll:"查找全部",replace:"替换",replaceAll:"替换全部",cancel:"取消"},header:{seq:"#",cell:"单元格",value:"值"},body:{row:"行:{0}",col:"列:{0}"},empty:"(空值)",reError:"无效的正则表达式",recordCount:"已找到 {0} 个单元格",notCell:"找不到匹配的单元格",replaceSuccess:"成功替换 {0} 个单元格"}},extendPivotTable:{aggregation:{grouping:"分组",values:"值",groupPlaceholder:"拖至此处进行分组",valuesPlaceholder:"拖至此处进行聚合",dragExistCol:"该列已存在",sortHelpTip:"点击图标开始拖动"},aggFuncs:{sum:"求和",count:"计数",avg:"平均值",min:"最小值",max:"最大值",first:"首个值",last:"末尾值"}},filterComplexInput:{menus:{fixedColumn:"冻结列",fixedGroup:"冻结分组",cancelFixed:"取消冻结",fixedLeft:"冻结左侧",fixedRight:"冻结右侧"},cases:{equal:"等于",gt:"大于",lt:"小于",begin:"开头是",endin:"结尾是",include:"包含",isSensitive:"区分大小写"}},filterCombination:{menus:{sort:"排序",clearSort:"清除排序",sortAsc:"升序",sortDesc:"降序",fixedColumn:"冻结列",fixedGroup:"冻结分组",cancelFixed:"取消冻结",fixedLeft:"冻结左侧",fixedRight:"冻结右侧",clearFilter:"清除筛选",textOption:"文本筛选",numberOption:"数值筛选",dateOption:"日期筛选"},popup:{title:"自定义筛选的方式",currColumnTitle:"显示行:",and:"与",or:"或",describeHtml:"可用 ? 代表单个字符<br/>用 * 代表任意多个字符"},cases:{equal:"等于",unequal:"不等于",gt:"大于",ge:"大于或等于",lt:"小于",le:"小于或等于",begin:"开头是",notbegin:"开头不是",endin:"结尾是",notendin:"结尾不是",include:"包含",exclude:"不包含",between:"介于",isAfter:"在以下日期之后",eqAfter:"在以下日期之后或与之相同",isBefore:"在以下日期之前",eqBefore:"在以下日期之前或与之相同",top10:"前10项",aboveAverage:"高于平均值",belowAverage:"低于平均值",before:"之前",after:"之后",tomorrow:"明天",today:"今天",yesterday:"昨天",nextWeek:"下周",thisWeek:"本周",lastWeek:"上周",nextMonth:"下月",thisMonth:"本月",lastMonth:"上月",nextYear:"明年",thisYear:"今年",lastYear:"去年",yearToDate:"本年度截止到现在",custom:"自定义筛选",insensitive:"不区分大小写",isSensitive:"区分大小写"},empty:"(空白)",notData:"无匹配项"}},pro:{area:{mergeErr:"无法对合并单元格进行该操作",multiErr:"无法对多重选择区域进行该操作",extendErr:"若要执行此操作,所有合并的单元格需大小相同",pasteMultiErr:"无法粘贴,需要相同大小的复制的区域和粘贴的区域才能执行此操作"},fnr:{title:"查找和替换",titleFd:"查找",titleRe:"替换",findLabel:"查找",replaceLabel:"替换",findTitle:"查找内容:",replaceTitle:"替换为:",tabs:{find:"查找",replace:"替换"},filter:{re:"正则表达式",whole:"全词匹配",sensitive:"区分大小写"},btns:{findNext:"查找下一个",findAll:"查找全部",replace:"替换",replaceAll:"替换全部",cancel:"取消"},header:{seq:"#",cell:"单元格",value:"值"},empty:"(空值)",reError:"无效的正则表达式",recordCount:"已找到 {0} 个单元格",notCell:"找不到匹配的单元格",replaceSuccess:"成功替换 {0} 个单元格"}},renderer:{search:"搜索",cases:{equal:"等于",unequal:"不等于",gt:"大于",ge:"大于或等于",lt:"小于",le:"小于或等于",begin:"开头是",notbegin:"开头不是",endin:"结尾是",notendin:"结尾不是",include:"包含",exclude:"不包含",between:"介于",top10:"前10项",aboveAverage:"高于平均值",belowAverage:"低于平均值",custom:"自定义筛选",insensitive:"不区分大小写",isSensitive:"区分大小写"},combination:{menus:{sort:"排序",clearSort:"清除排序",sortAsc:"升序",sortDesc:"降序",fixedColumn:"冻结列",fixedGroup:"冻结分组",cancelFixed:"取消冻结",fixedLeft:"冻结到左侧",fixedRight:"冻结到右侧",clearFilter:"清除筛选",textOption:"文本筛选",numberOption:"数值筛选",dateOption:"日期筛选"},popup:{title:"自定义筛选的方式",currColumnTitle:"显示行:",and:"与",or:"或",describeHtml:"可用 ? 代表单个字符<br/>用 * 代表任意多个字符"},empty:"(空白)",notData:"无匹配项"}}}};const Fw=jt(kw);var Di=Object.defineProperty,Aw=Object.getOwnPropertyDescriptor,Ow=Object.getOwnPropertyNames,Rw=Object.prototype.hasOwnProperty,Mw=(e,t)=>{for(var r in t)Di(e,r,{get:t[r],enumerable:!0})},Dw=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Ow(t))!Rw.call(e,i)&&i!==r&&Di(e,i,{get:()=>t[i],enumerable:!(n=Aw(t,i))||n.enumerable});return e},Pw=e=>Dw(Di({},"__esModule",{value:!0}),e),Ss={};Mw(Ss,{default:()=>Bw});var Iw=Pw(Ss),Bw={vxe:{base:{pleaseInput:"Please enter",pleaseSelect:"Please select",comma:",",fullStop:"."},loading:{text:"Loading..."},error:{downErr:"Download failed",errLargeData:"When the bound data volume is too large, please use {0}; otherwise, performance may lag",groupFixed:"If grouped headers are used, fixed columns must be set by group",groupMouseRange:'Grouped headers cannot be used together with "{0}", which may cause errors',groupTag:'Group columns should use "{0}" instead of "{1}", which may cause errors',scrollErrProp:'The parameter "{0}" is not supported after virtual scrolling is enabled',errConflicts:'Parameter "{0}" conflicts with "{1}"',modelConflicts:'The bound field value "{0}" conflicts with "{1}", which will cause errors',notSupportProp:'When parameter "{0}" is enabled, "{1}" is not supported; it should be "{2}", otherwise errors may occur',reqSupportProp:'When using "{0}", "{1}" should be set, otherwise errors may occur',notConflictProp:'When using "{0}", "{1}" should be set, otherwise functional conflicts may occur',unableInsert:"Unable to insert at the specified position. Please check whether the parameters are correct",useErr:'An error occurred while installing the "{0}" module. The order may be incorrect; dependent modules must be installed before Table',barUnableLink:"The toolbar cannot be linked to the table",expandContent:'The slot for the expanded row should be "content". Please check whether it is correct',reqComp:'Missing "{0}" component. Please check whether it is installed correctly. https://vxeui.com/#/start/useUI/useGlobal',reqModule:'Missing "{0}" module',reqProp:'Missing required parameter "{0}", which may cause errors',emptyProp:'Parameter "{0}" cannot be empty',errProp:'Unsupported parameter "{0}", possibly "{1}"',colRepet:'column.{0}="{1}" is duplicated, which may cause some features to be unavailable',notFunc:'Method "{0}" does not exist',errFunc:'Parameter "{0}" is not a method',notValidators:'Global validator "{0}" does not exist',notFormats:'Global formatter "{0}" does not exist',notCommands:'Global command "{0}" does not exist',notSlot:'Slot "{0}" does not exist',noTree:'Tree structure does not support "{0}"',noGroup:'"{0}" is not supported after data grouping',notProp:'Unsupported parameter "{0}"',returnErr:'The return value of parameter "{0}" is expected to be "{1}" but is actually "{2}"',notSupportReturn:'When the return value is "{0}", the parameter should use "{1}" instead of "{2}"',checkProp:'Large data volumes may cause checkbox lag. It is recommended to set parameter "{0}" to improve rendering speed',coverProp:'Parameter "{1}" of "{0}" is defined repeatedly, which may cause errors',uniField:'Field name "{0}" is defined repeatedly, which may cause errors',repeatKey:'Duplicate primary key {0}="{1}", which may cause errors',repeatProp:'Duplicate parameter {0}="{1}", which may cause errors',delFunc:'Method "{0}" is deprecated. Please use "{1}"',delProp:'Parameter "{0}" is deprecated. Please use "{1}"',delEvent:'Event "{0}" is deprecated. Please use "{1}"',removeProp:'Parameter "{0}" is deprecated and not recommended, which may cause errors',errFormat:'Global formatting content should be defined using "VXETable.formats". Mounting "formatter={0}" is no longer recommended',notType:'Unsupported file type "{0}"',notExp:"This browser does not support import/export",impFields:"Import failed. Please check whether field names and data formats are correct",treeNotImp:"Tree table does not support import",treeCrossDrag:"Only the first level can be dragged",treeDragChild:"A parent cannot be dragged into its own children",reqPlugin:'Extension plugin "{1}" is not installed. https://vxeui.com/other{0}/#/{1}/start/npmInstall',errMaxRow:"Exceeds the maximum supported data volume of {0} rows, which may cause errors",useNew:"{0} is not recommended. Please use {1}",errorVersion:"Version mismatch. Current version is {0}, minimum supported version is {1}",errMaxVersion:"Version mismatch. Current version is {0}, maximum supported version is {1}"},table:{emptyText:"No data",allTitle:"Select all/Clear",seqTitle:"No.",actionTitle:"Actions",confirmFilter:"Filter",resetFilter:"Reset",allFilter:"All",sortAsc:"Ascending: lowest to highest",sortDesc:"Descending: highest to lowest",filter:"Enable filtering for the selected column",impSuccess:"Successfully imported {0} records",expLoading:"Exporting",expSuccess:"Export successful",expError:"Export failed",expFilename:"Export_{0}",expOriginFilename:"Export_Source_{0}",customTitle:"Custom settings",customAll:"All",customConfirm:"Confirm",customClose:"Close",customCancel:"Cancel",customRestore:"Restore defaults",maxFixedCol:"The maximum number of fixed columns cannot exceed {0}",maxGroupCol:"The maximum number of grouped fields cannot exceed {0}",dragTip:"Move: {0}",resizeColTip:"Width: {0} px",resizeRowTip:"Height: {0} px",rowGroupContentTotal:"{0} ({1})",menuLoading:"Loading..."},grid:{selectOneRecord:"Please select at least one record!",deleteSelectRecord:"Are you sure you want to delete the selected records?",removeSelectRecord:"Are you sure you want to remove the selected records?",dataUnchanged:"Data has not changed!",delSuccess:"Selected records deleted successfully!",saveSuccess:"Saved successfully!",operError:"An error occurred. Operation failed!"},select:{clear:"Clear",allChecked:"All",total:"{0} selected",close:"Close",search:"Search",loadingText:"Loading...",emptyText:"No data",maxSize:"The maximum number of selectable items cannot exceed {0}",overSizeErr:"The maximum selectable count of {0} has been exceeded. The excess will be ignored!",searchEmpty:"No matching data!"},list:{allChecked:"All",dragTip:"Move: {0}"},tree:{searchEmpty:"No matching data!",dragTip:"Move: {0}"},treeSelect:{clearChecked:"Clear",allChecked:"All",allExpand:"Expand all",clearExpand:"Collapse all",total:"{0} selected",filterCount:"{0} records found",close:"Close",search:"Search",emptyText:"No data"},tableSelect:{filterCount:"{0} records found"},pager:{goto:"Go to",gotoTitle:"Page",pagesize:"{0}/page",total:"Total {0} records",pageClassifier:"Page",homePage:"Home",homePageTitle:"Home",prevPage:"Previous",prevPageTitle:"Previous",nextPage:"Next",nextPageTitle:"Next",prevJump:"Jump up",prevJumpTitle:"Jump up",nextJump:"Jump down",nextJumpTitle:"Jump down",endPage:"Last",endPageTitle:"Last"},alert:{title:"System prompt"},button:{confirm:"Confirm",cancel:"Cancel",clear:"Clear"},filter:{search:"Search"},custom:{cstmTitle:"Custom settings",cstmRestore:"Restore defaults",cstmCancel:"Cancel",cstmConfirm:"OK",cstmConfirmRestore:"Are you sure you want to restore the default column configuration?",cstmDragTarget:"Move: {0}",setting:{colSort:"Sort",sortHelpTip:"Click the icon to start dragging",colTitle:"Column title",colResizable:"Column width (px)",colVisible:"Visible",colFixed:"Fixed column",colFixedMax:"Fixed columns ({0})",colAlign:"Alignment",colHeadAlign:"Header alignment",colFootAlign:"Footer alignment",fixedLeft:"Left",fixedUnset:"None",fixedRight:"Right",alignLeft:"Left",alignCenter:"Center",alignRight:"Right",moveUp:"Up",moveDn:"Down",putTop:"Top",putBottom:"Bottom",moveUpTitle:"Click to move up",moveDnTitle:"Click to move down",putTopTitle:"Click to move to top",putBottomTitle:"Click to move to bottom",anLeftTitle:"Align left",anCenterTitle:"Align center",anRightTitle:"Align right"}},import:{modes:{covering:"Cover (directly overwrite table data)",insert:"Append at bottom (append new data to the bottom of the table)",insertTop:"Append at top (append new data to the top of the table)",insertBottom:"Append at bottom (append new data to the bottom of the table)"},impTitle:"Import data",impFile:"File name",impSelect:"Select file",impType:"File type",impOpts:"Options",impMode:"Import mode",impConfirm:"Import",impCancel:"Cancel"},export:{types:{csv:"CSV (comma separated)(*.csv)",html:"Web page (*.html)",xml:"XML data (*.xml)",txt:"Text file (tab separated)(*.txt)",xls:"Excel 97-2003 Workbook (*.xls)",xlsx:"Excel workbook (*.xlsx)",pdf:"PDF (*.pdf)"},modes:{empty:"Empty data",current:"Current data (data on the current page)",selected:"Selected data (data selected on the current page)",all:"All data (including data on all pages)"},printTitle:"Print data",expTitle:"Export data",expName:"File name",expNamePlaceholder:"Please enter a file name",expSheetName:"Title",expSheetNamePlaceholder:"Please enter a title",expType:"Save type",expMode:"Select data",expCurrentColumn:"All fields",expColumn:"Select fields",widthMode:"Column width settings",wModeTitle:"Set how column widths are rendered when printing",wdModes:{default:"Default",auto:"Auto (adjust column widths based on content)",scale:"Scale (render column widths according to page scale)"},expOpts:"Options",expOptHeader:"Header",expHeaderTitle:"Whether a header is needed",expOptFooter:"Footer",expFooterTitle:"Whether a footer is needed",expOptColgroup:"Grouped header",expOptTitle:"Column titles",expTitleTitle:"Whether to use column titles; otherwise, display field names",expColgroupTitle:"If present, supports headers with grouped structure",expOptMerge:"Merge",expMergeTitle:"If present, supports cells with merged structure",expOptAllExpand:"Expand tree",expAllExpandTitle:"If present, supports fully expanding hierarchical data",expOptTreeAllExpand:"Expand tree",expTreeAllExpandTitle:"If present, automatically expands all tree levels",expOptRowGroupAllExpand:"Expand groups",expRowGroupAllExpandTitle:"If present, automatically expands all group levels",expOptUseStyle:"Styles",expUseStyleTitle:"If present, supports styled cells",expOptOriginal:"Source data",expOriginalTitle:"If source data, supports importing into the table",expPrint:"Print",expConfirm:"Export",expCancel:"Cancel"},modal:{errTitle:"Error",zoomMin:"Minimize",zoomIn:"Maximize",zoomOut:"Restore",close:"Close",miniMaxSize:"The number of minimized windows cannot exceed {0}",footPropErr:"show-footer is only used to enable the footer and must be used with show-confirm-button | show-cancel-button | slots"},drawer:{close:"Close"},form:{folding:"Collapse",unfolding:"Expand"},toolbar:{import:"Import",export:"Export",print:"Print",refresh:"Refresh",zoomIn:"Fullscreen",zoomOut:"Restore",custom:"Custom settings",customAll:"All",customConfirm:"Confirm",customRestore:"Reset",fixedLeft:"Freeze left",fixedRight:"Freeze right",cancelFixed:"Unfreeze"},iconPicker:{search:"Search",emptyText:"No data"},datePicker:{yearTitle:"{0}"},dateRangePicker:{pleaseRange:"Please select a start date and an end date"},input:{date:{m1:"Jan",m2:"Feb",m3:"Mar",m4:"Apr",m5:"May",m6:"Jun",m7:"Jul",m8:"Aug",m9:"Sep",m10:"Oct",m11:"Nov",m12:"Dec",quarterLabel:"{0}",monthLabel:"{0}",dayLabel:"{0} {1}",labelFormat:{date:"yyyy-MM-dd",time:"HH:mm:ss",datetime:"yyyy-MM-dd HH:mm:ss",week:"Week WW, yyyy",month:"yyyy-MM",quarter:"Qq yyyy",year:"yyyy"},weeks:{w:"",w0:"Sun",w1:"Mon",w2:"Tue",w3:"Wed",w4:"Thu",w5:"Fri",w6:"Sat"},months:{m0:"January",m1:"February",m2:"March",m3:"April",m4:"May",m5:"June",m6:"July",m7:"August",m8:"September",m9:"October",m10:"November",m11:"December"},quarters:{q1:"Q1",q2:"Q2",q3:"Q3",q4:"Q4"}}},calendar:{yearLabel:"{0}",monthLabel:"{0}"},cascader:{clearChecked:"Clear",allChecked:"All",total:"{0} selected",close:"Close",search:"Search"},numberInput:{currencySymbol:"$"},imagePreview:{popupTitle:"Preview",operBtn:{zoomOut:"Zoom out",zoomIn:"Zoom in",pctFull:"Fit to page",pct11:"Original size",rotateLeft:"Rotate left",rotateRight:"Rotate right",print:"Click to print image",download:"Click to download image"}},upload:{fileBtnText:"Click or drag to upload",imgBtnText:"Click or drag to upload",dragPlaceholder:"Drag files here to upload",imgSizeHint:"Single image {0}",imgCountHint:"Up to {0} images",fileTypeHint:"Supports {0} file types",fileSizeHint:"Single file size must not exceed {0}",fileCountHint:"Up to {0} files can be uploaded",uploadTypeErr:"File type mismatch!",overCountErr:"You can select up to {0} files!",overCountExtraErr:"The maximum count of {0} has been exceeded. The excess {1} files will be ignored!",overSizeErr:"File size cannot exceed {0}!",manualUpload:"Click to upload",reUpload:"Re-upload",uploadProgress:"Uploading {0}%",uploadErr:"Upload failed",uploadSuccess:"Upload successful",moreBtnText:"More ({0})",moreImgBtnText:"Images ({0})",moreFileBtnText:"Files ({0})",viewItemTitle:"Click to view",morePopup:{readTitle:"View list",imageTitle:"Upload images",fileTitle:"Upload files"}},empty:{defText:"No data"},colorPicker:{clear:"Clear",confirm:"Confirm",copySuccess:"Copied to clipboard: {0}",hex:"HEX"},formDesign:{formName:"Form name",defFormTitle:"Untitled form",widgetPropTab:"Widget properties",widgetFormTab:"Form properties",error:{wdFormUni:"Only one widget of this type can be added to the form",wdSubUni:"Only one widget of this type can be added to the subtable"},styleSetting:{btn:"Style settings",title:"Form style settings",layoutTitle:"Widget layout",verticalLayout:"Vertical layout",horizontalLayout:"Horizontal layout",styleTitle:"Title style",boldTitle:"Bold title",fontBold:"Bold",fontNormal:"Normal",colonTitle:"Show colon",colonVisible:"Show",colonHidden:"Hide",alignTitle:"Alignment",widthTitle:"Title width",alignLeft:"Left",alignRight:"Right",unitPx:"px",unitPct:"%"},widget:{group:{base:"Basic widgets",layout:"Layout widgets",system:"System widgets",module:"Module widgets",chart:"Chart widgets",advanced:"Advanced widgets"},copyTitle:"Copy_{0}",component:{input:"Input",textarea:"Textarea",select:"Select",row:"Row with multiple columns",title:"Title",text:"Text",subtable:"Subtable",VxeSwitch:"Yes/No",VxeInput:"Input",VxeNumberInput:"Number",VxeDatePicker:"Date",VxeTextarea:"Textarea",VxeSelect:"Select",VxeTreeSelect:"Tree select",VxeRadioGroup:"Radio group",VxeCheckboxGroup:"Checkbox group",VxeUploadFile:"File",VxeUploadImage:"Image",VxeRate:"Rate",VxeSlider:"Slider"},row:{placeholder:"widget position"}},widgetProp:{name:"Widget name",placeholder:"Placeholder",required:"Required validation",multiple:"Allow multiple selection",displaySetting:{name:"Display settings",pc:"Desktop",mobile:"Mobile",visible:"Visible",hidden:"Hidden"},dataSource:{name:"Data source",defValue:"Option {0}",addOption:"Add option",batchEditOption:"Batch edit",batchEditTip:"Each line corresponds to one option. You can copy and paste directly from tables, Excel, or WPS.",batchEditSubTip:"Each line corresponds to one option. For groups, sub-items can start with spaces or tabs. You can copy and paste directly from tables, Excel, or WPS.",buildOption:"Generate options"},rowProp:{colSize:"Columns",col2:"Two columns",col3:"Three columns",col4:"Four columns",col6:"Six columns",layout:"Layout"},textProp:{name:"Content",alignTitle:"Alignment",alignLeft:"Left",alignCenter:"Center",alignRight:"Right",colorTitle:"Font color",sizeTitle:"Font size",boldTitle:"Bold font",fontNormal:"Normal",fontBold:"Bold"},subtableProp:{seqTitle:"No.",showSeq:"Show row number",showCheckbox:"Allow multiple selection",errSubDrag:"This widget is not supported in subtables. Please use another widget",colPlace:"Drag a widget here"},uploadProp:{limitFileCount:"File count limit",limitFileSize:"File size limit",multiFile:"Allow uploading multiple files",limitImgCount:"Image count limit",limitImgSize:"Image size limit",multiImg:"Allow uploading multiple images"},rules:{required:"Required field"}}},listDesign:{fieldSettingTab:"Field settings",listSettingTab:"Options",searchTitle:"Search conditions",listTitle:"List fields",searchField:"Search field",listField:"List field",activeBtn:{ActionButtonUpdate:"Edit",ActionButtonDelete:"Delete"},search:{addBtn:"Edit",emptyText:"No search conditions configured",editPopupTitle:"Edit search field"},searchPopup:{colTitle:"Title",saveBtn:"Save"}},text:{copySuccess:"Copied to clipboard",copyError:"This operation is not supported in the current environment"},countdown:{formats:{yyyy:"Year",MM:"Month",dd:"Day",HH:"Hour",mm:"Minute",ss:"Second"}},contextMenu:{loadingText:"Loading..."},switch:{onText:"On",offText:"Off"},gantt:{tFullFormat:{year:"{yyyy}",quarter:"Q{q} {yyyy}",month:"{MM}/{yyyy}",week:"Week {W}, {yyyy}",day:"{MM}/{dd}/{yyyy} {eLabel}",date:"{MM}/{dd}/{yyyy}",hour:"{MM}/{dd}/{yyyy} {HH}:00",minute:"{MM}/{dd}/{yyyy} {HH}:{mm}",second:"{MM}/{dd}/{yyyy} {HH}:{mm}:{ss}"},tSimpleFormat:{year:"{yyyy}",quarter:"Q{q}",month:"{M}",week:"W{W}",day:"{eLabel}",date:"{d}",hour:"{HH}",minute:"{mm}",second:"{ss}"},stepFormat:{year:"{start.yyyy}~{end.yyyy}",quarter:"Q{start.q}~Q{end.q}",month:"{start.M}~{end.M}",week:"W{start.W}~W{end.W}",day:"{sE}~{eE}",date:"{start.d}~{end.d}",hour:"{start.HH}~{end.HH}",minute:"{start.mm}~{end.mm}",second:"{start.ss}~{end.ss}"},dayss:{w0:"Sun",w1:"Mon",w2:"Tue",w3:"Wed",w4:"Thu",w5:"Fri",w6:"Sat"},days:{w0:"Sun",w1:"Mon",w2:"Tue",w3:"Wed",w4:"Thu",w5:"Fri",w6:"Sat"}},plugins:{extendCellArea:{area:{mergeErr:"This operation cannot be performed on merged cells",multiErr:"This operation cannot be performed on multiple selected areas",selectErr:"Cannot operate on cells in the specified area",extendErr:"To perform this operation, all merged cells must be the same size",pasteMultiErr:"Cannot paste. The copied area and the paste area must be the same size to perform this operation",cpInvalidErr:"This operation cannot be performed because the selected area contains prohibited columns ({0})"},fnr:{title:"Find and replace",titleFd:"Find",titleRe:"Replace",findLabel:"Find",replaceLabel:"Replace",findTitle:"Find what:",replaceTitle:"Replace with:",tabs:{find:"Find",replace:"Replace"},filter:{re:"Regular expression",whole:"Match whole word",sensitive:"Case sensitive"},btns:{findNext:"Find next",findAll:"Find all",replace:"Replace",replaceAll:"Replace all",cancel:"Cancel"},header:{seq:"#",cell:"Cell",value:"Value"},body:{row:"Row: {0}",col:"Column: {0}"},empty:"(empty)",reError:"Invalid regular expression",recordCount:"{0} cells found",notCell:"No matching cell found",replaceSuccess:"Successfully replaced {0} cells"}},extendPivotTable:{aggregation:{grouping:"Group",values:"Values",groupPlaceholder:"Drag here to group",valuesPlaceholder:"Drag here to aggregate",dragExistCol:"This column already exists",sortHelpTip:"Click the icon to start dragging"},aggFuncs:{sum:"Sum",count:"Count",avg:"Average",min:"Min",max:"Max",first:"First",last:"Last"}},filterComplexInput:{menus:{fixedColumn:"Fixed column",fixedGroup:"Fixed group",cancelFixed:"Unfix",fixedLeft:"Fix left",fixedRight:"Fix right"},cases:{equal:"Equals",gt:"Greater",lt:"Less",begin:"Begins",endin:"Ends",include:"Contains",isSensitive:"Case sensitive"}},filterCombination:{menus:{sort:"Sort",clearSort:"Clear sort",sortAsc:"Ascending",sortDesc:"Descending",fixedColumn:"Freeze column",fixedGroup:"Freeze group",cancelFixed:"Unfreeze",fixedLeft:"Fix left",fixedRight:"Fix right",clearFilter:"Clear filter",textOption:"Text filter",numberOption:"Number filter",dateOption:"Date filter"},popup:{title:"Custom filter method",currColumnTitle:"Show rows:",and:"And",or:"Or",describeHtml:"Available? Represents a single character<br/>Use * Represents any multiple characters"},cases:{equal:"Equals",unequal:"Not equal",gt:"Greater",ge:"Greater or equal",lt:"Less",le:"Less or equal",begin:"Start",notbegin:"It's not at the beginning",endin:"End",notendin:"The ending is not",include:"Include",exclude:"Not included",between:"Between",isAfter:"Is after",eqAfter:"Is on or after",isBefore:"Is before",eqBefore:"Is on or before",top10:"Top 10",aboveAverage:"Above average",belowAverage:"Below average",before:"Before",after:"After",tomorrow:"Tomorrow",today:"Today",yesterday:"Yesterday",nextWeek:"Next Week",thisWeek:"This Week",lastWeek:"Last Week",nextMonth:"Next Month",thisMonth:"This Month",lastMonth:"Last Month",nextYear:"Next Year",thisYear:"This Year",lastYear:"Last Year",yearToDate:"Year to Date",custom:"Custom filter",insensitive:"Case insensitive",isSensitive:"Case sensitive"},empty:"(blank)",notData:"No matches"}},pro:{area:{mergeErr:"This operation cannot be performed on merged cells",multiErr:"This operation cannot be performed on multiple selected areas",extendErr:"To perform this operation, all merged cells must be the same size",pasteMultiErr:"Cannot paste. The copied area and the paste area must be the same size to perform this operation"},fnr:{title:"Find and replace",titleFd:"Find",titleRe:"Replace",findLabel:"Find",replaceLabel:"Replace",findTitle:"Find what:",replaceTitle:"Replace with:",tabs:{find:"Find",replace:"Replace"},filter:{re:"Regular expression",whole:"Match whole word",sensitive:"Case sensitive"},btns:{findNext:"Find next",findAll:"Find all",replace:"Replace",replaceAll:"Replace all",cancel:"Cancel"},header:{seq:"#",cell:"Cell",value:"Value"},empty:"(empty)",reError:"Invalid regular expression",recordCount:"{0} cells found",notCell:"No matching cell found",replaceSuccess:"Successfully replaced {0} cells"}},renderer:{search:"Search",cases:{equal:"Equals",unequal:"Not equal",gt:"Greater",ge:"Greater or equal",lt:"Less",le:"Less or equal",begin:"Begins",notbegin:"Not begin",endin:"Ends",notendin:"Not end",include:"Contains",exclude:"Not contain",between:"Between",top10:"Top 10",aboveAverage:"Above average",belowAverage:"Below average",custom:"Custom filter",insensitive:"Case insensitive",isSensitive:"Case sensitive"},combination:{menus:{sort:"Sort",clearSort:"Clear sort",sortAsc:"Ascending",sortDesc:"Descending",fixedColumn:"Freeze column",fixedGroup:"Freeze group",cancelFixed:"Unfreeze",fixedLeft:"Fix left",fixedRight:"Fix right",clearFilter:"Clear filter",textOption:"Text filter",numberOption:"Number filter",dateOption:"Date filter"},popup:{title:"Custom filter method",currColumnTitle:"Show rows:",and:"And",or:"Or",describeHtml:"Use ? for a single character<br/>Use * for any number of characters"},empty:"(blank)",notData:"No matches"}}}};const jw=jt(Iw);Mt.VxeUI.setI18n("zh-CN",Fw),Mt.VxeUI.setI18n("en-US",jw);const Nw=(e,t)=>{e.component("ab-drawer",vs),e.component("ab-table",bl),e.component("ab-table-detail",ka);const{isZhCN:r}=Ce();r()?Mt.VxeUI.setLanguage("zh-CN"):Mt.VxeUI.setLanguage("en-US")},Vw={class:"ab-detail__title"},Lw=l.defineComponent({name:"AbDetail",__name:"ab-detail",props:l.mergeModels({title:{},id:{},idField:{},idFieldTable:{},modelValue:{},rule:{},validRules:{},permiPrefix:{},getHandler:{},createHandler:{},updateHandler:{},deleteHandler:{},vertical:{type:Boolean},detailLevel:{default:1},editable:{type:Boolean,default:!0},readonly:{type:Boolean,default:!0}},{modelValue:{},modelModifiers:{}}),emits:l.mergeModels(["open","close"],["update:modelValue"]),setup(e,{expose:t,emit:r}){const n=r,i=e,{t:o}=Ke(),a=ut.useRoute(),s=l.ref(),c=l.ref({}),u=l.ref({}),d=l.useModel(e,"modelValue");l.ref(i.vertical);const f=l.ref(i.readonly);l.watch(()=>i.readonly,x=>f.value=x,{immediate:!0}),l.computed(()=>i.detailLevel&&i.detailLevel<5?`${76-i.detailLevel*8}%`:"32%");const h=l.computed(()=>i.id),p=l.computed(()=>{var x,_;return!((x=d.value)!=null&&x[i.idField])||((_=d.value)==null?void 0:_[i.idField])==="new"}),m=l.computed(()=>p.value?`${o("action.create")} - ${i.title||(a==null?void 0:a.meta.title)||""}`:f.value?`${o("action.detail")} - ${i.title||(a==null?void 0:a.meta.title)||""}`:`${o("action.edit")} - ${i.title||(a==null?void 0:a.meta.title)||""}`),g=l.computed(()=>{var x;return((x=i.rule)!=null?x:[]).map(_=>typeof _.getRule=="function"?_.getRule():_)}),y=()=>{var x;f.value=!1,(x=c.value)==null||x.refresh()},b=()=>ye(this,null,function*(){T.value=!0;let x;p.value&&typeof i.createHandler=="function"?(x=yield i.createHandler(d.value),x&&(d.value[i.idField]=x),yield l.nextTick()):!p.value&&typeof i.updateHandler=="function"&&(x=yield i.updateHandler(d.value)),console.warn("saveHandler: ",JSON.stringify(d.value,null,2)),T.value=!1}),S=()=>{var x;f.value=!0,(x=c.value)==null||x.refresh()},$=()=>V(),L=l.computed(()=>{let x=dt(g.value.find(_=>_.type!==fe.OPERATE&&_.field===fe.OPERATE));return x||(x={type:"ElRow",field:fe.OPERATE,title:"操作",width:260,fixed:"right",children:[]}),x.children=vt(x==null?void 0:x.children,_=>_.field!==fe.DETAIL),x!=null&&x.children&&Array.isArray(x==null?void 0:x.children)&&x.children.push({type:"ElButton",children:[{type:"icon",props:{icon:"ep:edit-pen"}},o("action.edit")],props:{type:"primary"},computed:{hidden:!f.value},on:{click:y}},{type:"ElButton",children:[{type:"icon",props:{icon:"ep:check"}},o("action.save")],props:{type:"success",plain:!0},computed:{hidden:f.value},on:{click:b}},{type:"ElButton",children:[{type:"icon",props:{icon:"ep:refresh-right"}},o("action.cancel")],computed:{hidden:f.value},on:{click:S}},{type:"ElButton",children:[{type:"icon",props:{icon:"ep:back"}},o("action.return")],on:{click:$}}),x}),R=l.computed(()=>l.reactive(vt(g.value,x=>x.type!==fe.OPERATE&&x.field!==fe.OPERATE).map(x=>Nf(x,(_,F)=>{if(F==="component"&&_&&typeof _=="object")return l.markRaw(l.toRaw(_))})))),T=l.ref(!1),E=()=>ye(this,null,function*(){T.value=!0,console.log("abDetail.init: ",h==null?void 0:h.value,L.value),h.value&&typeof i.getHandler=="function"?d.value=yield i.getHandler(h.value):d.value={},T.value=!1});l.onMounted(()=>E());const k=(x=void 0,_=!1)=>ye(this,null,function*(){var F,A;if(f.value=_,T.value=!0,typeof i.getHandler=="function"&&(x!=null&&x[i.idField])){const C=yield i.getHandler(x==null?void 0:x[i.idField]);d.value=C||{}}else{const C=dt(x)||{};(F=i.rule)==null||F.forEach(B=>{const I=typeof B.getRule=="function"?B.getRule():B;I.field&&I.field!==fe.OPERATE&&typeof(C==null?void 0:C[I.field])=="undefined"&&typeof I.edit=="undefined"&&typeof I.itemRender=="undefined"&&(C[I.field]="")}),d.value=C}yield l.nextTick(),(A=c.value)==null||A.refresh(),n("open",d.value),T.value=!1}),V=()=>{f.value=!0,d.value={},n("close")};return t({open:k,close:V,toggle:(x=!1,_=void 0,F=!1)=>x?k(_,F):V(),reload:()=>ye(this,null,function*(){if(typeof i.getHandler!="function"||!d.value[i.idField]){console.error("abTableDetail.reload: no getHandler or no idField!");return}const x=yield i.getHandler(d.value[i.idField]);k(x,f.value)})}),(x,_)=>{const F=l.resolveComponent("el-card"),A=l.resolveComponent("ab-form"),C=l.resolveDirective("loading");return l.openBlock(),l.createElementBlock(l.Fragment,null,[l.createVNode(F,{class:"ab-detail__header w-full sticky top-0 z-9",shadow:"never"},{default:l.withCtx(()=>[l.createElementVNode("div",Vw,l.toDisplayString(m.value),1),l.withDirectives(l.createVNode(jr,{class:"ab-detail__opr","permi-prefix":e.permiPrefix,rule:L.value,"model-value":d.value,api:u.value,"onUpdate:api":_[0]||(_[0]=B=>u.value=B),plain:"",readonly:f.value},null,8,["permi-prefix","rule","model-value","api","readonly"]),[[C,T.value]])]),_:1}),l.createVNode(F,{class:"ab-detail__form",shadow:"never"},{default:l.withCtx(()=>[l.withDirectives(l.createVNode(A,{ref_key:"formRef",ref:s,rule:R.value,modelValue:d.value,"onUpdate:modelValue":_[1]||(_[1]=B=>d.value=B),api:c.value,"onUpdate:api":_[2]||(_[2]=B=>c.value=B),"id-field":e.idField,"id-field-table":e.idFieldTable,readonly:f.value},null,8,["rule","modelValue","api","id-field","id-field-table","readonly"]),[[C,T.value]])]),_:1})],64)}}}),Hw=(e,t)=>{e.component("ab-detail",Lw)},zw={key:0,class:"ab-toolbar__title"},Uw={class:"ab-toolbar__title"},qw=l.defineComponent({name:"AbToolbar",__name:"ab-toolbar",props:l.mergeModels({title:{},permiPrefix:{},rule:{},queryHandler:{},refreshEnable:{type:Boolean,default:!0},exportEnable:{type:Boolean,default:!1},settingEnable:{type:Boolean,default:!0},btnTreeEnable:{type:Boolean},classNmae:{}},{vertical:{type:Boolean,default:!1},verticalModifiers:{}}),emits:["update:vertical"],setup(e,{expose:t}){const r=e,n=l.inject("abTableRef",null),i=ut.useRoute(),{wsCache:o}=Ce(),a=l.computed(()=>o.getCurrentSize||"default"),s=l.computed(()=>$a(a.value));l.useModel(e,"vertical");const c=l.ref(!1),u=l.computed(()=>{var g;if(!r.rule||Array.isArray(r.rule)&&!((g=r.rule)!=null&&g.length))return;const p=dt(r.rule);return Array.isArray(p)?{type:"ElRow",children:[...p]}:p}),d=l.computed(()=>{var p;if(r.queryHandler)return r.queryHandler;if(typeof((p=n==null?void 0:n.value)==null?void 0:p.reload)=="function")return n.value.reload}),f=l.ref();return l.onMounted(()=>{var p;(p=n.value)==null||p.tableRef.connect(f.value)}),t({getTitle:()=>r.title}),(p,m)=>{const g=l.resolveComponent("vxe-toolbar");return l.openBlock(),l.createBlock(g,{ref_key:"toolbarRef",ref:f,class:"ab-toolbar","class-name":e.classNmae,size:s.value,loading:c.value,export:e.exportEnable,refresh:e.refreshEnable,"refresh-options":e.refreshEnable&&d.value?{queryMethod:d.value}:void 0,custom:!!e.settingEnable},{buttons:l.withCtx(()=>[e.title?(l.openBlock(),l.createElementBlock("div",zw,[l.renderSlot(p.$slots,"icon"),l.createTextVNode(" "+l.toDisplayString(e.title),1)])):l.renderSlot(p.$slots,"buttons",{},()=>{var y,b;return[l.createElementVNode("div",Uw,l.toDisplayString(((b=(y=l.unref(i))==null?void 0:y.meta)==null?void 0:b.title)||""),1)]},void 0,1)]),tools:l.withCtx(()=>[l.renderSlot(p.$slots,"tools"),l.createVNode(jr,{"permi-prefix":e.permiPrefix,rule:u.value,plain:""},null,8,["permi-prefix","rule"])]),_:3},8,["class-name","size","loading","export","refresh","refresh-options","custom"])}}}),Yw=(e,t)=>{e.component("ab-toolbar",qw)},ln=ww();typeof window!="undefined"&&(window.abForm=ln);const Gw=ln.maker;function Ww(e,t){t!=null&&t.upload&&e.provide(ls,t.upload),qt(e,{AbForm:ln}),eh(e),vw(e),Nw(e),Hw(e),Yw(e)}Y.AbForm=ln,Y.AbTable=bl,Y.AbTableDetail=ka,Y.AbTableEnum=fe,Y.AbUploadFile=cs,Y.CACHE_KEY=ot,Y.en=qo,Y.getCurrentSize=Zo,Y.getLang=rr,Y.getTheme=Jo,Y.getUser=ea,Y.isDark=Ko,Y.isZhCN=xt,Y.maker=Gw,Y.setCurrentSize=Qo,Y.setLang=Go,Y.setTheme=Wo,Y.setUser=Xo,Y.setupArchbizKit=Ww,Y.useCache=Ce,Y.zhCN=Yo,Object.defineProperty(Y,Symbol.toStringTag,{value:"Module"})});
|
|
9
|
+
rule: `+JSON.stringify(typeof n.getRule==`function`?n.getRule():n):``)}function Hs(e,t){console.error(Vs(`err`,e,t))}function Us(e){Hs(e instanceof Error?e.toString():String(e)),console.error(e)}var Ws=[`props`],Gs=[`class`,`style`,`directives`],Ks=[`on`,`hook`],qs=`[[T-FORM-PREFIX-`,Js=`-T-FORM-SUFFIX]]`;function Ys(e){return Function(`return ${e}`)()}function Xs(e,t){let n=zs(Array.isArray(e)?[]:{},e,!0),r=JSON.stringify(n,function(e,t){var n;if(typeof t==`object`&&t&&Reflect.get(t,`_isVue`)===!0)return;if(typeof t!=`function`)return t;let r=t;if(r.__json)return r.__json;let i=(n=r.__origin)==null?t:n;if(!r.__emit)return`${qs}${i}${Js}`},t);if(r===void 0)throw TypeError(`Unable to serialize the provided value as JSON.`);return r}function Zs(e,t){if(typeof e!=`string`||e.length<=4)return e;let n=e.trim(),r=!1;try{if(n.indexOf(Js)>0&&n.indexOf(qs)===0)n=n.replace(Js,``).replace(qs,``),r=!0;else if(n.indexOf(`$FN:`)===0)n=n.substring(4),r=!0;else if(n.indexOf(`$EXEC:`)===0)n=n.substring(6),r=!0;else if(n.indexOf(`$GLOBAL:`)===0){let t=n.substring(8),r=function(...e){let n=e[0].api.getGlobalEvent(t);if(typeof n==`function`)return n.apply(this,e)};return r.__json=e,r.__inject=!0,r}else if(n.indexOf(`$FNX:`)===0){let t=Ys(`function($inject){\n${n.substring(5)}\n}`);return t.__json=e,t.__inject=!0,t}else(!t&&n.indexOf(`function `)===0&&n!==`function `||!t&&n.indexOf(`function(`)===0&&n!==`function(`)&&(r=!0);if(!r)return e;let i;try{i=Ys(n)}catch(e){i=Ys(`function ${n}`)}return i.__json=e,i}catch(e){Hs(`解析失败:${n}\n\nerr: ${String(e)}`);return}}function Qs(e,t){return JSON.parse(e,function(e,n){return typeof n==`string`?Zs(n,t):n})}function $s(e){"@babel/helpers - typeof";return $s=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},$s(e)}function ec(e,t){if($s(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if($s(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function tc(e){var t=ec(e,`string`);return $s(t)==`symbol`?t:t+``}function nc(e,t,n){return(t=tc(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function rc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function ic(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?rc(Object(n),!0).forEach(function(t){nc(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rc(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var ac=(e,t={},n={})=>{let r=[...Ws,...n.normal||[]],i=[...Gs,...n.array||[]],a=[...Ks,...n.functional||[]],o=n.props||[];return e.reduce((e,t)=>{for(let n in t)if(e[n]){if(o.indexOf(n)>-1)e[n]=ac([t[n]],e[n]);else if(r.indexOf(n)>-1)e[n]=ic(ic({},e[n]),t[n]);else if(i.indexOf(n)>-1){let r=e[n]instanceof Array?e[n]:[e[n]],i=t[n]instanceof Array?t[n]:[t[n]];e[n]=[...r,...i]}else if(a.indexOf(n)>-1)for(let r in t[n])if(e[n][r]){let i=e[n][r]instanceof Array?e[n][r]:[e[n][r]],a=t[n][r]instanceof Array?t[n][r]:[t[n][r]];e[n][r]=[...i,...a]}else e[n][r]=t[n][r];else if(n===`hook`)for(let r in t[n])e[n][r]?e[n][r]=oc(e[n][r],t[n][r]):e[n][r]=t[n][r];else e[n]=t[n]}else e[n]=r.indexOf(n)>-1||a.indexOf(n)>-1||o.indexOf(n)>-1?ic({},t[n]):i.indexOf(n)>-1?t[n]instanceof Array?[...t[n]]:typeof t[n]==`object`?ic({},t[n]):t[n]:t[n];return e},t)},oc=(e,t)=>function(...n){e&&e.apply(this,n),t&&t.apply(this,n)};function sc(e,t){let n=null;return function(...r){n!==null&&clearTimeout(n),n=setTimeout(()=>e.apply(this,r),t)}}function cc(e,t,n){let r=e,i;return(t||``).split(`.`).forEach(e=>{i&&(r[i]&&typeof r[i]==`object`||(r[i]={}),r=r[i]),i=e}),r[String(i)]=n,r}function K(e,...t){return(Object.assign||function(e,...t){for(let n of t)for(let t in n)Object.prototype.hasOwnProperty.call(n,t)&&U(e,t,Reflect.get(n,t));return e})(e,...t)}function lc(e){return typeof e!=`object`||!e?e:Array.isArray(e)?[...e]:ic({},e)}function uc(e=new Map){let t={$on(t,n){let r=e.get(t);r&&r.push(n)||e.set(t,[n])},$once(e,n){n._once=!0,t.$on(e,n)},$off(t,n){let r=e.get(t);r&&r.splice(r.indexOf(n)>>>0,1)},$emit(n,...r){(e.get(n)||[]).slice().forEach(e=>{`_once`in e&&e._once&&(t.$off(n,e),delete e._once),e(...r)}),(e.get(`*`)||[]).slice().forEach(e=>{e(n,r)})}};return t}function dc(e){return e&&typeof e==`object`&&typeof e.then==`function`}function fc(e){return dc(e)?e:Promise.resolve(e)}function pc(e){return Array.isArray(e)?e:e==null||e===``?[]:[e]}function q(e){return mc(e==null?void 0:e.replace(/(-[a-z])/g,function(e){return e.replace(`-`,``).toLocaleUpperCase()}))}function mc(e){return e==null?void 0:e.replace(e[0],e[0].toLowerCase())}function hc(e){return e?typeof e==`object`?JSON.stringify(e,null,2):String(e):``}var gc=0;function _c(){let e=370+ ++gc;return`F`+Math.random().toString(36).substr(3,3)+Number(`${Date.now()}`).toString(36)+e.toString(36)+`c`}function vc(e,t,n={}){let{valueField:r=`value`,childrenField:i=`children`}=n;for(let a of e){if(a[r]===t)return a;if(Array.isArray(a[i])){let e=vc(a[i],t,n);if(e)return e}}}var yc,bc={transparent:`rgba(1, 1, 1, 0)`,green:`#45b787`,darkGreen:`#21532fff`,blue:`#6e9bc5`,darkBlue:`#2775b6`,red:`#F26666`,darkRed:`#D95970`,brown:`#ECD2B9`,darkBrown:`#BF9D8A`,yellow:`#ECDEC0`,darkYellow:`#D0AC57`,lightGray:`#e0e0e0`,gray:`#beb6b6`,darkGray:`#918883`,white:`#F2F2F2`,darkWhite:`#ececec`,lightBlack:`#2E3032`,black:`#182327`,blackAlpha5:`rgba(0, 0, 0, 0.5)`},xc={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},Sc={h:0,s:0,l:0},Cc={h:0,s:0,l:0};function wc(e,t,n){return n<0&&(n+=1),n>1&&--n,n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*6*(2/3-n):e}var Tc=/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3}|[A-Fa-f0-9]{8})$|rgb\(\s*\d+\s*,\s*\d+\s*,\s*\d+\s*\)|rgba\(\s*\d+\s*,\s*\d+\s*,\s*\d+\s*,\s*[\d.]+\s*\)/;yc=Symbol.iterator;var Ec=class e{constructor(e,t,n,r){return nc(this,`isColor`,!0),nc(this,`r`,1),nc(this,`g`,1),nc(this,`b`,1),nc(this,`a`,1),t===void 0&&n===void 0?this.set(e):this.setRGBA(e,t,n,r)}static isColor(e){return typeof e==`string`?Tc.test(e):typeof e==`number`&&Number.isInteger(e)&&e>=0&&e<=16777215&&e.toString(6).length===6}static getRandomStyle(e){return e?Ac.random().setA(e).getStyle():Ac.random().getStyle()}static getDarken(e,t=.8){return Ac.set(e).getHSL(jc),Ac.setHSL(jc.h,jc.s,jc.l*t).getStyle()}static getLighten(e,t=1.2){return this.getDarken(e,t)}static getContrast(e){return Ac.set(e),Ac.getContrastString()}static getArray(e){return Ac.set(e).toArray()}static getComplementary(e){return Ac.set(e),Ac.getComplementaryString()}static getMoreTransparent(e,t){return Ac.set(e).setA(t).getStyle()}set(e){return e&&e.isColor?this.copy(e):typeof e==`number`?this.setHex(e):typeof e==`string`&&this.setStyle(e),this}random(){return this.setHex(Math.floor(Math.random()*(1<<24)))}setScalar(e){return this.r=e,this.g=e,this.b=e,this.a=1,this}setHex(e){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(e&255)/255,this.a=1,this}setR(e){return this.r=e,this}setG(e){return this.g=e,this}setB(e){return this.b=e,this}setA(e){return this.a=e,this}setRGB(e,t,n){return this.setRGBA(e,t,n,this.a)}setRGBA(e,t,n,r=1){return this.r=e,this.g=t,this.b=n,this.a=r,this}setHSL(e,t,n,r=1){if(e=Oc(e,1),t=Dc(t,0,1),n=Dc(n,0,1),t===0)this.r=this.g=this.b=n;else{let r=n<=.5?n*(1+t):n+t-n*t,i=2*n-r;this.r=wc(i,r,e+1/3),this.g=wc(i,r,e),this.b=wc(i,r,e-1/3)}return this.a=r,this}setStyle(e){let t;if(t=/^((?:rgb|hsl)a?)\(([^\)]*)\)/.exec(e)){let e,n=t[1],r=t[2];switch(n){case`rgb`:case`rgba`:if(e=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(r))return this.r=Math.min(255,parseInt(e[1],10))/255,this.g=Math.min(255,parseInt(e[2],10))/255,this.b=Math.min(255,parseInt(e[3],10))/255,this.a=Math.max(Math.min(1,e[4]===void 0?1:parseFloat(e[4])),0),this;if(e=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(r))return this.r=Math.min(100,parseInt(e[1],10))/100,this.g=Math.min(100,parseInt(e[2],10))/100,this.b=Math.min(100,parseInt(e[3],10))/100,this.a=Math.max(Math.min(1,e[4]===void 0?1:parseFloat(e[4])),0),this;break;case`hsl`:case`hsla`:if(e=/^\s*(\d*\.?\d+)\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(r)){let t=parseFloat(e[1])/360,n=parseInt(e[2],10)/100,r=parseInt(e[3],10)/100,i=Math.max(Math.min(1,e[4]===void 0?1:parseFloat(e[4])),0);return this.setHSL(t,n,r,i)}}}else if(t=/^\#([A-Fa-f\d]+)$/.exec(e)){let e=t[1],n=e.length;if(n===3)return this.r=parseInt(e.charAt(0)+e.charAt(0),16)/255,this.g=parseInt(e.charAt(1)+e.charAt(1),16)/255,this.b=parseInt(e.charAt(2)+e.charAt(2),16)/255,this.a=1,this;if(n===6)return this.r=parseInt(e.charAt(0)+e.charAt(1),16)/255,this.g=parseInt(e.charAt(2)+e.charAt(3),16)/255,this.b=parseInt(e.charAt(4)+e.charAt(5),16)/255,this.a=1,this}return e&&e.length>0?this.setColorName(e):this}setColorName(e){let t=xc[e.toLowerCase()];return t===void 0?console.warn(`Color: Unknown color `+e):this.setHex(t),this}clone(){return new e(this.r,this.g,this.b,this.a)}copy(e){return this.r=e.r,this.g=e.g,this.b=e.b,this.a=e.a,this}getRGB(t=new e){return t.setRGB(this.r,this.g,this.b)}getRGBByBg(t=new e){let n=this.a,r=n*this.r+(1-n)*t.r,i=n*this.g+(1-n)*t.g,a=n*this.b+(1-n)*t.b;return new e(r,i,a)}getHex(){return Dc(this.r*255,0,255)<<16^Dc(this.g*255,0,255)<<8^(Dc(this.b*255,0,255)|0)}getHSL(e){let t=this.r,n=this.g,r=this.b,i=Math.max(t,n,r),a=Math.min(t,n,r),o=0,s,c=(a+i)/2;if(a===i)o=0,s=0;else{let e=i-a;switch(s=c<=.5?e/(i+a):e/(2-i-a),i){case t:o=(n-r)/e+(n<r?6:0);break;case n:o=(r-t)/e+2;break;case r:o=(t-n)/e+4}o/=6}return e.h=o,e.s=s,e.l=c,e}getStyle(){return this.a===1?`rgb(${this.r*255|0},${this.g*255|0},${this.b*255|0})`:`rgba(${this.r*255|0},${this.g*255|0},${this.b*255|0},${this.a||1})`}getHexString(){return`#`+(`000000`+this.getHex().toString(16)).slice(-6)}getBrightness(){let e=(this.r*255*299+this.g*255*587+this.b*255*144)/1e3;return e+=(255-e)*(255-this.a*255)/255,e}getContrastString(){return this.getBrightness()>125?`#2f2f2f`:`#f2f2f2`}getComplementary(t=new e){let n=this.toArray(),r=[0,0,0,1];for(let e=0;e<n.length;e++)if(e<3)r[e]=1-n[e];else if(e===3)n[e]>1||n[e]<=0?r[e]=1:r[e]=Math.max(Math.min(parseFloat(n[e].toFixed(2)),1),0);else continue;return t.setRGBA(r[0],r[1],r[2],parseFloat(r[3].toFixed(2)))}getComplementaryString(){return this.getComplementary().getStyle()}getLightenOrDarken(t){if(t===void 0||t>=1)return this.getHexString();let n=this.getRGBByBg(),r=n.r*t+(1-t),i=n.g*t+(1-t),a=n.b*t+(1-t);return new e(r,i,a).getHexString()}getNormalized(){return[parseFloat(Math.max(Math.min(this.r,1),0).toFixed(2)),parseFloat(Math.max(Math.min(this.g,1),0).toFixed(2)),parseFloat(Math.max(Math.min(this.b,1),0).toFixed(2)),parseFloat(Math.max(Math.min(this.a,1),0).toFixed(2))]}getNormalized3(){return[parseFloat(Math.max(Math.min(this.r,1),0).toFixed(2)),parseFloat(Math.max(Math.min(this.g,1),0).toFixed(2)),parseFloat(Math.max(Math.min(this.b,1),0).toFixed(2))]}offsetHSL(e,t,n){return this.getHSL(Sc),Sc.h+=e,Sc.s+=t,Sc.l+=n,this.setHSL(Sc.h,Sc.s,Sc.l),this}add(e){return this.r+=e.r,this.g+=e.g,this.b+=e.b,this}addColors(e,t){return this.r=e.r+t.r,this.g=e.g+t.g,this.b=e.b+t.b,this}addScalar(e){return this.r+=e,this.g+=e,this.b+=e,this}sub(e){return this.r=Math.max(0,this.r-e.r),this.g=Math.max(0,this.g-e.g),this.b=Math.max(0,this.b-e.b),this}multiply(e){return this.r*=e.r,this.g*=e.g,this.b*=e.b,this}multiplyScalar(e){return this.r*=e,this.g*=e,this.b*=e,this}lerp(e,t){return this.r+=(e.r-this.r)*t,this.g+=(e.g-this.g)*t,this.b+=(e.b-this.b)*t,this}lerpColors(e,t,n){return this.r=e.r+(t.r-e.r)*n,this.g=e.g+(t.g-e.g)*n,this.b=e.b+(t.b-e.b)*n,this}lerpHSL(e,t){this.getHSL(Sc),e.getHSL(Cc);let n=kc(Sc.h,Cc.h,t),r=kc(Sc.s,Cc.s,t),i=kc(Sc.l,Cc.l,t);return this.setHSL(n,r,i),this}equals(e){return e.r===this.r&&e.g===this.g&&e.b===this.b}fromArray(e,t=0){return this.r=e[t],this.g=e[t+1],this.b=e[t+2],this.a=e[t+3],this}toArray(e=[0,0,0,0],t=0){return e[t]=this.r,e[t+1]=this.g,e[t+2]=this.b,e[t+3]=this.a,e}fromBufferAttribute(e,t){return this.r=e.getX(t),this.g=e.getY(t),this.b=e.getZ(t),e.normalized===!0&&(this.r/=255,this.g/=255,this.b/=255),this}toJSON(){return this.getHex()}*[yc](){yield this.r,yield this.g,yield this.b}},Dc=(e,t,n)=>Math.max(t,Math.min(n,e)),Oc=(e,t)=>(e%t+t)%t,kc=(e,t,n)=>(1-n)*e+n*t,Ac=new Ec,jc={h:0,s:0,l:0};function Mc(){let e=window.localStorage.getItem(`user`),t=e?JSON.parse(e):{};return t.permissions=new Set(t.permissions||[]),t}function Nc(e,t){let n=!1;return!(e!=null&&e.length)&&!(t!=null&&t.length)||(e&&e.length>0&&(n=Fc(e)),t&&t.length>0&&(n=n||Ic(t)),n)}var Pc=`*:*:*`,Fc=(e=[])=>{var t;let n=Mc();return(n==null||(t=n.permissions)==null?void 0:t.has(Pc))||e.some(e=>{var t;return n==null||(t=n.permissions)==null?void 0:t.has(e)})};function Ic(e){if(e&&e instanceof Array&&e.length>0){let t=e,n=Mc();return!!((n==null?void 0:n.roles)||[]).some(e=>e===`super_admin`||t.includes(e))}return console.error(`permission.hasRole`),!1}var Lc=f(((e,t,n)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs=r()})(n,(function(){"use strict";var e=1e3,t=6e4,n=36e5,r=`millisecond`,i=`second`,a=`minute`,o=`hour`,s=`day`,c=`week`,l=`month`,u=`quarter`,d=`year`,f=`date`,p=`Invalid Date`,m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,h=/\[([^\]]+)]|YYYY|YY|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,g={name:`en`,weekdays:`Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday`.split(`_`),months:`January_February_March_April_May_June_July_August_September_October_November_December`.split(`_`),ordinal:function(e){var t=[`th`,`st`,`nd`,`rd`],n=e%100;return`[`+e+(t[(n-20)%10]||t[n]||t[0])+`]`}},_=function(e,t,n){var r=String(e);return!r||r.length>=t?e:``+Array(t+1-r.length).join(n)+e},v={s:_,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),r=Math.floor(n/60),i=n%60;return(t<=0?`+`:`-`)+_(r,2,`0`)+`:`+_(i,2,`0`)},m:function e(t,n){if(t.date()<n.date())return-e(n,t);var r=12*(n.year()-t.year())+(n.month()-t.month()),i=t.clone().add(r,l),a=n-i<0,o=t.clone().add(r+(a?-1:1),l);return+(-(r+(n-i)/(a?i-o:o-i))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(e){return{M:l,y:d,w:c,d:s,D:f,h:o,m:a,s:i,ms:r,Q:u}[e]||String(e||``).toLowerCase().replace(/s$/,``)},u:function(e){return e===void 0}},y=`en`,b={};b[y]=g;var x=`$isDayjsObject`,S=function(e){return e instanceof E||!(!e||!e[x])},C=function e(t,n,r){var i;if(!t)return y;if(typeof t==`string`){var a=t.toLowerCase();b[a]&&(i=a),n&&(b[a]=n,i=a);var o=t.split(`-`);if(!i&&o.length>1)return e(o[0])}else{var s=t.name;b[s]=t,i=s}return!r&&i&&(y=i),i||!r&&y},w=function(e,t){if(S(e))return e.clone();var n=typeof t==`object`?t:{};return n.date=e,n.args=arguments,new E(n)},T=v;T.l=C,T.i=S,T.w=function(e,t){return w(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var E=function(){function g(e){this.$L=C(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[x]=!0}var _=g.prototype;return _.parse=function(e){this.$d=function(e){var t=e.date,n=e.utc;if(t===null)return new Date(NaN);if(T.u(t))return new Date;if(t instanceof Date)return new Date(t);if(typeof t==`string`&&!/Z$/i.test(t)){var r=t.match(m);if(r){var i=r[2]-1||0,a=(r[7]||`0`).substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)}}return new Date(t)}(e),this.init()},_.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},_.$utils=function(){return T},_.isValid=function(){return this.$d.toString()!==p},_.isSame=function(e,t){var n=w(e);return this.startOf(t)<=n&&n<=this.endOf(t)},_.isAfter=function(e,t){return w(e)<this.startOf(t)},_.isBefore=function(e,t){return this.endOf(t)<w(e)},_.$g=function(e,t,n){return T.u(e)?this[t]:this.set(n,e)},_.unix=function(){return Math.floor(this.valueOf()/1e3)},_.valueOf=function(){return this.$d.getTime()},_.startOf=function(e,t){var n=this,r=!!T.u(t)||t,u=T.p(e),p=function(e,t){var i=T.w(n.$u?Date.UTC(n.$y,t,e):new Date(n.$y,t,e),n);return r?i:i.endOf(s)},m=function(e,t){return T.w(n.toDate()[e].apply(n.toDate(`s`),(r?[0,0,0,0]:[23,59,59,999]).slice(t)),n)},h=this.$W,g=this.$M,_=this.$D,v=`set`+(this.$u?`UTC`:``);switch(u){case d:return r?p(1,0):p(31,11);case l:return r?p(1,g):p(0,g+1);case c:var y=this.$locale().weekStart||0,b=(h<y?h+7:h)-y;return p(r?_-b:_+(6-b),g);case s:case f:return m(v+`Hours`,0);case o:return m(v+`Minutes`,1);case a:return m(v+`Seconds`,2);case i:return m(v+`Milliseconds`,3);default:return this.clone()}},_.endOf=function(e){return this.startOf(e,!1)},_.$set=function(e,t){var n,c=T.p(e),u=`set`+(this.$u?`UTC`:``),p=(n={},n[s]=u+`Date`,n[f]=u+`Date`,n[l]=u+`Month`,n[d]=u+`FullYear`,n[o]=u+`Hours`,n[a]=u+`Minutes`,n[i]=u+`Seconds`,n[r]=u+`Milliseconds`,n)[c],m=c===s?this.$D+(t-this.$W):t;if(c===l||c===d){var h=this.clone().set(f,1);h.$d[p](m),h.init(),this.$d=h.set(f,Math.min(this.$D,h.daysInMonth())).$d}else p&&this.$d[p](m);return this.init(),this},_.set=function(e,t){return this.clone().$set(e,t)},_.get=function(e){return this[T.p(e)]()},_.add=function(r,u){var f,p=this;r=Number(r);var m=T.p(u),h=function(e){var t=w(p);return T.w(t.date(t.date()+Math.round(e*r)),p)};if(m===l)return this.set(l,this.$M+r);if(m===d)return this.set(d,this.$y+r);if(m===s)return h(1);if(m===c)return h(7);var g=(f={},f[a]=t,f[o]=n,f[i]=e,f)[m]||1,_=this.$d.getTime()+r*g;return T.w(_,this)},_.subtract=function(e,t){return this.add(-1*e,t)},_.format=function(e){var t=this,n=this.$locale();if(!this.isValid())return n.invalidDate||p;var r=e||`YYYY-MM-DDTHH:mm:ssZ`,i=T.z(this),a=this.$H,o=this.$m,s=this.$M,c=n.weekdays,l=n.months,u=n.meridiem,d=function(e,n,i,a){return e&&(e[n]||e(t,r))||i[n].slice(0,a)},f=function(e){return T.s(a%12||12,e,`0`)},m=u||function(e,t,n){var r=e<12?`AM`:`PM`;return n?r.toLowerCase():r};return r.replace(h,(function(e,r){return r||function(e){switch(e){case`YY`:return String(t.$y).slice(-2);case`YYYY`:return T.s(t.$y,4,`0`);case`M`:return s+1;case`MM`:return T.s(s+1,2,`0`);case`MMM`:return d(n.monthsShort,s,l,3);case`MMMM`:return d(l,s);case`D`:return t.$D;case`DD`:return T.s(t.$D,2,`0`);case`d`:return String(t.$W);case`dd`:return d(n.weekdaysMin,t.$W,c,2);case`ddd`:return d(n.weekdaysShort,t.$W,c,3);case`dddd`:return c[t.$W];case`H`:return String(a);case`HH`:return T.s(a,2,`0`);case`h`:return f(1);case`hh`:return f(2);case`a`:return m(a,o,!0);case`A`:return m(a,o,!1);case`m`:return String(o);case`mm`:return T.s(o,2,`0`);case`s`:return String(t.$s);case`ss`:return T.s(t.$s,2,`0`);case`SSS`:return T.s(t.$ms,3,`0`);case`Z`:return i}return null}(e)||i.replace(`:`,``)}))},_.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},_.diff=function(r,f,p){var m,h=this,g=T.p(f),_=w(r),v=(_.utcOffset()-this.utcOffset())*t,y=this-_,b=function(){return T.m(h,_)};switch(g){case d:m=b()/12;break;case l:m=b();break;case u:m=b()/3;break;case c:m=(y-v)/6048e5;break;case s:m=(y-v)/864e5;break;case o:m=y/n;break;case a:m=y/t;break;case i:m=y/e;break;default:m=y}return p?m:T.a(m)},_.daysInMonth=function(){return this.endOf(l).$D},_.$locale=function(){return b[this.$L]},_.locale=function(e,t){if(!e)return this.$L;var n=this.clone(),r=C(e,t,!0);return r&&(n.$L=r),n},_.clone=function(){return T.w(this.$d,this)},_.toDate=function(){return new Date(this.valueOf())},_.toJSON=function(){return this.isValid()?this.toISOString():null},_.toISOString=function(){return this.$d.toISOString()},_.toString=function(){return this.$d.toUTCString()},g}(),D=E.prototype;return w.prototype=D,[[`$ms`,r],[`$s`,i],[`$m`,a],[`$H`,o],[`$W`,s],[`$M`,l],[`$y`,d],[`$D`,f]].forEach((function(e){D[e[1]]=function(t){return this.$g(t,e[0],e[1])}})),w.extend=function(e,t){return e.$i||(e(t,E,w),e.$i=!0),w},w.locale=C,w.isDayjs=S,w.unix=function(e){return w(1e3*e)},w.en=b[y],w.Ls=b,w.p={},w}))})),Rc=f(((e,t,n)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_duration=r()})(n,(function(){"use strict";var e,t,n=1e3,r=6e4,i=36e5,a=864e5,o=31536e6,s=2628e6,c=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,l=/\[([^\]]+)]|YYYY|YY|Y|M{1,2}|D{1,2}|H{1,2}|m{1,2}|s{1,2}|SSS/g,u={years:o,months:s,days:a,hours:i,minutes:r,seconds:n,milliseconds:1,weeks:6048e5},d=function(e){return e instanceof v},f=function(e,t,n){return new v(e,n,t.$l)},p=function(e){return t.p(e)+`s`},m=function(e){return e<0},h=function(e){return m(e)?Math.ceil(e):Math.floor(e)},g=function(e){return Math.abs(e)},_=function(e,t){return e?m(e)?{negative:!0,format:``+g(e)+t}:{negative:!1,format:``+e+t}:{negative:!1,format:``}},v=function(){function m(e,t,n){var r=this;if(this.$d={},this.$l=n,e===void 0&&(this.$ms=0,this.parseFromMilliseconds()),t)return f(e*u[p(t)],this);if(typeof e==`number`)return this.$ms=e,this.parseFromMilliseconds(),this;if(typeof e==`object`)return Object.keys(e).forEach((function(t){r.$d[p(t)]=e[t]})),this.calMilliseconds(),this;if(typeof e==`string`){var i=e.match(c);if(i){var a=i.slice(2).map((function(e){return e==null?0:Number(e)}));return this.$d.years=a[0],this.$d.months=a[1],this.$d.weeks=a[2],this.$d.days=a[3],this.$d.hours=a[4],this.$d.minutes=a[5],this.$d.seconds=a[6],this.calMilliseconds(),this}}return this}var g=m.prototype;return g.calMilliseconds=function(){var e=this;this.$ms=Object.keys(this.$d).reduce((function(t,n){return t+(e.$d[n]||0)*u[n]}),0)},g.parseFromMilliseconds=function(){var e=this.$ms;this.$d.years=h(e/o),e%=o,this.$d.months=h(e/s),e%=s,this.$d.days=h(e/a),e%=a,this.$d.hours=h(e/i),e%=i,this.$d.minutes=h(e/r),e%=r,this.$d.seconds=h(e/n),e%=n,this.$d.milliseconds=e},g.toISOString=function(){var e=_(this.$d.years,`Y`),t=_(this.$d.months,`M`),n=+this.$d.days||0;this.$d.weeks&&(n+=7*this.$d.weeks);var r=_(n,`D`),i=_(this.$d.hours,`H`),a=_(this.$d.minutes,`M`),o=this.$d.seconds||0;this.$d.milliseconds&&(o+=this.$d.milliseconds/1e3,o=Math.round(1e3*o)/1e3);var s=_(o,`S`),c=e.negative||t.negative||r.negative||i.negative||a.negative||s.negative,l=i.format||a.format||s.format?`T`:``,u=(c?`-`:``)+`P`+e.format+t.format+r.format+l+i.format+a.format+s.format;return u===`P`||u===`-P`?`P0D`:u},g.toJSON=function(){return this.toISOString()},g.format=function(e){var n=e||`YYYY-MM-DDTHH:mm:ss`,r={Y:this.$d.years,YY:t.s(this.$d.years,2,`0`),YYYY:t.s(this.$d.years,4,`0`),M:this.$d.months,MM:t.s(this.$d.months,2,`0`),D:this.$d.days,DD:t.s(this.$d.days,2,`0`),H:this.$d.hours,HH:t.s(this.$d.hours,2,`0`),m:this.$d.minutes,mm:t.s(this.$d.minutes,2,`0`),s:this.$d.seconds,ss:t.s(this.$d.seconds,2,`0`),SSS:t.s(this.$d.milliseconds,3,`0`)};return n.replace(l,(function(e,t){return t||String(r[e])}))},g.as=function(e){return this.$ms/u[p(e)]},g.get=function(e){var t=this.$ms,n=p(e);return n===`milliseconds`?t%=1e3:t=n===`weeks`?h(t/u[n]):this.$d[n],t||0},g.add=function(e,t,n){var r=t?e*u[p(t)]:d(e)?e.$ms:f(e,this).$ms;return f(this.$ms+r*(n?-1:1),this)},g.subtract=function(e,t){return this.add(e,t,!0)},g.locale=function(e){var t=this.clone();return t.$l=e,t},g.clone=function(){return f(this.$ms,this)},g.humanize=function(t){return e().add(this.$ms,`ms`).locale(this.$l).fromNow(!t)},g.valueOf=function(){return this.asMilliseconds()},g.milliseconds=function(){return this.get(`milliseconds`)},g.asMilliseconds=function(){return this.as(`milliseconds`)},g.seconds=function(){return this.get(`seconds`)},g.asSeconds=function(){return this.as(`seconds`)},g.minutes=function(){return this.get(`minutes`)},g.asMinutes=function(){return this.as(`minutes`)},g.hours=function(){return this.get(`hours`)},g.asHours=function(){return this.as(`hours`)},g.days=function(){return this.get(`days`)},g.asDays=function(){return this.as(`days`)},g.weeks=function(){return this.get(`weeks`)},g.asWeeks=function(){return this.as(`weeks`)},g.months=function(){return this.get(`months`)},g.asMonths=function(){return this.as(`months`)},g.years=function(){return this.get(`years`)},g.asYears=function(){return this.as(`years`)},m}(),y=function(e,t,n){return e.add(t.years()*n,`y`).add(t.months()*n,`M`).add(t.days()*n,`d`).add(t.hours()*n,`h`).add(t.minutes()*n,`m`).add(t.seconds()*n,`s`).add(t.milliseconds()*n,`ms`)};return function(n,r,i){e=i,t=i().$utils(),i.duration=function(e,t){return f(e,{$l:i.locale()},t)},i.isDuration=d;var a=r.prototype.add,o=r.prototype.subtract;r.prototype.add=function(e,t){return d(e)?y(this,e,1):a.bind(this)(e,t)},r.prototype.subtract=function(e,t){return d(e)?y(this,e,-1):o.bind(this)(e,t)}}}))})),zc=f(((e,t,n)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_advancedFormat=r()})(n,(function(){"use strict";return function(e,t){var n=t.prototype,r=n.format;n.format=function(e){var t=this,n=this.$locale();if(!this.isValid())return r.bind(this)(e);var i=this.$utils(),a=(e||`YYYY-MM-DDTHH:mm:ssZ`).replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,(function(e){switch(e){case`Q`:return Math.ceil((t.$M+1)/3);case`Do`:return n.ordinal(t.$D);case`gggg`:return t.weekYear();case`GGGG`:return t.isoWeekYear();case`wo`:return n.ordinal(t.week(),`W`);case`w`:case`ww`:return i.s(t.week(),e===`w`?1:2,`0`);case`W`:case`WW`:return i.s(t.isoWeek(),e===`W`?1:2,`0`);case`k`:case`kk`:return i.s(String(t.$H===0?24:t.$H),e===`k`?1:2,`0`);case`X`:return Math.floor(t.$d.getTime()/1e3);case`x`:return t.$d.getTime();case`z`:return`[`+t.offsetName()+`]`;case`zzz`:return`[`+t.offsetName(`long`)+`]`;default:return e}}));return r.bind(this)(a)}}}))})),Bc=f(((e,t,n)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_isoWeek=r()})(n,(function(){"use strict";return function(e,t,n){var r=function(e){return e.add(4-e.isoWeekday(),`day`)},i=t.prototype;i.isoWeekYear=function(){return r(this).year()},i.isoWeek=function(e){if(!this.$utils().u(e))return this.add(7*(e-this.isoWeek()),`day`);var t,i,a,o,s=r(this),c=(t=this.isoWeekYear(),i=this.$u,a=(i?n.utc:n)().year(t).startOf(`year`),o=4-a.isoWeekday(),a.isoWeekday()>4&&(o+=7),a.add(o,`day`));return s.diff(c,`week`)+1},i.isoWeekday=function(e){return this.$utils().u(e)?this.day()||7:this.day(this.day()%7?e:e-7)};var a=i.startOf;i.startOf=function(e,t){var n=this.$utils(),r=!!n.u(t)||t;return n.p(e)===`isoweek`?r?this.date(this.date()-(this.isoWeekday()-1)).startOf(`day`):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf(`day`):a.bind(this)(e,t)}}}))})),Vc=f(((e,t,n)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_customParseFormat=r()})(n,(function(){"use strict";var e={LTS:`h:mm:ss A`,LT:`h:mm A`,L:`MM/DD/YYYY`,LL:`MMMM D, YYYY`,LLL:`MMMM D, YYYY h:mm A`,LLLL:`dddd, MMMM D, YYYY h:mm A`},t=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,n=/\d/,r=/\d\d/,i=/\d\d?/,a=/\d*[^-_:/,()\s\d]+/,o={},s=function(e){return(e=+e)+(e>68?1900:2e3)},c=function(e){return function(t){this[e]=+t}},l=[/[+-]\d\d:?(\d\d)?|Z/,function(e){(this.zone||(this.zone={})).offset=function(e){if(!e||e===`Z`)return 0;var t=e.match(/([+-]|\d\d)/g),n=60*t[1]+(+t[2]||0);return n===0?0:t[0]===`+`?-n:n}(e)}],u=function(e){var t=o[e];return t&&(t.indexOf?t:t.s.concat(t.f))},d=function(e,t){var n,r=o.meridiem;if(r){for(var i=1;i<=24;i+=1)if(e.indexOf(r(i,0,t))>-1){n=i>12;break}}else n=e===(t?`pm`:`PM`);return n},f={A:[a,function(e){this.afternoon=d(e,!1)}],a:[a,function(e){this.afternoon=d(e,!0)}],Q:[n,function(e){this.month=3*(e-1)+1}],S:[n,function(e){this.milliseconds=100*e}],SS:[r,function(e){this.milliseconds=10*e}],SSS:[/\d{3}/,function(e){this.milliseconds=+e}],s:[i,c(`seconds`)],ss:[i,c(`seconds`)],m:[i,c(`minutes`)],mm:[i,c(`minutes`)],H:[i,c(`hours`)],h:[i,c(`hours`)],HH:[i,c(`hours`)],hh:[i,c(`hours`)],D:[i,c(`day`)],DD:[r,c(`day`)],Do:[a,function(e){var t=o.ordinal,n=e.match(/\d+/);if(this.day=n[0],t)for(var r=1;r<=31;r+=1)t(r).replace(/\[|\]/g,``)===e&&(this.day=r)}],w:[i,c(`week`)],ww:[r,c(`week`)],M:[i,c(`month`)],MM:[r,c(`month`)],MMM:[a,function(e){var t=u(`months`),n=(u(`monthsShort`)||t.map((function(e){return e.slice(0,3)}))).indexOf(e)+1;if(n<1)throw Error();this.month=n%12||n}],MMMM:[a,function(e){var t=u(`months`).indexOf(e)+1;if(t<1)throw Error();this.month=t%12||t}],Y:[/[+-]?\d+/,c(`year`)],YY:[r,function(e){this.year=s(e)}],YYYY:[/\d{4}/,c(`year`)],Z:l,ZZ:l};function p(n){for(var r=n,i=o&&o.formats,a=(n=r.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(t,n,r){var a=r&&r.toUpperCase();return n||i[r]||e[r]||i[a].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(e,t,n){return t||n.slice(1)}))}))).match(t),s=a.length,c=0;c<s;c+=1){var l=a[c],u=f[l],d=u&&u[0],p=u&&u[1];a[c]=p?{regex:d,parser:p}:l.replace(/^\[|\]$/g,``)}return function(e){for(var t={},n=0,r=0;n<s;n+=1){var i=a[n];if(typeof i==`string`)r+=i.length;else{var o=i.regex,c=i.parser,l=e.slice(r),u=o.exec(l)[0];c.call(t,u),e=e.replace(u,``)}}return function(e){var t=e.afternoon;if(t!==void 0){var n=e.hours;t?n<12&&(e.hours+=12):n===12&&(e.hours=0),delete e.afternoon}}(t),t}}return function(e,t,n){n.p.customParseFormat=!0,e&&e.parseTwoDigitYear&&(s=e.parseTwoDigitYear);var r=t.prototype,i=r.parse;r.parse=function(e){var t=e.date,r=e.utc,a=e.args;this.$u=r;var s=a[1];if(typeof s==`string`){var c=!0===a[2],l=!0===a[3],u=c||l,d=a[2];l&&(d=a[2]),o=this.$locale(),!c&&d&&(o=n.Ls[d]),this.$d=function(e,t,n,r){try{if([`x`,`X`].indexOf(t)>-1)return new Date((t===`X`?1e3:1)*e);var i=p(t)(e),a=i.year,o=i.month,s=i.day,c=i.hours,l=i.minutes,u=i.seconds,d=i.milliseconds,f=i.zone,m=i.week,h=new Date,g=s||(a||o?1:h.getDate()),_=a||h.getFullYear(),v=0;a&&!o||(v=o>0?o-1:h.getMonth());var y,b=c||0,x=l||0,S=u||0,C=d||0;return f?new Date(Date.UTC(_,v,g,b,x,S,C+60*f.offset*1e3)):n?new Date(Date.UTC(_,v,g,b,x,S,C)):(y=new Date(_,v,g,b,x,S,C),m&&(y=r(y).week(m).toDate()),y)}catch(e){return new Date(``)}}(t,s,r,n),this.init(),d&&!0!==d&&(this.$L=this.locale(d).$L),u&&t!=this.format(s)&&(this.$d=new Date(``)),o={}}else if(s instanceof Array)for(var f=s.length,m=1;m<=f;m+=1){a[1]=s[m-1];var h=n.apply(this,a);if(h.isValid()){this.$d=h.$d,this.$L=h.$L,this.init();break}m===f&&(this.$d=new Date(``))}else i.call(this,e)}}}))})),J=m(Lc(),1);Rc();var Hc=m(zc(),1),Uc=m(Bc(),1),Wc=m(Vc(),1),Gc=hs()===`zh-cn`;J.default.extend(Uc.default),J.default.extend(Hc.default),J.default.extend(Wc.default);function Kc(e){return e===void 0||e===`undefined`||e===`null`||e===null||e===``||isNaN(e)}function qc(e){if(Kc(e))return e;let t=``;return t=Gc?Intl.NumberFormat(`zh-CN`,{style:`currency`,currency:`CNY`}).format(e):Intl.NumberFormat(`en-US`,{style:`currency`,currency:`USD`}).format(e),t}function Jc(e){return Kc(e)?e:(Math.round(e*100)/100).toLocaleString()}function Yc(e){return Kc(e)?e:Math.round(e*100)/100+` %`}function Y(e,t=`YYYY-MM-DD`){if(e==null||e===``)return e;let n=(0,J.default)(e);return n.isValid()?n.format(t):e}function Xc(e,t,n=`label`,r){let i=[];if(Array.isArray(t)&&!t.length)return``;if(Array.isArray(t))for(let e=0,n=t.length;e<n;e++)t[e]=String(t[e]).trim().normalize();else t=String(t).trim().normalize();if(!(e!=null&&e.length))return Kc(t)?``:t;let a=e=>!r||!Array.isArray(r)||!(r!=null&&r.length)||r.some(t=>!t||typeof t!=`object`||Object.entries(t).every(([t,n])=>{let r=e==null?void 0:e[t];return n==null?r===n:Array.isArray(n)?n.some(e=>String(r)===String(e)):Array.isArray(r)?r.some(e=>String(e)===String(n)):String(r)===String(n)}));return Array.isArray(t)?i.push(...es(e,e=>t.includes(String(e.value))&&a(e))):i.push(...es(e,e=>(e.value===t||String(e.value)===String(t))&&a(e))),i!=null&&i.length?us(Ma(ns(i,n))).join(`、`):Array.isArray(t)||Kc(t)?``:t}var Zc=({cellValue:e}={},t=`YYYY-MM-DD HH:mm`)=>Y(e,t),Qc=({cellValue:e}={},t=`YYYY`)=>Y(e,t),$c=({cellValue:e}={},t=`Q`)=>e==null||e===``||!(0,J.default)(e).isValid()?e:gs()?Y(e,`YYYY`)+`年`+Y(e,t)+`季度`:`Quarter `+Y(e,t)+`, `+Y(e,`YYYY`),el=({cellValue:e}={},t=`MM`)=>e==null||e===``||!(0,J.default)(e).isValid()?e:gs()?Y(e,`YYYY`)+`年 `+Y(e,t)+`月`:Y(e,t)+`/`+Y(e,`YYYY`),tl=({cellValue:e}={},t=`W`)=>{if(e==null||e===``)return e;let n=typeof e==`string`&&/^(\d{4})-(\d{1,2})(?:st|nd|rd|th|周)$/i.exec(e);if(!n&&!(0,J.default)(e).isValid())return e;let r=n?n[1]:Y(e,`GGGG`),i=n?n[2]:Y(e,t);return gs()?r+`年第`+i+`周`:`Week `+i+`, `+r},nl=({cellValue:e,itemValue:t}={})=>(e==null&&(e=t),Kc(e)?e:Jc(e)),rl=({cellValue:e}={})=>Kc(e)?e:Yc(e),il=({cellValue:e,itemValue:t}={})=>(Kc(e)&&(e=t),Kc(e)?e:qc(e)),al=new Map([[`radio`,cl],[`checkbox`,cl],[`switch`,ll],[`treeSelect`,ul],[`cascader`,fl],[`inputNumber`,()=>typeof nl==`function`?nl:void 0],[`inputCurrency`,()=>typeof il==`function`?il:void 0],[`inputPercent`,()=>typeof rl==`function`?rl:void 0],[`datePicker`,ml],[`timePicker`,hl]]);function ol(e){var t;if(typeof e.formatter==`function`)return V(V({},e),{},{formatter:e.formatter});let n=al.get((t=e.type)==null?``:t),r;return n?r=n(e):Array.isArray(e.options)&&e.options.length>0&&(r=gl(e)),V(V({},e),{},{formatter:r})}function sl(e,t){if(typeof e!=`string`||typeof t!=`string`||t===`YYYY-wo`)return e;let n=t===`x`||t===`X`?(0,J.default)(Number(e)*(t===`X`?1e3:1)):(0,J.default)(e,t,!0);return n.isValid()?n:e}function cl(e){var t;let n=((t=e.props)==null?void 0:t.options)||e.options;return({cellValue:e})=>e==null||e===``?``:(Array.isArray(e)?e:[e]).map(e=>{var t,r;let i=Array.isArray(n)?n.find(t=>(t==null?void 0:t.value)===e):void 0;return(t=(r=i==null?void 0:i.label)==null?e:r)==null?``:t}).join(`、`)}function ll(e){return({cellValue:t})=>{var n;let{activeValue:r=!0,inactiveValue:i=!1,activeText:a,inactiveText:o}=(n=e.props)==null?{}:n;return t===r?a||(gs()?`开启`:`On`):t===i?o||(gs()?`关闭`:`Off`):t==null?``:t}}function ul(e){var t,n,r,i,a,o,s;let c=(t=e.props)==null?{}:t,l=(n=c.props)==null?{}:n,u=e.optionsTo===`props.data`&&Array.isArray(e.options)?e.options:c.data,d=(r=(i=(a=l.value)==null?c.nodeKey:a)==null?c.valueKey:i)==null?`value`:r,f=(o=l.label)==null?`label`:o,p=(s=l.children)==null?`children`:s;return({cellValue:e})=>e==null||e===``?``:(Array.isArray(e)?e:[e]).map(e=>{var t;let n=Array.isArray(u)?vc(u,e,{valueField:d,childrenField:p}):void 0;return(t=n==null?void 0:n[f])==null?e:t}).join(`、`)}function dl(e,t,n,r){for(let i of e){if(rs(i[n],t))return[i];let e=i[r];if(Array.isArray(e)){let a=dl(e,t,n,r);if(a)return[i,...a]}}}function fl(e){var t,n,r,i,a,o;let s=(t=e.props)==null?{}:t,c=(n=s.props)==null?{}:n,l=e.optionsTo===`props.options`&&Array.isArray(e.options)?e.options:s.options,u=(r=c.value)==null?`value`:r,d=(i=c.label)==null?`label`:i,f=(a=c.children)==null?`children`:a,p=Array.isArray(l)?l:[],m=(o=s.separator)==null?` / `:o,h=s.showAllLevels!==!1;function g(e){let t;if(c.emitPath===!1){let n=dl(p,e,u,f);t=n?n.map(e=>{var t;return(t=e[d])==null?e[u]:t}):[e]}else{let n=Array.isArray(e)?e:[e],r=p;t=n.map(e=>{var t;let n=r.find(t=>rs(t[u],e)),i=n==null?void 0:n[f];return r=Array.isArray(i)?i:[],(t=n==null?void 0:n[d])==null?e:t})}return(h?t:t.slice(-1)).join(m)}return({cellValue:e})=>e==null||e===``?``:c.multiple===!0?(Array.isArray(e)?e:[e]).map(g).join(`、`):g(e)}var pl={year:Qc,years:Qc,yearrange:Qc,quarter:$c,quarters:$c,quarterrange:$c,month:el,months:el,monthrange:el,week:tl,datetime:Zc,datetimerange:Zc};function ml(e){var t,n;let r=(t=(n=e.props)==null?void 0:n.type)==null?`date`:t,i=t=>{var n,i,a,o;if(t==null||t===``)return``;let s=sl(t,(n=e.props)==null?void 0:n.valueFormat);return(i=e.props)!=null&&i.format?Y(s,e.props.format):(a=(o=pl[r])==null?void 0:o.call(pl,{cellValue:s}))==null?Y(s):a};return({cellValue:t})=>{var n,a;if(!Array.isArray(t))return i(t);if(t.every(e=>e==null||e===``))return``;let o=r.endsWith(`range`)?(n=(a=e.props)==null?void 0:a.rangeSeparator)==null?` - `:n:`、`;return t.map(i).join(o)}}function hl(e){let t=t=>{var n,r,i,a;return t==null||t===``?``:Y(sl(t,(n=(r=e.props)==null?void 0:r.valueFormat)==null?`HH:mm`:n),(i=(a=e.props)==null?void 0:a.format)==null?`HH:mm`:i)};return({cellValue:n})=>{var r,i;return Array.isArray(n)?n.every(e=>e==null||e===``)?``:n.map(t).join((r=(i=e.props)==null?void 0:i.rangeSeparator)==null?` - `:r):t(n)}}function gl(e){return({cellValue:t})=>Xc(e.options,t)}function _l(e=`small`){return e===`large`?`medium`:e==="default"?`small`:`mini`}var X={DETAIL:`detail`,DEL:`del`,ADD:`add`,EDIT:`edit`,SAVE:`save`,CREATE:`create`,READ:`read`,UPDATE:`update`,EXPORT:`export`,OPERATE:`OPERATE`};function vl(e){let t=0;for(let n of e)n.group&&(t=Math.max(t,Sr(n.group).length));return t+1}var yl=()=>{let{t:e}=z();return{info(e){t.ElMessage.info(e)},error(e){t.ElMessage.error(e)},success(e){t.ElMessage.success(e)},warning(e){t.ElMessage.warning(e)},alert(n){t.ElMessageBox.alert(n,e(`common.confirmTitle`))},alertError(n){t.ElMessageBox.alert(n,e(`common.confirmTitle`),{type:`error`})},alertSuccess(n){t.ElMessageBox.alert(n,e(`common.confirmTitle`),{type:`success`})},alertWarning(n){t.ElMessageBox.alert(n,e(`common.confirmTitle`),{type:`warning`})},notify(e){t.ElNotification.info(e)},notifyError(e){t.ElNotification.error(e)},notifySuccess(e){t.ElNotification.success(e)},notifyWarning(e){t.ElNotification.warning(e)},confirm(n,r){return t.ElMessageBox.confirm(n,r||e(`common.confirmTitle`),{confirmButtonText:e(`common.ok`),cancelButtonText:e(`common.cancel`),type:`warning`})},delConfirm(n,r){return t.ElMessageBox.confirm(n||e(`common.delMessage`),r||e(`common.confirmTitle`),{confirmButtonText:e(`common.ok`),cancelButtonText:e(`common.cancel`),type:`warning`})},exportConfirm(n,r){return t.ElMessageBox.confirm(n||e(`common.exportMessage`),r||e(`common.confirmTitle`),{confirmButtonText:e(`common.ok`),cancelButtonText:e(`common.cancel`),type:`warning`})},prompt(n,r){return t.ElMessageBox.prompt(n,r,{confirmButtonText:e(`common.ok`),cancelButtonText:e(`common.cancel`),type:`warning`})}}},bl=(0,n.defineComponent)(V(V({},{name:`AbTableOperate`}),{},{__name:`ab-table-operate`,props:(0,n.mergeModels)({rule:{},modelValue:{},idField:{},idFieldTable:{},permiPrefix:{},api:{},link:{type:Boolean},plain:{type:Boolean},deleteHandler:{},readonly:{type:Boolean}},{api:{},apiModifiers:{}}),emits:(0,n.mergeModels)([`refresh`,`operated`],[`update:api`]),setup(e,{expose:t,emit:r}){let i=r,a=e,{t:o}=z(),s=yl(),c=(0,n.inject)(`abTableDetailRef`,void 0),l=(0,n.inject)(`abTableRef`,void 0),{wsCache:u}=R(),d=(0,n.computed)(()=>u.getCurrentSize||`default`),f=(0,n.useModel)(e,`api`),p=(0,n.computed)(()=>{var e;if(!a.rule||Array.isArray(a.rule)&&!((e=a.rule)!=null&&e.length))return;let t=Array.isArray(a.rule)?{type:`ElRow`,children:[...Oa(a.rule)],native:!0}:V(V({},Oa(a.rule)),{},{native:!0});return delete t.field,Qo(t==null?void 0:t.children,e=>{L(e,`props.plain`,a.plain),L(e,`props.link`,a.link),L(e,`props.size`,d.value),e.field===X.CREATE?(L(e,`children`,[{type:`icon`,props:{icon:`ep:plus`}},o(`action.${X.CREATE}`)]),L(e,`props`,{type:`primary`,plain:a.plain,link:a.link}),fr(e,`on.click`)||L(e,`on.click`,h),a.permiPrefix&&!fr(e,`computed.hidden`)&&L(e,`computed.hidden`,m)):e.field===X.DETAIL?(L(e,`children`,[{type:`icon`,props:{icon:`ep:view`}},o(`action.${X.DETAIL}`)]),L(e,`props`,{type:`primary`,plain:a.plain,link:a.link}),fr(e,`on.click`)||L(e,`on.click`,g)):e.field===X.DEL?(L(e,`children`,[{type:`icon`,props:{icon:`ep:delete`}},o(`action.${X.DEL}`)]),L(e,`props`,{type:`danger`,plain:a.plain,link:a.link}),fr(e,`on.click`)||L(e,`on.click`,v),a.permiPrefix&&!fr(e,`computed.hidden`)&&L(e,`computed.hidden`,_)):e.field===X.EXPORT&&(L(e,`children`,[{type:`icon`,props:{icon:`ep:download`}},o(`action.${X.EXPORT}`)]),L(e,`props`,{type:`warning`,plain:a.plain,link:a.link}),a.permiPrefix&&!fr(e,`computed.hidden`)&&L(e,`computed.hidden`,b)),L(e,`native`,!0)}),[t]});function m(){return!Nc([`${a.permiPrefix}:create`],[`admin`])}function h(){var e;if(typeof(c==null||(e=c.value)==null?void 0:e.toggle)==`function`){var t;c==null||(t=c.value)==null||t.toggle(!0,a.modelValue,!1)}}function g(){var e;if(typeof(c==null||(e=c.value)==null?void 0:e.toggle)==`function`){var t;c==null||(t=c.value)==null||t.toggle(!0,a.modelValue,a.readonly)}}function _(){return!Nc([`${a.permiPrefix}:delete`],[`admin`])}function v(){return y.apply(this,arguments)}function y(){return y=H(function*(){var e,t;(yield s.delConfirm().catch(e=>e))===`confirm`&&(typeof a.deleteHandler==`function`&&a.idField&&(yield a.deleteHandler((e=a.modelValue)==null?void 0:e[a.idField])),yield(0,n.nextTick)(),l==null||(t=l.value)==null||t.remove(a.modelValue),i(`refresh`))}),y.apply(this,arguments)}function b(){return!Nc([`${a.permiPrefix}:export`],[`admin`])}return t({}),(t,r)=>{let i=(0,n.resolveComponent)(`ab-form`);return(0,n.openBlock)(),(0,n.createBlock)(i,{rule:p.value,"model-value":e.modelValue,api:f.value,"onUpdate:api":r[0]||(r[0]=e=>f.value=e)},null,8,[`rule`,`model-value`,`api`])}}}));function xl(e){return typeof e==`object`&&!!e&&`name`in e&&typeof e.name==`string`}function Sl(e){return typeof e==`string`||typeof e==`function`||xl(e)}function Cl(e){return e==null||typeof e==`string`||typeof e==`number`?e:String(e)}function wl(e){if(e!=null)return typeof e==`string`||typeof e==`number`?e:String(e)}function Tl(e,t,n){if(t==null||t===``)return;if(typeof e==`function`)return e(n);if(typeof e==`string`)return{name:e,query:{id:Cl(t)}};if(!xl(e))return;let r={name:e.name},i=e.query;typeof i==`string`?r.query={[i]:Cl(t)}:i&&(r.query={},Object.keys(i).forEach(e=>{let t=i[e];r.query[e]=Cl(n[t])}));let a=e.params;if(typeof a==`string`){let e=wl(t);e!==void 0&&(r.params={[a]:e})}else a&&(r.params={},Object.keys(a).forEach(e=>{let t=a[e],i=wl(n[t]);i!==void 0&&(r.params[e]=i)}));return r}var El={class:`ab-router-link`},Dl=(0,n.defineComponent)(V(V({},{name:`AbRouterLink`}),{},{__name:`ab-router-link`,props:{link:{},value:{},row:{}},setup(e){let t=e,r=(0,n.computed)(()=>Tl(t.link,t.value,t.row));return(e,t)=>{let a=(0,n.resolveComponent)(`ab-icon`);return(0,n.openBlock)(),(0,n.createElementBlock)(`div`,El,[(0,n.createVNode)(a,{icon:`ep:link`,size:16}),r.value?((0,n.openBlock)(),(0,n.createBlock)((0,n.unref)(i.RouterLink),{key:0,to:r.value,class:`ab-router-link`},{default:(0,n.withCtx)(()=>[(0,n.renderSlot)(e.$slots,`default`)]),_:3},8,[`to`])):(0,n.renderSlot)(e.$slots,`default`,{},void 0,void 0,1)])}}})),Ol=(0,n.defineComponent)(V(V({},{name:`AbTableColumn`}),{},{__name:`ab-table-column`,props:{rule:{},idField:{},idFieldTable:{},permiPrefix:{},sortable:{type:Boolean},deleteHandler:{},readonly:{type:Boolean}},emits:[`refresh`,`operated`],setup(e,{emit:t}){let r=t,i=e,{t:a}=z(),o=yl(),s=(0,n.inject)(`abTableRef`,null),c=(0,n.computed)(()=>{var e;return!((e=i.rule)!=null&&e.hidden)}),l=(0,n.computed)(()=>i.sortable!==!1&&i.rule.sortable!==!1&&i.rule.sortFieldTable!==!1&&(i.rule.sortable===!0||i.rule.sortFieldTable!==void 0||!!i.idFieldTable)),u=(0,n.computed)(()=>{var e,t,n,r,a;return V(V({},i.rule.params),{},{sortField:(e=i.rule.sortField)==null?(t=i.rule.params)==null?void 0:t.sortField:e,sortFieldTable:typeof i.rule.sortFieldTable==`string`?i.rule.sortFieldTable:(n=(r=(a=i.rule.params)==null?void 0:a.sortFieldTable)==null?i.idFieldTable:r)==null?``:n})}),d=(0,n.computed)(()=>ol(i.rule).formatter);(function(){var e=H(function*({row:e,rule:t},n){if(n.type===X.DETAIL)typeof n.handler==`function`?n.handler({row:e}):m(!0,e,i.readonly);else if(n.type===X.UPDATE)m(!0,e);else if(n.type===X.DEL){if((yield o.delConfirm().catch(e=>e))!==`confirm`)return;if(typeof n.handler==`function`){yield n.handler(e);return}let t=i.idField?e[i.idField]:void 0;if(t&&typeof n.deleteHandler==`function`)yield n.deleteHandler(t,e).catch(e=>{});else{var a;s==null||(a=s.value)==null||a.remove(e)}r(`refresh`),r(`operated`)}else typeof n.handler==`function`&&n.handler({row:e},n)});return function(t,n){return e.apply(this,arguments)}})();function f({cellValue:e,row:t,column:n}={}){var r;if(typeof((r=i.rule)==null||(r=r.on)==null?void 0:r.change)==`function`){var a,o;(a=i.rule)==null||(a=a.on)==null||(o=a.change)==null||o.call(a,{cellValue:e,row:t,column:n})}}let p=(0,n.inject)(`abTableDetailRef`,void 0),m=(e=!1,t=void 0,n=!1)=>{console.log(`toggleTableDetail: `,p==null?void 0:p.value,e,t,n);let r=p==null?void 0:p.value;typeof(r==null?void 0:r.toggle)==`function`&&r.toggle(e,t,n)};return(t,i)=>{var a,o,s,p,m;let h=(0,n.resolveComponent)(`el-switch`),g=(0,n.resolveComponent)(`ab-icon`),_=(0,n.resolveComponent)(`vxe-column`);return e.rule.field?((0,n.openBlock)(),(0,n.createBlock)(_,{key:1,title:e.rule.title,field:e.rule.field,sortable:l.value,params:u.value,width:((a=e.rule)==null?void 0:a.width)||`auto`,"min-width":(o=e.rule)==null?void 0:o.minWidth,align:(s=e.rule)==null?void 0:s.align,fixed:(p=e.rule)==null?void 0:p.fixed,visible:c.value,"class-name":(m=e.rule)!=null&&m.cellArrow?`items-center`:``},{default:(0,n.withCtx)(t=>{var a,o;return[e.rule.type===`ElRow`&&e.rule.field===(0,n.unref)(X).OPERATE?((0,n.openBlock)(),(0,n.createBlock)(bl,{key:0,"id-field":e.idField,"permi-prefix":e.permiPrefix,rule:e.rule,"model-value":t.row,"delete-handler":e.deleteHandler,readonly:e.readonly,link:``,onRefresh:i[0]||(i[0]=e=>r(`refresh`))},null,8,[`id-field`,`permi-prefix`,`rule`,`model-value`,`delete-handler`,`readonly`])):e.rule.field?((0,n.openBlock)(),(0,n.createElementBlock)(n.Fragment,{key:1},[(a=e.rule)!=null&&a.cellRender?((0,n.openBlock)(),(0,n.createElementBlock)(n.Fragment,{key:0},[e.rule.type===`switch`?((0,n.openBlock)(),(0,n.createBlock)(h,(0,n.mergeProps)({key:0},e.rule.props,{modelValue:t.row[e.rule.field],"onUpdate:modelValue":n=>t.row[e.rule.field]=n,onChange:n=>f({cellValue:t.row[e.rule.field],column:t.column,row:t.row})}),null,16,[`modelValue`,`onUpdate:modelValue`,`onChange`])):((0,n.openBlock)(),(0,n.createElementBlock)(n.Fragment,{key:1},[(0,n.createTextVNode)((0,n.toDisplayString)(e.rule.type),1)],64))],64)):e.rule.link?((0,n.openBlock)(),(0,n.createBlock)(Dl,{key:1,link:e.rule.link,value:t.row[e.rule.field],row:t.row},{default:(0,n.withCtx)(()=>[d.value?((0,n.openBlock)(),(0,n.createElementBlock)(n.Fragment,{key:0},[(0,n.createTextVNode)((0,n.toDisplayString)(d.value({cellValue:t.row[e.rule.field],column:t.column,row:t.row})),1)],64)):((0,n.openBlock)(),(0,n.createElementBlock)(n.Fragment,{key:1},[(0,n.createTextVNode)((0,n.toDisplayString)(t.row[e.rule.field]),1)],64))]),_:2},1032,[`link`,`value`,`row`])):d.value?((0,n.openBlock)(),(0,n.createElementBlock)(n.Fragment,{key:2},[(0,n.createTextVNode)((0,n.toDisplayString)(d.value({cellValue:t.row[e.rule.field],column:t.column,row:t.row})),1)],64)):((0,n.openBlock)(),(0,n.createElementBlock)(n.Fragment,{key:3},[(0,n.createTextVNode)((0,n.toDisplayString)(t.row[e.rule.field]),1)],64))],64)):(0,n.createCommentVNode)(``,!0),(o=e.rule)!=null&&o.cellArrow?((0,n.openBlock)(),(0,n.createBlock)(g,{key:2,icon:t.row[e.rule.field]<0?`streamline:graph-arrow-decrease`:`streamline:graph-arrow-increase`,class:(0,n.normalizeClass)(t.row[e.rule.field]<0?`danger`:`success`)},null,8,[`icon`,`class`])):(0,n.createCommentVNode)(``,!0)]}),_:1},8,[`title`,`field`,`sortable`,`params`,`width`,`min-width`,`align`,`fixed`,`visible`,`class-name`])):((0,n.openBlock)(),(0,n.createElementBlock)(n.Fragment,{key:0},[],64))}}})),kl=(0,n.defineComponent)(V(V({},{name:`AbTableColumns`}),{},{__name:`ab-table-columns`,props:{rule:{},idx:{},idField:{},idFieldTable:{},permiPrefix:{},sortable:{type:Boolean},deleteHandler:{},readonly:{type:Boolean}},emits:[`refresh`],setup(e,{emit:t}){let r=t,i=e,a=(0,n.computed)(()=>{let{field:e,children:t}=i.rule;return!!(t!=null&&t.length)&&(e?e!==X.OPERATE:!i.rule.type&&!!i.rule.title)});return(t,o)=>{var s,c,l;let u=(0,n.resolveComponent)(`ab-table-columns`,!0),d=(0,n.resolveComponent)(`vxe-colgroup`);return a.value?((0,n.openBlock)(),(0,n.createBlock)(d,{key:0,field:e.rule.field,title:(s=e.rule)==null?void 0:s.title,"header-align":((c=e.rule)==null?void 0:c.groupAlign)||((l=e.rule)==null?void 0:l.align)||`center`},{default:(0,n.withCtx)(()=>{var t;return[((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)((t=e.rule)==null?void 0:t.children,(t,a)=>((0,n.openBlock)(),(0,n.createBlock)(u,(0,n.mergeProps)({key:t.field||`${e.idx}_${a}`,ref_for:!0},V(V({},i),{},{rule:t,idx:a}),{"id-field":e.idField,onRefresh:o[0]||(o[0]=e=>r(`refresh`))}),null,16,[`id-field`]))),128))]}),_:1},8,[`field`,`title`,`header-align`])):((0,n.openBlock)(),(0,n.createBlock)(Ol,{key:1,rule:e.rule,"id-field":e.idField,"id-field-table":e.idFieldTable,"permi-prefix":e.permiPrefix,sortable:e.sortable,"delete-handler":e.deleteHandler,readonly:e.readonly,onRefresh:o[1]||(o[1]=e=>r(`refresh`))},null,8,[`rule`,`id-field`,`id-field-table`,`permi-prefix`,`sortable`,`delete-handler`,`readonly`]))}}})),Al,jl;function Ml(e,t){if(!e||e===t)return;let n=e.props.abFormInject;if(n)return n;if(e.parent)return Ml(e.parent,t)}function Nl(){let e=(0,n.getCurrentInstance)();if(!e)throw Error(`AbForm lifecycle hook requires an active Vue component.`);return e}function Pl(){return typeof document<`u`&&typeof document.createElement==`function`&&document.head!=null}function Fl(e,t,r){return(0,n.defineComponent)({name:`AbForm`+(e.isMobile?`Mobile`:``),components:t,directives:r,props:{rule:{type:Array,required:!0,default:()=>[]},option:{type:Object,default:()=>({})},extendOption:Boolean,driver:[String,Object],modelValue:Object,idField:String,idFieldTable:String,disabled:{type:Boolean,default:void 0},readonly:{type:Boolean,default:void 0},preview:{type:Boolean,default:void 0},index:[String,Number],api:Object,locale:[String,Object],t:Function,name:String,subForm:{type:Boolean,default:!0},inFor:Boolean},emits:[`update:api`,`update:modelValue`,`mounted`,`beforeUnmount`,`submit`,`reset`,`change`,`emit-event`,`control`,`remove-rule`,`remove-field`,`sync`,`reload`,`repeat-field`,`update`,`validate-field-fail`,`validate-fail`,`created`],render(){return this.fc.render()},setup(t){let r=Nl();(0,n.provide)(`parentFC`,r);let i=(0,n.inject)(`parentFC`,null),a=i==null?r:i;if(i)for(;a.setupState.parent;)a=a.setupState.parent;let{rule:o,modelValue:s,subForm:c,inFor:l}=(0,n.toRefs)(t),u=(0,n.reactive)({ctxInject:{},destroyed:!1,isShow:!0,unique:1,renderRule:[...o.value||[]]}),d=JSON.stringify(s.value||{}),f=new e(r),p=f.api(),m=l.value,h=()=>{if(i){let e=Ml(r,i);if(e){let t;if(m){let n=e.getSubForm();t=Array.isArray(n)?[...n]:n?[n]:[],t.push(p)}else t=p;e.subForm(t)}}},g=()=>{let e=Ml(r,i);if(e){if(m){let t=pc(e.getSubForm()),n=t.indexOf(p);n>-1&&t.splice(n,1)}else e.subForm()}},_=null;(0,n.onBeforeMount)(()=>{Pl()&&(0,n.watchEffect)(()=>{let e=``,n=t.option&&t.option.globalClass||{};Object.keys(n).forEach(t=>{let r=``,i=n[t].style;i&&Object.keys(i).forEach(e=>{r+=Fs(e)+`:`+i[e]+`;`}),n[t].content&&(r+=n[t].content+`;`),r&&(e+=`.${t}{${r}}`)}),t.option&&t.option.style&&(e+=t.option.style),_||(_=document.createElement(`style`),_.type=`text/css`,document.head.appendChild(_)),_.innerHTML=e||``})});let v=sc(()=>{f.bus.$emit(`$loadData.$topForm`)},100),y=sc(function(){f.bus.$emit(`$loadData.$scopeForm`)},100),b=sc(()=>{f.bus.$emit(`$loadData.$form`)},100),x=(...e)=>{f.bus.$emit(`change-$form.`+String(e[0]))};return(0,n.onMounted)(()=>{i&&(p.top.bus.$on(`$loadData.$form`,v),p.top.bus.$on(`change`,x)),p!==p.scope&&p.scope.bus.$on(`$loadData.$scopeForm`,y),f.mounted()}),(0,n.onBeforeUnmount)(()=>{i&&(p.top.bus.$off(`$loadData.$form`,v),p.top.bus.$off(`change`,x)),p!==p.scope&&p.scope.bus.$off(`$loadData.$scopeForm`,y),g(),u.destroyed=!0,f.unmount(),_&&_.parentNode&&_.parentNode.removeChild(_)}),(0,n.onUpdated)(()=>{f.updated()}),h(),(0,n.watch)(()=>t.option,()=>{f.initOptions(),p.refresh()},{deep:!0,flush:`sync`}),(0,n.watch)(()=>[...o.value],e=>{f.$handle.isBreakWatch()||e.length===u.renderRule.length&&e.every(e=>u.renderRule.indexOf(e)>-1)||(f.$handle.updateAppendData(),f.$handle.reloadRule(o.value),r.setupState.renderRule())}),(0,n.watch)(()=>[t.disabled,t.preview,t.readonly],()=>{p.refresh()}),(0,n.watch)(s,e=>{if(Xs(e||{})===d)return;let t=e==null?{}:e;p.config.forceCoverValue?p.coverValue(t):p.setValue(t)},{deep:!0,flush:`post`}),(0,n.watch)(()=>t.index,()=>{p.coverValue({}),f.$handle.updateAppendData(),(0,n.nextTick)(()=>{(0,n.nextTick)(()=>{p.clearValidateState()})})},{flush:`sync`}),V(V({fc:(0,n.markRaw)(f),parent:i&&(0,n.markRaw)(i),top:(0,n.markRaw)(a),fapi:(0,n.markRaw)(p)},(0,n.toRefs)(u)),{},{getGroupInject:()=>Ml(r,i),refresh(){++u.unique},renderRule(){u.renderRule=[...o.value||[]]},updateValue(e){if(u.destroyed)return;let t=Xs(e);d!==t&&(d=t,r.emit(`update:modelValue`,e),(0,n.nextTick)(()=>{b(),i?c.value||y():(v(),y())}))}})},created(){let e=Nl();e.emit(`update:api`,e.setupState.fapi),e.setupState.fc.init()}})}var Il=[`type`,`slot`,`ignore`,`emitPrefix`,`value`,`name`,`native`,`hidden`,`display`,`inject`,`options`,`emit`,`link`,`prefix`,`suffix`,`update`,`sync`,`optionsTo`,`key`,`slotUpdate`,`computed`,`preview`,`component`,`cache`,`modelEmit`],Ll=[`validate`,`children`,`control`],Rl=[`effect`,`deep`,`renderSlots`];function zl(){return[...Il,...Ws,...Gs,...Ks,...Ll,...Rl]}function Bl(e,t){return{value:e,enumerable:!1,configurable:!1,writable:!!t}}function Vl(e,t){return Hl([e],t||!1)[0]}function Hl(e,t){return zs([],[...e],t||!1)}var Ul={array:Ll,normal:Rl};function Wl(e,t){return ac(Array.isArray(t)?t:[t],e,Ul),e}function Gl(e){let t=typeof e.getRule==`function`?e.getRule():e;return t.type||(t.type=`text`),t}function Kl(e,t){return e?(Object.keys(t||{}).forEach(n=>{t!=null&&t[n]&&(e[n]=Wl(e[n]||{},t[n]))}),e):t}function ql(e,t){Object.defineProperties(e,Object.keys(t).reduce((e,n)=>(e[n]={get(){return t[n]()}},e),{}))}function Jl(e){return e?e.__fc__||(e.__origin__?e.__origin__.__fc__:null):null}function Z(e,t){try{return e()}catch(e){Us(e)}return t}function Yl(){let e={},t=e=>e||`default`;return{setSlot(n,r){n=t(n),!r||Array.isArray(r)&&r.length||(e[n]||(e[n]=[]),e[n].push(r))},getSlot(n,r){n=t(n);let i=[];return(e[n]||[]).forEach(e=>{if(Array.isArray(e))i.push(...e);else if(W.Function(e)){let t=e(...r||[]);Array.isArray(t)?i.push(...t):i.push(t)}else W.Undef(e)||i.push(e)}),i},getSlots(){let t={};return Object.keys(e).forEach(e=>{t[e]=(...t)=>this.getSlot(e,t)}),t},slotLen(n){return n=t(n),e[n]?e[n].length:0},mergeBag(e){if(!e)return this;let t=e,r=W.Function(t.getSlots)?t.getSlots():e;return Array.isArray(e)||(0,n.isVNode)(e)?this.setSlot(void 0,()=>e):Object.keys(r).forEach(e=>{this.setSlot(e,r[e])}),this}}}function Xl(e){let t=V({},e.props||{}),n=e.on||{};return Object.keys(n).forEach(e=>{e.indexOf(`-`)>0&&(e=q(e));let r=`on${Is(e)}`;Array.isArray(t[r])?t[r]=[...t[r],n[e]]:t[r]?t[r]=[t[r],n[e]]:t[r]=n[e]}),t.key=e.key,t.ref=e.ref,t.class=e.class,t.id=e.id,t.style=e.style,t.slot&&delete t.slot,t}function Zl(e,t){return Object.setPrototypeOf(e,t),e}var Ql=(e,t)=>typeof e==`string`?String(t):typeof e==`number`?Number(t):t,$l={"==":(e,t)=>JSON.stringify(e)===JSON.stringify(Ql(e,t)),"!=":(e,t)=>!$l[`==`](e,t),">":(e,t)=>e>t,">=":(e,t)=>e>=t,"<":(e,t)=>e<t,"<=":(e,t)=>e<=t,on(e,t){let n=e;return n&&n.indexOf&&n.indexOf(Ql(n[0],t))>-1},notOn(e,t){return!$l.on(e,t)},in(e,t){let n=t;return n&&n.indexOf&&n.indexOf(e)>-1},notIn(e,t){return!$l.in(e,t)},between(e,t){let n=t;return e>n[0]&&e<n[1]},notBetween(e,t){let n=t;return e<n[0]||e>n[1]},empty(e){return W.empty(e)},notEmpty(e){return!W.empty(e)},pattern(e,t){return new RegExp(t,`g`).test(e)}};function Q(e,t){return(typeof t==`string`?t.split(`.`):t||[]).forEach(t=>{e!=null&&(e=e[t])}),e}function eu(e){let t=/{{\s*(.*?)\s*}}/g,n,r={};for(;(n=t.exec(e))!==null;)n[1]&&(r[n[1]]=!0);return Object.keys(r)}function tu(e){let t=e.split(`.`),n=[],r=``;return t.forEach((e,t)=>{t===0?r=e:r+=`.`+e,n.push(r)}),n.join(` && `)}function nu(e){let t=[],n=``,r=0;for(let i=0;i<e.length;i++){let a=e[i];a===`[`?(r===0&&n&&(t.push({type:`key`,value:n}),n=``),r++,n+=a):a===`]`?(r--,n+=a,r===0&&(t.push({type:`bracket`,value:nu(n.slice(1,-1))}),n=``)):a===`.`&&r===0?n&&(n=(t.push({type:`key`,value:n}),``)):n+=a}return n&&t.push({type:`key`,value:n}),t.map(e=>e.type===`key`?{key:e.value}:{children:e.value})}function ru(){return{props:{},on:{},options:[],children:[],hidden:!1,display:!0,value:void 0}}var iu=class{constructor(e,t,n,r,i){B(this,`_data`,void 0),B(this,`event`,void 0),this._data=V(V({},ru()),{},{type:e,title:t,field:n,value:r,props:i||{}}),this.event=this.on}getRule(){return this._data}setProp(e,t){return U(this._data,e,t),this}modelField(e){return this._data.modelField=e,this}on(e,t){return this.setAttribute(`on`,e,t,arguments.length>=2)}setAttribute(e,t,n,r=!1){let i=r?{[t]:n}:t;return Wl(this._data,{[e]:i}),this}_clone(){let e=this.constructor,t=new e;return t._data=Vl(this._data),t}};function au(e){e.forEach(e=>{Object.defineProperty(iu.prototype,e,{configurable:!0,enumerable:!0,writable:!0,value:function(t,n){return this.setAttribute(e,t,n,arguments.length>=2)}})})}au(zl());function $(e,t){return(n,r,i,a={})=>{let o=new iu(e,n,r,i,a);return typeof t==`function`?t(o):t&&o.setAttribute(`props`,t),o}}var ou=$(``);function su(e,t,n){let r=ou(``,t);return r._data.type=e,r._data.title=n,r}function cu(){return{create:su,factory:$}}function lu(e,t){return Object.assign(Error(`fail to ${e} ${t.status}'`),{status:t.status,url:e})}function uu(e){let t=e.responseText||e.response;if(!t)return t;try{return JSON.parse(t)}catch(e){return t}}function du(e){if(typeof XMLHttpRequest>`u`)return;let t=new XMLHttpRequest,n=e.action||``;t.upload&&e.onProgress&&t.upload.addEventListener(`progress`,t=>{var n;let r=t;r.percent=r.total>0?r.loaded/r.total*100:0,(n=e.onProgress)==null||n.call(e,r)});let r=e.query;if(r){let e=typeof r==`string`?r:Object.keys(r).reduce((e,t)=>{let n=r[t];return e[t]=n==null?``:String(n),e},{}),t=new URLSearchParams(e).toString();t&&(n+=n.includes(`?`)?`&${t}`:`?${t}`)}t.onerror=t=>{var n;(n=e.onError)==null||n.call(e,t)},t.onload=()=>{var r;t.status<200||t.status>=300?(r=e.onError)==null||r.call(e,lu(n,t),uu(t)):e.onSuccess(uu(t))},t.open(e.method||`get`,n,!0);let i=null;if(e.data||e.file){if(e.file||(e.dataType||``).toLowerCase()!==`json`){let t=new FormData;Object.keys(e.data||{}).forEach(n=>{var r;let i=(r=e.data)==null?void 0:r[n];t.append(n,typeof Blob<`u`&&i instanceof Blob?i:String(i))}),i=t}else i=JSON.stringify(e.data||{}),t.setRequestHeader(`content-type`,`application/json`)}e.file&&i instanceof FormData&&i.append(String(e.filename),e.file,e.file.name),e.withCredentials&&`withCredentials`in t&&(t.withCredentials=!0);let a=e.headers||{};Object.keys(a).forEach(e=>{a[e]!=null&&t.setRequestHeader(e,a[e])}),t.send(i)}function fu(e,t,n){return new Promise((r,i)=>{(t||du)(V(V({},e),{},{onSuccess(t){let i=e=>e,a=Zs(e.parse);typeof a==`function`?i=(e,t,n)=>a(e,t,n):typeof a==`string`&&(i=e=>Q(e,a)),fc(i(t,e.targetRule,n)).then(r)},onError(e){i(e)}}))})}function pu(e){return Bs(e)}function mu(e){function t(t){return W.Undef(t)?t=e.fields():Array.isArray(t)||(t=[t]),t}function r(t,n,r){W.Undef(t)?t=Object.keys(V(V({},e.fieldCtx),e.nameCtx)):Array.isArray(t)||(t=[t]),t.forEach(t=>{let i=e.fieldCtx[t]||e.nameCtx[t];i&&i.forEach(t=>{U(t.rule,n,r),e.$render.clearCache(t)})})}function i(){let t=e.subForm;return Object.keys(t).reduce((e,n)=>{let r=t[n];return r&&(Array.isArray(r)?e.push(...r):e.push(r)),e},[])}let a={get isScope(){return e.vm.props.subForm===!1},get isPreview(){return e.preview},get config(){return e.options},set config(t){e.fc.options.value=t},get options(){return e.options},set options(t){e.fc.options.value=t},get form(){return e.form},get rule(){return e.rules},get parent(){return e.vm.setupState.parent&&e.vm.setupState.parent.setupState.fapi},get top(){return a.parent?a.parent.top:a},get scope(){let t=e.vm;for(;t&&t.setupState.fapi;)if(t.props.subForm)t=t.setupState.parent;else return t.setupState.fapi;return a.top},get children(){return i()},get siblings(){let t=e.vm.setupState.getGroupInject();if(t){let e=t.getSubForm();if(Array.isArray(e))return[...e]}},get index(){let e=a.siblings;if(e){let t=e.indexOf(a);return t>-1?t:void 0}},get formulas(){return V({},e.fc.formulas)},formData(n){if(n==null||typeof n==`boolean`){let t={};return Object.keys(e.form).forEach(r=>{(n===!0||e.ignoreFields.indexOf(r)===-1)&&(t[r]=pu(e.form[r]))}),t}return t(n).reduce((e,t)=>(e[t]=a.getValue(t),e),{})},getValue(t){let n=e.getFieldCtx(t);return n?pu(n.rule.value):e.options.appendValue!==!1&&G(e.appendData,t)?pu(e.appendData[t]):void 0},coverValue(t){let n=V({},t||{});e.deferSyncValue(()=>{e.appendData={},a.fields().forEach(r=>{let i=e.fieldCtx[r];if(i){let e=G(t,r);i.forEach(n=>{n.rule.value=e?t[r]:void 0}),delete n[r]}}),K(e.appendData,n)},!0)},setValue(t){let n=t;arguments.length>=2&&(n={[t]:arguments[1]}),e.deferSyncValue(()=>{Object.keys(n).forEach(t=>{let r=e.fieldCtx[t];if(!r)return e.appendData[t]=n[t];r.forEach(e=>{e.rule.value=n[t]})})},!0)},removeField(t){let n=e.getCtx(t);return e.deferSyncValue(()=>{e.getCtxs(t).forEach(e=>{e.rm()})},!0),n?n.origin:void 0},removeRule(e){let t=e&&Jl(e);if(t)return t.rm(),t.origin},fields:()=>e.fields(),append:(t,n,r)=>{let i=e.sort.length-1,a,o=e.getCtx(n);if(o){if(r){if(a=o.getPending(`children`,o.rule.children),!Array.isArray(a))return;i=o.rule.children.length-1}else i=o.root.indexOf(o.origin),a=o.root}else a=e.rules;a.splice(i+1,0,t)},prepend:(t,n,r)=>{let i=0,a,o=e.getCtx(n);if(o){if(r){if(a=o.getPending(`children`,o.rule.children),!Array.isArray(a))return}else i=o.root.indexOf(o.origin),a=o.root}else a=e.rules;a.splice(i,0,t)},hidden(t,n){r(n,`hidden`,!!t),e.refresh()},hiddenStatus(t){let n=e.getCtx(t);if(n)return!!n.rule.hidden},display(t,n){r(n,`display`,!!t),e.refresh()},displayStatus(t){let n=e.getCtx(t);if(n)return!!n.rule.display},disabled(n,r){t(r).forEach(t=>{e.getCtxs(t).forEach(e=>{U(e.rule.props,`disabled`,!!n)})}),e.refresh()},all(t){return Object.keys(e.ctxs).map(n=>{let r=e.ctxs[n];return t?r.origin:r.rule})},model(t){return e.fields().reduce((n,r)=>{let i=e.fieldCtx[r][0];return n[r]=t?i.origin:i.rule,n},{})},component(t){return Object.keys(e.nameCtx).reduce((n,r)=>{let i=e.nameCtx[r].map(e=>t?e.origin:e.rule);return n[r]=i.length===1?i[0]:i,n},{})},bind(){return a.form},reload:t=>{e.reloadRule(t)},updateOptions(t){e.fc.updateOptions(t),a.refresh()},onSubmit(e){a.updateOptions({onSubmit:e})},sync:t=>{if(Array.isArray(t)){t.forEach(e=>a.sync(e));return}let n=W.Object(t)?Jl(t):e.getCtxs(t);n&&(n=Array.isArray(n)?n:[n],n.forEach(t=>{if(!t.deleted){let n=e.subForm[t.id];n&&(Array.isArray(n)?n.forEach(e=>{e.refresh()}):n&&n.refresh()),e.$render.clearCache(t)}}),e.refresh())},refresh:()=>{i().forEach(e=>{e.refresh()}),e.$render.clearCacheAll(),e.refresh()},refreshOptions(){e.$manager.updateOptions(e.options),a.refresh()},hideForm:t=>{e.vm.setupState.isShow=!t},changeStatus:()=>e.changeStatus,clearChangeStatus:()=>{e.changeStatus=!1},updateRule(t,n){e.getCtxs(t).forEach(e=>{K(e.rule,n)})},updateRules(e){Object.keys(e).forEach(t=>{a.updateRule(t,e[t])})},mergeRule:(t,n)=>{e.getCtxs(t).forEach(e=>{Wl(e.rule,n)})},mergeRules(e){Object.keys(e).forEach(t=>{a.mergeRule(t,e[t])})},getRule:(t,n)=>{let r=e.getCtx(t);if(r)return n?r.origin:r.rule},findType(t,n){let r;return Object.keys(e.ctxs).forEach(i=>{let a=e.ctxs[i];a.rule.type===t&&(r=n?a.origin:a.rule)}),r},findTypes(t,n){let r=[];return Object.keys(e.ctxs).forEach(i=>{let a=e.ctxs[i];a.rule.type===t&&r.push(n?a.origin:a.rule)}),r},getRenderRule:t=>{let n=e.getCtx(t);if(n)return n.prop},getRefRule:t=>{let n=e.getCtxs(t);if(n){let e=n.map(e=>e.rule);return e.length===1?e[0]:e}},setEffect(t,n,r){let i=e.getCtx(t);i&&n&&(n[0]===`$`&&(n=n.substr(1)),G(i.rule,`$`+n)&&U(i.rule,`$`+n,r),G(i.rule,`effect`)||(i.rule.effect={}),U(i.rule.effect,n,r))},clearEffectData(t,n){let r=e.getCtx(t);r&&(n&&n[0]===`$`&&(n=n.substr(1)),r.clearEffectData(n),a.sync(t))},updateValidate(e,t,n){n?a.mergeRule(e,{validate:t}):r(e,`validate`,t)},updateValidates(e,t){Object.keys(e).forEach(n=>{a.updateValidate(n,e[n],t)})},refreshValidate(){a.refresh()},resetFields(r){t(r).forEach(t=>{e.getCtxs(t).forEach(t=>{e.$render.clearCache(t),t.rule.value=pu(t.defaultValue)})}),(0,n.nextTick)(()=>{(0,n.nextTick)(()=>{(0,n.nextTick)(()=>{a.clearValidateState(r)})})}),r!=null||(W.Function(e.options.onReset)&&Z(()=>e.options.onReset(a)),e.vm.emit(`reset`,a))},method(e,t){let n=a.el(e);if(!n||!n[t])throw Error(Vs(`err`,`${t} 方法不存在`));return(...e)=>n[t](...e)},exec(e,t,...n){return Z(()=>a.method(e,t)(...n))},toJson(e){return Xs(a.rule,e)},trigger(e,t,...n){let r=a.el(e);r&&r.$emit(t,...n)},el(t){let n=e.getCtx(t);if(n)return n.el||e.vm.refs[n.ref]},scrollTo(e,t={block:`center`,inline:`nearest`,behavior:`smooth`}){let n=a.el(e);if(!n)return;let r=n.$el===void 0?n:n.$el;if(!r)return;let i=r.nodeType===1?r:r.firstElementChild;i&&typeof i.scrollIntoView==`function`&&i.scrollIntoView(t)},focus(e){let t=a.el(e);if(!t)return;let n=e=>!e||typeof e.focus!=`function`?!1:(Z(()=>e.focus()),!0);if(n(t))return;let r=t.$el===void 0?t:t.$el;if(n(r))return;let i=r&&(r.nodeType===1?r:r.firstElementChild);n(i)||i&&i.querySelector&&n(i.querySelector(`input:not([type=hidden]):not([disabled]),textarea:not([disabled]),select:not([disabled]),[tabindex]:not([tabindex="-1"])`))},closeModal:t=>{e.bus.$emit(`fc:closeModal:`+t)},getSubForm(t){let n=e.getCtx(t);return n?e.subForm[n.id]:void 0},getChildrenRuleList(t){let n=typeof t==`object`,r=n?Jl(t):e.getCtx(t),i=r?r.rule:n?t:a.getRule(t);if(!i)return[];let o=[];return(e=>{e&&e.forEach(e=>{typeof e==`object`&&(e.field&&o.push(e),o.push(...a.getChildrenRuleList(e)))})})(r?r.loadChildrenPending():i.children),o},getParentRule(t){return(typeof t==`object`?Jl(t):e.getCtx(t)).parent.rule},getParentSubRule(t){let n=typeof t==`object`?Jl(t):e.getCtx(t);if(n){let e=n.getParentGroup();if(e)return e.rule}},getChildrenFormData(e,t){return a.getChildrenRuleList(e).reduce((e,n)=>((n.ignore!==!0||t===!0)&&(e[n.field]=pu(n.value)),e),{})},setChildrenFormData(t,n,r){let i=a.getChildrenRuleList(t);e.deferSyncValue(()=>{i.forEach(e=>{G(n,e.field)?e.value=n[e.field]:r&&(e.value=void 0)})})},getGlobalEvent(e){let t=a.options.globalEvent[e];if(t)return typeof t==`object`&&(t=t.handle),Zs(t)},getGlobalData(t){return new Promise((n,r)=>{let i=a.options.globalData[t];i?i.type===`fetch`?a.fetch(i).then(e=>{n(e)}).catch(r):n(i.data):n(e.fc.loadData[t])})},emitGlobalEvent(t,...n){let r=a.getGlobalEvent(t);if(r){let t=e.getInjectData({},void 0);return t.args=[...n],n.unshift(t),r.apply(null,n)}},setGlobalData(e,t){a.setData(`$globalData.`+e,t)},setGlobalVar(e,t){a.setData(`$var.`+e,t)},renderRule(t,n,r){let i=typeof t==`object`?Jl(t):e.getCtx(t);return i?e.$render.createRuleVnode(i,n,r):void 0},renderChildren(t,n,r){let i=typeof t==`object`?Jl(t):e.getCtx(t);return i?e.$render.createChildrenVnodes(i,n,r):void 0},nextTick(t){e.bus.$once(`next-tick`,t),e.refresh()},nextRefresh(t){e.nextRefresh(),t&&Z(t)},deferSyncValue(t,n){e.deferSyncValue(t,n)},emit(t,...n){e.vm.emitsOptions&&!e.vm.emitsOptions[t]&&(e.vm.emitsOptions[t]=null),e.vm.emit(t,...n)},bus:e.bus,getCurrenabFormRule(){var t;return(t=e.vm.setupState.getGroupInject())==null?void 0:t.rule},fetch(t){return new Promise((n,r)=>{let i=V({},t);i=e.loadFetchVar(i);let o=e=>{Z(()=>i.onError&&i.onError(e)),r(e)};e.beforeFetch(i).then(()=>fu(i,e.fc.create.fetch,a).then(e=>{Z(()=>i.onSuccess&&i.onSuccess(e)),n(e)}).catch(e=>{o(e)})).catch(e=>{o(e)})})},watchFetch(t,n,r,i){return e.fc.watchLoadData((o,s)=>{let c=V({},t);if(c=e.loadFetchVar(c,o),i&&i(c,s)===!1)return;let l=e=>{Z(()=>c.onError&&c.onError(e)),r&&r(e)};e.beforeFetch(c).then(()=>fu(c,e.fc.create.fetch,a).then(e=>{Z(()=>c.onSuccess&&c.onSuccess(e)),n&&n(e,s)}).catch(e=>{l(e)})).catch(e=>{l(e)})},t.wait==null?1e3:t.wait)},getData(t,n){return e.fc.get?e.fc.get(t,n):e.fc.getLoadData(t,n)},watchData(t){return e.fc.watchLoadData((e,n)=>{Z(()=>t(e,n))})},setData(t,n,r){return e.fc.setData(t,n,r)},refreshData(t){return e.fc.refreshData(t)},t(t,n){return e.fc.t(t,n)},getLocale(){return e.fc.getLocale()},helper:{tidyFields:t,props:r}};return[`on`,`once`,`off`].forEach(t=>{a[t]=function(...n){e.bus[`$${t}`](...n)}}),a.changeValue=a.changeField=a.setValue,a}function hu(e){K(e.prototype,{initCache(){this.clearCacheAll()},clearCache(e){if(e.rule.cache)return;let t=this.cache[e.id];t?((t.use===!0||t.parent)&&this.$handle.refresh(),t.parent&&this.clearCache(t.parent),this.cache[e.id]=null):e.parent&&this.clearCache(e.parent)},clearCacheAll(){this.cache={}},setCache(e,t,n){this.cache[e.id]={vnode:t,use:!1,parent:n,slot:e.rule.slot}},getCache(e){let t=this.cache[e.id];if(t)return t.use=!0,t.vnode}})}var gu={init(e){},toFormValue(e,t){return e},toValue(e,t){return e},mounted(e){},render(e,t){return t.$handle.fc.renderDriver&&t.$handle.fc.renderDriver.defaultRender?t.$handle.fc.renderDriver.defaultRender(t,e):t.$render.defaultRender(t,e)},preview(e,t){return t.$handle.fc.renderDriver&&t.$handle.fc.renderDriver.defaultPreview?t.$handle.fc.renderDriver.defaultPreview(t,e):this.render(e,t)},mergeProp(e){}};function _u(e,t){let{key:n,origin:r,def:i,onLoad:a,onReload:o,onUpdate:s}=t;if(e.pending[n]&&e.pending[n].origin===r)return e.getPending(n,i);delete e.pending[n];let c=r;if(W.Function(r)){let t=r,l=Z(()=>t({rule:e.rule,api:e.$api,update:t=>{let a=t||i,o=e.getPending(n,i);e.setPending(n,r,a),s&&s(a,o)},reload:()=>{let t=e.getPending(n,i);delete e.pending[n],o&&o(t),e.$api&&e.$api.sync(e.rule)}}));l&&W.Function(l.then)?(l.then(t=>{let o=t||i;e.setPending(n,r,o),a&&a(o),e.$api&&e.$api.sync(e.rule)}).catch(e=>{console.error(e)}),c=i,e.setPending(n,r,c)):(c=l||i,e.setPending(n,r,c),a&&a(c))}return c}function vu(e,t,n={}){let r=V({key:`options`,origin:t,def:[]},n);return`loadPending`in e?e.loadPending(r):_u(e,r)}function yu(e){K(e.prototype,{initRender(){this.cacheConfig={}},getTypeSlot(e){let t=n=>{if(n){let r;return e.rule.field&&(r=n.slots[`field-`+Fs(e.rule.field)]||n.slots[`field-`+e.rule.field]),r||(r=n.slots[`type-`+Fs(e.type)]||n.slots[`type-`+e.type]),r||t(n.setupState.parent)}};return t(this.vm)},render(){if(!this.vm.setupState.isShow)return;this.$manager.beforeRender(),this.applyShowNumber(this.$manager.rule);let e=Yl();return this.sort.forEach(t=>{this.renderSlot(e,this.$handle.ctxs[t])}),this.$manager.render(e)},applyShowNumber(e){let t=this.$handle.options||{};if(!t.showNumber||!e)return;e.class=this.mergeClass(e.class,`is-numbered`),t.showNumber===`chinese`&&(e.class=this.mergeClass(e.class,`is-number-chinese`));let n=t.numberColor,r=(t.form||{}).style;e.style=n?W.String(r)?`${r};--ab-number-color:${n}`:Array.isArray(r)?r.concat({"--ab-number-color":n}):V(V({},r||{}),{},{"--ab-number-color":n}):r},renderSlot(e,t,n){if(this.isFragment(t)){t.initProp(),this.mergeGlobal(t),t.initNone();let n=this.renderChildren(t.loadChildrenPending(),t),r=n.default;r&&e.setSlot(t.rule.slot,()=>r()),delete n.default,e.mergeBag(n)}else e.setSlot(t.rule.slot,this.renderCtx(t,n))},mergeGlobal(e){if(!this.$handle.options.global)return;let{trueType:t,originType:r,type:i}=e;this.cacheConfig[t]||(this.cacheConfig[t]=(0,n.computed)(()=>{let e=this.$handle.options.global;return Wl({},[e[`*`]||e.default||{},e[r]||e[i]||{}])})),e.prop=Wl({},[this.cacheConfig[e.trueType].value,e.prop])},setOptions(e){let t=vu(e,e.prop.options);e.prop.options=t,e.prop.optionsTo&&t&&cc(e.prop,e.prop.optionsTo,t)},deepSet(e){let t=e.prop.deep;t&&Object.keys(t).sort((e,t)=>e.length<t.length?-1:1).forEach(n=>{cc(e.prop,n,t[n])})},parseSide(e,t){return W.Object(e)?Wl({props:{abFormInject:t.prop.props.abFormInject}},e):e},renderSides(e,t,n){let r=t[n?`rule`:`prop`];return[this.renderRule(this.parseSide(r.prefix,t)),e,this.renderRule(this.parseSide(r.suffix,t))]},renderId(e,t){let n=this.$handle[t===`field`?`fieldCtx`:`nameCtx`][e];return n?n.map(e=>this.renderCtx(e,e.parent)):void 0},renderCtx(e,t){try{var n;if(e.type===`hidden`)return;let r=e.rule;if(this.force||!this.cache[e.id]||((n=this.cache[e.id])==null?void 0:n.slot)!==r.slot){let n;e.initProp(),this.mergeGlobal(e),e.initNone(),this.$manager.tidyRule(e),this.deepSet(e),this.setOptions(e),this.ctxProp(e);let i=e.prop;i.preview=!!(i.preview==null?this.$handle.preview:i.preview),i.props.abFormInject=this.injectProp(e);let a=i.cache!==!1,o=i.preview;if(i.hidden){this.setCache(e,void 0,t);return}n=(...n)=>{var s,c;let l={rule:r,prop:i,preview:o,api:this.$handle.api,model:i.model||{},slotValue:n};n.length&&r.slotUpdate&&Z(()=>r.slotUpdate(l));let u={},d=e.loadChildrenPending();e.parser.renderChildren?u=e.parser.renderChildren(d,e):e.parser.loadChildren!==!1&&(u=this.renderChildren(d,e)),Object.keys(i.renderSlots||{}).forEach(t=>{u[t]=(...n)=>{if(W.Function(i.renderSlots[t]))return Z(()=>i.renderSlots[t](...n));let r=this.parseSide(i.renderSlots[t],e);return this.renderRule(r)}});let f=this.getTypeSlot(e),p;if(f)l.children=u,p=f(l);else{let t=lc(u);if(o)p=e.parser.preview(t,e);else{var m;let n=e.parser,r=n!==gu,i=r&&Object.prototype.hasOwnProperty.call(n,`render`);if(r&&!i&&e.input&&((m=e.$handle)==null||(m=m.vm)==null||(m=m.props)==null?void 0:m.readonly)===!0){var h;let r=typeof this.$handle.getParser==`function`?this.$handle.getParser({type:`text`,originType:`text`,trueType:`text`}):(h=this.fc.parsers)==null?void 0:h.text;p=r&&r!==n?r.render(t,e):n.render(t,e)}else p=n.render(t,e)}}return p=this.renderSides(p,e),(s=i.title)!=null&&s.show&&(i.wrap=V({show:!0},i.wrap||{}),i.native||(i.native=!1)),(e.input||!W.Undef(i.native)||((c=i.col)==null?void 0:c.show)===!0)&&i.native!==!0&&(this.fc.targeabFormDriver(`updateWrap`,e),p=this.$manager.makeWrap(e,p)),e.none&&(p=Array.isArray(p)?p.map(e=>!e||!e.__v_isVNode?e:this.none(e)):this.none(p)),a&&this.setCache(e,()=>this.stable(p),t),p},this.setCache(e,n,t)}return(...t)=>{let n=this.getCache(e);if(n)return n(...t);if(this.cache[e.id])return;let r=this.renderCtx(e,e.parent);if(r)return r()}}catch(e){console.error(e);return}},none(e){if(e)return e.props.class=this.mergeClass(e.props.class,`ab-none`),e},mergeClass(e,t){if(Array.isArray(e))e.push(t);else return e?[e,t]:t;return e},stable(e){return(Array.isArray(e)?e:[e]).forEach(e=>{e&&e.__v_isVNode&&e.children&&typeof e.children==`object`&&(e.children.$stable=!0,this.stable(e.children))}),e},getModelField(e){var t,n,r;return e.prop.modelField||e.parser.modelField||((t=this.fc.modelFields)==null?void 0:t[this.vNode.aliasMap[e.type]])||((n=this.fc.modelFields)==null?void 0:n[e.type])||((r=this.fc.modelFields)==null?void 0:r[e.originType])||`modelValue`},isFragment(e){return e.type===`fragment`||e.type===`template`},injectProp(e){let t=this.vm.setupState;if(!t.ctxInject[e.id]){let n={api:this.$handle.api,form:this.fc.create,subForm:t=>{this.$handle.addSubForm(e,t)},getSubForm:()=>this.$handle.subForm[e.id],slots:()=>this.vm.setupState.top.slots,getWrap:()=>this.vm.refs[e.wrapRef],options:[],children:[],preview:!1,get readonly(){return e.$handle.vm.props.readonly},get idField(){return e.$handle.vm.props.idField},get idFieldTable(){return e.$handle.vm.props.idFieldTable},get formValue(){return e.$handle.vm.props.modelValue},id:e.id,field:e.field,rule:e.rule,input:e.input,t:(...e)=>this.$handle.api.t(...e),updateValue:t=>{this.$handle.onUpdateValue(e,t)}};t.ctxInject[e.id]=n}let n=t.ctxInject[e.id];return K(n,{preview:e.prop.preview,options:e.prop.options,children:e.loadChildrenPending()}),n},ensureCtxHandlers(e){if(e.handlers)return e.handlers;let t=this,n={vnodeMounted(n){n.el.__rule__=e.rule,t.onMounted(e,n.el)},vnodeBeforeUnmount(){t.$handle.effect(e,`beforeUnmount`),t.$handle.targetHook(e,`beforeUnmount`)},fcUpdateValue(n){t.$handle.onUpdateValue(e,n)},fcEl(t){e.exportEl=t,t&&((t.$el||t).__rule__=e.rule)},modelCallback(n){t.tmpInput&&t.tmpInput(e.field,n,e.rule),t.onInput(e,n)},modelEmit(){t.onEmitInput(e)}};return e.handlers=n,n},ctxProp(e){let{ref:t,key:n,rule:r}=e;this.$manager.mergeProp(e),e.parser.mergeProp(e);let i=this.ensureCtxHandlers(e),a=[{ref:t,key:r.key||`${n}fc`,slot:void 0,on:{vnodeMounted:i.vnodeMounted,vnodeBeforeUnmount:i.vnodeBeforeUnmount,"fc.updateValue":i.fcUpdateValue,"fc.el":i.fcEl}}];if(e.input){this.vm.props.disabled===!0&&(e.prop.props.disabled=!0);let t=this.getModelField(e),n={callback:i.modelCallback,modelField:t,value:this.$handle.geabFormData(e)};a.push({on:V({[`update:${t}`]:n.callback},e.prop.modelEmit?{[e.prop.modelEmit]:i.modelEmit}:{}),props:{[t]:n.value}}),e.prop.model=n}return ac(a,e.prop),e.prop},onMounted(e,t){e.el=this.vm.refs[e.ref]||t,e.parser.mounted(e),this.$handle.effect(e,`mounted`),this.$handle.targetHook(e,`mounted`)},onInput(e,t){e.prop.modelEmit?this.$handle.onBaseInput(e,t):this.$handle.onInput(e,t)},onEmitInput(e){this.$handle.setValue(e,e.parser.toValue(e.modelValue,e),e.modelValue)},renderChildren(e,t){if(!W.trueArray(e))return{};let r=Yl();return e.map(i=>{if(i){if(W.String(i)||W.Number(i))return r.setSlot(null,`${i}`);if(i.__fc__)return this.renderSlot(r,i.__fc__,t);i.type&&(0,n.nextTick)(()=>{this.$handle.loadChildren(e,t),this.$handle.refresh()})}}),r.getSlots()},defaultRender(e,t){let n=e.prop;return n.component?typeof n.component==`string`?this.vNode.make(n.component,n,t):this.vNode.makeComponent(n.component,n,t):this.vNode[e.type]?this.vNode[e.type](n,t):this.vNode[e.originType]?this.vNode[e.originType](n,t):this.vNode.make(mc(n.type),n,t)},createChildrenVnodes(e,t,n){this.force=n!==!1,this.tmpInput=t;let r=this.renderChildren(e.rule.children,e);return this.force=!1,this.tmpInput=null,r},createRuleVnode(e,t,n){this.force=n!==!1,this.tmpInput=t;let r=Yl();return this.renderSlot(r,e,e.parent),this.force=!1,this.tmpInput=null,r.getSlots()},renderRule(e,t,n){if(!e)return;if(W.String(e)||W.Number(e))return`${e}`;let r;if(n)r=e.type;else if(r=e.is,e.type){r=q(e.type);let t=this.vNode.aliasMap[r];t&&(r=q(t))}if(!r)return;let i=Yl();W.trueArray(e.children)&&e.children.forEach(e=>{e&&i.setSlot(e==null?void 0:e.slot,()=>this.renderRule(e))});let a=V({},e);return delete a.type,delete a.is,this.vNode.make(r,a,i.mergeBag(t).getSlots())}})}var bu=1;function xu(e){K(this,{$handle:e,fc:e.fc,vm:e.vm,$manager:e.$manager,vNode:new e.fc.CreateNode(e),force:!1,tmpInput:null,id:bu++}),ql(this,{options(){return e.options},sort(){return e.sort}}),this.initCache(),this.initRender()}hu(xu),yu(xu);function Su(e){K(e.prototype,{parseInjectEvent(e,t){let n=e.inject||this.options.injectEvent;return this.parseEventLst(e,t,n)},parseEventLst(e,t,n,r){return Object.keys(t).forEach(i=>{let a=this.parseEvent(e,t[i],n,r);a&&(t[i]=a)}),t},parseEvent(e,t,n,r){if(W.Function(t)&&(n!==!1&&!W.Undef(n)||t.__inject))return this.inject(e,t,n);if(!r&&Array.isArray(t)&&t[0]&&(W.String(t[0])||W.Function(t[0])))return this.parseEventLst(e,t,n,!0);if(W.String(t)){let r=Zs(t);if(r&&t!==r){let t=r;return t.__inject?this.parseEvent(e,t,n,!0):t}}},parseEmit(e){let t={},n=e.rule,{emitPrefix:r,field:i,name:a,inject:o}=n,s=n.emit||[];return W.trueArray(s)&&s.forEach(e=>{if(!e)return;let s,c=r||i||a;if(W.Object(e)&&(s=e.inject,e=e.name,c=e.prefix||c),c){let r=Fs(`${c}-${e}`),i=(...e)=>{this.vm.emitsOptions&&!this.vm.emitsOptions[r]&&(this.vm.emitsOptions[r]=null),this.vm.emit(r,...e),this.vm.emit(`emit-event`,r,...e),this.bus.$emit(r,...e)};if(i.__emit=!0,!s&&o===!1)t[q(e)]=i;else{let r=s||o||this.options.injectEvent;t[q(e)]=W.Undef(r)?i:this.inject(n,i,r)}}}),e.computed.on=t,t},getInjectData(e,t){let n=e.__fc__&&e.__fc__.$api,{option:r,rule:i}=(e.__fc__&&e.__fc__.$handle.vm||this.vm).props;return{$f:n||this.api,api:n||this.api,rule:i,self:e.__origin__,option:r,inject:t}},inject(e,t,n){if(t.__origin){if(this.watching&&!this.loading)return t;t=t.__origin}let r=this,i=function(...i){let a=r.getInjectData(e,n);return a.args=[...i],i.unshift(a),t.apply(this,i)};return i.__origin=t,i.__json=t.__json,i},loadStrVar(e,t,n){if(e&&typeof e==`string`&&e.indexOf(`{{`)>-1&&e.indexOf(`}}`)>-1){let r=e,i=eu(e),a=e=>{let r=!1,i;if(n&&e.indexOf(`$form.`)===0){let a=e.split(`.`);a.shift(),G(n.value,a[0])&&(r=!0,i=t?t({id:`$form.`+a[0]+`_`+n.rule.__fc__.id,getValue:()=>Q(n.value,a)}):Q(n.value,a))}return r||(i=t?t(e):this.fc.getLoadData(e)),i},o=e=>{let t=[];e.forEach(e=>{e.key?t.push(e.key):e.children&&t.push(o(e.children))});let n=!1;return t.forEach((e,r)=>{e!=null&&(e.indexOf(`'`)===0||e.indexOf(`"`)===0)&&(t[r]=e.slice(1,-1),n=!0)}),t.length===1&&(n||!isNaN(Number(t[0])))?t[0]:a(t.join(`.`))},s;if(i.forEach(t=>{let n=t.split(`||`),r=n[0].trim();if(r){var i;let a=(n[1]||``).trim(),c=nu(r),l=Z(()=>o(c));(l==null||l===``)&&n.length>1&&(l=a),s=l,e=e.replaceAll(`{{${t}}}`,(i=l)==null?``:i)}}),i.length===1&&r===`{{${i[0]}}}`)return s}return e},loadFetchVar(e,t,n){let r;n&&n.__fc__&&(r=n.__fc__.getParentGroup()),!r&&e.targetRule&&e.targetRule.__fc__&&(r=e.targetRule.__fc__.getParentGroup());let i=e=>this.loadStrVar(e,t,r?{rule:n,value:this.subRuleData[r.id]||{}}:null);return e.action=i(e.action||``),[`headers`,`data`,`query`].forEach(t=>{if(e[t]){let n=Array.isArray(e[t])?[]:{};Object.keys(e[t]).forEach(r=>{n[i(r)]=i(e[t][r])}),e[t]=n}}),e}})}var Cu=[`hook:updated`,`hook:mounted`];function wu(e){K(e.prototype,{usePage(){let e=this.options.page;if(!e)return;let t=25,n=Tu(this.rules);if(W.Object(e)){let r=e;r.first&&(t=parseInt(String(r.first),10)||t),r.limit&&(n=parseInt(String(r.limit),10)||n)}K(this,{first:t,limit:n,pageEnd:this.rules.length<=t}),this.bus.$on(`page-end`,()=>this.vm.emit(`page-end`,this.api)),this.pageLoad()},pageLoad(){let e=()=>{this.pageEnd?(this.bus.$off(Cu,e),this.bus.$emit(`page-end`)):(this.first+=this.limit,this.pageEnd=this.rules.length<=this.first,this.loadRule(),this.refresh())};this.bus.$on(Cu,e)}})}function Tu(e){return e.length<31?31:Math.ceil(e.length/3)}function Eu(e){K(e.prototype,{clearNextTick(){this.nextTick&&clearTimeout(this.nextTick),this.nextTick=null},bindNextTick(e){this.clearNextTick(),this.nextTick=setTimeout(()=>{e(),this.nextTick=null},10)},render(){return++this.loadedId,this.vm.setupState.unique>0?this.$render.render():(this.vm.setupState.unique=1,[])}})}function Du(e){Object.defineProperties(e.origin,{__fc__:Bl((0,n.markRaw)(e),!0)}),e.rule!==e.origin&&Object.defineProperties(e.rule,{__fc__:Bl((0,n.markRaw)(e),!0)})}function Ou(e,t,n){let r=_c(),i=!!t.field;K(this,{id:r,ref:r,wrapRef:r+`fi`,rule:t,origin:t.__origin__||t,name:t.name,pending:{},none:!1,watch:[],linkOn:[],root:[],ctrlRule:[],children:[],parent:null,group:t.subRule?this:null,cacheConfig:null,prop:V({},t),computed:{},payload:{},refRule:{},handlers:null,input:i,el:void 0,exportEl:void 0,defaultValue:i?Bs(n):void 0,field:t.field||void 0}),this.updateKey(),Du(this),this.update(e,!0)}K(Ou.prototype,{getParentGroup(){let e=this.parent;for(;e;){if(e.group)return e;e=e.parent}},loadChildrenPending(){let e=this.rule.children||[];return Array.isArray(e)?e:this.loadPending({key:`children`,origin:e,def:[],onLoad:e=>{this.$handle&&this.$handle.loadChildren(e,this)},onUpdate:(e,t)=>{this.$handle&&(e===t?this.$handle.loadChildren(e,this):this.$handle.updateChildren(this,e,t))},onReload:e=>{this.$handle?this.$handle.updateChildren(this,[],e):delete this.pending.children}})},loadPending(e){return _u(this,e)},getPending(e,t){return this.pending[e]&&this.pending[e].value||t},setPending(e,t,r){this.pending[e]={origin:t,value:(0,n.reactive)(r)}},effectData(e){return this.payload[e]||(this.payload[e]={}),this.payload[e]},clearEffectData(e){e===void 0?this.payload={}:delete this.payload[e]},updateKey(e){this.key=_c(),e&&this.parent&&this.parent.updateKey(e)},updateType(){this.originType=this.rule.type,this.type=q(this.rule.type),this.trueType=this.$handle.getType(this.originType)},setParser(e){this.parser=e,e.init(this)},initProp(){var e,t;let n=V({},this.rule);delete n.children,delete n.validate,this.prop=Wl({},[n,...Object.keys(this.payload).map(e=>this.payload[e]),this.computed]),n.col&&((e=n.col)==null?void 0:e.show)!==!1&&(this.prop.col.show=!0),this.prop.validate=[...((t=this.refRule)==null||(t=t.__$validate)==null?void 0:t.value)||[],...this.prop.validate||[]]},initNone(){this.none=!(W.Undef(this.prop.display)||this.prop.display)},hasHidden(){return!!this.rule.hidden||(this.parent?this.parent.hasHidden():!1)},injectValidate(){return this.prop.validate},check(e){return this.vm===e.vm},unwatch(){this.watch.forEach(e=>e()),this.watch=[],Object.keys(this.refRule).forEach(e=>{e.indexOf(`__$`)!==0&&delete this.refRule[e]})},unlink(){this.linkOn.forEach(e=>e()),this.linkOn=[]},link(){this.unlink(),this.$handle.appendLink(this)},watchTo(){this.$handle.watchCtx(this)},delete(){this.unwatch(),this.unlink(),this.rmCtrl(),this.parent&&this.parent.children.splice(this.parent.children.indexOf(this)>>>0,1),K(this,{deleted:!0,computed:{},parent:null,children:[],cacheConfig:null,none:!1,handlers:null,el:void 0,exportEl:void 0})},rmCtrl(){this.ctrlRule.forEach(e=>e.__fc__&&e.__fc__.rm()),this.ctrlRule=[]},rm(){let e=()=>{let e=this.root.indexOf(this.origin);e>-1&&(this.root.splice(e,1),this.$handle&&this.$handle.refresh())};this.deleted?e():this.$handle.noWatch(()=>{this.$handle.deferSyncValue(()=>{this.rmCtrl(),e(),this.$handle.rmCtx(this),K(this,{root:[]})},this.input)})},update(e,t){K(this,{deleted:!1,$handle:e,$render:e.$render,$api:e.api,vm:e.vm,vNode:e.$render.vNode,updated:!1,cacheValue:this.rule.value}),!t&&this.unwatch(),this.watchTo(),this.link(),this.updateType()}});function ku(e){K(e.prototype,{nextRefresh(e){let t=this.loadedId;(0,n.nextTick)(()=>{t===this.loadedId&&(e?e():this.refresh())})},parseRule(e){let t=Gl(e);return Object.defineProperties(t,{__origin__:Bl(e,!0)}),Au(t),this.appendValue(t),[t,t.prefix,t.suffix].forEach(e=>{e&&this.loadFn(e,t)}),this.loadCtrl(t),t.update&&(t.update=Zs(t.update)),t},loadFn(e,t){[`on`,`props`,`deep`].forEach(n=>{e[n]&&this.parseInjectEvent(t,e[n])})},loadCtrl(e){e.control&&e.control.forEach(e=>{e.handle&&(e.handle=Zs(e.handle))})},syncProp(e){let t=e.rule,n=t.sync;W.trueArray(n)&&ac([{on:n.reduce((e,n)=>(e[typeof n==`object`&&n.event||`update:${n}`]=e=>{t.props[typeof n==`object`&&n.prop||n]=e,this.vm.emit(`sync`,n,e,t,this.fapi)},e),{})}],e.computed)},loadRule(){this.cycleLoad=!1,this.loading=!0,this.pageEnd&&this.bus.$emit(`load-start`),this.deferSyncValue(()=>{if(this._loadRule(this.rules),this.loading=!1,this.cycleLoad&&this.pageEnd)return this.loadRule();this.syncForm(),this.pageEnd&&this.bus.$emit(`load-end`),this.vm.setupState.renderRule()})},loadChildren(e,t){if(this.cycleLoad=!1,this.loading=!0,this.bus.$emit(`load-start`),this._loadRule(e,t),this.loading=!1,this.cycleLoad)return this.loadRule();this.syncForm(),this.bus.$emit(`load-end`),this.$render.clearCache(t)},_loadRule(e,t){let n=t=>{let r=e[t-1];if(!r||!r.__fc__)return t>0?n(t-1):-1;let i=this.sort.indexOf(r.__fc__.id);return i>-1?i:n(t-1)},r=(e,t)=>{W.trueArray(e)&&this._loadRule(e,t)},i=e.map((i,a)=>{if(t&&!W.Object(i)||!this.pageEnd&&!t&&a>=this.first)return;if(i.__fc__&&i.__fc__.root===e&&this.ctxs[i.__fc__.id])return r(i.__fc__.loadChildrenPending(),i.__fc__),i.__fc__;let o=Gl(i),s=()=>!!(o.field&&this.fieldCtx[o.field]&&this.fieldCtx[o.field][0]!==i.__fc__);this.fc.targeabFormDriver(`loadRule`,{rule:o,api:this.api},this.fc),this.ruleEffect(o,`init`,{repeat:s()}),s()&&this.vm.emit(`repeat-field`,i,this.api);let c=i.__fc__||null,l=!1,u=c!==null,d=o.value;if(u){let t=c;if(d=t.defaultValue,t.deleted){if(Nu(t))return;t.update(this)}else if(!t.check(this)){if(Nu(t))return;e[a]=i=i._clone?i._clone():Qs(Xs(i)),c=null,l=!0}}if(c)c.originType!==c.rule.type&&c.updateType(),this.bindParser(c),this.appendValue(c.rule),c.parent&&c.parent!==t&&this.rmSubRuleData(c);else{let e=this.parseRule(i);c=new Ou(this,e,d),this.bindParser(c)}this.parseEmit(c),this.syncProp(c),c.parent=t||null,c.root=e,this.setCtx(c),!l&&!u&&(this.effect(c,`load`),this.targetHook(c,`load`)),this.effect(c,`created`);let f=c.loadChildrenPending();if(c.parser.loadChildren===!1||r(f,c),!t){let e=n(a);e>-1||!a?this.sort.splice(e+1,0,c.id):this.sort.push(c.id)}let p=c.rule;return c.updated||(c.updated=!0,W.Function(p.update)&&this.bus.$once(`load-end`,()=>{this.refreshUpdate(c,p.value,`init`)}),this.effect(c,`loaded`)),this.refreshControl(c)&&(this.cycleLoad=!0),c}).filter(e=>!!e);t&&(t.children=i)},refreshControl(e){return e.input&&e.rule.control&&this.useCtrl(e)},useCtrl(e){let t=ju(e),r=[],i=this.api;if(!t.length)return!1;for(let n=0;n<t.length;n++){let a=t[n],o=a.handle||function(e){let t=$l;return(t[a.condition||`==`]||t[`==`])(e,a.value)};if(!W.trueArray(a.rule))continue;let s=V(V({},a),{},{valid:Z(()=>o(e.rule.value,i)),ctrl:Mu(e,a.rule),isHidden:W.String(a.rule[0])});s.valid&&s.ctrl||!s.valid&&!s.ctrl&&!s.isHidden||r.push(s)}if(!r.length)return!1;let a=[],o=!1;return this.deferSyncValue(()=>{r.reverse().forEach(({isHidden:t,valid:n,rule:r,prepend:s,append:c,child:l,ctrl:u,method:d})=>{if(t)n?e.ctrlRule.push({__ctrl:!0,children:r,valid:n}):u&&e.ctrlRule.splice(e.ctrlRule.indexOf(u)>>>0,1),a[n?`push`:`unshift`](()=>{d===`disabled`||d===`enabled`?this.api.disabled(!n,r):d===`display`||d===`show`?this.api.display(n,r):d===`required`?(r.forEach(e=>{this.api.setEffect(e,`required`,n)}),n||this.api.clearValidateState(r)):this.api.hidden(!n,r)});else if(n){o=!0;let t={type:`fragment`,native:!0,__ctrl:!0,children:r};e.ctrlRule.push(t),this.bus.$once(`load-start`,()=>{s?i.prepend(t,s,l):c||l?i.append(t,c||e.id,l):e.root.splice(e.root.indexOf(e.origin)+1,0,t)})}else{e.ctrlRule.splice(e.ctrlRule.indexOf(u),1);let t=Jl(u);t&&t.rm()}})}),a.length&&(this.loading?a.length&&this.bus.$once(`load-end`,()=>{a.forEach(e=>e())}):a.length&&(0,n.nextTick)(()=>{a.forEach(e=>e())})),this.vm.emit(`control`,e.origin,this.api),this.effect(e,`control`),o},reloadRule(e){return this._reloadRule(e)},_reloadRule(e){e||(e=this.rules);let t=V({},this.ctxs);this.clearNextTick(),this.initData(e),this.fc.rules=e,this.deferSyncValue(()=>{this.bus.$once(`load-end`,()=>{Object.keys(t).filter(e=>this.ctxs[e]===void 0).forEach(e=>this.rmCtx(t[e])),this.$render.clearCacheAll()}),this.reloading=!0,this.loadRule(),this.reloading=!1,this.refresh(),this.bus.$emit(`reloading`,this.api)}),this.bus.$off(`next-tick`,this.nextReload),this.bus.$once(`next-tick`,this.nextReload),this.bus.$emit(`update`,this.api)},refresh(){this.vm.setupState.refresh()}})}function Au(e){let t=ru();return Object.keys(t).forEach(n=>{G(e,n)||(e[n]=t[n])}),e}function ju(e){let t=e.rule.control||[];return W.Object(t)?[t]:t}function Mu(e,t){for(let n=0;n<e.ctrlRule.length;n++){let r=e.ctrlRule[n];if(r.children===t)return r}}function Nu(e){return!!e.rule.__ctrl}function Pu(e){K(e.prototype,{setValue(e,t,r,i){e.deleted||(e.rule.value=t,this.changeStatus=!0,this.seabFormData(e,r),this.$render.clearCache(e),this.nextRefresh(),this.syncValue(),this.valueChange(e,t),this.vm.emit(`change`,e.field,t,e.origin,this.api,i||!1),this.effect(e,`value`),this.targetHook(e,`value`,{value:t}),this.emitEvent(`change`,e.field,t,{rule:e.origin,api:this.api,setFlag:i||!1}),i&&(0,n.nextTick)(()=>{(0,n.nextTick)(()=>{(0,n.nextTick)(()=>{this.api.clearValidateState(e.id)})})}),this.$manager.fieldChange(e,t,r,i))},onInput(e,t){let n;e.input&&(this.isQuote(e,n=e.parser.toValue(t,e))||this.isChange(e,t))&&this.setValue(e,n,t)},onUpdateValue(e,t){this.deferSyncValue(()=>{let n=e.getParentGroup(),r=n?this.subRuleData[n.id]:null,i={};Object.keys(t||{}).forEach(e=>{r&&G(r,e)?i[e]=t[e]:G(this.api.form,e)?this.api.form[e]=t[e]:this.api.top!==this.api&&G(this.api.top.form,e)&&(this.api.top.form[e]=t[e])}),Object.keys(i).length&&this.api.setChildrenFormData(n.rule,i)})},onBaseInput(e,t){this.seabFormData(e,t),this.$render.clearCache(e),this.nextRefresh()},seabFormData(e,t){e.modelValue=t;let n=e.getParentGroup();n&&(this.subRuleData[n.id]||(this.subRuleData[n.id]={}),this.subRuleData[n.id][e.field]=e.rule.value),U(this.formData,e.id,t)},rmSubRuleData(e){let t=e.getParentGroup();t&&this.subRuleData[t.id]&&delete this.subRuleData[t.id][e.field]},geabFormData(e){return this.formData[e.id]},syncForm(){let e=(0,n.reactive)({}),t=this.fields(),r=[];this.options.appendValue!==!1&&Object.keys(this.appendData).forEach(r=>{t.indexOf(r)===-1&&(e[r]=(0,n.toRef)(this.appendData,r))}),t.forEach(t=>{let i=(this.fieldCtx[t]||[]).filter(e=>!this.isIgnore(e))[0];i||(i=this.fieldCtx[t][0],r.push(t)),e[t]=(0,n.toRef)(i.rule,`value`)}),this.form=e,this.ignoreFields=r,this.syncValue()},isIgnore(e){return e.rule.ignore===!0||(e.rule.ignore===`hidden`||this.options.ignoreHiddenFields)&&e.hasHidden()},appendValue(e){(e.field&&G(this.appendData,e.field)||W.Undef(e.value)&&this.options.forceCoverValue)&&(e.value=this.appendData[e.field],delete this.appendData[e.field])},addSubForm(e,t){this.subForm[e.id]=t},deferSyncValue(e,t){this.deferSyncFn||(this.deferSyncFn=e),this.deferSyncFn.sync||(this.deferSyncFn.sync=t),Z(e),this.deferSyncFn===e&&(this.deferSyncFn=null,e.sync&&this.syncForm())},syncValue(){if(this.deferSyncFn)return this.deferSyncFn.sync=!0;let e={};Object.keys(this.form).forEach(t=>{this.ignoreFields.indexOf(t)===-1&&(e[t]=this.form[t])}),this.vm.setupState.updateValue(e)},isChange(e,t){let n=this.geabFormData(e);if(n===t)return!1;let r=typeof n;return r===typeof t&&(r===`string`||r===`boolean`||r===`number`&&Number.isFinite(n)&&Number.isFinite(t))?!0:JSON.stringify(n,Fu)!==JSON.stringify(t,Fu)},isQuote(e,t){return(t instanceof Function||W.Object(t)||Array.isArray(t))&&t===e.rule.value},refreshUpdate(e,t,n,r){if(W.Function(e.rule.update)){let i=Z(()=>e.rule.update(t,e.origin,this.api,{origin:n||`change`,linkField:r}));if(i===void 0)return;e.rule.hidden=i===!0}},valueChange(e,t){this.refreshRule(e,t),this.bus.$emit(`change-`+e.field,t)},refreshRule(e,t,n,r){this.refreshControl(e)&&(this.$render.clearCacheAll(),this.loadRule(),this.bus.$emit(`update`,this.api),this.refresh()),this.refreshUpdate(e,t,n,r)},appendLink(e){let t=e.rule.link;W.trueArray(t)&&t.forEach(t=>{let n=()=>this.refreshRule(e,e.rule.value,`link`,t);this.bus.$on(`change-`+t,n),e.linkOn.push(()=>this.bus.$off(`change-`+t,n))})},fields(){return Object.keys(this.fieldCtx)}})}function Fu(e,t){return typeof t==`function`?``+t:t}var Iu=[`field`,`value`,`vm`,`template`,`name`,`config`,`control`,`inject`,`sync`,`payload`,`optionsTo`,`update`,`slotUpdate`,`computed`,`component`,`cache`],Lu=Symbol(`oldValue`),Ru=[`$condition`,`$variableVal`,`$val`,`$form`,`$scope`,`$group`,`$rule`],zu=[`$formulas`,`$form`,`$scope`,`$group`,`$rule`,`$api`],Bu=new Map,Vu=1e3;function Hu(e,t){let n=e.join(`,`)+`|`+t,r=Bu.get(n);return r||(Bu.size>=Vu&&Bu.clear(),r=Function(...e,t),Bu.set(n,r)),r}function Uu(e){K(e.prototype,{scheduleComputedUpdate(e){(this._computedQueue||(this._computedQueue=[])).push(e),this._computedFlushing||this._computedScheduled||(this._computedScheduled=!0,setTimeout(()=>{this._computedScheduled=!1,this._computedFlushing=!0;try{let e=this._computedQueue||[];this._computedQueue=[];for(let t=0;t<e.length;t++)Z(e[t]),this._computedQueue&&this._computedQueue.length&&(e.push(...this._computedQueue),this._computedQueue=[])}finally{this._computedFlushing=!1}}))},getCtx(e){return this.getFieldCtx(e)||this.getNameCtx(e)[0]||this.ctxs[e]},getCtxs(e){return this.fieldCtx[e]||this.nameCtx[e]||(this.ctxs[e]?[this.ctxs[e]]:[])},setIdCtx(e,t,n){let r=`${n}Ctx`;this[r][t]?this[r][t].push(e):this[r][t]=[e]},rmIdCtx(e,t,n){let r=`${n}Ctx`,i=this[r][t];if(!i)return!1;let a=i.splice(i.indexOf(e)>>>0,1).length>0;return i.length||delete this[r][t],a},getFieldCtx(e){return(this.fieldCtx[e]||[])[0]},getNameCtx(e){return this.nameCtx[e]||[]},setCtx(e){let{id:t,field:n,name:r,rule:i}=e;this.ctxs[t]=e,r&&this.setIdCtx(e,r,`name`),e.input&&(this.setIdCtx(e,n,`field`),this.seabFormData(e,e.parser.toFormValue(i.value,e)),this.isMounted&&!this.reloading&&this.vm.emit(`change`,e.field,i.value,e.origin,this.api,!1,!0))},getParser(e){let t=this.fc.parsers,n=this.fc.renderDriver,r=q(e.type)||e.type;if(n){let t=n.parsers||{},i=t[e.originType]||t[r]||t[e.trueType];if(i)return i}return t[e.originType]||t[r]||t[e.trueType]||gu},bindParser(e){e.setParser(this.getParser(e))},getType(e){let t=this.fc.CreateNode.aliasMap;return q(t[e]||t[q(e)||e]||e)},noWatch(e){this.noWatchFn||(this.noWatchFn=e),Z(e),this.noWatchFn===e&&(this.noWatchFn=null)},watchCtx(e){let t=zl().filter(e=>e[0]!==`_`&&e[0]!==`$`&&Iu.indexOf(e)===-1),r={},i=(t,r,i)=>(a,o)=>{let s=r.value;if(!this.isBreakWatch()){if(i&&e.parser.loadChildren===!1)this.$render.clearCache(e),this.nextRefresh();else{if(this.watching=!0,(0,n.nextTick)(()=>{this.targetHook(e,`watch`,{key:t,oldValue:o,newValue:s})}),t===`hidden`&&!!s!=!!o&&(0,n.nextTick)(()=>{this.targetHook(e,`hidden`,{value:s})}),t===`ignore`&&e.input||t===`hidden`&&(e.rule.ignore===`hidden`||this.options.ignoreHiddenFields))this.syncForm();else if(t===`link`){e.link();return}else[`props`,`on`,`deep`].indexOf(t)>-1?(this.parseInjectEvent(e.rule,s||{}),t===`props`&&e.input&&this.seabFormData(e,e.parser.toFormValue(e.rule.value,e))):t===`emit`?this.parseEmit(e):[`prefix`,`suffix`].indexOf(t)>-1?s&&this.loadFn(s,e.rule):t===`type`?(e.updateType(),this.bindParser(e)):i&&(W.Function(o)&&(o=e.getPending(`children`,[])),W.Function(s)&&(s=e.loadChildrenPending()),this.updateChildren(e,s,o));this.$render.clearCache(e),this.refresh(),this.watching=!1}}},a=(t,a=!1)=>{if(r[t])return;r[t]=!0;let o=e.refRule[t],s=t===`children`,c=i(t,o,s);e.watch.push((0,n.watch)(s?()=>W.Function(o.value)?o.value:[...o.value||[]]:()=>o.value,c,{deep:!s,flush:s?`sync`:`pre`})),a&&c(o.value,void 0)};if(t.forEach(t=>{e.refRule[t]=(0,n.toRef)(e.rule,t),G(e.rule,t)&&a(t)}),e.watch.push((0,n.watch)(()=>Object.keys(e.rule).join(`|`),()=>{t.forEach(t=>{!r[t]&&G(e.rule,t)&&a(t,!0)})})),e.refRule.__$title=(0,n.computed)(()=>{let t=(typeof e.rule.title==`object`?e.rule.title.title:e.rule.title)||``;if(t){let e=t.match(/^\{\{\s*\$t\.(.+)\s*\}\}$/);e&&(t=this.api.t(e[1]))}return t}),e.refRule.__$info=(0,n.computed)(()=>{let t=(typeof e.rule.info==`object`?e.rule.info.info:e.rule.info)||``;if(t){let e=t.match(/^\{\{\s*\$t\.(.+)\s*\}\}$/);e&&(t=this.api.t(e[1]))}return t}),e.refRule.__$validate=(0,n.computed)(()=>{let t=t=>{var n;let r=t.match(/^\{\{\s*\$t\.(.+)\s*\}\}$/);return r?this.api.t(r[1],{title:(n=e.refRule)==null||(n=n.__$title)==null?void 0:n.value}):t};return pc(e.rule.validate).map(n=>{let r=V({},n);if(r.message&&(r.message=t(r.message)),W.Function(r.validator)){let t=e;r.validator=function(...e){return n.validator.call({that:this,id:t.id,field:t.field,rule:t.rule,api:t.$handle.api},...e)}}if(r.adapter){if(typeof r.error==`object`){let e=V({},r.error);Object.keys(e).forEach(n=>{e[n]=t(e[n])}),r.error=e}return this.adapterValidate(r,e)}return r})}),e.input){let t=(0,n.toRef)(e.rule,`value`);e.watch.push((0,n.watch)(()=>t.value,()=>{let n=e.parser.toFormValue(t.value,e);this.isChange(e,n)&&this.setValue(e,t.value,n,!0)}))}this.bus.$once(`load-end`,()=>{let t=e.rule.computed;t&&(typeof t!=`object`&&(t={value:t}),Object.keys(t).forEach(r=>{let i=(0,n.computed)(()=>{let n=t[r];if(!n)return;let i=this.compute(e,n);return(n.linkage||n.linkageVariable)&&i===Lu?Lu:i}),a=t=>{r===`value`?this.onInput(e,t):r[0]===`$`?this.api.setEffect(e.id,r,t):cc(e.rule,r,t)};(r===`value`?[void 0,null,``].indexOf(e.rule.value)>-1:i.value!==Q(e.rule,r))&&a(i.value),e.watch.push((0,n.watch)(i,e=>{e!==Lu&&this.scheduleComputedUpdate(()=>a(e))},{deep:!0}))}))}),this.watchEffect(e)},adapterValidate(e,t){return this.$manager.adapterValidate({required:e.required,message:e.message,trigger:e.trigger},(n,r)=>{if((e.beforeValidate&&Z(()=>e.beforeValidate({value:n,api:this.api,validate:e,rule:t.rule})))===!1)r();else{let i=this.validator(t,n,e);if(i){let n=``;typeof e.error==`object`&&(n=e.error[i]||e.error.default),!n&&typeof e.message==`string`&&(n=e.message),n||(n=this.getValidateMessage(t,{key:i,rule:e[i]})),r(n)}else if(e.validator){let t=e.validator&&Z(()=>e.validator(n,r));t&&W.Function(t.then)&&t.then(()=>r()).catch(e=>r(e))}else r()}})},getValidateMessage(e,t){var n;let r=Array.isArray(t.rule)?t.rule.join(`,`):``+t.rule;return this.api.t(t.key===`required`?t.key:`validate.`+t.key,{[t.key]:r,title:(n=e.refRule)==null||(n=n.__$title)==null?void 0:n.value})},validator(e,t,n){if(W.empty(t))return n.required?`required`:void 0;for(let[r,i]of Object.entries(n))switch(r){case`len`:case`maxLen`:case`minLen`:let n=e=>r===`len`?e===i:r===`maxLen`?e<=i:e>=i;if(Array.isArray(t)){if(!n(t.length))return r}else if(typeof t==`object`)return r;else if(!n((``+t).length))return r;break;case`pattern`:if(!(typeof i==`string`?new RegExp(i):i).test(``+t))return r;break;case`uppercase`:if(i&&(typeof t!=`string`||!/^[A-Z]*$/.test(t)))return r;break;case`lowercase`:if(i&&(typeof t!=`string`||!/^[a-z]*$/.test(t)))return r;break;case`min`:case`max`:case`positive`:case`negative`:case`integer`:case`number`:let a=Number(t);if(Number.isNaN(a)||r===`min`&&a<i||r===`max`&&a>i||r===`positive`&&a<=0||r===`negative`&&a>=0||r===`integer`&&!Number.isInteger(a))return r;break;case`equal`:if(t!==i)return r;break;case`enum`:if(Array.isArray(i)&&!i.includes(t))return r;break;case`hasKeys`:if(typeof t!=`object`||Array.isArray(i)&&i.some(e=>!(e in t)))return r;break;case`email`:if(!/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(``+t))return r;break;case`url`:if(!RegExp(`^(?!mailto:)(?:(?:http|https|ftp)://)(?:\\S+(?::\\S*)?@)?(?:(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[0-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]+-?)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]+-?)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))|localhost)(?::\\d{2,5})?(?:(/|\\?|#)[^\\s]*)?$`,`i`).test(``+t))return r;break;case`ip`:if(!/^(2(5[0-5]{1}|[0-4]\d{1})|[0-1]?\d{1,2})(\.(2(5[0-5]{1}|[0-4]\d{1})|[0-1]?\d{1,2})){3}$/.test(``+t))return r;break;case`phone`:if(!/^(?:(?:\+|00)86)?1[3-9]\d{9}$/.test(``+t))return r;break;case`computed`:if(!this.compute(e,i))return r}},compute(e,t){let n;if(typeof t==`object`){let n=e.getParentGroup(),r=t=>{if(t=Array.isArray(t)?{mode:`AND`,group:t}:t,!W.trueArray(t.group))return!0;let i=t.mode===`OR`,a=!0;for(let o=0;o<t.group.length;o++){let s=t.group[o],c,l=null,u=null;if(s.variable)u=this.fc.getLoadData(s.variable);else if(s.field)l=tu(s.field||``);else if(!s.mode)return!0;let d=s.compare;if(d&&(d=tu(d||``)),c=s.mode?r(s):$l[s.condition]?W.Function(s.handler)?Z(()=>s.handler(this.api,e.rule)):Z(()=>Hu(Ru,`with($form){with($scope){with(this){with($group){ return $condition['${s.condition}'](${s.variable?`$variableVal`:l}, ${d||`$val`}); }}}}`).call(this.api.form,$l,u,s.value,this.api.top.form,this.api.top===this.api.scope?{}:this.api.scope.form,n&&this.subRuleData[n.id]||{},e.rule)):!1,i&&c)return!0;i||a&&(a=c)}return!i&&a},i=t,a=r(i);return a=i.invert===!0?!a:a,i.linkage?a?Z(()=>this.computeValue(i.linkage,e,n),void 0):Lu:i.linkageVariable?a?Z(()=>this.fc.getLoadData(i.linkageVariable),void 0):Lu:a}if(W.Function(t)){let r=t;n=()=>r(this.api.form,this.api,e.rule)}else{let r=e.getParentGroup();n=()=>this.computeValue(t,e,r)}return Z(n,void 0)},computeValue(e,t,n){let r=this,i=Object.keys(this.fc.formulas).reduce((e,n)=>(e[n]=function(...e){return r.fc.formulas[n].call({that:this,rule:t.rule,api:r.api,fc:r.fc},...e)},e),{});return Z(()=>Hu(zu,`with($form){with($scope){with(this){with($group){with($formulas){ return ${e} }}}}}`).call(this.api.form,i,this.api.top.form,this.api.top===this.api.scope?{}:this.api.scope.form,n&&this.subRuleData[n.id]||{},t.rule,this.api),void 0)},updateChildren(e,t,n){this.deferSyncValue(()=>{n&&n.forEach(n=>{(t||[]).indexOf(n)===-1&&n&&!W.String(n)&&n.__fc__&&n.__fc__.parent===e&&this.rmCtx(n.__fc__)}),W.trueArray(t)&&(this.loadChildren(t,e),this.bus.$emit(`update`,this.api))})},rmSub(e){W.trueArray(e)&&e.forEach(e=>{e&&e.__fc__&&this.rmCtx(e.__fc__)})},rmCtx(e){if(e.deleted)return;let{id:t,field:n,input:r,name:i}=e;Ls(this.ctxs,t),Ls(this.formData,t),Ls(this.subForm,t),Ls(this.vm.setupState.ctxInject,t);let a=e.getParentGroup();a&&this.subRuleData[a.id]&&Ls(this.subRuleData[a.id],n),e.group&&Ls(this.subRuleData,t),r&&this.rmIdCtx(e,n,`field`),i&&this.rmIdCtx(e,i,`name`),r&&!G(this.fieldCtx,n)&&Ls(this.form,n),this.deferSyncValue(()=>{if(!this.reloading){if(e.parser.loadChildren!==!1){let t=e.getPending(`children`,e.rule.children);W.trueArray(t)&&t.forEach(e=>e&&e.__fc__&&this.rmCtx(e.__fc__))}e.root===this.rules&&this.vm.setupState.renderRule()}},r);let o=this.sort.indexOf(t);return o>-1&&this.sort.splice(o,1),this.$render.clearCache(e),e.delete(),this.effect(e,`deleted`),this.targetHook(e,`deleted`),r&&!this.fieldCtx[n]&&this.vm.emit(`remove-field`,n,e.rule,this.api),e.rule.__ctrl||this.vm.emit(`remove-rule`,e.rule,this.api),e}})}function Wu(e){K(e.prototype,{mounted(){let e=()=>{this.isMounted=!0,this.lifecycle(`mounted`)};this.pageEnd?e():this.bus.$once(`page-end`,e)},lifecycle(e){this.fc.targeabFormDriver(e,this.api,this.fc),this.vm.emit(e,this.api),this.emitEvent(e,this.api)},emitEvent(e,...t){let n=this.options[e]||this.options[q(`on-`+e)||`on-`+e];if(n){let e=Zs(n);W.Function(e)&&Z(()=>e(...t))}this.bus.$emit(e,...t)},targetHook(e,t,n){var r;let i=(r=e.prop)==null||(r=r.hook)==null?void 0:r[t],a=(t,r)=>{t&&(Array.isArray(t)?t:[t]).forEach(t=>{Z(()=>t(V(V({args:Object.values(n||{})},n||{}),{},{self:e.rule,rule:e.rule,parent:r==null?void 0:r.rule,$f:this.api,api:this.api,option:this.vm.props.option})))})};a(i);let o=`deep`+Is(t),s=e.parent;for(;s;){var c;a((c=s.prop)==null||(c=c.hook)==null?void 0:c[o],s),s=s.parent}}})}function Gu(e){K(e.prototype,{useProvider(){let e=this.fc.providers;Object.keys(e).forEach(t=>{let n=e[t];W.Function(n)&&(n=n(this.fc)),n._c=qu(n),this.onEffect(n,t),this.providers[t]=n})},onEffect(e,t){let n=[];(e._c||[`*`]).forEach(r=>{let i=r===`*`?`*`:this.getType(r);n.indexOf(i)>-1||(n.push(i),this.bus.$on(`p:${t||e.name}:${i}:${+!!e.input}`,(t,n)=>{e[t]&&e[t](...n)}))}),e._used=n},watchEffect(e){let t={required:()=>{var t;return(G(e.rule,`$required`)?e.rule.$required:(t=e.rule)==null||(t=t.effect)==null?void 0:t.required)||!1}},r=e.rule.effect||{};Object.keys(r).forEach(e=>{t[e]=()=>r[e]}),Object.keys(e.rule).forEach(n=>{n[0]===`$`&&(t[n.substr(1)]=()=>e.rule[n])}),Object.keys(t).forEach(r=>{e.watch.push((0,n.watch)(t[r],t=>{this.effect(e,`watch`,{[r]:t})},{deep:!0}))})},ruleEffect(e,t,n){this.emitEffect({rule:e,input:!!e.field,type:this.getType(e.type)},t,n)},effect(e,t,n){this.emitEffect({rule:e.rule,input:e.input,type:e.trueType,ctx:e,custom:n},t)},getEffect(e,t){if(G(e,`$`+t))return e[`$`+t];if(G(e,`effect`)&&G(e.effect,t))return e.effect[t]},emitEffect({ctx:e,rule:t,input:n,type:r,custom:i},a,o){if(!r||[`fcFragment`,`fragment`].indexOf(r)>-1)return;let s=i||Object.keys(t).reduce((e,n)=>(n[0]===`$`&&(e[n.substr(1)]=t[n]),e),V({},t.effect||{}));Object.keys(s).forEach(i=>{let c=this.providers[i];if(!c||c.input&&!n)return;let l;if(!c._c)l=`*`;else if(c._used&&c._used.indexOf(r)>-1)l=r;else return;let u=V({value:s[i],getValue:()=>this.getEffect(t,i)},o||{});e&&(u.getProp=()=>e.effectData(i),u.clearProp=()=>e.clearEffectData(i),u.mergeProp=e=>Wl(u.getProp(),[e]),u.id=e.id),this.bus.$emit(`p:${i}:${l}:${+!!c.input}`,a,[u,t,this.api])})}})}function Ku(e){return e.filter(function(e,t,n){return n.indexOf(e,0)===t})}function qu(e){let t=e.components;if(Array.isArray(t)){let e=Ku(t.filter(e=>e!==`*`));return e.length?e:!1}return W.String(t)?[t]:!1}function Ju(e){ql(this,{options(){return e.options.value||{}},bus(){return e.bus},preview(){return e.vm.props.preview==null?e.vm.setupState.parent&&e.vm.setupState.parent.props.preview!=null?e.vm.setupState.parent.props.preview:e.options.value.preview||!1:e.vm.props.preview}}),K(this,{fc:e,vm:e.vm,watching:!1,loading:!1,reloading:!1,noWatchFn:null,deferSyncFn:null,isMounted:!1,formData:(0,n.reactive)({}),subRuleData:(0,n.reactive)({}),subForm:{},form:(0,n.reactive)({}),appendData:{},ignoreFields:[],providers:{},cycleLoad:null,loadedId:1,nextTick:null,changeStatus:!1,pageEnd:!0,nextReload:()=>{this.lifecycle(`reload`)}}),this.initData(e.rules),this.$manager=new e.manager(this),this.$render=Reflect.construct(xu,[this]),this.api=e.extendApiFn.reduce((e,t)=>{let n=Z(()=>t(e,this));return n&&n!==e&&K(e,n),e},mu(this))}K(Ju.prototype,{initData(e){K(this,{ctxs:{},fieldCtx:{},nameCtx:{},sort:[],rules:e})},init(){this.updateAppendData(),this.useProvider(),this.usePage(),this.loadRule(),this.$manager.__init(),this.lifecycle(`created`)},updateAppendData(){this.appendData=V(V(V({},Bs(this.options.formData||{})),this.fc.vm.props.modelValue||{}),this.appendData)},isBreakWatch(){return this.loading||this.noWatchFn||this.reloading},globalBeforeFetch(e){return new Promise((t,n)=>{let r=this.options.beforeFetch&&Z(()=>this.options.beforeFetch(e,{api:this.api}));r&&W.Function(r.then)?r.then(t).catch(n):t()})},beforeFetch(e){return new Promise((t,n)=>{let r=e&&e.beforeFetch&&Z(()=>e.beforeFetch(e,{api:this.api}));r&&W.Function(r.then)?r.then(t).catch(n):r===!1?n():t()}).then(()=>this.globalBeforeFetch(e))},beforeSubmit(e){return new Promise((t,n)=>{let r=this.options.beforeSubmit&&Z(()=>this.options.beforeSubmit(e,{api:this.api}));r&&W.Function(r.then)?r.then(t).catch(n):r===!1?n():t()})}}),Su(Ju),wu(Ju),Eu(Ju),ku(Ju),Pu(Ju),Uu(Ju),Wu(Ju),Gu(Ju);var Yu=(0,n.defineComponent)({name:`fcFragment`,inheritAttrs:!1,props:[`vnode`],render(){return this.vnode}});function Xu(e){return Object.keys(e).map(t=>{let r=e[t],i=(0,n.resolveDirective)(t);if(i)return[i,r.value,r.arg,r.modifiers||{}]}).filter(e=>!!e)}function Zu(e,t){let r=e.directives;return r?(Array.isArray(r)||(r=[r]),(0,n.withDirectives)(t,r.reduce((e,t)=>e.concat(Xu(t)),[]))):t}function Qu(){let e={};class t{constructor(t){B(this,`aliasMap`,e),B(this,`vm`,void 0),B(this,`handle`,void 0),this.vm=t.vm,this.handle=t}make(e,t,n){return Zu(t,this.h(e,Xl(t),n))}makeComponent(e,t,r){try{return Zu(t,(0,n.createVNode)(e,Xl(t),r))}catch(e){return console.error(e),(0,n.createVNode)(``)}}h(e,t,r){let i=this.vm||(0,n.getCurrentInstance)();if(!i)throw Error(`Cannot create a node outside a component instance`);let a=i.appContext.config.isNativeTag(e),o=this.handle.fc.prop.components[e];!o&&a&&delete t.abFormInject;try{return(0,n.createVNode)(o||(a?e:(0,n.resolveComponent)(e)),t,r)}catch(e){return console.error(e),(0,n.createVNode)(``)}}static alias(t,n){e[t]=n}static use(n){Object.keys(n).forEach(r=>{let i=Fs(r),a=r.toLocaleLowerCase(),o=n[r];t.alias(r,o),[r,i,a].forEach(n=>{Object.assign(t.prototype,{[n]:function(t,i){return this.make(e[r]||n,t,i)}})})})}}return B(t,`aliasMap`,e),t}function $u(e){class t extends ed{}return Object.assign(t.prototype,e),t}var ed=class{constructor(e){B(this,`$handle`,void 0),B(this,`vm`,void 0),B(this,`$render`,void 0),B(this,`$r`,void 0),B(this,`options`,void 0),B(this,`ref`,void 0),B(this,`mergeOptionsRule`,void 0),B(this,`key`,void 0),this.$handle=e,this.vm=e.vm,this.options={},this.ref=`fcForm`,this.mergeOptionsRule={normal:[`form`,`row`,`info`,`submitBtn`,`resetBtn`]},this.updateKey(),this.init()}__init(){this.$render=this.$handle.$render,this.$r=(...e)=>this.$render.renderRule(...e)}updateKey(){this.key=_c()}init(){}update(){}beforeRender(){}form(){return this.vm.refs[this.ref]}adapterValidate(e,t){return e.validator=(e,n,r)=>t(n,r),e}getSlot(e){let t=n=>n.slots[e]||(n.setupState.parent?t(n.setupState.parent):void 0);return t(this.vm)}mergeOptions(e,t){return ac(e.map(e=>this.tidyOptions(e)),t,this.mergeOptionsRule)}updateOptions(e){this.$handle.fc.targeabFormDriver(`updateOptions`,e,{handle:this.$handle,api:this.$handle.api}),this.options=this.mergeOptions([e],this.getDefaultOptions()),this.update()}tidyOptions(e){return e}tidyRule(e){}mergeProp(e){}getDefaultOptions(){return{}}fieldChange(e,t,n,r){}render(e){}};function td(e,t){return Reflect.get(e,t)}function nd(e,t,n){Reflect.set(e,t,n)}function rd(e,t){Reflect.deleteProperty(e,t)}var id=function(e){return{name:`loadData`,_fn:[],loaded(t,r,i){this.deleted(t),(0,n.nextTick)(()=>{let n=pc(t.getValue()),a=[];n.forEach(n=>{if(n&&(n.attr||n.template||n.handler)){let o=a=>{var o;let s=r==null||(o=r.__fc__)==null?void 0:o.getParentGroup(),c;c=n.template?e.$handle.loadStrVar(n.template,a,s?{rule:r,value:e.$handle.subRuleData[s.id]||{}}:null):n.handler&&W.Function(n.handler)?n.handler(a,r,i):e.$handle.loadStrVar(`{{${n.attr}}}`,a,s?{rule:r,value:e.$handle.subRuleData[s.id]||{}}:null),(c==null||c===``)&&n.default!=null&&(c=n.default),n.copy!==!1&&(c=Bs(c));let l=n.modify?r:t.getProp();n.to===`child`?l.children?l.children[0]=c:l.children=[c]:cc(l,n.to||`options`,c),i.sync(r)},s=e.watchLoadData(e=>o(e));o=sc(o,n.wait||300),n.watch===!1?s():a.push(s)}}),nd(this._fn,t.id,a)})},watch(e,t,n){this.loaded(e,t,n)},deleted(e){var t;(t=td(this._fn,e.id))==null||t.forEach(e=>{e()}),rd(this._fn,e.id),e.clearProp()}}},ad=function(e){return{name:`t`,_fn:[],loaded(t,n,r){this.deleted(t);let i=t.getValue()||{},a=[];Object.keys(i).forEach(o=>{let s=i[o];if(s){let i=typeof s==`object`,c=a=>{let c=i?s:null,l=e.t(i?c==null?void 0:c.attr:s,i&&(c==null?void 0:c.params)||null,a),u=i&&c!=null&&c.modify?n:t.getProp();o===`child`?u.children?u.children[0]=l:u.children=[l]:cc(u,o,l),r.sync(n)},l=e.watchLoadData(e=>c(e));c=sc(c,(typeof s==`object`?s.wait:0)||300),typeof s!=`object`||s.watch!==!1?a.push(l):l()}}),nd(this._fn,t.id,a)},watch(e,t,n){this.loaded(e,t,n)},deleted(e){var t;(t=td(this._fn,e.id))==null||t.forEach(e=>{e()}),rd(this._fn,e.id),e.clearProp()}}},od={name:`componentValidate`,load(e,t,n){let r=e.getValue();if(!r||typeof r==`object`&&`method`in r&&r.method===!1)e.clearProp(),n.clearValidateState([t.field]);else{let i=W.Object(r)&&r!==null?r:{method:r},a=i.method,o=V(V({},i),{},{validator(...r){let i=Jl(t);if(i&&typeof i==`object`&&`id`in i)return n.exec(i.id,typeof a==`string`?a:`abFormValidate`,...r,{attr:e,rule:t,api:n})}});delete o.method,e.getProp().validate=[o]}},watch(e,t,n){od.load(e,t,n)}},sd={fetch:function(e){function t(e){return typeof e==`string`?{action:e,to:`options`}:e}function n(n,i,a){let o=n.value;r.deleted(n);let s=t(typeof o==`function`?o(i,a):o),c=t=>{t===void 0?n.clearProp():cc(n.getProp(),(s==null?void 0:s.to)||`options`,t),t!=null&&s!=null&&s.key&&e.$handle.options.globalData[s.key]&&e.fetchCache.set(e.$handle.options.globalData[s.key],{status:!0,data:t}),a.sync(i)};if(!s||!s.action&&!s.key){c(void 0);return}s=Bs(s),s.to||(s.to=`options`);let l=s.onError,u=()=>!n.getValue()&&(n.clearProp(),a.sync(i),!0);nd(r._fn,n.id,e.watchLoadData(sc((t,o)=>{var d;if(o&&(s==null?void 0:s.watch)===!1)return(d=td(r._fn,n.id))==null?void 0:d();if(s!=null&&s.key){e.targetRule=i;let n=t(`$globalData.${s.key}`);if(delete e.targetRule,n){if(u())return;c(n)}return}let f=e.$handle.loadFetchVar(Bs(s),t,i),p=V(V({headers:{}},f),{},{onSuccess(e,t){if(u())return;let n=e=>t?e:G(e,`data`)?Q(e,`data`):e,r=Zs(f.parse);typeof r==`function`?n=e=>r(e,i,a):typeof r==`string`&&(n=e=>Q(e,r)),fc(n(e)).then(e=>{c(e)})},onError(e){if(c(void 0),!u()){if(typeof l==`function`)l(e,i,a);else{let t=e&&typeof e==`object`&&`message`in e?e.message:void 0;Hs(t?String(t):`fetch fail ${f.action||``}`)}}}});e.$handle.beforeFetch(p,{rule:i,api:a}).then(()=>{typeof f.action==`function`?fc(f.action(i,a)).then(e=>{p.onSuccess(e,!0)}).catch(e=>{p.onError(e)}):Z(()=>e.create.fetch(p,{inject:n,rule:i,api:a}))}).catch(()=>{})},(s==null?void 0:s.wait)||600)))}let r={name:`fetch`,_fn:[],loaded(e,t,r){n(e,t,r)},watch(e,t,r){n(e,t,r)},deleted(e){var t;(t=td(this._fn,e.id))==null||t(),rd(this._fn,e.id),e.clearProp()}};return r},loadData:id,t:ad,componentValidate:od},cd={name:`html`,loadChildren:!1,render(e,t){return t.prop.props.innerHTML=e.default(),t.vNode.make(t.prop.props.tag||`div`,t.prop)},renderChildren(e){return{default:()=>e.filter(e=>W.String(e)).join(``)}}};function ld(e){e+=`=`;let t=decodeURIComponent(document.cookie).split(`;`);for(let n=0;n<t.length;n++){let r=t[n];for(;r.charAt(0)===` `;)r=r.substring(1);if(r.indexOf(e)===0){r=r.substring(e.length,r.length);try{return JSON.parse(r)}catch(e){return r}}}return null}function ud(e){let t=localStorage.getItem(e);if(t)try{return JSON.parse(t)}catch(e){return t}return null}function dd(e){let t=sessionStorage.getItem(e);if(t)try{return JSON.parse(t)}catch(e){return t}return null}function fd(e,t){if(!t)return null;let n=t.split(`.`),r=n.shift();if(!r)return null;let i=e(r);return n.length?i==null?null:Q(i,n):i}function pd(e){return fd(ld,e)}function md(e){return fd(ud,e)}function hd(e){return fd(dd,e)}var gd=typeof global==`object`&&global&&global.Object===Object&&global,_d=typeof self==`object`&&self&&self.Object===Object&&self,vd=gd||_d||Function(`return this`)(),yd=vd.Symbol,bd=Object.prototype,xd=bd.hasOwnProperty,Sd=bd.toString,Cd=yd?yd.toStringTag:void 0;function wd(e){var t=xd.call(e,Cd),n=e[Cd];try{e[Cd]=void 0;var r=!0}catch(e){}var i=Sd.call(e);return r&&(t?e[Cd]=n:delete e[Cd]),i}var Td=Object.prototype.toString;function Ed(e){return Td.call(e)}var Dd=`[object Null]`,Od=`[object Undefined]`,kd=yd?yd.toStringTag:void 0;function Ad(e){return e==null?e===void 0?Od:Dd:kd&&kd in Object(e)?wd(e):Ed(e)}function jd(e){return typeof e==`object`&&!!e}var Md=`[object Symbol]`;function Nd(e){return typeof e==`symbol`||jd(e)&&Ad(e)==Md}function Pd(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}var Fd=Array.isArray,Id=1/0,Ld=yd?yd.prototype:void 0,Rd=Ld?Ld.toString:void 0;function zd(e){if(typeof e==`string`)return e;if(Fd(e))return Pd(e,zd)+``;if(Nd(e))return Rd?Rd.call(e):``;var t=e+``;return t==`0`&&1/e==-Id?`-0`:t}function Bd(e){var t=typeof e;return e!=null&&(t==`object`||t==`function`)}var Vd=`[object AsyncFunction]`,Hd=`[object Function]`,Ud=`[object GeneratorFunction]`,Wd=`[object Proxy]`;function Gd(e){if(!Bd(e))return!1;var t=Ad(e);return t==Hd||t==Ud||t==Vd||t==Wd}var Kd=vd[`__core-js_shared__`],qd=function(){var e=/[^.]+$/.exec(Kd&&Kd.keys&&Kd.keys.IE_PROTO||``);return e?`Symbol(src)_1.`+e:``}();function Jd(e){return!!qd&&qd in e}var Yd=Function.prototype.toString;function Xd(e){if(e!=null){try{return Yd.call(e)}catch(e){}try{return e+``}catch(e){}}return``}var Zd=/[\\^$.*+?()[\]{}|]/g,Qd=/^\[object .+?Constructor\]$/,$d=Function.prototype,ef=Object.prototype,tf=$d.toString,nf=ef.hasOwnProperty,rf=RegExp(`^`+tf.call(nf).replace(Zd,`\\$&`).replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,`$1.*?`)+`$`);function af(e){return!Bd(e)||Jd(e)?!1:(Gd(e)?rf:Qd).test(Xd(e))}function of(e,t){return e==null?void 0:e[t]}function sf(e,t){var n=of(e,t);return af(n)?n:void 0}function cf(e,t){return e===t||e!==e&&t!==t}var lf=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,uf=/^\w*$/;function df(e,t){if(Fd(e))return!1;var n=typeof e;return n==`number`||n==`symbol`||n==`boolean`||e==null||Nd(e)?!0:uf.test(e)||!lf.test(e)||t!=null&&e in Object(t)}var ff=sf(Object,`create`);function pf(){this.__data__=ff?ff(null):{},this.size=0}function mf(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=+!!t,t}var hf=`__lodash_hash_undefined__`,gf=Object.prototype.hasOwnProperty;function _f(e){var t=this.__data__;if(ff){var n=t[e];return n===hf?void 0:n}return gf.call(t,e)?t[e]:void 0}var vf=Object.prototype.hasOwnProperty;function yf(e){var t=this.__data__;return ff?t[e]!==void 0:vf.call(t,e)}var bf=`__lodash_hash_undefined__`;function xf(e,t){var n=this.__data__;return this.size+=+!this.has(e),n[e]=ff&&t===void 0?bf:t,this}function Sf(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Sf.prototype.clear=pf,Sf.prototype.delete=mf,Sf.prototype.get=_f,Sf.prototype.has=yf,Sf.prototype.set=xf;function Cf(){this.__data__=[],this.size=0}function wf(e,t){for(var n=e.length;n--;)if(cf(e[n][0],t))return n;return-1}var Tf=Array.prototype.splice;function Ef(e){var t=this.__data__,n=wf(t,e);return n<0?!1:(n==t.length-1?t.pop():Tf.call(t,n,1),--this.size,!0)}function Df(e){var t=this.__data__,n=wf(t,e);return n<0?void 0:t[n][1]}function Of(e){return wf(this.__data__,e)>-1}function kf(e,t){var n=this.__data__,r=wf(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function Af(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Af.prototype.clear=Cf,Af.prototype.delete=Ef,Af.prototype.get=Df,Af.prototype.has=Of,Af.prototype.set=kf;var jf=sf(vd,`Map`);function Mf(){this.size=0,this.__data__={hash:new Sf,map:new(jf||Af),string:new Sf}}function Nf(e){var t=typeof e;return t==`string`||t==`number`||t==`symbol`||t==`boolean`?e!==`__proto__`:e===null}function Pf(e,t){var n=e.__data__;return Nf(t)?n[typeof t==`string`?`string`:`hash`]:n.map}function Ff(e){var t=Pf(this,e).delete(e);return this.size-=+!!t,t}function If(e){return Pf(this,e).get(e)}function Lf(e){return Pf(this,e).has(e)}function Rf(e,t){var n=Pf(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function zf(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}zf.prototype.clear=Mf,zf.prototype.delete=Ff,zf.prototype.get=If,zf.prototype.has=Lf,zf.prototype.set=Rf;var Bf=`Expected a function`;function Vf(e,t){if(typeof e!=`function`||t!=null&&typeof t!=`function`)throw TypeError(Bf);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],a=n.cache;if(a.has(i))return a.get(i);var o=e.apply(this,r);return n.cache=a.set(i,o)||a,o};return n.cache=new(Vf.Cache||zf),n}Vf.Cache=zf;var Hf=500;function Uf(e){var t=Vf(e,function(e){return n.size===Hf&&n.clear(),e}),n=t.cache;return t}var Wf=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Gf=/\\(\\)?/g,Kf=Uf(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(``),e.replace(Wf,function(e,n,r,i){t.push(r?i.replace(Gf,`$1`):n||e)}),t});function qf(e){return e==null?``:zd(e)}function Jf(e,t){return Fd(e)?e:df(e,t)?[e]:Kf(qf(e))}var Yf=1/0;function Xf(e){if(typeof e==`string`||Nd(e))return e;var t=e+``;return t==`0`&&1/e==-Yf?`-0`:t}function Zf(e,t){t=Jf(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[Xf(t[n++])];return n&&n==r?e:void 0}function Qf(e,t,n){var r=e==null?void 0:Zf(e,t);return r===void 0?n:r}var $f={required:`{title} is required`,validate:{url:`{title} is not a valid url`,email:`{title} is not a valid email`,ip:`{title} {title} is not a valid ip`,phone:`{title} {title} is not a valid phone`,pattern:`{title} does not match pattern {pattern}`,uppercase:`{title} must be all uppercase`,lowercase:`{title} must be all lowercased`,positive:`{title} is not a positive number`,negative:`{title} is not a negative number`,equal:`{title} is not equal to {equal}`,min:`{title} cannot be less than {min}`,max:`{title} cannot be greater than {max}`,enum:`{title} must be one of {enum}`,hasKeys:`{title} does not contain required fields {hasKeys}`,minLen:`{title} must be at least {minLen}`,maxLen:`{title} cannot be longer than {maxLen}`,len:`{title} must be exactly {len}`,integer:`{title} is not an integer`,number:`{title} is not an number`}},ep={required:`{title}不能为空`,validate:{url:`{title}不是有效的 url 地址`,email:`{title}不是有效的邮箱地址`,ip:`{title}不是有效的 IP 地址`,phone:`{title}不是正确的手机号`,pattern:`{title}必须匹配 {pattern}`,uppercase:`{title}必须全大写`,lowercase:`{title}必须全小写`,positive:`{title}不是正数`,negative:`{title}不是负数`,equal:`{title}必须等于 {equal}`,min:`{title}必须大于等于 {min}`,max:`{title}必须小于等于 {max}`,enum:`{title}必须是 {enum} 之一`,hasKeys:`{title}必须包含 {hasKeys} 字段`,minLen:`{title}长度必须大于 {minLen}`,maxLen:`{title}长度必须小于 {maxLen}`,len:`{title}长度必须为 {len}`,integer:`{title}必须为整数`,number:`{title}必须为数字`}},tp=((Al=window.localStorage)==null?void 0:Al.getItem(`lang`))||`zh-cn`,np=(jl=(e=>({t:e=>Qf(tp===`zh-cn`?ep:$f,e,e)}))())==null?void 0:jl.t;function rp(...e){let t=e.length===1?e[0]:e[1],n=e.length===1?t==null?void 0:t.name:e[0];return{id:typeof n==`string`?n:void 0,prop:t}}function ip(e={}){let t=e.key||[],n=e.array||[],r=e.normal||[];Il.push(...t),Ll.push(...n),Rl.push(...r),au([...t,...n,...r])}var ap=1,op={},sp=Symbol(`defValue`);function cp(e){let t={[Yu.name||`fcFragment`]:Yu},r={},i={},a={},o={},s=[],c=[],l=e.extendApi?[e.extendApi]:[],u=V({},sd),d=cu(),f={global:{}},p=e.isMobile===!0,m=(0,n.reactive)({$mobile:p}),h=Qu(),g={},_={};ip(e.attrs||{});function v(e){let t=op[e];if(Array.isArray(t))return t.map(e=>e.api());if(t)return t.api()}function y(e){s.push(e)}function b(...e){let t=rp(...e);t.id&&t.prop&&(i[t.id]=t.prop)}function x(...e){let t=rp(...e);t.id&&t.prop&&(u[t.id]=W.Function(t.prop)?t.prop:V(V({},t.prop),{},{name:t.id}))}function S(e){h.use(e)}function C(...e){let t=e[0];if(arguments.length===0)return gu;if(typeof t==`string`&&arguments.length===1)return r[q(t)||t];let n=rp(...e);if(!n.id||!n.prop)return gu;let i=q(n.id),a=n.prop,o=a.merge===!0?r[i]:void 0;r[i]=Zl(a,o||gu),d[i]=$(i),a.maker&&K(d,a.maker)}function w(e,n){let i,a=n;if(typeof e==`string`){if(i=e,a===void 0)return t[i]}else{let t=e;i=t.displayName||t.name,a=e}if(!i||!a)return;let o=q(i),s=Fs(i);t[i]=a,t[o]=a,t[s]=a,delete h.aliasMap[i],delete h.aliasMap[o],delete h.aliasMap[s],delete r[i],delete r[o],delete r[s];let c=a.abFormParser;c&&C(i,c)}function T(){return Fl(se,t,i)}function E(e,t){let r=T();return(0,n.createApp)({data(){return(0,n.reactive)({rule:e,option:t})},render(){return(0,n.h)(r,V({ref:`fc`},this.$data))}})}function D(){return Yu}function ee(e,t){let n=Reflect.get(e,`install`);return W.Function(n)?n(O,t):typeof e==`function`&&e(O,t),this}let O=function(e,t){let n=E(e,t||{});s.forEach(e=>{Z(()=>e(O,n))});let r=document.createElement(`div`);return((t==null?void 0:t.el)||document.body).appendChild(r),n.mount(r).$refs.fc.fapi};Zl(O,_);function te(n){let o=V({},e);return n?o.inherit={components:t,parsers:r,directives:i,modelFields:a,providers:u,useApps:s,maker:d,formulas:g,loadData:m}:delete o.inherit,cp(o)}function k(e,t){a[e]=t}function A(e,t){g[e]=t}function ne(e,t){let n=o[e]||{},r=n.parsers||{};t.parsers&&Object.keys(t.parsers).forEach(e=>{r[e]=Zl(t.parsers[e],gu)}),t.name=e,o[e]=V(V(V({},n),t),{},{parsers:r})}function j(e){e&&Object.keys(op).forEach(t=>{(Array.isArray(op[t])?op[t]:[op[t]]).forEach(t=>{t.bus.$emit(`$loadData.`+e)})})}function M(e,t){cc(m,e,t),j(e)}function N(e,t){let n=(...e)=>Z(()=>t(...e));n._driver=!0,M(e,n)}function re(e,t){let n=(e||``).split(`.`);e=n.shift()||``;let r=n.join(`.`);if(G(m,e)||(m[e]=sp),m[e]!==sp){let i=m[e];return i&&i._driver?i=i(r):n.length&&(i=Q(i,n)),i==null||i===``?t:i}return t}function ie(e){l.push(e)}function ae(e){delete m[e],j(e)}function oe(e,t){c.push({name:e,callback:t})}function se(s){K(this,{id:ap++,create:O,vm:s,manager:$u(e.manager||{}),parsers:r,providers:u,modelFields:a,formulas:g,isMobile:p,rules:s.props.rule,name:s.props.name||_c(),inFor:s.props.inFor,prop:{components:t,directives:i},get:null,drivers:o,renderDriver:null,refreshData:j,loadData:m,CreateNode:h,bus:uc(),unwatch:new Set,options:(0,n.ref)({}),extendApiFn:l,fetchCache:new WeakMap,tmpData:(0,n.reactive)({})}),this.unwatch.push=this.unwatch.add.bind(this.unwatch),c.forEach(e=>{this.bus.$on(e.name,e.callback)}),(0,n.nextTick)(()=>{(0,n.watch)(this.options,()=>{this.$handle.$manager.updateOptions(this.options.value),this.api().refresh()},{deep:!0})}),K(s.appContext.components,t),K(s.appContext.directives,i),this.$handle=Reflect.construct(Ju,[this]),this.name&&(this.inFor?(op[this.name]||(op[this.name]=[]),op[this.name].push(this)):op[this.name]=this)}se.isMobile=p,K(se.prototype,{init(){this.isSub()&&this.unwatch.add((0,n.watch)(()=>this.vm.setupState.parent.setupState.fc.options.value,()=>{this.initOptions(),this.$handle.api.refresh()},{deep:!0,flush:`sync`})),this.vm.props.driver&&(this.renderDriver=typeof this.vm.props.driver==`object`?this.vm.props.driver:this.drivers[String(this.vm.props.driver)]),!this.renderDriver&&this.vm.setupState.parent&&(this.renderDriver=this.vm.setupState.parent.setupState.fc.renderDriver),this.renderDriver||(this.renderDriver=this.drivers.default),this.initOptions(),this.$handle.init()},targeabFormDriver(e,...t){this.bus.$emit(e,...t);let n=this.renderDriver;if(n&&n[e])return Z(()=>n[e](...t))},t(e,t,n){let r=n?n(`$t.`+e):this.globalLanguageDriver(e);return r!=null||(r=``),r&&t&&Object.keys(t).forEach(e=>{let n=RegExp(`{${e}}`,`g`);r=r.replace(n,t[e])}),r},globalDataDriver(e){var t;let n=e.split(`.`),r=n.shift()||``,i=(t=this.options.value)==null?void 0:t.globalData,a=i==null?void 0:i[r];if(a){if(a.type===`static`)return Q(a.data,n);{let e,t=this.fetchCache.get(a);if(t){if(t.status&&(e=Q(t.data,n)),!t.loading)return e;t.loading=!1,this.fetchCache.set(a,t)}else this.fetchCache.set(a,{status:!1});let o=sc(()=>{c();let e=this.fetchCache.get(a);i&&Object.values(i).indexOf(a)!==-1?(e&&(e.loading=!0,this.fetchCache.set(a,e)),this.bus.$emit(`$loadData.$globalData.`+r)):this.fetchCache.delete(a)},a.wait||600),s=e=>{this.fetchCache.set(a,{status:!0,data:e}),this.bus.$emit(`$loadData.$globalData.`+r)},c=this.watchLoadData((e,t)=>{if(t&&a.watch===!1)return c();if(t){o();return}let n=this.$handle.loadFetchVar(lc(a),e);n.targetRule=this.targetRule,this.$handle.api.fetch(n).then(e=>{s(e)}).catch(()=>{s(null)})});return a.watch===!1&&c(),e}}},getLocale(){let e=this.vm.setupState.top.props.locale;return e&&typeof e==`object`?e.name:typeof e==`string`?e:`zh-cn`},globalLanguageDriver(e){var t;let n=this.vm.setupState.top.props.t,r=this.vm.setupState.top.props.locale,i;return n&&(i=Z(()=>n(e))),i==null&&r&&typeof r==`object`&&(i=Q(r,e)),i!=null||(i=Q((((t=this.options.value)==null?void 0:t.language)||{})[this.getLocale()]||{},e),i!=null||(i=np(e))),i},globalVarDriver(e){var t;let n=e.split(`.`),r=n.shift()||``,i=(t=this.options.value)==null||(t=t.globalVariable)==null?void 0:t[r];if(i){let e=W.Function(i)?i:Zs(i.handle);if(e)return Q(e((...e)=>this.$handle.api.getData(...e),this.$handle.api),n)}},setData(e,t,n){n?M(e,t):(cc(this.vm.setupState.top.setupState.fc.tmpData,e,t),this.bus.$emit(`$loadData.`+e))},getLoadData(e,t){let n=null;if(e!=null){let t=e.split(`.`),r=t.shift();if(n=Q(this.vm.setupState.top.setupState.fc.tmpData,e),n!=null)return n;if(r===`$topForm`)n=this.$handle.api.top.formData(!0);else if(r===`$scopeForm`)n=this.$handle.api.scope.formData(!0);else if(r===`$form`)n=this.$handle.api.formData(!0);else if(r===`$options`)n=this.options.value;else if(r===`$globalData`)n=this.globalDataDriver(t.join(`.`)),t=[];else if(r===`$var`)n=this.globalVarDriver(t.join(`.`)),t=[];else if(r===`$locale`)n=this.getLocale(),t=[];else if(r===`$t`)n=this.globalLanguageDriver(t.join(`.`)),t=[];else if(r===`$preview`)return this.$handle.preview;else n=re(e),t=[];n&&t.length&&(n=Q(n,t))}return n==null||n===``?t:n},watchLoadData(e,t){let r={},i=t=>{this.get||(this.get=a),Z(()=>{e(a,t)}),this.get===a&&(this.get=void 0)},a=(e,a)=>{let o;if(typeof e==`object`&&(o=e.getValue,e=e.id),r[e])return r[e].val;let s=(0,n.computed)(()=>o?o():this.getLoadData(e,a)),c=e.split(`.`),l=c.shift(),u=c.shift()||``,d=sc(()=>{let t=o?o():this.getLoadData(e,a);if(r[e])((t instanceof Function||W.Object(t)||Array.isArray(t))&&t===r[e].val||JSON.stringify(t)!==JSON.stringify(r[e].val))&&(r[e].val=t,i(!0));else return},t||0),f=(0,n.watch)(s,e=>{d()});return this.bus.$on(`$loadData.`+l,d),u&&this.bus.$on(`$loadData.`+l+`.`+u,d),r[e]={fn:()=>{this.bus.$off(`$loadData.`+l,d),u&&this.bus.$off(`$loadData.`+l+`.`+u,d),f()},val:s.value},s.value};i(!1);let o=()=>{Object.keys(r).forEach(e=>r[e].fn()),r={},this.unwatch.delete(o)};return this.unwatch.add(o),o},isSub(){return this.vm.setupState.parent&&this.vm.props.extendOption},initOptions(){this.options.value={};let e=V({formData:{},submitBtn:{},resetBtn:{},globalEvent:{},globalData:{}},Bs(f)),t=this.isSub();t&&(e=this.mergeOptions(e,this.vm.setupState.parent.setupState.fc.options.value||{},!0)),e=this.mergeOptions(e,this.vm.props.option);let n=this.api();this.targeabFormDriver(`initOptions`,e,{api:n,isSubForm:t}),this.updateOptions(e)},mergeOptions(e,t,n){return t=V({},t||{}),n&&[`page`,`onSubmit`,`onReset`,`onCreated`,`onChange`,`onMounted`,`mounted`,`beforeUnmount`,`beforeSubmit`,`onBeforeUnmount`,`onReload`,`reload`,`formData`,`el`,`globalClass`,`style`].forEach(e=>{delete t[e]}),t.global&&(e.global=Kl(e.global,t.global),delete t.global),this.$handle.$manager.mergeOptions([t],e),e},updateOptions(e){this.options.value=this.mergeOptions(this.options.value,e),this.$handle.$manager.updateOptions(this.options.value),this.bus.$emit(`$loadData.$options`)},api(){return this.$handle.api},render(){return this.$handle.render()},mounted(){this.$handle.mounted()},unmount(){if(Z(()=>this.$handle.lifecycle(`beforeUnmount`)),this.name){if(this.inFor){let e=op[this.name].indexOf(this);op[this.name].splice(e,1)}else delete op[this.name]}c.forEach(e=>{this.bus.$off(e.name,e.callback)}),this.tmpData={},[...this.unwatch].forEach(e=>e()),this.unwatch.clear(),this.$handle.reloadRule([])},updated(){this.$handle.bindNextTick(()=>this.bus.$emit(`next-tick`,this.$handle.api))}});function ce(t){K(t,{version:e.version,ui:e.ui,isMobile:p,extendApi:ie,getData:re,setDataDriver:N,setData:M,removeData:ae,refreshData:j,maker:d,component:w,directive:b,setModelField:k,seabFormula:A,setDriver:ne,register:x,$vnode:D,parser:C,use:ee,factory:te,componentAlias:S,copyRule:Vl,copyRules:Hl,mergeRule:Wl,fetch:du,$form:T,parseFn:Zs,parseJson:Qs,toJson:Xs,useApp:y,getApi:v,on:oe})}function le(t){K(t,{create:O,install(n,r){f=V(V({},f),r||{});let i=`_installedAbForm${p?`Mobile`:``}_${e.ui}`,a=n;if(a[i]===!0)return;a[i]=!0;let o=function(e,t={}){return O(e,t,this)};ce(o),n.config.globalProperties.$abForm=o;let c=T();n.component(c.name,c),s.forEach(e=>{Z(()=>e(t,n))})}})}if(ce(_),le(_),N(`$cookie`,pd),N(`$localStorage`,md),N(`$sessionStorage`,hd),h.use({fragment:`fcFragment`}),e.install&&O.use(e),y((e,t)=>{t.mixin({props:[`abFormInject`],emits:[`fc.updateValue`,`fc.el`]})}),C(cd),e.inherit){let n=e.inherit;n.components&&K(t,n.components),n.parsers&&K(r,n.parsers),n.directives&&K(i,n.directives),n.modelFields&&K(a,n.modelFields),n.providers&&K(u,n.providers),n.useApps&&K(s,n.useApps),n.maker&&K(d,n.maker),n.loadData&&K(m,n.loadData),n.formulas&&K(g,n.formulas)}let ue=T();return Zl(ue,_),Object.defineProperties(ue,{fetch:{get(){return _.fetch},set(e){_.fetch=e}}}),ue.util=_,ue}function lp(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}function up(e,t){if(e==null)return{};var n,r,i=lp(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var dp=[`children`],{t:fp}=z(),{isZhCN:pp}=R(),mp={hidden:{hidden:!0},datePicker:{props:{valueFormat:`x`}},timePicker:{props:{format:`HH:mm`,valueFormat:`HH:mm`}},select:{props:{showKey:!0,showCode:!0}},treeSelect:{props:{defaultExpandAll:!0,expandOnClickNode:!1}},treeSelectMultiple:{props:{multiple:!0,type:`checked`,showCheckbox:!0}},inputNumber:{align:`right`},inputCurrency:{align:`right`,children:[{type:`span`,slot:`prefix`,children:[pp()?`¥`:`$`]}]},inputPercent:{align:`right`,children:[{type:`span`,slot:`suffix`,children:[`%`]}]},switch:{align:`center`},colorPicker:{props:{showAlpha:!0,predefine:[`rgba(1, 1, 1, 0)`,`#45b787`,`#21532fff`,`#6e9bc5`,`#2775b6`,`#F26666`,`#D95970`,`#ECD2B9`,`#BF9D8A`,`#ECDEC0`,`#D0AC57`,`#e0e0e0`,`#beb6b6`,`#918883`,`#F2F2F2`,`#ececec`,`#2E3032`,`#182327`,`rgba(0, 0, 0, 0.5)`]}},divider:{props:{contentPosition:`left`}}};function hp(e,t={}){let{type:n,disabledDate:r,shortcuts:i}=e||{},a=mp[n||``];if(n===`datePicker`){if(r===!0&&(a=is({},a,{props:{disabledDate:_p}})),i===!0){let t=fr(e,`props.type`)===`daterange`;a=is({},a,{props:{shortcuts:t?yp:vp}})}}else n===`treeSelect`&&fr(e,`props.multiple`)&&(a=is({},a,mp.treeSelectMultiple));if(!a)return e;let o=t.includeChildren!==!1,{children:s}=a,c=up(a,dp),l=is({},o?a:c,e);return o&&s?V(V({},l),{},{children:gp(s,e.children)}):l}function gp(e,t){if(t===void 0)return e;if(!Array.isArray(t))return t;let n=new Set(t.map(e=>e==null?void 0:e.slot).filter(Boolean));return[...e.filter(e=>!e.slot||!n.has(e.slot)),...t]}function _p(e){return e.getTime()>Date.now()}var vp=[{text:fp(`today`),value:()=>(0,J.default)().startOf(`day`).valueOf()},{text:fp(`yesterday`),value:()=>(0,J.default)().subtract(1,`days`).startOf(`day`).valueOf()},{text:fp(`lastWeek`),value:()=>(0,J.default)().subtract(1,`weeks`).startOf(`week`).valueOf()}],yp=[{text:fp(`today`),value:()=>[(0,J.default)().startOf(`day`).valueOf(),(0,J.default)().endOf(`day`).valueOf()]},{text:fp(`yesterday`),value:()=>[(0,J.default)().subtract(1,`days`).startOf(`day`).valueOf(),(0,J.default)().subtract(1,`days`).endOf(`day`).valueOf()]},{text:fp(`lastWeek`),value:()=>[(0,J.default)().subtract(1,`weeks`).startOf(`week`).valueOf(),(0,J.default)().subtract(1,`weeks`).endOf(`week`).valueOf()]},{text:fp(`last7`),value:()=>[(0,J.default)().subtract(7,`days`).startOf(`day`).valueOf(),(0,J.default)().endOf(`day`).valueOf()]},{text:fp(`last30`),value:()=>[(0,J.default)().subtract(30,`days`).startOf(`day`).valueOf(),(0,J.default)().endOf(`day`).valueOf()]},{text:fp(`thisMonth`),value:()=>[(0,J.default)().startOf(`month`).valueOf(),(0,J.default)().endOf(`day`).valueOf()]},{text:fp(`thisYear`),value:()=>[(0,J.default)().startOf(`year`).valueOf(),(0,J.default)().endOf(`day`).valueOf()]}];function bp(e,t=[]){let n=[],r=new Map;for(let a of e){var i;let e=typeof a.group==`string`?a.group?[a.group]:[]:(i=a.group)==null?[]:i;if(!Array.isArray(e)||e.some(e=>typeof e!=`string`||!e.trim()))throw TypeError(`Table column group must be a non-empty name or an array of non-empty names.`);if(!e.length){n.push(a);continue}let o=n,s=[],c;for(let n of e){s.push(n);let e=JSON.stringify(s),i=r.get(e);i||(i={field:`__ab_table_group__${encodeURIComponent(JSON.stringify([t,s]))}`,title:n,children:[]},r.set(e,i),o.push(i)),c=i,o=i.children}c&&a.groupAlign!==void 0&&(c.groupAlign=a.groupAlign),o.push(a)}return n}function xp(e,t){let n=e.sortData;if(!n)return e;let r=new Map,i=new Set;function a(e,t){for(let o of e){var n;let e=o.getKey();e&&(r.set(e,t),o.defaultVisible===!1&&i.add(e),(n=o.children)!=null&&n.length&&a(o.children,e))}}a(t,null);let o=new Set;function s(e,t){return e.some(e=>{if(!e||typeof e.k!=`string`||e.c!==void 0&&!Array.isArray(e.c))return!0;let{k:n,c:i}=e;return o.has(n)||r.has(n)&&r.get(n)!==t?!0:(o.add(n),i?s(i,n):!1)})}if(!(Array.isArray(n)?s(n,null):typeof n!=`object`||Object.keys(n).some(e=>r.has(e)&&r.get(e)!==null)))return e;let c=e.visibleData&&V({},e.visibleData);if(c)for(let e of i)c[e]===!0&&delete c[e];return V(V({},e),{},{sortData:void 0,visibleData:c})}function Sp(e){let t=(0,n.reactive)(new Map),r=new WeakMap,i=new Set;function a(e){return typeof e.getRule==`function`?e.getRule():e}function o(e){let i=r.get(e);if(!i){let t={};i={rule:e,pending:t,getPending(e,n){return t[e]&&t[e].value||n},setPending(e,r,i){t[e]={origin:r,value:(0,n.reactive)(i)}}},r.set(e,i)}let a=vu(i,e.options,{onLoad:n=>t.set(e,n),onUpdate:n=>t.set(e,n),onReload:()=>{t.set(e,[]),o(e)}});t.set(e,a)}function s(e,n){for(let r of e){let e=a(r);n.has(e)||(n.add(e),typeof e.options==`function`?o(e):t.delete(e),Array.isArray(e.children)&&s(e.children,n))}}(0,n.watchEffect)(()=>{let n=new Set;s(e(),n);for(let e of i)n.has(e)||(i.delete(e),t.delete(e));n.forEach(e=>i.add(e))});function c(e,n,r){let i=a(e),o=t.get(i),s=[...n,i.field?`field:${i.field}`:`index:${r}`],l=Array.isArray(i.children)?bp(i.children.map((e,t)=>c(e,s,t)),s):i.children,u=Array.isArray(l)&&l.some((e,t)=>e!==i.children[t]),d=i;return(typeof i.options==`function`||u)&&(d=V(V(V({},i),typeof i.options==`function`?{options:o}:{}),{},{children:l})),hp(d,{includeChildren:!1})}return(0,n.computed)(()=>bp(e().map((e,t)=>c(e,[],t))))}function Cp(e,t){for(let n of e){if(n.field===t)return n;if(n.children){let e=Cp(n.children,t);if(e)return e}}}function wp(e,t,n,r){var i;if(!n)return e;let a=(i=n.footerFormatter)==null?ol(n).formatter:i;return a?a({cellValue:e,row:t,column:r==null?n:r}):e}function Tp(e,t,n,r,i){var a;if(typeof e.labelField!=`string`||!e.labelField.trim()||!Array.isArray(e.fields))throw TypeError(`AbTable footerSummary requires a labelField and a fields array.`);let o=new Set([e.labelField]),s=[],c=[],l=e=>{if(!e.trim()||o.has(e)||[`__proto__`,`constructor`,`prototype`].includes(e))throw TypeError(`AbTable footerSummary has an invalid or duplicate field: "${e}".`);o.add(e)};if([`__proto__`,`constructor`,`prototype`].includes(e.labelField))throw TypeError(`AbTable footerSummary has an invalid labelField.`);for(let t of e.fields)if(typeof t==`string`)l(t),s.push(t);else{if(!t||typeof t!=`object`||Array.isArray(t)||!Object.keys(t).length)throw TypeError(`AbTable footerSummary fields must be field names or objects of callbacks.`);for(let[e,n]of Object.entries(t)){if(l(e),typeof n!=`function`)throw TypeError(`AbTable footerSummary handler for "${e}" must be a function.`);c.push([e,n])}}let u={};for(let e of s){let n=null;for(let r of t){var d;let t=r[e];if(!(t==null||typeof t==`string`&&!t.trim())){if(typeof t!=`number`&&typeof t!=`string`||!Number.isFinite(Number(t)))throw TypeError(`AbTable footerSummary field "${e}" must contain numbers or numeric strings.`);if(n=((d=n)==null?0:d)+Number(t),!Number.isFinite(n))throw RangeError(`AbTable footerSummary total for "${e}" is not finite.`)}}u[e]=n}for(let[e,n]of c){let r=t.length?n({rows:t,totals:Object.freeze(V({},u))}):null;if(r!==null&&(typeof r!=`number`||!Number.isFinite(r)))throw TypeError(`AbTable footerSummary handler for "${e}" must return a finite number or null.`);u[e]=r}let f=V({[e.labelField]:(a=e.label)==null?r:a},u),p=V({},f);for(let[e,t]of Object.entries(u))p[e]=t===null?`-`:wp(t,f,Cp(n,e),i(e));return p}var Ep=(0,n.defineComponent)(V(V({},{name:`AbTable`}),{},{__name:`ab-table`,props:(0,n.mergeModels)({id:{},title:{},rule:{default:()=>[]},queryHandler:{},createHandler:{},updateHandler:{},deleteHandler:{},pagerClassName:{},pagerConfig:{},pagerEnable:{type:Boolean,default:!0},locale:{default:`zh-cn`},idField:{},idFieldTable:{},permiPrefix:{},compactMode:{type:Boolean},parentIdField:{},accordion:{type:Boolean},hasChildField:{},lazyMethod:{},isCurrent:{type:Boolean},dragable:{type:Boolean},absDragable:{type:Boolean},rowClassName:{},headerCellClassName:{},cellClassName:{},rowStyle:{},editable:{type:Boolean},singleSelect:{type:Boolean},multiSelect:{type:Boolean},validRules:{},sortable:{type:Boolean,default:!0},sortLocally:{type:Boolean},footerSummary:{},maxHeight:{},offsetTop:{},autoHeight:{type:Boolean},readonly:{type:Boolean,default:!0}},{query:{},queryModifiers:{}}),emits:(0,n.mergeModels)([`update:modelValue`,`changed`,`cellClick`,`current-change`,`after-loaded`,`operated`],[`update:query`]),setup(e,{expose:t,emit:r}){var a;let o=r,s=e,{t:c}=z(),l=(0,i.useRoute)(),u=(0,n.ref)(null),d=(0,n.ref)(),f=(0,n.ref)();(0,n.inject)(`abToolbarRef`,null);let p=(0,n.ref)([]),m=(0,n.ref)(s.id||String((a=(0,n.getCurrentInstance)())==null?void 0:a.uid)||l.path),h=Sp(()=>s.rule),g=(0,n.computed)(()=>{let e=[];return s.editable&&Qo(s.rule||[],t=>t.field&&t.edit?e.push(t.field):void 0),e}),_=({column:e})=>{var t;return typeof s.headerCellClassName==`function`?s.headerCellClassName({column:e}):(t=g.value)!=null&&t.includes(e.field)?`primary`:null},v=(0,n.computed)(()=>!(!s.readonly||s.multiSelect||s.singleSelect)),{wsCache:y}=R(),b=(0,n.computed)(()=>y.getCurrentSize||`default`),x=(0,n.computed)(()=>_l(b.value)),S={useKey:!0,resizable:!0},C=(0,n.reactive)({useKey:!0,isHover:!0,isCurrent:s.isCurrent,drag:s.dragable}),w=s.compactMode?{padding:!1,height:30}:void 0,T=s.dragable?(0,n.reactive)({trigger:`row`,showGuidesStatus:!0}):void 0,E=(0,n.reactive)({immediate:!0,storage:!0,restoreStore:({$table:e,storeData:t})=>{let n=xp(t,e.getFullColumns());return n!==t&&console.warn(`[AbTable] Saved column order conflicts with current groups; the order and visibility overrides for hidden columns were ignored.`),n}}),D=(0,n.reactive)({filename:`${s.title||(l==null?void 0:l.meta.title)}_${(0,J.default)().format(`YYYYMMDD`)}`,columns:ns(es(s.rule,e=>e.field!==X.OPERATE),e=>({field:e.field}))}),ee=function(){var e=H(function*(e,t){var n;let r=f.value,i=es(s.rule,e=>(e==null?void 0:e.field)&&(e==null?void 0:e.field)!==`operate`&&!e.hidden),a=!!s.parentIdField&&((n=fe.value)==null?void 0:n.expandAll);if(t){let t=r==null?void 0:r.getCheckboxRecords();if(!(t!=null&&t.length))return;r==null||r.exportData({data:t,columns:i,isAllExpand:a,filename:e})}else r==null||r.exportData({columns:i,isAllExpand:a,filename:e})});return function(t,n){return e.apply(this,arguments)}}(),O=e=>{var t,n;return(t=f.value)==null||(n=t.getColumnByField)==null?void 0:n.call(t,e)},te=(0,n.computed)(()=>s.footerSummary?[Tp(s.footerSummary,p.value,h.value,c(`table.total`),O)]:[]),k=(0,n.useModel)(e,`query`),A=(0,n.ref)(0),ne=(0,n.ref)(1),j=(0,n.ref)(10),M=(0,n.ref)(``),N=(0,n.ref)(``),re=(0,n.ref)(``),ie=(0,n.computed)(()=>{var e,t,n,r,i,a,o,c,l,u;return{pageNo:(e=(t=s.pagerConfig)==null?void 0:t.pageNoField)==null?`pageNo`:e,pageSize:(n=(r=s.pagerConfig)==null?void 0:r.pageSizeField)==null?`pageSize`:n,sortFieldTable:(i=(a=s.pagerConfig)==null?void 0:a.sortFieldTableField)==null?`sortFieldTable`:i,sortField:(o=(c=s.pagerConfig)==null?void 0:c.sortFieldField)==null?`sortField`:o,sortType:(l=(u=s.pagerConfig)==null?void 0:u.sortTypeField)==null?`sortType`:l}}),ae=(0,n.computed)(()=>{var e;return((e=s.pagerConfig)==null?void 0:e.layouts)||[`Home`,`PrevJump`,`PrevPage`,`Number`,`NextPage`,`NextJump`,`End`,`Sizes`,`FullJump`,`Total`]});function oe(){var e,t,n,r,i,a;let o=(e=k.value)==null?{}:e,s=ie.value,c=(t=o[s.pageNo])==null?1:t,l=(n=o[s.pageSize])==null?10:n,u=(r=o[s.sortFieldTable])==null?``:r,d=(i=o[s.sortField])==null?``:i,f=(a=o[s.sortType])==null?``:a;if(!Number.isInteger(c)||Number(c)<1||!Number.isInteger(l)||Number(l)<1)throw TypeError(`AbTable pageNo and pageSize must be positive integers.`);if(typeof u!=`string`||typeof d!=`string`||typeof f!=`string`)throw TypeError(`AbTable sort fields must be strings.`);ne.value=Number(c),j.value=Number(l),M.value=u,N.value=d,re.value=f}let se=function(){var e=H(function*({currentPage:e,pageSize:t}){ne.value=e,j.value=t,yield De()});return function(t){return e.apply(this,arguments)}}(),ce=(0,n.reactive)({trigger:`cell`,remote:!s.sortLocally}),le=function(){var e=H(function*({field:e,order:t,column:n}){if(t){var r,i,a,o;let c=(r=(i=(a=n.params)==null?void 0:a.sortFieldTable)==null?s.idFieldTable:i)==null?``:r,l=((o=n.params)==null?void 0:o.sortField)||e;if(typeof c!=`string`||typeof l!=`string`)throw TypeError(`AbTable column sortFieldTable and sortField must be strings.`);M.value=c,N.value=l.replace(/[A-Z]/g,e=>`_`+e.toLowerCase()),re.value=t}else{var c;M.value=(c=s.idFieldTable)==null?``:c,N.value=s.idField||`id`,re.value=`desc`}yield je()});return function(t){return e.apply(this,arguments)}}(),ue=(0,n.computed)(()=>s.editable&&!v.value?{trigger:`click`,mode:`row`,showStatus:!0}:void 0),P=(0,n.ref)(s.editable),de=(0,n.computed)(()=>!s.parentIdField),fe=(0,n.computed)(()=>{if(!s.parentIdField)return;let e={transform:!0,accordion:s.accordion,rowField:s.idField||`id`,parentField:s.parentIdField||`parentId`,hasChildField:s.hasChildField||`hasChildren`,expandAll:!0};return typeof s.lazyMethod==`function`&&(e.lazy=!0,e.loadMethod=s.lazyMethod),e}),pe=s.singleSelect?{labelField:`name`,trigger:`row`}:void 0,me=Uo(e=>o(`current-change`,{newValue:e}),100),he=({row:e,column:t})=>{if((t==null?void 0:t.field)===X.OPERATE)return;let n=f.value;s.editable&&!v.value||n==null||n.clearCheckboxRow(),n==null||n.setCheckboxRow(e,!0),o(`cellClick`,{row:e,column:t})},ge=()=>{var e;let t=(e=f.value)==null?void 0:e.getRadioRecord();me(t)};C.isCurrent=(0,n.computed)(()=>s.multiSelect||s.multiSelect===void 0&&s.editable).value||s.singleSelect||s.absDragable||s.isCurrent;let _e=(0,n.reactive)({highlight:s.multiSelect&&s.editable,range:!s.parentIdField}),ve=()=>{var e;let t=(e=f.value)==null?void 0:e.getCheckboxRecords();me(t)},ye=({newValue:e,column:t})=>{(t==null?void 0:t.field)!==X.OPERATE&&me(e)},be=(0,n.ref)(s.maxHeight||0),xe={mini:36,small:40,medium:44,large:48},Se=xe[x.value||`medium`]||xe.medium,Ce=(0,n.ref)([10,15,20,50,100]),we=()=>{var e,t,n,r,i;if(!s.autoHeight){s.maxHeight&&(be.value=s.maxHeight);return}(e=f.value)!=null&&(e=e.cellConfig)!=null&&e.height&&(Se=f.value.cellConfig.height);let a=(t=u.value)==null?void 0:t.parentElement,o=(a==null||(n=a.querySelector(`.ab-toolbar`))==null||(n=n.getBoundingClientRect())==null?void 0:n.height)||0,c=(vl(s.rule)||0)*Se,l=((r=d.value)==null||(r=r.$el)==null||(r=r.getBoundingClientRect())==null?void 0:r.height)||0,p=((a==null||(i=a.getBoundingClientRect())==null?void 0:i.height)||500)-o-l;if(s.offsetTop){let e=window.innerHeight-(s.offsetTop||0);be.value=Math.max(p,e)}else be.value=p;if(be.value<=0)return;let m=be.value-c-(s.pagerEnable?Se*1.5:0),h=Math.min(Math.max(Math.round(m/Se),10),100);s.footerSummary&&--h;let g=[...Ce.value];g.includes(h)||(g.push(h),g.sort((e,t)=>e-t)),Ce.value=g,j.value=h,console.warn(`calculateTableHeight: `,vl(s.rule))},Te=(0,n.ref)(!1),Ee=0;function De(){return Oe.apply(this,arguments)}function Oe(){return Oe=H(function*(){if(!s.queryHandler)return;let e=++Ee;Te.value=!0;try{var t,n;let r=ie.value,i=V(V({},k.value),{},{[r.pageNo]:ne.value,[r.pageSize]:j.value,[r.sortFieldTable]:M.value,[r.sortField]:N.value,[r.sortType]:re.value}),a=yield s.queryHandler(i),o=Array.isArray(a)?a:(t=a==null?void 0:a.data)==null?a==null?void 0:a.list:t;if(!Array.isArray(o))throw TypeError(`AbTable queryHandler must return an array or an object containing a data or list array.`);if(e!==Ee)return;p.value=o,A.value=Array.isArray(a)?a.length:(n=a.total)==null?o.length:n}finally{e===Ee&&(Te.value=!1)}}),Oe.apply(this,arguments)}(0,n.onMounted)(H(function*(){oe(),we(),yield De()}));function ke(){return Ae.apply(this,arguments)}function Ae(){return Ae=H(function*(){ne.value=1,yield De()}),Ae.apply(this,arguments)}function je(){return Me.apply(this,arguments)}function Me(){return Me=H(function*(){yield De()}),Me.apply(this,arguments)}return t({reload:ke,refresh:je,resize:()=>we(),tableRef:f,exportData:ee}),(t,r)=>{let i=(0,n.resolveComponent)(`vxe-table`),a=(0,n.resolveComponent)(`vxe-pager`);return(0,n.openBlock)(),(0,n.createElementBlock)(`div`,{ref_key:`containerRef`,ref:u,class:`ab-table`},[(0,n.createVNode)(i,{ref_key:`tableRef`,ref:f,id:m.value,data:p.value,stripe:de.value,loading:Te.value,"column-config":S,"row-config":C,"row-drag-config":(0,n.unref)(T),"cell-config":(0,n.unref)(w),"custom-config":E,"tree-config":fe.value,"row-class-name":e.rowClassName,"header-cell-class-name":_,"cell-class-name":e.cellClassName,"row-style":e.rowStyle,border:`inner`,size:x.value,"max-height":(0,n.unref)(be),"edit-config":ue.value,"edit-rules":e.editable?e.validRules:void 0,"keep-source":P.value,"show-overflow":``,"show-header-overflow":``,"show-footer-overflow":``,"auto-resize":``,"show-footer":!!e.footerSummary,"footer-data":te.value,"sort-config":ce,onSortChange:le,"radio-config":(0,n.unref)(pe),onRadioChange:ge,"checkbox-config":_e,onCheckboxChange:ve,onCheckboxAll:ve,onCurrentChange:ye,"export-config":D,onCellClick:he},{default:(0,n.withCtx)(()=>[((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)((0,n.unref)(h),(t,r)=>((0,n.openBlock)(),(0,n.createBlock)(kl,{key:t.field||r,rule:t,idx:r,"id-field":e.idField,"id-field-table":e.idFieldTable,"permi-prefix":e.permiPrefix,sortable:e.sortable,"delete-handler":e.deleteHandler,readonly:e.readonly,onRefresh:je},null,8,[`rule`,`idx`,`id-field`,`id-field-table`,`permi-prefix`,`sortable`,`delete-handler`,`readonly`]))),128))]),_:1},8,[`id`,`data`,`stripe`,`loading`,`row-config`,`row-drag-config`,`cell-config`,`custom-config`,`tree-config`,`row-class-name`,`cell-class-name`,`row-style`,`size`,`max-height`,`edit-config`,`edit-rules`,`keep-source`,`show-footer`,`footer-data`,`sort-config`,`radio-config`,`checkbox-config`,`export-config`]),e.pagerEnable?((0,n.openBlock)(),(0,n.createBlock)(a,{key:0,ref_key:`pagerRef`,ref:d,"class-name":e.pagerClassName,"page-sizes":Ce.value,"current-page":ne.value,"onUpdate:currentPage":r[0]||(r[0]=e=>ne.value=e),"page-size":j.value,"onUpdate:pageSize":r[1]||(r[1]=e=>j.value=e),total:A.value,size:x.value,layouts:ae.value,onPageChange:se},null,8,[`class-name`,`page-sizes`,`current-page`,`page-size`,`total`,`size`,`layouts`])):(0,n.createCommentVNode)(``,!0)],512)}}})),Dp={class:`ab-table-detail__title`},Op=(0,n.defineComponent)(V(V({},{name:`AbTableDetail`}),{},{__name:`ab-table-detail`,props:(0,n.mergeModels)({title:{},id:{},idField:{},idFieldTable:{},modelValue:{},visible:{type:Boolean},rule:{},validRules:{},permiPrefix:{},getHandler:{},createHandler:{},updateHandler:{},deleteHandler:{},vertical:{type:Boolean},detailLevel:{default:1},editable:{type:Boolean,default:!0},readonly:{type:Boolean,default:!0}},{modelValue:{},modelModifiers:{}}),emits:(0,n.mergeModels)([`open`],[`update:modelValue`]),setup(e,{expose:t,emit:r}){let a=r,o=e,{t:s}=z(),c=(0,i.useRoute)(),l=(0,n.ref)(),u=(0,n.ref)({}),d=(0,n.ref)({}),f=(0,n.useModel)(e,`modelValue`);(0,n.ref)(o.vertical);let p=(0,n.ref)(o.visible),m=(0,n.ref)(o.readonly);(0,n.watch)(()=>o.readonly,e=>m.value=e,{immediate:!0});let h=(0,n.computed)(()=>o.detailLevel&&o.detailLevel<5?`${76-o.detailLevel*8}%`:`32%`);o.id;let g=(0,n.computed)(()=>{var e,t;return!((e=f.value)!=null&&e[o.idField])||((t=f.value)==null?void 0:t[o.idField])===`new`}),_=(0,n.computed)(()=>g.value?`${s(`action.create`)} - ${o.title||(c==null?void 0:c.meta.title)||``}`:m.value?`${s(`action.detail`)} - ${o.title||(c==null?void 0:c.meta.title)||``}`:`${s(`action.edit`)} - ${o.title||(c==null?void 0:c.meta.title)||``}`),v=(0,n.computed)(()=>{var e;return((e=o.rule)==null?[]:e).map(e=>typeof e.getRule==`function`?e.getRule():e)}),y=()=>{var e;m.value=!1,(e=u.value)==null||e.refresh()},b=function(){var e=H(function*(){T.value=!0;let e;g.value&&typeof o.createHandler==`function`?(e=yield o.createHandler(f.value),e&&(f.value[o.idField]=e),yield(0,n.nextTick)()):!g.value&&typeof o.updateHandler==`function`&&(e=yield o.updateHandler(f.value)),console.warn(`saveHandler: `,JSON.stringify(f.value,null,2)),T.value=!1});return function(){return e.apply(this,arguments)}}(),x=()=>{var e;m.value=!0,(e=u.value)==null||e.refresh()},S=()=>D(),C=(0,n.computed)(()=>{let e=Oa(v.value.find(e=>e.type!==X.OPERATE&&e.field===X.OPERATE));if(e)return e.children=es(e==null?void 0:e.children,e=>e.field!==X.DETAIL),e!=null&&e.children&&Array.isArray(e==null?void 0:e.children)&&e.children.push({type:`ElButton`,children:[{type:`icon`,props:{icon:`ep:edit-pen`}},s(`action.edit`)],props:{type:`primary`},computed:{hidden:!m.value},on:{click:y}},{type:`ElButton`,children:[{type:`icon`,props:{icon:`ep:check`}},s(`action.save`)],props:{type:`success`,plain:!0},computed:{hidden:m.value},on:{click:b}},{type:`ElButton`,children:[{type:`icon`,props:{icon:`ep:refresh-right`}},s(`action.cancel`)],computed:{hidden:m.value},on:{click:x}},{type:`ElButton`,children:[{type:`icon`,props:{icon:`ep:back`}},s(`action.return`)],on:{click:S}}),e}),w=(0,n.computed)(()=>(0,n.reactive)(v.value.filter(e=>e.type!==X.OPERATE&&e.field!==X.OPERATE).map(e=>Oa(e)))),T=(0,n.ref)(!1),E=function(){var e=H(function*(e=void 0,t=!1){var r;if(m.value=t,p.value=!0,T.value=!0,typeof o.getHandler==`function`&&e!=null&&e[o.idField]){let t=yield o.getHandler(e==null?void 0:e[o.idField]);f.value=t||{}}else{var i;let t=Oa(e)||{};(i=o.rule)==null||i.forEach(e=>{let n=typeof e.getRule==`function`?e.getRule():e;n.field&&n.field!==X.OPERATE&&(t==null?void 0:t[n.field])===void 0&&n.edit===void 0&&n.itemRender===void 0&&(t[n.field]=``)}),f.value=t}yield(0,n.nextTick)(),(r=u.value)==null||r.refresh(),a(`open`,f.value),T.value=!1});return function(){return e.apply(this,arguments)}}(),D=()=>{m.value=!0,p.value=!1,f.value={}};return t({open:E,close:D,toggle:(e=!1,t=void 0,n=!1)=>e?E(t,n):D(),reload:function(){var e=H(function*(){if(typeof o.getHandler!=`function`||!f.value[o.idField]){console.error(`abTableDetail.reload: no getHandler or no idField!`);return}let e=yield o.getHandler(f.value[o.idField]);E(e,m.value)});return function(){return e.apply(this,arguments)}}()}),(t,r)=>{let i=(0,n.resolveComponent)(`ab-form`),a=(0,n.resolveComponent)(`el-drawer`),o=(0,n.resolveDirective)(`loading`);return(0,n.openBlock)(),(0,n.createBlock)(a,{modelValue:p.value,"onUpdate:modelValue":r[3]||(r[3]=e=>p.value=e),"show-close":!1,"append-to-body":``,"close-on-click-modal":``,"close-on-press-escape":``,"destroy-on-close":``,size:h.value,class:`ab-table-detail`,"header-class":`ab-table-detail__header`},{header:(0,n.withCtx)(()=>[(0,n.createElementVNode)(`div`,Dp,(0,n.toDisplayString)(_.value),1),(0,n.withDirectives)((0,n.createVNode)(bl,{class:`ab-table-detail__opr`,"permi-prefix":e.permiPrefix,rule:C.value,"model-value":f.value,api:d.value,"onUpdate:api":r[0]||(r[0]=e=>d.value=e),plain:``,readonly:m.value},null,8,[`permi-prefix`,`rule`,`model-value`,`api`,`readonly`]),[[o,T.value]])]),default:(0,n.withCtx)(()=>[(0,n.withDirectives)((0,n.createVNode)(i,{ref_key:`formRef`,ref:l,rule:w.value,modelValue:f.value,"onUpdate:modelValue":r[1]||(r[1]=e=>f.value=e),api:u.value,"onUpdate:api":r[2]||(r[2]=e=>u.value=e),"id-field":e.idField,"id-field-table":e.idFieldTable,readonly:m.value},null,8,[`rule`,`modelValue`,`api`,`id-field`,`id-field-table`,`readonly`]),[[o,T.value]])]),_:1},8,[`modelValue`,`size`])}}})),kp=Object.freeze({left:0,top:0,width:16,height:16}),Ap=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),jp=Object.freeze(V(V({},kp),Ap)),Mp=Object.freeze(V(V({},jp),{},{body:``,hidden:!1}));function Np(e,t){let n={};!e.hFlip!=!t.hFlip&&(n.hFlip=!0),!e.vFlip!=!t.vFlip&&(n.vFlip=!0);let r=((e.rotate||0)+(t.rotate||0))%4;return r&&(n.rotate=r),n}function Pp(e,t){let n=Np(e,t);for(let r in Mp)r in Ap?r in e&&!(r in n)&&(n[r]=Ap[r]):r in t?n[r]=t[r]:r in e&&(n[r]=e[r]);return n}function Fp(e,t){let n=e.icons,r=e.aliases||Object.create(null),i=Object.create(null);function a(e){if(n[e])return i[e]=[];if(!(e in i)){i[e]=null;let t=r[e]&&r[e].parent,n=t&&a(t);n&&(i[e]=[t].concat(n))}return i[e]}return(t||Object.keys(n).concat(Object.keys(r))).forEach(a),i}function Ip(e,t,n){let r=e.icons,i=e.aliases||Object.create(null),a={};function o(e){a=Pp(r[e]||i[e],a)}return o(t),n.forEach(o),Pp(e,a)}function Lp(e,t){let n=[];if(typeof e!=`object`||typeof e.icons!=`object`)return n;e.not_found instanceof Array&&e.not_found.forEach(e=>{t(e,null),n.push(e)});let r=Fp(e);for(let i in r){let a=r[i];a&&(t(i,Ip(e,i,a)),n.push(i))}return n}var Rp=/^[a-z0-9]+(-[a-z0-9]+)*$/,zp=(e,t,n,r=``)=>{let i=e.split(`:`);if(e.slice(0,1)===`@`){if(i.length<2||i.length>3)return null;r=i.shift().slice(1)}if(i.length>3||!i.length)return null;if(i.length>1){let e=i.pop(),n=i.pop(),a={provider:i.length>0?i[0]:r,prefix:n,name:e};return t&&!Bp(a)?null:a}let a=i[0],o=a.split(`-`);if(o.length>1){let e={provider:r,prefix:o.shift(),name:o.join(`-`)};return t&&!Bp(e)?null:e}if(n&&r===``){let e={provider:r,prefix:``,name:a};return t&&!Bp(e,n)?null:e}return null},Bp=(e,t)=>e?!!((e.provider===``||e.provider.match(Rp))&&(t&&e.prefix===``||e.prefix.match(Rp))&&e.name.match(Rp)):!1,Vp=V({provider:``,aliases:{},not_found:{}},kp);function Hp(e,t){for(let n in t)if(n in e&&typeof e[n]!=typeof t[n])return!1;return!0}function Up(e){if(typeof e!=`object`||!e)return null;let t=e;if(typeof t.prefix!=`string`||!e.icons||typeof e.icons!=`object`||!Hp(e,Vp))return null;let n=t.icons;for(let e in n){let t=n[e];if(!e.match(Rp)||typeof t.body!=`string`||!Hp(t,Mp))return null}let r=t.aliases||Object.create(null);for(let e in r){let t=r[e],i=t.parent;if(!e.match(Rp)||typeof i!=`string`||!n[i]&&!r[i]||!Hp(t,Mp))return null}return t}var Wp=Object.create(null);function Gp(e,t){return{provider:e,prefix:t,icons:Object.create(null),missing:new Set}}function Kp(e,t){let n=Wp[e]||(Wp[e]=Object.create(null));return n[t]||(n[t]=Gp(e,t))}function qp(e,t){return Up(t)?Lp(t,(t,n)=>{n?e.icons[t]=n:e.missing.add(t)}):[]}function Jp(e,t,n){try{if(typeof n.body==`string`)return e.icons[t]=V({},n),!0}catch(e){}return!1}function Yp(e,t){let n=[];return(typeof e==`string`?[e]:Object.keys(Wp)).forEach(e=>{(typeof e==`string`&&typeof t==`string`?[t]:Object.keys(Wp[e]||{})).forEach(t=>{let r=Kp(e,t);n=n.concat(Object.keys(r.icons).map(n=>(e===``?``:`@`+e+`:`)+t+`:`+n))})}),n}var Xp=!1;function Zp(e){return typeof e==`boolean`&&(Xp=e),Xp}function Qp(e){let t=typeof e==`string`?zp(e,!0,Xp):e;if(t){let e=Kp(t.provider,t.prefix),n=t.name;return e.icons[n]||(e.missing.has(n)?null:void 0)}}function $p(e,t){let n=zp(e,!0,Xp);return n?Jp(Kp(n.provider,n.prefix),n.name,t):!1}function em(e,t){if(typeof e!=`object`)return!1;if(typeof t!=`string`&&(t=e.provider||``),Xp&&!t&&!e.prefix){let t=!1;return Up(e)&&(e.prefix=``,Lp(e,(e,n)=>{n&&$p(e,n)&&(t=!0)})),t}let n=e.prefix;return Bp({provider:t,prefix:n,name:`a`})?!!qp(Kp(t,n),e):!1}function tm(e){return!!Qp(e)}function nm(e){let t=Qp(e);return t?V(V({},jp),t):null}var rm=Object.freeze({width:null,height:null}),im=Object.freeze(V(V({},rm),Ap)),am=/(-?[0-9.]*[0-9]+[0-9.]*)/g,om=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function sm(e,t,n){if(t===1)return e;if(n=n||100,typeof e==`number`)return Math.ceil(e*t*n)/n;if(typeof e!=`string`)return e;let r=e.split(am);if(r===null||!r.length)return e;let i=[],a=r.shift(),o=om.test(a);for(;;){if(o){let e=parseFloat(a);isNaN(e)?i.push(a):i.push(Math.ceil(e*t*n)/n)}else i.push(a);if(a=r.shift(),a===void 0)return i.join(``);o=!o}}var cm=e=>e===`unset`||e===`undefined`||e===`none`;function lm(e,t){let n=V(V({},jp),e),r=V(V({},im),t),i={left:n.left,top:n.top,width:n.width,height:n.height},a=n.body;[n,r].forEach(e=>{let t=[],n=e.hFlip,r=e.vFlip,o=e.rotate;n?r?o+=2:(t.push(`translate(`+(i.width+i.left).toString()+` `+(0-i.top).toString()+`)`),t.push(`scale(-1 1)`),i.top=i.left=0):r&&(t.push(`translate(`+(0-i.left).toString()+` `+(i.height+i.top).toString()+`)`),t.push(`scale(1 -1)`),i.top=i.left=0);let s;switch(o<0&&(o-=Math.floor(o/4)*4),o%=4,o){case 1:s=i.height/2+i.top,t.unshift(`rotate(90 `+s.toString()+` `+s.toString()+`)`);break;case 2:t.unshift(`rotate(180 `+(i.width/2+i.left).toString()+` `+(i.height/2+i.top).toString()+`)`);break;case 3:s=i.width/2+i.left,t.unshift(`rotate(-90 `+s.toString()+` `+s.toString()+`)`)}o%2==1&&(i.left!==i.top&&(s=i.left,i.left=i.top,i.top=s),i.width!==i.height&&(s=i.width,i.width=i.height,i.height=s)),t.length&&(a=`<g transform="`+t.join(` `)+`">`+a+`</g>`)});let o=r.width,s=r.height,c=i.width,l=i.height,u,d;o===null?(d=s===null?`1em`:s===`auto`?l:s,u=sm(d,c/l)):(u=o===`auto`?c:o,d=s===null?sm(u,l/c):s===`auto`?l:s);let f={},p=(e,t)=>{cm(t)||(f[e]=t.toString())};return p(`width`,u),p(`height`,d),f.viewBox=i.left.toString()+` `+i.top.toString()+` `+c.toString()+` `+l.toString(),{attributes:f,body:a}}var um=/\sid="(\S+)"/g,dm=`IconifyId`+Date.now().toString(16)+(Math.random()*16777216|0).toString(16),fm=0;function pm(e,t=dm){let n=[],r;for(;r=um.exec(e);)n.push(r[1]);if(!n.length)return e;let i=`suffix`+(Math.random()*16777216|Date.now()).toString(16);return n.forEach(n=>{let r=typeof t==`function`?t(n):t+(fm++).toString(),a=n.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`);e=e.replace(RegExp(`([#;"])(`+a+`)([")]|\\.[a-z])`,`g`),`$1`+r+i+`$3`)}),e=e.replace(new RegExp(i,`g`),``),e}var mm={local:!0,session:!0},hm={local:new Set,session:new Set},gm=!1;function _m(e){gm=e}var vm=`iconify2`,ym=`iconify`,bm=`iconify-count`,xm=`iconify-version`,Sm=36e5,Cm=168;function wm(e,t){try{return e.getItem(t)}catch(e){}}function Tm(e,t,n){try{return e.setItem(t,n),!0}catch(e){}}function Em(e,t){try{e.removeItem(t)}catch(e){}}function Dm(e,t){return Tm(e,bm,t.toString())}function Om(e){return parseInt(wm(e,bm))||0}var km=typeof window>`u`?{}:window;function Am(e){let t=e+`Storage`;try{if(km&&km[t]&&typeof km[t].length==`number`)return km[t]}catch(e){}mm[e]=!1}function jm(e,t){let n=Am(e);if(!n)return;let r=wm(n,xm);if(r!==vm){if(r){let e=Om(n);for(let t=0;t<e;t++)Em(n,ym+t.toString())}Tm(n,xm,vm),Dm(n,0);return}let i=Math.floor(Date.now()/Sm)-Cm,a=e=>{let r=ym+e.toString(),a=wm(n,r);if(typeof a==`string`){try{let n=JSON.parse(a);if(typeof n==`object`&&typeof n.cached==`number`&&n.cached>i&&typeof n.provider==`string`&&typeof n.data==`object`&&typeof n.data.prefix==`string`&&t(n,e))return!0}catch(e){}Em(n,r)}},o=Om(n);for(let t=o-1;t>=0;t--)a(t)||(t===o-1?(o--,Dm(n,o)):hm[e].add(t))}function Mm(){if(!gm){_m(!0);for(let e in mm)jm(e,e=>{let t=e.data,n=e.provider,r=t.prefix,i=Kp(n,r);if(!qp(i,t).length)return!1;let a=t.lastModified||-1;return i.lastModifiedCached=i.lastModifiedCached?Math.min(i.lastModifiedCached,a):a,!0})}}function Nm(e,t){switch(e){case`local`:case`session`:mm[e]=t;break;case`all`:for(let e in mm)mm[e]=t}}var Pm=Object.create(null);function Fm(e,t){Pm[e]=t}function Im(e){return Pm[e]||Pm[``]}function Lm(e){let t;if(typeof e.resources==`string`)t=[e.resources];else if(t=e.resources,!(t instanceof Array)||!t.length)return null;return{resources:t,path:e.path||`/`,maxURL:e.maxURL||500,rotate:e.rotate||750,timeout:e.timeout||5e3,random:e.random===!0,index:e.index||0,dataAfterTimeout:e.dataAfterTimeout!==!1}}for(var Rm=Object.create(null),zm=[`https://api.simplesvg.com`,`https://api.unisvg.com`],Bm=[];zm.length>0;)zm.length===1||Math.random()>.5?Bm.push(zm.shift()):Bm.push(zm.pop());Rm[``]=Lm({resources:[`https://api.iconify.design`].concat(Bm)});function Vm(e,t){let n=Lm(t);return n!==null&&(Rm[e]=n,!0)}function Hm(e){return Rm[e]}function Um(){return Object.keys(Rm)}var Wm=(()=>{let e;try{if(e=fetch,typeof e==`function`)return e}catch(e){}})();function Gm(e){Wm=e}function Km(){return Wm}function qm(e,t){let n=Hm(e);if(!n)return 0;let r;if(!n.maxURL)r=0;else{let e=0;n.resources.forEach(t=>{e=Math.max(e,t.length)});let i=t+`.json?icons=`;r=n.maxURL-e-n.path.length-i.length}return r}function Jm(e){return e===404}var Ym=(e,t,n)=>{let r=[],i=qm(e,t),a=`icons`,o={type:a,provider:e,prefix:t,icons:[]},s=0;return n.forEach((n,c)=>{s+=n.length+1,s>=i&&c>0&&(r.push(o),o={type:a,provider:e,prefix:t,icons:[]},s=n.length),o.icons.push(n)}),r.push(o),r};function Xm(e){if(typeof e==`string`){let t=Hm(e);if(t)return t.path}return`/`}var Zm={prepare:Ym,send:(e,t,n)=>{if(!Wm){n(`abort`,424);return}let r=Xm(t.provider);switch(t.type){case`icons`:{let e=t.prefix,n=t.icons.join(`,`),i=new URLSearchParams({icons:n});r+=e+`.json?`+i.toString();break}case`custom`:{let e=t.uri;r+=e.slice(0,1)===`/`?e.slice(1):e;break}default:n(`abort`,400);return}let i=503;Wm(e+r).then(e=>{let t=e.status;if(t!==200)setTimeout(()=>{n(Jm(t)?`abort`:`next`,t)});else return i=501,e.json()}).then(e=>{setTimeout(typeof e!=`object`||!e?()=>{e===404?n(`abort`,e):n(`next`,i)}:()=>{n(`success`,e)})}).catch(()=>{n(`next`,i)})}};function Qm(e){let t={loaded:[],missing:[],pending:[]},n=Object.create(null);e.sort((e,t)=>e.provider===t.provider?e.prefix===t.prefix?e.name.localeCompare(t.name):e.prefix.localeCompare(t.prefix):e.provider.localeCompare(t.provider));let r={provider:``,prefix:``,name:``};return e.forEach(e=>{if(r.name===e.name&&r.prefix===e.prefix&&r.provider===e.provider)return;r=e;let i=e.provider,a=e.prefix,o=e.name,s=n[i]||(n[i]=Object.create(null)),c=s[a]||(s[a]=Kp(i,a)),l;l=o in c.icons?t.loaded:a===``||c.missing.has(o)?t.missing:t.pending;let u={provider:i,prefix:a,name:o};l.push(u)}),t}function $m(e,t){e.forEach(e=>{let n=e.loaderCallbacks;n&&(e.loaderCallbacks=n.filter(e=>e.id!==t))})}function eh(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout(()=>{e.pendingCallbacksFlag=!1;let t=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!t.length)return;let n=!1,r=e.provider,i=e.prefix;t.forEach(t=>{let a=t.icons,o=a.pending.length;a.pending=a.pending.filter(t=>{if(t.prefix!==i)return!0;let o=t.name;if(e.icons[o])a.loaded.push({provider:r,prefix:i,name:o});else if(e.missing.has(o))a.missing.push({provider:r,prefix:i,name:o});else return n=!0,!0;return!1}),a.pending.length!==o&&(n||$m([e],t.id),t.callback(a.loaded.slice(0),a.missing.slice(0),a.pending.slice(0),t.abort))})}))}var th=0;function nh(e,t,n){let r=th++,i=$m.bind(null,n,r);if(!t.pending.length)return i;let a={id:r,icons:t,callback:e,abort:i};return n.forEach(e=>{(e.loaderCallbacks||(e.loaderCallbacks=[])).push(a)}),i}function rh(e,t=!0,n=!1){let r=[];return e.forEach(e=>{let i=typeof e==`string`?zp(e,t,n):e;i&&r.push(i)}),r}var ih={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function ah(e,t,n,r){let i=e.resources.length,a=e.random?Math.floor(Math.random()*i):e.index,o;if(e.random){let t=e.resources.slice(0);for(o=[];t.length>1;){let e=Math.floor(Math.random()*t.length);o.push(t[e]),t=t.slice(0,e).concat(t.slice(e+1))}o=o.concat(t)}else o=e.resources.slice(a).concat(e.resources.slice(0,a));let s=Date.now(),c=`pending`,l=0,u,d=null,f=[],p=[];typeof r==`function`&&p.push(r);function m(){d&&(clearTimeout(d),d=null)}function h(){c===`pending`&&(c=`aborted`),m(),f.forEach(e=>{e.status===`pending`&&(e.status=`aborted`)}),f=[]}function g(e,t){t&&(p=[]),typeof e==`function`&&p.push(e)}function _(){return{startTime:s,payload:t,status:c,queriesSent:l,queriesPending:f.length,subscribe:g,abort:h}}function v(){c=`failed`,p.forEach(e=>{e(void 0,u)})}function y(){f.forEach(e=>{e.status===`pending`&&(e.status=`aborted`)}),f=[]}function b(t,n,r){let i=n!==`success`;switch(f=f.filter(e=>e!==t),c){case`pending`:break;case`failed`:if(i||!e.dataAfterTimeout)return;break;default:return}if(n===`abort`)u=r,v();else if(i)u=r,f.length||(o.length?x():v());else{if(m(),y(),!e.random){let n=e.resources.indexOf(t.resource);n!==-1&&n!==e.index&&(e.index=n)}c=`completed`,p.forEach(e=>{e(r)})}}function x(){if(c!==`pending`)return;m();let r=o.shift();if(r===void 0){if(f.length){d=setTimeout(()=>{m(),c===`pending`&&(y(),v())},e.timeout);return}v();return}let i={status:`pending`,resource:r,callback:(e,t)=>{b(i,e,t)}};f.push(i),l++,d=setTimeout(x,e.rotate),n(r,t,i.callback)}return setTimeout(x),_}function oh(e){let t=V(V({},ih),e),n=[];function r(){n=n.filter(e=>e().status===`pending`)}function i(e,i,a){let o=ah(t,e,i,(e,t)=>{r(),a&&a(e,t)});return n.push(o),o}function a(e){return n.find(t=>e(t))||null}return{query:i,find:a,setIndex:e=>{t.index=e},getIndex:()=>t.index,cleanup:r}}function sh(){}var ch=Object.create(null);function lh(e){if(!ch[e]){let t=Hm(e);if(!t)return;ch[e]={config:t,redundancy:oh(t)}}return ch[e]}function uh(e,t,n){let r,i;if(typeof e==`string`){let t=Im(e);if(!t)return n(void 0,424),sh;i=t.send;let a=lh(e);a&&(r=a.redundancy)}else{let t=Lm(e);if(t){r=oh(t);let n=Im(e.resources?e.resources[0]:``);n&&(i=n.send)}}return!r||!i?(n(void 0,424),sh):r.query(t,i,n)().abort}function dh(e,t){let n=e.lastModifiedCached;if(n&&n>=t)return n===t;if(e.lastModifiedCached=t,n)for(let n in mm)jm(n,n=>{let r=n.data;return n.provider!==e.provider||r.prefix!==e.prefix||r.lastModified===t});return!0}function fh(e,t){gm||Mm();function n(n){let r;if(!mm[n]||!(r=Am(n)))return;let i=hm[n],a;if(i.size)i.delete(a=Array.from(i).shift());else if(a=Om(r),!Dm(r,a+1))return;let o={cached:Math.floor(Date.now()/Sm),provider:e.provider,data:t};return Tm(r,ym+a.toString(),JSON.stringify(o))}(!t.lastModified||dh(e,t.lastModified))&&Object.keys(t.icons).length&&(t.not_found&&(t=Object.assign({},t),delete t.not_found),n(`local`)||n(`session`))}function ph(){}function mh(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,eh(e)}))}function hh(e,t){e.iconsToLoad=e.iconsToLoad?e.iconsToLoad.concat(t).sort():t,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout(()=>{e.iconsQueueFlag=!1;let{provider:t,prefix:n}=e,r=e.iconsToLoad;delete e.iconsToLoad;let i;r&&(i=Im(t))&&i.prepare(t,n,r).forEach(n=>{uh(t,n,t=>{if(typeof t!=`object`)n.icons.forEach(t=>{e.missing.add(t)});else try{let n=qp(e,t);if(!n.length)return;let r=e.pendingIcons;r&&n.forEach(e=>{r.delete(e)}),fh(e,t)}catch(e){console.error(e)}mh(e)})})}))}var gh=e=>{let t=Kp(e.provider,e.prefix).pendingIcons;return!!(t&&t.has(e.name))},_h=(e,t)=>{let n=Qm(rh(e,!0,Zp()));if(!n.pending.length){let e=!0;return t&&setTimeout(()=>{e&&t(n.loaded,n.missing,n.pending,ph)}),()=>{e=!1}}let r=Object.create(null),i=[],a,o;return n.pending.forEach(e=>{let{provider:t,prefix:n}=e;if(n===o&&t===a)return;a=t,o=n,i.push(Kp(t,n));let s=r[t]||(r[t]=Object.create(null));s[n]||(s[n]=[])}),n.pending.forEach(e=>{let{provider:t,prefix:n,name:i}=e,a=Kp(t,n),o=a.pendingIcons||(a.pendingIcons=new Set);o.has(i)||(o.add(i),r[t][n].push(i))}),i.forEach(e=>{let{provider:t,prefix:n}=e;r[t][n].length&&hh(e,r[t][n])}),t?nh(t,n,i):ph},vh=e=>new Promise((t,n)=>{let r=typeof e==`string`?zp(e,!0):e;r?_h([r||e],i=>{if(i.length&&r){let e=Qp(r);if(e){t(V(V({},jp),e));return}}n(e)}):n(e)});function yh(e,t){let n=V({},e);for(let e in t){let r=t[e],i=typeof r;e in rm?(r===null||r&&(i===`string`||i===`number`))&&(n[e]=r):i===typeof n[e]&&(n[e]=e===`rotate`?r%4:r)}return n}var bh=V(V({},im),{},{inline:!1}),xh=`iconify-inline`,Sh=`iconifyData`+Date.now(),Ch=[];function wh(e){for(let t=0;t<Ch.length;t++){let n=Ch[t];if((typeof n.node==`function`?n.node():n.node)===e)return n}}function Th(e,t=!1){let n=wh(e);return n?(n.temporary&&(n.temporary=t),n):(n={node:e,temporary:t},Ch.push(n),n)}function Eh(){if(document.documentElement)return Th(document.documentElement);Ch.push({node:()=>document.documentElement})}function Dh(e){Ch=Ch.filter(t=>e!==t&&e!==(typeof t.node==`function`?t.node():t.node))}function Oh(){return Ch}function kh(e){let t=document;t.readyState&&t.readyState!==`loading`?e():t.addEventListener(`DOMContentLoaded`,e)}var Ah=null,jh={childList:!0,subtree:!0,attributes:!0};function Mh(e){if(!e.observer)return;let t=e.observer;t.pendingScan||(t.pendingScan=setTimeout(()=>{delete t.pendingScan,Ah&&Ah(e)}))}function Nh(e,t){if(!e.observer)return;let n=e.observer;if(!n.pendingScan)for(let r=0;r<t.length;r++){let i=t[r];if(i.addedNodes&&i.addedNodes.length>0||i.type===`attributes`&&i.target[Sh]!==void 0){n.paused||Mh(e);return}}}function Ph(e,t){e.observer.instance.observe(t,jh)}function Fh(e){let t=e.observer;if(t&&t.instance)return;let n=typeof e.node==`function`?e.node():e.node;n&&window&&(t||(t={paused:0},e.observer=t),t.instance=new window.MutationObserver(Nh.bind(null,e)),Ph(e,n),t.paused||Mh(e))}function Ih(){Oh().forEach(Fh)}function Lh(e){if(!e.observer)return;let t=e.observer;t.pendingScan&&(clearTimeout(t.pendingScan),delete t.pendingScan),t.instance&&(t.instance.disconnect(),delete t.instance)}function Rh(e){let t=Ah!==null;Ah!==e&&(Ah=e,t&&Oh().forEach(Lh)),t?Ih():kh(Ih)}function zh(e){(e?[e]:Oh()).forEach(e=>{if(!e.observer){e.observer={paused:1};return}let t=e.observer;t.paused++,t.paused>1||!t.instance||t.instance.disconnect()})}function Bh(e){if(e){let t=wh(e);t&&zh(t)}else zh()}function Vh(e){(e?[e]:Oh()).forEach(e=>{if(!e.observer){Fh(e);return}let t=e.observer;if(t.paused&&(t.paused--,!t.paused)){let n=typeof e.node==`function`?e.node():e.node;if(n)t.instance?Ph(e,n):Fh(e);else return}})}function Hh(e){if(e){let t=wh(e);t&&Vh(t)}else Vh()}function Uh(e,t=!1){let n=Th(e,t);return Fh(n),n}function Wh(e){let t=wh(e);t&&(Lh(t),Dh(e))}function Gh(e,t){if(e.name!==t.name||e.mode!==t.mode)return!0;let n=e.customisations,r=t.customisations;for(let e in bh)if(n[e]!==r[e])return!0;return!1}function Kh(e,t=0){let n=e.replace(/^-?[0-9.]*/,``);function r(e){for(;e<0;)e+=4;return e%4}if(n===``){let t=parseInt(e);return isNaN(t)?0:r(t)}if(n!==e){let t=0;switch(n){case`%`:t=25;break;case`deg`:t=90}if(t){let i=parseFloat(e.slice(0,e.length-n.length));return isNaN(i)?0:(i/=t,i%1==0?r(i):0)}}return t}var qh=/[\s,]+/;function Jh(e,t){t.split(qh).forEach(t=>{switch(t.trim()){case`horizontal`:e.hFlip=!0;break;case`vertical`:e.vFlip=!0}})}var Yh=[`width`,`height`],Xh=[`inline`,`hFlip`,`vFlip`];function Zh(e,t){return e===t||e===`true`?!0:e===``||e===`false`?!1:null}function Qh(e){let t=e.getAttribute(`data-icon`),n=typeof t==`string`&&zp(t,!0);if(!n)return null;let r=V(V({},bh),{},{inline:e.classList&&e.classList.contains(xh)});Yh.forEach(t=>{let n=e.getAttribute(`data-`+t);n&&(r[t]=n)});let i=e.getAttribute(`data-rotate`);typeof i==`string`&&(r.rotate=Kh(i));let a=e.getAttribute(`data-flip`);return typeof a==`string`&&Jh(r,a),Xh.forEach(t=>{let n=`data-`+t,i=Zh(e.getAttribute(n),n);typeof i==`boolean`&&(r[t]=i)}),{name:t,icon:n,customisations:r,mode:e.getAttribute(`data-mode`)}}var $h=`svg.iconify, i.iconify, span.iconify, i.iconify-inline, span.`+xh;function eg(e){let t=[];return e.querySelectorAll($h).forEach(e=>{let n=e[Sh]||e.tagName.toLowerCase()!==`svg`?Qh(e):null;n&&t.push({node:e,props:n})}),t}function tg(e,t){let n=e.indexOf(`xlink:`)===-1?``:` xmlns:xlink="http://www.w3.org/1999/xlink"`;for(let e in t)n+=` `+e+`="`+t[e]+`"`;return`<svg xmlns="http://www.w3.org/2000/svg"`+n+`>`+e+`</svg>`}var ng;function rg(){try{ng=window.trustedTypes.createPolicy(`iconify`,{createHTML:e=>e})}catch(e){ng=null}}function ig(e){return ng===void 0&&rg(),ng?ng.createHTML(e):e}function ag(e){let t=new Set([`iconify`]);return[`provider`,`prefix`].forEach(n=>{e[n]&&t.add(`iconify--`+e[n])}),t}function og(e,t,n,r){let i=e.classList;if(r){let e=r.classList;Array.from(e).forEach(e=>{i.add(e)})}let a=[];return t.forEach(e=>{i.contains(e)?n.has(e)&&a.push(e):(i.add(e),a.push(e))}),n.forEach(e=>{t.has(e)||i.remove(e)}),a}function sg(e,t,n){let r=e.style;(n||[]).forEach(e=>{r.removeProperty(e)});let i=[];for(let e in t)r.getPropertyValue(e)||(i.push(e),r.setProperty(e,t[e]));return i}function cg(e,t,n){let r;try{r=document.createElement(`span`)}catch(t){return e}let i=t.customisations,a=lm(n,i),o=e[Sh],s=tg(pm(a.body),V({"aria-hidden":`true`,role:`img`},a.attributes));r.innerHTML=ig(s);let c=r.childNodes[0],l=e.attributes;for(let e=0;e<l.length;e++){let t=l.item(e),n=t.name;n!==`class`&&!c.hasAttribute(n)&&c.setAttribute(n,t.value)}let u=og(c,ag(t.icon),new Set(o&&o.addedClasses),e),d=sg(c,i.inline?{"vertical-align":`-0.125em`}:{},o&&o.addedStyles);return c[Sh]=V(V({},t),{},{status:`loaded`,addedClasses:u,addedStyles:d}),e.parentNode&&e.parentNode.replaceChild(c,e),c}function lg(e){return e.replace(/"/g,`'`).replace(/%/g,`%25`).replace(/#/g,`%23`).replace(/</g,`%3C`).replace(/>/g,`%3E`).replace(/\s+/g,` `)}function ug(e){return`data:image/svg+xml,`+lg(e)}function dg(e){return`url("`+ug(e)+`")`}var fg={display:`inline-block`},pg={"background-color":`currentColor`},mg={"background-color":`transparent`},hg={image:`var(--svg)`,repeat:`no-repeat`,size:`100% 100%`},gg={"-webkit-mask":pg,mask:pg,background:mg};for(let e in gg){let t=gg[e];for(let n in hg)t[e+`-`+n]=hg[n]}function _g(e){return e+(e.match(/^[-0-9.]+$/)?`px`:``)}function vg(e,t,n,r){let i=t.customisations,a=lm(n,i),o=a.attributes,s=e[Sh],c=tg(a.body,V(V({},o),{},{width:n.width+``,height:n.height+``})),l=og(e,ag(t.icon),new Set(s&&s.addedClasses)),u=V(V({"--svg":dg(c),width:_g(o.width),height:_g(o.height)},fg),r?pg:mg);i.inline&&(u[`vertical-align`]=`-0.125em`);let d=sg(e,u,s&&s.addedStyles);return e[Sh]=V(V({},t),{},{status:`loaded`,addedClasses:l,addedStyles:d}),e}var yg=!1;function bg(){yg||(yg=!0,setTimeout(()=>{yg&&(yg=!1,xg())}))}function xg(e,t=!1){let n=Object.create(null);function r(e,t){let{provider:r,prefix:i,name:a}=e,o=Kp(r,i),s=o.icons[a];if(s)return{status:`loaded`,icon:s};if(o.missing.has(a))return{status:`missing`};if(t&&!gh(e)){let e=n[r]||(n[r]=Object.create(null));(e[i]||(e[i]=new Set)).add(a)}return{status:`loading`}}(e?[e]:Oh()).forEach(e=>{let n=typeof e.node==`function`?e.node():e.node;if(!n||!n.querySelectorAll)return;let i=!1,a=!1;function o(t,n,r){if(a||(a=!0,zh(e)),t.tagName.toUpperCase()!==`SVG`){let e=n.mode,i=e===`mask`||(e===`bg`?!1:e===`style`?r.body.indexOf(`currentColor`)!==-1:null);if(typeof i==`boolean`){vg(t,n,V(V({},jp),r),i);return}}cg(t,n,r)}eg(n).forEach(({node:e,props:t})=>{let n=e[Sh];if(!n){let{status:n,icon:a}=r(t.icon,!0);if(a){o(e,t,a);return}i=i||n===`loading`,e[Sh]=V(V({},t),{},{status:n});return}let a;if(!Gh(n,t)){if(n.status!==`loading`)return;if(a=r(t.icon,!1),!a.icon){n.status=a.status;return}}else if(a=r(t.icon,n.name!==t.name),!a.icon){i=i||a.status===`loading`,Object.assign(n,V(V({},t),{},{status:a.status}));return}o(e,t,a.icon)}),e.temporary&&!i?Wh(n):t&&i?Uh(n,!0):a&&e.observer&&Vh(e)});for(let e in n){let t=n[e];for(let n in t){let r=t[n];_h(Array.from(r).map(t=>({provider:e,prefix:n,name:t})),bg)}}}function Sg(e){let t=wh(e);t?xg(t):xg({node:e,temporary:!0},!0)}function Cg(e,t,n=!1){let r=Qp(e);if(!r)return null;let i=zp(e),a=yh(bh,t||{}),o=cg(document.createElement(`span`),{name:e,icon:i,customisations:a},r);return n?o.outerHTML:o}function wg(){return`3.1.1`}function Tg(e,t){return Cg(e,t,!1)}function Eg(e,t){return Cg(e,t,!0)}function Dg(e,t){let n=Qp(e);return n?lm(n,yh(bh,t||{})):null}function Og(e){e?Sg(e):xg()}if(typeof document<`u`&&typeof window<`u`){Eh();let e=window;if(e.IconifyPreload!==void 0){let t=e.IconifyPreload,n=`Invalid IconifyPreload syntax.`;typeof t==`object`&&t&&(t instanceof Array?t:[t]).forEach(e=>{try{(typeof e!=`object`||!e||e instanceof Array||typeof e.icons!=`object`||typeof e.prefix!=`string`||!em(e))&&console.error(n)}catch(e){console.error(n)}})}setTimeout(()=>{Rh(xg),xg()})}function kg(e,t){Nm(e,t!==!1)}function Ag(e){Nm(e,!0)}if(Fm(``,Zm),typeof document<`u`&&typeof window<`u`){Mm();let e=window;if(e.IconifyProviders!==void 0){let t=e.IconifyProviders;if(typeof t==`object`&&t)for(let e in t){let n=`IconifyProviders[`+e+`] is invalid.`;try{let r=t[e];if(typeof r!=`object`||!r||r.resources===void 0)continue;Vm(e,r)||console.error(n)}catch(e){console.error(n)}}}}var jg={_api:{getAPIConfig:Hm,setAPIModule:Fm,sendAPIQuery:uh,setFetch:Gm,getFetch:Km,listAPIProviders:Um},addAPIProvider:Vm,loadIcons:_h,loadIcon:vh,iconExists:tm,getIcon:nm,listIcons:Yp,addIcon:$p,addCollection:em,replaceIDs:pm,calculateSize:sm,buildIcon:lm,getVersion:wg,renderSVG:Tg,renderHTML:Eg,renderIcon:Dg,scan:Og,observe:Uh,stopObserving:Wh,pauseObserver:Bh,resumeObserver:Hh,enableCache:kg,disableCache:Ag};try{self.Iconify===void 0&&(self.Iconify=jg)}catch(e){}var Mg=jg,Ng=[`xlink:href`],Pg=[`data-icon`],Fg=(0,n.defineComponent)(V(V({},{name:`AbIcon`}),{},{__name:`ab-icon`,props:{icon:{},color:{},size:{default:16},svgClass:{}},setup(e){let t=e,r=(0,n.ref)(null),i=(0,n.computed)(()=>{var e;return(e=t.icon)==null?void 0:e.startsWith(`svg-icon:`)}),a=(0,n.computed)(()=>{var e;return(0,n.unref)(i)?`#icon-${(e=t.icon)==null?void 0:e.split(`svg-icon:`)[1]}`:t.icon}),o=(0,n.computed)(()=>{let{color:e,size:n}=t;return{fontSize:`${n}px`,height:`1em`,color:e}}),s=(0,n.computed)(()=>{let{svgClass:e}=t;return`iconify ${e}`}),c=function(){var e=H(function*(e){if((0,n.unref)(i))return;let t=(0,n.unref)(r);if(!t||(yield(0,n.nextTick)(),!e))return;let a=Mg.renderSVG(e,{});if(a)t.textContent=``,t.appendChild(a);else{let n=document.createElement(`span`);n.className=`iconify`,n.dataset.icon=e,t.textContent=``,t.appendChild(n)}});return function(t){return e.apply(this,arguments)}}();return(0,n.watch)(()=>t.icon,e=>{c(e)}),(t,c)=>{let l=(0,n.resolveComponent)(`ElIcon`);return(0,n.openBlock)(),(0,n.createBlock)(l,{class:`ab-icon`,color:e.color,size:e.size},{default:(0,n.withCtx)(()=>[i.value?((0,n.openBlock)(),(0,n.createElementBlock)(`svg`,{key:0,class:(0,n.normalizeClass)(s.value)},[(0,n.createElementVNode)(`use`,{"xlink:href":a.value},null,8,Ng)],2)):((0,n.openBlock)(),(0,n.createElementBlock)(`span`,{key:1,ref_key:`elRef`,ref:r,class:(0,n.normalizeClass)(t.$attrs.class),style:(0,n.normalizeStyle)(o.value)},[(0,n.createElementVNode)(`span`,{class:(0,n.normalizeClass)(s.value),"data-icon":a.value},null,10,Pg)],6))]),_:1},8,[`color`,`size`])}}})),Ig=[`value`,`label`],Lg=(0,n.defineComponent)(V(V({},{name:`AbCheckbox`,inheritAttrs:!1}),{},{__name:`ab-checkbox`,props:{abFormInject:Object,modelValue:{type:Array,default:()=>[]},type:String,options:Array,input:Boolean,inputValue:String},emits:[`update:modelValue`,`fc.el`],setup(e,{emit:t}){let r=e,i=t,a=(0,n.ref)(),o=(0,n.computed)(()=>r.type===`button`?`ElCheckboxButton`:`ElCheckbox`),s=(0,n.toRef)(r,`modelValue`),c=(0,n.toRef)(r,`inputValue`,``),l=(0,n.ref)(c.value),u=(0,n.computed)(()=>{var e;let t=r.options||((e=r.abFormInject)==null?void 0:e.options)||[];return Array.isArray(t)?t:[]});(0,n.watch)(c,e=>{r.input?p(e):l.value=e}),(0,n.watch)(s,e=>{if(!c.value&&Array.isArray(e)&&e.length>0&&r.input){let t=u.value.map(e=>e.value),n=null;e.forEach(e=>{t.indexOf(e)===-1&&(n=e)}),n!=null&&(l.value=n)}},{immediate:!0});function d(e){let{value:t,label:n}=e;return up(e,Ig)}function f(e){i(`update:modelValue`,e)}function p(e){let t=[...pc(s.value)],n=t.indexOf(l.value);l.value=e,n>-1&&(t.splice(n,1),t.push(e),f(t))}return(0,n.onMounted)(()=>{i(`fc.el`,a.value)}),(t,r)=>{let i=(0,n.resolveComponent)(`el-input`),c=(0,n.resolveComponent)(`el-checkbox-group`);return(0,n.openBlock)(),(0,n.createBlock)(c,(0,n.mergeProps)(t.$attrs,{"model-value":s.value===null?void 0:s.value,"onUpdate:modelValue":f,ref_key:`el`,ref:a}),(0,n.createSlots)({default:(0,n.withCtx)(()=>[((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)(u.value,(e,t)=>((0,n.openBlock)(),(0,n.createBlock)((0,n.resolveDynamicComponent)(o.value),(0,n.mergeProps)({key:`${o.value}${t}-${e.value}`},{ref_for:!0},d(e),{label:e.value,value:e.value}),{default:(0,n.withCtx)(()=>[(0,n.createTextVNode)((0,n.toDisplayString)(e.label||e.value||``),1)]),_:2},1040,[`label`,`value`]))),128)),(0,n.renderSlot)(t.$slots,`default`),e.input?((0,n.openBlock)(),(0,n.createBlock)((0,n.resolveDynamicComponent)(o.value),{key:0,value:l.value||void 0,label:l.value||void 0},{default:(0,n.withCtx)(()=>[(0,n.createVNode)(i,{size:`small`,"model-value":l.value,"onUpdate:modelValue":p},null,8,[`model-value`])]),_:1},8,[`value`,`label`])):(0,n.createCommentVNode)(``,!0)]),_:2},[(0,n.renderList)(Object.keys(t.$slots).filter(e=>e!=="default"),e=>({name:e,fn:(0,n.withCtx)(r=>[(0,n.renderSlot)(t.$slots,e,(0,n.normalizeProps)((0,n.guardReactiveProps)(r==null?{}:r)))])}))]),1040,[`model-value`])}}})),Rg=[`value`,`label`],zg=(0,n.defineComponent)(V(V({},{name:`AbRadio`,inheritAttrs:!1}),{},{__name:`ab-radio`,props:{abFormInject:Object,modelValue:{type:[String,Number,Boolean],default:``},options:Array,type:String,input:Boolean,inputValue:String},emits:[`update:modelValue`,`fc.el`],setup(e,{emit:t}){let r=e,i=t,a=(0,n.ref)(),o=(0,n.computed)(()=>r.type===`button`?`ElRadioButton`:`ElRadio`),s=(0,n.toRef)(r,`modelValue`),c=(0,n.toRef)(r,`inputValue`,``),l=(0,n.ref)(c.value),u=(0,n.computed)(()=>{var e;let t=r.options||((e=r.abFormInject)==null?void 0:e.options)||[];return Array.isArray(t)?t:[]});(0,n.watch)(c,e=>{r.input?p(e):l.value=e}),(0,n.watch)(s,e=>{!c.value&&e!=null&&r.input&&!u.value.some(t=>t.value===e)&&(l.value=e)},{immediate:!0});function d(e){let{value:t,label:n}=e;return up(e,Rg)}function f(e){i(`update:modelValue`,e)}function p(e){let t=l.value;l.value=e,s.value===t&&f(e)}return(0,n.onMounted)(()=>{i(`fc.el`,a.value)}),(t,r)=>{let i=(0,n.resolveComponent)(`el-input`),c=(0,n.resolveComponent)(`el-radio-group`);return(0,n.openBlock)(),(0,n.createBlock)(c,(0,n.mergeProps)(t.$attrs,{"model-value":s.value,"onUpdate:modelValue":f,ref_key:`el`,ref:a}),(0,n.createSlots)({default:(0,n.withCtx)(()=>[((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)(u.value,(e,t)=>((0,n.openBlock)(),(0,n.createBlock)((0,n.resolveDynamicComponent)(o.value),(0,n.mergeProps)({key:`${o.value}${t}-${e.value}`},{ref_for:!0},d(e),{label:e.value,value:e.value}),{default:(0,n.withCtx)(()=>[(0,n.createTextVNode)((0,n.toDisplayString)(e.label||e.value||``),1)]),_:2},1040,[`label`,`value`]))),128)),(0,n.renderSlot)(t.$slots,`default`),e.input?((0,n.openBlock)(),(0,n.createBlock)((0,n.resolveDynamicComponent)(o.value),{key:0,checked:!1,value:l.value||void 0,label:l.value||void 0},{default:(0,n.withCtx)(()=>[(0,n.createVNode)(i,{size:`small`,"model-value":l.value,"onUpdate:modelValue":p},null,8,[`model-value`])]),_:1},8,[`value`,`label`])):(0,n.createCommentVNode)(``,!0)]),_:2},[(0,n.renderList)(Object.keys(t.$slots).filter(e=>e!=="default"),e=>({name:e,fn:(0,n.withCtx)(r=>[(0,n.renderSlot)(t.$slots,e,(0,n.normalizeProps)((0,n.guardReactiveProps)(r==null?{}:r)))])}))]),1040,[`model-value`])}}})),Bg={class:`p-option__left`},Vg={class:`p-option__right`},Hg={class:`p-option__left`},Ug={key:0,class:`p-option__right`},Wg={key:1,class:`p-option__right`},Gg=(0,n.defineComponent)(V(V({},{name:`AbSelect`,inheritAttrs:!1}),{},{__name:`ab-select`,props:{abFormInject:Object,modelValue:{type:[Array,String,Number,Boolean,Object],default:void 0},type:String,showValue:Boolean,showKey:Boolean,showCode:Boolean},emits:[`update:modelValue`,`fc.el`],setup(e,{emit:t}){let r=e,i=t,a=(0,n.ref)(),o=(0,n.toRef)(r,`modelValue`),s=(0,n.computed)(()=>{var e;let t=(e=r.abFormInject)==null?void 0:e.options;return Array.isArray(t)?t:[]}),{wsCache:c}=R(),l=(0,n.computed)(()=>c.getCurrentSize||`default`);function u(e){i(`update:modelValue`,e)}return(0,n.onMounted)(()=>{i(`fc.el`,a.value)}),(t,r)=>{let i=(0,n.resolveComponent)(`el-option`),c=(0,n.resolveComponent)(`el-option-group`),d=(0,n.resolveComponent)(`el-select`);return(0,n.openBlock)(),(0,n.createBlock)(d,(0,n.mergeProps)(t.$attrs,{"model-value":o.value,"onUpdate:modelValue":u,ref_key:`el`,ref:a}),{default:(0,n.withCtx)(()=>[((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)(s.value,(t,r)=>{var a,o;return(0,n.openBlock)(),(0,n.createElementBlock)(n.Fragment,null,[(0,n.unref)(G)(t,`options`)?((0,n.openBlock)(),(0,n.createBlock)(c,{label:t.label,key:`${r}-${t.label}`},{default:(0,n.withCtx)(()=>[((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)((0,n.unref)(W).trueArray(t.options)?t.options:[],(e,t)=>((0,n.openBlock)(),(0,n.createBlock)(i,(0,n.mergeProps)({key:`${t}-${e.value}`},{ref_for:!0},e),null,16))),128))]),_:2},1032,[`label`])):((0,n.openBlock)(),(0,n.createElementBlock)(n.Fragment,{key:1},[e.showValue?((0,n.openBlock)(),(0,n.createBlock)(i,{key:0,label:t==null?void 0:t.label,value:t==null?void 0:t.value,class:(0,n.normalizeClass)((a=t==null?void 0:t.class)==null?``:a)},{default:(0,n.withCtx)(()=>[(0,n.createElementVNode)(`span`,Bg,(0,n.toDisplayString)(t==null?void 0:t.label),1),(0,n.createElementVNode)(`span`,Vg,(0,n.toDisplayString)(t==null?void 0:t.value),1)]),_:2},1032,[`label`,`value`,`class`])):e.showKey||e.showCode?((0,n.openBlock)(),(0,n.createBlock)(i,{key:1,label:t==null?void 0:t.label,value:t==null?void 0:t.value,size:l.value,class:(0,n.normalizeClass)((o=t==null?void 0:t.class)==null?``:o)},{default:(0,n.withCtx)(()=>[(0,n.createElementVNode)(`span`,Hg,(0,n.toDisplayString)(t==null?void 0:t.label),1),e.showKey?((0,n.openBlock)(),(0,n.createElementBlock)(`span`,Ug,(0,n.toDisplayString)(t==null?void 0:t.key),1)):(0,n.createCommentVNode)(``,!0),e.showCode?((0,n.openBlock)(),(0,n.createElementBlock)(`span`,Wg,(0,n.toDisplayString)(t==null?void 0:t.code),1)):(0,n.createCommentVNode)(``,!0)]),_:2},1032,[`label`,`value`,`size`,`class`])):((0,n.openBlock)(),(0,n.createBlock)(i,{key:2,label:t==null?void 0:t.label,value:t==null?void 0:t.value},null,8,[`label`,`value`]))],64))],64)}),256)),(0,n.renderSlot)(t.$slots,`default`)]),_:3},16,[`model-value`])}}})),Kg=(0,n.defineComponent)({name:`abTree`,inheritAttrs:!1,abFormParser:{mergeProp(e){let t=e.prop.props;t.nodeKey||(t.nodeKey=`id`),t.props||(t.props={label:`title`})}},props:{type:String,modelValue:{type:[Array,String,Number],default:()=>[]}},emits:[`update:modelValue`,`fc.el`],watch:{modelValue(){this.setValue()}},methods:{updateValue(){if(!this.$refs.tree)return;let e;e=this.type===`selected`?this.$refs.tree.getCurrentKey():this.$refs.tree.getCheckedKeys(),this.$emit(`update:modelValue`,e)},setValue(){this.$refs.tree&&(this.type===`selected`?this.$refs.tree.setCurrentKey(this.modelValue):this.$refs.tree.setCheckedKeys(pc(this.modelValue)))}},render(){return(0,n.createVNode)((0,n.resolveComponent)(`ElTree`),(0,n.mergeProps)(this.$attrs,{ref:`tree`,onCheck:this.updateValue,onNodeClick:this.updateValue}),this.$slots)},mounted(){this.setValue(),this.$emit(`fc.el`,this.$refs.tree)}}),qg=(0,n.defineComponent)(V(V({},{name:`AbTimePicker`,inheritAttrs:!1}),{},{__name:`ab-time-picker`,props:{modelValue:{}},emits:[`update:modelValue`,`fc.el`],setup(e,{emit:t}){let r=e,i=t,a=(0,n.ref)(),o=(0,n.ref)(r.modelValue);(0,n.watch)(()=>r.modelValue,e=>o.value=e);let{wsCache:s}=R(),c=(0,n.computed)(()=>s.getCurrentSize||`default`);function l(e){i(`update:modelValue`,e)}return(0,n.onMounted)(()=>{i(`fc.el`,a.value)}),(e,t)=>{let r=(0,n.resolveComponent)(`el-time-picker`);return(0,n.openBlock)(),(0,n.createBlock)(r,(0,n.mergeProps)({ref_key:`el`,ref:a},e.$attrs,{modelValue:o.value,"onUpdate:modelValue":t[0]||(t[0]=e=>o.value=e),size:c.value,onChange:l}),null,16,[`modelValue`,`size`])}}})),Jg=(0,n.defineComponent)(V(V({},{name:`AbColorPicker`,inheritAttrs:!1}),{},{__name:`ab-color-picker`,props:{modelValue:{}},emits:[`update:modelValue`,`fc.el`],setup(e,{emit:t}){let r=e,i=t,a=(0,n.ref)(),o=(0,n.ref)(r.modelValue);(0,n.watch)(()=>r.modelValue,e=>o.value=e);let{wsCache:s}=R(),c=(0,n.computed)(()=>s.getCurrentSize||`default`);function l(e){i(`update:modelValue`,e)}return(0,n.onMounted)(()=>{i(`fc.el`,a.value)}),(e,t)=>{let r=(0,n.resolveComponent)(`el-color-picker`);return(0,n.openBlock)(),(0,n.createBlock)(r,(0,n.mergeProps)({ref_key:`el`,ref:a,class:`ab-color-picker`},e.$attrs,{modelValue:o.value,"onUpdate:modelValue":t[0]||(t[0]=e=>o.value=e),size:c.value,onChange:l}),null,16,[`modelValue`,`size`])}}})),Yg={class:`ab-input-range`},Xg={key:0,class:`range-prefix`},Zg={key:3,class:`range-suffix`},Qg=(0,n.defineComponent)(V(V({},{name:`AbInputRange`}),{},{__name:`ab-input-range`,props:(0,n.mergeModels)({abFormInject:{},prefix:{},suffix:{},clearable:{type:Boolean,default:!0},readonly:{type:Boolean}},{modelValue:{},modelModifiers:{}}),emits:(0,n.mergeModels)([`change`],[`update:modelValue`]),setup(e,{emit:t}){let r=t,i=e,{t:a}=z(),o=(0,n.useModel)(e,`modelValue`),s=(0,n.computed)(()=>{var e,t,n,r;return[(e=(t=o.value)==null?void 0:t[0])==null?null:e,(n=(r=o.value)==null?void 0:r[1])==null?null:n]}),c=(0,n.computed)(()=>{var e;return i.readonly===!0||((e=i.abFormInject)==null?void 0:e.readonly)===!0});function l(e,t){let n=[...s.value];return n[e]=t===``?null:t,n}function u(e,t){o.value=l(e,t)}let{wsCache:d}=R(),f=(0,n.computed)(()=>d.getCurrentSize||`default`);return(t,i)=>{var o,d;let p=(0,n.resolveComponent)(`el-text`),m=(0,n.resolveComponent)(`el-input`);return(0,n.openBlock)(),(0,n.createElementBlock)(`div`,Yg,[e.prefix?((0,n.openBlock)(),(0,n.createElementBlock)(`span`,Xg,(0,n.toDisplayString)(e.prefix),1)):(0,n.createCommentVNode)(``,!0),c.value?((0,n.openBlock)(),(0,n.createElementBlock)(n.Fragment,{key:1},[(0,n.createVNode)(p,{class:`ab-input-range__val`},{default:(0,n.withCtx)(()=>[(0,n.createTextVNode)((0,n.toDisplayString)(s.value[0]),1)]),_:1}),i[4]||(i[4]=(0,n.createElementVNode)(`span`,{class:`range-splitter`},` ~ `,-1)),(0,n.createVNode)(p,{class:`ab-input-range__val`},{default:(0,n.withCtx)(()=>[(0,n.createTextVNode)((0,n.toDisplayString)(s.value[1]),1)]),_:1})],64)):((0,n.openBlock)(),(0,n.createElementBlock)(n.Fragment,{key:2},[(0,n.createVNode)(m,{"model-value":(o=s.value[0])==null?``:o,size:f.value,placeholder:(0,n.unref)(a)(`min`),clearable:e.clearable,class:`ab-input-range__val`,"onUpdate:modelValue":i[0]||(i[0]=e=>u(0,e)),onChange:i[1]||(i[1]=e=>r(`change`,l(0,e)))},null,8,[`model-value`,`size`,`placeholder`,`clearable`]),i[5]||(i[5]=(0,n.createElementVNode)(`span`,{class:`range-splitter`},` ~ `,-1)),(0,n.createVNode)(m,{"model-value":(d=s.value[1])==null?``:d,size:f.value,placeholder:(0,n.unref)(a)(`max`),clearable:e.clearable,class:`ab-input-range__val`,"onUpdate:modelValue":i[2]||(i[2]=e=>u(1,e)),onChange:i[3]||(i[3]=e=>r(`change`,l(1,e)))},null,8,[`model-value`,`size`,`placeholder`,`clearable`])],64)),e.suffix?((0,n.openBlock)(),(0,n.createElementBlock)(`span`,Zg,(0,n.toDisplayString)(e.suffix),1)):(0,n.createCommentVNode)(``,!0)])}}})),$g={class:`ab-time-period w-full`},e_={class:`start-time`},t_={key:0},n_={class:`end-time`},r_=(0,n.defineComponent)(V(V({},{name:`AbTimePeriod`}),{},{__name:`ab-time-period`,props:(0,n.mergeModels)({abFormInject:{},startTime:{default:`08:00`},endTime:{default:`18:00`},readonly:{type:Boolean}},{modelValue:{},modelModifiers:{}}),emits:(0,n.mergeModels)([`change`],[`update:modelValue`]),setup(e,{emit:t}){let r=t,i=e,a=(0,n.useModel)(e,`modelValue`),o=(0,n.computed)(()=>{var e;return i.readonly===!0||((e=i.abFormInject)==null?void 0:e.readonly)===!0}),{t:s}=z();function c(e){let t=/^(\d{1,2}):(\d{2})(?::(\d{2}))?$/.exec(e.trim()),n=t?Number(t[1]):NaN,r=t?Number(t[2]):NaN,i=t!=null&&t[3]?Number(t[3]):0;if(!t||n>24||r>59||i>59||n===24&&(r!==0||i!==0))throw TypeError(`Invalid time "${e}": expected HH:mm or HH:mm:ss between 00:00 and 24:00.`);return n*3600+r*60+i}function l(e){let t=Math.floor(e/3600),n=Math.floor(e%3600/60),r=e%60,i=`${String(t).padStart(2,`0`)}:${String(n).padStart(2,`0`)}`;return r?`${i}:${String(r).padStart(2,`0`)}`:i}let u=(0,n.computed)(()=>{let e=c(i.startTime),t=c(i.endTime);if(e>=t)throw RangeError(`timePeriod requires startTime before endTime.`);return[e,t]}),d=(0,n.computed)(()=>{var e,t,n,r,i,o;return[((e=a.value)==null?void 0:e[0])===``||(t=(n=a.value)==null?void 0:n[0])==null?null:t,((r=a.value)==null?void 0:r[1])===``||(i=(o=a.value)==null?void 0:o[1])==null?null:i]}),f=(0,n.computed)(()=>{let[e,t]=u.value,n=d.value[0]===null?e:c(d.value[0]),r=d.value[1]===null?t:c(d.value[1]);if(d.value[0]!==null&&d.value[1]!==null&&n>r)throw RangeError(`timePeriod start value must be before or equal to end value.`);return[n,r]});(0,n.computed)(()=>f.value.some(e=>e<u.value[0]||e>u.value[1]));let p=(0,n.computed)(()=>{let e=e=>Math.min(u.value[1],Math.max(u.value[0],e));return[e(f.value[0]),e(f.value[1])]});function m(e){if(!Array.isArray(e)||e.length!==2)throw TypeError(`timePeriod slider must provide a pair of values.`);return[d.value[0]!==null&&e[0]===p.value[0]?d.value[0]:l(e[0]),d.value[1]!==null&&e[1]===p.value[1]?d.value[1]:l(e[1])]}function h(e){a.value=m(e)}function g(e){r(`change`,m(e))}return(e,t)=>{var r,i;let a=(0,n.resolveComponent)(`el-slider`);return(0,n.openBlock)(),(0,n.createElementBlock)(`div`,$g,[(0,n.createElementVNode)(`div`,e_,(0,n.toDisplayString)((r=d.value[0])==null?`--:--`:r),1),o.value?((0,n.openBlock)(),(0,n.createElementBlock)(`div`,t_,`~`)):((0,n.openBlock)(),(0,n.createBlock)(a,{key:1,class:(0,n.normalizeClass)({"is-empty":d.value[0]==null&&d.value[1]==null}),"model-value":p.value,range:``,step:30,min:u.value[0],max:u.value[1],"format-tooltip":l,"format-value-text":l,"onUpdate:modelValue":h,onChange:g},null,8,[`class`,`model-value`,`min`,`max`])),(0,n.createElementVNode)(`div`,n_,(0,n.toDisplayString)((i=d.value[1])==null?`--:--`:i),1)])}}})),i_=Symbol(`archbiz-upload-apis`);function a_(e){if(typeof e==`number`&&Number.isFinite(e)||typeof e==`string`&&e.trim()&&e!==`new`)return e}function o_(e){let t=e.split(/[?#]/,1)[0].split(`/`).pop()||e;try{return decodeURIComponent(t)}catch(e){if(e instanceof URIError)return t;throw e}}var s_={class:`ab-upload-file`},c_={key:1,role:`alert`},l_={class:`ab-upload-file__list`},u_={key:0},d_={key:1,role:`alert`},f_=(0,n.defineComponent)(V(V({},{name:`AbUploadFile`}),{},{__name:`ab-upload-file`,props:{modelValue:{},apis:{},abFormInject:{},idFieldTable:{},businessCode:{},fileType:{default:()=>[`doc`,`xls`,`txt`,`pdf`]},fileSize:{default:5},limit:{default:5},drag:{type:Boolean},isShowTip:{type:Boolean,default:!0},readonly:{type:Boolean},disabled:{type:Boolean},delEnabled:{type:Boolean,default:!0},preEnabled:{type:Boolean,default:!0},dowEnabled:{type:Boolean,default:!0},coverEnabled:{type:Boolean},autoCover:{type:Boolean}},emits:[`update:modelValue`,`preview`,`error`,`reload`],setup(e,{expose:t,emit:r}){let i=e,a=r,{t:o}=z(),s=yl(),c=(0,n.inject)(i_,void 0);function l(){var e;let t=(e=i.apis)==null?c:e;if(!t)throw Error(`Upload APIs are not configured. Pass upload to setupArchbizKit or apis to the component.`);return t}l();let u=(0,n.computed)(()=>{var e;return i.disabled||i.readonly||((e=i.abFormInject)==null?void 0:e.readonly)===!0}),d=(0,n.computed)(()=>{var e;let t=i.abFormInject;return a_(t!=null&&t.idField?(e=t.formValue)==null?void 0:e[t.idField]:void 0)}),f=(0,n.ref)([]),p=(0,n.ref)(``),m=(0,n.ref)(!1),h=(0,n.ref)(!1),g=new Set,_=1,v=0,y=0,b,x;function S(e){var t,n;return{businessType:(t=i.idFieldTable)==null?(n=i.abFormInject)==null?void 0:n.idFieldTable:t,businessCode:i.businessCode,businessId:e}}function C(e){s.error(e instanceof Error?e.message:String(e)),a(`error`,e)}function w(){a(`update:modelValue`,f.value.flatMap(e=>e.url?[e.url]:[]))}function T(e){let t=e.name.includes(`.`)?e.name.slice(e.name.lastIndexOf(`.`)+1).toLowerCase():``;return{url:e.url,name:e.name,extension:t,fileId:e.fileId}}function E(e){return/\.(png|jpe?g|gif|webp|bmp|svg)$/i.test(e)}let D=e=>{if(f.value.length+y>=i.limit)return s.error(o(`upload.tooMany`)),!1;let t=e.name.includes(`.`)?e.name.slice(e.name.lastIndexOf(`.`)+1).toLowerCase():``;return i.fileType.length&&!i.fileType.some(e=>e.toLowerCase().replace(/^\./,``)===t)?(s.error(o(`upload.invalidType`)),!1):e.size>i.fileSize*1024*1024?(s.error(o(`upload.tooLarge`)),!1):(y++,!0)};function ee(e){y=Math.max(0,y-1);let t=v,r=(0,n.reactive)({uid:_++,name:e.file.name,status:`uploading`});f.value.push(r);let i=H(function*(){try{let n=yield l().upload({file:e.file}),i=n==null?void 0:n.data;if(!i||i.id==null||typeof i.url!=`string`||!i.url||typeof i.name!=`string`||!i.name)throw TypeError(`Upload API must return data with id, name and url.`);if(t!==v)return;Object.assign(r,{fileId:i.id,url:i.url,name:i.name,size:i.size,status:`pending`}),w()}catch(e){throw t===v&&(r.status=`failed`,r.error=e instanceof Error?e.message:String(e)),e}})();return g.add(i),i.then(()=>{g.delete(i),t===v&&d.value!==void 0&&M()},()=>{g.delete(i)}),i}let O=e=>C(e);function te(){return k.apply(this,arguments)}function k(){return k=H(function*(){yield Promise.allSettled([...g]);let e=f.value.find(e=>e.status===`failed`);if(e)throw Error(e.error||o(`upload.failed`))}),k.apply(this,arguments)}function A(e,t){return ne.apply(this,arguments)}function ne(){return ne=H(function*(e,t){if(x&&(yield x),yield Promise.allSettled([...g]),t!==v||d.value!==e)return;let n=f.value.filter(e=>e.status===`pending`&&e.fileId!=null);if(n.length)try{if(yield l().attach(V(V({},S(e)),{},{fileIds:n.map(e=>e.fileId),isCover:i.autoCover&&n.length===1&&E(n[0].name)?1:0})),t!==v||d.value!==e)return;n.forEach(e=>{e.status=`recent`,e.error=void 0})}catch(r){throw t===v&&d.value===e&&n.forEach(e=>{e.error=r instanceof Error?r.message:String(r)}),r}let r=yield l().list(V(V({},S(e)),{},{pageSize:1e3}));if(!r||!Array.isArray(r.list))throw TypeError(`Upload list API must return a list array.`);if(t!==v||d.value!==e)return;if(r.list.some(e=>!e||e.fileId==null||typeof e.name!=`string`||!e.name||typeof e.url!=`string`||!e.url))throw TypeError(`Upload list entries must have fileId, name and url.`);let a=f.value.filter(e=>e.status!==`linked`&&e.status!==`recent`),o=r.list.map(e=>({uid:_++,id:e.id,fileId:e.fileId,name:e.name,url:e.url,size:e.size,isCover:e.isCover,status:`linked`})),s=f.value.filter(e=>e.status===`recent`&&!o.some(t=>t.fileId===e.fileId));f.value=[...o,...s,...a],p.value=``,w()}),ne.apply(this,arguments)}function j(){let e=d.value;if(e===void 0)return Promise.reject(Error(o(`upload.missingBusinessId`)));if(b)return b.then(()=>j());let t=A(e,v);return b=t,m.value=!0,t.then(()=>{b===t&&(b=void 0,m.value=!1)},()=>{b===t&&(b=void 0,m.value=!1)}),t}function M(){let e=v;j().catch(t=>{e===v&&(p.value=t instanceof Error?t.message:String(t),C(t))})}function N(){return re.apply(this,arguments)}function re(){return re=H(function*(){yield te(),yield j()}),re.apply(this,arguments)}function ie(){M()}function ae(e){h.value=!0;let t=e();x=t,t.then(()=>{x===t&&(x=void 0,h.value=!1)},()=>{x===t&&(x=void 0,h.value=!1)}),t.catch(C)}function oe(e){ae(H(function*(){let t=v;if(e.status===`linked`&&d.value!==void 0||e.status===`recent`){let t=d.value;if(t===void 0||e.fileId==null)throw Error(o(`upload.missingBusinessId`));yield l().remove(V(V({},S(t)),{},{fileId:e.fileId}))}t===v&&(f.value=f.value.filter(t=>t.uid!==e.uid),w(),a(`reload`))}))}function se(e){ae(H(function*(){let t=v;if(e.id==null)throw Error(o(`upload.missingBusinessId`));let n=+!e.isCover;yield l().setCover(e.id,n),t===v&&(e.isCover=n,a(`reload`))}))}return(0,n.watch)(()=>i.modelValue,e=>{let t=e==null?[]:e,n=f.value,r=[...n],i=t.map(e=>{let t=r.findIndex(t=>t.url===e);return t>=0?r.splice(t,1)[0]:{uid:_++,name:o_(e),url:e,status:`linked`}});f.value=[...i,...n.filter(e=>e.status===`uploading`||e.status===`failed`)]},{immediate:!0,deep:!0}),(0,n.watch)(d,(e,t)=>{if(t!==void 0&&e!==t){var n;v++,b=void 0,m.value=!1,p.value=``,f.value=((n=i.modelValue)==null?[]:n).map(e=>({uid:_++,name:o_(e),url:e,status:`linked`}))}e!==void 0&&M()},{immediate:!0}),(0,n.onBeforeUnmount)(()=>{v++}),t({waitForUploads:te,waitForAssociations:N,retryAssociations:ie}),(t,r)=>{let i=(0,n.resolveComponent)(`el-button`),s=(0,n.resolveComponent)(`el-upload`),c=(0,n.resolveComponent)(`el-link`);return(0,n.openBlock)(),(0,n.createElementBlock)(`div`,s_,[u.value?(0,n.createCommentVNode)(``,!0):((0,n.openBlock)(),(0,n.createBlock)(s,{key:0,"show-file-list":!1,drag:e.drag,multiple:e.limit>1,accept:e.fileType.map(e=>`.${e.replace(/^\./,``)}`).join(`,`),"before-upload":D,"http-request":ee,"on-error":O},(0,n.createSlots)({default:(0,n.withCtx)(()=>[(0,n.createVNode)(i,{type:`primary`},{default:(0,n.withCtx)(()=>[(0,n.createTextVNode)((0,n.toDisplayString)((0,n.unref)(o)(`upload.select`)),1)]),_:1})]),_:2},[e.isShowTip?{name:`tip`,fn:(0,n.withCtx)(()=>[(0,n.createElementVNode)(`div`,null,(0,n.toDisplayString)((0,n.unref)(o)(`upload.tip`))+`: `+(0,n.toDisplayString)(e.fileType.join(`/`))+`; `+(0,n.toDisplayString)(e.fileSize)+` MB`,1)]),key:`0`}:void 0]),1032,[`drag`,`multiple`,`accept`])),p.value?((0,n.openBlock)(),(0,n.createElementBlock)(`div`,c_,[(0,n.createTextVNode)((0,n.toDisplayString)(p.value)+` `,1),u.value?(0,n.createCommentVNode)(``,!0):((0,n.openBlock)(),(0,n.createBlock)(i,{key:0,link:``,onClick:ie},{default:(0,n.withCtx)(()=>[(0,n.createTextVNode)((0,n.toDisplayString)((0,n.unref)(o)(`upload.retry`)),1)]),_:1}))])):(0,n.createCommentVNode)(``,!0),(0,n.createElementVNode)(`ul`,l_,[((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)(f.value,t=>((0,n.openBlock)(),(0,n.createElementBlock)(`li`,{key:t.uid,class:`ab-upload-file__item`},[(0,n.createElementVNode)(`span`,null,(0,n.toDisplayString)(t.name),1),t.status===`uploading`?((0,n.openBlock)(),(0,n.createElementBlock)(`span`,u_,(0,n.toDisplayString)((0,n.unref)(o)(`upload.uploading`)),1)):(0,n.createCommentVNode)(``,!0),t.error?((0,n.openBlock)(),(0,n.createElementBlock)(`span`,d_,(0,n.toDisplayString)(t.error),1)):(0,n.createCommentVNode)(``,!0),t.url&&e.preEnabled?((0,n.openBlock)(),(0,n.createBlock)(i,{key:2,link:``,onClick:e=>a(`preview`,T(t))},{default:(0,n.withCtx)(()=>[(0,n.createTextVNode)((0,n.toDisplayString)((0,n.unref)(o)(`upload.preview`)),1)]),_:1},8,[`onClick`])):(0,n.createCommentVNode)(``,!0),t.url&&e.dowEnabled?((0,n.openBlock)(),(0,n.createBlock)(c,{key:3,href:t.url,target:`_blank`,download:``},{default:(0,n.withCtx)(()=>[(0,n.createTextVNode)((0,n.toDisplayString)((0,n.unref)(o)(`upload.download`)),1)]),_:1},8,[`href`])):(0,n.createCommentVNode)(``,!0),!u.value&&e.coverEnabled&&t.id!=null&&E(t.name)?((0,n.openBlock)(),(0,n.createBlock)(i,{key:4,disabled:m.value||h.value,link:``,onClick:e=>se(t)},{default:(0,n.withCtx)(()=>[(0,n.createTextVNode)((0,n.toDisplayString)(t.isCover?(0,n.unref)(o)(`upload.unsetCover`):(0,n.unref)(o)(`upload.setCover`)),1)]),_:2},1032,[`disabled`,`onClick`])):(0,n.createCommentVNode)(``,!0),!u.value&&t.status===`pending`&&t.error?((0,n.openBlock)(),(0,n.createBlock)(i,{key:5,link:``,onClick:ie},{default:(0,n.withCtx)(()=>[(0,n.createTextVNode)((0,n.toDisplayString)((0,n.unref)(o)(`upload.retry`)),1)]),_:1})):(0,n.createCommentVNode)(``,!0),!u.value&&e.delEnabled&&t.status!==`uploading`?((0,n.openBlock)(),(0,n.createBlock)(i,{key:6,disabled:m.value||h.value,link:``,onClick:e=>oe(t)},{default:(0,n.withCtx)(()=>[(0,n.createTextVNode)((0,n.toDisplayString)((0,n.unref)(o)(`upload.delete`)),1)]),_:1},8,[`disabled`,`onClick`])):(0,n.createCommentVNode)(``,!0)]))),128))])])}}})),p_=[Fg,Lg,zg,Gg,Kg,qg,Jg,Qg,r_,f_],m_={date:`YYYY-MM-DD`,month:`YYYY-MM`,week:`YYYY-wo`,datetime:`YYYY-MM-DD HH:mm:ss`,timerange:`HH:mm:ss`,daterange:`YYYY-MM-DD`,monthrange:`YYYY-MM`,datetimerange:`YYYY-MM-DD HH:mm:ss`,year:`YYYY`},h_=`datePicker`,g_={name:h_,maker:[`year`,`month`,`date`,`dates`,`week`,`datetime`,`datetimeRange`,`dateRange`,`monthRange`].reduce((e,t)=>(e[t]=$(h_,{type:t.toLowerCase()}),e),{}),mergeProp(e){let t=e.prop.props;if(!t.valueFormat){var n;t.valueFormat=m_[(n=t.type)==null?``:n]||m_.date}}},__=`hidden`,v_={name:__,maker:{[__]:(e,t)=>$(__)(``,e,t)},render(){return[]}},y_=`input`,b_=[`password`,`url`,`email`,`text`,`textarea`].reduce((e,t)=>(e[t]=$(y_,{type:t}),e),{});b_.idate=$(y_,{type:`date`});var x_={name:y_,maker:b_,mergeProp(e){let{props:t}=e.prop;t!=null&&t.autosize&&typeof t.autosize==`object`&&t.autosize.minRows&&(t.rows=t.autosize.minRows||2)}},S_={name:`inputNumber`},C_={name:`textarea`,mergeProp(e){let{props:t}=e.prop;t.type=`textarea`,t.autosize&&typeof t.autosize==`object`&&t.autosize.minRows&&(t.rows=t.autosize.minRows||2)}},w_=`slider`,T_={name:w_,maker:{sliderRange:$(w_,{range:!0})},toFormValue(e,t){let n=Array.isArray(e),r=t.prop.props,i=r.min||0,a;return a=r.range===!0?n?e:[i,parseFloat(e)||i]:n?parseFloat(e[0])||i:parseFloat(e),a}},E_=`timePicker`,D_={name:E_,maker:{time:$(E_,e=>e.props.isRange=!1),timeRange:$(E_,e=>e.props.isRange=!0)},mergeProp(e){let t=e.prop.props;t.valueFormat||(t.valueFormat=`HH:mm:ss`)}},O_={name:`FcRow`,render(e,t){return t.vNode.col({props:{span:24}},{default:()=>[t.vNode.row(t.prop,e)]})}},k_={name:`select`,toFormValue(e,t){return t.prop.props.multiple&&!Array.isArray(e)?pc(e):e}},A_=V(V({},k_),{},{name:`treeSelect`}),j_={name:`text`,render(e,r){let i=r.$handle.api.getValue(r.field),a=ol(r.prop).formatter,o=typeof a==`function`?a({cellValue:i,column:r.rule,row:r.$handle.api.formData()}):i,s=String(o==null?``:o);return Sl(r.prop.link)?(0,n.h)(Dl,{link:r.prop.link,value:i,row:r.$handle.api.formData()},{default:()=>s}):(0,n.h)(t.ElText,null,{default:()=>s})}},M_={name:`radio`},N_=V(V({},M_),{},{name:`checkbox`}),P_=[g_,v_,x_,S_,V(V({},S_),{},{name:`number`}),V(V({},S_),{},{name:`inputCurrency`}),V(V({},S_),{},{name:`inputPercent`}),j_,C_,T_,D_,O_,k_,A_,M_,N_,{name:`switch`},{name:`cascader`},{name:`colorPicker`,render(e,t){var r;if((t==null||(r=t.$handle)==null||(r=r.vm)==null||(r=r.props)==null?void 0:r.readonly)===!0){let e=t.$handle.api.getValue(t.field),r=typeof e==`string`?e:void 0;return(0,n.h)(`span`,{class:`ab-color-picker__readonly`,style:{backgroundColor:r,color:r?Ec.getContrast(r):bc.black},title:r},String(e==null?``:e))}return t.$render.defaultRender(t,e)}}],F_={input:`el-input`,number:`el-input-number`,inputNumber:`el-input-number`,inputCurrency:`el-input-number`,inputPercent:`el-input-number`,inputRange:`ab-input-range`,text:`el-text`,divider:`el-divider`,select:`ab-select`,treeSelect:`el-tree-select`,datePicker:`el-date-picker`,timePicker:`ab-time-picker`,cascader:`el-cascader`,colorPicker:`ab-colorPicker`,timePeriod:`ab-time-period`,uploadFile:`ab-upload-file`,textarea:`el-input`,button:`el-button`,icon:`ab-icon`,slider:`el-slider`,rate:`el-rate`,upload:`ab-upload`,popover:`el-popover`,tooltip:`el-tooltip`,timeSelect:`el-time-select`,switch:`el-switch`,checkbox:`ab-checkbox`,radio:`ab-radio`,formItem:`el-form-item`,form:`el-form`,frame:`ab-frame`,col:`el-col`,row:`el-row`,tree:`ab-tree`,inputTag:`el-input-tag`,inputOtp:`el-input-otp`,mention:`el-mention`,transfer:`el-transfer`,autoComplete:`el-autocomplete`,auto:`el-autocomplete`,group:`ab-group`,array:`ab-group`,object:`ab-sub-form`,subForm:`ab-sub-form`};function I_(){return{form:{inline:!0,labelPosition:`right`,labelWidth:`120px`,fieldWidth:`238px`,disabled:!1,size:void 0},row:{show:!1,gutter:0},submitBtn:{type:`primary`,loading:!1,disabled:!1,innerText:``,show:!1,col:void 0,click:void 0},resetBtn:{type:`default`,loading:!1,disabled:!1,innerText:``,show:!1,col:void 0,click:void 0}}}var L_=[`children`],{t:R_}=z(),z_=new Set([`input`,`inputnumber`,`textarea`,`password`,`inputtag`]),B_=new Set([`select`,`datepicker`,`timepicker`,`treeselect`,`cascader`,`autocomplete`]);function V_(e){return e.type===`tooltip`}function H_(e,t){G(e,t)&&W.String(e[t])&&(e[t]={[t]:e[t],show:!0})}function U_(e){return e===!1}function W_(e,t){G(e,t)&&!W.Object(e[t])&&(e[t]={show:!!e[t]})}function G_(e){let t=V({},e);return delete t.children,t}var K_={validate(){let e=this.form();return e?e.validate():new Promise(e=>e())},validateField(e){return new Promise((t,n)=>{let r=this.form();r?r.validateField(e,(e,r)=>{r?n(r):t(e)}):t(void 0)})},clearValidateState(e){let t=this.vm.refs[e.wrapRef];t&&t.clearValidate()},fieldChange(e,t,n,r){if(!r){var i;(i=this.vm.refs[e.wrapRef])==null||(i=i.validate(`change`))==null||i.catch(()=>{})}},tidyOptions(e){return[`submitBtn`,`resetBtn`,`row`,`info`,`wrap`,`col`,`title`].forEach(t=>{W_(e,t)}),e},tidyRule({prop:e}){return H_(e,`title`),H_(e,`info`),e},mergeProp(e){var t,n,r,i;let a=hp(V(V({},e.rule),e.prop),{includeChildren:((t=this.$handle)==null||(t=t.vm)==null||(t=t.props)==null?void 0:t.readonly)!==!0}),{children:o}=a,s=up(a,L_);Object.assign(e.prop,s),o!==e.rule.children&&(e.rule.children=o);let c=String(e.rule.type||e.type||``).replace(/[-_]/g,``).toLowerCase(),l=(n=(r=e.refRule)==null||(r=r.__$title)==null?void 0:r.value)==null?typeof e.rule.title==`object`?(i=e.rule.title)==null?void 0:i.title:e.rule.title:n;if((z_.has(c)||B_.has(c))&&l!=null&&l!==``){var u;(u=e.prop).props||(u.props={}),this.$handle.api.getLocale();let t=B_.has(c)?R_(`pleaseSelect`):R_(`pleaseEnter`);G(e.prop.props,`placeholder`)||(e.prop.props.placeholder=`${t}${hc(l)}`);let n=String(e.prop.props.type||``).toLowerCase();c!==`datepicker`&&c!==`timepicker`||!n.endsWith(`range`)&&e.prop.props.isRange!==!0||(G(e.prop.props,`startPlaceholder`)||(e.prop.props.startPlaceholder=`${t}${R_(`rangeStart`)}${hc(l)}`),G(e.prop.props,`endPlaceholder`)||(e.prop.props.endPlaceholder=`${t}${R_(`rangeEnd`)}${hc(l)}`))}let d={info:{trigger:`hover`,placement:`top-start`,icon:!0},title:{},col:{span:24},wrap:{}};[`info`,`wrap`,`col`,`title`].forEach(t=>{e.prop[t]=ac([this.options[t]||{},e.prop[t]||{}],d[t])})},getDefaultOptions(){return I_()},update(){let e=this.options.form,t=V({},e);delete t.fieldWidth,this.rule={props:V({},t),on:{submit:e=>{e.preventDefault()}},style:e.style,type:`form`}},beforeRender(){let{key:e,ref:t,$handle:n}=this,r=this.options.form;K(this.rule,{key:e,ref:t,class:[r.className,r.class,`ab-form`,this.$handle.preview?`is-preview`:``]}),K(this.rule.props,{model:n.formData})},render(e){return e.slotLen()&&!this.$handle.preview&&e.setSlot(void 0,()=>this.makeFormBtn()),this.$r(this.rule,U_(this.options.row.show)?e.getSlots():[this.makeRow(e)])},makeWrap(e,t){var n;let r=e.prop,i=`${this.key}${e.key}`,a=r.col,o=this.isTitle(r)&&r.wrap.title!==!1,s=!(a!=null&&a.labelWidth)&&!o?0:a==null?void 0:a.labelWidth,c=e.input?(n=this.options.form)==null?void 0:n.fieldWidth:``,{inline:l,col:u}=this.rule.props,d=r.wrap.class;delete r.wrap.class,delete r.wrap.title;let f=(W.Undef(r.wrap.show)?!e.input:U_(r.wrap.show))?t:this.$r(ac([r.wrap,V(V({props:V(V({labelWidth:s===void 0?s:hc(s),label:o?r.title.title:void 0},G_(r.wrap||{})),{},{prop:e.id,rules:e.injectValidate()}),class:this.$render.mergeClass(d||r.className,`ab-form-item`)},c?{style:{"--ab-field-width":hc(c)}}:{}),{},{key:`${i}fi`,ref:e.wrapRef,type:`formItem`})]),V({default:()=>t},o?{label:()=>this.makeInfo(r,i,e)}:{}));return l===!0||U_(u)||U_(a.show)?f:this.makeCol(r,i,[f])},isTitle(e){if(this.options.form.title===!1)return!1;let t=e.title;return!(!t.title&&!t.native||U_(t.show))},makeInfo(e,t,n){var r,i;let a=V({},e.title),o=V({},e.info),s=V_(o),c=this.options.form,l=this.getSlot(`title`),u=[l?l({title:(r=n.refRule)==null||(r=r.__$title)==null?void 0:r.value,rule:n.rule,options:this.options}):((i=n.refRule)==null||(i=i.__$title)==null?void 0:i.value)+(c.labelSuffix||c[`label-suffix`]||``)];if(!U_(o.show)&&(o.info||o.native)&&!U_(o.icon)){let e={type:o.type||`popover`,props:G_(o),key:`${t}pop`};delete e.props.icon,delete e.props.show,delete e.props.info,delete e.props.align,delete e.props.native;let r=`content`;if(o.info&&!G(e.props,r)){var d;e.props[r]=(d=n.refRule)==null||(d=d.__$info)==null?void 0:d.value}u[o.align===`left`?`push`:`unshift`](this.$r(ac([o,e]),{[a.slot||(s?`default`:`reference`)]:()=>this.$r({type:`ElIcon`,style:`top:2px`,key:`${t}i`},{default:()=>this.$r({type:o.icon===!0?`icon-warning`:o.icon})},!0)}))}let f=ac([a,{props:G_(a),key:`${t}tit`,class:`ab-form-title`,type:a.type||`span`,on:{click:(...e)=>{this.$handle.targetHook(n,`titleClick`,{args:e})}}}]);return delete f.props.show,delete f.props.title,delete f.props.native,this.$r(f,u)},makeCol(e,t,n){let r=V({},e.col);return delete r.show,this.$r({class:this.$render.mergeClass(r.class,`ab-form-col`),type:`col`,props:r||{span:24},key:`${t}col`},n)},makeRow(e){let t=this.options.row||{};return this.$r({type:`row`,props:t,class:this.$render.mergeClass(t.class,`ab-form-row`),key:`${this.key}row`},e)},makeFormBtn(){let e=[];if(U_(this.options.submitBtn.show)||e.push(this.makeSubmitBtn()),U_(this.options.resetBtn.show)||e.push(this.makeResetBtn()),!e.length)return;let t=this.$r({type:`formItem`,class:`ab-form-item`,key:`${this.key}fb`},e);return this.rule.props.inline===!0?t:this.$r({type:`col`,class:`ab-form-col ab-form-footer`,props:{span:24},key:`${this.key}fc`},[t])},makeResetBtn(){let e=V({},this.options.resetBtn),t=e.innerText||this.$handle.api.t(`reset`)||`重置`;return delete e.innerText,delete e.click,delete e.col,delete e.show,this.$r({type:`button`,props:e,class:`ab-reset-btn`,style:{width:e.width},on:{click:()=>{let e=this.$handle.api;this.options.resetBtn.click?this.options.resetBtn.click(e):e.resetFields()}},key:`${this.key}b2`},[t])},makeSubmitBtn(){let e=V({},this.options.submitBtn),t=e.innerText||this.$handle.api.t(`submit`)||`提交`;return delete e.innerText,delete e.click,delete e.col,delete e.show,this.$r({type:`button`,props:e,class:`ab-submit-btn`,style:{width:e.width},on:{click:()=>{let e=this.$handle.api;this.options.submitBtn.click?this.options.submitBtn.click(e):e.submit().catch(()=>{})}},key:`${this.key}b1`},[t])}},q_={};J_(q_),Y_(q_),X_(q_),Z_(q_),Q_(q_),$_(q_);function J_(e){[`group`,`tree`,`switch`,`upload`,`autoComplete`,`checkbox`,`cascader`,`colorPicker`,`datePicker`,`frame`,`inputNumber`,`inputTag`,`inputOtp`,`mention`,`transfer`,`treeSelect`,`radio`,`rate`].forEach(t=>{e[t]=$(t)}),e.auto=e.autoComplete,e.number=e.inputNumber,e.color=e.colorPicker,e.tag=e.inputTag}function Y_(e){e.treeSelectMultiple=$(`treeSelect`,{multiple:!0})}function X_(e){let t=`select`,n=`multiple`;e.selectMultiple=$(t,{[n]:!0}),e.selectOne=$(t,{[n]:!1})}function Z_(e){let t={treeSelected:`selected`,treeChecked:`checked`};Object.keys(t).reduce((e,n)=>(e[n]=$(`tree`,{type:t[n]}),e),e)}function Q_(e){let t={image:[`image`,0],file:[`file`,0],uploadFileOne:[`file`,1],uploadImageOne:[`image`,1]};Object.keys(t).reduce((e,n)=>(e[n]=$(`upload`,e=>e.props({uploadType:t[n][0],maxLength:t[n][1]})),e),e),e.uploadImage=e.image,e.uploadFile=e.file}function $_(e){let t={frameInputs:[`input`,0],frameFiles:[`file`,0],frameImages:[`image`,0],frameInputOne:[`input`,1],frameFileOne:[`file`,1],frameImageOne:[`image`,1]};return Object.keys(t).reduce((e,n)=>(e[n]=$(`frame`,e=>e.props({type:t[n][0],maxLength:t[n][1]})),e),e),e.frameInput=e.frameInputs,e.frameFile=e.frameFiles,e.frameImage=e.frameImages,e}function ev(e,t){return W.Boolean(e)?e={show:e}:!W.Undef(e)&&!W.Object(e)&&(e={show:t}),e}function tv(e,t){return{formEl(){return t.$manager.form()},wrapEl(e){let n=t.getFieldCtx(e);if(n)return t.vm.refs[n.wrapRef]},validate(n){return new Promise((r,i)=>{let a=e.children,o=[t.$manager.validate()];a.filter(e=>!e.isScope).forEach(e=>{o.push(e.validate())}),Promise.all(o).then(()=>{r(!0),n&&n(!0)}).catch(r=>{i(r),n&&n(r),t.vm.emit(`validate-fail`,r,{api:e}),t.emitEvent(`validate-fail`,r,{api:e})})})},validateField(n,r){return new Promise((i,a)=>{let o=typeof n==`object`?Jl(n):t.getCtx(n);if(!o){i(null),r&&r(null);return}let s=t.subForm[o.id],c=[t.$manager.validateField(o.id)];pc(s).filter(e=>!e.isScope).forEach(e=>{c.push(e.validate())}),Promise.all(c).then(()=>{i(null),r&&r(null)}).catch(i=>{a(i),r&&r(i),t.vm.emit(`validate-field-fail`,i,{field:n,api:e})})})},validateFields(t,n){return new Promise((r,i)=>{Array.isArray(t)||(t=[t]);let a=t.map(t=>e.validateField(t));Promise.all(a).then(()=>{r(null),n&&n(null)}).catch(e=>{i(e),n&&n(e)})})},clearValidateState(n,r=!0){e.helper.tidyFields(n).forEach(e=>{r&&this.clearSubValidateState(e),t.getCtxs(e).forEach(e=>{t.$manager.clearValidateState(e)})})},clearSubValidateState(n){e.helper.tidyFields(n).forEach(e=>{t.getCtxs(e).forEach(e=>{let n=t.subForm[e.id];n&&(Array.isArray(n)?n.forEach(e=>{e.clearValidateState()}):n&&n.clearValidateState())})})},btn:{loading:(t=!0)=>{e.submitBtnProps({loading:!!t})},disabled:(t=!0)=>{e.submitBtnProps({disabled:!!t})},show:(t=!0)=>{e.submitBtnProps({show:!!t})}},resetBtn:{loading:(t=!0)=>{e.resetBtnProps({loading:!!t})},disabled:(t=!0)=>{e.resetBtnProps({disabled:!!t})},show:(t=!0)=>{e.resetBtnProps({show:!!t})}},submitBtnProps:(n={})=>{let r=ev(t.options.submitBtn,!0);K(r,n),t.options.submitBtn=r,e.refreshOptions()},resetBtnProps:(n={})=>{let r=ev(t.options.resetBtn,!1);K(r,n),t.options.resetBtn=r,e.refreshOptions()},submit(n,r){return new Promise((i,a)=>{(t.options.validateOnSubmit===!1?Promise.resolve():e.validate()).then(()=>{let r=e.formData();t.beforeSubmit(r).then(()=>{W.Function(n)&&Z(()=>n(r,e)),W.Function(t.options.onSubmit)&&Z(()=>t.options.onSubmit(r,e)),t.vm.emit(`submit`,r,e),i(r)}).catch(()=>{})}).catch((...t)=>{W.Function(r)&&Z(()=>r(e,...t)),a(...t)})})}}}var nv={name:`required`,load(e,t,n){let r=rv(e.getValue()),i;if(r.required===!1)e.clearProp(),n==null||n.clearValidateState([t==null?void 0:t.field]);else{let a=V({required:!0,validator(e,t,n){o(),W.empty(t)?n(a.message):n()}},r),o=()=>{var e;let o=t==null||(e=t.__fc__.refRule.__$title)==null?void 0:e.value;if(i!==o){if(i=o,!r.message)a.message=(n==null?void 0:n.t(`required`,{title:o}))||o+((n==null?void 0:n.getLocale())===`en`?` is required`:`不能为空`);else{let e=r.message.match(/^\{\{\s*\$t\.(.+)\s*\}\}$/);e&&(a.message=n==null?void 0:n.t(e[1],{title:o}))}}};o(),e.getProp().validate=[a]}n==null||n.sync(t)},watch(e,t,n){nv.load(e,t,n)}};function rv(e){return W.Boolean(e)?{required:e}:W.String(e)?{message:e}:W.Undef(e)?{required:!1}:W.Function(e)?{validator:e}:W.Object(e)?e:{}}function iv(e,t){let n=e;n.componentAlias(F_),p_.forEach(e=>{let t=e;n.component(t.name,t)}),n.register(nv),P_.forEach(e=>{n.parser(e)});let r=q_;Object.keys(r).forEach(e=>{n.maker[e]=r[e]});let i=typeof window<`u`?window.ElementPlus:void 0;i&&n.useApp((e,t)=>{t.use(i)})}function av(){return cp({ui:`element-plus`,version:`0.1.2`,manager:K_,extendApi:tv,install:iv,attrs:{normal:[`col`,`wrap`],array:[`className`],key:[`title`,`info`]}})}var ov=(0,n.defineComponent)(V(V({},{name:`abDrawer`}),{},{__name:`ab-drawer`,props:(0,n.mergeModels)({visible:{type:Boolean,default:!1},detailLevel:{default:1}},{visible:{type:Boolean},visibleModifiers:{}}),emits:[`update:visible`],setup(e){let t=e,r=(0,n.useModel)(e,`visible`),i=(0,n.computed)(()=>t.detailLevel&&t.detailLevel<5?`${76-t.detailLevel*8}%`:`32%`);return(e,t)=>{let a=(0,n.resolveComponent)(`el-drawer`);return(0,n.openBlock)(),(0,n.createBlock)(a,{modelValue:r.value,"onUpdate:modelValue":t[0]||(t[0]=e=>r.value=e),"with-header":!1,"show-close":!1,"append-to-body":``,"close-on-click-modal":``,"close-on-press-escape":``,"destroy-on-close":``,size:i.value},{default:(0,n.withCtx)(()=>[(0,n.renderSlot)(e.$slots,`default`)]),_:3},8,[`modelValue`,`size`])}}})),sv=(e,t)=>{e.component(`ab-drawer`,ov)},cv=f(((e,t)=>{var n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,a=Object.prototype.hasOwnProperty,o=(e,t)=>{for(var r in t)n(e,r,{get:t[r],enumerable:!0})},s=(e,t,o,s)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let c of i(t))!a.call(e,c)&&c!==o&&n(e,c,{get:()=>t[c],enumerable:!(s=r(t,c))||s.enumerable});return e},c=e=>s(n({},`__esModule`,{value:!0}),e),l={};o(l,{default:()=>u}),t.exports=c(l);var u={vxe:{base:{pleaseInput:`请输入`,pleaseSelect:`请选择`,comma:`,`,fullStop:`。`},loading:{text:`加载中...`},error:{downErr:`下载失败`,errLargeData:`当绑定的数据量过大时,应该请使用 {0},否则可能会出现卡顿`,groupFixed:`如果使用分组表头,冻结列必须按组设置`,groupMouseRange:`分组表头与 "{0}" 不能同时使用,这可能会出现错误`,groupTag:`分组列头应该使用 "{0}" 而不是 "{1}",这可能会出现错误`,scrollErrProp:`启用虚拟滚动后不支持该参数 "{0}"`,errConflicts:`参数 "{0}" 与 "{1}" 有冲突`,modelConflicts:`绑定的字段值 "{0}" 与 "{1}" 存在冲突,将会出现错误`,notSupportProp:`当启用参数 "{0}" 时不支持 "{1}",应该为 "{2}",否则将会出现错误`,reqSupportProp:`当使用 "{0}" 时,应该设置 "{1}",否则可能会出现错误`,notConflictProp:`当使用 "{0}" 时,应该设置 "{1}",否则可能会存在功能冲突`,unableInsert:`无法插入到指定位置,请检查参数是否正确`,useErr:`安装 "{0}" 模块时发生错误,可能顺序不正确,依赖的模块需要在 Table 之前安装`,barUnableLink:`工具栏无法关联表格`,expandContent:`展开行的插槽应该是 "content",请检查是否正确`,reqComp:`缺少 "{0}" 组件,请检查是否正确安装。 https://vxeui.com/#/start/useUI/useGlobal`,reqModule:`缺少 "{0}" 模块`,reqProp:`缺少必要的 "{0}" 参数,这可能会导致出现错误`,emptyProp:`参数 "{0}" 不允许为空`,errProp:`不支持的参数 "{0}",可能为 "{1}"`,colRepet:`column.{0}="{1}" 重复了,这可能会导致某些功能无法使用`,notFunc:`方法 "{0}" 不存在`,errFunc:`参数 "{0}" 不是一个方法`,notValidators:`全局校验 "{0}" 不存在`,notFormats:`全局格式化 "{0}" 不存在`,notCommands:`全局指令 "{0}" 不存在`,notSlot:`插槽 "{0}" 不存在`,noTree:`树结构不支持 "{0}"`,noGroup:`数据分组后不支持 "{0}"`,notProp:`不支持的参数 "{0}"`,returnErr:`参数 "{0}" 的返回值期望是 "{1}" 实际是 "{2}"`,notSupportReturn:`当返回值为 "{0}" 时的参数应该使用用 "{1}" 而不是 "{2}"`,checkProp:`当数据量过大时可能会导致复选框卡顿,建议设置参数 "{0}" 提升渲染速度`,coverProp:`"{0}" 的参数 "{1}" 重复定义,这可能会出现错误`,uniField:`字段名 "{0}" 重复定义,这可能会出现错误`,repeatKey:`主键重复 {0}="{1}",这可能会出现错误`,repeatProp:`参数重复 {0}="{1}",这可能会出现错误`,delFunc:`方法 "{0}" 已废弃,请使用 "{1}"`,delProp:`参数 "{0}" 已废弃,请使用 "{1}"`,delEvent:`事件 "{0}" 已废弃,请使用 "{1}"`,removeProp:`参数 "{0}" 已废弃,不建议使用,这可能会导致出现错误`,errFormat:`全局的格式化内容应该使用 "VXETable.formats" 定义,挂载 "formatter={0}" 的方式已不建议使用`,notType:`不支持的文件类型 "{0}"`,notExp:`该浏览器不支持导入/导出功能`,impFields:`导入失败,请检查字段名和数据格式是否正确`,treeNotImp:`树表格不支持导入`,treeCrossDrag:`只能拖拽第一层级`,treeDragChild:`父级不能拖拽到自己的子级中`,reqPlugin:`扩展插件未安装 "{1}" https://vxeui.com/other{0}/#/{1}/start/npmInstall`,errMaxRow:`超过支持的最大数据量 {0} 行,这可能会导致出现错误`,useNew:`不建议使用 {0},请使用 {1}`,errorVersion:`版本不匹配,当前版本 {0},最低支持版本为 {1}`,errMaxVersion:`版本不匹配,当前版本 {0},最高支持版本为 {1}`},table:{emptyText:`暂无数据`,allTitle:`全选/取消`,seqTitle:`序号`,actionTitle:`操作`,confirmFilter:`筛选`,resetFilter:`重置`,allFilter:`全部`,sortAsc:`升序:最低到最高`,sortDesc:`降序:最高到最低`,filter:`对所选的列启用筛选`,impSuccess:`成功导入 {0} 条记录`,expLoading:`正在导出中`,expSuccess:`导出成功`,expError:`导出失败`,expFilename:`导出_{0}`,expOriginFilename:`导出_源_{0}`,customTitle:`个性化设置`,customAll:`全部`,customConfirm:`确认`,customClose:`关闭`,customCancel:`取消`,customRestore:`恢复默认`,maxFixedCol:`最大冻结列的数量不能超过 {0} 个`,maxGroupCol:`最大分组字段的数量不能超过 {0} 个`,dragTip:`移动:{0}`,resizeColTip:`宽:{0} 像素`,resizeRowTip:`高:{0} 像素`,rowGroupContentTotal:`{0}({1})`,menuLoading:`加载中...`},grid:{selectOneRecord:`请至少选择一条记录!`,deleteSelectRecord:`您确定要删除所选记录吗?`,removeSelectRecord:`您确定要移除所选记录吗?`,dataUnchanged:`数据未改动!`,delSuccess:`成功删除所选记录!`,saveSuccess:`保存成功!`,operError:`发生错误,操作失败!`},select:{clear:`清除`,allChecked:`全选`,total:`已选 {0} 项`,close:`关闭`,search:`搜索`,loadingText:`加载中...`,emptyText:`暂无数据`,maxSize:`最大可选择的数量不能超过 {0} 个`,overSizeErr:`已超出最大可选数量 {0} 个,超出部分将被忽略!`,searchEmpty:`未匹配到数据!`},list:{allChecked:`全选`,dragTip:`移动:{0}`},tree:{searchEmpty:`未匹配到数据!`,dragTip:`移动:{0}`},treeSelect:{clearChecked:`清除`,allChecked:`全选`,allExpand:`全部展开`,clearExpand:`全部收起`,total:`已选 {0} 项`,filterCount:`共找到 {0} 条记录`,close:`关闭`,search:`搜索`,emptyText:`暂无数据`},tableSelect:{filterCount:`共找到 {0} 条记录`},pager:{goto:`前往`,gotoTitle:`页数`,pagesize:`{0}条/页`,total:`共 {0} 条记录`,pageClassifier:`页`,homePage:`首页`,homePageTitle:`首页`,prevPage:`上一页`,prevPageTitle:`上一页`,nextPage:`下一页`,nextPageTitle:`下一页`,prevJump:`向上跳页`,prevJumpTitle:`向上跳页`,nextJump:`向下跳页`,nextJumpTitle:`向下跳页`,endPage:`末页`,endPageTitle:`末页`},alert:{title:`系统提示`},button:{confirm:`确认`,cancel:`取消`,clear:`清除`},filter:{search:`搜索`},custom:{cstmTitle:`个性化设置`,cstmRestore:`恢复默认`,cstmCancel:`取消`,cstmConfirm:`确定`,cstmConfirmRestore:`请确认是否恢复成默认列配置?`,cstmDragTarget:`移动:{0}`,setting:{colSort:`排序`,sortHelpTip:`点击图标开始拖动`,colTitle:`列标题`,colResizable:`列宽(像素)`,colVisible:`是否显示`,colFixed:`冻结列`,colFixedMax:`冻结列({0})`,colAlign:`对齐方式`,colHeadAlign:`表头对齐方式`,colFootAlign:`表尾对齐方式`,fixedLeft:`左`,fixedUnset:`无`,fixedRight:`右`,alignLeft:`左`,alignCenter:`中`,alignRight:`右`,moveUp:`上移`,moveDn:`下移`,putTop:`置顶`,putBottom:`置尾`,moveUpTitle:`点击向上移动`,moveDnTitle:`点击向下移动`,putTopTitle:`点击置顶`,putBottomTitle:`点击置尾`,anLeftTitle:`左对齐`,anCenterTitle:`居中`,anRightTitle:`右对齐`}},import:{modes:{covering:`覆盖方式(直接覆盖表格数据)`,insert:`底部追加(在表格的底部追加新数据)`,insertTop:`顶部追加(在表格的顶部追加新数据)`,insertBottom:`底部追加(在表格的底部追加新数据)`},impTitle:`导入数据`,impFile:`文件名`,impSelect:`选择文件`,impType:`文件类型`,impOpts:`参数设置`,impMode:`导入模式`,impConfirm:`导入`,impCancel:`取消`},export:{types:{csv:`CSV (逗号分隔)(*.csv)`,html:`网页(*.html)`,xml:`XML 数据(*.xml)`,txt:`文本文件(制表符分隔)(*.txt)`,xls:`Excel 97-2003 工作簿(*.xls)`,xlsx:`Excel 工作簿(*.xlsx)`,pdf:`PDF (*.pdf)`},modes:{empty:`空数据`,current:`当前数据(当前页的数据)`,selected:`选中数据(当前页选中的数据)`,all:`全量数据(包括所有分页的数据)`},printTitle:`打印数据`,expTitle:`导出数据`,expName:`文件名`,expNamePlaceholder:`请输入文件名`,expSheetName:`标题`,expSheetNamePlaceholder:`请输入标题`,expType:`保存类型`,expMode:`选择数据`,expCurrentColumn:`全部字段`,expColumn:`选择字段`,widthMode:`列宽设置`,wModeTitle:`设置打印时列宽的渲染方式`,wdModes:{default:`默认`,auto:`自适应(根据内容自适应列宽)`,scale:`等比例(根据页面比例渲染列宽)`},expOpts:`参数设置`,expOptHeader:`表头`,expHeaderTitle:`是否需要表头`,expOptFooter:`表尾`,expFooterTitle:`是否需要表尾`,expOptColgroup:`分组表头`,expOptTitle:`列标题`,expTitleTitle:`是否为列标题,否则显示为列的字段名`,expColgroupTitle:`如果存在,则支持带有分组结构的表头`,expOptMerge:`合并`,expMergeTitle:`如果存在,则支持带有合并结构的单元格`,expOptAllExpand:`展开树`,expAllExpandTitle:`如果存在,则支持将带有层级结构的数据全部展开`,expOptTreeAllExpand:`展开树`,expTreeAllExpandTitle:`如果存在,则自动展开所有树层级`,expOptRowGroupAllExpand:`展开分组`,expRowGroupAllExpandTitle:`如果存在,则自动展开所有分组层级`,expOptUseStyle:`样式`,expUseStyleTitle:`如果存在,则支持带样式的单元格`,expOptOriginal:`源数据`,expOriginalTitle:`如果为源数据,则支持导入到表格中`,expPrint:`打印`,expConfirm:`导出`,expCancel:`取消`},modal:{errTitle:`错误提示`,zoomMin:`最小化`,zoomIn:`最大化`,zoomOut:`还原`,close:`关闭`,miniMaxSize:`最小化窗口的数量不能超过 {0} 个`,footPropErr:`show-footer 仅用于启用表尾,需配合 show-confirm-button | show-cancel-button | 插槽使用`},drawer:{close:`关闭`},form:{folding:`收起`,unfolding:`展开`},toolbar:{import:`导入`,export:`导出`,print:`打印`,refresh:`刷新`,zoomIn:`全屏`,zoomOut:`还原`,custom:`个性化设置`,customAll:`全部`,customConfirm:`确认`,customRestore:`重置`,fixedLeft:`冻结在左侧`,fixedRight:`冻结在右侧`,cancelFixed:`取消冻结列`},iconPicker:{search:`搜索`,emptyText:`暂无数据`},datePicker:{yearTitle:`{0} 年`},dateRangePicker:{pleaseRange:`请选择开始日期与结束日期`},input:{date:{m1:`01 月`,m2:`02 月`,m3:`03 月`,m4:`04 月`,m5:`05 月`,m6:`06 月`,m7:`07 月`,m8:`08 月`,m9:`09 月`,m10:`10 月`,m11:`11 月`,m12:`12 月`,quarterLabel:`{0} 年`,monthLabel:`{0} 年`,dayLabel:`{0} 年 {1}`,labelFormat:{date:`yyyy-MM-dd`,time:`HH:mm:ss`,datetime:`yyyy-MM-dd HH:mm:ss`,week:`yyyy 年第 WW 周`,month:`yyyy-MM`,quarter:`yyyy 年第 q 季度`,year:`yyyy`},weeks:{w:``,w0:`周日`,w1:`周一`,w2:`周二`,w3:`周三`,w4:`周四`,w5:`周五`,w6:`周六`},months:{m0:`一月`,m1:`二月`,m2:`三月`,m3:`四月`,m4:`五月`,m5:`六月`,m6:`七月`,m7:`八月`,m8:`九月`,m9:`十月`,m10:`十一月`,m11:`十二月`},quarters:{q1:`第一季度`,q2:`第二季度`,q3:`第三季度`,q4:`第四季度`}}},calendar:{yearLabel:`{0} 年`,monthLabel:`{0} 月`},cascader:{clearChecked:`清除`,allChecked:`全选`,total:`已选 {0} 项`,close:`关闭`,search:`搜索`},numberInput:{currencySymbol:`¥`},imagePreview:{popupTitle:`预览`,operBtn:{zoomOut:`缩小`,zoomIn:`放大`,pctFull:`等比例缩放`,pct11:`显示原始尺寸`,rotateLeft:`向左旋转`,rotateRight:`向右旋转`,print:`点击打印图片`,download:`点击下载图片`}},upload:{fileBtnText:`点击或拖拽上传`,imgBtnText:`点击或拖拽上传`,dragPlaceholder:`请把文件拖放到这个区域即可上传`,imgSizeHint:`单张{0}`,imgCountHint:`最多{0}张`,fileTypeHint:`支持 {0} 文件类型`,fileSizeHint:`单个文件大小不超过{0}`,fileCountHint:`最多可上传{0}个文件`,uploadTypeErr:`文件类型不匹配!`,overCountErr:`最多只能选择{0}个文件!`,overCountExtraErr:`已超出最大数量{0}个,超出的{1}个文件将被忽略!`,overSizeErr:`文件大小最大不能超过{0}!`,manualUpload:`点击上传`,reUpload:`重新上传`,uploadProgress:`上传中 {0}%`,uploadErr:`上传失败`,uploadSuccess:`上传成功`,moreBtnText:`更多({0})`,moreImgBtnText:`图片({0})`,moreFileBtnText:`文件({0})`,viewItemTitle:`点击查看`,morePopup:{readTitle:`查看列表`,imageTitle:`上传图片`,fileTitle:`上传文件`}},empty:{defText:`暂无数据`},colorPicker:{clear:`清除`,confirm:`确认`,copySuccess:`已复制到剪贴板:{0}`,hex:`十六进制`},formDesign:{formName:`表单名称`,defFormTitle:`未命名的表单`,widgetPropTab:`控件属性`,widgetFormTab:`表单属性`,error:{wdFormUni:`该类型的控件在表单中只允许添加一个`,wdSubUni:`该类型的控件在子表中只允许添加一个`},styleSetting:{btn:`样式设置`,title:`表单的样式设置`,layoutTitle:`控件布局`,verticalLayout:`上下布局`,horizontalLayout:`横向布局`,styleTitle:`标题样式`,boldTitle:`标题加粗`,fontBold:`加粗`,fontNormal:`常规`,colonTitle:`显示冒号`,colonVisible:`显示`,colonHidden:`隐藏`,alignTitle:`对齐方式`,widthTitle:`标题宽度`,alignLeft:`居左`,alignRight:`居右`,unitPx:`像素`,unitPct:`百分比`},widget:{group:{base:`基础控件`,layout:`布局控件`,system:`系统控件`,module:`模块控件`,chart:`图表控件`,advanced:`高级控件`},copyTitle:`副本_{0}`,component:{input:`输入框`,textarea:`文本域`,select:`下拉选择`,row:`一行多列`,title:`标题`,text:`文本`,subtable:`子表`,VxeSwitch:`是/否`,VxeInput:`输入框`,VxeNumberInput:`数字`,VxeDatePicker:`日期`,VxeTextarea:`文本域`,VxeSelect:`下拉选择`,VxeTreeSelect:`树形选择`,VxeRadioGroup:`单选框`,VxeCheckboxGroup:`复选框`,VxeUploadFile:`文件`,VxeUploadImage:`图片`,VxeRate:`评分`,VxeSlider:`滑块`},row:{placeholder:`控件位置`}},widgetProp:{name:`控件名称`,placeholder:`提示语`,required:`必填校验`,multiple:`允许多选`,displaySetting:{name:`显示设置`,pc:`电脑端`,mobile:`手机端`,visible:`显示`,hidden:`隐藏`},dataSource:{name:`数据源`,defValue:`选项{0}`,addOption:`添加选项`,batchEditOption:`批量编辑`,batchEditTip:`每行对应一个选项,支持从表格、Excel、WPS 中直接复制粘贴。`,batchEditSubTip:`每行对应一个选项,如果是分组,子项可以是空格或制表键开头,支持从表格、Excel、WPS 中直接复制粘贴。`,buildOption:`生成选项`},rowProp:{colSize:`列数`,col2:`两列`,col3:`三列`,col4:`四列`,col6:`六列`,layout:`布局`},textProp:{name:`内容`,alignTitle:`对齐方式`,alignLeft:`居左`,alignCenter:`居中`,alignRight:`居右`,colorTitle:`字体颜色`,sizeTitle:`字体大小`,boldTitle:`字体加粗`,fontNormal:`常规`,fontBold:`加粗`},subtableProp:{seqTitle:`序号`,showSeq:`显示序号`,showCheckbox:`允许多选`,errSubDrag:`子表不支持该控件,请使用其他控件`,colPlace:`将控件拖拽进来`},uploadProp:{limitFileCount:`文件数量限制`,limitFileSize:`文件大小限制`,multiFile:`允许上传多个文件`,limitImgCount:`图片数量限制`,limitImgSize:`图片大小限制`,multiImg:`允许上传多张图片`},rules:{required:`必填字段`}}},listDesign:{fieldSettingTab:`字段设置`,listSettingTab:`参数设置`,searchTitle:`查询条件`,listTitle:`列表字段`,searchField:`查询字段`,listField:`列表字段`,activeBtn:{ActionButtonUpdate:`编辑`,ActionButtonDelete:`删除`},search:{addBtn:`编辑`,emptyText:`未配置查询条件`,editPopupTitle:`编辑查询字段`},searchPopup:{colTitle:`标题`,saveBtn:`保存`}},text:{copySuccess:`已复制到剪贴板`,copyError:`当前环境不支持该操作`},countdown:{formats:{yyyy:`年`,MM:`月`,dd:`天`,HH:`时`,mm:`分`,ss:`秒`}},contextMenu:{loadingText:`加载中...`},switch:{onText:`打开`,offText:`关闭`},gantt:{tFullFormat:{year:`{yyyy}年`,quarter:`{yyyy}年第{q}季度`,month:`{yyyy}年{MM}月`,week:`{yyyy}年第{W}周`,day:`{yyyy}年{MM}月 {eLabel}`,date:`{yyyy}年{MM}月{dd}日`,hour:`{yyyy}年{MM}月{dd}日{HH}时`,minute:`{yyyy}年{MM}月{dd}日{HH}时{mm}分`,second:`{yyyy}年{MM}月{dd}日{HH}时{mm}分{ss}秒`},tSimpleFormat:{year:`{yyyy}年`,quarter:`{q}季度`,month:`{M}月`,week:`{W}周`,day:`{eLabel}`,date:`{d}`,hour:`{HH}`,minute:`{mm}`,second:`{ss}`},stepFormat:{year:`{start.yyyy}~{end.yyyy}年`,quarter:`{start.q}~{end.q}季度`,month:`{start.M}~{end.M}月`,week:`{start.W}~{end.W}周`,day:`{eStartLabel}~{eEndLabel}`,date:`{start.d}~{end.d}`,hour:`{start.HH}~{end.HH}`,minute:`{start.mm}~{end.mm}`,second:`{start.ss}~{end.ss}`},dayss:{w0:`日`,w1:`一`,w2:`二`,w3:`三`,w4:`四`,w5:`五`,w6:`六`},days:{w0:`日`,w1:`一`,w2:`二`,w3:`三`,w4:`四`,w5:`五`,w6:`六`}},plugins:{extendCellArea:{area:{mergeErr:`无法对合并单元格进行该操作`,multiErr:`无法对多重选择区域进行该操作`,selectErr:`无法操作指定区域的单元格`,extendErr:`若要执行此操作,所有合并的单元格需大小相同`,pasteMultiErr:`无法粘贴,需要相同大小的复制的区域和粘贴的区域才能执行此操作`,cpInvalidErr:`该操作无法进行,您选择的区域中存在被禁止的列({0})`},fnr:{title:`查找和替换`,titleFd:`查找`,titleRe:`替换`,findLabel:`查找`,replaceLabel:`替换`,findTitle:`查找内容:`,replaceTitle:`替换为:`,tabs:{find:`查找`,replace:`替换`},filter:{re:`正则表达式`,whole:`全词匹配`,sensitive:`区分大小写`},btns:{findNext:`查找下一个`,findAll:`查找全部`,replace:`替换`,replaceAll:`替换全部`,cancel:`取消`},header:{seq:`#`,cell:`单元格`,value:`值`},body:{row:`行:{0}`,col:`列:{0}`},empty:`(空值)`,reError:`无效的正则表达式`,recordCount:`已找到 {0} 个单元格`,notCell:`找不到匹配的单元格`,replaceSuccess:`成功替换 {0} 个单元格`}},extendPivotTable:{aggregation:{grouping:`分组`,values:`值`,groupPlaceholder:`拖至此处进行分组`,valuesPlaceholder:`拖至此处进行聚合`,dragExistCol:`该列已存在`,sortHelpTip:`点击图标开始拖动`},aggFuncs:{sum:`求和`,count:`计数`,avg:`平均值`,min:`最小值`,max:`最大值`,first:`首个值`,last:`末尾值`}},filterComplexInput:{menus:{fixedColumn:`冻结列`,fixedGroup:`冻结分组`,cancelFixed:`取消冻结`,fixedLeft:`冻结左侧`,fixedRight:`冻结右侧`},cases:{equal:`等于`,gt:`大于`,lt:`小于`,begin:`开头是`,endin:`结尾是`,include:`包含`,isSensitive:`区分大小写`}},filterCombination:{menus:{sort:`排序`,clearSort:`清除排序`,sortAsc:`升序`,sortDesc:`降序`,fixedColumn:`冻结列`,fixedGroup:`冻结分组`,cancelFixed:`取消冻结`,fixedLeft:`冻结左侧`,fixedRight:`冻结右侧`,clearFilter:`清除筛选`,textOption:`文本筛选`,numberOption:`数值筛选`,dateOption:`日期筛选`},popup:{title:`自定义筛选的方式`,currColumnTitle:`显示行:`,and:`与`,or:`或`,describeHtml:`可用 ? 代表单个字符<br/>用 * 代表任意多个字符`},cases:{equal:`等于`,unequal:`不等于`,gt:`大于`,ge:`大于或等于`,lt:`小于`,le:`小于或等于`,begin:`开头是`,notbegin:`开头不是`,endin:`结尾是`,notendin:`结尾不是`,include:`包含`,exclude:`不包含`,between:`介于`,isAfter:`在以下日期之后`,eqAfter:`在以下日期之后或与之相同`,isBefore:`在以下日期之前`,eqBefore:`在以下日期之前或与之相同`,top10:`前10项`,aboveAverage:`高于平均值`,belowAverage:`低于平均值`,before:`之前`,after:`之后`,tomorrow:`明天`,today:`今天`,yesterday:`昨天`,nextWeek:`下周`,thisWeek:`本周`,lastWeek:`上周`,nextMonth:`下月`,thisMonth:`本月`,lastMonth:`上月`,nextYear:`明年`,thisYear:`今年`,lastYear:`去年`,yearToDate:`本年度截止到现在`,custom:`自定义筛选`,insensitive:`不区分大小写`,isSensitive:`区分大小写`},empty:`(空白)`,notData:`无匹配项`}},pro:{area:{mergeErr:`无法对合并单元格进行该操作`,multiErr:`无法对多重选择区域进行该操作`,extendErr:`若要执行此操作,所有合并的单元格需大小相同`,pasteMultiErr:`无法粘贴,需要相同大小的复制的区域和粘贴的区域才能执行此操作`},fnr:{title:`查找和替换`,titleFd:`查找`,titleRe:`替换`,findLabel:`查找`,replaceLabel:`替换`,findTitle:`查找内容:`,replaceTitle:`替换为:`,tabs:{find:`查找`,replace:`替换`},filter:{re:`正则表达式`,whole:`全词匹配`,sensitive:`区分大小写`},btns:{findNext:`查找下一个`,findAll:`查找全部`,replace:`替换`,replaceAll:`替换全部`,cancel:`取消`},header:{seq:`#`,cell:`单元格`,value:`值`},empty:`(空值)`,reError:`无效的正则表达式`,recordCount:`已找到 {0} 个单元格`,notCell:`找不到匹配的单元格`,replaceSuccess:`成功替换 {0} 个单元格`}},renderer:{search:`搜索`,cases:{equal:`等于`,unequal:`不等于`,gt:`大于`,ge:`大于或等于`,lt:`小于`,le:`小于或等于`,begin:`开头是`,notbegin:`开头不是`,endin:`结尾是`,notendin:`结尾不是`,include:`包含`,exclude:`不包含`,between:`介于`,top10:`前10项`,aboveAverage:`高于平均值`,belowAverage:`低于平均值`,custom:`自定义筛选`,insensitive:`不区分大小写`,isSensitive:`区分大小写`},combination:{menus:{sort:`排序`,clearSort:`清除排序`,sortAsc:`升序`,sortDesc:`降序`,fixedColumn:`冻结列`,fixedGroup:`冻结分组`,cancelFixed:`取消冻结`,fixedLeft:`冻结到左侧`,fixedRight:`冻结到右侧`,clearFilter:`清除筛选`,textOption:`文本筛选`,numberOption:`数值筛选`,dateOption:`日期筛选`},popup:{title:`自定义筛选的方式`,currColumnTitle:`显示行:`,and:`与`,or:`或`,describeHtml:`可用 ? 代表单个字符<br/>用 * 代表任意多个字符`},empty:`(空白)`,notData:`无匹配项`}}}}})),lv=f(((e,t)=>{var n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,a=Object.prototype.hasOwnProperty,o=(e,t)=>{for(var r in t)n(e,r,{get:t[r],enumerable:!0})},s=(e,t,o,s)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let c of i(t))!a.call(e,c)&&c!==o&&n(e,c,{get:()=>t[c],enumerable:!(s=r(t,c))||s.enumerable});return e},c=e=>s(n({},`__esModule`,{value:!0}),e),l={};o(l,{default:()=>u}),t.exports=c(l);var u={vxe:{base:{pleaseInput:`Please enter`,pleaseSelect:`Please select`,comma:`,`,fullStop:`.`},loading:{text:`Loading...`},error:{downErr:`Download failed`,errLargeData:`When the bound data volume is too large, please use {0}; otherwise, performance may lag`,groupFixed:`If grouped headers are used, fixed columns must be set by group`,groupMouseRange:`Grouped headers cannot be used together with "{0}", which may cause errors`,groupTag:`Group columns should use "{0}" instead of "{1}", which may cause errors`,scrollErrProp:`The parameter "{0}" is not supported after virtual scrolling is enabled`,errConflicts:`Parameter "{0}" conflicts with "{1}"`,modelConflicts:`The bound field value "{0}" conflicts with "{1}", which will cause errors`,notSupportProp:`When parameter "{0}" is enabled, "{1}" is not supported; it should be "{2}", otherwise errors may occur`,reqSupportProp:`When using "{0}", "{1}" should be set, otherwise errors may occur`,notConflictProp:`When using "{0}", "{1}" should be set, otherwise functional conflicts may occur`,unableInsert:`Unable to insert at the specified position. Please check whether the parameters are correct`,useErr:`An error occurred while installing the "{0}" module. The order may be incorrect; dependent modules must be installed before Table`,barUnableLink:`The toolbar cannot be linked to the table`,expandContent:`The slot for the expanded row should be "content". Please check whether it is correct`,reqComp:`Missing "{0}" component. Please check whether it is installed correctly. https://vxeui.com/#/start/useUI/useGlobal`,reqModule:`Missing "{0}" module`,reqProp:`Missing required parameter "{0}", which may cause errors`,emptyProp:`Parameter "{0}" cannot be empty`,errProp:`Unsupported parameter "{0}", possibly "{1}"`,colRepet:`column.{0}="{1}" is duplicated, which may cause some features to be unavailable`,notFunc:`Method "{0}" does not exist`,errFunc:`Parameter "{0}" is not a method`,notValidators:`Global validator "{0}" does not exist`,notFormats:`Global formatter "{0}" does not exist`,notCommands:`Global command "{0}" does not exist`,notSlot:`Slot "{0}" does not exist`,noTree:`Tree structure does not support "{0}"`,noGroup:`"{0}" is not supported after data grouping`,notProp:`Unsupported parameter "{0}"`,returnErr:`The return value of parameter "{0}" is expected to be "{1}" but is actually "{2}"`,notSupportReturn:`When the return value is "{0}", the parameter should use "{1}" instead of "{2}"`,checkProp:`Large data volumes may cause checkbox lag. It is recommended to set parameter "{0}" to improve rendering speed`,coverProp:`Parameter "{1}" of "{0}" is defined repeatedly, which may cause errors`,uniField:`Field name "{0}" is defined repeatedly, which may cause errors`,repeatKey:`Duplicate primary key {0}="{1}", which may cause errors`,repeatProp:`Duplicate parameter {0}="{1}", which may cause errors`,delFunc:`Method "{0}" is deprecated. Please use "{1}"`,delProp:`Parameter "{0}" is deprecated. Please use "{1}"`,delEvent:`Event "{0}" is deprecated. Please use "{1}"`,removeProp:`Parameter "{0}" is deprecated and not recommended, which may cause errors`,errFormat:`Global formatting content should be defined using "VXETable.formats". Mounting "formatter={0}" is no longer recommended`,notType:`Unsupported file type "{0}"`,notExp:`This browser does not support import/export`,impFields:`Import failed. Please check whether field names and data formats are correct`,treeNotImp:`Tree table does not support import`,treeCrossDrag:`Only the first level can be dragged`,treeDragChild:`A parent cannot be dragged into its own children`,reqPlugin:`Extension plugin "{1}" is not installed. https://vxeui.com/other{0}/#/{1}/start/npmInstall`,errMaxRow:`Exceeds the maximum supported data volume of {0} rows, which may cause errors`,useNew:`{0} is not recommended. Please use {1}`,errorVersion:`Version mismatch. Current version is {0}, minimum supported version is {1}`,errMaxVersion:`Version mismatch. Current version is {0}, maximum supported version is {1}`},table:{emptyText:`No data`,allTitle:`Select all/Clear`,seqTitle:`No.`,actionTitle:`Actions`,confirmFilter:`Filter`,resetFilter:`Reset`,allFilter:`All`,sortAsc:`Ascending: lowest to highest`,sortDesc:`Descending: highest to lowest`,filter:`Enable filtering for the selected column`,impSuccess:`Successfully imported {0} records`,expLoading:`Exporting`,expSuccess:`Export successful`,expError:`Export failed`,expFilename:`Export_{0}`,expOriginFilename:`Export_Source_{0}`,customTitle:`Custom settings`,customAll:`All`,customConfirm:`Confirm`,customClose:`Close`,customCancel:`Cancel`,customRestore:`Restore defaults`,maxFixedCol:`The maximum number of fixed columns cannot exceed {0}`,maxGroupCol:`The maximum number of grouped fields cannot exceed {0}`,dragTip:`Move: {0}`,resizeColTip:`Width: {0} px`,resizeRowTip:`Height: {0} px`,rowGroupContentTotal:`{0} ({1})`,menuLoading:`Loading...`},grid:{selectOneRecord:`Please select at least one record!`,deleteSelectRecord:`Are you sure you want to delete the selected records?`,removeSelectRecord:`Are you sure you want to remove the selected records?`,dataUnchanged:`Data has not changed!`,delSuccess:`Selected records deleted successfully!`,saveSuccess:`Saved successfully!`,operError:`An error occurred. Operation failed!`},select:{clear:`Clear`,allChecked:`All`,total:`{0} selected`,close:`Close`,search:`Search`,loadingText:`Loading...`,emptyText:`No data`,maxSize:`The maximum number of selectable items cannot exceed {0}`,overSizeErr:`The maximum selectable count of {0} has been exceeded. The excess will be ignored!`,searchEmpty:`No matching data!`},list:{allChecked:`All`,dragTip:`Move: {0}`},tree:{searchEmpty:`No matching data!`,dragTip:`Move: {0}`},treeSelect:{clearChecked:`Clear`,allChecked:`All`,allExpand:`Expand all`,clearExpand:`Collapse all`,total:`{0} selected`,filterCount:`{0} records found`,close:`Close`,search:`Search`,emptyText:`No data`},tableSelect:{filterCount:`{0} records found`},pager:{goto:`Go to`,gotoTitle:`Page`,pagesize:`{0}/page`,total:`Total {0} records`,pageClassifier:`Page`,homePage:`Home`,homePageTitle:`Home`,prevPage:`Previous`,prevPageTitle:`Previous`,nextPage:`Next`,nextPageTitle:`Next`,prevJump:`Jump up`,prevJumpTitle:`Jump up`,nextJump:`Jump down`,nextJumpTitle:`Jump down`,endPage:`Last`,endPageTitle:`Last`},alert:{title:`System prompt`},button:{confirm:`Confirm`,cancel:`Cancel`,clear:`Clear`},filter:{search:`Search`},custom:{cstmTitle:`Custom settings`,cstmRestore:`Restore defaults`,cstmCancel:`Cancel`,cstmConfirm:`OK`,cstmConfirmRestore:`Are you sure you want to restore the default column configuration?`,cstmDragTarget:`Move: {0}`,setting:{colSort:`Sort`,sortHelpTip:`Click the icon to start dragging`,colTitle:`Column title`,colResizable:`Column width (px)`,colVisible:`Visible`,colFixed:`Fixed column`,colFixedMax:`Fixed columns ({0})`,colAlign:`Alignment`,colHeadAlign:`Header alignment`,colFootAlign:`Footer alignment`,fixedLeft:`Left`,fixedUnset:`None`,fixedRight:`Right`,alignLeft:`Left`,alignCenter:`Center`,alignRight:`Right`,moveUp:`Up`,moveDn:`Down`,putTop:`Top`,putBottom:`Bottom`,moveUpTitle:`Click to move up`,moveDnTitle:`Click to move down`,putTopTitle:`Click to move to top`,putBottomTitle:`Click to move to bottom`,anLeftTitle:`Align left`,anCenterTitle:`Align center`,anRightTitle:`Align right`}},import:{modes:{covering:`Cover (directly overwrite table data)`,insert:`Append at bottom (append new data to the bottom of the table)`,insertTop:`Append at top (append new data to the top of the table)`,insertBottom:`Append at bottom (append new data to the bottom of the table)`},impTitle:`Import data`,impFile:`File name`,impSelect:`Select file`,impType:`File type`,impOpts:`Options`,impMode:`Import mode`,impConfirm:`Import`,impCancel:`Cancel`},export:{types:{csv:`CSV (comma separated)(*.csv)`,html:`Web page (*.html)`,xml:`XML data (*.xml)`,txt:`Text file (tab separated)(*.txt)`,xls:`Excel 97-2003 Workbook (*.xls)`,xlsx:`Excel workbook (*.xlsx)`,pdf:`PDF (*.pdf)`},modes:{empty:`Empty data`,current:`Current data (data on the current page)`,selected:`Selected data (data selected on the current page)`,all:`All data (including data on all pages)`},printTitle:`Print data`,expTitle:`Export data`,expName:`File name`,expNamePlaceholder:`Please enter a file name`,expSheetName:`Title`,expSheetNamePlaceholder:`Please enter a title`,expType:`Save type`,expMode:`Select data`,expCurrentColumn:`All fields`,expColumn:`Select fields`,widthMode:`Column width settings`,wModeTitle:`Set how column widths are rendered when printing`,wdModes:{default:`Default`,auto:`Auto (adjust column widths based on content)`,scale:`Scale (render column widths according to page scale)`},expOpts:`Options`,expOptHeader:`Header`,expHeaderTitle:`Whether a header is needed`,expOptFooter:`Footer`,expFooterTitle:`Whether a footer is needed`,expOptColgroup:`Grouped header`,expOptTitle:`Column titles`,expTitleTitle:`Whether to use column titles; otherwise, display field names`,expColgroupTitle:`If present, supports headers with grouped structure`,expOptMerge:`Merge`,expMergeTitle:`If present, supports cells with merged structure`,expOptAllExpand:`Expand tree`,expAllExpandTitle:`If present, supports fully expanding hierarchical data`,expOptTreeAllExpand:`Expand tree`,expTreeAllExpandTitle:`If present, automatically expands all tree levels`,expOptRowGroupAllExpand:`Expand groups`,expRowGroupAllExpandTitle:`If present, automatically expands all group levels`,expOptUseStyle:`Styles`,expUseStyleTitle:`If present, supports styled cells`,expOptOriginal:`Source data`,expOriginalTitle:`If source data, supports importing into the table`,expPrint:`Print`,expConfirm:`Export`,expCancel:`Cancel`},modal:{errTitle:`Error`,zoomMin:`Minimize`,zoomIn:`Maximize`,zoomOut:`Restore`,close:`Close`,miniMaxSize:`The number of minimized windows cannot exceed {0}`,footPropErr:`show-footer is only used to enable the footer and must be used with show-confirm-button | show-cancel-button | slots`},drawer:{close:`Close`},form:{folding:`Collapse`,unfolding:`Expand`},toolbar:{import:`Import`,export:`Export`,print:`Print`,refresh:`Refresh`,zoomIn:`Fullscreen`,zoomOut:`Restore`,custom:`Custom settings`,customAll:`All`,customConfirm:`Confirm`,customRestore:`Reset`,fixedLeft:`Freeze left`,fixedRight:`Freeze right`,cancelFixed:`Unfreeze`},iconPicker:{search:`Search`,emptyText:`No data`},datePicker:{yearTitle:`{0}`},dateRangePicker:{pleaseRange:`Please select a start date and an end date`},input:{date:{m1:`Jan`,m2:`Feb`,m3:`Mar`,m4:`Apr`,m5:`May`,m6:`Jun`,m7:`Jul`,m8:`Aug`,m9:`Sep`,m10:`Oct`,m11:`Nov`,m12:`Dec`,quarterLabel:`{0}`,monthLabel:`{0}`,dayLabel:`{0} {1}`,labelFormat:{date:`yyyy-MM-dd`,time:`HH:mm:ss`,datetime:`yyyy-MM-dd HH:mm:ss`,week:`Week WW, yyyy`,month:`yyyy-MM`,quarter:`Qq yyyy`,year:`yyyy`},weeks:{w:``,w0:`Sun`,w1:`Mon`,w2:`Tue`,w3:`Wed`,w4:`Thu`,w5:`Fri`,w6:`Sat`},months:{m0:`January`,m1:`February`,m2:`March`,m3:`April`,m4:`May`,m5:`June`,m6:`July`,m7:`August`,m8:`September`,m9:`October`,m10:`November`,m11:`December`},quarters:{q1:`Q1`,q2:`Q2`,q3:`Q3`,q4:`Q4`}}},calendar:{yearLabel:`{0}`,monthLabel:`{0}`},cascader:{clearChecked:`Clear`,allChecked:`All`,total:`{0} selected`,close:`Close`,search:`Search`},numberInput:{currencySymbol:`$`},imagePreview:{popupTitle:`Preview`,operBtn:{zoomOut:`Zoom out`,zoomIn:`Zoom in`,pctFull:`Fit to page`,pct11:`Original size`,rotateLeft:`Rotate left`,rotateRight:`Rotate right`,print:`Click to print image`,download:`Click to download image`}},upload:{fileBtnText:`Click or drag to upload`,imgBtnText:`Click or drag to upload`,dragPlaceholder:`Drag files here to upload`,imgSizeHint:`Single image {0}`,imgCountHint:`Up to {0} images`,fileTypeHint:`Supports {0} file types`,fileSizeHint:`Single file size must not exceed {0}`,fileCountHint:`Up to {0} files can be uploaded`,uploadTypeErr:`File type mismatch!`,overCountErr:`You can select up to {0} files!`,overCountExtraErr:`The maximum count of {0} has been exceeded. The excess {1} files will be ignored!`,overSizeErr:`File size cannot exceed {0}!`,manualUpload:`Click to upload`,reUpload:`Re-upload`,uploadProgress:`Uploading {0}%`,uploadErr:`Upload failed`,uploadSuccess:`Upload successful`,moreBtnText:`More ({0})`,moreImgBtnText:`Images ({0})`,moreFileBtnText:`Files ({0})`,viewItemTitle:`Click to view`,morePopup:{readTitle:`View list`,imageTitle:`Upload images`,fileTitle:`Upload files`}},empty:{defText:`No data`},colorPicker:{clear:`Clear`,confirm:`Confirm`,copySuccess:`Copied to clipboard: {0}`,hex:`HEX`},formDesign:{formName:`Form name`,defFormTitle:`Untitled form`,widgetPropTab:`Widget properties`,widgetFormTab:`Form properties`,error:{wdFormUni:`Only one widget of this type can be added to the form`,wdSubUni:`Only one widget of this type can be added to the subtable`},styleSetting:{btn:`Style settings`,title:`Form style settings`,layoutTitle:`Widget layout`,verticalLayout:`Vertical layout`,horizontalLayout:`Horizontal layout`,styleTitle:`Title style`,boldTitle:`Bold title`,fontBold:`Bold`,fontNormal:`Normal`,colonTitle:`Show colon`,colonVisible:`Show`,colonHidden:`Hide`,alignTitle:`Alignment`,widthTitle:`Title width`,alignLeft:`Left`,alignRight:`Right`,unitPx:`px`,unitPct:`%`},widget:{group:{base:`Basic widgets`,layout:`Layout widgets`,system:`System widgets`,module:`Module widgets`,chart:`Chart widgets`,advanced:`Advanced widgets`},copyTitle:`Copy_{0}`,component:{input:`Input`,textarea:`Textarea`,select:`Select`,row:`Row with multiple columns`,title:`Title`,text:`Text`,subtable:`Subtable`,VxeSwitch:`Yes/No`,VxeInput:`Input`,VxeNumberInput:`Number`,VxeDatePicker:`Date`,VxeTextarea:`Textarea`,VxeSelect:`Select`,VxeTreeSelect:`Tree select`,VxeRadioGroup:`Radio group`,VxeCheckboxGroup:`Checkbox group`,VxeUploadFile:`File`,VxeUploadImage:`Image`,VxeRate:`Rate`,VxeSlider:`Slider`},row:{placeholder:`widget position`}},widgetProp:{name:`Widget name`,placeholder:`Placeholder`,required:`Required validation`,multiple:`Allow multiple selection`,displaySetting:{name:`Display settings`,pc:`Desktop`,mobile:`Mobile`,visible:`Visible`,hidden:`Hidden`},dataSource:{name:`Data source`,defValue:`Option {0}`,addOption:`Add option`,batchEditOption:`Batch edit`,batchEditTip:`Each line corresponds to one option. You can copy and paste directly from tables, Excel, or WPS.`,batchEditSubTip:`Each line corresponds to one option. For groups, sub-items can start with spaces or tabs. You can copy and paste directly from tables, Excel, or WPS.`,buildOption:`Generate options`},rowProp:{colSize:`Columns`,col2:`Two columns`,col3:`Three columns`,col4:`Four columns`,col6:`Six columns`,layout:`Layout`},textProp:{name:`Content`,alignTitle:`Alignment`,alignLeft:`Left`,alignCenter:`Center`,alignRight:`Right`,colorTitle:`Font color`,sizeTitle:`Font size`,boldTitle:`Bold font`,fontNormal:`Normal`,fontBold:`Bold`},subtableProp:{seqTitle:`No.`,showSeq:`Show row number`,showCheckbox:`Allow multiple selection`,errSubDrag:`This widget is not supported in subtables. Please use another widget`,colPlace:`Drag a widget here`},uploadProp:{limitFileCount:`File count limit`,limitFileSize:`File size limit`,multiFile:`Allow uploading multiple files`,limitImgCount:`Image count limit`,limitImgSize:`Image size limit`,multiImg:`Allow uploading multiple images`},rules:{required:`Required field`}}},listDesign:{fieldSettingTab:`Field settings`,listSettingTab:`Options`,searchTitle:`Search conditions`,listTitle:`List fields`,searchField:`Search field`,listField:`List field`,activeBtn:{ActionButtonUpdate:`Edit`,ActionButtonDelete:`Delete`},search:{addBtn:`Edit`,emptyText:`No search conditions configured`,editPopupTitle:`Edit search field`},searchPopup:{colTitle:`Title`,saveBtn:`Save`}},text:{copySuccess:`Copied to clipboard`,copyError:`This operation is not supported in the current environment`},countdown:{formats:{yyyy:`Year`,MM:`Month`,dd:`Day`,HH:`Hour`,mm:`Minute`,ss:`Second`}},contextMenu:{loadingText:`Loading...`},switch:{onText:`On`,offText:`Off`},gantt:{tFullFormat:{year:`{yyyy}`,quarter:`Q{q} {yyyy}`,month:`{MM}/{yyyy}`,week:`Week {W}, {yyyy}`,day:`{MM}/{dd}/{yyyy} {eLabel}`,date:`{MM}/{dd}/{yyyy}`,hour:`{MM}/{dd}/{yyyy} {HH}:00`,minute:`{MM}/{dd}/{yyyy} {HH}:{mm}`,second:`{MM}/{dd}/{yyyy} {HH}:{mm}:{ss}`},tSimpleFormat:{year:`{yyyy}`,quarter:`Q{q}`,month:`{M}`,week:`W{W}`,day:`{eLabel}`,date:`{d}`,hour:`{HH}`,minute:`{mm}`,second:`{ss}`},stepFormat:{year:`{start.yyyy}~{end.yyyy}`,quarter:`Q{start.q}~Q{end.q}`,month:`{start.M}~{end.M}`,week:`W{start.W}~W{end.W}`,day:`{sE}~{eE}`,date:`{start.d}~{end.d}`,hour:`{start.HH}~{end.HH}`,minute:`{start.mm}~{end.mm}`,second:`{start.ss}~{end.ss}`},dayss:{w0:`Sun`,w1:`Mon`,w2:`Tue`,w3:`Wed`,w4:`Thu`,w5:`Fri`,w6:`Sat`},days:{w0:`Sun`,w1:`Mon`,w2:`Tue`,w3:`Wed`,w4:`Thu`,w5:`Fri`,w6:`Sat`}},plugins:{extendCellArea:{area:{mergeErr:`This operation cannot be performed on merged cells`,multiErr:`This operation cannot be performed on multiple selected areas`,selectErr:`Cannot operate on cells in the specified area`,extendErr:`To perform this operation, all merged cells must be the same size`,pasteMultiErr:`Cannot paste. The copied area and the paste area must be the same size to perform this operation`,cpInvalidErr:`This operation cannot be performed because the selected area contains prohibited columns ({0})`},fnr:{title:`Find and replace`,titleFd:`Find`,titleRe:`Replace`,findLabel:`Find`,replaceLabel:`Replace`,findTitle:`Find what:`,replaceTitle:`Replace with:`,tabs:{find:`Find`,replace:`Replace`},filter:{re:`Regular expression`,whole:`Match whole word`,sensitive:`Case sensitive`},btns:{findNext:`Find next`,findAll:`Find all`,replace:`Replace`,replaceAll:`Replace all`,cancel:`Cancel`},header:{seq:`#`,cell:`Cell`,value:`Value`},body:{row:`Row: {0}`,col:`Column: {0}`},empty:`(empty)`,reError:`Invalid regular expression`,recordCount:`{0} cells found`,notCell:`No matching cell found`,replaceSuccess:`Successfully replaced {0} cells`}},extendPivotTable:{aggregation:{grouping:`Group`,values:`Values`,groupPlaceholder:`Drag here to group`,valuesPlaceholder:`Drag here to aggregate`,dragExistCol:`This column already exists`,sortHelpTip:`Click the icon to start dragging`},aggFuncs:{sum:`Sum`,count:`Count`,avg:`Average`,min:`Min`,max:`Max`,first:`First`,last:`Last`}},filterComplexInput:{menus:{fixedColumn:`Fixed column`,fixedGroup:`Fixed group`,cancelFixed:`Unfix`,fixedLeft:`Fix left`,fixedRight:`Fix right`},cases:{equal:`Equals`,gt:`Greater`,lt:`Less`,begin:`Begins`,endin:`Ends`,include:`Contains`,isSensitive:`Case sensitive`}},filterCombination:{menus:{sort:`Sort`,clearSort:`Clear sort`,sortAsc:`Ascending`,sortDesc:`Descending`,fixedColumn:`Freeze column`,fixedGroup:`Freeze group`,cancelFixed:`Unfreeze`,fixedLeft:`Fix left`,fixedRight:`Fix right`,clearFilter:`Clear filter`,textOption:`Text filter`,numberOption:`Number filter`,dateOption:`Date filter`},popup:{title:`Custom filter method`,currColumnTitle:`Show rows:`,and:`And`,or:`Or`,describeHtml:`Available? Represents a single character<br/>Use * Represents any multiple characters`},cases:{equal:`Equals`,unequal:`Not equal`,gt:`Greater`,ge:`Greater or equal`,lt:`Less`,le:`Less or equal`,begin:`Start`,notbegin:`It's not at the beginning`,endin:`End`,notendin:`The ending is not`,include:`Include`,exclude:`Not included`,between:`Between`,isAfter:`Is after`,eqAfter:`Is on or after`,isBefore:`Is before`,eqBefore:`Is on or before`,top10:`Top 10`,aboveAverage:`Above average`,belowAverage:`Below average`,before:`Before`,after:`After`,tomorrow:`Tomorrow`,today:`Today`,yesterday:`Yesterday`,nextWeek:`Next Week`,thisWeek:`This Week`,lastWeek:`Last Week`,nextMonth:`Next Month`,thisMonth:`This Month`,lastMonth:`Last Month`,nextYear:`Next Year`,thisYear:`This Year`,lastYear:`Last Year`,yearToDate:`Year to Date`,custom:`Custom filter`,insensitive:`Case insensitive`,isSensitive:`Case sensitive`},empty:`(blank)`,notData:`No matches`}},pro:{area:{mergeErr:`This operation cannot be performed on merged cells`,multiErr:`This operation cannot be performed on multiple selected areas`,extendErr:`To perform this operation, all merged cells must be the same size`,pasteMultiErr:`Cannot paste. The copied area and the paste area must be the same size to perform this operation`},fnr:{title:`Find and replace`,titleFd:`Find`,titleRe:`Replace`,findLabel:`Find`,replaceLabel:`Replace`,findTitle:`Find what:`,replaceTitle:`Replace with:`,tabs:{find:`Find`,replace:`Replace`},filter:{re:`Regular expression`,whole:`Match whole word`,sensitive:`Case sensitive`},btns:{findNext:`Find next`,findAll:`Find all`,replace:`Replace`,replaceAll:`Replace all`,cancel:`Cancel`},header:{seq:`#`,cell:`Cell`,value:`Value`},empty:`(empty)`,reError:`Invalid regular expression`,recordCount:`{0} cells found`,notCell:`No matching cell found`,replaceSuccess:`Successfully replaced {0} cells`}},renderer:{search:`Search`,cases:{equal:`Equals`,unequal:`Not equal`,gt:`Greater`,ge:`Greater or equal`,lt:`Less`,le:`Less or equal`,begin:`Begins`,notbegin:`Not begin`,endin:`Ends`,notendin:`Not end`,include:`Contains`,exclude:`Not contain`,between:`Between`,top10:`Top 10`,aboveAverage:`Above average`,belowAverage:`Below average`,custom:`Custom filter`,insensitive:`Case insensitive`,isSensitive:`Case sensitive`},combination:{menus:{sort:`Sort`,clearSort:`Clear sort`,sortAsc:`Ascending`,sortDesc:`Descending`,fixedColumn:`Freeze column`,fixedGroup:`Freeze group`,cancelFixed:`Unfreeze`,fixedLeft:`Fix left`,fixedRight:`Fix right`,clearFilter:`Clear filter`,textOption:`Text filter`,numberOption:`Number filter`,dateOption:`Date filter`},popup:{title:`Custom filter method`,currColumnTitle:`Show rows:`,and:`And`,or:`Or`,describeHtml:`Use ? for a single character<br/>Use * for any number of characters`},empty:`(blank)`,notData:`No matches`}}}}})),uv=m(cv(),1),dv=m(lv(),1);a.VxeUI.setI18n(`zh-CN`,uv.default),a.VxeUI.setI18n(`en-US`,dv.default);var fv=(e,t)=>{let{fieldMap:n}=t||{};e.component(`ab-drawer`,ov),e.component(`ab-table`,Ep),e.component(`ab-table-detail`,Op);let{isZhCN:r}=R();r()?a.VxeUI.setLanguage(`zh-CN`):a.VxeUI.setLanguage(`en-US`)},pv={class:`ab-detail__title`},mv=(0,n.defineComponent)(V(V({},{name:`AbDetail`}),{},{__name:`ab-detail`,props:(0,n.mergeModels)({title:{},id:{},idField:{},idFieldTable:{},modelValue:{},rule:{},validRules:{},permiPrefix:{},getHandler:{},createHandler:{},updateHandler:{},deleteHandler:{},vertical:{type:Boolean},detailLevel:{default:1},editable:{type:Boolean,default:!0},readonly:{type:Boolean,default:!0}},{modelValue:{},modelModifiers:{}}),emits:(0,n.mergeModels)([`open`,`close`],[`update:modelValue`]),setup(e,{expose:t,emit:r}){let a=r,o=e,{t:s}=z(),c=(0,i.useRoute)(),l=(0,n.ref)(),u=(0,n.ref)({}),d=(0,n.ref)({}),f=(0,n.useModel)(e,`modelValue`);(0,n.ref)(o.vertical);let p=(0,n.ref)(o.readonly);(0,n.watch)(()=>o.readonly,e=>p.value=e,{immediate:!0}),(0,n.computed)(()=>o.detailLevel&&o.detailLevel<5?`${76-o.detailLevel*8}%`:`32%`);let m=(0,n.computed)(()=>o.id),h=(0,n.computed)(()=>{var e,t;return!((e=f.value)!=null&&e[o.idField])||((t=f.value)==null?void 0:t[o.idField])===`new`}),g=(0,n.computed)(()=>h.value?`${s(`action.create`)} - ${o.title||(c==null?void 0:c.meta.title)||``}`:p.value?`${s(`action.detail`)} - ${o.title||(c==null?void 0:c.meta.title)||``}`:`${s(`action.edit`)} - ${o.title||(c==null?void 0:c.meta.title)||``}`),_=(0,n.computed)(()=>{var e;return((e=o.rule)==null?[]:e).map(e=>typeof e.getRule==`function`?e.getRule():e)}),v=()=>{var e;p.value=!1,(e=u.value)==null||e.refresh()},y=function(){var e=H(function*(){w.value=!0;let e;h.value&&typeof o.createHandler==`function`?(e=yield o.createHandler(f.value),e&&(f.value[o.idField]=e),yield(0,n.nextTick)()):!h.value&&typeof o.updateHandler==`function`&&(e=yield o.updateHandler(f.value)),console.warn(`saveHandler: `,JSON.stringify(f.value,null,2)),w.value=!1});return function(){return e.apply(this,arguments)}}(),b=()=>{var e;p.value=!0,(e=u.value)==null||e.refresh()},x=()=>D(),S=(0,n.computed)(()=>{let e=Oa(_.value.find(e=>e.type!==X.OPERATE&&e.field===X.OPERATE));return e||(e={type:`ElRow`,field:X.OPERATE,title:`操作`,width:260,fixed:`right`,children:[]}),e.children=es(e==null?void 0:e.children,e=>e.field!==X.DETAIL),e!=null&&e.children&&Array.isArray(e==null?void 0:e.children)&&e.children.push({type:`ElButton`,children:[{type:`icon`,props:{icon:`ep:edit-pen`}},s(`action.edit`)],props:{type:`primary`},computed:{hidden:!p.value},on:{click:v}},{type:`ElButton`,children:[{type:`icon`,props:{icon:`ep:check`}},s(`action.save`)],props:{type:`success`,plain:!0},computed:{hidden:p.value},on:{click:y}},{type:`ElButton`,children:[{type:`icon`,props:{icon:`ep:refresh-right`}},s(`action.cancel`)],computed:{hidden:p.value},on:{click:b}},{type:`ElButton`,children:[{type:`icon`,props:{icon:`ep:back`}},s(`action.return`)],on:{click:x}}),e}),C=(0,n.computed)(()=>(0,n.reactive)(es(_.value,e=>e.type!==X.OPERATE&&e.field!==X.OPERATE).map(e=>ja(e,(e,t)=>{if(t===`component`&&e&&typeof e==`object`)return(0,n.markRaw)((0,n.toRaw)(e))})))),w=(0,n.ref)(!1),T=function(){var e=H(function*(){w.value=!0,console.log(`abDetail.init: `,m==null?void 0:m.value,S.value),m.value&&typeof o.getHandler==`function`?f.value=yield o.getHandler(m.value):f.value={},w.value=!1});return function(){return e.apply(this,arguments)}}();(0,n.onMounted)(()=>T());let E=function(){var e=H(function*(e=void 0,t=!1){var r;if(p.value=t,w.value=!0,typeof o.getHandler==`function`&&e!=null&&e[o.idField]){let t=yield o.getHandler(e==null?void 0:e[o.idField]);f.value=t||{}}else{var i;let t=Oa(e)||{};(i=o.rule)==null||i.forEach(e=>{let n=typeof e.getRule==`function`?e.getRule():e;n.field&&n.field!==X.OPERATE&&(t==null?void 0:t[n.field])===void 0&&n.edit===void 0&&n.itemRender===void 0&&(t[n.field]=``)}),f.value=t}yield(0,n.nextTick)(),(r=u.value)==null||r.refresh(),a(`open`,f.value),w.value=!1});return function(){return e.apply(this,arguments)}}(),D=()=>{p.value=!0,f.value={},a(`close`)};return t({open:E,close:D,toggle:(e=!1,t=void 0,n=!1)=>e?E(t,n):D(),reload:function(){var e=H(function*(){if(typeof o.getHandler!=`function`||!f.value[o.idField]){console.error(`abTableDetail.reload: no getHandler or no idField!`);return}let e=yield o.getHandler(f.value[o.idField]);E(e,p.value)});return function(){return e.apply(this,arguments)}}()}),(t,r)=>{let i=(0,n.resolveComponent)(`el-card`),a=(0,n.resolveComponent)(`ab-form`),o=(0,n.resolveDirective)(`loading`);return(0,n.openBlock)(),(0,n.createElementBlock)(n.Fragment,null,[(0,n.createVNode)(i,{class:`ab-detail__header w-full sticky top-0 z-9`,shadow:`never`},{default:(0,n.withCtx)(()=>[(0,n.createElementVNode)(`div`,pv,(0,n.toDisplayString)(g.value),1),(0,n.withDirectives)((0,n.createVNode)(bl,{class:`ab-detail__opr`,"permi-prefix":e.permiPrefix,rule:S.value,"model-value":f.value,api:d.value,"onUpdate:api":r[0]||(r[0]=e=>d.value=e),plain:``,readonly:p.value},null,8,[`permi-prefix`,`rule`,`model-value`,`api`,`readonly`]),[[o,w.value]])]),_:1}),(0,n.createVNode)(i,{class:`ab-detail__form`,shadow:`never`},{default:(0,n.withCtx)(()=>[(0,n.withDirectives)((0,n.createVNode)(a,{ref_key:`formRef`,ref:l,rule:C.value,modelValue:f.value,"onUpdate:modelValue":r[1]||(r[1]=e=>f.value=e),api:u.value,"onUpdate:api":r[2]||(r[2]=e=>u.value=e),"id-field":e.idField,"id-field-table":e.idFieldTable,readonly:p.value},null,8,[`rule`,`modelValue`,`api`,`id-field`,`id-field-table`,`readonly`]),[[o,w.value]])]),_:1})],64)}}})),hv=(e,t)=>{e.component(`ab-detail`,mv)},gv={key:0,class:`ab-toolbar__title`},_v={class:`ab-toolbar__title`},vv=(0,n.defineComponent)(V(V({},{name:`AbToolbar`}),{},{__name:`ab-toolbar`,props:(0,n.mergeModels)({title:{},permiPrefix:{},rule:{},queryHandler:{},refreshEnable:{type:Boolean,default:!0},exportEnable:{type:Boolean,default:!1},settingEnable:{type:Boolean,default:!0},btnTreeEnable:{type:Boolean},classNmae:{}},{vertical:{type:Boolean,default:!1},verticalModifiers:{}}),emits:[`update:vertical`],setup(e,{expose:t}){let r=e,a=(0,n.inject)(`abTableRef`,null),{t:o}=z(),s=(0,i.useRoute)();yl();let{wsCache:c}=R(),l=(0,n.computed)(()=>c.getCurrentSize||`default`),u=(0,n.computed)(()=>_l(l.value));(0,n.useModel)(e,`vertical`);let d=(0,n.ref)(!1),f=(0,n.computed)(()=>{var e;if(!r.rule||Array.isArray(r.rule)&&!((e=r.rule)!=null&&e.length))return;let t=Oa(r.rule);return Array.isArray(t)?{type:`ElRow`,children:[...t]}:t}),p=(0,n.computed)(()=>{var e;if(r.queryHandler)return r.queryHandler;if(typeof(a==null||(e=a.value)==null?void 0:e.reload)==`function`)return a.value.reload}),m=(0,n.ref)();return(0,n.onMounted)(()=>{var e;(e=a.value)==null||e.tableRef.connect(m.value)}),t({getTitle:()=>r.title}),(t,r)=>{let i=(0,n.resolveComponent)(`vxe-toolbar`);return(0,n.openBlock)(),(0,n.createBlock)(i,{ref_key:`toolbarRef`,ref:m,class:`ab-toolbar`,"class-name":e.classNmae,size:u.value,loading:d.value,export:e.exportEnable,refresh:e.refreshEnable,"refresh-options":e.refreshEnable&&p.value?{queryMethod:p.value}:void 0,custom:!!e.settingEnable},{buttons:(0,n.withCtx)(()=>[e.title?((0,n.openBlock)(),(0,n.createElementBlock)(`div`,gv,[(0,n.renderSlot)(t.$slots,`icon`),(0,n.createTextVNode)(` `+(0,n.toDisplayString)(e.title),1)])):(0,n.renderSlot)(t.$slots,`buttons`,{},()=>{var e;return[(0,n.createElementVNode)(`div`,_v,(0,n.toDisplayString)(((e=(0,n.unref)(s))==null||(e=e.meta)==null?void 0:e.title)||``),1)]},void 0,1)]),tools:(0,n.withCtx)(()=>[(0,n.renderSlot)(t.$slots,`tools`),(0,n.createVNode)(bl,{"permi-prefix":e.permiPrefix,rule:f.value,plain:``},null,8,[`permi-prefix`,`rule`])]),_:3},8,[`class-name`,`size`,`loading`,`export`,`refresh`,`refresh-options`,`custom`])}}})),yv=(e,t)=>{let{fieldMap:n}=t||{};e.component(`ab-toolbar`,vv)},bv=av();typeof window<`u`&&(window.abForm=bv);var xv=bv.maker;function Sv(e,t){t!=null&&t.upload&&e.provide(i_,t.upload),g(e,{AbForm:bv}),Ps(e),sv(e),fv(e),hv(e),yv(e)}e.AbForm=bv,e.AbTable=Ep,e.AbTableDetail=Op,e.AbTableEnum=X,e.AbUploadFile=f_,e.CACHE_KEY=ps,e.en=ds,e.getCurrentSize=xs,e.getLang=hs,e.getTheme=vs,e.getUser=Cs,e.isDark=ys,e.isZhCN=gs,e.maker=xv,e.setCurrentSize=bs,e.setLang=ms,e.setTheme=_s,e.setUser=Ss,e.setupArchbizKit=Sv,e.useCache=R,e.zhCN=fs});
|