vue-global-config
Advanced tools
Comparing version 0.2.4 to 0.2.5
@@ -23,15 +23,15 @@ declare type PropType<T> = PropConstructor<T> | PropConstructor<T>[]; | ||
/** | ||
* @param {any[]} configSequence - prop序列(优先级从高到低,最后是默认值) | ||
* @param {object} [config] - 配置 | ||
* @param {PropType<any>} [config.type] - 数据类型校验 | ||
* @param {any} [config.default] - 默认值(显式) | ||
* @param {boolean} [config.defaultIsDynamic = false] - 动态生成默认值 | ||
* @param {boolean} [config.required = false] - 是否必传校验 | ||
* @param {function} [config.validator] - 自定义校验 | ||
* @param {string} [config.camelCase = true] - 是否将对象的键统一为驼峰命名 | ||
* @param {false|string} [config.mergeObject = 'deep'] - 合并对象的方式 | ||
* @param {boolean} [config.mergeObjectApplyOnlyToDefault = false] - mergeObject仅作用于default | ||
* @param {false|((accumulator, currentValue, index?, array?) => Function)} [config.mergeFunction = false] - 融合函数的方式 | ||
* @param {boolean} [config.mergeFunctionApplyOnlyToDefault = true] - mergeFunction仅作用于default | ||
* @returns {any} 最终的prop | ||
* @param {any[]} configSequence - Config sequence (priority from highest to lowest, last is the default value) | ||
* @param {object} [config] - Configuration | ||
* @param {PropType<any>} [config.type] - Data type checking | ||
* @param {any} [config.default] - Default value (explicit) | ||
* @param {boolean} [config.defaultIsDynamic = false] - Dynamic generation of default values | ||
* @param {boolean} [config.required = false] - Requirement checking | ||
* @param {function} [config.validator] - Custom validator | ||
* @param {string} [config.camelCase = true] - Whether or not to unify the keys of the object as a hump naming | ||
* @param {false|string} [config.mergeObject = 'deep'] - The way to merge objects | ||
* @param {boolean} [config.mergeObjectApplyOnlyToDefault = false] - `mergeObject` only works on `default` | ||
* @param {false|((accumulator, currentValue, index?, array?) => Function)} [config.mergeFunction = false] - The way to fuse functions | ||
* @param {boolean} [config.mergeFunctionApplyOnlyToDefault = true] - `mergeFunction` only works on `default` | ||
* @returns {any} Final prop | ||
*/ | ||
@@ -38,0 +38,0 @@ export default function conclude(configSequence: any[], config?: { |
@@ -1,3 +0,4 @@ | ||
export default function listenGlobalHooks(globalHooks: { | ||
import type { ComponentPublicInstance } from 'vue-demi'; | ||
export default function listenGlobalHooks(this: ComponentPublicInstance, globalHooks: { | ||
[key: string]: any; | ||
}): void; |
@@ -1,1 +0,1 @@ | ||
(function(b,G){typeof exports=="object"&&typeof module<"u"?G(exports,require("vue-demi")):typeof define=="function"&&define.amd?define(["exports","vue-demi"],G):(b=typeof globalThis<"u"?globalThis:b||self,G(b["vue-global-config"]={},b.VueDemi))})(this,function(b,G){"use strict";function Me(e){const t=Array.from(e);return t[0]=t[0].toUpperCase(),t.unshift("n"),t.unshift("o"),t.join("")}function Ut(e,t=[]){const n={},r={},i={},a={},o=Array.isArray(t)?t:Object.keys(t);for(const s in e)if(s.startsWith("@")){const f=s.substring(1);G.isVue3?f.startsWith("vnode")?a[Me(f)]=e[s]:i[Me(f)]=e[s]:f.startsWith("hook:")?a[f]=e[s]:i[f]=e[s]}else o.includes(s)?n[s]=e[s]:r[s]=e[s];return{props:n,attrs:r,listeners:i,hooks:a}}var Bt=typeof global=="object"&&global&&global.Object===Object&&global;const Le=Bt;var Ht=typeof self=="object"&&self&&self.Object===Object&&self,Kt=Le||Ht||Function("return this")();const m=Kt;var Wt=m.Symbol;const w=Wt;var Fe=Object.prototype,zt=Fe.hasOwnProperty,Zt=Fe.toString,U=w?w.toStringTag:void 0;function qt(e){var t=zt.call(e,U),n=e[U];try{e[U]=void 0;var r=!0}catch{}var i=Zt.call(e);return r&&(t?e[U]=n:delete e[U]),i}var Xt=Object.prototype,Yt=Xt.toString;function Jt(e){return Yt.call(e)}var Qt="[object Null]",Vt="[object Undefined]",xe=w?w.toStringTag:void 0;function C(e){return e==null?e===void 0?Vt:Qt:xe&&xe in Object(e)?qt(e):Jt(e)}function P(e){return e!=null&&typeof e=="object"}var kt="[object Symbol]";function fe(e){return typeof e=="symbol"||P(e)&&C(e)==kt}function en(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 tn=Array.isArray;const A=tn;var nn=1/0,Re=w?w.prototype:void 0,De=Re?Re.toString:void 0;function Ne(e){if(typeof e=="string")return e;if(A(e))return en(e,Ne)+"";if(fe(e))return De?De.call(e):"";var t=e+"";return t=="0"&&1/e==-nn?"-0":t}function S(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}function ue(e){return e}var rn="[object AsyncFunction]",an="[object Function]",on="[object GeneratorFunction]",sn="[object Proxy]";function ce(e){if(!S(e))return!1;var t=C(e);return t==an||t==on||t==rn||t==sn}var fn=m["__core-js_shared__"];const le=fn;var Ge=function(){var e=/[^.]+$/.exec(le&&le.keys&&le.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function un(e){return!!Ge&&Ge in e}var cn=Function.prototype,ln=cn.toString;function j(e){if(e!=null){try{return ln.call(e)}catch{}try{return e+""}catch{}}return""}var gn=/[\\^$.*+?()[\]{}|]/g,pn=/^\[object .+?Constructor\]$/,dn=Function.prototype,hn=Object.prototype,yn=dn.toString,bn=hn.hasOwnProperty,vn=RegExp("^"+yn.call(bn).replace(gn,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function _n(e){if(!S(e)||un(e))return!1;var t=ce(e)?vn:pn;return t.test(j(e))}function Tn(e,t){return e==null?void 0:e[t]}function M(e,t){var n=Tn(e,t);return _n(n)?n:void 0}var $n=M(m,"WeakMap");const ge=$n;var Ue=Object.create,An=function(){function e(){}return function(t){if(!S(t))return{};if(Ue)return Ue(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();const On=An;function mn(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 Be(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}var wn=800,Pn=16,Sn=Date.now;function En(e){var t=0,n=0;return function(){var r=Sn(),i=Pn-(r-n);if(n=r,i>0){if(++t>=wn)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function In(e){return function(){return e}}var Cn=function(){try{var e=M(Object,"defineProperty");return e({},"",{}),e}catch{}}();const Y=Cn;var jn=Y?function(e,t){return Y(e,"toString",{configurable:!0,enumerable:!1,value:In(t),writable:!0})}:ue,Mn=En(jn);const Ln=Mn;function Fn(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e}var xn=9007199254740991,Rn=/^(?:0|[1-9]\d*)$/;function pe(e,t){var n=typeof e;return t=t==null?xn:t,!!t&&(n=="number"||n!="symbol"&&Rn.test(e))&&e>-1&&e%1==0&&e<t}function J(e,t,n){t=="__proto__"&&Y?Y(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function B(e,t){return e===t||e!==e&&t!==t}var Dn=Object.prototype,Nn=Dn.hasOwnProperty;function He(e,t,n){var r=e[t];(!(Nn.call(e,t)&&B(r,n))||n===void 0&&!(t in e))&&J(e,t,n)}function x(e,t,n,r){var i=!n;n||(n={});for(var a=-1,o=t.length;++a<o;){var s=t[a],f=r?r(n[s],e[s],s,n,e):void 0;f===void 0&&(f=e[s]),i?J(n,s,f):He(n,s,f)}return n}var Ke=Math.max;function Gn(e,t,n){return t=Ke(t===void 0?e.length-1:t,0),function(){for(var r=arguments,i=-1,a=Ke(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),mn(e,this,s)}}function Un(e,t){return Ln(Gn(e,t,ue),e+"")}var Bn=9007199254740991;function de(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Bn}function Q(e){return e!=null&&de(e.length)&&!ce(e)}function Hn(e,t,n){if(!S(n))return!1;var r=typeof t;return(r=="number"?Q(n)&&pe(t,n.length):r=="string"&&t in n)?B(n[t],e):!1}function We(e){return Un(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&&Hn(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 Kn=Object.prototype;function he(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||Kn;return e===n}function Wn(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var zn="[object Arguments]";function ze(e){return P(e)&&C(e)==zn}var Ze=Object.prototype,Zn=Ze.hasOwnProperty,qn=Ze.propertyIsEnumerable,Xn=ze(function(){return arguments}())?ze:function(e){return P(e)&&Zn.call(e,"callee")&&!qn.call(e,"callee")};const V=Xn;function Yn(){return!1}var qe=typeof b=="object"&&b&&!b.nodeType&&b,Xe=qe&&typeof module=="object"&&module&&!module.nodeType&&module,Jn=Xe&&Xe.exports===qe,Ye=Jn?m.Buffer:void 0,Qn=Ye?Ye.isBuffer:void 0,Vn=Qn||Yn;const H=Vn;var kn="[object Arguments]",er="[object Array]",tr="[object Boolean]",nr="[object Date]",rr="[object Error]",ir="[object Function]",ar="[object Map]",or="[object Number]",sr="[object Object]",fr="[object RegExp]",ur="[object Set]",cr="[object String]",lr="[object WeakMap]",gr="[object ArrayBuffer]",pr="[object DataView]",dr="[object Float32Array]",hr="[object Float64Array]",yr="[object Int8Array]",br="[object Int16Array]",vr="[object Int32Array]",_r="[object Uint8Array]",Tr="[object Uint8ClampedArray]",$r="[object Uint16Array]",Ar="[object Uint32Array]",h={};h[dr]=h[hr]=h[yr]=h[br]=h[vr]=h[_r]=h[Tr]=h[$r]=h[Ar]=!0,h[kn]=h[er]=h[gr]=h[tr]=h[pr]=h[nr]=h[rr]=h[ir]=h[ar]=h[or]=h[sr]=h[fr]=h[ur]=h[cr]=h[lr]=!1;function Or(e){return P(e)&&de(e.length)&&!!h[C(e)]}function ye(e){return function(t){return e(t)}}var Je=typeof b=="object"&&b&&!b.nodeType&&b,K=Je&&typeof module=="object"&&module&&!module.nodeType&&module,mr=K&&K.exports===Je,be=mr&&Le.process,wr=function(){try{var e=K&&K.require&&K.require("util").types;return e||be&&be.binding&&be.binding("util")}catch{}}();const R=wr;var Qe=R&&R.isTypedArray,Pr=Qe?ye(Qe):Or;const ve=Pr;var Sr=Object.prototype,Er=Sr.hasOwnProperty;function Ve(e,t){var n=A(e),r=!n&&V(e),i=!n&&!r&&H(e),a=!n&&!r&&!i&&ve(e),o=n||r||i||a,s=o?Wn(e.length,String):[],f=s.length;for(var g in e)(t||Er.call(e,g))&&!(o&&(g=="length"||i&&(g=="offset"||g=="parent")||a&&(g=="buffer"||g=="byteLength"||g=="byteOffset")||pe(g,f)))&&s.push(g);return s}function ke(e,t){return function(n){return e(t(n))}}var Ir=ke(Object.keys,Object);const Cr=Ir;var jr=Object.prototype,Mr=jr.hasOwnProperty;function Lr(e){if(!he(e))return Cr(e);var t=[];for(var n in Object(e))Mr.call(e,n)&&n!="constructor"&&t.push(n);return t}function W(e){return Q(e)?Ve(e):Lr(e)}function Fr(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var xr=Object.prototype,Rr=xr.hasOwnProperty;function Dr(e){if(!S(e))return Fr(e);var t=he(e),n=[];for(var r in e)r=="constructor"&&(t||!Rr.call(e,r))||n.push(r);return n}function D(e){return Q(e)?Ve(e,!0):Dr(e)}var Nr=We(function(e,t,n,r){x(t,D(t),e,r)});const Gr=Nr;var Ur=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Br=/^\w*$/;function _e(e,t){if(A(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||fe(e)?!0:Br.test(e)||!Ur.test(e)||t!=null&&e in Object(t)}var Hr=M(Object,"create");const z=Hr;function Kr(){this.__data__=z?z(null):{},this.size=0}function Wr(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var zr="__lodash_hash_undefined__",Zr=Object.prototype,qr=Zr.hasOwnProperty;function Xr(e){var t=this.__data__;if(z){var n=t[e];return n===zr?void 0:n}return qr.call(t,e)?t[e]:void 0}var Yr=Object.prototype,Jr=Yr.hasOwnProperty;function Qr(e){var t=this.__data__;return z?t[e]!==void 0:Jr.call(t,e)}var Vr="__lodash_hash_undefined__";function kr(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=z&&t===void 0?Vr:t,this}function L(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])}}L.prototype.clear=Kr,L.prototype.delete=Wr,L.prototype.get=Xr,L.prototype.has=Qr,L.prototype.set=kr;function ei(){this.__data__=[],this.size=0}function k(e,t){for(var n=e.length;n--;)if(B(e[n][0],t))return n;return-1}var ti=Array.prototype,ni=ti.splice;function ri(e){var t=this.__data__,n=k(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():ni.call(t,n,1),--this.size,!0}function ii(e){var t=this.__data__,n=k(t,e);return n<0?void 0:t[n][1]}function ai(e){return k(this.__data__,e)>-1}function oi(e,t){var n=this.__data__,r=k(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function E(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])}}E.prototype.clear=ei,E.prototype.delete=ri,E.prototype.get=ii,E.prototype.has=ai,E.prototype.set=oi;var si=M(m,"Map");const Z=si;function fi(){this.size=0,this.__data__={hash:new L,map:new(Z||E),string:new L}}function ui(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function ee(e,t){var n=e.__data__;return ui(t)?n[typeof t=="string"?"string":"hash"]:n.map}function ci(e){var t=ee(this,e).delete(e);return this.size-=t?1:0,t}function li(e){return ee(this,e).get(e)}function gi(e){return ee(this,e).has(e)}function pi(e,t){var n=ee(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function I(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])}}I.prototype.clear=fi,I.prototype.delete=ci,I.prototype.get=li,I.prototype.has=gi,I.prototype.set=pi;var di="Expected a function";function Te(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(di);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(Te.Cache||I),n}Te.Cache=I;var hi=500;function yi(e){var t=Te(e,function(r){return n.size===hi&&n.clear(),r}),n=t.cache;return t}var bi=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,vi=/\\(\\)?/g,_i=yi(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(bi,function(n,r,i,a){t.push(i?a.replace(vi,"$1"):r||n)}),t});const Ti=_i;function $i(e){return e==null?"":Ne(e)}function et(e,t){return A(e)?e:_e(e,t)?[e]:Ti($i(e))}var Ai=1/0;function te(e){if(typeof e=="string"||fe(e))return e;var t=e+"";return t=="0"&&1/e==-Ai?"-0":t}function tt(e,t){t=et(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[te(t[n++])];return n&&n==r?e:void 0}function Oi(e,t,n){var r=e==null?void 0:tt(e,t);return r===void 0?n:r}function nt(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}var mi=ke(Object.getPrototypeOf,Object);const $e=mi;var wi="[object Object]",Pi=Function.prototype,Si=Object.prototype,rt=Pi.toString,Ei=Si.hasOwnProperty,Ii=rt.call(Object);function it(e){if(!P(e)||C(e)!=wi)return!1;var t=$e(e);if(t===null)return!0;var n=Ei.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&rt.call(n)==Ii}function Ci(){this.__data__=new E,this.size=0}function ji(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function Mi(e){return this.__data__.get(e)}function Li(e){return this.__data__.has(e)}var Fi=200;function xi(e,t){var n=this.__data__;if(n instanceof E){var r=n.__data__;if(!Z||r.length<Fi-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new I(r)}return n.set(e,t),this.size=n.size,this}function O(e){var t=this.__data__=new E(e);this.size=t.size}O.prototype.clear=Ci,O.prototype.delete=ji,O.prototype.get=Mi,O.prototype.has=Li,O.prototype.set=xi;function Ri(e,t){return e&&x(t,W(t),e)}function Di(e,t){return e&&x(t,D(t),e)}var at=typeof b=="object"&&b&&!b.nodeType&&b,ot=at&&typeof module=="object"&&module&&!module.nodeType&&module,Ni=ot&&ot.exports===at,st=Ni?m.Buffer:void 0,ft=st?st.allocUnsafe:void 0;function ut(e,t){if(t)return e.slice();var n=e.length,r=ft?ft(n):new e.constructor(n);return e.copy(r),r}function Gi(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 ct(){return[]}var Ui=Object.prototype,Bi=Ui.propertyIsEnumerable,lt=Object.getOwnPropertySymbols,Hi=lt?function(e){return e==null?[]:(e=Object(e),Gi(lt(e),function(t){return Bi.call(e,t)}))}:ct;const Ae=Hi;function Ki(e,t){return x(e,Ae(e),t)}var Wi=Object.getOwnPropertySymbols,zi=Wi?function(e){for(var t=[];e;)nt(t,Ae(e)),e=$e(e);return t}:ct;const gt=zi;function Zi(e,t){return x(e,gt(e),t)}function pt(e,t,n){var r=t(e);return A(e)?r:nt(r,n(e))}function Oe(e){return pt(e,W,Ae)}function qi(e){return pt(e,D,gt)}var Xi=M(m,"DataView");const me=Xi;var Yi=M(m,"Promise");const we=Yi;var Ji=M(m,"Set");const Pe=Ji;var dt="[object Map]",Qi="[object Object]",ht="[object Promise]",yt="[object Set]",bt="[object WeakMap]",vt="[object DataView]",Vi=j(me),ki=j(Z),ea=j(we),ta=j(Pe),na=j(ge),F=C;(me&&F(new me(new ArrayBuffer(1)))!=vt||Z&&F(new Z)!=dt||we&&F(we.resolve())!=ht||Pe&&F(new Pe)!=yt||ge&&F(new ge)!=bt)&&(F=function(e){var t=C(e),n=t==Qi?e.constructor:void 0,r=n?j(n):"";if(r)switch(r){case Vi:return vt;case ki:return dt;case ea:return ht;case ta:return yt;case na:return bt}return t});const q=F;var ra=Object.prototype,ia=ra.hasOwnProperty;function aa(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]=="string"&&ia.call(e,"index")&&(n.index=e.index,n.input=e.input),n}var oa=m.Uint8Array;const ne=oa;function Se(e){var t=new e.constructor(e.byteLength);return new ne(t).set(new ne(e)),t}function sa(e,t){var n=t?Se(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}var fa=/\w*$/;function ua(e){var t=new e.constructor(e.source,fa.exec(e));return t.lastIndex=e.lastIndex,t}var _t=w?w.prototype:void 0,Tt=_t?_t.valueOf:void 0;function ca(e){return Tt?Object(Tt.call(e)):{}}function $t(e,t){var n=t?Se(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var la="[object Boolean]",ga="[object Date]",pa="[object Map]",da="[object Number]",ha="[object RegExp]",ya="[object Set]",ba="[object String]",va="[object Symbol]",_a="[object ArrayBuffer]",Ta="[object DataView]",$a="[object Float32Array]",Aa="[object Float64Array]",Oa="[object Int8Array]",ma="[object Int16Array]",wa="[object Int32Array]",Pa="[object Uint8Array]",Sa="[object Uint8ClampedArray]",Ea="[object Uint16Array]",Ia="[object Uint32Array]";function Ca(e,t,n){var r=e.constructor;switch(t){case _a:return Se(e);case la:case ga:return new r(+e);case Ta:return sa(e,n);case $a:case Aa:case Oa:case ma:case wa:case Pa:case Sa:case Ea:case Ia:return $t(e,n);case pa:return new r;case da:case ba:return new r(e);case ha:return ua(e);case ya:return new r;case va:return ca(e)}}function At(e){return typeof e.constructor=="function"&&!he(e)?On($e(e)):{}}var ja="[object Map]";function Ma(e){return P(e)&&q(e)==ja}var Ot=R&&R.isMap,La=Ot?ye(Ot):Ma;const Fa=La;var xa="[object Set]";function Ra(e){return P(e)&&q(e)==xa}var mt=R&&R.isSet,Da=mt?ye(mt):Ra;const Na=Da;var Ga=1,Ua=2,Ba=4,wt="[object Arguments]",Ha="[object Array]",Ka="[object Boolean]",Wa="[object Date]",za="[object Error]",Pt="[object Function]",Za="[object GeneratorFunction]",qa="[object Map]",Xa="[object Number]",St="[object Object]",Ya="[object RegExp]",Ja="[object Set]",Qa="[object String]",Va="[object Symbol]",ka="[object WeakMap]",eo="[object ArrayBuffer]",to="[object DataView]",no="[object Float32Array]",ro="[object Float64Array]",io="[object Int8Array]",ao="[object Int16Array]",oo="[object Int32Array]",so="[object Uint8Array]",fo="[object Uint8ClampedArray]",uo="[object Uint16Array]",co="[object Uint32Array]",d={};d[wt]=d[Ha]=d[eo]=d[to]=d[Ka]=d[Wa]=d[no]=d[ro]=d[io]=d[ao]=d[oo]=d[qa]=d[Xa]=d[St]=d[Ya]=d[Ja]=d[Qa]=d[Va]=d[so]=d[fo]=d[uo]=d[co]=!0,d[za]=d[Pt]=d[ka]=!1;function re(e,t,n,r,i,a){var o,s=t&Ga,f=t&Ua,g=t&Ba;if(n&&(o=i?n(e,r,i,a):n(e)),o!==void 0)return o;if(!S(e))return e;var u=A(e);if(u){if(o=aa(e),!s)return Be(e,o)}else{var l=q(e),c=l==Pt||l==Za;if(H(e))return ut(e,s);if(l==St||l==wt||c&&!i){if(o=f||c?{}:At(e),!s)return f?Zi(e,Di(o,e)):Ki(e,Ri(o,e))}else{if(!d[l])return i?e:{};o=Ca(e,l,s)}}a||(a=new O);var y=a.get(e);if(y)return y;a.set(e,o),Na(e)?e.forEach(function(_){o.add(re(_,t,n,_,e,a))}):Fa(e)&&e.forEach(function(_,p){o.set(p,re(_,t,n,p,e,a))});var v=g?f?qi:Oe:f?D:W,T=u?void 0:v(e);return Fn(T||e,function(_,p){T&&(p=_,_=e[p]),He(o,p,re(_,t,n,p,e,a))}),o}var lo=1,go=4;function po(e){return re(e,lo|go)}var ho="__lodash_hash_undefined__";function yo(e){return this.__data__.set(e,ho),this}function bo(e){return this.__data__.has(e)}function ie(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new I;++t<n;)this.add(e[t])}ie.prototype.add=ie.prototype.push=yo,ie.prototype.has=bo;function vo(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 _o(e,t){return e.has(t)}var To=1,$o=2;function Et(e,t,n,r,i,a){var o=n&To,s=e.length,f=t.length;if(s!=f&&!(o&&f>s))return!1;var g=a.get(e),u=a.get(t);if(g&&u)return g==t&&u==e;var l=-1,c=!0,y=n&$o?new ie:void 0;for(a.set(e,t),a.set(t,e);++l<s;){var v=e[l],T=t[l];if(r)var _=o?r(T,v,l,t,e,a):r(v,T,l,e,t,a);if(_!==void 0){if(_)continue;c=!1;break}if(y){if(!vo(t,function(p,$){if(!_o(y,$)&&(v===p||i(v,p,n,r,a)))return y.push($)})){c=!1;break}}else if(!(v===T||i(v,T,n,r,a))){c=!1;break}}return a.delete(e),a.delete(t),c}function Ao(e){var t=-1,n=Array(e.size);return e.forEach(function(r,i){n[++t]=[i,r]}),n}function Oo(e){var t=-1,n=Array(e.size);return e.forEach(function(r){n[++t]=r}),n}var mo=1,wo=2,Po="[object Boolean]",So="[object Date]",Eo="[object Error]",Io="[object Map]",Co="[object Number]",jo="[object RegExp]",Mo="[object Set]",Lo="[object String]",Fo="[object Symbol]",xo="[object ArrayBuffer]",Ro="[object DataView]",It=w?w.prototype:void 0,Ee=It?It.valueOf:void 0;function Do(e,t,n,r,i,a,o){switch(n){case Ro:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case xo:return!(e.byteLength!=t.byteLength||!a(new ne(e),new ne(t)));case Po:case So:case Co:return B(+e,+t);case Eo:return e.name==t.name&&e.message==t.message;case jo:case Lo:return e==t+"";case Io:var s=Ao;case Mo:var f=r&mo;if(s||(s=Oo),e.size!=t.size&&!f)return!1;var g=o.get(e);if(g)return g==t;r|=wo,o.set(e,t);var u=Et(s(e),s(t),r,i,a,o);return o.delete(e),u;case Fo:if(Ee)return Ee.call(e)==Ee.call(t)}return!1}var No=1,Go=Object.prototype,Uo=Go.hasOwnProperty;function Bo(e,t,n,r,i,a){var o=n&No,s=Oe(e),f=s.length,g=Oe(t),u=g.length;if(f!=u&&!o)return!1;for(var l=f;l--;){var c=s[l];if(!(o?c in t:Uo.call(t,c)))return!1}var y=a.get(e),v=a.get(t);if(y&&v)return y==t&&v==e;var T=!0;a.set(e,t),a.set(t,e);for(var _=o;++l<f;){c=s[l];var p=e[c],$=t[c];if(r)var se=o?r($,p,c,t,e,a):r(p,$,c,e,t,a);if(!(se===void 0?p===$||i(p,$,n,r,a):se)){T=!1;break}_||(_=c=="constructor")}if(T&&!_){var X=e.constructor,N=t.constructor;X!=N&&"constructor"in e&&"constructor"in t&&!(typeof X=="function"&&X instanceof X&&typeof N=="function"&&N instanceof N)&&(T=!1)}return a.delete(e),a.delete(t),T}var Ho=1,Ct="[object Arguments]",jt="[object Array]",ae="[object Object]",Ko=Object.prototype,Mt=Ko.hasOwnProperty;function Wo(e,t,n,r,i,a){var o=A(e),s=A(t),f=o?jt:q(e),g=s?jt:q(t);f=f==Ct?ae:f,g=g==Ct?ae:g;var u=f==ae,l=g==ae,c=f==g;if(c&&H(e)){if(!H(t))return!1;o=!0,u=!1}if(c&&!u)return a||(a=new O),o||ve(e)?Et(e,t,n,r,i,a):Do(e,t,f,n,r,i,a);if(!(n&Ho)){var y=u&&Mt.call(e,"__wrapped__"),v=l&&Mt.call(t,"__wrapped__");if(y||v){var T=y?e.value():e,_=v?t.value():t;return a||(a=new O),i(T,_,n,r,a)}}return c?(a||(a=new O),Bo(e,t,n,r,i,a)):!1}function Ie(e,t,n,r,i){return e===t?!0:e==null||t==null||!P(e)&&!P(t)?e!==e&&t!==t:Wo(e,t,n,r,Ie,i)}var zo=1,Zo=2;function qo(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 f=s[0],g=e[f],u=s[1];if(o&&s[2]){if(g===void 0&&!(f in e))return!1}else{var l=new O;if(r)var c=r(g,u,f,e,t,l);if(!(c===void 0?Ie(u,g,zo|Zo,r,l):c))return!1}}return!0}function Lt(e){return e===e&&!S(e)}function Xo(e){for(var t=W(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,Lt(i)]}return t}function Ft(e,t){return function(n){return n==null?!1:n[e]===t&&(t!==void 0||e in Object(n))}}function Yo(e){var t=Xo(e);return t.length==1&&t[0][2]?Ft(t[0][0],t[0][1]):function(n){return n===e||qo(n,e,t)}}function Jo(e,t){return e!=null&&t in Object(e)}function Qo(e,t,n){t=et(t,e);for(var r=-1,i=t.length,a=!1;++r<i;){var o=te(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&&de(i)&&pe(o,i)&&(A(e)||V(e)))}function Vo(e,t){return e!=null&&Qo(e,t,Jo)}var ko=1,es=2;function ts(e,t){return _e(e)&&Lt(t)?Ft(te(e),t):function(n){var r=Oi(n,e);return r===void 0&&r===t?Vo(n,e):Ie(t,r,ko|es)}}function ns(e){return function(t){return t==null?void 0:t[e]}}function rs(e){return function(t){return tt(t,e)}}function is(e){return _e(e)?ns(te(e)):rs(e)}function as(e){return typeof e=="function"?e:e==null?ue:typeof e=="object"?A(e)?ts(e[0],e[1]):Yo(e):is(e)}function os(e){return function(t,n,r){for(var i=-1,a=Object(t),o=r(t),s=o.length;s--;){var f=o[e?s:++i];if(n(a[f],f,a)===!1)break}return t}}var ss=os();const xt=ss;function fs(e,t){return e&&xt(e,t,W)}function Ce(e,t,n){(n!==void 0&&!B(e[t],n)||n===void 0&&!(t in e))&&J(e,t,n)}function us(e){return P(e)&&Q(e)}function je(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}function cs(e){return x(e,D(e))}function ls(e,t,n,r,i,a,o){var s=je(e,n),f=je(t,n),g=o.get(f);if(g){Ce(e,n,g);return}var u=a?a(s,f,n+"",e,t,o):void 0,l=u===void 0;if(l){var c=A(f),y=!c&&H(f),v=!c&&!y&&ve(f);u=f,c||y||v?A(s)?u=s:us(s)?u=Be(s):y?(l=!1,u=ut(f,!0)):v?(l=!1,u=$t(f,!0)):u=[]:it(f)||V(f)?(u=s,V(s)?u=cs(s):(!S(s)||ce(s))&&(u=At(f))):l=!1}l&&(o.set(f,u),i(u,f,r,a,o),o.delete(f)),Ce(e,n,u)}function Rt(e,t,n,r,i){e!==t&&xt(t,function(a,o){if(i||(i=new O),S(a))ls(e,t,o,n,Rt,r,i);else{var s=r?r(je(e,o),a,o+"",e,t,i):void 0;s===void 0&&(s=a),Ce(e,o,s)}},D)}var gs=We(function(e,t,n,r){Rt(e,t,n,r)});const ps=gs;function ds(e,t){var n={};return t=as(t),fs(e,function(r,i,a){J(n,t(r,i,a),r)}),n}var oe=function(){return oe=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},oe.apply(this,arguments)};function hs(e){return e.toLowerCase()}var ys=[/([a-z0-9])([A-Z])/g,/([A-Z])([A-Z][a-z])/g],bs=/[^A-Z0-9]+/gi;function vs(e,t){t===void 0&&(t={});for(var n=t.splitRegexp,r=n===void 0?ys:n,i=t.stripRegexp,a=i===void 0?bs:i,o=t.transform,s=o===void 0?hs:o,f=t.delimiter,g=f===void 0?" ":f,u=Dt(Dt(e,r,"$1\0$2"),a,"\0"),l=0,c=u.length;u.charAt(l)==="\0";)l++;for(;u.charAt(c-1)==="\0";)c--;return u.slice(l,c).split("\0").map(s).join(g)}function Dt(e,t,n){return t instanceof RegExp?e.replace(t,n):t.reduce(function(r,i){return r.replace(i,n)},e)}function Nt(e,t){var n=e.charAt(0),r=e.substr(1).toLowerCase();return t>0&&n>="0"&&n<="9"?"_"+n+r:""+n.toUpperCase()+r}function _s(e,t){return t===void 0&&(t={}),vs(e,oe({delimiter:"",transform:Nt},t))}function Ts(e,t){return t===0?e.toLowerCase():Nt(e,t)}function $s(e,t){return t===void 0&&(t={}),_s(e,oe({transform:Ts},t))}function As(e,t){const n=Object.create(null),r=e.split(",");for(let i=0;i<r.length;i++)n[r[i]]=!0;return t?i=>!!n[i.toLowerCase()]:i=>!!n[i]}const Os=As("String,Number,Boolean,Function,Symbol,BigInt");function ms(e){const t=e&&e.toString().match(/^\s*function (\w+)/);return t?t[1]:e===null?"null":""}function ws(e,t){let n;const r=ms(t);if(Os(r)){const i=typeof e;n=i===r.toLowerCase(),!n&&i==="object"&&(n=e instanceof t)}else r==="Object"?n=S(e):r==="Array"?n=Array.isArray(e):r==="null"?n=e===null:n=e instanceof t;return{valid:n,expectedType:r}}function Ps({prop:e,type:t,validator:n}){if(![void 0,null].includes(e)&&t){let r=!1;const i=Array.isArray(t)?t:[t],a=[];for(let o=0;o<i.length&&!r;o++){const{valid:s,expectedType:f}=ws(e,i[o]);a.push(f||""),r=s}if(!r)throw new Error(`Invalid prop: type check failed, expecting [${a.join(", ")}], receiving: ${e}`)}if(n&&!n(e))throw new Error(`Invalid prop: validator check failed, receiving: ${e}`)}function Ss(e,{mergeObject:t,mergeFunction:n}){const r=[];for(let a=e.length-1;a>=0;a--)r.push(e[a]);const i=n?(a,o)=>a instanceof Function&&o instanceof Function?n(o,a):void 0:void 0;return t==="deep"?ps(...r,i):Gr(...r,i)}function Es(e,{mergeFunction:t}){return e.reduce(t,()=>{})}function Gt(e,t={}){const{type:n,default:r,defaultIsDynamic:i=!1,required:a=!1,validator:o,camelCase:s=!0,mergeObjectApplyOnlyToDefault:f=!1,mergeFunctionApplyOnlyToDefault:g=!0}=t;let{mergeObject:u="deep",mergeFunction:l=!1}=t;const c=[];let y,v=!1,T=!1;const _=p=>{if(p!==void 0){Ps({type:n,prop:p,validator:o});const $=it(p),se=p instanceof Function;return v=$,T=se,$?(p=po(p),s?ds(p,(X,N)=>$s(N,{stripRegexp:/-/g})):p):p}};for(const p of e)c.push(_(p));if(!i)c.push(_(r));else if(!(r instanceof Function))throw new TypeError(`Invalid option: config.default should be Function when config.defaultIsDynamic enabled, receiving: ${r}`);v||(u=!1,T||(l=!1));for(let p=0;p<c.length;p++){const $=c[p];if($!==void 0){p===c.length-1?y=$:u?y=Ss(f?[$,r]:c,{mergeObject:u,mergeFunction:l}):l?y=Es(g?[$,r]:c,{mergeFunction:l}):y=$;break}}if(a&&[void 0,null].includes(y))throw new Error("Missing required prop");return i?Gt(e,{...t,default:r(y),defaultIsDynamic:!1}):y}function Is(e,t){return Object.keys(e).filter(n=>t(n)).reduce((n,r)=>(n[r]=e[r],n),{})}function Cs(e){return Is(e,t=>!t.startsWith("hook:"))}function js(e){if(Object.getOwnPropertyNames(e||{}).length){const t=this.$emit;this.$emit=function(){var i;t.apply(this,arguments);const[n,...r]=arguments;(i=e[n])==null||i.apply(this,r)}}}b.conclude=Gt,b.getLocalListeners=Cs,b.listenGlobalHooks=js,b.useGlobalConfig=Ut,Object.defineProperties(b,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}); | ||
(function(v,G){typeof exports=="object"&&typeof module<"u"?G(exports,require("vue-demi")):typeof define=="function"&&define.amd?define(["exports","vue-demi"],G):(v=typeof globalThis<"u"?globalThis:v||self,G(v["vue-global-config"]={},v.VueDemi))})(this,function(v,G){"use strict";function Me(e){const t=Array.from(e);return t[0]=t[0].toUpperCase(),t.unshift("n"),t.unshift("o"),t.join("")}function Ut(e,t=[]){const n={},r={},i={},a={},o=Array.isArray(t)?t:Object.keys(t);for(const s in e)if(s.startsWith("@")){const f=s.substring(1);G.isVue3?f.startsWith("vnode")?a[Me(f)]=e[s]:i[Me(f)]=e[s]:f.startsWith("hook:")?a[f]=e[s]:i[f]=e[s]}else o.includes(s)?n[s]=e[s]:r[s]=e[s];return{props:n,attrs:r,listeners:i,hooks:a}}var Bt=typeof global=="object"&&global&&global.Object===Object&&global;const Le=Bt;var Ht=typeof self=="object"&&self&&self.Object===Object&&self,Kt=Le||Ht||Function("return this")();const m=Kt;var Wt=m.Symbol;const w=Wt;var Fe=Object.prototype,zt=Fe.hasOwnProperty,Zt=Fe.toString,U=w?w.toStringTag:void 0;function qt(e){var t=zt.call(e,U),n=e[U];try{e[U]=void 0;var r=!0}catch{}var i=Zt.call(e);return r&&(t?e[U]=n:delete e[U]),i}var Xt=Object.prototype,Yt=Xt.toString;function Jt(e){return Yt.call(e)}var Qt="[object Null]",Vt="[object Undefined]",xe=w?w.toStringTag:void 0;function C(e){return e==null?e===void 0?Vt:Qt:xe&&xe in Object(e)?qt(e):Jt(e)}function P(e){return e!=null&&typeof e=="object"}var kt="[object Symbol]";function fe(e){return typeof e=="symbol"||P(e)&&C(e)==kt}function en(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 tn=Array.isArray;const A=tn;var nn=1/0,Re=w?w.prototype:void 0,De=Re?Re.toString:void 0;function Ne(e){if(typeof e=="string")return e;if(A(e))return en(e,Ne)+"";if(fe(e))return De?De.call(e):"";var t=e+"";return t=="0"&&1/e==-nn?"-0":t}function S(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}function ue(e){return e}var rn="[object AsyncFunction]",an="[object Function]",on="[object GeneratorFunction]",sn="[object Proxy]";function ce(e){if(!S(e))return!1;var t=C(e);return t==an||t==on||t==rn||t==sn}var fn=m["__core-js_shared__"];const le=fn;var Ge=function(){var e=/[^.]+$/.exec(le&&le.keys&&le.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function un(e){return!!Ge&&Ge in e}var cn=Function.prototype,ln=cn.toString;function j(e){if(e!=null){try{return ln.call(e)}catch{}try{return e+""}catch{}}return""}var gn=/[\\^$.*+?()[\]{}|]/g,pn=/^\[object .+?Constructor\]$/,dn=Function.prototype,hn=Object.prototype,yn=dn.toString,vn=hn.hasOwnProperty,bn=RegExp("^"+yn.call(vn).replace(gn,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function _n(e){if(!S(e)||un(e))return!1;var t=ce(e)?bn:pn;return t.test(j(e))}function Tn(e,t){return e==null?void 0:e[t]}function M(e,t){var n=Tn(e,t);return _n(n)?n:void 0}var $n=M(m,"WeakMap");const ge=$n;var Ue=Object.create,An=function(){function e(){}return function(t){if(!S(t))return{};if(Ue)return Ue(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();const On=An;function mn(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 Be(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}var wn=800,Pn=16,Sn=Date.now;function En(e){var t=0,n=0;return function(){var r=Sn(),i=Pn-(r-n);if(n=r,i>0){if(++t>=wn)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function In(e){return function(){return e}}var Cn=function(){try{var e=M(Object,"defineProperty");return e({},"",{}),e}catch{}}();const Y=Cn;var jn=Y?function(e,t){return Y(e,"toString",{configurable:!0,enumerable:!1,value:In(t),writable:!0})}:ue,Mn=En(jn);const Ln=Mn;function Fn(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e}var xn=9007199254740991,Rn=/^(?:0|[1-9]\d*)$/;function pe(e,t){var n=typeof e;return t=t==null?xn:t,!!t&&(n=="number"||n!="symbol"&&Rn.test(e))&&e>-1&&e%1==0&&e<t}function J(e,t,n){t=="__proto__"&&Y?Y(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function B(e,t){return e===t||e!==e&&t!==t}var Dn=Object.prototype,Nn=Dn.hasOwnProperty;function He(e,t,n){var r=e[t];(!(Nn.call(e,t)&&B(r,n))||n===void 0&&!(t in e))&&J(e,t,n)}function x(e,t,n,r){var i=!n;n||(n={});for(var a=-1,o=t.length;++a<o;){var s=t[a],f=r?r(n[s],e[s],s,n,e):void 0;f===void 0&&(f=e[s]),i?J(n,s,f):He(n,s,f)}return n}var Ke=Math.max;function Gn(e,t,n){return t=Ke(t===void 0?e.length-1:t,0),function(){for(var r=arguments,i=-1,a=Ke(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),mn(e,this,s)}}function Un(e,t){return Ln(Gn(e,t,ue),e+"")}var Bn=9007199254740991;function de(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Bn}function Q(e){return e!=null&&de(e.length)&&!ce(e)}function Hn(e,t,n){if(!S(n))return!1;var r=typeof t;return(r=="number"?Q(n)&&pe(t,n.length):r=="string"&&t in n)?B(n[t],e):!1}function We(e){return Un(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&&Hn(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 Kn=Object.prototype;function he(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||Kn;return e===n}function Wn(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var zn="[object Arguments]";function ze(e){return P(e)&&C(e)==zn}var Ze=Object.prototype,Zn=Ze.hasOwnProperty,qn=Ze.propertyIsEnumerable,Xn=ze(function(){return arguments}())?ze:function(e){return P(e)&&Zn.call(e,"callee")&&!qn.call(e,"callee")};const V=Xn;function Yn(){return!1}var qe=typeof v=="object"&&v&&!v.nodeType&&v,Xe=qe&&typeof module=="object"&&module&&!module.nodeType&&module,Jn=Xe&&Xe.exports===qe,Ye=Jn?m.Buffer:void 0,Qn=Ye?Ye.isBuffer:void 0,Vn=Qn||Yn;const H=Vn;var kn="[object Arguments]",er="[object Array]",tr="[object Boolean]",nr="[object Date]",rr="[object Error]",ir="[object Function]",ar="[object Map]",or="[object Number]",sr="[object Object]",fr="[object RegExp]",ur="[object Set]",cr="[object String]",lr="[object WeakMap]",gr="[object ArrayBuffer]",pr="[object DataView]",dr="[object Float32Array]",hr="[object Float64Array]",yr="[object Int8Array]",vr="[object Int16Array]",br="[object Int32Array]",_r="[object Uint8Array]",Tr="[object Uint8ClampedArray]",$r="[object Uint16Array]",Ar="[object Uint32Array]",h={};h[dr]=h[hr]=h[yr]=h[vr]=h[br]=h[_r]=h[Tr]=h[$r]=h[Ar]=!0,h[kn]=h[er]=h[gr]=h[tr]=h[pr]=h[nr]=h[rr]=h[ir]=h[ar]=h[or]=h[sr]=h[fr]=h[ur]=h[cr]=h[lr]=!1;function Or(e){return P(e)&&de(e.length)&&!!h[C(e)]}function ye(e){return function(t){return e(t)}}var Je=typeof v=="object"&&v&&!v.nodeType&&v,K=Je&&typeof module=="object"&&module&&!module.nodeType&&module,mr=K&&K.exports===Je,ve=mr&&Le.process,wr=function(){try{var e=K&&K.require&&K.require("util").types;return e||ve&&ve.binding&&ve.binding("util")}catch{}}();const R=wr;var Qe=R&&R.isTypedArray,Pr=Qe?ye(Qe):Or;const be=Pr;var Sr=Object.prototype,Er=Sr.hasOwnProperty;function Ve(e,t){var n=A(e),r=!n&&V(e),i=!n&&!r&&H(e),a=!n&&!r&&!i&&be(e),o=n||r||i||a,s=o?Wn(e.length,String):[],f=s.length;for(var g in e)(t||Er.call(e,g))&&!(o&&(g=="length"||i&&(g=="offset"||g=="parent")||a&&(g=="buffer"||g=="byteLength"||g=="byteOffset")||pe(g,f)))&&s.push(g);return s}function ke(e,t){return function(n){return e(t(n))}}var Ir=ke(Object.keys,Object);const Cr=Ir;var jr=Object.prototype,Mr=jr.hasOwnProperty;function Lr(e){if(!he(e))return Cr(e);var t=[];for(var n in Object(e))Mr.call(e,n)&&n!="constructor"&&t.push(n);return t}function W(e){return Q(e)?Ve(e):Lr(e)}function Fr(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var xr=Object.prototype,Rr=xr.hasOwnProperty;function Dr(e){if(!S(e))return Fr(e);var t=he(e),n=[];for(var r in e)r=="constructor"&&(t||!Rr.call(e,r))||n.push(r);return n}function D(e){return Q(e)?Ve(e,!0):Dr(e)}var Nr=We(function(e,t,n,r){x(t,D(t),e,r)});const Gr=Nr;var Ur=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Br=/^\w*$/;function _e(e,t){if(A(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||fe(e)?!0:Br.test(e)||!Ur.test(e)||t!=null&&e in Object(t)}var Hr=M(Object,"create");const z=Hr;function Kr(){this.__data__=z?z(null):{},this.size=0}function Wr(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var zr="__lodash_hash_undefined__",Zr=Object.prototype,qr=Zr.hasOwnProperty;function Xr(e){var t=this.__data__;if(z){var n=t[e];return n===zr?void 0:n}return qr.call(t,e)?t[e]:void 0}var Yr=Object.prototype,Jr=Yr.hasOwnProperty;function Qr(e){var t=this.__data__;return z?t[e]!==void 0:Jr.call(t,e)}var Vr="__lodash_hash_undefined__";function kr(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=z&&t===void 0?Vr:t,this}function L(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])}}L.prototype.clear=Kr,L.prototype.delete=Wr,L.prototype.get=Xr,L.prototype.has=Qr,L.prototype.set=kr;function ei(){this.__data__=[],this.size=0}function k(e,t){for(var n=e.length;n--;)if(B(e[n][0],t))return n;return-1}var ti=Array.prototype,ni=ti.splice;function ri(e){var t=this.__data__,n=k(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():ni.call(t,n,1),--this.size,!0}function ii(e){var t=this.__data__,n=k(t,e);return n<0?void 0:t[n][1]}function ai(e){return k(this.__data__,e)>-1}function oi(e,t){var n=this.__data__,r=k(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function E(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])}}E.prototype.clear=ei,E.prototype.delete=ri,E.prototype.get=ii,E.prototype.has=ai,E.prototype.set=oi;var si=M(m,"Map");const Z=si;function fi(){this.size=0,this.__data__={hash:new L,map:new(Z||E),string:new L}}function ui(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function ee(e,t){var n=e.__data__;return ui(t)?n[typeof t=="string"?"string":"hash"]:n.map}function ci(e){var t=ee(this,e).delete(e);return this.size-=t?1:0,t}function li(e){return ee(this,e).get(e)}function gi(e){return ee(this,e).has(e)}function pi(e,t){var n=ee(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function I(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])}}I.prototype.clear=fi,I.prototype.delete=ci,I.prototype.get=li,I.prototype.has=gi,I.prototype.set=pi;var di="Expected a function";function Te(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(di);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(Te.Cache||I),n}Te.Cache=I;var hi=500;function yi(e){var t=Te(e,function(r){return n.size===hi&&n.clear(),r}),n=t.cache;return t}var vi=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,bi=/\\(\\)?/g,_i=yi(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(vi,function(n,r,i,a){t.push(i?a.replace(bi,"$1"):r||n)}),t});const Ti=_i;function $i(e){return e==null?"":Ne(e)}function et(e,t){return A(e)?e:_e(e,t)?[e]:Ti($i(e))}var Ai=1/0;function te(e){if(typeof e=="string"||fe(e))return e;var t=e+"";return t=="0"&&1/e==-Ai?"-0":t}function tt(e,t){t=et(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[te(t[n++])];return n&&n==r?e:void 0}function Oi(e,t,n){var r=e==null?void 0:tt(e,t);return r===void 0?n:r}function nt(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}var mi=ke(Object.getPrototypeOf,Object);const $e=mi;var wi="[object Object]",Pi=Function.prototype,Si=Object.prototype,rt=Pi.toString,Ei=Si.hasOwnProperty,Ii=rt.call(Object);function it(e){if(!P(e)||C(e)!=wi)return!1;var t=$e(e);if(t===null)return!0;var n=Ei.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&rt.call(n)==Ii}function Ci(){this.__data__=new E,this.size=0}function ji(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function Mi(e){return this.__data__.get(e)}function Li(e){return this.__data__.has(e)}var Fi=200;function xi(e,t){var n=this.__data__;if(n instanceof E){var r=n.__data__;if(!Z||r.length<Fi-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new I(r)}return n.set(e,t),this.size=n.size,this}function O(e){var t=this.__data__=new E(e);this.size=t.size}O.prototype.clear=Ci,O.prototype.delete=ji,O.prototype.get=Mi,O.prototype.has=Li,O.prototype.set=xi;function Ri(e,t){return e&&x(t,W(t),e)}function Di(e,t){return e&&x(t,D(t),e)}var at=typeof v=="object"&&v&&!v.nodeType&&v,ot=at&&typeof module=="object"&&module&&!module.nodeType&&module,Ni=ot&&ot.exports===at,st=Ni?m.Buffer:void 0,ft=st?st.allocUnsafe:void 0;function ut(e,t){if(t)return e.slice();var n=e.length,r=ft?ft(n):new e.constructor(n);return e.copy(r),r}function Gi(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 ct(){return[]}var Ui=Object.prototype,Bi=Ui.propertyIsEnumerable,lt=Object.getOwnPropertySymbols,Hi=lt?function(e){return e==null?[]:(e=Object(e),Gi(lt(e),function(t){return Bi.call(e,t)}))}:ct;const Ae=Hi;function Ki(e,t){return x(e,Ae(e),t)}var Wi=Object.getOwnPropertySymbols,zi=Wi?function(e){for(var t=[];e;)nt(t,Ae(e)),e=$e(e);return t}:ct;const gt=zi;function Zi(e,t){return x(e,gt(e),t)}function pt(e,t,n){var r=t(e);return A(e)?r:nt(r,n(e))}function Oe(e){return pt(e,W,Ae)}function qi(e){return pt(e,D,gt)}var Xi=M(m,"DataView");const me=Xi;var Yi=M(m,"Promise");const we=Yi;var Ji=M(m,"Set");const Pe=Ji;var dt="[object Map]",Qi="[object Object]",ht="[object Promise]",yt="[object Set]",vt="[object WeakMap]",bt="[object DataView]",Vi=j(me),ki=j(Z),ea=j(we),ta=j(Pe),na=j(ge),F=C;(me&&F(new me(new ArrayBuffer(1)))!=bt||Z&&F(new Z)!=dt||we&&F(we.resolve())!=ht||Pe&&F(new Pe)!=yt||ge&&F(new ge)!=vt)&&(F=function(e){var t=C(e),n=t==Qi?e.constructor:void 0,r=n?j(n):"";if(r)switch(r){case Vi:return bt;case ki:return dt;case ea:return ht;case ta:return yt;case na:return vt}return t});const q=F;var ra=Object.prototype,ia=ra.hasOwnProperty;function aa(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]=="string"&&ia.call(e,"index")&&(n.index=e.index,n.input=e.input),n}var oa=m.Uint8Array;const ne=oa;function Se(e){var t=new e.constructor(e.byteLength);return new ne(t).set(new ne(e)),t}function sa(e,t){var n=t?Se(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}var fa=/\w*$/;function ua(e){var t=new e.constructor(e.source,fa.exec(e));return t.lastIndex=e.lastIndex,t}var _t=w?w.prototype:void 0,Tt=_t?_t.valueOf:void 0;function ca(e){return Tt?Object(Tt.call(e)):{}}function $t(e,t){var n=t?Se(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var la="[object Boolean]",ga="[object Date]",pa="[object Map]",da="[object Number]",ha="[object RegExp]",ya="[object Set]",va="[object String]",ba="[object Symbol]",_a="[object ArrayBuffer]",Ta="[object DataView]",$a="[object Float32Array]",Aa="[object Float64Array]",Oa="[object Int8Array]",ma="[object Int16Array]",wa="[object Int32Array]",Pa="[object Uint8Array]",Sa="[object Uint8ClampedArray]",Ea="[object Uint16Array]",Ia="[object Uint32Array]";function Ca(e,t,n){var r=e.constructor;switch(t){case _a:return Se(e);case la:case ga:return new r(+e);case Ta:return sa(e,n);case $a:case Aa:case Oa:case ma:case wa:case Pa:case Sa:case Ea:case Ia:return $t(e,n);case pa:return new r;case da:case va:return new r(e);case ha:return ua(e);case ya:return new r;case ba:return ca(e)}}function At(e){return typeof e.constructor=="function"&&!he(e)?On($e(e)):{}}var ja="[object Map]";function Ma(e){return P(e)&&q(e)==ja}var Ot=R&&R.isMap,La=Ot?ye(Ot):Ma;const Fa=La;var xa="[object Set]";function Ra(e){return P(e)&&q(e)==xa}var mt=R&&R.isSet,Da=mt?ye(mt):Ra;const Na=Da;var Ga=1,Ua=2,Ba=4,wt="[object Arguments]",Ha="[object Array]",Ka="[object Boolean]",Wa="[object Date]",za="[object Error]",Pt="[object Function]",Za="[object GeneratorFunction]",qa="[object Map]",Xa="[object Number]",St="[object Object]",Ya="[object RegExp]",Ja="[object Set]",Qa="[object String]",Va="[object Symbol]",ka="[object WeakMap]",eo="[object ArrayBuffer]",to="[object DataView]",no="[object Float32Array]",ro="[object Float64Array]",io="[object Int8Array]",ao="[object Int16Array]",oo="[object Int32Array]",so="[object Uint8Array]",fo="[object Uint8ClampedArray]",uo="[object Uint16Array]",co="[object Uint32Array]",d={};d[wt]=d[Ha]=d[eo]=d[to]=d[Ka]=d[Wa]=d[no]=d[ro]=d[io]=d[ao]=d[oo]=d[qa]=d[Xa]=d[St]=d[Ya]=d[Ja]=d[Qa]=d[Va]=d[so]=d[fo]=d[uo]=d[co]=!0,d[za]=d[Pt]=d[ka]=!1;function re(e,t,n,r,i,a){var o,s=t&Ga,f=t&Ua,g=t&Ba;if(n&&(o=i?n(e,r,i,a):n(e)),o!==void 0)return o;if(!S(e))return e;var u=A(e);if(u){if(o=aa(e),!s)return Be(e,o)}else{var l=q(e),c=l==Pt||l==Za;if(H(e))return ut(e,s);if(l==St||l==wt||c&&!i){if(o=f||c?{}:At(e),!s)return f?Zi(e,Di(o,e)):Ki(e,Ri(o,e))}else{if(!d[l])return i?e:{};o=Ca(e,l,s)}}a||(a=new O);var y=a.get(e);if(y)return y;a.set(e,o),Na(e)?e.forEach(function(_){o.add(re(_,t,n,_,e,a))}):Fa(e)&&e.forEach(function(_,p){o.set(p,re(_,t,n,p,e,a))});var b=g?f?qi:Oe:f?D:W,T=u?void 0:b(e);return Fn(T||e,function(_,p){T&&(p=_,_=e[p]),He(o,p,re(_,t,n,p,e,a))}),o}var lo=1,go=4;function po(e){return re(e,lo|go)}var ho="__lodash_hash_undefined__";function yo(e){return this.__data__.set(e,ho),this}function vo(e){return this.__data__.has(e)}function ie(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new I;++t<n;)this.add(e[t])}ie.prototype.add=ie.prototype.push=yo,ie.prototype.has=vo;function bo(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 _o(e,t){return e.has(t)}var To=1,$o=2;function Et(e,t,n,r,i,a){var o=n&To,s=e.length,f=t.length;if(s!=f&&!(o&&f>s))return!1;var g=a.get(e),u=a.get(t);if(g&&u)return g==t&&u==e;var l=-1,c=!0,y=n&$o?new ie:void 0;for(a.set(e,t),a.set(t,e);++l<s;){var b=e[l],T=t[l];if(r)var _=o?r(T,b,l,t,e,a):r(b,T,l,e,t,a);if(_!==void 0){if(_)continue;c=!1;break}if(y){if(!bo(t,function(p,$){if(!_o(y,$)&&(b===p||i(b,p,n,r,a)))return y.push($)})){c=!1;break}}else if(!(b===T||i(b,T,n,r,a))){c=!1;break}}return a.delete(e),a.delete(t),c}function Ao(e){var t=-1,n=Array(e.size);return e.forEach(function(r,i){n[++t]=[i,r]}),n}function Oo(e){var t=-1,n=Array(e.size);return e.forEach(function(r){n[++t]=r}),n}var mo=1,wo=2,Po="[object Boolean]",So="[object Date]",Eo="[object Error]",Io="[object Map]",Co="[object Number]",jo="[object RegExp]",Mo="[object Set]",Lo="[object String]",Fo="[object Symbol]",xo="[object ArrayBuffer]",Ro="[object DataView]",It=w?w.prototype:void 0,Ee=It?It.valueOf:void 0;function Do(e,t,n,r,i,a,o){switch(n){case Ro:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case xo:return!(e.byteLength!=t.byteLength||!a(new ne(e),new ne(t)));case Po:case So:case Co:return B(+e,+t);case Eo:return e.name==t.name&&e.message==t.message;case jo:case Lo:return e==t+"";case Io:var s=Ao;case Mo:var f=r&mo;if(s||(s=Oo),e.size!=t.size&&!f)return!1;var g=o.get(e);if(g)return g==t;r|=wo,o.set(e,t);var u=Et(s(e),s(t),r,i,a,o);return o.delete(e),u;case Fo:if(Ee)return Ee.call(e)==Ee.call(t)}return!1}var No=1,Go=Object.prototype,Uo=Go.hasOwnProperty;function Bo(e,t,n,r,i,a){var o=n&No,s=Oe(e),f=s.length,g=Oe(t),u=g.length;if(f!=u&&!o)return!1;for(var l=f;l--;){var c=s[l];if(!(o?c in t:Uo.call(t,c)))return!1}var y=a.get(e),b=a.get(t);if(y&&b)return y==t&&b==e;var T=!0;a.set(e,t),a.set(t,e);for(var _=o;++l<f;){c=s[l];var p=e[c],$=t[c];if(r)var se=o?r($,p,c,t,e,a):r(p,$,c,e,t,a);if(!(se===void 0?p===$||i(p,$,n,r,a):se)){T=!1;break}_||(_=c=="constructor")}if(T&&!_){var X=e.constructor,N=t.constructor;X!=N&&"constructor"in e&&"constructor"in t&&!(typeof X=="function"&&X instanceof X&&typeof N=="function"&&N instanceof N)&&(T=!1)}return a.delete(e),a.delete(t),T}var Ho=1,Ct="[object Arguments]",jt="[object Array]",ae="[object Object]",Ko=Object.prototype,Mt=Ko.hasOwnProperty;function Wo(e,t,n,r,i,a){var o=A(e),s=A(t),f=o?jt:q(e),g=s?jt:q(t);f=f==Ct?ae:f,g=g==Ct?ae:g;var u=f==ae,l=g==ae,c=f==g;if(c&&H(e)){if(!H(t))return!1;o=!0,u=!1}if(c&&!u)return a||(a=new O),o||be(e)?Et(e,t,n,r,i,a):Do(e,t,f,n,r,i,a);if(!(n&Ho)){var y=u&&Mt.call(e,"__wrapped__"),b=l&&Mt.call(t,"__wrapped__");if(y||b){var T=y?e.value():e,_=b?t.value():t;return a||(a=new O),i(T,_,n,r,a)}}return c?(a||(a=new O),Bo(e,t,n,r,i,a)):!1}function Ie(e,t,n,r,i){return e===t?!0:e==null||t==null||!P(e)&&!P(t)?e!==e&&t!==t:Wo(e,t,n,r,Ie,i)}var zo=1,Zo=2;function qo(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 f=s[0],g=e[f],u=s[1];if(o&&s[2]){if(g===void 0&&!(f in e))return!1}else{var l=new O;if(r)var c=r(g,u,f,e,t,l);if(!(c===void 0?Ie(u,g,zo|Zo,r,l):c))return!1}}return!0}function Lt(e){return e===e&&!S(e)}function Xo(e){for(var t=W(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,Lt(i)]}return t}function Ft(e,t){return function(n){return n==null?!1:n[e]===t&&(t!==void 0||e in Object(n))}}function Yo(e){var t=Xo(e);return t.length==1&&t[0][2]?Ft(t[0][0],t[0][1]):function(n){return n===e||qo(n,e,t)}}function Jo(e,t){return e!=null&&t in Object(e)}function Qo(e,t,n){t=et(t,e);for(var r=-1,i=t.length,a=!1;++r<i;){var o=te(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&&de(i)&&pe(o,i)&&(A(e)||V(e)))}function Vo(e,t){return e!=null&&Qo(e,t,Jo)}var ko=1,es=2;function ts(e,t){return _e(e)&&Lt(t)?Ft(te(e),t):function(n){var r=Oi(n,e);return r===void 0&&r===t?Vo(n,e):Ie(t,r,ko|es)}}function ns(e){return function(t){return t==null?void 0:t[e]}}function rs(e){return function(t){return tt(t,e)}}function is(e){return _e(e)?ns(te(e)):rs(e)}function as(e){return typeof e=="function"?e:e==null?ue:typeof e=="object"?A(e)?ts(e[0],e[1]):Yo(e):is(e)}function os(e){return function(t,n,r){for(var i=-1,a=Object(t),o=r(t),s=o.length;s--;){var f=o[e?s:++i];if(n(a[f],f,a)===!1)break}return t}}var ss=os();const xt=ss;function fs(e,t){return e&&xt(e,t,W)}function Ce(e,t,n){(n!==void 0&&!B(e[t],n)||n===void 0&&!(t in e))&&J(e,t,n)}function us(e){return P(e)&&Q(e)}function je(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}function cs(e){return x(e,D(e))}function ls(e,t,n,r,i,a,o){var s=je(e,n),f=je(t,n),g=o.get(f);if(g){Ce(e,n,g);return}var u=a?a(s,f,n+"",e,t,o):void 0,l=u===void 0;if(l){var c=A(f),y=!c&&H(f),b=!c&&!y&&be(f);u=f,c||y||b?A(s)?u=s:us(s)?u=Be(s):y?(l=!1,u=ut(f,!0)):b?(l=!1,u=$t(f,!0)):u=[]:it(f)||V(f)?(u=s,V(s)?u=cs(s):(!S(s)||ce(s))&&(u=At(f))):l=!1}l&&(o.set(f,u),i(u,f,r,a,o),o.delete(f)),Ce(e,n,u)}function Rt(e,t,n,r,i){e!==t&&xt(t,function(a,o){if(i||(i=new O),S(a))ls(e,t,o,n,Rt,r,i);else{var s=r?r(je(e,o),a,o+"",e,t,i):void 0;s===void 0&&(s=a),Ce(e,o,s)}},D)}var gs=We(function(e,t,n,r){Rt(e,t,n,r)});const ps=gs;function ds(e,t){var n={};return t=as(t),fs(e,function(r,i,a){J(n,t(r,i,a),r)}),n}var oe=function(){return oe=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},oe.apply(this,arguments)};function hs(e){return e.toLowerCase()}var ys=[/([a-z0-9])([A-Z])/g,/([A-Z])([A-Z][a-z])/g],vs=/[^A-Z0-9]+/gi;function bs(e,t){t===void 0&&(t={});for(var n=t.splitRegexp,r=n===void 0?ys:n,i=t.stripRegexp,a=i===void 0?vs:i,o=t.transform,s=o===void 0?hs:o,f=t.delimiter,g=f===void 0?" ":f,u=Dt(Dt(e,r,"$1\0$2"),a,"\0"),l=0,c=u.length;u.charAt(l)==="\0";)l++;for(;u.charAt(c-1)==="\0";)c--;return u.slice(l,c).split("\0").map(s).join(g)}function Dt(e,t,n){return t instanceof RegExp?e.replace(t,n):t.reduce(function(r,i){return r.replace(i,n)},e)}function Nt(e,t){var n=e.charAt(0),r=e.substr(1).toLowerCase();return t>0&&n>="0"&&n<="9"?"_"+n+r:""+n.toUpperCase()+r}function _s(e,t){return t===void 0&&(t={}),bs(e,oe({delimiter:"",transform:Nt},t))}function Ts(e,t){return t===0?e.toLowerCase():Nt(e,t)}function $s(e,t){return t===void 0&&(t={}),_s(e,oe({transform:Ts},t))}function As(e,t){const n=Object.create(null),r=e.split(",");for(let i=0;i<r.length;i++)n[r[i]]=!0;return t?i=>!!n[i.toLowerCase()]:i=>!!n[i]}const Os=As("String,Number,Boolean,Function,Symbol,BigInt");function ms(e){const t=e&&e.toString().match(/^\s*function (\w+)/);return t?t[1]:e===null?"null":""}function ws(e,t){let n;const r=ms(t);if(Os(r)){const i=typeof e;n=i===r.toLowerCase(),!n&&i==="object"&&(n=e instanceof t)}else r==="Object"?n=S(e):r==="Array"?n=Array.isArray(e):r==="null"?n=e===null:n=e instanceof t;return{valid:n,expectedType:r}}function Ps({prop:e,type:t,validator:n}){if(![void 0,null].includes(e)&&t){let r=!1;const i=Array.isArray(t)?t:[t],a=[];for(let o=0;o<i.length&&!r;o++){const{valid:s,expectedType:f}=ws(e,i[o]);a.push(f||""),r=s}if(!r)throw new Error(`Invalid prop: type check failed, expecting [${a.join(", ")}], receiving: ${e}`)}if(n&&!n(e))throw new Error(`Invalid prop: validator check failed, receiving: ${e}`)}function Ss(e,{mergeObject:t,mergeFunction:n}){const r=[];for(let a=e.length-1;a>=0;a--)r.push(e[a]);const i=n?(a,o)=>typeof a=="function"&&typeof o=="function"?n(o,a):void 0:void 0;return t==="deep"?ps(...r,i):Gr(...r,i)}function Es(e,{mergeFunction:t}){return e.reduce(t,()=>{})}function Gt(e,t={}){const{type:n,default:r,defaultIsDynamic:i=!1,required:a=!1,validator:o,camelCase:s=!0,mergeObjectApplyOnlyToDefault:f=!1,mergeFunctionApplyOnlyToDefault:g=!0}=t;let{mergeObject:u="deep",mergeFunction:l=!1}=t;const c=[];let y,b=!1,T=!1;const _=p=>{if(p!==void 0){Ps({type:n,prop:p,validator:o});const $=it(p),se=typeof p=="function";return b=$,T=se,$?(p=po(p),s?ds(p,(X,N)=>$s(N,{stripRegexp:/-/g})):p):p}};for(const p of e)c.push(_(p));if(!i)c.push(_(r));else if(typeof r!="function")throw new TypeError(`Invalid option: config.default should be Function when config.defaultIsDynamic enabled, receiving: ${r}`);b||(u=!1,T||(l=!1));for(let p=0;p<c.length;p++){const $=c[p];if($!==void 0){p===c.length-1?y=$:u?y=Ss(f?[$,r]:c,{mergeObject:u,mergeFunction:l}):l?y=Es(g?[$,r]:c,{mergeFunction:l}):y=$;break}}if(a&&[void 0,null].includes(y))throw new Error("Missing required prop");return i?Gt(e,{...t,default:r(y),defaultIsDynamic:!1}):y}function Is(e,t){return Object.keys(e).filter(n=>t(n)).reduce((n,r)=>(n[r]=e[r],n),{})}function Cs(e){return Is(e,t=>!t.startsWith("hook:"))}function js(e){if(Object.getOwnPropertyNames(e||{}).length){const t=this.$emit;this.$emit=function(...n){var a;t.apply(this,n);const[r,...i]=n;(a=e[r])==null||a.apply(this,i)}}}v.conclude=Gt,v.getLocalListeners=Cs,v.listenGlobalHooks=js,v.useGlobalConfig=Ut,Object.defineProperties(v,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}); |
{ | ||
"name": "vue-global-config", | ||
"version": "0.2.4", | ||
"version": "0.2.5", | ||
"private": false, | ||
@@ -14,2 +14,3 @@ "description": "Configure your Vue 2.6 / 2.7 / 3 components globally.", | ||
"global options", | ||
"vue-demi", | ||
"vue", | ||
@@ -23,4 +24,3 @@ "component", | ||
"require": "./dist/vue-global-config.umd.js", | ||
"import": "./dist/vue-global-config.mjs", | ||
"browser": "./dist/vue-global-config.mjs" | ||
"import": "./dist/vue-global-config.mjs" | ||
}, | ||
@@ -46,3 +46,3 @@ "./*": "./*" | ||
"coverage": "vitest run --coverage", | ||
"release": "npx case-police --fix && npx lint-staged && cl switchVue 3 && vitest run && pnpm build && cl release" | ||
"release": "cl switchVue 3 && npx case-police --fix && npx lint-staged && vitest run && pnpm build && cl release" | ||
}, | ||
@@ -65,2 +65,4 @@ "peerDependencies": { | ||
"@antfu/eslint-config": "latest", | ||
"@commitlint/cli": "latest", | ||
"@commitlint/config-conventional": "latest", | ||
"@vitejs/plugin-vue": "latest", | ||
@@ -84,3 +86,3 @@ "@vitest/coverage-c8": "latest", | ||
"lint-staged": { | ||
"!(demo/**/*)*.{js,ts,tsx,vue,md}": [ | ||
"{src,__tests__}/**.*": [ | ||
"eslint --fix" | ||
@@ -87,0 +89,0 @@ ] |
239
README.md
@@ -1,5 +0,15 @@ | ||
# vue-global-config | ||
# Vue Global Config <sup>[![Version Badge][npm-version-svg]][package-url]</sup> | ||
Configure your Vue 2.6 / 2.7 / 3 components globally! | ||
[npm-version-svg]: https://versionbadg.es/cloydlau/vue-global-config.svg | ||
[package-url]: https://npmjs.com/package/vue-global-config | ||
<p align="left"> | ||
<a href="https://bundlephobia.com/package/vue-global-config"><img alt="minzipped size" src="https://img.shields.io/bundlephobia/minzip/vue-global-config"></a> | ||
<a href="https://eslint.org"><img alt="code style" src="https://img.shields.io/badge/code_style-ESLint-4B32C3.svg?logo=eslint"></a> | ||
<a href="https://conventionalcommits.org"><img alt="conventional commits" src="https://img.shields.io/badge/commits-Conventional-FE5196.svg?logo=conventionalcommits&logoColor=white"></a> | ||
<a href="https://github.com/cloydlau/vue-global-config#develop"><img alt="PRs Welcome" src="https://img.shields.io/badge/PRs-welcome-brightgreen.svg"></a> | ||
</p> | ||
> Configure your Vue 2.6 / 2.7 / 3 components globally! | ||
```ts | ||
@@ -53,3 +63,3 @@ // Vue 3 | ||
## Why | ||
## Why? | ||
@@ -65,10 +75,18 @@ Vue provides support for globally registering components, but no configuration. | ||
Entangled in global/local/default parameters, which one to choose? It should be replaced or shallow merged or deep merged when it comes to plain object type? What if I want all functions triggered instead of ony one when it comes to function type? How to decide when both camel case and kebab case of a same parameter come together? | ||
Entangled in global / local / default parameters, which one to choose? It should be replaced or shallow merged or deep merged when it comes to plain object type? What if I want all functions triggered instead of ony one when it comes to function type? How to decide when both camel case and kebab case of a same parameter come together? | ||
<br> | ||
## How? | ||
1. Firstly provide an [entrance](https://github.com/cloydlau/vue-global-config/tree/main/demo/vue3/src/components/GlobalComponent/index.ts) for your component to register globally, this is the foundation. | ||
2. Use [useGlobalConfig](#useGlobalConfig) to handle parameters passed by component user, get global props, global attrs, global listeners & global hooks. | ||
3. Import those global parameters, meet them with local / default parameters and determine the final value using [conclude](#conclude) . | ||
<br> | ||
## Features | ||
- Support Vue 2.6 / 2.7 / 3 | ||
- Provide weight algorithm to deal with trade-off and merging issues of global/local/default parameters. | ||
- Provide weight algorithm to deal with trade-off and merging issues of global / local / default parameters. | ||
- Support global [props](https://staging.vuejs.org/guide/components/props.html#props) | ||
@@ -87,29 +105,12 @@ - Support global [attrs](https://staging.vuejs.org/guide/components/attrs.html) | ||
## Installation | ||
## Vue 3 | ||
### Install | ||
 | ||
``` bash | ||
# Vue version before 2.7 should add an extra @vue/composition-api | ||
$ npm add vue-global-config | ||
``` | ||
<br> | ||
## Usage | ||
### Global Props | ||
1. Firstly provide an [entrance](https://github.com/cloydlau/vue-global-config/tree/main/vue3demo/src/components/GlobalComponent/index.ts) for your component to register globally, this is the foundation. | ||
2. Use [useGlobalConfig](#useGlobalConfig) to handle parameters passed by component user, get global props, global attrs, global listeners & global hooks. | ||
3. Import those global parameters, meet them with local/default parameters and determine the final value using [conclude](#conclude) . | ||
[Vue 3 demo](https://github.com/cloydlau/vue-global-config/tree/main/vue3demo/src/components/GlobalComponent) | ||
[Vue 2 demo](https://github.com/cloydlau/vue-global-config/tree/main/vue2demo/src/components/GlobalComponent) | ||
<br> | ||
## Vue 3 | ||
### Global props | ||
```vue | ||
@@ -130,3 +131,3 @@ <template> | ||
### Global attrs & listeners | ||
### Global Attrs & Listeners | ||
@@ -163,3 +164,3 @@ > In Vue 3, `attrs` includes both attrs & listeners | ||
### Global hooks | ||
### Global Hooks | ||
@@ -187,4 +188,16 @@ ```vue | ||
### Global props | ||
### Install | ||
``` bash | ||
# Vue 2.7 | ||
$ npm add vue-global-config | ||
# Vue 2.6 or Earlier | ||
$ npm add vue-global-config @vue/composition-api | ||
``` | ||
<br> | ||
### Global Props | ||
```vue | ||
@@ -210,3 +223,3 @@ <template> | ||
### Global attrs | ||
### Global Attrs | ||
@@ -232,3 +245,3 @@ ```vue | ||
### Global listeners | ||
### Global Listeners | ||
@@ -268,3 +281,3 @@ ```vue | ||
### Global hooks | ||
### Global Hooks | ||
@@ -293,7 +306,9 @@ ```vue | ||
## useGlobalConfig | ||
## API | ||
### useGlobalConfig | ||
Get global props, attrs, listeners & hooks by analysing global parameters passed by component user. | ||
### Param | ||
#### Param | ||
@@ -334,40 +349,39 @@ ```ts | ||
## conclude | ||
### conclude | ||
Vue 提供了 prop 的局部配置和默认值配置,但在封装组件时,还会非常需要一个“全局配置”,否则可能导致每个组件实例进行重复的配置。 | ||
`Vue` provides local and default configuration of prop, but when wrapping components, there is a strong need for a "global configuration", which may otherwise lead to duplicate configurations for each component instance. | ||
举个例子,Element 的 size 与 zIndex 就是支持全局配置的。 | ||
For example, the size and zIndex of `ElementUI` support global configuration. | ||
当配置多了以后,由于存在不同的优先级,最终组件采用的是哪一项配置,需要进行一定的判断, | ||
When there are more configurations, there is some judgment as to which configuration is used by the final component due to the different priorities. | ||
在涉及到对象和函数时,判断可能会变得相当复杂。 | ||
When it comes to objects and functions, this can get quite complicated. | ||
conclude 的作用就是帮助你计算出最终的配置。 | ||
The role of `conclude` is to help you figure out the final configuration. | ||
### Features | ||
#### Features | ||
- 和 Vue 的 props 一样,提供是否必传、数据类型和自定义的校验 | ||
- 对于 plain object 类型的 prop,支持深合并、浅合并和直接覆盖 | ||
- 对于 function 类型的 prop,支持融合、直接覆盖 | ||
- 支持将对象的键统一为驼峰命名 | ||
- 支持动态生成默认值 | ||
- Like Vue's props, it provides requirement, data type and custom validator | ||
- For plain object type prop, deep merge, shallow merge and direct override are supported | ||
- For function type prop, support merge and direct override | ||
- Support for unifying the keys of objects into camel names | ||
- Support for dynamic generation of default values | ||
### Param | ||
#### Param | ||
```ts | ||
/** | ||
* @param {any[]} configSequence - config 序列(优先级从高到低,最后是默认值) | ||
* @param {object} [config] - 配置 | ||
* @param {string} [config.name] - config 名称,用于报错提示 | ||
* @param {PropType} [config.type] - 数据类型校验 | ||
* @param {any} [config.default] - 默认值(显式) | ||
* @param {boolean} [config.defaultIsDynamic = false] - 动态生成默认值 | ||
* @param {boolean} [config.required = false] - 是否必传校验 | ||
* @param {function} [config.validator] - 自定义校验 | ||
* @param {string} [config.camelCase = true] - 是否将对象的键统一为驼峰命名 | ||
* @param {false|string} [config.mergeObject = 'deep'] - 合并对象的方式 | ||
* @param {boolean} [config.mergeObjectApplyOnlyToDefault = false] - mergeObject 仅作用于 default | ||
* @param {false|((accumulator, currentValue, index?, array?) => Function)} [config.mergeFunction = false] - 融合函数的方式 | ||
* @param {boolean} [config.mergeFunctionApplyOnlyToDefault = true] - mergeFunction 仅作用于 default | ||
* @returns {any} 最终的参数 | ||
* @param {any[]} configSequence - Config sequence (priority from highest to lowest, last is the default value) | ||
* @param {object} [config] - Configuration | ||
* @param {PropType<any>} [config.type] - Data type checking | ||
* @param {any} [config.default] - Default value (explicit) | ||
* @param {boolean} [config.defaultIsDynamic = false] - Dynamic generation of default values | ||
* @param {boolean} [config.required = false] - Requirement checking | ||
* @param {function} [config.validator] - Custom validator | ||
* @param {string} [config.camelCase = true] - Whether or not to unify the keys of the object as a hump naming | ||
* @param {false|string} [config.mergeObject = 'deep'] - The way to merge objects | ||
* @param {boolean} [config.mergeObjectApplyOnlyToDefault = false] - `mergeObject` only works on `default` | ||
* @param {false|((accumulator, currentValue, index?, array?) => Function)} [config.mergeFunction = false] - The way to fuse functions | ||
* @param {boolean} [config.mergeFunctionApplyOnlyToDefault = true] - `mergeFunction` only works on `default` | ||
* @returns {any} Final prop | ||
*/ | ||
@@ -384,52 +398,50 @@ ``` | ||
### How can we know whether a prop is passed or not? | ||
#### How can we know whether a prop is passed or not? | ||
以该 prop 是否全等于 `undefined` 作为标识 | ||
Whether the prop is all equal to `undefined` or not | ||
### config.type | ||
#### config.type | ||
与 [Vue 的 Prop 类型校验](https://vuejs.org/guide/components/props.html#prop-validation) 一致。 | ||
Same as [Vue's prop validation](https://vuejs.org/guide/components/props.html#prop-validation). | ||
### config.mergeObject | ||
#### config.mergeObject | ||
- `'deep'`: 深合并,高权重 prop 的对象键会覆盖低权重 prop 的同名键,包含嵌套的对象(默认值) | ||
- `'shallow'`: 浅合并,高权重 prop 的对象键会覆盖低权重 prop 的同名键,不含嵌套的对象 | ||
- `false`: 不合并,直接覆盖,高权重 prop 的对象会直接覆盖低权重 prop 的对象,与值类型的表现一致 | ||
- `'deep'`: Deep merge, where the object key of a high-weight prop overwrites the same-name key of a low-weight prop, containing nested objects (the default value) | ||
- `'shallow'`: Shallow merge, where the object key of a high weight prop overwrites the key of the same name of a low weight prop, without nested objects | ||
- `false`: No merging, direct overwriting, objects of high weight prop will directly overwrite objects of low weight prop, consistent with the behavior of value types | ||
### config.mergeObjectApplyOnlyToDefault | ||
#### config.mergeObjectApplyOnlyToDefault | ||
默认关闭,仅在 mergeObject 开启时有效。 | ||
Off by default, only valid when mergeObject is on. | ||
开启时,mergeObject 的规则仅会应用于最后与 default 进行比对的环节中,之前的对象依然会直接覆盖。 | ||
When on, mergeObject's rules are only applied to the final comparison with default, and previous objects are still directly overwritten. | ||
关闭时,mergeObject 的规则会应用至所有对象类型 prop 的权重比对中。 | ||
When off, mergeObject's rules are applied to all object type prop weights. | ||
使用场景:组件作者想要将组件内部的配置与组件使用者的配置进行合并,但组件使用者自身的各级配置依然保持直接覆盖的规则。 | ||
Usage scenario: The component author wants to merge the component's internal configuration with the component user's configuration, but the component user's own configuration at all levels remains directly overwritten by the rules. | ||
### config.mergeFunction | ||
#### config.mergeFunction | ||
使用场景:在封装组件时,你可能需要通过配置选项的方式监听底层依赖的某些事件, | ||
Usage Scenario: When wrapping a component, you may need to listen to certain events of the underlying dependency by configuration. | ||
在将该依赖的配置选项暴露出去时,组件使用者的配置就会与你的配置发生冲突。 | ||
When exposing the configuration for that dependency, the component user's configuration will conflict with yours. | ||
mergeFunction 提供定制化的方式来融合函数类型的 prop。 | ||
`mergeFunction` provides a customized way to merge function type prop. | ||
举个例子,知名的富文本库 TinyMCE 的配置选项中有一个叫 `init_instance_callback` 的回调, | ||
For example, the well-known rich text library TinyMCE has a callback called `init_instance_callback` in its options. | ||
在封装这个库时,可以藉此来做一些初始化的工作,为了不破坏组件的灵活性,也会将 TinyMCE 的配置选项暴露出去, | ||
When wrapping this library, you can use it to do some initialization work and expose TinyMCE's options in order not to break the flexibility of the component. | ||
问题来了,组件使用者一旦配置了这个回调,就会与你的配置发生冲突。 | ||
The problem is that once the component user has configured this callback, it will conflict with your configuration. | ||
与其他数据类型的配置不同的是,函数类型的 prop,往往不期望被用户的配置直接覆盖掉,会有需要进行“融合”的需求。 | ||
Unlike the configuration of other data types, function-type prop is not expected to be directly overridden by the user's configuration, and there is a need for "fusion". | ||
融合:既执行组件使用者配置的函数,也执行组件内部配置的函数。 | ||
Fusion: executes both functions configured by the component user and functions configured internally by the component. | ||
函数类型的 prop 包括两种情况: | ||
The function type prop includes two cases: | ||
- prop 本身是函数 | ||
- prop 是含有函数属性的对象 | ||
- prop is itself a function | ||
- prop is an object with function properties | ||
conclude | ||
内部使用 [Array.prototype.reduce](https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Array/Reduce) | ||
来执行函数融合,mergeFunction 将被用作参数1。 | ||
`conclude` internally uses `Array.prototype.reduce` to perform the function fusion, `mergeFunction` will be used as argument 1. | ||
@@ -439,10 +451,10 @@ ```ts | ||
() => { | ||
console.log('我是参数1') | ||
console.log('I am option 1') | ||
}, | ||
() => { | ||
console.log('我是参数2') | ||
console.log('I am option 2') | ||
} | ||
], { | ||
default: () => { | ||
console.log('我是显式默认值') | ||
console.log('I am default option') | ||
}, | ||
@@ -456,23 +468,22 @@ mergeFunction: (accumulator, item) => (...args) => { | ||
// 结果会打印 '我是显式默认值' '我是参数2' '我是参数1' | ||
// Will print 'I am default option' 'I am option 2' 'I am option 1' | ||
``` | ||
### config.mergeFunctionApplyOnlyToDefault | ||
#### config.mergeFunctionApplyOnlyToDefault | ||
默认开启,仅在 mergeFunction 开启时有效。 | ||
Is turned on by default and is only available when `mergeFunction` is on. | ||
函数融合毕竟是一个特殊行为,往往只有组件作者会用到这个功能, | ||
Function merging is, after all, a special behavior, and often only the component author will use this feature. | ||
对于组件使用者来说,函数类型的配置可能更希望的是和其他原始类型一样,直接覆盖掉就好了。 | ||
For component users, the configuration of function types may be more like Primitive Types and just override them. | ||
开启时,mergeFunction 的规则仅会应用于最后与 default 进行比对的环节中,之前的函数依然会直接覆盖。 | ||
When turned on, the `mergeFunction` rule is only applied to the final comparison with default, and the previous function is still overwritten directly. | ||
关闭时,mergeFunction 的规则会应用至所有函数类型 prop 的权重比对中。 | ||
When off, `mergeFunction`'s rules are applied to all function type prop weights. | ||
### config.default | ||
#### config.default | ||
显式指定默认值,如果没有开启 `mergeObjectApplyOnlyToDefault` 或 `mergeFunctionApplyOnlyToDefault` 的话,则没有必要使用该参数,将默认值放在 `configSequence` | ||
的末尾即可。 | ||
Explicitly specifies the default value. If `mergeObjectApplyOnlyToDefault` or `mergeFunctionApplyOnlyToDefault` is not enabled, there is no need to use this parameter, just put the default value at the end of `configSequence`. | ||
### config.camelCase | ||
#### config.camelCase | ||
@@ -533,8 +544,8 @@ without | ||
### Dynamic default value | ||
#### Dynamic default value | ||
使用场景:需要根据组件使用者传的参数来决定默认值 | ||
Usage scenario: the default value needs to be determined according to the parameters passed by the component user. | ||
```ts | ||
// 示例 | ||
// Example | ||
@@ -551,3 +562,3 @@ conclude([{ | ||
}], { | ||
// userProp是参数1的计算结果 | ||
// userProp is the result of the calculation of parameter 1 | ||
default: userProp => ({ | ||
@@ -562,3 +573,3 @@ a: { | ||
/** | ||
* 将得到: | ||
* Will get: | ||
* { | ||
@@ -576,3 +587,3 @@ * a: { | ||
## getLocalListeners | ||
### getLocalListeners | ||
@@ -591,3 +602,3 @@ Vue 2 only. For the purpose of listening local hooks. | ||
## listenGlobalHooks | ||
### listenGlobalHooks | ||
@@ -606,10 +617,6 @@ Vue 2 only. For the purpose of listening global hooks. | ||
## Development | ||
## Develop | ||
**PR welcome!** | ||
1. [Install Deno](https://deno.land/#installation) | ||
1. Install Deno | ||
- https://deno.land/#installation | ||
- https://x.deno.js.cn/#%E5%AE%89%E8%A3%85%E6%9C%80%E6%96%B0%E7%89%88 | ||
2. `npm add pnpm @cloydlau/scripts -g; pnpm i` | ||
@@ -616,0 +623,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
87659
1452
611
19