easy-soft-utility 2.2.2 → 2.2.4

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/es/index.js CHANGED
@@ -1 +1 @@
1
- import t from"node-cache";import n from"lodash/isBoolean";import e from"lodash/isDate";import r from"lodash/isEqual";import o from"lodash/isFunction";import a from"lodash/isNull";import i from"lodash/isNumber";import u from"lodash/isObject";import c from"lodash/isString";import l from"lodash/isUndefined";import s from"lodash/replace";import f from"lodash/assign";import d from"lodash/assignWith";import h from"lodash/difference";import m from"lodash/dropRight";import g from"lodash/endsWith";import v from"lodash/filter";import p from"lodash/find";import y from"lodash/findIndex";import w from"lodash/first";import b from"lodash/floor";import A from"lodash/forEach";import x from"lodash/get";import S from"lodash/gte";import M from"lodash/map";import E from"lodash/memoize";import D from"lodash/remove";import C from"lodash/reverse";import O from"lodash/round";import I from"lodash/set";import j from"lodash/size";import k from"lodash/sortBy";import N from"lodash/sortedUniq";import P from"lodash/split";import Y from"lodash/startsWith";import T from"lodash/trim";import H from"lodash/uniqBy";import W from"lodash/toNumber";import R from"lodash/toString";import U from"object-hash";import L from"dayjs";import{stringify as B,parse as F}from"qs";function K(t){var n=(t||"").replace(/\s/g,"+");return n=Buffer.from(n,"base64").toString()}function J(t){return Buffer.from(t).toString("base64")}function Q(t){return 1*t<10?"0".concat(t):t}function G(t){return G="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},G(t)}function V(t){var n=function(t,n){if("object"!==G(t)||null===t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,n||"default");if("object"!==G(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(t)}(t,"string");return"symbol"===G(n)?n:String(n)}function q(t,n,e){return(n=V(n))in t?Object.defineProperty(t,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[n]=e,t}function z(t,n){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable}))),e.push.apply(e,r)}return e}function $(t){for(var n=1;n<arguments.length;n++){var e=null!=arguments[n]?arguments[n]:{};n%2?z(Object(e),!0).forEach((function(n){q(t,n,e[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):z(Object(e)).forEach((function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))}))}return t}function X(t,n){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return x(t,n,e)}function Z(t,n){return O(t,n)}function _(t,n,e){return g(t,n,e)}function tt(t){return N(t)}function nt(t,n){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1e3;return P(t,n,e)}function et(t,n){return f(t,n)}function rt(t,n,e){return d(t,n,e)}function ot(t){return C(t)}function at(t,n){return A(t,n)}function it(t,n){return S(t,n)}function ut(t){return E(t)}function ct(t,n){return b(t,n)}function lt(t){return w(t)}function st(t,n){return Y(t,n)}function ft(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return m(t,n)}function dt(t,n){return H(t,n)}function ht(t){return T(t)}function mt(t,n,e){return s(t,n,e)}function gt(t,n){return D(t,n)}function vt(t,n){return M(t,n)}function pt(t,n,e){return I(t,n,e)}function yt(t){return j(t)}function wt(t,n){return h(t,n)}function bt(t,n){return v(t,n)}function At(t,n){return k(t,n)}function xt(t,n){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return y(t,n,e)}function St(t,n){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return p(t,n,e)}function Mt(t){return Nt(t)}function Et(t){var n="".concat(Nt(t)?null:t).match(/^(\d{1,4})(-|\/)(\d{1,2})\2(\d{1,2})$/);if(null==n)return!1;var e=new Date(n[1],n[3]-1,n[4]);return e.getFullYear()===parseInt(n[1],10)&&e.getMonth()+1===parseInt(n[3],10)&&e.getDate()===parseInt(n[4],10)}function Dt(t){return i(t)}function Ct(t){var n="".concat(Nt(t)?null:t);if(""===n)return!1;return new RegExp(/^([1-9][\d]{0,15}|0)(\.[\d]{1,2})?$/).test(n)}function Ot(t,n){return r(t,n)}function It(t,n){return JSON.stringify(t||{})===JSON.stringify(n||{})}function jt(t){return o(t)}function kt(t){return n(t)}function Nt(t){return l(t)}function Pt(t){return a(t)}function Yt(t){return e(t)}function Tt(t){return c(t)}function Ht(t){return Array.isArray(t)}function Wt(t){return u(t)}function Rt(t){return null!==t&&"object"===G(t)&&!Ht(t)}function Ut(t){return Rt(t)&&jt(t.then)&&jt(t.catch)}function Lt(t){return new RegExp(/(http|https):\/\/([\w.]+\/?)\S*/).test(t)}function Bt(t){return new RegExp(/(data):image\/([\w.]+\/?)\S*/).test(t)}function Ft(t){return""===ht(s(t||""," ",""))}function Kt(t,n){var e=!1;return Ht(t)?(t.some((function(t){return t===n&&(e=!0,!0)})),e):e}var Jt={WEAPP:"WEAPP",WEB:"WEB",RN:"RN",SWAN:"SWAN",ALIPAY:"ALIPAY",TT:"TT",QQ:"QQ",JD:"JD",UNKNOWN:"UNKNOWN"},Qt={loadApiPath:"",firstLoadSuccess:!1,loadSuccess:!1,registering:!1,dataLoading:!1,reloading:!1,searching:!1,refreshing:!1,paging:!1,processing:!1,dispatchComplete:!0,metaData:null,metaExtra:null,metaListData:[],metaOriginalData:null,urlParams:null,externalData:null},Gt={dataLoading:!0},Vt={get:"GET",post:"POST",put:"PUT",delete:"DELETE",trace:"TRACE",connect:"CONNECT"},qt="0",zt=0,$t="1970-01-01 00:00",Xt={number:"number",datetime:"datetime",string:"string",moment:"moment",money:"money",array:"array",boolean:"boolean"},Zt={money:"money",datetime:"datetime",chineseMoney:"chineseMoney",percentage:"percentage"},_t={yearMonthDayHourMinuteSecond:"YYYY-MM-DD HH:mm:ss",yearMonthDayHourMinute:"YYYY-MM-DD HH:mm",yearMonthDay:"YYYY-MM-DD",yearMonth:"YYYY-MM",year:"YYYY",monthDayHourMinuteSecond:"YYYY-MM-DD HH:mm:ss",monthDayHourMinute:"MM-DD HH:mm",monthDay:"MM-DD",hourMinute:"HH:mm",hourMinuteSecond:"HH:mm:ss",month:"MM",day:"DD",hour:"HH",minute:"mm",second:"ss"},tn={moveUp:"moveUp",moveDown:"moveDown"},nn={no:"0",yes:"1"},en={no:0,yes:1},rn={trace:"trace",debug:"debug",warn:"warn",error:"error",info:"info",config:"config",execute:"execute"},on={auto:"auto",text:"text",object:"object"},an={success:"success",error:"error",info:"info",warning:"warning",warn:"warn",open:"open"},un=$({},an),cn=$({},an),ln="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABLCAYAAACGGCK3AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAA0SURBVHhe7cExAQAAAMKg9U9tDQ8gAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIA3NXV7AAHfw7zWAAAAAElFTkSuQmCC",sn=ln;function fn(t){return U(t,{algorithm:"sha1"})}function dn(t){return U(t,{algorithm:"md5"})}function hn(t,n){var e=Math.pow(10,n+1),r=Math.floor(mn(t)*e);return 10*Math.round(r/10)/e}function mn(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,e=W(t),r=Number.isNaN(e)?0:e;return null==(n||null)?r:hn(r,n)}function gn(t,n,e){if(!Dt(t))throw new Error("value must be number value");var r=mn(t);return void 0!==n&&(r=Math.max(t,n)),void 0!==e&&(r=Math.min(r,e)),r}function vn(t){return Ct(t)?parseFloat(t,10):0}function pn(t){return"".concat(vn(1e3*mn(t)/10),"%")}function yn(t){return R(t)}function wn(t){return!!t}function bn(t){return yn(t).toUpperCase()}function An(t){return yn(t).toLowerCase()}function xn(t){if(null==(t||null))return null;if(Yt(t))return t;if(Tt(t)&&t.indexOf("T")<0){var n=t.replace(/\-/g,"/");return new Date(n)}return new Date(t)}function Sn(t){return Ut(t)?t:Promise.resolve(t)}function Mn(t,n){return Z(t,n)}function En(t){var n=t.target,e=t.convert;if(jt(e))return e(n);if(Tt(e))switch(e){case Xt.number:return mn(n);case Xt.datetime:return xn(n);case Xt.string:return yn(n);case Xt.money:return vn(n);case Xt.array:return null==(n||null)?[]:Ht(n)?n:[n];default:return n}return n}function Dn(t,n){(null==n||n>t.length)&&(n=t.length);for(var e=0,r=new Array(n);e<n;e++)r[e]=t[e];return r}function Cn(t,n){if(t){if("string"==typeof t)return Dn(t,n);var e=Object.prototype.toString.call(t).slice(8,-1);return"Object"===e&&t.constructor&&(e=t.constructor.name),"Map"===e||"Set"===e?Array.from(t):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?Dn(t,n):void 0}}function On(t){return function(t){if(Array.isArray(t))return Dn(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||Cn(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function In(t){return"".concat("easy-soft-utility","::").concat(t,"::")}function jn(){var t=navigator.userAgent;return{trident:t.indexOf("Trident")>-1,presto:t.indexOf("Presto")>-1,webKit:t.indexOf("AppleWebKit")>-1,gecko:t.indexOf("Gecko")>-1&&-1===t.indexOf("KHTML"),mobile:!!t.match(/AppleWebKit.*Mobile.*/),ios:!!t.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/),android:t.indexOf("Android")>-1||t.indexOf("Linux")>-1,iPhone:t.indexOf("iPhone")>-1,iPad:t.indexOf("iPad")>-1,webApp:-1===t.indexOf("Safari")}}function kn(){var t;return{versions:jn(),language:(null!==(t=navigator.browserLanguage||navigator.language)&&void 0!==t?t:"").toLowerCase()}}function Nn(t){var n=t.seed,e=t.min||0;return e+(9301*n+49297)%233280/233280*((t.max||1)-e)}function Pn(t){return null==t?null:JSON.parse(JSON.stringify(t))}function Yn(t,n,e){var r=[];return null!=t&&(r=On(t)),null!=e&&(r=[].concat(On(r),On(e))),null!=n&&(r=[n].concat(On(r))),r}function Tn(t,n,e,r,o){var a=r,i=void 0===e?null:e;return null!=n&&("function"==typeof convertValue?a.initialValue=o(t)||i:a.initialValue=t||i),a}function Hn(t,n,e){var r=null;return null==n||(e||[]).forEach((function(e){e[t]===n&&(r=e)})),r}function Wn(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:8,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:16,r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""),o=[],a=0;if(e=e||r.length,n)for(a=0;a<n;a++)o[a]=r[0|Math.random()*e];else for(o[8]=o[13]=o[18]=o[23]="-",o[14]="4",a=0;a<36;a++)o[a]||(t=0|16*Math.random(),o[a]=r[19===a?3&t|8:t]);return o.join("")}function Rn(t){var n=t.pageNo,e=t.pageSize,r=t.total;return!((r||0)<=0)&&(n||0)*(e||0)<(r||0)}function Un(){return"development"===process.env.NODE_ENV}function Ln(t){return Object.keys(t).map((function(n){return t[n]})).join(",")}var Bn="loggerAssist",Fn={loggerDisplaySwitchPromptSetInformationComplete:!1,loggerDisplaySwitchSetComplete:!1,display:!1},Kn="#F8C471",Jn="#C39BD3",Qn="#89ca78",Gn="#ff4f49",Vn="#00768f",qn="#596032";function zn(t,n){return"".concat(yn(t)).concat(Ft(n?"":" -> ".concat(n)))}function $n(t){var n=t.text,e=t.color,r=void 0===e?"":e,o=t.ancillaryInformation,a={trace:zn(n,void 0===o?"":o)};console.log("%c%s","color:".concat(r,";"),JSON.stringify(a))}function Xn(t){var n=t.data,e=t.color,r=void 0===e?"":e,o=t.dataDescription,a=void 0===o?"":o,i=t.ancillaryInformation,u=void 0===i?"":i;console.log("%c%s","color:".concat(r,";"),JSON.stringify({config:"check the following ".concat(a," data").concat(Ft(u)?"":" -> ".concat(u),".")})),console.log(n)}function Zn(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:on.auto,e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:rn.debug,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",o=ce();if(Fn.loggerDisplaySwitchSetComplete||Fn.loggerDisplaySwitchPromptSetInformationComplete||(console.log("".concat(In(Bn),"logData -> please set logger display switch before first log, use setLoggerDisplaySwitch to set it.")),Fn.loggerDisplaySwitchPromptSetInformationComplete=!0),o||e===rn.error){var a=null==(n||null)||Ft(n)?on.auto:n;if(!Kt([on.auto,on.text,on.object],a))throw new Error("Invalid log display mode -> ".concat(a));if(a===on.auto&&(a=Tt(t)?on.text:on.object),e===rn.error){if(a===on.text){var i={error:t};console.error(JSON.stringify(i))}a===on.object&&console.error({error:t})}o&&(e===rn.trace&&(a===on.text&&$n({text:t,color:qn,ancillaryInformation:r}),a===on.object&&Xn({data:t,color:qn,dataDescription:"trace",ancillaryInformation:r})),e===rn.debug&&(a===on.text&&$n({text:t,color:Vn,ancillaryInformation:r}),a===on.object&&Xn({data:t,color:Vn,dataDescription:"debug",ancillaryInformation:r})),e===rn.warn&&(a===on.text&&$n({text:t,color:Gn,ancillaryInformation:r}),a===on.object&&Xn({data:t,color:Gn,dataDescription:"warn",ancillaryInformation:r})),e===rn.info&&(a===on.text&&$n({text:t,color:Qn,ancillaryInformation:r}),a===on.object&&Xn({data:t,color:Qn,dataDescription:"info",ancillaryInformation:r})),e===rn.execute&&(a===on.text&&$n({text:t,color:Jn,ancillaryInformation:r}),a===on.object&&Xn({data:t,color:Jn,dataDescription:"execute",ancillaryInformation:r})),e===rn.config&&(a===on.text&&$n({text:t,color:Kn,ancillaryInformation:r}),a===on.object&&Xn({data:t,color:Kn,dataDescription:"config",ancillaryInformation:r})))}}function _n(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";Tt(t)?ie(t,rn.warn):ue(t,rn.warn,n)}function te(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";Tt(t)?ie(t,rn.info):ue(t,rn.info,n)}function ne(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";Tt(t)?ie(t,rn.config):ue(t,rn.config,n)}function ee(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";Tt(t)?ie(t,rn.trace):ue(t,rn.trace,n)}function re(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";Tt(t)?ie(t,rn.debug):ue(t,rn.debug,n)}function oe(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";Tt(t)?ie(t,rn.execute):ue(t,rn.execute,n)}function ae(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";Tt(t)?ie(t,rn.error):ue(t,rn.error,n)}function ie(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:rn.trace,e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";Zn(t,on.text,n,e)}function ue(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:rn.trace,e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";Zn(t,on.object,n,e)}function ce(){return wn(Fn.display)}function le(t){Fn.display=wn(t)}var se={mountComplete:!1,target:null};function fe(n){if(Wt(n))throw new Error("".concat(In("cacheAssist"),"setCacheMount -> cache mount target must be a object"));null==(n.localRuntimeCache||null)&&(n.localRuntimeCache=new t),se.target=n,se.mountComplete=!0,te("setCacheMount -> cache mount success.")}function de(t){if(Ft(t))throw new Error("checkKey -> cache key is null or empty.");if(!Tt(t)&&!Dt(t))throw ae(t),new Error("checkKey -> cache key must be string or number,you can check it in console.")}function he(){if(!se.mountComplete||!se.target||!se.target.localRuntimeCache)throw new Error("getCachePool -> please use setCacheMount function to set cache mount target before get it.");return se.target.localRuntimeCache}function me(t){var n=t.key,e=he();if(null==e)throw new Error("cache pool not exist");return e.has(n)}function ge(t){var n=t.key,e=t.value,r=t.expiration,o=void 0===r?0:r;de(n);var a=he();if(null==a)throw new Error("cache pool not exist");return a.set(n,e,o)}function ve(t){if(!Ht(t))throw new Error("setMultiCache: list must be array");if(t.length<=0)return!0;var n=[];if(t.forEach((function(t){var e=$($({},{key:"",value:"",expiration:0}),t),r=e.key,o=e.value,a=e.expiration;Ft(r)||(de(r),n.push({key:r,value:o,ttl:a}))})),n.length<=0)return!1;var e=he();if(null==e)throw new Error("cache pool not exist");return e.mset(n)}function pe(t){var n=t.key,e=he();if(null==e)throw new Error("cache pool not exist");return e.getTtl(n)}function ye(t){var n=t.key,e=t.expiration,r=he();if(null==r)throw new Error("cache pool not exist");return r.ttl(n,e)}function we(t){var n=t.key,e=he();if(null==e)throw new Error("cache pool not exist");return e.get(n)}function be(){var t=he();if(null==t)throw new Error("cache pool not exist");return t.keys()}function Ae(t){if(!Ht(t))throw new Error("getMultiCache: list must be array");var n=he();if(null==n)throw new Error("cache pool not exist");return n.mget(t)}function xe(t){var n=t.key,e=he();if(null==e)throw new Error("cache pool not exist");return e.take(n)}function Se(t){var n=t.key;de(n);var e=he();if(null==e)throw new Error("cache pool not exist");return e.del(n)}function Me(t){if(!Ht(t))throw new Error("deleteMultiCache: list must be array");var n=he();if(null==n)throw new Error("cache pool not exist");return n.del(t)}function Ee(){var t=he();if(null==t)throw new Error("cache pool not exist");return t.flushAll()}function De(){var t=he();if(null==t)throw new Error("cache pool not exist");return t.getStats()}function Ce(t,n){return function(t){if(Array.isArray(t))return t}(t)||function(t,n){var e=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=e){var r,o,a,i,u=[],c=!0,l=!1;try{if(a=(e=e.call(t)).next,0===n){if(Object(e)!==e)return;c=!1}else for(;!(c=(r=a.call(e)).done)&&(u.push(r.value),u.length!==n);c=!0);}catch(t){l=!0,o=t}finally{try{if(!c&&null!=e.return&&(i=e.return(),Object(i)!==i))return}finally{if(l)throw o}}return u}}(t,n)||Cn(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Oe(t){var n=t.seed;return"#".concat("00000".concat((16777216*Nn({seed:n})<<0).toString(16)).substring(-6))}function Ie(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"RGB",e=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=/^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/,o=(null!=t?t:"").toLowerCase();if(r.test(o)){if(4===o.length){for(var a="#",i=1;i<4;i+=1)a+=o.slice(i,i+1).concat(o.slice(i,i+1));o=a}for(var u=[],c=1;c<7;c+=2)u.push(parseInt("0x"+o.slice(c,c+2)));return n?"".concat(n,"(").concat(u.join(","),")"):e?u:u.join(",")}return ae("Invalid hex color -> ".concat(t)),o}function je(t){var n=t.progress,e=t.startColor,r=t.endColor,o=Ie(e,null,!0),a=Ie(r,null,!0),i=Ce(o,3),u=i[0],c=i[1],l=i[2],s=Ce(a,3),f=s[0],d=s[1],h=s[2],m=[(u+Math.round((f-u)*n)).toString(16),(c+Math.round((d-c)*n)).toString(16),(l+Math.round((h-l)*n)).toString(16)];return"#".concat(m.join("").toUpperCase())}function ke(t){var n=t.direct,e=t.list,r=void 0===e?[]:e,o=Dt(n)?"".concat(n,"deg"):n;return"linear-gradient(".concat(o,", ").concat(r.join(),")")}function Ne(t,n){var e=xn(t);return e.setHours(e.getHours()+n)}function Pe(t,n){var e=xn(t);return e.setMinutes(e.getMinutes()+n)}function Ye(t,n){var e=xn(t);return e.setSeconds(e.getSeconds()+n)}function Te(){return new Date}function He(t,n){var e=t.getTime(),r=(n.getTime()-e)/1e3,o=parseInt(r/86400),a=parseInt((r-24*o*60*60)/3600),i=parseInt((r-24*o*60*60-60*a*60)/60);return{day:o,hour:a,minute:i,second:r-24*o*60*60-60*a*60-60*i}}var We=function(t,n,e){var r=xn(t),o=n?xn(n):new Date,a=o.getTime()-r.getTime();return"second"===e&&a/1e3||"minute"===e&&a/1e3/60||"hour"===e&&a/1e3/60/60||"day"===e&&a/1e3/60/60/24||"week"===e&&a/1e3/60/60/24/7||"month"===e&&Re(r,o)||"quarter"===e&&Re(r,o)/3||"year"===e&&Re(r,o)/12||a},Re=function(t,n){var e=xn(t),r=xn(n);return 12*(e.getFullYear()-r.getFullYear())+e.getMonth()-r.getMonth()};function Ue(t){var n=t.data;return L(n).day()}function Le(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],n=L().day();if(!t)return n;var e="";switch(mn(n)){case 0:e="日";break;case 1:e="一";break;case 2:e="二";break;case 3:e="三";break;case 4:e="四";break;case 5:e="五";break;case 6:e="六";break;default:e=""}return Ft(e)?"":"星期".concat(e)}function Be(t){var n=t.data,e=t.places,r=void 0===e?2:e,o=t.thousand,a=void 0===o?",":o,i=t.decimal;return Fe({data:n,places:r,symbol:"",thousand:a,decimal:void 0===i?".":i})}function Fe(t){var n=t.data,e=t.places,r=void 0===e?2:e,o=t.symbol,a=void 0===o?"¥":o,i=t.thousand,u=void 0===i?",":i,c=t.decimal,l=void 0===c?".":c,s=n||0,f=isNaN(r=Math.abs(r))?2:r,d=void 0!==a?a:"¥",h=u||",",m=l||".",g=s<0?"-":"",v=parseInt(s=Math.abs(+s||0).toFixed(f),10)+"",p=v.length;return d+g+((p=p>3?p%3:0)?v.substr(0,p)+h:"")+v.substr(p).replace(/(\d{3})(?=\d)/g,a+"1"+h)+(f?m+Math.abs(s-mn(v)).toFixed(f).slice(2):"")}function Ke(t){var n,e,r,o=t.target,a=["零","壹","贰","叁","肆","伍","陆","柒","捌","玖"],i=["","拾","佰","仟"],u=["","万","亿","兆"],c=["角","分","毫","厘"],l="";if(""===o)return"";if((o=parseFloat(o))>=1e15)return"超出最大处理数字";if(0===o)return l=a[0]+"元";if(-1===(o=o.toString()).indexOf("."))n=o,e="";else{var s=Ce(r=o.split("."),2);n=s[0],e=s[1],e=r[1].substr(0,4)}if(parseInt(n,10)>0){for(var f=0,d=n.length,h=0;h<d;h+=1){var m=n.substr(h,1),g=d-h-1,v=g/4,p=g%4;"0"===m?f+=1:(f>0&&(l+=a[0]),f=0,l+=a[parseInt(m,10)]+i[p]),0===p&&f<4&&(l+=u[v])}l+="元"}if(""!==e)for(var y=e.length,w=0;w<y;w+=1){var b=e.substr(w,1);"0"!==b&&(l+=a[Number(b)]+c[w])}return""===l&&(l+=a[0]+"元"),l}function Je(t){var n=t.data,e=t.fmt,r=void 0===e?_t.yearMonthDayHourMinuteSecond:e;return null==(n||null)?"":L(n).format(r)}function Qe(t){var n=t.target,e=t.format,r=t.option,o=void 0===r?{}:r;if(jt(e))return e(n);if(Tt(e))switch(e){case Zt.money:return Fe({data:n});case Zt.datetime:return Je({data:n});case Zt.chineseMoney:return Ke({target:n,option:o});case Zt.percentage:return"".concat(Mn(100*n,1),"%");default:return n}return n}function Ge(t,n){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=$($({},{second:["刚刚","片刻后"],seconds:["%d 秒前","%d 秒后"],minute:["大约 1 分钟前","大约 1 分钟后"],minutes:["%d 分钟前","%d 分钟后"],hour:["大约 1 小时前","大约 1 小时后"],hours:["%d 小时前","%d 小时后"],day:["1 天前","1 天后"],days:["%d 天前","%d 天后"],month:["大约 1 个月前","大约 1 个月后"],months:["%d 月前","%d 月后"],year:["大约 1 年前","大约 1 年后"],years:["%d 年前","%d 年后"]}),e||{}),o=We(t,n),a=o<0?1:0,i=Math.abs(o)/1e3,u=i/60,c=u/60,l=c/24,s=l/365,f=function(t,n){return t.replace(/%d/i,n)};return i<10&&f(r.second[a],parseInt(i))||i<45&&f(r.seconds[a],parseInt(i))||i<90&&f(r.minute[a],1)||u<45&&f(r.minutes[a],parseInt(u))||u<90&&f(r.hour[a],1)||c<24&&f(r.hours[a],parseInt(c))||c<42&&f(r.day[a],1)||l<30&&f(r.days[a],parseInt(l))||l<45&&f(r.month[a],1)||l<365&&f(r.months[a],parseInt(l/30))||s<1.5&&f(r.year[a],1)||f(r.years[a],parseInt(s))}function Ve(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Ge(t,Te(),n)}var qe={showOpenMessage:function(t){var n=t.text;t.duration,t.onClose,te({text:n})},showInfoMessage:function(t){var n=t.text;t.duration,t.onClose,te({text:n})},showSuccessMessage:function(t){var n=t.text;t.duration,t.onClose,te({text:n})},showWarnMessage:function(t){var n=t.text;t.duration,t.onClose,_n(n)},showWarningMessage:function(t){var n=t.text;t.duration,t.onClose,_n(n)},showErrorMessage:function(t){var n=t.text;t.duration,t.onClose,ae(n)}};function ze(t){qe.showOpenMessage=t}function $e(t){qe.showInfoMessage=t}function Xe(t){qe.showSuccessMessage=t}function Ze(t){qe.showWarnMessage=t}function _e(t){qe.showWarningMessage=t}function tr(t){qe.showErrorMessage=t}function nr(t){var n=t.text,e=t.duration,r=void 0===e?1500:e,o=t.onClose,a=void 0===o?function(){}:o;jt(qe.showOpenMessage)&&qe.showOpenMessage({text:n,duration:r,onClose:a})}function er(t){var n=t.text,e=t.duration,r=void 0===e?1500:e,o=t.onClose,a=void 0===o?function(){}:o;jt(qe.showInfoMessage)&&qe.showInfoMessage({text:n,duration:r,onClose:a})}function rr(t){var n=t.text,e=t.duration,r=void 0===e?1500:e,o=t.onClose,a=void 0===o?function(){}:o;jt(qe.showSuccessMessage)&&qe.showSuccessMessage({text:n,duration:r,onClose:a})}function or(t){var n=t.text,e=t.duration,r=void 0===e?1500:e,o=t.onClose,a=void 0===o?function(){}:o;jt(qe.showWarnMessage)&&qe.showWarnMessage({text:n,duration:r,onClose:a})}function ar(t){var n=t.text,e=t.duration,r=void 0===e?1500:e,o=t.onClose,a=void 0===o?function(){}:o;jt(qe.showWarningMessage)&&qe.showWarningMessage({text:n,duration:r,onClose:a})}function ir(t){var n=t.text,e=t.duration,r=void 0===e?1500:e,o=t.onClose,a=void 0===o?function(){}:o;jt(qe.showErrorMessage)&&qe.showErrorMessage({text:n,duration:r,onClose:a})}function ur(t){ir({text:t})}function cr(t){var n=t.text,e=t.showStack,r=void 0===e||e;try{if(Ft(n||"")||(ir({text:n}),ae({text:n})),r)throw new Error("".concat(Ft(n||"")?"":"".concat(yn(n),", "),"call stack:"))}catch(t){console.log(t.stack)}}function lr(t,n){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"...";return t&&t.length>n?"".concat(yn(t).substring(0,n)).concat(e):yn(t)}function sr(t,n,e,r){var o=yn(t),a=(t||"").length;a>0&&(e>=0||r>=0)&&(o=e>=a||r>=a||(e||0)+(r||0)>=a?t:t.substr(0,e)+n+t.substr(a-r,r));return o||""}function fr(t,n){for(var e=(new Date).getTime();!((new Date).getTime()-e>t););jt(n)&&n()}function dr(t,n){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(Nt(t))return e;if(null==t)return e;if(!Tt(n)){var r="getPathValue Function param path must be string";return cr({message:r}),null}var o=X(t,n,e);return Nt(e)||Pt(e)?o:o||e}function hr(t,n){if(!Tt(t))throw new Error("removeEndMatch only use for string target");if(!Tt(n))throw new Error("removeEndMatch only use for string match");if(Ft(t))return t;if(Ft(n))return t;var e=t.lastIndexOf(n);return e>=0&&t.length===e+n.length?t.substr(e,n.length):t}function mr(t,n){if(!Tt(t))throw new Error("removeEndMatch only use for string source");if(!Tt(n))throw new Error("removeEndMatch only use for string target");if(Ft(t))return t;if(Ft(n))return t;var e=t.lastIndexOf(n);return e>=0?t.substr(e,n.length):t}function gr(t){var n=t.data,e=t.key,r=t.defaultValue,o=void 0===r?null:r,a=t.convert,i=void 0===a?null:a,u=t.convertBuilder,c=void 0===u?null:u,l=t.format,s=void 0===l?null:l,f=t.formatBuilder,d=void 0===f?null:f,h=dr(n,e,o),m=h;return null==(c||null)&&null==(i||null)||(m=jt(c)?En({target:h,convert:c}):En({target:h,convert:i})),null==(d||null)&&null==(s||null)||(m=jt(d)?Qe({target:m,format:d}):Qe({target:m,format:s})),m}function vr(t){var n=t.operate,e=t.item,r=t.list,o=t.key,a=t.sortInitialValue,i=void 0===a?0:a;if(null==(e||null))return r;var u=[],c=[],l=[];if((r||[]).length<=1){return or({message:"无需排序!"}),r}var s=gr({data:e,key:o,convert:Xt.number});switch((r||[]).forEach((function(t){var n=gr({data:t,key:o,convert:Xt.number});n<s&&u.push(t),n>s&&c.push(t)})),n){case tn.moveUp:if(s===i){return or({message:"已经排在首位!"}),r}(u||[]).forEach((function(t,n){if(n<u.length-1)l.push(t);else{var r=e;r[o]-=1,l.push(r);var a=t;a[o]+=1,l.push(a)}})),l=l.concat(c);break;case tn.moveDown:if(s===(r||[]).length+i-1){return or({message:"已经排在末位!"}),r}l=l.concat(u),(c||[]).forEach((function(t,n){if(0===n){var r=t;r[o]-=1,l.push(r);var a=e;a[o]+=1,l.push(a)}else l.push(t)}));break;default:or({message:"不符合的操作, 允许的操作为['".concat(tn.moveUp,"','").concat(tn.moveDown,"']!")})}return l}function pr(t){var n=t.list,e=void 0===n?[]:n,r=t.convert,o=void 0===r?null:r,a=t.recursiveKey,i=void 0===a?"children":a;return(Ht(e)?e:[e]).map((function(t){return yr({data:t,convert:o,target:i})}))}function yr(t){var n=t.data,e=t.convert,r=void 0===e?null:e,o=t.recursiveKey,a=void 0===o?"children":o;if(!jt(r))return n;var i=r(n),u=n[a],c=[];return Ht(u)&&(c=u.map((function(t){return yr({data:t,convert:r,target:a})}))),i[a]=c,i}function wr(t,n){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=St(t,n,e);return!Nt(r)}function br(){function t(t,n){return Nt(n)?t:n}for(var n=et({},arguments.length<=0?void 0:arguments[0]),e=1;e<arguments.length;e++)n=rt(n,e<0||arguments.length<=e?void 0:arguments[e],t);return n}function Ar(t){if(t&&"object"===G(t)){var n="";return Object.keys(t).forEach((function(e){var r,o=(null!==(r=e.replace(/([A-Z])/g,"-$1"))&&void 0!==r?r:"").toLowerCase();n+="".concat(o,":").concat(t[e],";")})),n}return t&&"string"==typeof t?t:""}function xr(t,n){return t&&"object"===G(t)&&n&&"object"===G(n)?Object.assign({},t,n):Ar(t)+Ar(n)}var Sr,Mr="htmlAssist";function Er(t,n){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:5,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;if(!Dt(t))return t;if(!Dt(n)||n<=0)throw new Error("".concat(In(Mr),"pxToRem -> root value must be number and greater than 0, current root value [").concat(n,"] is invalid."));var o=parseFloat(t);if(o<r)return t;var a=mn(o/n,e);return 0===a?"0":a+"rem"}var Dr="localStorageAssist",Cr=(q(Sr={getStorage:function(t){ae("".concat(In(Dr),"setStorageGetter need config, use setStorageGetter to set it"))},setStorage:function(t,n){ae("".concat(In(Dr),"setStorageSetter need config, use setStorageSetter to set it"))},removeStorage:function(t){ae("".concat(In(Dr),"setStorageRemover need config, use setStorageRemover to set it"))}},"removeStorage",(function(t){ae("".concat(In(Dr),"setStorageRemover need config, use setStorageRemover to set it"))})),q(Sr,"flushStorage",(function(){ae("".concat(In(Dr),"setStorageFlusher need config, use setStorageFlusher to set it"))})),Sr);function Or(t){Cr.getStorage=t}function Ir(t){Cr.setStorage=t}function jr(t){Cr.removeStorage=t}function kr(t){try{return Cr.getStorage(t)}catch(n){throw ae({key:t,e:n}),n}}function Nr(t){var n=kr(t);return Ft(n)?null:JSON.parse(n||"{}")}function Pr(t,n){Cr.setStorage(t,n)}function Yr(t,n){Cr.setStorage(t,JSON.stringify(n||{}))}function Tr(t){Cr.removeStorage(t)}function Hr(){Cr.flushStorage()}var Wr=function(t){var n=t.text;t.duration,t.onClose,te({text:n})};var Rr="nearestLocalhostNotify";function Ur(){var t=Nr(Rr);return null==(t||null)||null==(t.nearestTime||null)?null:t||null}function Lr(){return Yr(Rr,{nearestTime:parseInt((new Date).getTime()/1e3,10)})}function Br(){Tr(Rr)}function Fr(t){var n=t.text,e=!1,r=0,o=Ur()||null;null==o?e=!0:r=o.nearestTime||0;var a=parseInt((new Date).getTime()/1e3,10);try{if(r+30<a&&(e=!0),e){var i="当前接口域名: ".concat(n,". ");!function(t){var n=t.text,e=t.duration,r=void 0===e?1500:e,o=t.onClose,a=void 0===o?function(){}:o;jt(Wr)&&Wr({text:n,duration:r,onClose:a})}({text:i}),ie({message:i}),Lr()}}catch(t){Zn(t)}}function Kr(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",e=B(t);if(Ft(n))return e;if(Ft(e))return n;var r=n.lastIndexOf("?")>=0?"&":"?";return"".concat(n).concat(r).concat(e)}function Jr(t){return F(t)}function Qr(t,n){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return"请".concat(n||"输入").concat(t).concat(Ft(e)?"":",".concat(e))}function Gr(t){var n=t.label,e=t.name,r=t.helper,o="",a="",i="";if(Tt(n))o=n;else{_n({label:n,name:e,helper:r}),cr({message:"label必须为文本"})}if(Tt(e))a=e;else{_n({label:n,name:e,helper:r}),cr({message:"name必须为文本"})}if(Tt(r))i=r;else{_n({label:n,name:e,helper:r}),cr({message:"helper必须为文本"})}return{label:o,name:a,helper:i}}function Vr(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"注: ";return"".concat(n).concat(t,". ")}export{Ne as addHour,Pe as addMinute,Ye as addSecond,et as assign,rt as assignWith,Qr as buildFieldDescription,Vr as buildFieldHelper,je as buildHexColor,ke as buildLinearGradient,In as buildPromptModuleInfo,Kr as buildQueryStringify,Ie as buildRGBColorFromHexColor,Oe as buildRandomHexColor,Ar as buildStringStyle,se as cacheMountTarget,We as calculateDateInterval,Re as calculateMonthInterval,He as calculateTimeInterval,wr as checkExist,Gr as checkFromConfig,Rn as checkHasMore,Kt as checkInCollection,Ft as checkStringIsNullOrWhiteSpace,Un as checkWhetherDevelopmentEnvironment,Pn as cloneWithoutMethod,Xt as convertCollection,Er as convertPixelToRem,_t as datetimeFormat,K as decodeBase64,Se as deleteCache,Me as deleteMultiCache,wt as difference,ft as dropRight,lr as ellipsis,$t as emptyDatetime,J as encodeBase64,_ as endsWith,Jt as envCollection,sn as errorImage,bt as filter,St as find,xt as findIndex,lt as first,Q as fixedZero,ct as floor,Ee as flushAllCache,Hr as flushLocalStorage,at as forEach,Zt as formatCollection,Ge as formatDateInterval,Ve as formatDateIntervalWithNow,Je as formatDatetime,Be as formatDecimal,Fe as formatMoney,Ke as formatMoneyToChinese,Qe as formatTarget,X as get,kn as getBrowserInfo,jn as getBrowserVersion,we as getCache,he as getCachePool,Ue as getDayOfWeek,pe as getExpiration,Wn as getGuid,Nr as getJsonFromLocalStorage,ce as getLoggerDisplaySwitch,Ae as getMultiCache,Ur as getNearestLocalhostNotifyCache,Te as getNow,dr as getPathValue,kr as getStringFromLocalStorage,Le as getTodayOfWeek,Ln as getValue,gr as getValueByKey,it as gte,me as hasCache,Ht as isArray,kt as isBoolean,Yt as isDate,Et as isDatetime,Ot as isEqual,It as isEqualBySerialize,jt as isFunction,Bt as isImageBase4,Mt as isInvalid,Ct as isMoney,Pt as isNull,Dt as isNumber,Wt as isObject,Rt as isPlainObject,Ut as isPromise,Tt as isString,Nt as isUndefined,Lt as isUrl,be as keys,Cr as localStorageAssist,ne as logConfig,Zn as logData,re as logDebug,on as logDisplay,ae as logError,oe as logExecute,te as logInfo,rn as logLevel,ue as logObject,ie as logText,ee as logTrace,_n as logWarn,Fn as loggerSwitch,vt as map,ut as memoize,br as mergeProps,xr as mergeStyle,qe as messagePromptAssist,cn as messageTypeCollection,un as notificationTypeCollection,Jr as parseQueryString,Yn as refitCommonData,Tn as refitFieldDecoratorOption,hr as removeEndMatch,gt as removeFromArray,mr as removeLastMatch,Tr as removeLocalStorage,Br as removeNearestLocalhostNotifyCache,mt as replace,sr as replaceWithKeep,Vt as requestMethod,ot as reverse,Z as round,Yr as saveJsonToLocalStorage,Pr as saveStringToLocalStorage,Xe as seSuccessMessageDisplayMonitor,Hn as searchFromList,Nn as seededRandom,pt as set,ge as setCache,fe as setCacheMount,tr as setErrorMessageDisplayMonitor,ye as setExpiration,$e as setInfoMessageDisplayMonitor,le as setLoggerDisplaySwitch,ve as setMultiCache,Lr as setNearestLocalhostNotifyCache,ze as setOpenMessageDisplayMonitor,Or as setStorageGetter,jr as setStorageRemover,Ir as setStorageSetter,Ze as setWarnMessageDisplayMonitor,_e as setWarningMessageDisplayMonitor,ur as showError,ir as showErrorMessage,er as showInfoMessage,nr as showOpenMessage,cr as showRuntimeError,rr as showSuccessMessage,or as showWarnMessage,ar as showWarningMessage,yt as size,fr as sleep,At as sortBy,vr as sortCollectionByKey,tn as sortOperate,tt as sortedUnique,nt as split,st as startsWith,De as statisticsCache,xe as takeCache,En as to,wn as toBoolean,gn as toBoundary,xn as toDatetime,An as toLower,dn as toMd5,vn as toMoney,mn as toNumber,pn as toPercentage,Sn as toPromise,Mn as toRound,fn as toSha1,yn as toString,bn as toUpper,yr as transformData,pr as transformListData,ln as transparentImage,ht as trim,Fr as trySendNearestLocalhostNotify,Gt as underlyingExtensionState,Qt as underlyingState,dt as uniqBy,en as whetherNumber,nn as whetherString,zt as zeroInt,qt as zeroString};
1
+ import t from"node-cache";import n from"lodash/isBoolean";import r from"lodash/isDate";import e from"lodash/isEqual";import o from"lodash/isFunction";import a from"lodash/isNull";import i from"lodash/isNumber";import u from"lodash/isObject";import c from"lodash/isString";import l from"lodash/isUndefined";import s from"lodash/replace";import f from"lodash/assign";import d from"lodash/assignWith";import h from"lodash/difference";import m from"lodash/dropRight";import g from"lodash/endsWith";import v from"lodash/filter";import p from"lodash/find";import y from"lodash/findIndex";import w from"lodash/first";import b from"lodash/floor";import A from"lodash/forEach";import x from"lodash/get";import S from"lodash/gte";import M from"lodash/map";import C from"lodash/memoize";import D from"lodash/remove";import E from"lodash/reverse";import O from"lodash/round";import I from"lodash/set";import j from"lodash/size";import k from"lodash/sortBy";import N from"lodash/sortedUniq";import T from"lodash/split";import P from"lodash/startsWith";import Y from"lodash/trim";import F from"lodash/uniqBy";import B from"lodash/toNumber";import H from"lodash/toString";import U from"object-hash";import W from"dayjs";import{stringify as R,parse as L}from"qs";var K,Q="function"==typeof atob,G="function"==typeof btoa,J="function"==typeof Buffer,V="function"==typeof TextDecoder?new TextDecoder:void 0,z="function"==typeof TextEncoder?new TextEncoder:void 0,q=Array.prototype.slice.call("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="),Z=(K={},q.forEach((function(t,n){return K[t]=n})),K),$=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,X=String.fromCharCode.bind(String),_="function"==typeof Uint8Array.from?Uint8Array.from.bind(Uint8Array):function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(t){return t};return new Uint8Array(Array.prototype.slice.call(t,0).map(n))},tt=function(t){return t.replace(/=/g,"").replace(/[+\/]/g,(function(t){return"+"==t?"-":"_"}))},nt=function(t){return t.replace(/[^A-Za-z0-9\+\/]/g,"")},rt=G?function(t){return btoa(t)}:J?function(t){return Buffer.from(t,"binary").toString("base64")}:function(t){for(var n,r,e,o,a="",i=t.length%3,u=0;u<t.length;){if((r=t.charCodeAt(u++))>255||(e=t.charCodeAt(u++))>255||(o=t.charCodeAt(u++))>255)throw new TypeError("invalid character found");a+=q[(n=r<<16|e<<8|o)>>18&63]+q[n>>12&63]+q[n>>6&63]+q[63&n]}return i?a.slice(0,i-3)+"===".substring(i):a},et=J?function(t){return Buffer.from(t).toString("base64")}:function(t){for(var n=[],r=0,e=t.length;r<e;r+=4096)n.push(X.apply(null,t.subarray(r,r+4096)));return rt(n.join(""))},ot=function(t){if(t.length<2)return(n=t.charCodeAt(0))<128?t:n<2048?X(192|n>>>6)+X(128|63&n):X(224|n>>>12&15)+X(128|n>>>6&63)+X(128|63&n);var n=65536+1024*(t.charCodeAt(0)-55296)+(t.charCodeAt(1)-56320);return X(240|n>>>18&7)+X(128|n>>>12&63)+X(128|n>>>6&63)+X(128|63&n)},at=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,it=J?function(t){return Buffer.from(t,"utf8").toString("base64")}:z?function(t){return et(z.encode(t))}:function(t){return rt(t.replace(at,ot))},ut=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,ct=function(t){switch(t.length){case 4:var n=((7&t.charCodeAt(0))<<18|(63&t.charCodeAt(1))<<12|(63&t.charCodeAt(2))<<6|63&t.charCodeAt(3))-65536;return X(55296+(n>>>10))+X(56320+(1023&n));case 3:return X((15&t.charCodeAt(0))<<12|(63&t.charCodeAt(1))<<6|63&t.charCodeAt(2));default:return X((31&t.charCodeAt(0))<<6|63&t.charCodeAt(1))}},lt=Q?function(t){return atob(nt(t))}:J?function(t){return Buffer.from(t,"base64").toString("binary")}:function(t){if(t=t.replace(/\s+/g,""),!$.test(t))throw new TypeError("malformed base64.");t+="==".slice(2-(3&t.length));for(var n,r,e,o="",a=0;a<t.length;)n=Z[t.charAt(a++)]<<18|Z[t.charAt(a++)]<<12|(r=Z[t.charAt(a++)])<<6|(e=Z[t.charAt(a++)]),o+=64===r?X(n>>16&255):64===e?X(n>>16&255,n>>8&255):X(n>>16&255,n>>8&255,255&n);return o},st=J?function(t){return _(Buffer.from(t,"base64"))}:function(t){return _(lt(t),(function(t){return t.charCodeAt(0)}))},ft=J?function(t){return Buffer.from(t,"base64").toString("utf8")}:V?function(t){return V.decode(st(t))}:function(t){return lt(t).replace(ut,ct)},dt=function(t){return ft(nt(t.replace(/[-_]/g,(function(t){return"-"==t?"+":"/"}))))};function ht(t){return dt(t)}function mt(t){return function(t){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return n?tt(it(t)):it(t)}(t)}function gt(t){return 1*t<10?"0".concat(t):t}function vt(t){return vt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},vt(t)}function pt(t){var n=function(t,n){if("object"!==vt(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var e=r.call(t,n||"default");if("object"!==vt(e))return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(t)}(t,"string");return"symbol"===vt(n)?n:String(n)}function yt(t,n,r){return(n=pt(n))in t?Object.defineProperty(t,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[n]=r,t}function wt(t,n){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(t);n&&(e=e.filter((function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable}))),r.push.apply(r,e)}return r}function bt(t){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?wt(Object(r),!0).forEach((function(n){yt(t,n,r[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):wt(Object(r)).forEach((function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))}))}return t}function At(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return x(t,n,r)}function xt(t,n){return O(t,n)}function St(t,n,r){return g(t,n,r)}function Mt(t){return N(t)}function Ct(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1e3;return T(t,n,r)}function Dt(t,n){return f(t,n)}function Et(t,n,r){return d(t,n,r)}function Ot(t){return E(t)}function It(t,n){return A(t,n)}function jt(t,n){return S(t,n)}function kt(t){return C(t)}function Nt(t,n){return b(t,n)}function Tt(t){return w(t)}function Pt(t,n){return P(t,n)}function Yt(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return m(t,n)}function Ft(t,n){return F(t,n)}function Bt(t){return Y(t)}function Ht(t,n,r){return s(t,n,r)}function Ut(t,n){return D(t,n)}function Wt(t,n){return M(t,n)}function Rt(t,n,r){return I(t,n,r)}function Lt(t){return j(t)}function Kt(t,n){return h(t,n)}function Qt(t,n){return v(t,n)}function Gt(t,n){return k(t,n)}function Jt(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return y(t,n,r)}function Vt(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return p(t,n,r)}function zt(t){return rn(t)}function qt(t){var n="".concat(rn(t)?null:t).match(/^(\d{1,4})(-|\/)(\d{1,2})\2(\d{1,2})$/);if(null==n)return!1;var r=new Date(n[1],n[3]-1,n[4]);return r.getFullYear()===parseInt(n[1],10)&&r.getMonth()+1===parseInt(n[3],10)&&r.getDate()===parseInt(n[4],10)}function Zt(t){return i(t)}function $t(t){var n="".concat(rn(t)?null:t);if(""===n)return!1;return new RegExp(/^([1-9][\d]{0,15}|0)(\.[\d]{1,2})?$/).test(n)}function Xt(t,n){return e(t,n)}function _t(t,n){return JSON.stringify(t||{})===JSON.stringify(n||{})}function tn(t){return o(t)}function nn(t){return n(t)}function rn(t){return l(t)}function en(t){return a(t)}function on(t){return r(t)}function an(t){return c(t)}function un(t){return Array.isArray(t)}function cn(t){return u(t)}function ln(t){return null!==t&&"object"===vt(t)&&!un(t)}function sn(t){return ln(t)&&tn(t.then)&&tn(t.catch)}function fn(t){return new RegExp(/(http|https):\/\/([\w.]+\/?)\S*/).test(t)}function dn(t){return new RegExp(/(data):image\/([\w.]+\/?)\S*/).test(t)}function hn(t){return""===Bt(s(t||""," ",""))}function mn(t,n){var r=!1;return un(t)?(t.some((function(t){return t===n&&(r=!0,!0)})),r):r}var gn={WEAPP:"WEAPP",WEB:"WEB",RN:"RN",SWAN:"SWAN",ALIPAY:"ALIPAY",TT:"TT",QQ:"QQ",JD:"JD",UNKNOWN:"UNKNOWN"},vn={loadApiPath:"",firstLoadSuccess:!1,loadSuccess:!1,registering:!1,dataLoading:!1,reloading:!1,searching:!1,refreshing:!1,paging:!1,processing:!1,dispatchComplete:!0,metaData:null,metaExtra:null,metaListData:[],metaOriginalData:null,urlParams:null,externalData:null},pn={dataLoading:!0},yn={get:"GET",post:"POST",put:"PUT",delete:"DELETE",trace:"TRACE",connect:"CONNECT"},wn="0",bn=0,An="1970-01-01 00:00",xn={number:"number",datetime:"datetime",string:"string",moment:"moment",money:"money",array:"array",boolean:"boolean"},Sn={money:"money",datetime:"datetime",chineseMoney:"chineseMoney",percentage:"percentage"},Mn={yearMonthDayHourMinuteSecond:"YYYY-MM-DD HH:mm:ss",yearMonthDayHourMinute:"YYYY-MM-DD HH:mm",yearMonthDay:"YYYY-MM-DD",yearMonth:"YYYY-MM",year:"YYYY",monthDayHourMinuteSecond:"YYYY-MM-DD HH:mm:ss",monthDayHourMinute:"MM-DD HH:mm",monthDay:"MM-DD",hourMinute:"HH:mm",hourMinuteSecond:"HH:mm:ss",month:"MM",day:"DD",hour:"HH",minute:"mm",second:"ss"},Cn={moveUp:"moveUp",moveDown:"moveDown"},Dn={no:"0",yes:"1"},En={no:0,yes:1},On={trace:"trace",debug:"debug",warn:"warn",error:"error",info:"info",config:"config",execute:"execute"},In={auto:"auto",text:"text",object:"object"},jn={success:"success",error:"error",info:"info",warning:"warning",warn:"warn",open:"open"},kn=bt({},jn),Nn=bt({},jn),Tn="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABLCAYAAACGGCK3AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAA0SURBVHhe7cExAQAAAMKg9U9tDQ8gAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIA3NXV7AAHfw7zWAAAAAElFTkSuQmCC",Pn=Tn;function Yn(t){return U(t,{algorithm:"sha1"})}function Fn(t){return U(t,{algorithm:"md5"})}function Bn(t,n){var r=Math.pow(10,n+1),e=Math.floor(Hn(t)*r);return 10*Math.round(e/10)/r}function Hn(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=B(t),e=Number.isNaN(r)?0:r;return null==(n||null)?e:Bn(e,n)}function Un(t,n,r){if(!Zt(t))throw new Error("value must be number value");var e=Hn(t);return void 0!==n&&(e=Math.max(t,n)),void 0!==r&&(e=Math.min(e,r)),e}function Wn(t){return $t(t)?parseFloat(t,10):0}function Rn(t){return"".concat(Wn(1e3*Hn(t)/10),"%")}function Ln(t){return H(t)}function Kn(t){return!!t}function Qn(t){return Ln(t).toUpperCase()}function Gn(t){return Ln(t).toLowerCase()}function Jn(t){if(null==(t||null))return null;if(on(t))return t;if(an(t)&&t.indexOf("T")<0){var n=t.replace(/\-/g,"/");return new Date(n)}return new Date(t)}function Vn(t){return sn(t)?t:Promise.resolve(t)}function zn(t,n){return xt(t,n)}function qn(t){var n=t.target,r=t.convert;if(tn(r))return r(n);if(an(r))switch(r){case xn.number:return Hn(n);case xn.datetime:return Jn(n);case xn.string:return Ln(n);case xn.money:return Wn(n);case xn.array:return null==(n||null)?[]:un(n)?n:[n];default:return n}return n}function Zn(t,n){(null==n||n>t.length)&&(n=t.length);for(var r=0,e=new Array(n);r<n;r++)e[r]=t[r];return e}function $n(t,n){if(t){if("string"==typeof t)return Zn(t,n);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Zn(t,n):void 0}}function Xn(t){return function(t){if(Array.isArray(t))return Zn(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||$n(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _n(t){return new Function("return ".concat(t))()}function tr(t){return"".concat("easy-soft-utility","::").concat(t,"::")}function nr(){var t=navigator.userAgent;return{trident:t.indexOf("Trident")>-1,presto:t.indexOf("Presto")>-1,webKit:t.indexOf("AppleWebKit")>-1,gecko:t.indexOf("Gecko")>-1&&-1===t.indexOf("KHTML"),mobile:!!t.match(/AppleWebKit.*Mobile.*/),ios:!!t.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/),android:t.indexOf("Android")>-1||t.indexOf("Linux")>-1,iPhone:t.indexOf("iPhone")>-1,iPad:t.indexOf("iPad")>-1,webApp:-1===t.indexOf("Safari")}}function rr(){var t;return{versions:nr(),language:(null!==(t=navigator.browserLanguage||navigator.language)&&void 0!==t?t:"").toLowerCase()}}function er(t){var n=t.seed,r=t.min||0;return r+(9301*n+49297)%233280/233280*((t.max||1)-r)}function or(t){return null==t?null:JSON.parse(JSON.stringify(t))}function ar(t,n,r){var e=[];return null!=t&&(e=Xn(t)),null!=r&&(e=[].concat(Xn(e),Xn(r))),null!=n&&(e=[n].concat(Xn(e))),e}function ir(t,n,r,e,o){var a=e,i=void 0===r?null:r;return null!=n&&("function"==typeof convertValue?a.initialValue=o(t)||i:a.initialValue=t||i),a}function ur(t,n,r){var e=null;return null==n||(r||[]).forEach((function(r){r[t]===n&&(e=r)})),e}function cr(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:8,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:16,e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""),o=[],a=0;if(r=r||e.length,n)for(a=0;a<n;a++)o[a]=e[0|Math.random()*r];else for(o[8]=o[13]=o[18]=o[23]="-",o[14]="4",a=0;a<36;a++)o[a]||(t=0|16*Math.random(),o[a]=e[19===a?3&t|8:t]);return o.join("")}function lr(t){var n=t.pageNo,r=t.pageSize,e=t.total;return!((e||0)<=0)&&(n||0)*(r||0)<(e||0)}function sr(){return"development"===process.env.NODE_ENV}function fr(t){return Object.keys(t).map((function(n){return t[n]})).join(",")}var dr="loggerAssist",hr={loggerDisplaySwitchPromptSetInformationComplete:!1,loggerDisplaySwitchSetComplete:!1,display:!1},mr="#F8C471",gr="#C39BD3",vr="#89ca78",pr="#ff4f49",yr="#00768f",wr="#596032";function br(t){var n=t.text,r=t.color,e=void 0===r?"":r,o=t.dataDescription,a=void 0===o?"":o,i=t.ancillaryInformation,u=void 0===i?"":i,c=function(t,n){return"".concat(Ln(t)).concat(hn(n)?"":" -> ".concat(n))}(an(n)?n:JSON.stringify(n),u);console.log("%c%s","color:".concat(e,";"),"".concat(hn(a)?"":"[".concat(Qn(a),"] ")).concat(c))}function Ar(t){var n=t.data,r=t.color,e=void 0===r?"":r,o=t.dataDescription,a=void 0===o?"":o,i=t.ancillaryInformation;br({text:"check the following object data",color:e,dataDescription:a,ancillaryInformation:void 0===i?"":i}),console.log(n)}function xr(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:In.auto,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:On.debug,e=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",o=Nr();if(!hr.loggerDisplaySwitchSetComplete&&!hr.loggerDisplaySwitchPromptSetInformationComplete){var a="".concat(tr(dr),"logData -> logger display switch default is false, if want to display log, please set it before first log, use setLoggerDisplaySwitch to set it, this message only show once.");br({text:a,color:"#08BBEE",dataDescription:"hint",ancillaryInformation:""}),hr.loggerDisplaySwitchPromptSetInformationComplete=!0}if(o||r===On.error){var i=null==(n||null)||hn(n)?In.auto:n;if(!mn([In.auto,In.text,In.object],i))throw new Error("Invalid log display mode -> ".concat(i));if(i===In.auto&&(i=an(t)?In.text:In.object),r===On.error){if(i===In.text){var u="error -> ".concat(t).concat(hn(e)?"":", ".concat(Qn(e)),".");console.error(u)}i===In.object&&console.error({error:t})}o&&(r===On.trace&&(i===In.text&&br({text:t,color:wr,dataDescription:"trace",ancillaryInformation:e}),i===In.object&&Ar({data:t,color:wr,dataDescription:"trace",ancillaryInformation:e})),r===On.debug&&(i===In.text&&br({text:t,color:yr,dataDescription:"debug",ancillaryInformation:e}),i===In.object&&Ar({data:t,color:yr,dataDescription:"debug",ancillaryInformation:e})),r===On.warn&&(i===In.text&&br({text:t,color:pr,dataDescription:"warn",ancillaryInformation:e}),i===In.object&&Ar({data:t,color:pr,dataDescription:"warn",ancillaryInformation:e})),r===On.info&&(i===In.text&&br({text:t,color:vr,dataDescription:"info",ancillaryInformation:e}),i===In.object&&Ar({data:t,color:vr,dataDescription:"info",ancillaryInformation:e})),r===On.execute&&(i===In.text&&br({text:t,color:gr,dataDescription:"execute",ancillaryInformation:e}),i===In.object&&Ar({data:t,color:gr,dataDescription:"execute",ancillaryInformation:e})),r===On.config&&(i===In.text&&br({text:t,color:mr,dataDescription:"config",ancillaryInformation:e}),i===In.object&&Ar({data:t,color:mr,dataDescription:"config",ancillaryInformation:e})))}}function Sr(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";an(t)?jr(t,On.warn,n):kr(t,On.warn,n)}function Mr(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";an(t)?jr(t,On.info,n):kr(t,On.info,n)}function Cr(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";an(t)?jr(t,On.config,n):kr(t,On.config,n)}function Dr(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";an(t)?jr(t,On.trace,n):kr(t,On.trace,n)}function Er(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";an(t)?jr(t,On.debug,n):kr(t,On.debug,n)}function Or(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";an(t)?jr(t,On.execute,n):kr(t,On.execute,n)}function Ir(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";an(t)?jr(t,On.error,n):kr(t,On.error,n)}function jr(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:On.trace,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";xr(t,In.text,n,r)}function kr(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:On.trace,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";xr(t,In.object,n,r)}function Nr(){return Kn(hr.display)}function Tr(t){hr.display=Kn(t)}var Pr={mountComplete:!1,target:null};function Yr(n){if(cn(n))throw new Error("".concat(tr("cacheAssist"),"setCacheMount -> cache mount target must be a object"));null==(n.localRuntimeCache||null)&&(n.localRuntimeCache=new t),Pr.target=n,Pr.mountComplete=!0,Mr("setCacheMount -> cache mount success.")}function Fr(t){if(hn(t))throw new Error("checkKey -> cache key is null or empty.");if(!an(t)&&!Zt(t))throw Ir(t),new Error("checkKey -> cache key must be string or number,you can check it in console.")}function Br(){if(!Pr.mountComplete||!Pr.target||!Pr.target.localRuntimeCache)throw new Error("getCachePool -> please use setCacheMount function to set cache mount target before get it.");return Pr.target.localRuntimeCache}function Hr(t){var n=t.key,r=Br();if(null==r)throw new Error("cache pool not exist");return r.has(n)}function Ur(t){var n=t.key,r=t.value,e=t.expiration,o=void 0===e?0:e;Fr(n);var a=Br();if(null==a)throw new Error("cache pool not exist");return a.set(n,r,o)}function Wr(t){if(!un(t))throw new Error("setMultiCache: list must be array");if(t.length<=0)return!0;var n=[];if(t.forEach((function(t){var r=bt(bt({},{key:"",value:"",expiration:0}),t),e=r.key,o=r.value,a=r.expiration;hn(e)||(Fr(e),n.push({key:e,value:o,ttl:a}))})),n.length<=0)return!1;var r=Br();if(null==r)throw new Error("cache pool not exist");return r.mset(n)}function Rr(t){var n=t.key,r=Br();if(null==r)throw new Error("cache pool not exist");return r.getTtl(n)}function Lr(t){var n=t.key,r=t.expiration,e=Br();if(null==e)throw new Error("cache pool not exist");return e.ttl(n,r)}function Kr(t){var n=t.key,r=Br();if(null==r)throw new Error("cache pool not exist");return r.get(n)}function Qr(){var t=Br();if(null==t)throw new Error("cache pool not exist");return t.keys()}function Gr(t){if(!un(t))throw new Error("getMultiCache: list must be array");var n=Br();if(null==n)throw new Error("cache pool not exist");return n.mget(t)}function Jr(t){var n=t.key,r=Br();if(null==r)throw new Error("cache pool not exist");return r.take(n)}function Vr(t){var n=t.key;Fr(n);var r=Br();if(null==r)throw new Error("cache pool not exist");return r.del(n)}function zr(t){if(!un(t))throw new Error("deleteMultiCache: list must be array");var n=Br();if(null==n)throw new Error("cache pool not exist");return n.del(t)}function qr(){var t=Br();if(null==t)throw new Error("cache pool not exist");return t.flushAll()}function Zr(){var t=Br();if(null==t)throw new Error("cache pool not exist");return t.getStats()}function $r(t,n){return function(t){if(Array.isArray(t))return t}(t)||function(t,n){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var e,o,a,i,u=[],c=!0,l=!1;try{if(a=(r=r.call(t)).next,0===n){if(Object(r)!==r)return;c=!1}else for(;!(c=(e=a.call(r)).done)&&(u.push(e.value),u.length!==n);c=!0);}catch(t){l=!0,o=t}finally{try{if(!c&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(l)throw o}}return u}}(t,n)||$n(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Xr(t){var n=t.seed;return"#".concat("00000".concat((16777216*er({seed:n})<<0).toString(16)).substring(-6))}function _r(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"RGB",r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],e=/^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/,o=(null!=t?t:"").toLowerCase();if(e.test(o)){if(4===o.length){for(var a="#",i=1;i<4;i+=1)a+=o.slice(i,i+1).concat(o.slice(i,i+1));o=a}for(var u=[],c=1;c<7;c+=2)u.push(parseInt("0x"+o.slice(c,c+2)));return n?"".concat(n,"(").concat(u.join(","),")"):r?u:u.join(",")}return Ir("Invalid hex color -> ".concat(t)),o}function te(t){var n=t.progress,r=t.startColor,e=t.endColor,o=_r(r,null,!0),a=_r(e,null,!0),i=$r(o,3),u=i[0],c=i[1],l=i[2],s=$r(a,3),f=s[0],d=s[1],h=s[2],m=[(u+Math.round((f-u)*n)).toString(16),(c+Math.round((d-c)*n)).toString(16),(l+Math.round((h-l)*n)).toString(16)];return"#".concat(m.join("").toUpperCase())}function ne(t){var n=t.direct,r=t.list,e=void 0===r?[]:r,o=Zt(n)?"".concat(n,"deg"):n;return"linear-gradient(".concat(o,", ").concat(e.join(),")")}function re(t,n){var r=Jn(t);return r.setHours(r.getHours()+n)}function ee(t,n){var r=Jn(t);return r.setMinutes(r.getMinutes()+n)}function oe(t,n){var r=Jn(t);return r.setSeconds(r.getSeconds()+n)}function ae(){return new Date}function ie(t,n){var r=t.getTime(),e=(n.getTime()-r)/1e3,o=parseInt(e/86400),a=parseInt((e-24*o*60*60)/3600),i=parseInt((e-24*o*60*60-60*a*60)/60);return{day:o,hour:a,minute:i,second:e-24*o*60*60-60*a*60-60*i}}var ue=function(t,n,r){var e=Jn(t),o=n?Jn(n):new Date,a=o.getTime()-e.getTime();return"second"===r&&a/1e3||"minute"===r&&a/1e3/60||"hour"===r&&a/1e3/60/60||"day"===r&&a/1e3/60/60/24||"week"===r&&a/1e3/60/60/24/7||"month"===r&&ce(e,o)||"quarter"===r&&ce(e,o)/3||"year"===r&&ce(e,o)/12||a},ce=function(t,n){var r=Jn(t),e=Jn(n);return 12*(r.getFullYear()-e.getFullYear())+r.getMonth()-e.getMonth()};function le(t){var n=t.data;return W(n).day()}function se(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],n=W().day();if(!t)return n;var r="";switch(Hn(n)){case 0:r="日";break;case 1:r="一";break;case 2:r="二";break;case 3:r="三";break;case 4:r="四";break;case 5:r="五";break;case 6:r="六";break;default:r=""}return hn(r)?"":"星期".concat(r)}function fe(t){var n=t.data,r=t.places,e=void 0===r?2:r,o=t.thousand,a=void 0===o?",":o,i=t.decimal;return de({data:n,places:e,symbol:"",thousand:a,decimal:void 0===i?".":i})}function de(t){var n=t.data,r=t.places,e=void 0===r?2:r,o=t.symbol,a=void 0===o?"¥":o,i=t.thousand,u=void 0===i?",":i,c=t.decimal,l=void 0===c?".":c,s=n||0,f=isNaN(e=Math.abs(e))?2:e,d=void 0!==a?a:"¥",h=u||",",m=l||".",g=s<0?"-":"",v=parseInt(s=Math.abs(+s||0).toFixed(f),10)+"",p=v.length;return d+g+((p=p>3?p%3:0)?v.substr(0,p)+h:"")+v.substr(p).replace(/(\d{3})(?=\d)/g,a+"1"+h)+(f?m+Math.abs(s-Hn(v)).toFixed(f).slice(2):"")}function he(t){var n,r,e,o=t.target,a=["零","壹","贰","叁","肆","伍","陆","柒","捌","玖"],i=["","拾","佰","仟"],u=["","万","亿","兆"],c=["角","分","毫","厘"],l="";if(""===o)return"";if((o=parseFloat(o))>=1e15)return"超出最大处理数字";if(0===o)return l=a[0]+"元";if(-1===(o=o.toString()).indexOf("."))n=o,r="";else{var s=$r(e=o.split("."),2);n=s[0],r=s[1],r=e[1].substr(0,4)}if(parseInt(n,10)>0){for(var f=0,d=n.length,h=0;h<d;h+=1){var m=n.substr(h,1),g=d-h-1,v=g/4,p=g%4;"0"===m?f+=1:(f>0&&(l+=a[0]),f=0,l+=a[parseInt(m,10)]+i[p]),0===p&&f<4&&(l+=u[v])}l+="元"}if(""!==r)for(var y=r.length,w=0;w<y;w+=1){var b=r.substr(w,1);"0"!==b&&(l+=a[Number(b)]+c[w])}return""===l&&(l+=a[0]+"元"),l}function me(t){var n=t.data,r=t.fmt,e=void 0===r?Mn.yearMonthDayHourMinuteSecond:r;return null==(n||null)?"":W(n).format(e)}function ge(t){var n=t.target,r=t.format,e=t.option,o=void 0===e?{}:e;if(tn(r))return r(n);if(an(r))switch(r){case Sn.money:return de({data:n});case Sn.datetime:return me({data:n});case Sn.chineseMoney:return he({target:n,option:o});case Sn.percentage:return"".concat(zn(100*n,1),"%");default:return n}return n}function ve(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},e=bt(bt({},{second:["刚刚","片刻后"],seconds:["%d 秒前","%d 秒后"],minute:["大约 1 分钟前","大约 1 分钟后"],minutes:["%d 分钟前","%d 分钟后"],hour:["大约 1 小时前","大约 1 小时后"],hours:["%d 小时前","%d 小时后"],day:["1 天前","1 天后"],days:["%d 天前","%d 天后"],month:["大约 1 个月前","大约 1 个月后"],months:["%d 月前","%d 月后"],year:["大约 1 年前","大约 1 年后"],years:["%d 年前","%d 年后"]}),r||{}),o=ue(t,n),a=o<0?1:0,i=Math.abs(o)/1e3,u=i/60,c=u/60,l=c/24,s=l/365,f=function(t,n){return t.replace(/%d/i,n)};return i<10&&f(e.second[a],parseInt(i))||i<45&&f(e.seconds[a],parseInt(i))||i<90&&f(e.minute[a],1)||u<45&&f(e.minutes[a],parseInt(u))||u<90&&f(e.hour[a],1)||c<24&&f(e.hours[a],parseInt(c))||c<42&&f(e.day[a],1)||l<30&&f(e.days[a],parseInt(l))||l<45&&f(e.month[a],1)||l<365&&f(e.months[a],parseInt(l/30))||s<1.5&&f(e.year[a],1)||f(e.years[a],parseInt(s))}function pe(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return ve(t,ae(),n)}var ye={showOpenMessage:function(t){var n=t.text;t.duration,t.onClose,Mr({text:n})},showInfoMessage:function(t){var n=t.text;t.duration,t.onClose,Mr({text:n})},showSuccessMessage:function(t){var n=t.text;t.duration,t.onClose,Mr({text:n})},showWarnMessage:function(t){var n=t.text;t.duration,t.onClose,Sr(n)},showWarningMessage:function(t){var n=t.text;t.duration,t.onClose,Sr(n)},showErrorMessage:function(t){var n=t.text;t.duration,t.onClose,Ir(n)}};function we(t){ye.showOpenMessage=t}function be(t){ye.showInfoMessage=t}function Ae(t){ye.showSuccessMessage=t}function xe(t){ye.showWarnMessage=t}function Se(t){ye.showWarningMessage=t}function Me(t){ye.showErrorMessage=t}function Ce(t){var n=t.text,r=t.duration,e=void 0===r?1500:r,o=t.onClose,a=void 0===o?function(){}:o;tn(ye.showOpenMessage)&&ye.showOpenMessage({text:n,duration:e,onClose:a})}function De(t){var n=t.text,r=t.duration,e=void 0===r?1500:r,o=t.onClose,a=void 0===o?function(){}:o;tn(ye.showInfoMessage)&&ye.showInfoMessage({text:n,duration:e,onClose:a})}function Ee(t){var n=t.text,r=t.duration,e=void 0===r?1500:r,o=t.onClose,a=void 0===o?function(){}:o;tn(ye.showSuccessMessage)&&ye.showSuccessMessage({text:n,duration:e,onClose:a})}function Oe(t){var n=t.text,r=t.duration,e=void 0===r?1500:r,o=t.onClose,a=void 0===o?function(){}:o;tn(ye.showWarnMessage)&&ye.showWarnMessage({text:n,duration:e,onClose:a})}function Ie(t){var n=t.text,r=t.duration,e=void 0===r?1500:r,o=t.onClose,a=void 0===o?function(){}:o;tn(ye.showWarningMessage)&&ye.showWarningMessage({text:n,duration:e,onClose:a})}function je(t){var n=t.text,r=t.duration,e=void 0===r?1500:r,o=t.onClose,a=void 0===o?function(){}:o;tn(ye.showErrorMessage)&&ye.showErrorMessage({text:n,duration:e,onClose:a})}function ke(t){je({text:t})}function Ne(t){var n=t.text,r=t.showStack,e=void 0===r||r;try{if(hn(n||"")||(je({text:n}),Ir({text:n})),e)throw new Error("".concat(hn(n||"")?"":"".concat(Ln(n),", "),"call stack:"))}catch(t){console.log(t.stack)}}function Te(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"...";return t&&t.length>n?"".concat(Ln(t).substring(0,n)).concat(r):Ln(t)}function Pe(t,n,r,e){var o=Ln(t),a=(t||"").length;a>0&&(r>=0||e>=0)&&(o=r>=a||e>=a||(r||0)+(e||0)>=a?t:t.substr(0,r)+n+t.substr(a-e,e));return o||""}function Ye(t,n){for(var r=(new Date).getTime();!((new Date).getTime()-r>t););tn(n)&&n()}function Fe(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(rn(t))return r;if(null==t)return r;if(!an(n)){var e="getPathValue Function param path must be string";return Ne({message:e}),null}var o=At(t,n,r);return rn(r)||en(r)?o:o||r}function Be(t,n){if(!an(t))throw new Error("removeEndMatch only use for string target");if(!an(n))throw new Error("removeEndMatch only use for string match");if(hn(t))return t;if(hn(n))return t;var r=t.lastIndexOf(n);return r>=0&&t.length===r+n.length?t.substr(r,n.length):t}function He(t,n){if(!an(t))throw new Error("removeEndMatch only use for string source");if(!an(n))throw new Error("removeEndMatch only use for string target");if(hn(t))return t;if(hn(n))return t;var r=t.lastIndexOf(n);return r>=0?t.substr(r,n.length):t}function Ue(t){var n=t.data,r=t.key,e=t.defaultValue,o=void 0===e?null:e,a=t.convert,i=void 0===a?null:a,u=t.convertBuilder,c=void 0===u?null:u,l=t.format,s=void 0===l?null:l,f=t.formatBuilder,d=void 0===f?null:f,h=Fe(n,r,o),m=h;return null==(c||null)&&null==(i||null)||(m=tn(c)?qn({target:h,convert:c}):qn({target:h,convert:i})),null==(d||null)&&null==(s||null)||(m=tn(d)?ge({target:m,format:d}):ge({target:m,format:s})),m}function We(t){var n=t.operate,r=t.item,e=t.list,o=t.key,a=t.sortInitialValue,i=void 0===a?0:a;if(null==(r||null))return e;var u=[],c=[],l=[];if((e||[]).length<=1){return Oe({message:"无需排序!"}),e}var s=Ue({data:r,key:o,convert:xn.number});switch((e||[]).forEach((function(t){var n=Ue({data:t,key:o,convert:xn.number});n<s&&u.push(t),n>s&&c.push(t)})),n){case Cn.moveUp:if(s===i){return Oe({message:"已经排在首位!"}),e}(u||[]).forEach((function(t,n){if(n<u.length-1)l.push(t);else{var e=r;e[o]-=1,l.push(e);var a=t;a[o]+=1,l.push(a)}})),l=l.concat(c);break;case Cn.moveDown:if(s===(e||[]).length+i-1){return Oe({message:"已经排在末位!"}),e}l=l.concat(u),(c||[]).forEach((function(t,n){if(0===n){var e=t;e[o]-=1,l.push(e);var a=r;a[o]+=1,l.push(a)}else l.push(t)}));break;default:Oe({message:"不符合的操作, 允许的操作为['".concat(Cn.moveUp,"','").concat(Cn.moveDown,"']!")})}return l}function Re(t){var n=t.list,r=void 0===n?[]:n,e=t.convert,o=void 0===e?null:e,a=t.recursiveKey,i=void 0===a?"children":a;return(un(r)?r:[r]).map((function(t){return Le({data:t,convert:o,target:i})}))}function Le(t){var n=t.data,r=t.convert,e=void 0===r?null:r,o=t.recursiveKey,a=void 0===o?"children":o;if(!tn(e))return n;var i=e(n),u=n[a],c=[];return un(u)&&(c=u.map((function(t){return Le({data:t,convert:e,target:a})}))),i[a]=c,i}function Ke(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,e=Vt(t,n,r);return!rn(e)}function Qe(){function t(t,n){return rn(n)?t:n}for(var n=Dt({},arguments.length<=0?void 0:arguments[0]),r=1;r<arguments.length;r++)n=Et(n,r<0||arguments.length<=r?void 0:arguments[r],t);return n}function Ge(t){if(t&&"object"===vt(t)){var n="";return Object.keys(t).forEach((function(r){var e,o=(null!==(e=r.replace(/([A-Z])/g,"-$1"))&&void 0!==e?e:"").toLowerCase();n+="".concat(o,":").concat(t[r],";")})),n}return t&&"string"==typeof t?t:""}function Je(t,n){return t&&"object"===vt(t)&&n&&"object"===vt(n)?Object.assign({},t,n):Ge(t)+Ge(n)}var Ve,ze="htmlAssist";function qe(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:5,e=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;if(!Zt(t))return t;if(!Zt(n)||n<=0)throw new Error("".concat(tr(ze),"pxToRem -> root value must be number and greater than 0, current root value [").concat(n,"] is invalid."));var o=parseFloat(t);if(o<e)return t;var a=Hn(o/n,r);return 0===a?"0":a+"rem"}var Ze="localStorageAssist",$e=(yt(Ve={getStorage:function(t){Ir("".concat(tr(Ze),"setStorageGetter need config, use setStorageGetter to set it"))},setStorage:function(t,n){Ir("".concat(tr(Ze),"setStorageSetter need config, use setStorageSetter to set it"))},removeStorage:function(t){Ir("".concat(tr(Ze),"setStorageRemover need config, use setStorageRemover to set it"))}},"removeStorage",(function(t){Ir("".concat(tr(Ze),"setStorageRemover need config, use setStorageRemover to set it"))})),yt(Ve,"flushStorage",(function(){Ir("".concat(tr(Ze),"setStorageFlusher need config, use setStorageFlusher to set it"))})),Ve);function Xe(t){$e.getStorage=t}function _e(t){$e.setStorage=t}function to(t){$e.removeStorage=t}function no(t){try{return $e.getStorage(t)}catch(n){throw Ir({key:t,e:n}),n}}function ro(t){var n=no(t);return hn(n)?null:JSON.parse(n||"{}")}function eo(t,n){$e.setStorage(t,n)}function oo(t,n){$e.setStorage(t,JSON.stringify(n||{}))}function ao(t){$e.removeStorage(t)}function io(){$e.flushStorage()}var uo=function(t){var n=t.text;t.duration,t.onClose,Mr({text:n})};var co="nearestLocalhostNotify";function lo(){var t=ro(co);return null==(t||null)||null==(t.nearestTime||null)?null:t||null}function so(){return oo(co,{nearestTime:parseInt((new Date).getTime()/1e3,10)})}function fo(){ao(co)}function ho(t){var n=t.text,r=!1,e=0,o=lo()||null;null==o?r=!0:e=o.nearestTime||0;var a=parseInt((new Date).getTime()/1e3,10);try{if(e+30<a&&(r=!0),r){var i="当前接口域名: ".concat(n,". ");!function(t){var n=t.text,r=t.duration,e=void 0===r?1500:r,o=t.onClose,a=void 0===o?function(){}:o;tn(uo)&&uo({text:n,duration:e,onClose:a})}({text:i}),jr({message:i}),so()}}catch(t){xr(t)}}function mo(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=R(t);if(hn(n))return r;if(hn(r))return n;var e=n.lastIndexOf("?")>=0?"&":"?";return"".concat(n).concat(e).concat(r)}function go(t){return L(t)}function vo(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return"请".concat(n||"输入").concat(t).concat(hn(r)?"":",".concat(r))}function po(t){var n=t.label,r=t.name,e=t.helper,o="",a="",i="";if(an(n))o=n;else{Sr({label:n,name:r,helper:e}),Ne({message:"label必须为文本"})}if(an(r))a=r;else{Sr({label:n,name:r,helper:e}),Ne({message:"name必须为文本"})}if(an(e))i=e;else{Sr({label:n,name:r,helper:e}),Ne({message:"helper必须为文本"})}return{label:o,name:a,helper:i}}function yo(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"注: ";return"".concat(n).concat(t,". ")}export{re as addHour,ee as addMinute,oe as addSecond,Dt as assign,Et as assignWith,vo as buildFieldDescription,yo as buildFieldHelper,te as buildHexColor,ne as buildLinearGradient,tr as buildPromptModuleInfo,mo as buildQueryStringify,_r as buildRGBColorFromHexColor,Xr as buildRandomHexColor,Ge as buildStringStyle,Pr as cacheMountTarget,ue as calculateDateInterval,ce as calculateMonthInterval,ie as calculateTimeInterval,Ke as checkExist,po as checkFromConfig,lr as checkHasMore,mn as checkInCollection,hn as checkStringIsNullOrWhiteSpace,sr as checkWhetherDevelopmentEnvironment,or as cloneWithoutMethod,xn as convertCollection,qe as convertPixelToRem,Mn as datetimeFormat,ht as decodeBase64,Vr as deleteCache,zr as deleteMultiCache,Kt as difference,Yt as dropRight,Te as ellipsis,An as emptyDatetime,mt as encodeBase64,St as endsWith,gn as envCollection,Pn as errorImage,_n as evil,Qt as filter,Vt as find,Jt as findIndex,Tt as first,gt as fixedZero,Nt as floor,qr as flushAllCache,io as flushLocalStorage,It as forEach,Sn as formatCollection,ve as formatDateInterval,pe as formatDateIntervalWithNow,me as formatDatetime,fe as formatDecimal,de as formatMoney,he as formatMoneyToChinese,ge as formatTarget,At as get,rr as getBrowserInfo,nr as getBrowserVersion,Kr as getCache,Br as getCachePool,le as getDayOfWeek,Rr as getExpiration,cr as getGuid,ro as getJsonFromLocalStorage,Nr as getLoggerDisplaySwitch,Gr as getMultiCache,lo as getNearestLocalhostNotifyCache,ae as getNow,Fe as getPathValue,no as getStringFromLocalStorage,se as getTodayOfWeek,fr as getValue,Ue as getValueByKey,jt as gte,Hr as hasCache,un as isArray,nn as isBoolean,on as isDate,qt as isDatetime,Xt as isEqual,_t as isEqualBySerialize,tn as isFunction,dn as isImageBase4,zt as isInvalid,$t as isMoney,en as isNull,Zt as isNumber,cn as isObject,ln as isPlainObject,sn as isPromise,an as isString,rn as isUndefined,fn as isUrl,Qr as keys,$e as localStorageAssist,Cr as logConfig,xr as logData,Er as logDebug,In as logDisplay,Ir as logError,Or as logExecute,Mr as logInfo,On as logLevel,kr as logObject,jr as logText,Dr as logTrace,Sr as logWarn,hr as loggerSwitch,Wt as map,kt as memoize,Qe as mergeProps,Je as mergeStyle,ye as messagePromptAssist,Nn as messageTypeCollection,kn as notificationTypeCollection,go as parseQueryString,ar as refitCommonData,ir as refitFieldDecoratorOption,Be as removeEndMatch,Ut as removeFromArray,He as removeLastMatch,ao as removeLocalStorage,fo as removeNearestLocalhostNotifyCache,Ht as replace,Pe as replaceWithKeep,yn as requestMethod,Ot as reverse,xt as round,oo as saveJsonToLocalStorage,eo as saveStringToLocalStorage,Ae as seSuccessMessageDisplayMonitor,ur as searchFromList,er as seededRandom,Rt as set,Ur as setCache,Yr as setCacheMount,Me as setErrorMessageDisplayMonitor,Lr as setExpiration,be as setInfoMessageDisplayMonitor,Tr as setLoggerDisplaySwitch,Wr as setMultiCache,so as setNearestLocalhostNotifyCache,we as setOpenMessageDisplayMonitor,Xe as setStorageGetter,to as setStorageRemover,_e as setStorageSetter,xe as setWarnMessageDisplayMonitor,Se as setWarningMessageDisplayMonitor,ke as showError,je as showErrorMessage,De as showInfoMessage,Ce as showOpenMessage,Ne as showRuntimeError,Ee as showSuccessMessage,Oe as showWarnMessage,Ie as showWarningMessage,Lt as size,Ye as sleep,Gt as sortBy,We as sortCollectionByKey,Cn as sortOperate,Mt as sortedUnique,Ct as split,Pt as startsWith,Zr as statisticsCache,Jr as takeCache,qn as to,Kn as toBoolean,Un as toBoundary,Jn as toDatetime,Gn as toLower,Fn as toMd5,Wn as toMoney,Hn as toNumber,Rn as toPercentage,Vn as toPromise,zn as toRound,Yn as toSha1,Ln as toString,Qn as toUpper,Le as transformData,Re as transformListData,Tn as transparentImage,Bt as trim,ho as trySendNearestLocalhostNotify,pn as underlyingExtensionState,vn as underlyingState,Ft as uniqBy,En as whetherNumber,Dn as whetherString,bn as zeroInt,wn as zeroString};
@@ -1,9 +1,11 @@
1
1
  /**
2
2
  * base64 decode
3
+ * @param {String} target the string will decode
3
4
  */
4
- export function decodeBase64(target: any): any;
5
+ export function decodeBase64(target: string): string;
5
6
  /**
6
7
  * base64 encode
8
+ * @param {String} target the string will encode
7
9
  */
8
- export function encodeBase64(target: any): string;
10
+ export function encodeBase64(target: string): string;
9
11
  export function fixedZero(val: any): any;
@@ -1,51 +1,76 @@
1
1
  /**
2
- * Log data message, default displayMode is logDisplay.auto, default level is logLevel.debug, default ancillaryInformation is ''
2
+ * Log data message, default displayMode is logDisplay.auto, default level is logLevel.debug, default ancillaryInformation is empty string
3
+ * @param {String} data the data will be display
4
+ * @param {String} displayMode display mode, use logDisplay enum
5
+ * @param {String} level log level, use logLevel enum
6
+ * @param {String} ancillaryInformation when ancillary Information not empty, it will be display
3
7
  */
4
- export function logData(data: any, displayMode?: string, level?: string, ancillaryInformation?: string): void;
8
+ export function logData(data: string, displayMode?: string, level?: string, ancillaryInformation?: string): void;
5
9
  /**
6
- * Log warn message, default ancillaryInformation is ''
10
+ * Log warn message, default ancillaryInformation is empty string
11
+ * @param {String|Object} data the data will be display
12
+ * @param {String} ancillaryInformation when ancillary Information not empty, it will be display
7
13
  */
8
- export function logWarn(data: any, ancillaryInformation?: string): void;
14
+ export function logWarn(data: string | Object, ancillaryInformation?: string): void;
9
15
  /**
10
- * Log info message, default ancillaryInformation is ''
16
+ * Log info message, default ancillaryInformation is empty string
17
+ * @param {String|Object} data the data will be display
18
+ * @param {String} ancillaryInformation when ancillary Information not empty, it will be display
11
19
  */
12
- export function logInfo(data: any, ancillaryInformation?: string): void;
20
+ export function logInfo(data: string | Object, ancillaryInformation?: string): void;
13
21
  /**
14
- * Log config message, default ancillaryInformation is ''
22
+ * Log config message, default ancillaryInformation is empty string
23
+ * @param {String|Object} data the data will be display
24
+ * @param {String} ancillaryInformation when ancillary Information not empty, it will be display
15
25
  */
16
- export function logConfig(data: any, ancillaryInformation?: string): void;
26
+ export function logConfig(data: string | Object, ancillaryInformation?: string): void;
17
27
  /**
18
- * Log trace message, default ancillaryInformation is ''
28
+ * Log trace message, default ancillaryInformation is empty string
29
+ * @param {String|Object} data the data will be display
30
+ * @param {String} ancillaryInformation when ancillary Information not empty, it will be display
19
31
  */
20
- export function logTrace(data: any, ancillaryInformation?: string): void;
32
+ export function logTrace(data: string | Object, ancillaryInformation?: string): void;
21
33
  /**
22
- * Log debug message, default ancillaryInformation is ''
34
+ * Log debug message, default ancillaryInformation is empty string
35
+ * @param {String|Object} data the data will be display
36
+ * @param {String} ancillaryInformation when ancillary Information not empty, it will be display
23
37
  */
24
- export function logDebug(data: any, ancillaryInformation?: string): void;
38
+ export function logDebug(data: string | Object, ancillaryInformation?: string): void;
25
39
  /**
26
- * Log execute message, default ancillaryInformation is ''
40
+ * Log execute message, default ancillaryInformation is empty string
41
+ * @param {String|Object} data the data will be display
42
+ * @param {String} ancillaryInformation when ancillary Information not empty, it will be display
27
43
  */
28
- export function logExecute(data: any, ancillaryInformation?: string): void;
44
+ export function logExecute(data: string | Object, ancillaryInformation?: string): void;
29
45
  /**
30
- * Log error message, default ancillaryInformation is ''
46
+ * Log error message, default ancillaryInformation is empty string
47
+ * @param {String|Object} data the data will be display
48
+ * @param {String} ancillaryInformation when ancillary Information not empty, it will be display
31
49
  */
32
- export function logError(data: any, ancillaryInformation?: string): void;
50
+ export function logError(data: string | Object, ancillaryInformation?: string): void;
33
51
  /**
34
- * Log text message, default level is logLevel.trace, default ancillaryInformation is ''
52
+ * Log text message, default level is logLevel.trace, default ancillaryInformation is empty string
53
+ * @param {String} text the text will be display
54
+ * @param {String} level log level, use logLevel enum
55
+ * @param {String} ancillaryInformation when ancillary Information not empty, it will be display
35
56
  */
36
- export function logText(text: any, level?: string, ancillaryInformation?: string): void;
57
+ export function logText(text: string, level?: string, ancillaryInformation?: string): void;
37
58
  /**
38
- * Log object message, default level is logLevel.trace, default ancillaryInformation is ''
59
+ * Log object message, default level is logLevel.trace, default ancillaryInformation is empty string
60
+ * @param {String} data the data will be display
61
+ * @param {String} level log level, use logLevel enum
62
+ * @param {String} ancillaryInformation when ancillary Information not empty, it will be display
39
63
  */
40
- export function logObject(data: any, level?: string, ancillaryInformation?: string): void;
64
+ export function logObject(data: string, level?: string, ancillaryInformation?: string): void;
41
65
  /**
42
66
  * Get logger display switch
43
67
  */
44
68
  export function getLoggerDisplaySwitch(): boolean;
45
69
  /**
46
70
  * Set logger display switch
71
+ * @param {Boolean} value display switch
47
72
  */
48
- export function setLoggerDisplaySwitch(value: any): void;
73
+ export function setLoggerDisplaySwitch(value: boolean): void;
49
74
  export namespace loggerSwitch {
50
75
  const loggerDisplaySwitchPromptSetInformationComplete: boolean;
51
76
  const loggerDisplaySwitchSetComplete: boolean;
@@ -1,3 +1,8 @@
1
+ /**
2
+ * Calculate the value of the expression
3
+ * @param {Function} fn
4
+ */
5
+ export function evil(fn: Function): any;
1
6
  /**
2
7
  * Build prompt module info
3
8
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "easy-soft-utility",
3
- "version": "2.2.2",
3
+ "version": "2.2.4",
4
4
  "private": false,
5
5
  "description": "easy-soft-utility",
6
6
  "keywords": [
@@ -16,7 +16,7 @@
16
16
  },
17
17
  "license": "MIT",
18
18
  "author": "卢志涛 <kityandhero@126.com>",
19
- "main": "src/index.ts",
19
+ "main": "es/index.js",
20
20
  "directories": {
21
21
  "es": "es"
22
22
  },
@@ -24,10 +24,12 @@
24
24
  "es"
25
25
  ],
26
26
  "scripts": {
27
- "build": "rimraf ./es && rollup --config rollup.config.compression.js --bundleConfigAsCjs && tsc -v && tsc -p ./tsconfig.types.json",
28
- "build:skipCompression": "rimraf ./es && rollup --config rollup.config.skipCompression.js --bundleConfigAsCjs && tsc -v && tsc -p ./tsconfig.types.json",
27
+ "build": "rimraf ./es && rollup --config rollup.config.compression.js --bundleConfigAsCjs",
28
+ "postbuild": "npm run tsc:build",
29
+ "build:skipCompression": "rimraf ./es && rollup --config rollup.config.skipCompression.js --bundleConfigAsCjs",
30
+ "postbuild:skipCompression": "npm run tsc:build",
29
31
  "clean-file": "rimraf ./node_modules",
30
- "dev": "rollup --config rollup.config.skipCompression.js --bundleConfigAsCjs --watch",
32
+ "dev": "rollup --config rollup.config.skipCompression.js --bundleConfigAsCjs --watch --watch.onBundleEnd=\"npm run tsc:build\"",
31
33
  "lint": "npm run lint:js && npm run lint:style && npm run lint:prettier",
32
34
  "lint-staged": "lint-staged",
33
35
  "lint-staged:js": "npx eslint --ext .js,.jsx,.ts,.tsx ",
@@ -38,10 +40,12 @@
38
40
  "precommit": "lint-staged",
39
41
  "prettier": "npx prettier -c --write \"**/*\"",
40
42
  "publish:compression": "npm run build && yarn publish",
43
+ "tsc:build": "echo show tsc version and create declaration file && tsc -v && tsc -p ./tsconfig.types.json && echo declaration file generate complete",
41
44
  "v:p": "npm version patch && yarn publish"
42
45
  },
43
46
  "dependencies": {
44
47
  "dayjs": "^1.11.7",
48
+ "js-base64": "^3.7.4",
45
49
  "lodash": "^4.17.21",
46
50
  "node-cache": "^5.1.2",
47
51
  "object-hash": "^3.0.0",
@@ -83,9 +87,10 @@
83
87
  "babel-preset-taro": "^3.5.11",
84
88
  "classnames": "^2.3.2",
85
89
  "commitizen": "^4.2.6",
90
+ "conventional-changelog-conventionalcommits": "^5.0.0",
86
91
  "cross-env": "^7.0.3",
87
92
  "cssnano": "^5.1.14",
88
- "eslint": "^8.31.0",
93
+ "eslint": "^8.32.0",
89
94
  "eslint-config-prettier": "^8.6.0",
90
95
  "eslint-config-taro": "^3.5.11",
91
96
  "eslint-formatter-pretty": "^4.1.0",
@@ -118,5 +123,5 @@
118
123
  "stylelint-declaration-block-no-ignored-properties": "^2.6.0",
119
124
  "webpack": "^5.75.0"
120
125
  },
121
- "gitHead": "0def6be2a8ee7c1a35b877203265948b5998fdeb"
126
+ "gitHead": "f815b1efb5627cb57c224538470c8246043d08e1"
122
127
  }