@lntvow/utils 4.0.9 → 4.0.11
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var ot=Object.create;var A=Object.defineProperty;var it=Object.getOwnPropertyDescriptor;var st=Object.getOwnPropertyNames;var at=Object.getPrototypeOf,mt=Object.prototype.hasOwnProperty;var ct=(t,e)=>{for(var r in e)A(t,r,{get:e[r],enumerable:!0})},G=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of st(e))!mt.call(t,o)&&o!==r&&A(t,o,{get:()=>e[o],enumerable:!(n=it(e,o))||n.enumerable});return t};var S=(t,e,r)=>(r=t!=null?ot(at(t)):{},G(e||!t||!t.__esModule?A(r,"default",{value:t,enumerable:!0}):r,t)),pt=t=>G(A({},"__esModule",{value:!0}),t);var Ae={};ct(Ae,{base64Decode:()=>ht,base64Encode:()=>yt,castArray:()=>y,compose:()=>Ot,composeRight:()=>wt,debounce:()=>$t,debugWarn:()=>K,debugWarnInvalidTypeMessage:()=>Tt,decimalToBinary:()=>bt,deepClone:()=>O,deepMerge:()=>_,deprecated:()=>L,error:()=>Mt,generateRandomArray:()=>_t,generateRandomColor:()=>Kt,generateRandomDate:()=>E,generateRandomEmail:()=>tt,generateRandomFloat:()=>Bt,generateRandomIdCard:()=>Vt,generateRandomMobilePhone:()=>Xt,generateRandomStringFromSource:()=>k,getRandomInt:()=>a,getRandomItem:()=>p,getRandomString:()=>g,getRandomUrl:()=>Qt,hasChanged:()=>xt,isArray:()=>u,isBoolean:()=>ut,isChineseString:()=>ae,isDate:()=>v,isDateString:()=>rt,isDef:()=>dt,isEmail:()=>Oe,isEmptyString:()=>we,isEnglishAphabet:()=>te,isFloat:()=>me,isFunction:()=>$,isIdCard:()=>$e,isInteger:()=>ge,isLowerCase:()=>oe,isLowerCaseAndNumber:()=>ie,isLowerCaseAndNumberAndChinese:()=>se,isMap:()=>C,isMobilePhone:()=>ye,isNegativeFloat:()=>fe,isNegativeInteger:()=>xe,isNonNegativeFloat:()=>pe,isNonNegativeInteger:()=>de,isNonPositiveFloat:()=>ue,isNonPositiveInteger:()=>be,isNull:()=>gt,isNumber:()=>f,isNumberOrNumberString:()=>Jt,isObject:()=>ft,isObjectLike:()=>w,isPlainObject:()=>x,isPositiveFloat:()=>ce,isPositiveInteger:()=>le,isPromise:()=>U,isRegExp:()=>Y,isSet:()=>F,isString:()=>I,isSymbol:()=>N,isUndef:()=>h,isUndefined:()=>lt,isUpperCase:()=>ee,isUpperCaseAndNumber:()=>re,isUpperCaseAndNumberAndChinese:()=>ne,isUrl:()=>he,log:()=>T,objectToString:()=>q,omit:()=>Ut,pick:()=>z,qs:()=>Dt,throttle:()=>Pt,throwError:()=>s,throwErrorInvalidTypeMessage:()=>Rt,toTypeString:()=>b,toTypeValue:()=>j,validatorChineseOrEnglish:()=>Nt,validatorChineseOrEnglishOrNumber:()=>It,validatorEmail:()=>vt,validatorUppercaseOrNumbersOrSpecial:()=>Ct,validatorUppercaseOrNumbersOrUnderline:()=>Ft,warn:()=>jt});module.exports=pt(Ae);function ft(t){let e=typeof t;return t!==null&&(e==="object"||e==="function")}function w(t){return t!==null&&typeof t=="object"}var q=Object.prototype.toString,b=t=>q.call(t),j=t=>b(t).slice(8,-1),I=t=>typeof t=="string",f=t=>typeof t=="number"&&Number.isFinite(t),ut=t=>typeof t=="boolean",gt=t=>t===null,lt=t=>t===void 0,N=t=>typeof t=="symbol",u=Array.isArray,$=t=>typeof t=="function",C=t=>b(t)==="[object Map]",F=t=>b(t)==="[object Set]",v=t=>b(t)==="[object Date]",Y=t=>b(t)==="[object RegExp]",U=t=>w(t)&&$(t?.then)&&$(t?.catch),h=t=>t==null,dt=t=>t!=null,xt=(t,e)=>t!==e;function x(t){return b(t)==="[object Object]"}function y(t){return u(t)?t:[t]}function bt(t){let e=[],r,n="";for(;t>0;)r=Math.floor(t%2),e.push(r),t=Math.floor(t/2);for(;e.length>0;)n+=e.pop().toString();return n}var B="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function yt(t){let e="",r="";for(let o=0;o<t.length;o++)r+=t[o].charCodeAt(0).toString(2).padStart(8,"0");for(let o=0;o<r.length;o+=6)e+=B[parseInt(r.slice(o,o+6).padEnd(6,"0"),2)];let n=e.length%4;return n!==0&&(e+="=".repeat(4-n)),e}function ht(t){let e="",r="";for(let n=0;n<t.length&&t[n]!=="=";n++)r+=B.indexOf(t[n]).toString(2).padStart(6,"0");for(let n=0;n<r.length;n+=8){let o=parseInt(r.slice(n,n+8),2);o&&(e+=String.fromCharCode(o))}return e}function Ot(...t){return t.reduce((e,r)=>function(...n){return r(e(...n))})}function wt(...t){return t.reduce((e,r)=>function(...n){return e(r(...n))})}function $t(t,e=500){let r=null;return function(...n){r&&clearTimeout(r),r=setTimeout(()=>{t.apply(this,n)},e)}}function O(t){let e=new WeakMap;function r(n){if(!w(n))return n;if(v(n))return new Date(n);if(Y(n))return new RegExp(n);if(U(n))return n;if(e.has(n))return e.get(n);if(C(n)){let i=new Map;return e.set(n,i),n.forEach((c,l)=>i.set(r(l),r(c))),i}if(F(n)){let i=new Set;return e.set(n,i),n.forEach(c=>i.add(r(c))),i}let o=u(n)?Object.setPrototypeOf([],Object.getPrototypeOf(n)):Object.create(Object.getPrototypeOf(n));e.set(n,o);let m=Object.getOwnPropertyDescriptors(n);for(let i of Reflect.ownKeys(m)){let c=m[i];c.get||c.set?Object.defineProperty(o,i,c):Object.defineProperty(o,i,{...c,value:r(c.value)})}return o}return r(t)}function _(t,e,r={}){return X(V(t,r),V(e,r),r)}function X(t,e,r){return u(t)?St(t,e,r):At(t,e,r)}function At(t,e,r){if(!x(e))return e;let n=Object.getOwnPropertyDescriptors(e);return Reflect.ownKeys(e).forEach(o=>{(x(t[o])||u(t[o]))&&(x(e[o])||u(e[o]))?t[o]=X(t[o],e[o],r):Object.defineProperty(t,o,n[o])}),t}function St(t,e,r){let{mergeStrategy:n="replace"}=r;if(u(e))switch(n){case"merge":return t.concat(e);case"replace":return e;default:return e}return e}function V(t,e){let{deepClone:r=!0}=e;return r?O(t):t}var M=class extends Error{constructor(e,r="Utils"){super(e),this.name=r}};function s(t,e){throw new M(`[${t}] ${e}`)}function K(t,e){let r=I(t)?new M(`[${t}] ${e}`,"UtilsWarn"):t;console.warn(r)}function jt(...t){console.warn(...t)}function Mt(...t){console.error(...t)}var L=({from:t,replacement:e,version:r,type:n="API"})=>{K(`${n}`,`${t} is about to be deprecated in version ${r}, please use ${e} instead.`)};function Rt(t,e,r,n){let o=`Invalid params: type check failed for params "${e}". Expected ${r}, got ${j(n)} with value ${n}.`;s(t,o)}function Tt(t,e,r,n){let o=`Invalid params: type check failed for params "${e}". Expected ${r}, got ${j(n)} with value ${n}.`;K(t,o)}var R=(t,e,...r)=>{if(!e)return;let n=r.length===0?"":r.length===1?r[0]:r;console[t](`[Log] ${e}:`,n)},T=(t,...e)=>{R("info",t,...e)};T.info=(t,...e)=>{R("info",t,...e)};T.error=(t,...e)=>{R("error",t,...e)};T.warn=(t,...e)=>{R("warn",t,...e)};function Et(t,e){let{decode:r=!0}=e||{},n={};t.startsWith("?")&&(t=t.slice(1)),t.includes("?")&&(t=t.slice(t.indexOf("?")+1));let o=t.split("&").filter(Boolean);for(let m of o){let[i,c]=m.split("=");n[i]=r?decodeURIComponent(c):c}return n}function Q(t,e){let{encode:r=!0}=e||{},n=[];for(let o in t){let m=t[o];n.push(`${o}=${r?encodeURIComponent(m):m}`)}return n.join("&")}function kt(t,e,r){let n=_({encode:!0},{...r}),o=Q(e,n);return t.includes("?")?t.endsWith("?")||t.endsWith("&")?`${t}${o}`:`${t}&${o}`:`${t}?${o}`}var Dt={parse:Et,stringify:Q,appendQueryString:kt};function Pt(t,e=500){let r=null;return function(...n){if(h(r))return r=Date.now(),t.apply(this,n);let o=Date.now();if(o-r>=e)return r=o,t.apply(this,n)}}function It(t){return!h(t)&&/^[\dA-Z\u4E00-\u9FA5]+$/i.test(t)}function Nt(t){return!h(t)&&/^[A-Z\u4E00-\u9FA5]+$/i.test(t)}function Ct(t){return!h(t)&&/^[\d!"#$%&'()*+,./:;<=>?@A-Z[\\\]^_`{|}~]+$/.test(t)}function Ft(t){return/^[\dA-Z_]+$/.test(t)}function vt(t){return L({from:"validatorEmail",replacement:"isEmail",version:"2.4.0"}),/^([\w-])+@([\w-])+(\.[\w-])+/.test(t)}function z(t,e,r={}){let{includeProto:n=!1,includeSymbols:o=!0,includeNonEnum:m=!1}=r,i={};return x(t)&&y(e).forEach(l=>{N(l)&&!o||!(n?l in t:Object.hasOwn(t,l))||!m&&(n?Yt(t,l):Object.getOwnPropertyDescriptor(t,l))?.enumerable===!1||(i[l]=O(t[l]))}),i}function Yt(t,e){let r=t;for(;r!==null;){let n=Object.getOwnPropertyDescriptor(r,e);if(n)return n;r=Object.getPrototypeOf(r)}}function Ut(t,e){if(!x(t))return{};let r=O(t),n=y(e),o=Object.keys(r).filter(m=>!n.includes(m));return z(r,o)}function _t(t,e){return(!f(t)||t<=0)&&s("generateRandomArray","num \u5FC5\u987B\u5927\u4E8E0"),$(e)||s("generateRandomArray","cb \u5FC5\u987B\u662F\u51FD\u6570"),Array.from({length:t}).fill(0).map((r,n)=>e(r,n))}function Kt(){return`#${Math.random().toString(16).slice(2,8).padEnd(6,"0")}`}var d=S(require("dayjs"),1),J=S(require("dayjs/plugin/customParseFormat"),1);function p(t){return t[Math.floor(Math.random()*t.length)]}function a(t={}){f(t)&&(t={max:t});let{min:e=1,max:r=p(zt())}=t;Lt(e,r);let n=Math.ceil(e),o=Math.floor(r);return Math.floor(Math.random()*(o-n+1)+n)}function Lt(t,e){let r=Math.ceil(t),n=Math.floor(e);Number.isSafeInteger(r)||s("getRandomInt",`The minimum value Math.ceil(${t}) should be a safe integer`),Number.isSafeInteger(n)||s("getRandomInt",`The maximum value Math.floor(${e}) should be a safe integer`),n<r&&(e>=t&&s("getRandomInt",`No integer value found between ${t} and ${e}`),s("getRandomInt",`The maximum value ${e} should be greater than the minimum value ${t}`))}function zt(){return Array.from({length:Number.MAX_SAFE_INTEGER.toString().length}).map((t,e)=>{let r=Number.MAX_SAFE_INTEGER.toString().slice(0,e+1);return Number(r)})}(0,d.extend)(J.default);function E(t={}){let{start:e="1800-01-01 00:00:00",end:r=(0,d.default)().format("YYYY-MM-DD HH:mm:ss"),format:n="YYYY-MM-DD HH:mm:ss"}=t;(!(0,d.default)(e).isValid()||!(0,d.default)(r).isValid())&&s("generateRandomDate","start end \u53C2\u6570\u5FC5\u987B\u662F\u5408\u6CD5\u7684\u65F6\u95F4\u683C\u5F0F");let o=(0,d.default)(e).year(),m=(0,d.default)(r).year(),i=a({min:o,max:m}),c=a({min:1,max:12}),l=a({min:1,max:31}),H=a(23),Z=a(59),nt=a(59),P=(0,d.default)(`${i}-${c}-${l} ${H}:${Z}:${nt}`);return P.isBefore((0,d.default)(e))||P.isAfter((0,d.default)(r))?E(t):P.format(n)}function g(t={}){let e=Ht(t),r=Zt(e);Gt(r);let{length:n}=e;qt(n.min,n.max);let o=a(n),m=e.prefix||"";for(let i=0;i<o;i++)m+=r.charAt(Math.floor(Math.random()*r.length));return m+(e.suffix||"")}var Wt=16,W=1;function Ht(t){let e=f(t);return{lowerCase:!0,upperCase:!0,number:!0,...e?{}:t,length:e?{max:t,min:t}:f(t.length)?{max:t.length,min:t.length}:{max:Wt,min:W,...t.length},extra:e?[]:[...new Set(y(t.extra||[]))]}}function Zt(t){let e="";return t.lowerCase&&(e+="abcdefghijklmnopqrstuvwxyz"),t.upperCase&&(e+="ABCDEFGHIJKLMNOPQRSTUVWXYZ"),t.number&&(e+="0123456789"),e+=y(t.extra).join(""),e}function Gt(t){t.length===0&&s("getRandomString","At least one character set (lowercase, uppercase, number) must be enabled or extra characters provided")}function qt(t,e){Number.isInteger(t)||s("getRandomString","min must be an integer"),Number.isInteger(e)||s("getRandomString","max must be an integer"),t<W&&s("getRandomString",`Minimum length cannot be less than ${W}`),e<t&&s("getRandomString","Maximum length cannot be less than minimum length")}function tt(){let t=["gmail.com","outlook.com.cn","example.com","qq.com","163.com","test.com.cn"],e=`${g(1)}${g({length:a({max:30,min:1})})}${g(1)}@${p(t)}`;return/\.{2,}/.test(e)?tt():e}function Bt(t={}){f(t)&&(t={max:t});let{min:e=0,max:r=1,fractionDigits:n=2}=t;if(e===r)return e;if(e>r)throw new Error(`\u6700\u5927\u503C ${r} \u5E94\u5927\u4E8E\u6700\u5C0F\u503C ${e}`);return Math.random()*(r-e)+e}function k(t,e){(!f(t)||t<=0)&&s("generateRandomStringFromSource","num \u5FC5\u987B\u5927\u4E8E0"),(!u(e)||e.length===0)&&s("generateRandomStringFromSource","source \u4E0D\u80FD\u4E3A\u7A7A\u6570\u7EC4");let r="";for(let n=0;n<t;n++)r+=p(e);return r}function Vt(){let t=a({min:1e5,max:999999}),e=[0,1,2,3,4,5,6,7,8,9];return[t,E({format:"YYYYMMDD"}),k(3,e),k(1,[...e,"X","x"])].join("")}function Xt(){return p(["13","14","15","16","17","18","19"])+a(999999999).toString().padEnd(9,"0")}function Qt(){let t=["http://","https://"],e=[".com",".net",".org",".cn",".top"],r=[`?name=${g({length:{min:4,max:8}})}`,`?id=${a()}`,`?page=${g({length:{min:2,max:4}})}`,`?query=${g({length:{min:5,max:6}})}`,`?search=${g({length:{min:1,max:4}})}`,`?token=${g({length:{min:16,max:16}})}`];return`${p(t)}${g({length:{min:5,max:25}})}${p(e)}${p(r)}`}function Jt(t){return/^\d+$/.test(t)}function te(t){return/^[A-Z]+$/i.test(t)}function ee(t){return/^[A-Z]+$/.test(t)}function re(t){return/^[\dA-Z]+$/.test(t)}function ne(t){return/^[\dA-Z\u4E00-\u9FA5]+$/.test(t)}function oe(t){return/^[a-z]+$/.test(t)}function ie(t){return/^[\da-z]+$/.test(t)}function se(t){return/^[\da-z\u4E00-\u9FA5]+$/.test(t)}function ae(t){return/^[\u4E00-\u9FA5]+$/.test(t)}function me(t){return/^-?(?:0|[1-9]\d*)\.\d+$/.test(t)}function ce(t){return/^(?:0\.0*[1-9]\d*|[1-9]\d*\.\d+)$/.test(t)}function pe(t){return/^(?:0|[1-9]\d*)\.\d+$/.test(t)}function fe(t){return/^-(?:0\.0*[1-9]\d*|[1-9]\d*\.\d+)$/.test(t)}function ue(t){return/^-(?:0|[1-9]\d*)\.\d+$/.test(t)}function ge(t){return/^-?(?:0|[1-9]\d*)$/.test(t)}function le(t){return/^[1-9]\d*$/.test(t)}function de(t){return/^(?:0|[1-9]\d*)$/.test(t)&&!Object.is(t,-0)}function xe(t){return/^-[1-9]\d*$/.test(t)}function be(t){return/^-(?:0|[1-9]\d*)$/.test(t)||Object.is(t,-0)}var D=S(require("dayjs"),1),et=S(require("dayjs/plugin/customParseFormat"),1);function ye(t){return/^1[3-9]\d{9}$/.test(t)}function he(t){return/^https?:\/\/\S+$/i.test(t)}function Oe(t){return/^[^\s@]+@[^\s@][^\s.@]*\.[^\s@]+$/.test(t)}function we(t){return t===""}function rt(t,e="YYYY-MM-DD HH:mm:ss"){return(0,D.extend)(et.default),(0,D.default)(t,e,!0).isValid()}function $e(t){return/^[1-9]\d{5}(?:18|19|20)\d{2}(?:0[1-9]|1[0-2])(?:0[1-9]|[12]\d|3[01])\d{3}[\dX]$/i.test(t)&&rt(t.slice(6,14),"YYYYMMDD")}0&&(module.exports={base64Decode,base64Encode,castArray,compose,composeRight,debounce,debugWarn,debugWarnInvalidTypeMessage,decimalToBinary,deepClone,deepMerge,deprecated,error,generateRandomArray,generateRandomColor,generateRandomDate,generateRandomEmail,generateRandomFloat,generateRandomIdCard,generateRandomMobilePhone,generateRandomStringFromSource,getRandomInt,getRandomItem,getRandomString,getRandomUrl,hasChanged,isArray,isBoolean,isChineseString,isDate,isDateString,isDef,isEmail,isEmptyString,isEnglishAphabet,isFloat,isFunction,isIdCard,isInteger,isLowerCase,isLowerCaseAndNumber,isLowerCaseAndNumberAndChinese,isMap,isMobilePhone,isNegativeFloat,isNegativeInteger,isNonNegativeFloat,isNonNegativeInteger,isNonPositiveFloat,isNonPositiveInteger,isNull,isNumber,isNumberOrNumberString,isObject,isObjectLike,isPlainObject,isPositiveFloat,isPositiveInteger,isPromise,isRegExp,isSet,isString,isSymbol,isUndef,isUndefined,isUpperCase,isUpperCaseAndNumber,isUpperCaseAndNumberAndChinese,isUrl,log,objectToString,omit,pick,qs,throttle,throwError,throwErrorInvalidTypeMessage,toTypeString,toTypeValue,validatorChineseOrEnglish,validatorChineseOrEnglishOrNumber,validatorEmail,validatorUppercaseOrNumbersOrSpecial,validatorUppercaseOrNumbersOrUnderline,warn});
|
|
1
|
+
"use strict";var rt=Object.create;var A=Object.defineProperty;var ot=Object.getOwnPropertyDescriptor;var it=Object.getOwnPropertyNames;var st=Object.getPrototypeOf,at=Object.prototype.hasOwnProperty;var mt=(t,e)=>{for(var n in e)A(t,n,{get:e[n],enumerable:!0})},Z=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of it(e))!at.call(t,o)&&o!==n&&A(t,o,{get:()=>e[o],enumerable:!(r=ot(e,o))||r.enumerable});return t};var S=(t,e,n)=>(n=t!=null?rt(st(t)):{},Z(e||!t||!t.__esModule?A(n,"default",{value:t,enumerable:!0}):n,t)),ct=t=>Z(A({},"__esModule",{value:!0}),t);var $e={};mt($e,{base64Decode:()=>yt,base64Encode:()=>bt,castArray:()=>y,compose:()=>ht,composeRight:()=>Ot,debounce:()=>wt,debugWarn:()=>K,debugWarnInvalidTypeMessage:()=>Tt,decimalToBinary:()=>xt,deepClone:()=>O,deepMerge:()=>_,deprecated:()=>Mt,error:()=>jt,generateRandomArray:()=>Ut,generateRandomColor:()=>_t,generateRandomDate:()=>k,generateRandomEmail:()=>J,generateRandomFloat:()=>qt,generateRandomIdCard:()=>Bt,generateRandomMobilePhone:()=>Vt,generateRandomStringFromSource:()=>E,getRandomInt:()=>a,getRandomItem:()=>p,getRandomString:()=>g,getRandomUrl:()=>Xt,hasChanged:()=>lt,isArray:()=>u,isBoolean:()=>ft,isChineseString:()=>se,isDate:()=>Y,isDateString:()=>et,isDef:()=>dt,isEmail:()=>he,isEmptyString:()=>Oe,isEnglishAphabet:()=>Jt,isFloat:()=>ae,isFunction:()=>$,isIdCard:()=>we,isInteger:()=>ue,isLowerCase:()=>re,isLowerCaseAndNumber:()=>oe,isLowerCaseAndNumberAndChinese:()=>ie,isMap:()=>C,isMobilePhone:()=>be,isNegativeFloat:()=>pe,isNegativeInteger:()=>le,isNonNegativeFloat:()=>ce,isNonNegativeInteger:()=>de,isNonPositiveFloat:()=>fe,isNonPositiveInteger:()=>xe,isNull:()=>ut,isNumber:()=>f,isNumberOrNumberString:()=>Qt,isObject:()=>pt,isObjectLike:()=>w,isPlainObject:()=>x,isPositiveFloat:()=>me,isPositiveInteger:()=>ge,isPromise:()=>U,isRegExp:()=>v,isSet:()=>F,isString:()=>I,isSymbol:()=>N,isUndef:()=>h,isUndefined:()=>gt,isUpperCase:()=>te,isUpperCaseAndNumber:()=>ee,isUpperCaseAndNumberAndChinese:()=>ne,isUrl:()=>ye,log:()=>T,objectToString:()=>G,omit:()=>vt,pick:()=>L,qs:()=>Dt,throttle:()=>Pt,throwError:()=>s,throwErrorInvalidTypeMessage:()=>Rt,toTypeString:()=>b,toTypeValue:()=>j,validatorChineseOrEnglish:()=>Nt,validatorChineseOrEnglishOrNumber:()=>It,validatorUppercaseOrNumbersOrSpecial:()=>Ct,validatorUppercaseOrNumbersOrUnderline:()=>Ft,warn:()=>St});module.exports=ct($e);function pt(t){let e=typeof t;return t!==null&&(e==="object"||e==="function")}function w(t){return t!==null&&typeof t=="object"}var G=Object.prototype.toString,b=t=>G.call(t),j=t=>b(t).slice(8,-1),I=t=>typeof t=="string",f=t=>typeof t=="number"&&Number.isFinite(t),ft=t=>typeof t=="boolean",ut=t=>t===null,gt=t=>t===void 0,N=t=>typeof t=="symbol",u=Array.isArray,$=t=>typeof t=="function",C=t=>b(t)==="[object Map]",F=t=>b(t)==="[object Set]",Y=t=>b(t)==="[object Date]",v=t=>b(t)==="[object RegExp]",U=t=>w(t)&&$(t?.then)&&$(t?.catch),h=t=>t==null,dt=t=>t!=null,lt=(t,e)=>t!==e;function x(t){return b(t)==="[object Object]"}function y(t){return u(t)?t:[t]}function xt(t){let e=[],n,r="";for(;t>0;)n=Math.floor(t%2),e.push(n),t=Math.floor(t/2);for(;e.length>0;)r+=e.pop().toString();return r}var q="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function bt(t){let e="",n="";for(let o=0;o<t.length;o++)n+=t[o].charCodeAt(0).toString(2).padStart(8,"0");for(let o=0;o<n.length;o+=6)e+=q[parseInt(n.slice(o,o+6).padEnd(6,"0"),2)];let r=e.length%4;return r!==0&&(e+="=".repeat(4-r)),e}function yt(t){let e="",n="";for(let r=0;r<t.length&&t[r]!=="=";r++)n+=q.indexOf(t[r]).toString(2).padStart(6,"0");for(let r=0;r<n.length;r+=8){let o=parseInt(n.slice(r,r+8),2);o&&(e+=String.fromCharCode(o))}return e}function ht(...t){return t.reduce((e,n)=>function(...r){return n(e(...r))})}function Ot(...t){return t.reduce((e,n)=>function(...r){return e(n(...r))})}function wt(t,e=500){let n=null;return function(...r){n&&clearTimeout(n),n=setTimeout(()=>{t.apply(this,r)},e)}}function O(t){let e=new WeakMap;function n(r){if(!w(r))return r;if(Y(r))return new Date(r);if(v(r))return new RegExp(r);if(U(r))return r;if(e.has(r))return e.get(r);if(C(r)){let i=new Map;return e.set(r,i),r.forEach((c,d)=>i.set(n(d),n(c))),i}if(F(r)){let i=new Set;return e.set(r,i),r.forEach(c=>i.add(n(c))),i}let o=u(r)?Object.setPrototypeOf([],Object.getPrototypeOf(r)):Object.create(Object.getPrototypeOf(r));e.set(r,o);let m=Object.getOwnPropertyDescriptors(r);for(let i of Reflect.ownKeys(m)){let c=m[i];c.get||c.set?Object.defineProperty(o,i,c):Object.defineProperty(o,i,{...c,value:n(c.value)})}return o}return n(t)}function _(t,e,n={}){return V(B(t,n),B(e,n),n)}function V(t,e,n){return u(t)?At(t,e,n):$t(t,e,n)}function $t(t,e,n){if(!x(e))return e;let r=Object.getOwnPropertyDescriptors(e);return Reflect.ownKeys(e).forEach(o=>{(x(t[o])||u(t[o]))&&(x(e[o])||u(e[o]))?t[o]=V(t[o],e[o],n):Object.defineProperty(t,o,r[o])}),t}function At(t,e,n){let{mergeStrategy:r="replace"}=n;if(u(e))switch(r){case"merge":return t.concat(e);case"replace":return e;default:return e}return e}function B(t,e){let{deepClone:n=!0}=e;return n?O(t):t}var M=class extends Error{constructor(e,n="Utils"){super(e),this.name=n}};function s(t,e){throw new M(`[${t}] ${e}`)}function K(t,e){let n=I(t)?new M(`[${t}] ${e}`,"UtilsWarn"):t;console.warn(n)}function St(...t){console.warn(...t)}function jt(...t){console.error(...t)}var Mt=({from:t,replacement:e,version:n,type:r="API"})=>{K(`${r}`,`${t} is about to be deprecated in version ${n}, please use ${e} instead.`)};function Rt(t,e,n,r){let o=`Invalid params: type check failed for params "${e}". Expected ${n}, got ${j(r)} with value ${r}.`;s(t,o)}function Tt(t,e,n,r){let o=`Invalid params: type check failed for params "${e}". Expected ${n}, got ${j(r)} with value ${r}.`;K(t,o)}var R=(t,e,...n)=>{if(!e)return;let r=n.length===0?"":n.length===1?n[0]:n;console[t](`[Log] ${e}:`,r)},T=(t,...e)=>{R("info",t,...e)};T.info=(t,...e)=>{R("info",t,...e)};T.error=(t,...e)=>{R("error",t,...e)};T.warn=(t,...e)=>{R("warn",t,...e)};function kt(t,e){let{decode:n=!0}=e||{},r={};t.startsWith("?")&&(t=t.slice(1)),t.includes("?")&&(t=t.slice(t.indexOf("?")+1));let o=t.split("&").filter(Boolean);for(let m of o){let[i,c]=m.split("=");r[i]=n?decodeURIComponent(c):c}return r}function X(t,e){let{encode:n=!0}=e||{},r=[];for(let o in t){let m=t[o];r.push(`${o}=${n?encodeURIComponent(m):m}`)}return r.join("&")}function Et(t,e,n){let r=_({encode:!0},{...n}),o=X(e,r);return t.includes("?")?t.endsWith("?")||t.endsWith("&")?`${t}${o}`:`${t}&${o}`:`${t}?${o}`}var Dt={parse:kt,stringify:X,appendQueryString:Et};function Pt(t,e=500){let n=null;return function(...r){if(h(n))return n=Date.now(),t.apply(this,r);let o=Date.now();if(o-n>=e)return n=o,t.apply(this,r)}}function It(t){return!h(t)&&/^[\dA-Z\u4E00-\u9FA5]+$/i.test(t)}function Nt(t){return!h(t)&&/^[A-Z\u4E00-\u9FA5]+$/i.test(t)}function Ct(t){return!h(t)&&/^[\d!"#$%&'()*+,./:;<=>?@A-Z[\\\]^_`{|}~]+$/.test(t)}function Ft(t){return/^[\dA-Z_]+$/.test(t)}function L(t,e,n={}){let{includeProto:r=!1,includeSymbols:o=!0,includeNonEnum:m=!1}=n,i={};return x(t)&&y(e).forEach(d=>{N(d)&&!o||!(r?d in t:Object.hasOwn(t,d))||!m&&(r?Yt(t,d):Object.getOwnPropertyDescriptor(t,d))?.enumerable===!1||(i[d]=O(t[d]))}),i}function Yt(t,e){let n=t;for(;n!==null;){let r=Object.getOwnPropertyDescriptor(n,e);if(r)return r;n=Object.getPrototypeOf(n)}}function vt(t,e){if(!x(t))return{};let n=O(t),r=y(e),o=Object.keys(n).filter(m=>!r.includes(m));return L(n,o)}function Ut(t,e){return(!f(t)||t<=0)&&s("generateRandomArray","num \u5FC5\u987B\u5927\u4E8E0"),$(e)||s("generateRandomArray","cb \u5FC5\u987B\u662F\u51FD\u6570"),Array.from({length:t}).fill(0).map((n,r)=>e(n,r))}function _t(){return`#${Math.random().toString(16).slice(2,8).padEnd(6,"0")}`}var l=S(require("dayjs"),1),Q=S(require("dayjs/plugin/customParseFormat"),1);function p(t){return t[Math.floor(Math.random()*t.length)]}function a(t={}){f(t)&&(t={max:t});let{min:e=1,max:n=p(Lt())}=t;Kt(e,n);let r=Math.ceil(e),o=Math.floor(n);return Math.floor(Math.random()*(o-r+1)+r)}function Kt(t,e){let n=Math.ceil(t),r=Math.floor(e);Number.isSafeInteger(n)||s("getRandomInt",`The minimum value Math.ceil(${t}) should be a safe integer`),Number.isSafeInteger(r)||s("getRandomInt",`The maximum value Math.floor(${e}) should be a safe integer`),r<n&&(e>=t&&s("getRandomInt",`No integer value found between ${t} and ${e}`),s("getRandomInt",`The maximum value ${e} should be greater than the minimum value ${t}`))}function Lt(){return Array.from({length:Number.MAX_SAFE_INTEGER.toString().length}).map((t,e)=>{let n=Number.MAX_SAFE_INTEGER.toString().slice(0,e+1);return Number(n)})}(0,l.extend)(Q.default);function k(t={}){let{start:e="1800-01-01 00:00:00",end:n=(0,l.default)().format("YYYY-MM-DD HH:mm:ss"),format:r="YYYY-MM-DD HH:mm:ss"}=t;(!(0,l.default)(e).isValid()||!(0,l.default)(n).isValid())&&s("generateRandomDate","start end \u53C2\u6570\u5FC5\u987B\u662F\u5408\u6CD5\u7684\u65F6\u95F4\u683C\u5F0F");let o=(0,l.default)(e).year(),m=(0,l.default)(n).year(),i=a({min:o,max:m}),c=a({min:1,max:12}),d=a({min:1,max:31}),W=a(23),H=a(59),nt=a(59),P=(0,l.default)(`${i}-${c}-${d} ${W}:${H}:${nt}`);return P.isBefore((0,l.default)(e))||P.isAfter((0,l.default)(n))?k(t):P.format(r)}function g(t={}){let e=Wt(t),n=Ht(e);Zt(n);let{length:r}=e;Gt(r.min,r.max);let o=a(r),m=e.prefix||"";for(let i=0;i<o;i++)m+=n.charAt(Math.floor(Math.random()*n.length));return m+(e.suffix||"")}var zt=16,z=1;function Wt(t){let e=f(t);return{lowerCase:!0,upperCase:!0,number:!0,...e?{}:t,length:e?{max:t,min:t}:f(t.length)?{max:t.length,min:t.length}:{max:zt,min:z,...t.length},extra:e?[]:[...new Set(y(t.extra||[]))]}}function Ht(t){let e="";return t.lowerCase&&(e+="abcdefghijklmnopqrstuvwxyz"),t.upperCase&&(e+="ABCDEFGHIJKLMNOPQRSTUVWXYZ"),t.number&&(e+="0123456789"),e+=y(t.extra).join(""),e}function Zt(t){t.length===0&&s("getRandomString","At least one character set (lowercase, uppercase, number) must be enabled or extra characters provided")}function Gt(t,e){Number.isInteger(t)||s("getRandomString","min must be an integer"),Number.isInteger(e)||s("getRandomString","max must be an integer"),t<z&&s("getRandomString",`Minimum length cannot be less than ${z}`),e<t&&s("getRandomString","Maximum length cannot be less than minimum length")}function J(){let t=["gmail.com","outlook.com.cn","example.com","qq.com","163.com","test.com.cn"],e=`${g(1)}${g({length:a({max:30,min:1})})}${g(1)}@${p(t)}`;return/\.{2,}/.test(e)?J():e}function qt(t={}){f(t)&&(t={max:t});let{min:e=0,max:n=1,fractionDigits:r=2}=t;if(e===n)return e;if(e>n)throw new Error(`\u6700\u5927\u503C ${n} \u5E94\u5927\u4E8E\u6700\u5C0F\u503C ${e}`);return Math.random()*(n-e)+e}function E(t,e){(!f(t)||t<=0)&&s("generateRandomStringFromSource","num \u5FC5\u987B\u5927\u4E8E0"),(!u(e)||e.length===0)&&s("generateRandomStringFromSource","source \u4E0D\u80FD\u4E3A\u7A7A\u6570\u7EC4");let n="";for(let r=0;r<t;r++)n+=p(e);return n}function Bt(){let t=a({min:1e5,max:999999}),e=[0,1,2,3,4,5,6,7,8,9];return[t,k({format:"YYYYMMDD"}),E(3,e),E(1,[...e,"X","x"])].join("")}function Vt(){return p(["13","14","15","16","17","18","19"])+a(999999999).toString().padEnd(9,"0")}function Xt(){let t=["http://","https://"],e=[".com",".net",".org",".cn",".top"],n=[`?name=${g({length:{min:4,max:8}})}`,`?id=${a()}`,`?page=${g({length:{min:2,max:4}})}`,`?query=${g({length:{min:5,max:6}})}`,`?search=${g({length:{min:1,max:4}})}`,`?token=${g({length:{min:16,max:16}})}`];return`${p(t)}${g({length:{min:5,max:25}})}${p(e)}${p(n)}`}function Qt(t){return/^\d+$/.test(t)}function Jt(t){return/^[A-Z]+$/i.test(t)}function te(t){return/^[A-Z]+$/.test(t)}function ee(t){return/^[\dA-Z]+$/.test(t)}function ne(t){return/^[\dA-Z\u4E00-\u9FA5]+$/.test(t)}function re(t){return/^[a-z]+$/.test(t)}function oe(t){return/^[\da-z]+$/.test(t)}function ie(t){return/^[\da-z\u4E00-\u9FA5]+$/.test(t)}function se(t){return/^[\u4E00-\u9FA5]+$/.test(t)}function ae(t){return/^-?(?:0|[1-9]\d*)\.\d+$/.test(t)}function me(t){return/^(?:0\.0*[1-9]\d*|[1-9]\d*\.\d+)$/.test(t)}function ce(t){return/^(?:0|[1-9]\d*)\.\d+$/.test(t)}function pe(t){return/^-(?:0\.0*[1-9]\d*|[1-9]\d*\.\d+)$/.test(t)}function fe(t){return/^-(?:0|[1-9]\d*)\.\d+$/.test(t)}function ue(t){return/^-?(?:0|[1-9]\d*)$/.test(t)}function ge(t){return/^[1-9]\d*$/.test(t)}function de(t){return/^(?:0|[1-9]\d*)$/.test(t)&&!Object.is(t,-0)}function le(t){return/^-[1-9]\d*$/.test(t)}function xe(t){return/^-(?:0|[1-9]\d*)$/.test(t)||Object.is(t,-0)}var D=S(require("dayjs"),1),tt=S(require("dayjs/plugin/customParseFormat"),1);function be(t){return/^1[3-9]\d{9}$/.test(t)}function ye(t){return/^https?:\/\/\S+$/i.test(t)}function he(t){return/^[^\s@]+@[^\s@][^\s.@]*\.[^\s@]+$/.test(t)}function Oe(t){return t===""}function et(t,e="YYYY-MM-DD HH:mm:ss"){return(0,D.extend)(tt.default),(0,D.default)(t,e,!0).isValid()}function we(t){return/^[1-9]\d{5}(?:18|19|20)\d{2}(?:0[1-9]|1[0-2])(?:0[1-9]|[12]\d|3[01])\d{3}[\dX]$/i.test(t)&&et(t.slice(6,14),"YYYYMMDD")}0&&(module.exports={base64Decode,base64Encode,castArray,compose,composeRight,debounce,debugWarn,debugWarnInvalidTypeMessage,decimalToBinary,deepClone,deepMerge,deprecated,error,generateRandomArray,generateRandomColor,generateRandomDate,generateRandomEmail,generateRandomFloat,generateRandomIdCard,generateRandomMobilePhone,generateRandomStringFromSource,getRandomInt,getRandomItem,getRandomString,getRandomUrl,hasChanged,isArray,isBoolean,isChineseString,isDate,isDateString,isDef,isEmail,isEmptyString,isEnglishAphabet,isFloat,isFunction,isIdCard,isInteger,isLowerCase,isLowerCaseAndNumber,isLowerCaseAndNumberAndChinese,isMap,isMobilePhone,isNegativeFloat,isNegativeInteger,isNonNegativeFloat,isNonNegativeInteger,isNonPositiveFloat,isNonPositiveInteger,isNull,isNumber,isNumberOrNumberString,isObject,isObjectLike,isPlainObject,isPositiveFloat,isPositiveInteger,isPromise,isRegExp,isSet,isString,isSymbol,isUndef,isUndefined,isUpperCase,isUpperCaseAndNumber,isUpperCaseAndNumberAndChinese,isUrl,log,objectToString,omit,pick,qs,throttle,throwError,throwErrorInvalidTypeMessage,toTypeString,toTypeValue,validatorChineseOrEnglish,validatorChineseOrEnglishOrNumber,validatorUppercaseOrNumbersOrSpecial,validatorUppercaseOrNumbersOrUnderline,warn});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var Xt=Object.create;var kt=Object.defineProperty;var qt=Object.getOwnPropertyDescriptor;var Bt=Object.getOwnPropertyNames;var Gt=Object.getPrototypeOf,Jt=Object.prototype.hasOwnProperty;var jt=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var Qt=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Bt(e))!Jt.call(t,i)&&i!==n&&kt(t,i,{get:()=>e[i],enumerable:!(r=qt(e,i))||r.enumerable});return t};var ut=(t,e,n)=>(n=t!=null?Xt(Gt(t)):{},Qt(e||!t||!t.__esModule?kt(n,"default",{value:t,enumerable:!0}):n,t));var wt=jt(($t,Mt)=>{"use strict";(function(t,e){typeof $t=="object"&&typeof Mt<"u"?Mt.exports=e():typeof define=="function"&&define.amd?define(e):(t=typeof globalThis<"u"?globalThis:t||self).dayjs=e()})($t,function(){"use strict";var t=1e3,e=6e4,n=36e5,r="millisecond",i="second",y="minute",l="hour",b="day",h="week",A="month",X="quarter",I="year",_="date",it="Invalid Date",p=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,x=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,O={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(c){var s=["th","st","nd","rd"],o=c%100;return"["+c+(s[(o-20)%10]||s[o]||s[0])+"]"}},M=function(c,s,o){var u=String(c);return!u||u.length>=s?c:""+Array(s+1-u.length).join(o)+c},H={s:M,z:function(c){var s=-c.utcOffset(),o=Math.abs(s),u=Math.floor(o/60),a=o%60;return(s<=0?"+":"-")+M(u,2,"0")+":"+M(a,2,"0")},m:function c(s,o){if(s.date()<o.date())return-c(o,s);var u=12*(o.year()-s.year())+(o.month()-s.month()),a=s.clone().add(u,A),f=o-a<0,m=s.clone().add(u+(f?-1:1),A);return+(-(u+(o-a)/(f?a-m:m-a))||0)},a:function(c){return c<0?Math.ceil(c)||0:Math.floor(c)},p:function(c){return{M:A,y:I,w:h,d:b,D:_,h:l,m:y,s:i,ms:r,Q:X}[c]||String(c||"").toLowerCase().replace(/s$/,"")},u:function(c){return c===void 0}},j="en",P={};P[j]=O;var K="$isDayjsObject",N=function(c){return c instanceof Y||!(!c||!c[K])},R=function c(s,o,u){var a;if(!s)return j;if(typeof s=="string"){var f=s.toLowerCase();P[f]&&(a=f),o&&(P[f]=o,a=f);var m=s.split("-");if(!a&&m.length>1)return c(m[0])}else{var d=s.name;P[d]=s,a=d}return!u&&a&&(j=a),a||!u&&j},$=function(c,s){if(N(c))return c.clone();var o=typeof s=="object"?s:{};return o.date=c,o.args=arguments,new Y(o)},g=H;g.l=R,g.i=N,g.w=function(c,s){return $(c,{locale:s.$L,utc:s.$u,x:s.$x,$offset:s.$offset})};var Y=function(){function c(o){this.$L=R(o.locale,null,!0),this.parse(o),this.$x=this.$x||o.x||{},this[K]=!0}var s=c.prototype;return s.parse=function(o){this.$d=function(u){var a=u.date,f=u.utc;if(a===null)return new Date(NaN);if(g.u(a))return new Date;if(a instanceof Date)return new Date(a);if(typeof a=="string"&&!/Z$/i.test(a)){var m=a.match(p);if(m){var d=m[2]-1||0,w=(m[7]||"0").substring(0,3);return f?new Date(Date.UTC(m[1],d,m[3]||1,m[4]||0,m[5]||0,m[6]||0,w)):new Date(m[1],d,m[3]||1,m[4]||0,m[5]||0,m[6]||0,w)}}return new Date(a)}(o),this.init()},s.init=function(){var o=this.$d;this.$y=o.getFullYear(),this.$M=o.getMonth(),this.$D=o.getDate(),this.$W=o.getDay(),this.$H=o.getHours(),this.$m=o.getMinutes(),this.$s=o.getSeconds(),this.$ms=o.getMilliseconds()},s.$utils=function(){return g},s.isValid=function(){return this.$d.toString()!==it},s.isSame=function(o,u){var a=$(o);return this.startOf(u)<=a&&a<=this.endOf(u)},s.isAfter=function(o,u){return $(o)<this.startOf(u)},s.isBefore=function(o,u){return this.endOf(u)<$(o)},s.$g=function(o,u,a){return g.u(o)?this[u]:this.set(a,o)},s.unix=function(){return Math.floor(this.valueOf()/1e3)},s.valueOf=function(){return this.$d.getTime()},s.startOf=function(o,u){var a=this,f=!!g.u(u)||u,m=g.p(o),d=function(V,T){var L=g.w(a.$u?Date.UTC(a.$y,T,V):new Date(a.$y,T,V),a);return f?L:L.endOf(b)},w=function(V,T){return g.w(a.toDate()[V].apply(a.toDate("s"),(f?[0,0,0,0]:[23,59,59,999]).slice(T)),a)},S=this.$W,v=this.$M,C=this.$D,G="set"+(this.$u?"UTC":"");switch(m){case I:return f?d(1,0):d(31,11);case A:return f?d(1,v):d(0,v+1);case h:var q=this.$locale().weekStart||0,tt=(S<q?S+7:S)-q;return d(f?C-tt:C+(6-tt),v);case b:case _:return w(G+"Hours",0);case l:return w(G+"Minutes",1);case y:return w(G+"Seconds",2);case i:return w(G+"Milliseconds",3);default:return this.clone()}},s.endOf=function(o){return this.startOf(o,!1)},s.$set=function(o,u){var a,f=g.p(o),m="set"+(this.$u?"UTC":""),d=(a={},a[b]=m+"Date",a[_]=m+"Date",a[A]=m+"Month",a[I]=m+"FullYear",a[l]=m+"Hours",a[y]=m+"Minutes",a[i]=m+"Seconds",a[r]=m+"Milliseconds",a)[f],w=f===b?this.$D+(u-this.$W):u;if(f===A||f===I){var S=this.clone().set(_,1);S.$d[d](w),S.init(),this.$d=S.set(_,Math.min(this.$D,S.daysInMonth())).$d}else d&&this.$d[d](w);return this.init(),this},s.set=function(o,u){return this.clone().$set(o,u)},s.get=function(o){return this[g.p(o)]()},s.add=function(o,u){var a,f=this;o=Number(o);var m=g.p(u),d=function(v){var C=$(f);return g.w(C.date(C.date()+Math.round(v*o)),f)};if(m===A)return this.set(A,this.$M+o);if(m===I)return this.set(I,this.$y+o);if(m===b)return d(1);if(m===h)return d(7);var w=(a={},a[y]=e,a[l]=n,a[i]=t,a)[m]||1,S=this.$d.getTime()+o*w;return g.w(S,this)},s.subtract=function(o,u){return this.add(-1*o,u)},s.format=function(o){var u=this,a=this.$locale();if(!this.isValid())return a.invalidDate||it;var f=o||"YYYY-MM-DDTHH:mm:ssZ",m=g.z(this),d=this.$H,w=this.$m,S=this.$M,v=a.weekdays,C=a.months,G=a.meridiem,q=function(T,L,B,J){return T&&(T[L]||T(u,f))||B[L].slice(0,J)},tt=function(T){return g.s(d%12||12,T,"0")},V=G||function(T,L,B){var J=T<12?"AM":"PM";return B?J.toLowerCase():J};return f.replace(x,function(T,L){return L||function(B){switch(B){case"YY":return String(u.$y).slice(-2);case"YYYY":return g.s(u.$y,4,"0");case"M":return S+1;case"MM":return g.s(S+1,2,"0");case"MMM":return q(a.monthsShort,S,C,3);case"MMMM":return q(C,S);case"D":return u.$D;case"DD":return g.s(u.$D,2,"0");case"d":return String(u.$W);case"dd":return q(a.weekdaysMin,u.$W,v,2);case"ddd":return q(a.weekdaysShort,u.$W,v,3);case"dddd":return v[u.$W];case"H":return String(d);case"HH":return g.s(d,2,"0");case"h":return tt(1);case"hh":return tt(2);case"a":return V(d,w,!0);case"A":return V(d,w,!1);case"m":return String(w);case"mm":return g.s(w,2,"0");case"s":return String(u.$s);case"ss":return g.s(u.$s,2,"0");case"SSS":return g.s(u.$ms,3,"0");case"Z":return m}return null}(T)||m.replace(":","")})},s.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},s.diff=function(o,u,a){var f,m=this,d=g.p(u),w=$(o),S=(w.utcOffset()-this.utcOffset())*e,v=this-w,C=function(){return g.m(m,w)};switch(d){case I:f=C()/12;break;case A:f=C();break;case X:f=C()/3;break;case h:f=(v-S)/6048e5;break;case b:f=(v-S)/864e5;break;case l:f=v/n;break;case y:f=v/e;break;case i:f=v/t;break;default:f=v}return a?f:g.a(f)},s.daysInMonth=function(){return this.endOf(A).$D},s.$locale=function(){return P[this.$L]},s.locale=function(o,u){if(!o)return this.$L;var a=this.clone(),f=R(o,u,!0);return f&&(a.$L=f),a},s.clone=function(){return g.w(this.$d,this)},s.toDate=function(){return new Date(this.valueOf())},s.toJSON=function(){return this.isValid()?this.toISOString():null},s.toISOString=function(){return this.$d.toISOString()},s.toString=function(){return this.$d.toUTCString()},c}(),E=Y.prototype;return $.prototype=E,[["$ms",r],["$s",i],["$m",y],["$H",l],["$W",b],["$M",A],["$y",I],["$D",_]].forEach(function(c){E[c[1]]=function(s){return this.$g(s,c[0],c[1])}}),$.extend=function(c,s){return c.$i||(c(s,Y,$),c.$i=!0),$},$.locale=R,$.isDayjs=N,$.unix=function(c){return $(1e3*c)},$.en=P[j],$.Ls=P,$.p={},$})});var Dt=jt((Ot,St)=>{"use strict";(function(t,e){typeof Ot=="object"&&typeof St<"u"?St.exports=e():typeof define=="function"&&define.amd?define(e):(t=typeof globalThis<"u"?globalThis:t||self).dayjs_plugin_customParseFormat=e()})(Ot,function(){"use strict";var t={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},e=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,n=/\d/,r=/\d\d/,i=/\d\d?/,y=/\d*[^-_:/,()\s\d]+/,l={},b=function(p){return(p=+p)+(p>68?1900:2e3)},h=function(p){return function(x){this[p]=+x}},A=[/[+-]\d\d:?(\d\d)?|Z/,function(p){(this.zone||(this.zone={})).offset=function(x){if(!x||x==="Z")return 0;var O=x.match(/([+-]|\d\d)/g),M=60*O[1]+(+O[2]||0);return M===0?0:O[0]==="+"?-M:M}(p)}],X=function(p){var x=l[p];return x&&(x.indexOf?x:x.s.concat(x.f))},I=function(p,x){var O,M=l.meridiem;if(M){for(var H=1;H<=24;H+=1)if(p.indexOf(M(H,0,x))>-1){O=H>12;break}}else O=p===(x?"pm":"PM");return O},_={A:[y,function(p){this.afternoon=I(p,!1)}],a:[y,function(p){this.afternoon=I(p,!0)}],Q:[n,function(p){this.month=3*(p-1)+1}],S:[n,function(p){this.milliseconds=100*+p}],SS:[r,function(p){this.milliseconds=10*+p}],SSS:[/\d{3}/,function(p){this.milliseconds=+p}],s:[i,h("seconds")],ss:[i,h("seconds")],m:[i,h("minutes")],mm:[i,h("minutes")],H:[i,h("hours")],h:[i,h("hours")],HH:[i,h("hours")],hh:[i,h("hours")],D:[i,h("day")],DD:[r,h("day")],Do:[y,function(p){var x=l.ordinal,O=p.match(/\d+/);if(this.day=O[0],x)for(var M=1;M<=31;M+=1)x(M).replace(/\[|\]/g,"")===p&&(this.day=M)}],w:[i,h("week")],ww:[r,h("week")],M:[i,h("month")],MM:[r,h("month")],MMM:[y,function(p){var x=X("months"),O=(X("monthsShort")||x.map(function(M){return M.slice(0,3)})).indexOf(p)+1;if(O<1)throw new Error;this.month=O%12||O}],MMMM:[y,function(p){var x=X("months").indexOf(p)+1;if(x<1)throw new Error;this.month=x%12||x}],Y:[/[+-]?\d+/,h("year")],YY:[r,function(p){this.year=b(p)}],YYYY:[/\d{4}/,h("year")],Z:A,ZZ:A};function it(p){var x,O;x=p,O=l&&l.formats;for(var M=(p=x.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function($,g,Y){var E=Y&&Y.toUpperCase();return g||O[Y]||t[Y]||O[E].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(c,s,o){return s||o.slice(1)})})).match(e),H=M.length,j=0;j<H;j+=1){var P=M[j],K=_[P],N=K&&K[0],R=K&&K[1];M[j]=R?{regex:N,parser:R}:P.replace(/^\[|\]$/g,"")}return function($){for(var g={},Y=0,E=0;Y<H;Y+=1){var c=M[Y];if(typeof c=="string")E+=c.length;else{var s=c.regex,o=c.parser,u=$.slice(E),a=s.exec(u)[0];o.call(g,a),$=$.replace(a,"")}}return function(f){var m=f.afternoon;if(m!==void 0){var d=f.hours;m?d<12&&(f.hours+=12):d===12&&(f.hours=0),delete f.afternoon}}(g),g}}return function(p,x,O){O.p.customParseFormat=!0,p&&p.parseTwoDigitYear&&(b=p.parseTwoDigitYear);var M=x.prototype,H=M.parse;M.parse=function(j){var P=j.date,K=j.utc,N=j.args;this.$u=K;var R=N[1];if(typeof R=="string"){var $=N[2]===!0,g=N[3]===!0,Y=$||g,E=N[2];g&&(E=N[2]),l=this.$locale(),!$&&E&&(l=O.Ls[E]),this.$d=function(u,a,f,m){try{if(["x","X"].indexOf(a)>-1)return new Date((a==="X"?1e3:1)*u);var d=it(a)(u),w=d.year,S=d.month,v=d.day,C=d.hours,G=d.minutes,q=d.seconds,tt=d.milliseconds,V=d.zone,T=d.week,L=new Date,B=v||(w||S?1:L.getDate()),J=w||L.getFullYear(),st=0;w&&!S||(st=S>0?S-1:L.getMonth());var at,lt=C||0,gt=G||0,ht=q||0,xt=tt||0;return V?new Date(Date.UTC(J,st,B,lt,gt,ht,xt+60*V.offset*1e3)):f?new Date(Date.UTC(J,st,B,lt,gt,ht,xt)):(at=new Date(J,st,B,lt,gt,ht,xt),T&&(at=m(at).week(T).toDate()),at)}catch{return new Date("")}}(P,R,K,O),this.init(),E&&E!==!0&&(this.$L=this.locale(E).$L),Y&&P!=this.format(R)&&(this.$d=new Date("")),l={}}else if(R instanceof Array)for(var c=R.length,s=1;s<=c;s+=1){N[1]=R[s-1];var o=O.apply(this,N);if(o.isValid()){this.$d=o.$d,this.$L=o.$L,this.init();break}s===c&&(this.$d=new Date(""))}else H.call(this,j)}}})});function xe(t){let e=typeof t;return t!==null&&(e==="object"||e==="function")}function ct(t){return t!==null&&typeof t=="object"}var te=Object.prototype.toString,et=t=>te.call(t),yt=t=>et(t).slice(8,-1),Yt=t=>typeof t=="string",U=t=>typeof t=="number"&&Number.isFinite(t),Me=t=>typeof t=="boolean",we=t=>t===null,Oe=t=>t===void 0,Rt=t=>typeof t=="symbol",Z=Array.isArray,ft=t=>typeof t=="function",Et=t=>et(t)==="[object Map]",Ct=t=>et(t)==="[object Set]",It=t=>et(t)==="[object Date]",Pt=t=>et(t)==="[object RegExp]",Nt=t=>ct(t)&&ft(t?.then)&&ft(t?.catch),rt=t=>t==null,Se=t=>t!=null,De=(t,e)=>t!==e;function Q(t){return et(t)==="[object Object]"}function nt(t){return Z(t)?t:[t]}function _e(t){let e=[],n,r="";for(;t>0;)n=Math.floor(t%2),e.push(n),t=Math.floor(t/2);for(;e.length>0;)r+=e.pop().toString();return r}var _t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function Le(t){let e="",n="";for(let i=0;i<t.length;i++)n+=t[i].charCodeAt(0).toString(2).padStart(8,"0");for(let i=0;i<n.length;i+=6)e+=_t[parseInt(n.slice(i,i+6).padEnd(6,"0"),2)];let r=e.length%4;return r!==0&&(e+="=".repeat(4-r)),e}function Fe(t){let e="",n="";for(let r=0;r<t.length&&t[r]!=="=";r++)n+=_t.indexOf(t[r]).toString(2).padStart(6,"0");for(let r=0;r<n.length;r+=8){let i=parseInt(n.slice(r,r+8),2);i&&(e+=String.fromCharCode(i))}return e}function Ue(...t){return t.reduce((e,n)=>function(...r){return n(e(...r))})}function Ze(...t){return t.reduce((e,n)=>function(...r){return e(n(...r))})}function ze(t,e=500){let n=null;return function(...r){n&&clearTimeout(n),n=setTimeout(()=>{t.apply(this,r)},e)}}function ot(t){let e=new WeakMap;function n(r){if(!ct(r))return r;if(It(r))return new Date(r);if(Pt(r))return new RegExp(r);if(Nt(r))return r;if(e.has(r))return e.get(r);if(Et(r)){let l=new Map;return e.set(r,l),r.forEach((b,h)=>l.set(n(h),n(b))),l}if(Ct(r)){let l=new Set;return e.set(r,l),r.forEach(b=>l.add(n(b))),l}let i=Z(r)?Object.setPrototypeOf([],Object.getPrototypeOf(r)):Object.create(Object.getPrototypeOf(r));e.set(r,i);let y=Object.getOwnPropertyDescriptors(r);for(let l of Reflect.ownKeys(y)){let b=y[l];b.get||b.set?Object.defineProperty(i,l,b):Object.defineProperty(i,l,{...b,value:n(b.value)})}return i}return n(t)}function Ft(t,e,n={}){return Ht(Lt(t,n),Lt(e,n),n)}function Ht(t,e,n){return Z(t)?ne(t,e,n):ee(t,e,n)}function ee(t,e,n){if(!Q(e))return e;let r=Object.getOwnPropertyDescriptors(e);return Reflect.ownKeys(e).forEach(i=>{(Q(t[i])||Z(t[i]))&&(Q(e[i])||Z(e[i]))?t[i]=Ht(t[i],e[i],n):Object.defineProperty(t,i,r[i])}),t}function ne(t,e,n){let{mergeStrategy:r="replace"}=n;if(Z(e))switch(r){case"merge":return t.concat(e);case"replace":return e;default:return e}return e}function Lt(t,e){let{deepClone:n=!0}=e;return n?ot(t):t}var mt=class extends Error{constructor(e,n="Utils"){super(e),this.name=n}};function D(t,e){throw new mt(`[${t}] ${e}`)}function Ut(t,e){let n=Yt(t)?new mt(`[${t}] ${e}`,"UtilsWarn"):t;console.warn(n)}function Qe(...t){console.warn(...t)}function tn(...t){console.error(...t)}var Zt=({from:t,replacement:e,version:n,type:r="API"})=>{Ut(`${r}`,`${t} is about to be deprecated in version ${n}, please use ${e} instead.`)};function en(t,e,n,r){let i=`Invalid params: type check failed for params "${e}". Expected ${n}, got ${yt(r)} with value ${r}.`;D(t,i)}function nn(t,e,n,r){let i=`Invalid params: type check failed for params "${e}". Expected ${n}, got ${yt(r)} with value ${r}.`;Ut(t,i)}var pt=(t,e,...n)=>{if(!e)return;let r=n.length===0?"":n.length===1?n[0]:n;console[t](`[Log] ${e}:`,r)},bt=(t,...e)=>{pt("info",t,...e)};bt.info=(t,...e)=>{pt("info",t,...e)};bt.error=(t,...e)=>{pt("error",t,...e)};bt.warn=(t,...e)=>{pt("warn",t,...e)};function re(t,e){let{decode:n=!0}=e||{},r={};t.startsWith("?")&&(t=t.slice(1)),t.includes("?")&&(t=t.slice(t.indexOf("?")+1));let i=t.split("&").filter(Boolean);for(let y of i){let[l,b]=y.split("=");r[l]=n?decodeURIComponent(b):b}return r}function Wt(t,e){let{encode:n=!0}=e||{},r=[];for(let i in t){let y=t[i];r.push(`${i}=${n?encodeURIComponent(y):y}`)}return r.join("&")}function oe(t,e,n){let r=Ft({encode:!0},{...n}),i=Wt(e,r);return t.includes("?")?t.endsWith("?")||t.endsWith("&")?`${t}${i}`:`${t}&${i}`:`${t}?${i}`}var an={parse:re,stringify:Wt,appendQueryString:oe};function fn(t,e=500){let n=null;return function(...r){if(rt(n))return n=Date.now(),t.apply(this,r);let i=Date.now();if(i-n>=e)return n=i,t.apply(this,r)}}function ln(t){return!rt(t)&&/^[\dA-Z\u4E00-\u9FA5]+$/i.test(t)}function gn(t){return!rt(t)&&/^[A-Z\u4E00-\u9FA5]+$/i.test(t)}function hn(t){return!rt(t)&&/^[\d!"#$%&'()*+,./:;<=>?@A-Z[\\\]^_`{|}~]+$/.test(t)}function xn(t){return/^[\dA-Z_]+$/.test(t)}function yn(t){return Zt({from:"validatorEmail",replacement:"isEmail",version:"2.4.0"}),/^([\w-])+@([\w-])+(\.[\w-])+/.test(t)}function zt(t,e,n={}){let{includeProto:r=!1,includeSymbols:i=!0,includeNonEnum:y=!1}=n,l={};return Q(t)&&nt(e).forEach(h=>{Rt(h)&&!i||!(r?h in t:Object.hasOwn(t,h))||!y&&(r?ie(t,h):Object.getOwnPropertyDescriptor(t,h))?.enumerable===!1||(l[h]=ot(t[h]))}),l}function ie(t,e){let n=t;for(;n!==null;){let r=Object.getOwnPropertyDescriptor(n,e);if(r)return r;n=Object.getPrototypeOf(n)}}function Ln(t,e){if(!Q(t))return{};let n=ot(t),r=nt(e),i=Object.keys(n).filter(y=>!r.includes(y));return zt(n,i)}function Kn(t,e){return(!U(t)||t<=0)&&D("generateRandomArray","num \u5FC5\u987B\u5927\u4E8E0"),ft(e)||D("generateRandomArray","cb \u5FC5\u987B\u662F\u51FD\u6570"),Array.from({length:t}).fill(0).map((n,r)=>e(n,r))}function Xn(){return`#${Math.random().toString(16).slice(2,8).padEnd(6,"0")}`}var W=ut(wt(),1),Kt=ut(Dt(),1);function F(t){return t[Math.floor(Math.random()*t.length)]}function k(t={}){U(t)&&(t={max:t});let{min:e=1,max:n=F(ae())}=t;se(e,n);let r=Math.ceil(e),i=Math.floor(n);return Math.floor(Math.random()*(i-r+1)+r)}function se(t,e){let n=Math.ceil(t),r=Math.floor(e);Number.isSafeInteger(n)||D("getRandomInt",`The minimum value Math.ceil(${t}) should be a safe integer`),Number.isSafeInteger(r)||D("getRandomInt",`The maximum value Math.floor(${e}) should be a safe integer`),r<n&&(e>=t&&D("getRandomInt",`No integer value found between ${t} and ${e}`),D("getRandomInt",`The maximum value ${e} should be greater than the minimum value ${t}`))}function ae(){return Array.from({length:Number.MAX_SAFE_INTEGER.toString().length}).map((t,e)=>{let n=Number.MAX_SAFE_INTEGER.toString().slice(0,e+1);return Number(n)})}(0,W.extend)(Kt.default);function vt(t={}){let{start:e="1800-01-01 00:00:00",end:n=(0,W.default)().format("YYYY-MM-DD HH:mm:ss"),format:r="YYYY-MM-DD HH:mm:ss"}=t;(!(0,W.default)(e).isValid()||!(0,W.default)(n).isValid())&&D("generateRandomDate","start end \u53C2\u6570\u5FC5\u987B\u662F\u5408\u6CD5\u7684\u65F6\u95F4\u683C\u5F0F");let i=(0,W.default)(e).year(),y=(0,W.default)(n).year(),l=k({min:i,max:y}),b=k({min:1,max:12}),h=k({min:1,max:31}),A=k(23),X=k(59),I=k(59),_=(0,W.default)(`${l}-${b}-${h} ${A}:${X}:${I}`);return _.isBefore((0,W.default)(e))||_.isAfter((0,W.default)(n))?vt(t):_.format(r)}function z(t={}){let e=ce(t),n=fe(e);me(n);let{length:r}=e;pe(r.min,r.max);let i=k(r),y=e.prefix||"";for(let l=0;l<i;l++)y+=n.charAt(Math.floor(Math.random()*n.length));return y+(e.suffix||"")}var ue=16,At=1;function ce(t){let e=U(t);return{lowerCase:!0,upperCase:!0,number:!0,...e?{}:t,length:e?{max:t,min:t}:U(t.length)?{max:t.length,min:t.length}:{max:ue,min:At,...t.length},extra:e?[]:[...new Set(nt(t.extra||[]))]}}function fe(t){let e="";return t.lowerCase&&(e+="abcdefghijklmnopqrstuvwxyz"),t.upperCase&&(e+="ABCDEFGHIJKLMNOPQRSTUVWXYZ"),t.number&&(e+="0123456789"),e+=nt(t.extra).join(""),e}function me(t){t.length===0&&D("getRandomString","At least one character set (lowercase, uppercase, number) must be enabled or extra characters provided")}function pe(t,e){Number.isInteger(t)||D("getRandomString","min must be an integer"),Number.isInteger(e)||D("getRandomString","max must be an integer"),t<At&&D("getRandomString",`Minimum length cannot be less than ${At}`),e<t&&D("getRandomString","Maximum length cannot be less than minimum length")}function de(){let t=["gmail.com","outlook.com.cn","example.com","qq.com","163.com","test.com.cn"],e=`${z(1)}${z({length:k({max:30,min:1})})}${z(1)}@${F(t)}`;return/\.{2,}/.test(e)?de():e}function lr(t={}){U(t)&&(t={max:t});let{min:e=0,max:n=1,fractionDigits:r=2}=t;if(e===n)return e;if(e>n)throw new Error(`\u6700\u5927\u503C ${n} \u5E94\u5927\u4E8E\u6700\u5C0F\u503C ${e}`);return Math.random()*(n-e)+e}function Tt(t,e){(!U(t)||t<=0)&&D("generateRandomStringFromSource","num \u5FC5\u987B\u5927\u4E8E0"),(!Z(e)||e.length===0)&&D("generateRandomStringFromSource","source \u4E0D\u80FD\u4E3A\u7A7A\u6570\u7EC4");let n="";for(let r=0;r<t;r++)n+=F(e);return n}function Or(){let t=k({min:1e5,max:999999}),e=[0,1,2,3,4,5,6,7,8,9];return[t,vt({format:"YYYYMMDD"}),Tt(3,e),Tt(1,[...e,"X","x"])].join("")}function Ar(){return F(["13","14","15","16","17","18","19"])+k(999999999).toString().padEnd(9,"0")}function Rr(){let t=["http://","https://"],e=[".com",".net",".org",".cn",".top"],n=[`?name=${z({length:{min:4,max:8}})}`,`?id=${k()}`,`?page=${z({length:{min:2,max:4}})}`,`?query=${z({length:{min:5,max:6}})}`,`?search=${z({length:{min:1,max:4}})}`,`?token=${z({length:{min:16,max:16}})}`];return`${F(t)}${z({length:{min:5,max:25}})}${F(e)}${F(n)}`}function Xr(t){return/^\d+$/.test(t)}function qr(t){return/^[A-Z]+$/i.test(t)}function Br(t){return/^[A-Z]+$/.test(t)}function Gr(t){return/^[\dA-Z]+$/.test(t)}function Jr(t){return/^[\dA-Z\u4E00-\u9FA5]+$/.test(t)}function Qr(t){return/^[a-z]+$/.test(t)}function to(t){return/^[\da-z]+$/.test(t)}function eo(t){return/^[\da-z\u4E00-\u9FA5]+$/.test(t)}function no(t){return/^[\u4E00-\u9FA5]+$/.test(t)}function oo(t){return/^-?(?:0|[1-9]\d*)\.\d+$/.test(t)}function io(t){return/^(?:0\.0*[1-9]\d*|[1-9]\d*\.\d+)$/.test(t)}function so(t){return/^(?:0|[1-9]\d*)\.\d+$/.test(t)}function ao(t){return/^-(?:0\.0*[1-9]\d*|[1-9]\d*\.\d+)$/.test(t)}function uo(t){return/^-(?:0|[1-9]\d*)\.\d+$/.test(t)}function fo(t){return/^-?(?:0|[1-9]\d*)$/.test(t)}function mo(t){return/^[1-9]\d*$/.test(t)}function po(t){return/^(?:0|[1-9]\d*)$/.test(t)&&!Object.is(t,-0)}function lo(t){return/^-[1-9]\d*$/.test(t)}function go(t){return/^-(?:0|[1-9]\d*)$/.test(t)||Object.is(t,-0)}var dt=ut(wt(),1),Vt=ut(Dt(),1);function xo(t){return/^1[3-9]\d{9}$/.test(t)}function yo(t){return/^https?:\/\/\S+$/i.test(t)}function bo(t){return/^[^\s@]+@[^\s@][^\s.@]*\.[^\s@]+$/.test(t)}function $o(t){return t===""}function le(t,e="YYYY-MM-DD HH:mm:ss"){return(0,dt.extend)(Vt.default),(0,dt.default)(t,e,!0).isValid()}function Mo(t){return/^[1-9]\d{5}(?:18|19|20)\d{2}(?:0[1-9]|1[0-2])(?:0[1-9]|[12]\d|3[01])\d{3}[\dX]$/i.test(t)&&le(t.slice(6,14),"YYYYMMDD")}export{Fe as base64Decode,Le as base64Encode,nt as castArray,Ue as compose,Ze as composeRight,ze as debounce,Ut as debugWarn,nn as debugWarnInvalidTypeMessage,_e as decimalToBinary,ot as deepClone,Ft as deepMerge,Zt as deprecated,tn as error,Kn as generateRandomArray,Xn as generateRandomColor,vt as generateRandomDate,de as generateRandomEmail,lr as generateRandomFloat,Or as generateRandomIdCard,Ar as generateRandomMobilePhone,Tt as generateRandomStringFromSource,k as getRandomInt,F as getRandomItem,z as getRandomString,Rr as getRandomUrl,De as hasChanged,Z as isArray,Me as isBoolean,no as isChineseString,It as isDate,le as isDateString,Se as isDef,bo as isEmail,$o as isEmptyString,qr as isEnglishAphabet,oo as isFloat,ft as isFunction,Mo as isIdCard,fo as isInteger,Qr as isLowerCase,to as isLowerCaseAndNumber,eo as isLowerCaseAndNumberAndChinese,Et as isMap,xo as isMobilePhone,ao as isNegativeFloat,lo as isNegativeInteger,so as isNonNegativeFloat,po as isNonNegativeInteger,uo as isNonPositiveFloat,go as isNonPositiveInteger,we as isNull,U as isNumber,Xr as isNumberOrNumberString,xe as isObject,ct as isObjectLike,Q as isPlainObject,io as isPositiveFloat,mo as isPositiveInteger,Nt as isPromise,Pt as isRegExp,Ct as isSet,Yt as isString,Rt as isSymbol,rt as isUndef,Oe as isUndefined,Br as isUpperCase,Gr as isUpperCaseAndNumber,Jr as isUpperCaseAndNumberAndChinese,yo as isUrl,bt as log,te as objectToString,Ln as omit,zt as pick,an as qs,fn as throttle,D as throwError,en as throwErrorInvalidTypeMessage,et as toTypeString,yt as toTypeValue,gn as validatorChineseOrEnglish,ln as validatorChineseOrEnglishOrNumber,yn as validatorEmail,hn as validatorUppercaseOrNumbersOrSpecial,xn as validatorUppercaseOrNumbersOrUnderline,Qe as warn};
|
|
1
|
+
var Vt=Object.create;var kt=Object.defineProperty;var Xt=Object.getOwnPropertyDescriptor;var qt=Object.getOwnPropertyNames;var Bt=Object.getPrototypeOf,Gt=Object.prototype.hasOwnProperty;var jt=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var Jt=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of qt(e))!Gt.call(t,i)&&i!==n&&kt(t,i,{get:()=>e[i],enumerable:!(r=Xt(e,i))||r.enumerable});return t};var ut=(t,e,n)=>(n=t!=null?Vt(Bt(t)):{},Jt(e||!t||!t.__esModule?kt(n,"default",{value:t,enumerable:!0}):n,t));var wt=jt(($t,Mt)=>{"use strict";(function(t,e){typeof $t=="object"&&typeof Mt<"u"?Mt.exports=e():typeof define=="function"&&define.amd?define(e):(t=typeof globalThis<"u"?globalThis:t||self).dayjs=e()})($t,function(){"use strict";var t=1e3,e=6e4,n=36e5,r="millisecond",i="second",y="minute",l="hour",b="day",h="week",v="month",X="quarter",I="year",_="date",it="Invalid Date",p=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,x=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,O={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(c){var s=["th","st","nd","rd"],o=c%100;return"["+c+(s[(o-20)%10]||s[o]||s[0])+"]"}},M=function(c,s,o){var u=String(c);return!u||u.length>=s?c:""+Array(s+1-u.length).join(o)+c},H={s:M,z:function(c){var s=-c.utcOffset(),o=Math.abs(s),u=Math.floor(o/60),a=o%60;return(s<=0?"+":"-")+M(u,2,"0")+":"+M(a,2,"0")},m:function c(s,o){if(s.date()<o.date())return-c(o,s);var u=12*(o.year()-s.year())+(o.month()-s.month()),a=s.clone().add(u,v),f=o-a<0,m=s.clone().add(u+(f?-1:1),v);return+(-(u+(o-a)/(f?a-m:m-a))||0)},a:function(c){return c<0?Math.ceil(c)||0:Math.floor(c)},p:function(c){return{M:v,y:I,w:h,d:b,D:_,h:l,m:y,s:i,ms:r,Q:X}[c]||String(c||"").toLowerCase().replace(/s$/,"")},u:function(c){return c===void 0}},j="en",P={};P[j]=O;var K="$isDayjsObject",N=function(c){return c instanceof Y||!(!c||!c[K])},R=function c(s,o,u){var a;if(!s)return j;if(typeof s=="string"){var f=s.toLowerCase();P[f]&&(a=f),o&&(P[f]=o,a=f);var m=s.split("-");if(!a&&m.length>1)return c(m[0])}else{var d=s.name;P[d]=s,a=d}return!u&&a&&(j=a),a||!u&&j},$=function(c,s){if(N(c))return c.clone();var o=typeof s=="object"?s:{};return o.date=c,o.args=arguments,new Y(o)},g=H;g.l=R,g.i=N,g.w=function(c,s){return $(c,{locale:s.$L,utc:s.$u,x:s.$x,$offset:s.$offset})};var Y=function(){function c(o){this.$L=R(o.locale,null,!0),this.parse(o),this.$x=this.$x||o.x||{},this[K]=!0}var s=c.prototype;return s.parse=function(o){this.$d=function(u){var a=u.date,f=u.utc;if(a===null)return new Date(NaN);if(g.u(a))return new Date;if(a instanceof Date)return new Date(a);if(typeof a=="string"&&!/Z$/i.test(a)){var m=a.match(p);if(m){var d=m[2]-1||0,w=(m[7]||"0").substring(0,3);return f?new Date(Date.UTC(m[1],d,m[3]||1,m[4]||0,m[5]||0,m[6]||0,w)):new Date(m[1],d,m[3]||1,m[4]||0,m[5]||0,m[6]||0,w)}}return new Date(a)}(o),this.init()},s.init=function(){var o=this.$d;this.$y=o.getFullYear(),this.$M=o.getMonth(),this.$D=o.getDate(),this.$W=o.getDay(),this.$H=o.getHours(),this.$m=o.getMinutes(),this.$s=o.getSeconds(),this.$ms=o.getMilliseconds()},s.$utils=function(){return g},s.isValid=function(){return this.$d.toString()!==it},s.isSame=function(o,u){var a=$(o);return this.startOf(u)<=a&&a<=this.endOf(u)},s.isAfter=function(o,u){return $(o)<this.startOf(u)},s.isBefore=function(o,u){return this.endOf(u)<$(o)},s.$g=function(o,u,a){return g.u(o)?this[u]:this.set(a,o)},s.unix=function(){return Math.floor(this.valueOf()/1e3)},s.valueOf=function(){return this.$d.getTime()},s.startOf=function(o,u){var a=this,f=!!g.u(u)||u,m=g.p(o),d=function(V,T){var L=g.w(a.$u?Date.UTC(a.$y,T,V):new Date(a.$y,T,V),a);return f?L:L.endOf(b)},w=function(V,T){return g.w(a.toDate()[V].apply(a.toDate("s"),(f?[0,0,0,0]:[23,59,59,999]).slice(T)),a)},S=this.$W,A=this.$M,C=this.$D,G="set"+(this.$u?"UTC":"");switch(m){case I:return f?d(1,0):d(31,11);case v:return f?d(1,A):d(0,A+1);case h:var q=this.$locale().weekStart||0,tt=(S<q?S+7:S)-q;return d(f?C-tt:C+(6-tt),A);case b:case _:return w(G+"Hours",0);case l:return w(G+"Minutes",1);case y:return w(G+"Seconds",2);case i:return w(G+"Milliseconds",3);default:return this.clone()}},s.endOf=function(o){return this.startOf(o,!1)},s.$set=function(o,u){var a,f=g.p(o),m="set"+(this.$u?"UTC":""),d=(a={},a[b]=m+"Date",a[_]=m+"Date",a[v]=m+"Month",a[I]=m+"FullYear",a[l]=m+"Hours",a[y]=m+"Minutes",a[i]=m+"Seconds",a[r]=m+"Milliseconds",a)[f],w=f===b?this.$D+(u-this.$W):u;if(f===v||f===I){var S=this.clone().set(_,1);S.$d[d](w),S.init(),this.$d=S.set(_,Math.min(this.$D,S.daysInMonth())).$d}else d&&this.$d[d](w);return this.init(),this},s.set=function(o,u){return this.clone().$set(o,u)},s.get=function(o){return this[g.p(o)]()},s.add=function(o,u){var a,f=this;o=Number(o);var m=g.p(u),d=function(A){var C=$(f);return g.w(C.date(C.date()+Math.round(A*o)),f)};if(m===v)return this.set(v,this.$M+o);if(m===I)return this.set(I,this.$y+o);if(m===b)return d(1);if(m===h)return d(7);var w=(a={},a[y]=e,a[l]=n,a[i]=t,a)[m]||1,S=this.$d.getTime()+o*w;return g.w(S,this)},s.subtract=function(o,u){return this.add(-1*o,u)},s.format=function(o){var u=this,a=this.$locale();if(!this.isValid())return a.invalidDate||it;var f=o||"YYYY-MM-DDTHH:mm:ssZ",m=g.z(this),d=this.$H,w=this.$m,S=this.$M,A=a.weekdays,C=a.months,G=a.meridiem,q=function(T,L,B,J){return T&&(T[L]||T(u,f))||B[L].slice(0,J)},tt=function(T){return g.s(d%12||12,T,"0")},V=G||function(T,L,B){var J=T<12?"AM":"PM";return B?J.toLowerCase():J};return f.replace(x,function(T,L){return L||function(B){switch(B){case"YY":return String(u.$y).slice(-2);case"YYYY":return g.s(u.$y,4,"0");case"M":return S+1;case"MM":return g.s(S+1,2,"0");case"MMM":return q(a.monthsShort,S,C,3);case"MMMM":return q(C,S);case"D":return u.$D;case"DD":return g.s(u.$D,2,"0");case"d":return String(u.$W);case"dd":return q(a.weekdaysMin,u.$W,A,2);case"ddd":return q(a.weekdaysShort,u.$W,A,3);case"dddd":return A[u.$W];case"H":return String(d);case"HH":return g.s(d,2,"0");case"h":return tt(1);case"hh":return tt(2);case"a":return V(d,w,!0);case"A":return V(d,w,!1);case"m":return String(w);case"mm":return g.s(w,2,"0");case"s":return String(u.$s);case"ss":return g.s(u.$s,2,"0");case"SSS":return g.s(u.$ms,3,"0");case"Z":return m}return null}(T)||m.replace(":","")})},s.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},s.diff=function(o,u,a){var f,m=this,d=g.p(u),w=$(o),S=(w.utcOffset()-this.utcOffset())*e,A=this-w,C=function(){return g.m(m,w)};switch(d){case I:f=C()/12;break;case v:f=C();break;case X:f=C()/3;break;case h:f=(A-S)/6048e5;break;case b:f=(A-S)/864e5;break;case l:f=A/n;break;case y:f=A/e;break;case i:f=A/t;break;default:f=A}return a?f:g.a(f)},s.daysInMonth=function(){return this.endOf(v).$D},s.$locale=function(){return P[this.$L]},s.locale=function(o,u){if(!o)return this.$L;var a=this.clone(),f=R(o,u,!0);return f&&(a.$L=f),a},s.clone=function(){return g.w(this.$d,this)},s.toDate=function(){return new Date(this.valueOf())},s.toJSON=function(){return this.isValid()?this.toISOString():null},s.toISOString=function(){return this.$d.toISOString()},s.toString=function(){return this.$d.toUTCString()},c}(),E=Y.prototype;return $.prototype=E,[["$ms",r],["$s",i],["$m",y],["$H",l],["$W",b],["$M",v],["$y",I],["$D",_]].forEach(function(c){E[c[1]]=function(s){return this.$g(s,c[0],c[1])}}),$.extend=function(c,s){return c.$i||(c(s,Y,$),c.$i=!0),$},$.locale=R,$.isDayjs=N,$.unix=function(c){return $(1e3*c)},$.en=P[j],$.Ls=P,$.p={},$})});var Dt=jt((Ot,St)=>{"use strict";(function(t,e){typeof Ot=="object"&&typeof St<"u"?St.exports=e():typeof define=="function"&&define.amd?define(e):(t=typeof globalThis<"u"?globalThis:t||self).dayjs_plugin_customParseFormat=e()})(Ot,function(){"use strict";var t={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},e=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,n=/\d/,r=/\d\d/,i=/\d\d?/,y=/\d*[^-_:/,()\s\d]+/,l={},b=function(p){return(p=+p)+(p>68?1900:2e3)},h=function(p){return function(x){this[p]=+x}},v=[/[+-]\d\d:?(\d\d)?|Z/,function(p){(this.zone||(this.zone={})).offset=function(x){if(!x||x==="Z")return 0;var O=x.match(/([+-]|\d\d)/g),M=60*O[1]+(+O[2]||0);return M===0?0:O[0]==="+"?-M:M}(p)}],X=function(p){var x=l[p];return x&&(x.indexOf?x:x.s.concat(x.f))},I=function(p,x){var O,M=l.meridiem;if(M){for(var H=1;H<=24;H+=1)if(p.indexOf(M(H,0,x))>-1){O=H>12;break}}else O=p===(x?"pm":"PM");return O},_={A:[y,function(p){this.afternoon=I(p,!1)}],a:[y,function(p){this.afternoon=I(p,!0)}],Q:[n,function(p){this.month=3*(p-1)+1}],S:[n,function(p){this.milliseconds=100*+p}],SS:[r,function(p){this.milliseconds=10*+p}],SSS:[/\d{3}/,function(p){this.milliseconds=+p}],s:[i,h("seconds")],ss:[i,h("seconds")],m:[i,h("minutes")],mm:[i,h("minutes")],H:[i,h("hours")],h:[i,h("hours")],HH:[i,h("hours")],hh:[i,h("hours")],D:[i,h("day")],DD:[r,h("day")],Do:[y,function(p){var x=l.ordinal,O=p.match(/\d+/);if(this.day=O[0],x)for(var M=1;M<=31;M+=1)x(M).replace(/\[|\]/g,"")===p&&(this.day=M)}],w:[i,h("week")],ww:[r,h("week")],M:[i,h("month")],MM:[r,h("month")],MMM:[y,function(p){var x=X("months"),O=(X("monthsShort")||x.map(function(M){return M.slice(0,3)})).indexOf(p)+1;if(O<1)throw new Error;this.month=O%12||O}],MMMM:[y,function(p){var x=X("months").indexOf(p)+1;if(x<1)throw new Error;this.month=x%12||x}],Y:[/[+-]?\d+/,h("year")],YY:[r,function(p){this.year=b(p)}],YYYY:[/\d{4}/,h("year")],Z:v,ZZ:v};function it(p){var x,O;x=p,O=l&&l.formats;for(var M=(p=x.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function($,g,Y){var E=Y&&Y.toUpperCase();return g||O[Y]||t[Y]||O[E].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(c,s,o){return s||o.slice(1)})})).match(e),H=M.length,j=0;j<H;j+=1){var P=M[j],K=_[P],N=K&&K[0],R=K&&K[1];M[j]=R?{regex:N,parser:R}:P.replace(/^\[|\]$/g,"")}return function($){for(var g={},Y=0,E=0;Y<H;Y+=1){var c=M[Y];if(typeof c=="string")E+=c.length;else{var s=c.regex,o=c.parser,u=$.slice(E),a=s.exec(u)[0];o.call(g,a),$=$.replace(a,"")}}return function(f){var m=f.afternoon;if(m!==void 0){var d=f.hours;m?d<12&&(f.hours+=12):d===12&&(f.hours=0),delete f.afternoon}}(g),g}}return function(p,x,O){O.p.customParseFormat=!0,p&&p.parseTwoDigitYear&&(b=p.parseTwoDigitYear);var M=x.prototype,H=M.parse;M.parse=function(j){var P=j.date,K=j.utc,N=j.args;this.$u=K;var R=N[1];if(typeof R=="string"){var $=N[2]===!0,g=N[3]===!0,Y=$||g,E=N[2];g&&(E=N[2]),l=this.$locale(),!$&&E&&(l=O.Ls[E]),this.$d=function(u,a,f,m){try{if(["x","X"].indexOf(a)>-1)return new Date((a==="X"?1e3:1)*u);var d=it(a)(u),w=d.year,S=d.month,A=d.day,C=d.hours,G=d.minutes,q=d.seconds,tt=d.milliseconds,V=d.zone,T=d.week,L=new Date,B=A||(w||S?1:L.getDate()),J=w||L.getFullYear(),st=0;w&&!S||(st=S>0?S-1:L.getMonth());var at,lt=C||0,gt=G||0,ht=q||0,xt=tt||0;return V?new Date(Date.UTC(J,st,B,lt,gt,ht,xt+60*V.offset*1e3)):f?new Date(Date.UTC(J,st,B,lt,gt,ht,xt)):(at=new Date(J,st,B,lt,gt,ht,xt),T&&(at=m(at).week(T).toDate()),at)}catch{return new Date("")}}(P,R,K,O),this.init(),E&&E!==!0&&(this.$L=this.locale(E).$L),Y&&P!=this.format(R)&&(this.$d=new Date("")),l={}}else if(R instanceof Array)for(var c=R.length,s=1;s<=c;s+=1){N[1]=R[s-1];var o=O.apply(this,N);if(o.isValid()){this.$d=o.$d,this.$L=o.$L,this.init();break}s===c&&(this.$d=new Date(""))}else H.call(this,j)}}})});function he(t){let e=typeof t;return t!==null&&(e==="object"||e==="function")}function ct(t){return t!==null&&typeof t=="object"}var Qt=Object.prototype.toString,et=t=>Qt.call(t),yt=t=>et(t).slice(8,-1),Yt=t=>typeof t=="string",U=t=>typeof t=="number"&&Number.isFinite(t),$e=t=>typeof t=="boolean",Me=t=>t===null,we=t=>t===void 0,Rt=t=>typeof t=="symbol",Z=Array.isArray,ft=t=>typeof t=="function",Et=t=>et(t)==="[object Map]",Ct=t=>et(t)==="[object Set]",It=t=>et(t)==="[object Date]",Pt=t=>et(t)==="[object RegExp]",Nt=t=>ct(t)&&ft(t?.then)&&ft(t?.catch),rt=t=>t==null,Oe=t=>t!=null,Se=(t,e)=>t!==e;function Q(t){return et(t)==="[object Object]"}function nt(t){return Z(t)?t:[t]}function Ne(t){let e=[],n,r="";for(;t>0;)n=Math.floor(t%2),e.push(n),t=Math.floor(t/2);for(;e.length>0;)r+=e.pop().toString();return r}var _t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function _e(t){let e="",n="";for(let i=0;i<t.length;i++)n+=t[i].charCodeAt(0).toString(2).padStart(8,"0");for(let i=0;i<n.length;i+=6)e+=_t[parseInt(n.slice(i,i+6).padEnd(6,"0"),2)];let r=e.length%4;return r!==0&&(e+="=".repeat(4-r)),e}function Le(t){let e="",n="";for(let r=0;r<t.length&&t[r]!=="=";r++)n+=_t.indexOf(t[r]).toString(2).padStart(6,"0");for(let r=0;r<n.length;r+=8){let i=parseInt(n.slice(r,r+8),2);i&&(e+=String.fromCharCode(i))}return e}function He(...t){return t.reduce((e,n)=>function(...r){return n(e(...r))})}function Ue(...t){return t.reduce((e,n)=>function(...r){return e(n(...r))})}function We(t,e=500){let n=null;return function(...r){n&&clearTimeout(n),n=setTimeout(()=>{t.apply(this,r)},e)}}function ot(t){let e=new WeakMap;function n(r){if(!ct(r))return r;if(It(r))return new Date(r);if(Pt(r))return new RegExp(r);if(Nt(r))return r;if(e.has(r))return e.get(r);if(Et(r)){let l=new Map;return e.set(r,l),r.forEach((b,h)=>l.set(n(h),n(b))),l}if(Ct(r)){let l=new Set;return e.set(r,l),r.forEach(b=>l.add(n(b))),l}let i=Z(r)?Object.setPrototypeOf([],Object.getPrototypeOf(r)):Object.create(Object.getPrototypeOf(r));e.set(r,i);let y=Object.getOwnPropertyDescriptors(r);for(let l of Reflect.ownKeys(y)){let b=y[l];b.get||b.set?Object.defineProperty(i,l,b):Object.defineProperty(i,l,{...b,value:n(b.value)})}return i}return n(t)}function Ft(t,e,n={}){return Ht(Lt(t,n),Lt(e,n),n)}function Ht(t,e,n){return Z(t)?ee(t,e,n):te(t,e,n)}function te(t,e,n){if(!Q(e))return e;let r=Object.getOwnPropertyDescriptors(e);return Reflect.ownKeys(e).forEach(i=>{(Q(t[i])||Z(t[i]))&&(Q(e[i])||Z(e[i]))?t[i]=Ht(t[i],e[i],n):Object.defineProperty(t,i,r[i])}),t}function ee(t,e,n){let{mergeStrategy:r="replace"}=n;if(Z(e))switch(r){case"merge":return t.concat(e);case"replace":return e;default:return e}return e}function Lt(t,e){let{deepClone:n=!0}=e;return n?ot(t):t}var mt=class extends Error{constructor(e,n="Utils"){super(e),this.name=n}};function D(t,e){throw new mt(`[${t}] ${e}`)}function Ut(t,e){let n=Yt(t)?new mt(`[${t}] ${e}`,"UtilsWarn"):t;console.warn(n)}function Je(...t){console.warn(...t)}function Qe(...t){console.error(...t)}var tn=({from:t,replacement:e,version:n,type:r="API"})=>{Ut(`${r}`,`${t} is about to be deprecated in version ${n}, please use ${e} instead.`)};function en(t,e,n,r){let i=`Invalid params: type check failed for params "${e}". Expected ${n}, got ${yt(r)} with value ${r}.`;D(t,i)}function nn(t,e,n,r){let i=`Invalid params: type check failed for params "${e}". Expected ${n}, got ${yt(r)} with value ${r}.`;Ut(t,i)}var pt=(t,e,...n)=>{if(!e)return;let r=n.length===0?"":n.length===1?n[0]:n;console[t](`[Log] ${e}:`,r)},bt=(t,...e)=>{pt("info",t,...e)};bt.info=(t,...e)=>{pt("info",t,...e)};bt.error=(t,...e)=>{pt("error",t,...e)};bt.warn=(t,...e)=>{pt("warn",t,...e)};function ne(t,e){let{decode:n=!0}=e||{},r={};t.startsWith("?")&&(t=t.slice(1)),t.includes("?")&&(t=t.slice(t.indexOf("?")+1));let i=t.split("&").filter(Boolean);for(let y of i){let[l,b]=y.split("=");r[l]=n?decodeURIComponent(b):b}return r}function Zt(t,e){let{encode:n=!0}=e||{},r=[];for(let i in t){let y=t[i];r.push(`${i}=${n?encodeURIComponent(y):y}`)}return r.join("&")}function re(t,e,n){let r=Ft({encode:!0},{...n}),i=Zt(e,r);return t.includes("?")?t.endsWith("?")||t.endsWith("&")?`${t}${i}`:`${t}&${i}`:`${t}?${i}`}var an={parse:ne,stringify:Zt,appendQueryString:re};function fn(t,e=500){let n=null;return function(...r){if(rt(n))return n=Date.now(),t.apply(this,r);let i=Date.now();if(i-n>=e)return n=i,t.apply(this,r)}}function dn(t){return!rt(t)&&/^[\dA-Z\u4E00-\u9FA5]+$/i.test(t)}function ln(t){return!rt(t)&&/^[A-Z\u4E00-\u9FA5]+$/i.test(t)}function gn(t){return!rt(t)&&/^[\d!"#$%&'()*+,./:;<=>?@A-Z[\\\]^_`{|}~]+$/.test(t)}function hn(t){return/^[\dA-Z_]+$/.test(t)}function Wt(t,e,n={}){let{includeProto:r=!1,includeSymbols:i=!0,includeNonEnum:y=!1}=n,l={};return Q(t)&&nt(e).forEach(h=>{Rt(h)&&!i||!(r?h in t:Object.hasOwn(t,h))||!y&&(r?oe(t,h):Object.getOwnPropertyDescriptor(t,h))?.enumerable===!1||(l[h]=ot(t[h]))}),l}function oe(t,e){let n=t;for(;n!==null;){let r=Object.getOwnPropertyDescriptor(n,e);if(r)return r;n=Object.getPrototypeOf(n)}}function Nn(t,e){if(!Q(t))return{};let n=ot(t),r=nt(e),i=Object.keys(n).filter(y=>!r.includes(y));return Wt(n,i)}function Wn(t,e){return(!U(t)||t<=0)&&D("generateRandomArray","num \u5FC5\u987B\u5927\u4E8E0"),ft(e)||D("generateRandomArray","cb \u5FC5\u987B\u662F\u51FD\u6570"),Array.from({length:t}).fill(0).map((n,r)=>e(n,r))}function Kn(){return`#${Math.random().toString(16).slice(2,8).padEnd(6,"0")}`}var W=ut(wt(),1),zt=ut(Dt(),1);function F(t){return t[Math.floor(Math.random()*t.length)]}function k(t={}){U(t)&&(t={max:t});let{min:e=1,max:n=F(se())}=t;ie(e,n);let r=Math.ceil(e),i=Math.floor(n);return Math.floor(Math.random()*(i-r+1)+r)}function ie(t,e){let n=Math.ceil(t),r=Math.floor(e);Number.isSafeInteger(n)||D("getRandomInt",`The minimum value Math.ceil(${t}) should be a safe integer`),Number.isSafeInteger(r)||D("getRandomInt",`The maximum value Math.floor(${e}) should be a safe integer`),r<n&&(e>=t&&D("getRandomInt",`No integer value found between ${t} and ${e}`),D("getRandomInt",`The maximum value ${e} should be greater than the minimum value ${t}`))}function se(){return Array.from({length:Number.MAX_SAFE_INTEGER.toString().length}).map((t,e)=>{let n=Number.MAX_SAFE_INTEGER.toString().slice(0,e+1);return Number(n)})}(0,W.extend)(zt.default);function At(t={}){let{start:e="1800-01-01 00:00:00",end:n=(0,W.default)().format("YYYY-MM-DD HH:mm:ss"),format:r="YYYY-MM-DD HH:mm:ss"}=t;(!(0,W.default)(e).isValid()||!(0,W.default)(n).isValid())&&D("generateRandomDate","start end \u53C2\u6570\u5FC5\u987B\u662F\u5408\u6CD5\u7684\u65F6\u95F4\u683C\u5F0F");let i=(0,W.default)(e).year(),y=(0,W.default)(n).year(),l=k({min:i,max:y}),b=k({min:1,max:12}),h=k({min:1,max:31}),v=k(23),X=k(59),I=k(59),_=(0,W.default)(`${l}-${b}-${h} ${v}:${X}:${I}`);return _.isBefore((0,W.default)(e))||_.isAfter((0,W.default)(n))?At(t):_.format(r)}function z(t={}){let e=ue(t),n=ce(e);fe(n);let{length:r}=e;me(r.min,r.max);let i=k(r),y=e.prefix||"";for(let l=0;l<i;l++)y+=n.charAt(Math.floor(Math.random()*n.length));return y+(e.suffix||"")}var ae=16,vt=1;function ue(t){let e=U(t);return{lowerCase:!0,upperCase:!0,number:!0,...e?{}:t,length:e?{max:t,min:t}:U(t.length)?{max:t.length,min:t.length}:{max:ae,min:vt,...t.length},extra:e?[]:[...new Set(nt(t.extra||[]))]}}function ce(t){let e="";return t.lowerCase&&(e+="abcdefghijklmnopqrstuvwxyz"),t.upperCase&&(e+="ABCDEFGHIJKLMNOPQRSTUVWXYZ"),t.number&&(e+="0123456789"),e+=nt(t.extra).join(""),e}function fe(t){t.length===0&&D("getRandomString","At least one character set (lowercase, uppercase, number) must be enabled or extra characters provided")}function me(t,e){Number.isInteger(t)||D("getRandomString","min must be an integer"),Number.isInteger(e)||D("getRandomString","max must be an integer"),t<vt&&D("getRandomString",`Minimum length cannot be less than ${vt}`),e<t&&D("getRandomString","Maximum length cannot be less than minimum length")}function pe(){let t=["gmail.com","outlook.com.cn","example.com","qq.com","163.com","test.com.cn"],e=`${z(1)}${z({length:k({max:30,min:1})})}${z(1)}@${F(t)}`;return/\.{2,}/.test(e)?pe():e}function pr(t={}){U(t)&&(t={max:t});let{min:e=0,max:n=1,fractionDigits:r=2}=t;if(e===n)return e;if(e>n)throw new Error(`\u6700\u5927\u503C ${n} \u5E94\u5927\u4E8E\u6700\u5C0F\u503C ${e}`);return Math.random()*(n-e)+e}function Tt(t,e){(!U(t)||t<=0)&&D("generateRandomStringFromSource","num \u5FC5\u987B\u5927\u4E8E0"),(!Z(e)||e.length===0)&&D("generateRandomStringFromSource","source \u4E0D\u80FD\u4E3A\u7A7A\u6570\u7EC4");let n="";for(let r=0;r<t;r++)n+=F(e);return n}function Mr(){let t=k({min:1e5,max:999999}),e=[0,1,2,3,4,5,6,7,8,9];return[t,At({format:"YYYYMMDD"}),Tt(3,e),Tt(1,[...e,"X","x"])].join("")}function Dr(){return F(["13","14","15","16","17","18","19"])+k(999999999).toString().padEnd(9,"0")}function jr(){let t=["http://","https://"],e=[".com",".net",".org",".cn",".top"],n=[`?name=${z({length:{min:4,max:8}})}`,`?id=${k()}`,`?page=${z({length:{min:2,max:4}})}`,`?query=${z({length:{min:5,max:6}})}`,`?search=${z({length:{min:1,max:4}})}`,`?token=${z({length:{min:16,max:16}})}`];return`${F(t)}${z({length:{min:5,max:25}})}${F(e)}${F(n)}`}function Kr(t){return/^\d+$/.test(t)}function Vr(t){return/^[A-Z]+$/i.test(t)}function Xr(t){return/^[A-Z]+$/.test(t)}function qr(t){return/^[\dA-Z]+$/.test(t)}function Br(t){return/^[\dA-Z\u4E00-\u9FA5]+$/.test(t)}function Gr(t){return/^[a-z]+$/.test(t)}function Jr(t){return/^[\da-z]+$/.test(t)}function Qr(t){return/^[\da-z\u4E00-\u9FA5]+$/.test(t)}function to(t){return/^[\u4E00-\u9FA5]+$/.test(t)}function no(t){return/^-?(?:0|[1-9]\d*)\.\d+$/.test(t)}function ro(t){return/^(?:0\.0*[1-9]\d*|[1-9]\d*\.\d+)$/.test(t)}function oo(t){return/^(?:0|[1-9]\d*)\.\d+$/.test(t)}function io(t){return/^-(?:0\.0*[1-9]\d*|[1-9]\d*\.\d+)$/.test(t)}function so(t){return/^-(?:0|[1-9]\d*)\.\d+$/.test(t)}function uo(t){return/^-?(?:0|[1-9]\d*)$/.test(t)}function co(t){return/^[1-9]\d*$/.test(t)}function fo(t){return/^(?:0|[1-9]\d*)$/.test(t)&&!Object.is(t,-0)}function mo(t){return/^-[1-9]\d*$/.test(t)}function po(t){return/^-(?:0|[1-9]\d*)$/.test(t)||Object.is(t,-0)}var dt=ut(wt(),1),Kt=ut(Dt(),1);function go(t){return/^1[3-9]\d{9}$/.test(t)}function ho(t){return/^https?:\/\/\S+$/i.test(t)}function xo(t){return/^[^\s@]+@[^\s@][^\s.@]*\.[^\s@]+$/.test(t)}function yo(t){return t===""}function de(t,e="YYYY-MM-DD HH:mm:ss"){return(0,dt.extend)(Kt.default),(0,dt.default)(t,e,!0).isValid()}function bo(t){return/^[1-9]\d{5}(?:18|19|20)\d{2}(?:0[1-9]|1[0-2])(?:0[1-9]|[12]\d|3[01])\d{3}[\dX]$/i.test(t)&&de(t.slice(6,14),"YYYYMMDD")}export{Le as base64Decode,_e as base64Encode,nt as castArray,He as compose,Ue as composeRight,We as debounce,Ut as debugWarn,nn as debugWarnInvalidTypeMessage,Ne as decimalToBinary,ot as deepClone,Ft as deepMerge,tn as deprecated,Qe as error,Wn as generateRandomArray,Kn as generateRandomColor,At as generateRandomDate,pe as generateRandomEmail,pr as generateRandomFloat,Mr as generateRandomIdCard,Dr as generateRandomMobilePhone,Tt as generateRandomStringFromSource,k as getRandomInt,F as getRandomItem,z as getRandomString,jr as getRandomUrl,Se as hasChanged,Z as isArray,$e as isBoolean,to as isChineseString,It as isDate,de as isDateString,Oe as isDef,xo as isEmail,yo as isEmptyString,Vr as isEnglishAphabet,no as isFloat,ft as isFunction,bo as isIdCard,uo as isInteger,Gr as isLowerCase,Jr as isLowerCaseAndNumber,Qr as isLowerCaseAndNumberAndChinese,Et as isMap,go as isMobilePhone,io as isNegativeFloat,mo as isNegativeInteger,oo as isNonNegativeFloat,fo as isNonNegativeInteger,so as isNonPositiveFloat,po as isNonPositiveInteger,Me as isNull,U as isNumber,Kr as isNumberOrNumberString,he as isObject,ct as isObjectLike,Q as isPlainObject,ro as isPositiveFloat,co as isPositiveInteger,Nt as isPromise,Pt as isRegExp,Ct as isSet,Yt as isString,Rt as isSymbol,rt as isUndef,we as isUndefined,Xr as isUpperCase,qr as isUpperCaseAndNumber,Br as isUpperCaseAndNumberAndChinese,ho as isUrl,bt as log,Qt as objectToString,Nn as omit,Wt as pick,an as qs,fn as throttle,D as throwError,en as throwErrorInvalidTypeMessage,et as toTypeString,yt as toTypeValue,ln as validatorChineseOrEnglish,dn as validatorChineseOrEnglishOrNumber,gn as validatorUppercaseOrNumbersOrSpecial,hn as validatorUppercaseOrNumbersOrUnderline,Je as warn};
|
|
@@ -598,11 +598,6 @@ declare function validatorUppercaseOrNumbersOrSpecial(value: string): boolean;
|
|
|
598
598
|
* 校验大写字母、数字、_
|
|
599
599
|
*/
|
|
600
600
|
declare function validatorUppercaseOrNumbersOrUnderline(value: string): boolean;
|
|
601
|
-
/**
|
|
602
|
-
* 校验是否为邮箱
|
|
603
|
-
* @deprecated 使用 isEmail 代替
|
|
604
|
-
*/
|
|
605
|
-
declare function validatorEmail(value: string): boolean;
|
|
606
601
|
|
|
607
602
|
/**
|
|
608
603
|
* 校验是否为数字
|
|
@@ -833,4 +828,4 @@ declare function isDateString(val: string, format?: string): boolean;
|
|
|
833
828
|
*/
|
|
834
829
|
declare function isIdCard(val: string): boolean;
|
|
835
830
|
|
|
836
|
-
export { type AnyObject, type ArrayItem, type Arrayable, type ParseOptions, type PlainObject, type StringNumber, type StringifyOptions, base64Decode, base64Encode, castArray, compose, composeRight, debounce, debugWarn, debugWarnInvalidTypeMessage, decimalToBinary, deepClone, deepMerge, deprecated, error, generateRandomArray, generateRandomColor, generateRandomDate, generateRandomEmail, generateRandomFloat, generateRandomIdCard, generateRandomMobilePhone, generateRandomStringFromSource, getRandomInt, getRandomItem, getRandomString, getRandomUrl, hasChanged, isArray, isBoolean, isChineseString, isDate, isDateString, isDef, isEmail, isEmptyString, isEnglishAphabet, isFloat, isFunction, isIdCard, isInteger, isLowerCase, isLowerCaseAndNumber, isLowerCaseAndNumberAndChinese, isMap, isMobilePhone, isNegativeFloat, isNegativeInteger, isNonNegativeFloat, isNonNegativeInteger, isNonPositiveFloat, isNonPositiveInteger, isNull, isNumber, isNumberOrNumberString, isObject, isObjectLike, isPlainObject, isPositiveFloat, isPositiveInteger, isPromise, isRegExp, isSet, isString, isSymbol, isUndef, isUndefined, isUpperCase, isUpperCaseAndNumber, isUpperCaseAndNumberAndChinese, isUrl, log, objectToString, omit, pick, qs, throttle, throwError, throwErrorInvalidTypeMessage, toTypeString, toTypeValue, validatorChineseOrEnglish, validatorChineseOrEnglishOrNumber,
|
|
831
|
+
export { type AnyObject, type ArrayItem, type Arrayable, type ParseOptions, type PlainObject, type StringNumber, type StringifyOptions, base64Decode, base64Encode, castArray, compose, composeRight, debounce, debugWarn, debugWarnInvalidTypeMessage, decimalToBinary, deepClone, deepMerge, deprecated, error, generateRandomArray, generateRandomColor, generateRandomDate, generateRandomEmail, generateRandomFloat, generateRandomIdCard, generateRandomMobilePhone, generateRandomStringFromSource, getRandomInt, getRandomItem, getRandomString, getRandomUrl, hasChanged, isArray, isBoolean, isChineseString, isDate, isDateString, isDef, isEmail, isEmptyString, isEnglishAphabet, isFloat, isFunction, isIdCard, isInteger, isLowerCase, isLowerCaseAndNumber, isLowerCaseAndNumberAndChinese, isMap, isMobilePhone, isNegativeFloat, isNegativeInteger, isNonNegativeFloat, isNonNegativeInteger, isNonPositiveFloat, isNonPositiveInteger, isNull, isNumber, isNumberOrNumberString, isObject, isObjectLike, isPlainObject, isPositiveFloat, isPositiveInteger, isPromise, isRegExp, isSet, isString, isSymbol, isUndef, isUndefined, isUpperCase, isUpperCaseAndNumber, isUpperCaseAndNumberAndChinese, isUrl, log, objectToString, omit, pick, qs, throttle, throwError, throwErrorInvalidTypeMessage, toTypeString, toTypeValue, validatorChineseOrEnglish, validatorChineseOrEnglishOrNumber, validatorUppercaseOrNumbersOrSpecial, validatorUppercaseOrNumbersOrUnderline, warn };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* @ts-self-types="./esm-bundler.d.ts" */
|
|
2
|
-
function dt(t){let e=typeof t;return t!==null&&(e==="object"||e==="function")}function w(t){return t!==null&&typeof t=="object"}var B=Object.prototype.toString,b=t=>B.call(t),M=t=>b(t).slice(8,-1),I=t=>typeof t=="string",u=t=>typeof t=="number"&&Number.isFinite(t),ht=t=>typeof t=="boolean",Ot=t=>t===null,wt=t=>t===void 0,N=t=>typeof t=="symbol",g=Array.isArray,$=t=>typeof t=="function",C=t=>b(t)==="[object Map]",F=t=>b(t)==="[object Set]",v=t=>b(t)==="[object Date]",Y=t=>b(t)==="[object RegExp]",U=t=>w(t)&&$(t?.then)&&$(t?.catch),h=t=>t==null,$t=t=>t!=null,At=(t,e)=>t!==e;function d(t){return b(t)==="[object Object]"}function y(t){return g(t)?t:[t]}function Ft(t){let e=[],r,n="";for(;t>0;)r=Math.floor(t%2),e.push(r),t=Math.floor(t/2);for(;e.length>0;)n+=e.pop().toString();return n}var _="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function vt(t){let e="",r="";for(let o=0;o<t.length;o++)r+=t[o].charCodeAt(0).toString(2).padStart(8,"0");for(let o=0;o<r.length;o+=6)e+=_[parseInt(r.slice(o,o+6).padEnd(6,"0"),2)];let n=e.length%4;return n!==0&&(e+="=".repeat(4-n)),e}function Yt(t){let e="",r="";for(let n=0;n<t.length&&t[n]!=="=";n++)r+=_.indexOf(t[n]).toString(2).padStart(6,"0");for(let n=0;n<r.length;n+=8){let o=parseInt(r.slice(n,n+8),2);o&&(e+=String.fromCharCode(o))}return e}function _t(...t){return t.reduce((e,r)=>function(...n){return r(e(...n))})}function Kt(...t){return t.reduce((e,r)=>function(...n){return e(r(...n))})}function zt(t,e=500){let r=null;return function(...n){r&&clearTimeout(r),r=setTimeout(()=>{t.apply(this,n)},e)}}function O(t){let e=new WeakMap;function r(n){if(!w(n))return n;if(v(n))return new Date(n);if(Y(n))return new RegExp(n);if(U(n))return n;if(e.has(n))return e.get(n);if(C(n)){let i=new Map;return e.set(n,i),n.forEach((c,f)=>i.set(r(f),r(c))),i}if(F(n)){let i=new Set;return e.set(n,i),n.forEach(c=>i.add(r(c))),i}let o=g(n)?Object.setPrototypeOf([],Object.getPrototypeOf(n)):Object.create(Object.getPrototypeOf(n));e.set(n,o);let m=Object.getOwnPropertyDescriptors(n);for(let i of Reflect.ownKeys(m)){let c=m[i];c.get||c.set?Object.defineProperty(o,i,c):Object.defineProperty(o,i,{...c,value:r(c.value)})}return o}return r(t)}function L(t,e,r={}){return z(K(t,r),K(e,r),r)}function z(t,e,r){return g(t)?X(t,e,r):V(t,e,r)}function V(t,e,r){if(!d(e))return e;let n=Object.getOwnPropertyDescriptors(e);return Reflect.ownKeys(e).forEach(o=>{(d(t[o])||g(t[o]))&&(d(e[o])||g(e[o]))?t[o]=z(t[o],e[o],r):Object.defineProperty(t,o,n[o])}),t}function X(t,e,r){let{mergeStrategy:n="replace"}=r;if(g(e))switch(n){case"merge":return t.concat(e);case"replace":return e;default:return e}return e}function K(t,e){let{deepClone:r=!0}=e;return r?O(t):t}var A=class extends Error{constructor(e,r="Utils"){super(e),this.name=r}};function s(t,e){throw new A(`[${t}] ${e}`)}function W(t,e){let r=I(t)?new A(`[${t}] ${e}`,"UtilsWarn"):t;console.warn(r)}function Xt(...t){console.warn(...t)}function Qt(...t){console.error(...t)}var H=({from:t,replacement:e,version:r,type:n="API"})=>{W(`${n}`,`${t} is about to be deprecated in version ${r}, please use ${e} instead.`)};function Jt(t,e,r,n){let o=`Invalid params: type check failed for params "${e}". Expected ${r}, got ${M(n)} with value ${n}.`;s(t,o)}function te(t,e,r,n){let o=`Invalid params: type check failed for params "${e}". Expected ${r}, got ${M(n)} with value ${n}.`;W(t,o)}var S=(t,e,...r)=>{if(!e)return;let n=r.length===0?"":r.length===1?r[0]:r;console[t](`[Log] ${e}:`,n)},R=(t,...e)=>{S("info",t,...e)};R.info=(t,...e)=>{S("info",t,...e)};R.error=(t,...e)=>{S("error",t,...e)};R.warn=(t,...e)=>{S("warn",t,...e)};function Q(t,e){let{decode:r=!0}=e||{},n={};t.startsWith("?")&&(t=t.slice(1)),t.includes("?")&&(t=t.slice(t.indexOf("?")+1));let o=t.split("&").filter(Boolean);for(let m of o){let[i,c]=m.split("=");n[i]=r?decodeURIComponent(c):c}return n}function Z(t,e){let{encode:r=!0}=e||{},n=[];for(let o in t){let m=t[o];n.push(`${o}=${r?encodeURIComponent(m):m}`)}return n.join("&")}function J(t,e,r){let n=L({encode:!0},{...r}),o=Z(e,n);return t.includes("?")?t.endsWith("?")||t.endsWith("&")?`${t}${o}`:`${t}&${o}`:`${t}?${o}`}var oe={parse:Q,stringify:Z,appendQueryString:J};function ae(t,e=500){let r=null;return function(...n){if(h(r))return r=Date.now(),t.apply(this,n);let o=Date.now();if(o-r>=e)return r=o,t.apply(this,n)}}function fe(t){return!h(t)&&/^[\dA-Z\u4E00-\u9FA5]+$/i.test(t)}function ue(t){return!h(t)&&/^[A-Z\u4E00-\u9FA5]+$/i.test(t)}function ge(t){return!h(t)&&/^[\d!"#$%&'()*+,./:;<=>?@A-Z[\\\]^_`{|}~]+$/.test(t)}function le(t){return/^[\dA-Z_]+$/.test(t)}function de(t){return H({from:"validatorEmail",replacement:"isEmail",version:"2.4.0"}),/^([\w-])+@([\w-])+(\.[\w-])+/.test(t)}function G(t,e,r={}){let{includeProto:n=!1,includeSymbols:o=!0,includeNonEnum:m=!1}=r,i={};return d(t)&&y(e).forEach(f=>{N(f)&&!o||!(n?f in t:Object.hasOwn(t,f))||!m&&(n?tt(t,f):Object.getOwnPropertyDescriptor(t,f))?.enumerable===!1||(i[f]=O(t[f]))}),i}function tt(t,e){let r=t;for(;r!==null;){let n=Object.getOwnPropertyDescriptor(r,e);if(n)return n;r=Object.getPrototypeOf(r)}}function Fe(t,e){if(!d(t))return{};let r=O(t),n=y(e),o=Object.keys(r).filter(m=>!n.includes(m));return G(r,o)}function ze(t,e){return(!u(t)||t<=0)&&s("generateRandomArray","num \u5FC5\u987B\u5927\u4E8E0"),$(e)||s("generateRandomArray","cb \u5FC5\u987B\u662F\u51FD\u6570"),Array.from({length:t}).fill(0).map((r,n)=>e(r,n))}function He(){return`#${Math.random().toString(16).slice(2,8).padEnd(6,"0")}`}import x,{extend as nt}from"dayjs";import ot from"dayjs/plugin/customParseFormat";function p(t){return t[Math.floor(Math.random()*t.length)]}function a(t={}){u(t)&&(t={max:t});let{min:e=1,max:r=p(rt())}=t;et(e,r);let n=Math.ceil(e),o=Math.floor(r);return Math.floor(Math.random()*(o-n+1)+n)}function et(t,e){let r=Math.ceil(t),n=Math.floor(e);Number.isSafeInteger(r)||s("getRandomInt",`The minimum value Math.ceil(${t}) should be a safe integer`),Number.isSafeInteger(n)||s("getRandomInt",`The maximum value Math.floor(${e}) should be a safe integer`),n<r&&(e>=t&&s("getRandomInt",`No integer value found between ${t} and ${e}`),s("getRandomInt",`The maximum value ${e} should be greater than the minimum value ${t}`))}function rt(){return Array.from({length:Number.MAX_SAFE_INTEGER.toString().length}).map((t,e)=>{let r=Number.MAX_SAFE_INTEGER.toString().slice(0,e+1);return Number(r)})}nt(ot);function T(t={}){let{start:e="1800-01-01 00:00:00",end:r=x().format("YYYY-MM-DD HH:mm:ss"),format:n="YYYY-MM-DD HH:mm:ss"}=t;(!x(e).isValid()||!x(r).isValid())&&s("generateRandomDate","start end \u53C2\u6570\u5FC5\u987B\u662F\u5408\u6CD5\u7684\u65F6\u95F4\u683C\u5F0F");let o=x(e).year(),m=x(r).year(),i=a({min:o,max:m}),c=a({min:1,max:12}),f=a({min:1,max:31}),D=a(23),P=a(59),q=a(59),j=x(`${i}-${c}-${f} ${D}:${P}:${q}`);return j.isBefore(x(e))||j.isAfter(x(r))?T(t):j.format(n)}function l(t={}){let e=st(t),r=at(e);mt(r);let{length:n}=e;ct(n.min,n.max);let o=a(n),m=e.prefix||"";for(let i=0;i<o;i++)m+=r.charAt(Math.floor(Math.random()*r.length));return m+(e.suffix||"")}var it=16,E=1;function st(t){let e=u(t);return{lowerCase:!0,upperCase:!0,number:!0,...e?{}:t,length:e?{max:t,min:t}:u(t.length)?{max:t.length,min:t.length}:{max:it,min:E,...t.length},extra:e?[]:[...new Set(y(t.extra||[]))]}}function at(t){let e="";return t.lowerCase&&(e+="abcdefghijklmnopqrstuvwxyz"),t.upperCase&&(e+="ABCDEFGHIJKLMNOPQRSTUVWXYZ"),t.number&&(e+="0123456789"),e+=y(t.extra).join(""),e}function mt(t){t.length===0&&s("getRandomString","At least one character set (lowercase, uppercase, number) must be enabled or extra characters provided")}function ct(t,e){Number.isInteger(t)||s("getRandomString","min must be an integer"),Number.isInteger(e)||s("getRandomString","max must be an integer"),t<E&&s("getRandomString",`Minimum length cannot be less than ${E}`),e<t&&s("getRandomString","Maximum length cannot be less than minimum length")}function pt(){let t=["gmail.com","outlook.com.cn","example.com","qq.com","163.com","test.com.cn"],e=`${l(1)}${l({length:a({max:30,min:1})})}${l(1)}@${p(t)}`;return/\.{2,}/.test(e)?pt():e}function gr(t={}){u(t)&&(t={max:t});let{min:e=0,max:r=1,fractionDigits:n=2}=t;if(e===r)return e;if(e>r)throw new Error(`\u6700\u5927\u503C ${r} \u5E94\u5927\u4E8E\u6700\u5C0F\u503C ${e}`);return Math.random()*(r-e)+e}function k(t,e){(!u(t)||t<=0)&&s("generateRandomStringFromSource","num \u5FC5\u987B\u5927\u4E8E0"),(!g(e)||e.length===0)&&s("generateRandomStringFromSource","source \u4E0D\u80FD\u4E3A\u7A7A\u6570\u7EC4");let r="";for(let n=0;n<t;n++)r+=p(e);return r}function $r(){let t=a({min:1e5,max:999999}),e=[0,1,2,3,4,5,6,7,8,9];return[t,T({format:"YYYYMMDD"}),k(3,e),k(1,[...e,"X","x"])].join("")}function Mr(){return p(["13","14","15","16","17","18","19"])+a(999999999).toString().padEnd(9,"0")}function Dr(){let t=["http://","https://"],e=[".com",".net",".org",".cn",".top"],r=[`?name=${l({length:{min:4,max:8}})}`,`?id=${a()}`,`?page=${l({length:{min:2,max:4}})}`,`?query=${l({length:{min:5,max:6}})}`,`?search=${l({length:{min:1,max:4}})}`,`?token=${l({length:{min:16,max:16}})}`];return`${p(t)}${l({length:{min:5,max:25}})}${p(e)}${p(r)}`}function Gr(t){return/^\d+$/.test(t)}function qr(t){return/^[A-Z]+$/i.test(t)}function Br(t){return/^[A-Z]+$/.test(t)}function Vr(t){return/^[\dA-Z]+$/.test(t)}function Xr(t){return/^[\dA-Z\u4E00-\u9FA5]+$/.test(t)}function Qr(t){return/^[a-z]+$/.test(t)}function Jr(t){return/^[\da-z]+$/.test(t)}function tn(t){return/^[\da-z\u4E00-\u9FA5]+$/.test(t)}function en(t){return/^[\u4E00-\u9FA5]+$/.test(t)}function nn(t){return/^-?(?:0|[1-9]\d*)\.\d+$/.test(t)}function on(t){return/^(?:0\.0*[1-9]\d*|[1-9]\d*\.\d+)$/.test(t)}function sn(t){return/^(?:0|[1-9]\d*)\.\d+$/.test(t)}function an(t){return/^-(?:0\.0*[1-9]\d*|[1-9]\d*\.\d+)$/.test(t)}function mn(t){return/^-(?:0|[1-9]\d*)\.\d+$/.test(t)}function pn(t){return/^-?(?:0|[1-9]\d*)$/.test(t)}function fn(t){return/^[1-9]\d*$/.test(t)}function un(t){return/^(?:0|[1-9]\d*)$/.test(t)&&!Object.is(t,-0)}function gn(t){return/^-[1-9]\d*$/.test(t)}function ln(t){return/^-(?:0|[1-9]\d*)$/.test(t)||Object.is(t,-0)}import ft,{extend as ut}from"dayjs";import gt from"dayjs/plugin/customParseFormat";function yn(t){return/^1[3-9]\d{9}$/.test(t)}function hn(t){return/^https?:\/\/\S+$/i.test(t)}function On(t){return/^[^\s@]+@[^\s@][^\s.@]*\.[^\s@]+$/.test(t)}function wn(t){return t===""}function lt(t,e="YYYY-MM-DD HH:mm:ss"){return ut(gt),ft(t,e,!0).isValid()}function $n(t){return/^[1-9]\d{5}(?:18|19|20)\d{2}(?:0[1-9]|1[0-2])(?:0[1-9]|[12]\d|3[01])\d{3}[\dX]$/i.test(t)&<(t.slice(6,14),"YYYYMMDD")}export{Yt as base64Decode,vt as base64Encode,y as castArray,_t as compose,Kt as composeRight,zt as debounce,W as debugWarn,te as debugWarnInvalidTypeMessage,Ft as decimalToBinary,O as deepClone,L as deepMerge,H as deprecated,Qt as error,ze as generateRandomArray,He as generateRandomColor,T as generateRandomDate,pt as generateRandomEmail,gr as generateRandomFloat,$r as generateRandomIdCard,Mr as generateRandomMobilePhone,k as generateRandomStringFromSource,a as getRandomInt,p as getRandomItem,l as getRandomString,Dr as getRandomUrl,At as hasChanged,g as isArray,ht as isBoolean,en as isChineseString,v as isDate,lt as isDateString,$t as isDef,On as isEmail,wn as isEmptyString,qr as isEnglishAphabet,nn as isFloat,$ as isFunction,$n as isIdCard,pn as isInteger,Qr as isLowerCase,Jr as isLowerCaseAndNumber,tn as isLowerCaseAndNumberAndChinese,C as isMap,yn as isMobilePhone,an as isNegativeFloat,gn as isNegativeInteger,sn as isNonNegativeFloat,un as isNonNegativeInteger,mn as isNonPositiveFloat,ln as isNonPositiveInteger,Ot as isNull,u as isNumber,Gr as isNumberOrNumberString,dt as isObject,w as isObjectLike,d as isPlainObject,on as isPositiveFloat,fn as isPositiveInteger,U as isPromise,Y as isRegExp,F as isSet,I as isString,N as isSymbol,h as isUndef,wt as isUndefined,Br as isUpperCase,Vr as isUpperCaseAndNumber,Xr as isUpperCaseAndNumberAndChinese,hn as isUrl,R as log,B as objectToString,Fe as omit,G as pick,oe as qs,ae as throttle,s as throwError,Jt as throwErrorInvalidTypeMessage,b as toTypeString,M as toTypeValue,ue as validatorChineseOrEnglish,fe as validatorChineseOrEnglishOrNumber,de as validatorEmail,ge as validatorUppercaseOrNumbersOrSpecial,le as validatorUppercaseOrNumbersOrUnderline,Xt as warn};
|
|
2
|
+
function dt(t){let e=typeof t;return t!==null&&(e==="object"||e==="function")}function w(t){return t!==null&&typeof t=="object"}var q=Object.prototype.toString,b=t=>q.call(t),M=t=>b(t).slice(8,-1),I=t=>typeof t=="string",u=t=>typeof t=="number"&&Number.isFinite(t),yt=t=>typeof t=="boolean",ht=t=>t===null,Ot=t=>t===void 0,N=t=>typeof t=="symbol",g=Array.isArray,$=t=>typeof t=="function",C=t=>b(t)==="[object Map]",F=t=>b(t)==="[object Set]",Y=t=>b(t)==="[object Date]",v=t=>b(t)==="[object RegExp]",U=t=>w(t)&&$(t?.then)&&$(t?.catch),h=t=>t==null,wt=t=>t!=null,$t=(t,e)=>t!==e;function l(t){return b(t)==="[object Object]"}function y(t){return g(t)?t:[t]}function Ct(t){let e=[],n,r="";for(;t>0;)n=Math.floor(t%2),e.push(n),t=Math.floor(t/2);for(;e.length>0;)r+=e.pop().toString();return r}var _="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function Ft(t){let e="",n="";for(let o=0;o<t.length;o++)n+=t[o].charCodeAt(0).toString(2).padStart(8,"0");for(let o=0;o<n.length;o+=6)e+=_[parseInt(n.slice(o,o+6).padEnd(6,"0"),2)];let r=e.length%4;return r!==0&&(e+="=".repeat(4-r)),e}function Yt(t){let e="",n="";for(let r=0;r<t.length&&t[r]!=="=";r++)n+=_.indexOf(t[r]).toString(2).padStart(6,"0");for(let r=0;r<n.length;r+=8){let o=parseInt(n.slice(r,r+8),2);o&&(e+=String.fromCharCode(o))}return e}function Ut(...t){return t.reduce((e,n)=>function(...r){return n(e(...r))})}function _t(...t){return t.reduce((e,n)=>function(...r){return e(n(...r))})}function Lt(t,e=500){let n=null;return function(...r){n&&clearTimeout(n),n=setTimeout(()=>{t.apply(this,r)},e)}}function O(t){let e=new WeakMap;function n(r){if(!w(r))return r;if(Y(r))return new Date(r);if(v(r))return new RegExp(r);if(U(r))return r;if(e.has(r))return e.get(r);if(C(r)){let i=new Map;return e.set(r,i),r.forEach((c,f)=>i.set(n(f),n(c))),i}if(F(r)){let i=new Set;return e.set(r,i),r.forEach(c=>i.add(n(c))),i}let o=g(r)?Object.setPrototypeOf([],Object.getPrototypeOf(r)):Object.create(Object.getPrototypeOf(r));e.set(r,o);let m=Object.getOwnPropertyDescriptors(r);for(let i of Reflect.ownKeys(m)){let c=m[i];c.get||c.set?Object.defineProperty(o,i,c):Object.defineProperty(o,i,{...c,value:n(c.value)})}return o}return n(t)}function L(t,e,n={}){return z(K(t,n),K(e,n),n)}function z(t,e,n){return g(t)?V(t,e,n):B(t,e,n)}function B(t,e,n){if(!l(e))return e;let r=Object.getOwnPropertyDescriptors(e);return Reflect.ownKeys(e).forEach(o=>{(l(t[o])||g(t[o]))&&(l(e[o])||g(e[o]))?t[o]=z(t[o],e[o],n):Object.defineProperty(t,o,r[o])}),t}function V(t,e,n){let{mergeStrategy:r="replace"}=n;if(g(e))switch(r){case"merge":return t.concat(e);case"replace":return e;default:return e}return e}function K(t,e){let{deepClone:n=!0}=e;return n?O(t):t}var A=class extends Error{constructor(e,n="Utils"){super(e),this.name=n}};function s(t,e){throw new A(`[${t}] ${e}`)}function W(t,e){let n=I(t)?new A(`[${t}] ${e}`,"UtilsWarn"):t;console.warn(n)}function Vt(...t){console.warn(...t)}function Xt(...t){console.error(...t)}var Qt=({from:t,replacement:e,version:n,type:r="API"})=>{W(`${r}`,`${t} is about to be deprecated in version ${n}, please use ${e} instead.`)};function Jt(t,e,n,r){let o=`Invalid params: type check failed for params "${e}". Expected ${n}, got ${M(r)} with value ${r}.`;s(t,o)}function te(t,e,n,r){let o=`Invalid params: type check failed for params "${e}". Expected ${n}, got ${M(r)} with value ${r}.`;W(t,o)}var S=(t,e,...n)=>{if(!e)return;let r=n.length===0?"":n.length===1?n[0]:n;console[t](`[Log] ${e}:`,r)},R=(t,...e)=>{S("info",t,...e)};R.info=(t,...e)=>{S("info",t,...e)};R.error=(t,...e)=>{S("error",t,...e)};R.warn=(t,...e)=>{S("warn",t,...e)};function X(t,e){let{decode:n=!0}=e||{},r={};t.startsWith("?")&&(t=t.slice(1)),t.includes("?")&&(t=t.slice(t.indexOf("?")+1));let o=t.split("&").filter(Boolean);for(let m of o){let[i,c]=m.split("=");r[i]=n?decodeURIComponent(c):c}return r}function H(t,e){let{encode:n=!0}=e||{},r=[];for(let o in t){let m=t[o];r.push(`${o}=${n?encodeURIComponent(m):m}`)}return r.join("&")}function Q(t,e,n){let r=L({encode:!0},{...n}),o=H(e,r);return t.includes("?")?t.endsWith("?")||t.endsWith("&")?`${t}${o}`:`${t}&${o}`:`${t}?${o}`}var oe={parse:X,stringify:H,appendQueryString:Q};function ae(t,e=500){let n=null;return function(...r){if(h(n))return n=Date.now(),t.apply(this,r);let o=Date.now();if(o-n>=e)return n=o,t.apply(this,r)}}function pe(t){return!h(t)&&/^[\dA-Z\u4E00-\u9FA5]+$/i.test(t)}function fe(t){return!h(t)&&/^[A-Z\u4E00-\u9FA5]+$/i.test(t)}function ue(t){return!h(t)&&/^[\d!"#$%&'()*+,./:;<=>?@A-Z[\\\]^_`{|}~]+$/.test(t)}function ge(t){return/^[\dA-Z_]+$/.test(t)}function Z(t,e,n={}){let{includeProto:r=!1,includeSymbols:o=!0,includeNonEnum:m=!1}=n,i={};return l(t)&&y(e).forEach(f=>{N(f)&&!o||!(r?f in t:Object.hasOwn(t,f))||!m&&(r?J(t,f):Object.getOwnPropertyDescriptor(t,f))?.enumerable===!1||(i[f]=O(t[f]))}),i}function J(t,e){let n=t;for(;n!==null;){let r=Object.getOwnPropertyDescriptor(n,e);if(r)return r;n=Object.getPrototypeOf(n)}}function Ne(t,e){if(!l(t))return{};let n=O(t),r=y(e),o=Object.keys(n).filter(m=>!r.includes(m));return Z(n,o)}function Ke(t,e){return(!u(t)||t<=0)&&s("generateRandomArray","num \u5FC5\u987B\u5927\u4E8E0"),$(e)||s("generateRandomArray","cb \u5FC5\u987B\u662F\u51FD\u6570"),Array.from({length:t}).fill(0).map((n,r)=>e(n,r))}function ze(){return`#${Math.random().toString(16).slice(2,8).padEnd(6,"0")}`}import x,{extend as nt}from"dayjs";import rt from"dayjs/plugin/customParseFormat";function p(t){return t[Math.floor(Math.random()*t.length)]}function a(t={}){u(t)&&(t={max:t});let{min:e=1,max:n=p(et())}=t;tt(e,n);let r=Math.ceil(e),o=Math.floor(n);return Math.floor(Math.random()*(o-r+1)+r)}function tt(t,e){let n=Math.ceil(t),r=Math.floor(e);Number.isSafeInteger(n)||s("getRandomInt",`The minimum value Math.ceil(${t}) should be a safe integer`),Number.isSafeInteger(r)||s("getRandomInt",`The maximum value Math.floor(${e}) should be a safe integer`),r<n&&(e>=t&&s("getRandomInt",`No integer value found between ${t} and ${e}`),s("getRandomInt",`The maximum value ${e} should be greater than the minimum value ${t}`))}function et(){return Array.from({length:Number.MAX_SAFE_INTEGER.toString().length}).map((t,e)=>{let n=Number.MAX_SAFE_INTEGER.toString().slice(0,e+1);return Number(n)})}nt(rt);function T(t={}){let{start:e="1800-01-01 00:00:00",end:n=x().format("YYYY-MM-DD HH:mm:ss"),format:r="YYYY-MM-DD HH:mm:ss"}=t;(!x(e).isValid()||!x(n).isValid())&&s("generateRandomDate","start end \u53C2\u6570\u5FC5\u987B\u662F\u5408\u6CD5\u7684\u65F6\u95F4\u683C\u5F0F");let o=x(e).year(),m=x(n).year(),i=a({min:o,max:m}),c=a({min:1,max:12}),f=a({min:1,max:31}),D=a(23),P=a(59),G=a(59),j=x(`${i}-${c}-${f} ${D}:${P}:${G}`);return j.isBefore(x(e))||j.isAfter(x(n))?T(t):j.format(r)}function d(t={}){let e=it(t),n=st(e);at(n);let{length:r}=e;mt(r.min,r.max);let o=a(r),m=e.prefix||"";for(let i=0;i<o;i++)m+=n.charAt(Math.floor(Math.random()*n.length));return m+(e.suffix||"")}var ot=16,k=1;function it(t){let e=u(t);return{lowerCase:!0,upperCase:!0,number:!0,...e?{}:t,length:e?{max:t,min:t}:u(t.length)?{max:t.length,min:t.length}:{max:ot,min:k,...t.length},extra:e?[]:[...new Set(y(t.extra||[]))]}}function st(t){let e="";return t.lowerCase&&(e+="abcdefghijklmnopqrstuvwxyz"),t.upperCase&&(e+="ABCDEFGHIJKLMNOPQRSTUVWXYZ"),t.number&&(e+="0123456789"),e+=y(t.extra).join(""),e}function at(t){t.length===0&&s("getRandomString","At least one character set (lowercase, uppercase, number) must be enabled or extra characters provided")}function mt(t,e){Number.isInteger(t)||s("getRandomString","min must be an integer"),Number.isInteger(e)||s("getRandomString","max must be an integer"),t<k&&s("getRandomString",`Minimum length cannot be less than ${k}`),e<t&&s("getRandomString","Maximum length cannot be less than minimum length")}function ct(){let t=["gmail.com","outlook.com.cn","example.com","qq.com","163.com","test.com.cn"],e=`${d(1)}${d({length:a({max:30,min:1})})}${d(1)}@${p(t)}`;return/\.{2,}/.test(e)?ct():e}function un(t={}){u(t)&&(t={max:t});let{min:e=0,max:n=1,fractionDigits:r=2}=t;if(e===n)return e;if(e>n)throw new Error(`\u6700\u5927\u503C ${n} \u5E94\u5927\u4E8E\u6700\u5C0F\u503C ${e}`);return Math.random()*(n-e)+e}function E(t,e){(!u(t)||t<=0)&&s("generateRandomStringFromSource","num \u5FC5\u987B\u5927\u4E8E0"),(!g(e)||e.length===0)&&s("generateRandomStringFromSource","source \u4E0D\u80FD\u4E3A\u7A7A\u6570\u7EC4");let n="";for(let r=0;r<t;r++)n+=p(e);return n}function wn(){let t=a({min:1e5,max:999999}),e=[0,1,2,3,4,5,6,7,8,9];return[t,T({format:"YYYYMMDD"}),E(3,e),E(1,[...e,"X","x"])].join("")}function jn(){return p(["13","14","15","16","17","18","19"])+a(999999999).toString().padEnd(9,"0")}function En(){let t=["http://","https://"],e=[".com",".net",".org",".cn",".top"],n=[`?name=${d({length:{min:4,max:8}})}`,`?id=${a()}`,`?page=${d({length:{min:2,max:4}})}`,`?query=${d({length:{min:5,max:6}})}`,`?search=${d({length:{min:1,max:4}})}`,`?token=${d({length:{min:16,max:16}})}`];return`${p(t)}${d({length:{min:5,max:25}})}${p(e)}${p(n)}`}function Zn(t){return/^\d+$/.test(t)}function Gn(t){return/^[A-Z]+$/i.test(t)}function qn(t){return/^[A-Z]+$/.test(t)}function Bn(t){return/^[\dA-Z]+$/.test(t)}function Vn(t){return/^[\dA-Z\u4E00-\u9FA5]+$/.test(t)}function Xn(t){return/^[a-z]+$/.test(t)}function Qn(t){return/^[\da-z]+$/.test(t)}function Jn(t){return/^[\da-z\u4E00-\u9FA5]+$/.test(t)}function tr(t){return/^[\u4E00-\u9FA5]+$/.test(t)}function nr(t){return/^-?(?:0|[1-9]\d*)\.\d+$/.test(t)}function rr(t){return/^(?:0\.0*[1-9]\d*|[1-9]\d*\.\d+)$/.test(t)}function or(t){return/^(?:0|[1-9]\d*)\.\d+$/.test(t)}function ir(t){return/^-(?:0\.0*[1-9]\d*|[1-9]\d*\.\d+)$/.test(t)}function sr(t){return/^-(?:0|[1-9]\d*)\.\d+$/.test(t)}function mr(t){return/^-?(?:0|[1-9]\d*)$/.test(t)}function cr(t){return/^[1-9]\d*$/.test(t)}function pr(t){return/^(?:0|[1-9]\d*)$/.test(t)&&!Object.is(t,-0)}function fr(t){return/^-[1-9]\d*$/.test(t)}function ur(t){return/^-(?:0|[1-9]\d*)$/.test(t)||Object.is(t,-0)}import pt,{extend as ft}from"dayjs";import ut from"dayjs/plugin/customParseFormat";function xr(t){return/^1[3-9]\d{9}$/.test(t)}function br(t){return/^https?:\/\/\S+$/i.test(t)}function yr(t){return/^[^\s@]+@[^\s@][^\s.@]*\.[^\s@]+$/.test(t)}function hr(t){return t===""}function gt(t,e="YYYY-MM-DD HH:mm:ss"){return ft(ut),pt(t,e,!0).isValid()}function Or(t){return/^[1-9]\d{5}(?:18|19|20)\d{2}(?:0[1-9]|1[0-2])(?:0[1-9]|[12]\d|3[01])\d{3}[\dX]$/i.test(t)&>(t.slice(6,14),"YYYYMMDD")}export{Yt as base64Decode,Ft as base64Encode,y as castArray,Ut as compose,_t as composeRight,Lt as debounce,W as debugWarn,te as debugWarnInvalidTypeMessage,Ct as decimalToBinary,O as deepClone,L as deepMerge,Qt as deprecated,Xt as error,Ke as generateRandomArray,ze as generateRandomColor,T as generateRandomDate,ct as generateRandomEmail,un as generateRandomFloat,wn as generateRandomIdCard,jn as generateRandomMobilePhone,E as generateRandomStringFromSource,a as getRandomInt,p as getRandomItem,d as getRandomString,En as getRandomUrl,$t as hasChanged,g as isArray,yt as isBoolean,tr as isChineseString,Y as isDate,gt as isDateString,wt as isDef,yr as isEmail,hr as isEmptyString,Gn as isEnglishAphabet,nr as isFloat,$ as isFunction,Or as isIdCard,mr as isInteger,Xn as isLowerCase,Qn as isLowerCaseAndNumber,Jn as isLowerCaseAndNumberAndChinese,C as isMap,xr as isMobilePhone,ir as isNegativeFloat,fr as isNegativeInteger,or as isNonNegativeFloat,pr as isNonNegativeInteger,sr as isNonPositiveFloat,ur as isNonPositiveInteger,ht as isNull,u as isNumber,Zn as isNumberOrNumberString,dt as isObject,w as isObjectLike,l as isPlainObject,rr as isPositiveFloat,cr as isPositiveInteger,U as isPromise,v as isRegExp,F as isSet,I as isString,N as isSymbol,h as isUndef,Ot as isUndefined,qn as isUpperCase,Bn as isUpperCaseAndNumber,Vn as isUpperCaseAndNumberAndChinese,br as isUrl,R as log,q as objectToString,Ne as omit,Z as pick,oe as qs,ae as throttle,s as throwError,Jt as throwErrorInvalidTypeMessage,b as toTypeString,M as toTypeValue,fe as validatorChineseOrEnglish,pe as validatorChineseOrEnglishOrNumber,ue as validatorUppercaseOrNumbersOrSpecial,ge as validatorUppercaseOrNumbersOrUnderline,Vt as warn};
|
package/dist/utils.global.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var lntvowUtils=(()=>{var Jt=Object.create;var ft=Object.defineProperty;var Qt=Object.getOwnPropertyDescriptor;var te=Object.getOwnPropertyNames;var ee=Object.getPrototypeOf,ne=Object.prototype.hasOwnProperty;var Ht=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),re=(t,e)=>{for(var n in e)ft(t,n,{get:e[n],enumerable:!0})},Ut=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of te(e))!ne.call(t,i)&&i!==n&&ft(t,i,{get:()=>e[i],enumerable:!(r=Qt(e,i))||r.enumerable});return t};var mt=(t,e,n)=>(n=t!=null?Jt(ee(t)):{},Ut(e||!t||!t.__esModule?ft(n,"default",{value:t,enumerable:!0}):n,t)),oe=t=>Ut(ft({},"__esModule",{value:!0}),t);var Pt=Ht((Ct,It)=>{"use strict";(function(t,e){typeof Ct=="object"&&typeof It<"u"?It.exports=e():typeof define=="function"&&define.amd?define(e):(t=typeof globalThis<"u"?globalThis:t||self).dayjs=e()})(Ct,function(){"use strict";var t=1e3,e=6e4,n=36e5,r="millisecond",i="second",y="minute",l="hour",b="day",h="week",T="month",X="quarter",I="year",L="date",at="Invalid Date",p=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,x=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,O={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(c){var s=["th","st","nd","rd"],o=c%100;return"["+c+(s[(o-20)%10]||s[o]||s[0])+"]"}},M=function(c,s,o){var u=String(c);return!u||u.length>=s?c:""+Array(s+1-u.length).join(o)+c},W={s:M,z:function(c){var s=-c.utcOffset(),o=Math.abs(s),u=Math.floor(o/60),a=o%60;return(s<=0?"+":"-")+M(u,2,"0")+":"+M(a,2,"0")},m:function c(s,o){if(s.date()<o.date())return-c(o,s);var u=12*(o.year()-s.year())+(o.month()-s.month()),a=s.clone().add(u,T),f=o-a<0,m=s.clone().add(u+(f?-1:1),T);return+(-(u+(o-a)/(f?a-m:m-a))||0)},a:function(c){return c<0?Math.ceil(c)||0:Math.floor(c)},p:function(c){return{M:T,y:I,w:h,d:b,D:L,h:l,m:y,s:i,ms:r,Q:X}[c]||String(c||"").toLowerCase().replace(/s$/,"")},u:function(c){return c===void 0}},j="en",P={};P[j]=O;var K="$isDayjsObject",N=function(c){return c instanceof Y||!(!c||!c[K])},R=function c(s,o,u){var a;if(!s)return j;if(typeof s=="string"){var f=s.toLowerCase();P[f]&&(a=f),o&&(P[f]=o,a=f);var m=s.split("-");if(!a&&m.length>1)return c(m[0])}else{var d=s.name;P[d]=s,a=d}return!u&&a&&(j=a),a||!u&&j},$=function(c,s){if(N(c))return c.clone();var o=typeof s=="object"?s:{};return o.date=c,o.args=arguments,new Y(o)},g=W;g.l=R,g.i=N,g.w=function(c,s){return $(c,{locale:s.$L,utc:s.$u,x:s.$x,$offset:s.$offset})};var Y=function(){function c(o){this.$L=R(o.locale,null,!0),this.parse(o),this.$x=this.$x||o.x||{},this[K]=!0}var s=c.prototype;return s.parse=function(o){this.$d=function(u){var a=u.date,f=u.utc;if(a===null)return new Date(NaN);if(g.u(a))return new Date;if(a instanceof Date)return new Date(a);if(typeof a=="string"&&!/Z$/i.test(a)){var m=a.match(p);if(m){var d=m[2]-1||0,w=(m[7]||"0").substring(0,3);return f?new Date(Date.UTC(m[1],d,m[3]||1,m[4]||0,m[5]||0,m[6]||0,w)):new Date(m[1],d,m[3]||1,m[4]||0,m[5]||0,m[6]||0,w)}}return new Date(a)}(o),this.init()},s.init=function(){var o=this.$d;this.$y=o.getFullYear(),this.$M=o.getMonth(),this.$D=o.getDate(),this.$W=o.getDay(),this.$H=o.getHours(),this.$m=o.getMinutes(),this.$s=o.getSeconds(),this.$ms=o.getMilliseconds()},s.$utils=function(){return g},s.isValid=function(){return this.$d.toString()!==at},s.isSame=function(o,u){var a=$(o);return this.startOf(u)<=a&&a<=this.endOf(u)},s.isAfter=function(o,u){return $(o)<this.startOf(u)},s.isBefore=function(o,u){return this.endOf(u)<$(o)},s.$g=function(o,u,a){return g.u(o)?this[u]:this.set(a,o)},s.unix=function(){return Math.floor(this.valueOf()/1e3)},s.valueOf=function(){return this.$d.getTime()},s.startOf=function(o,u){var a=this,f=!!g.u(u)||u,m=g.p(o),d=function(V,k){var F=g.w(a.$u?Date.UTC(a.$y,k,V):new Date(a.$y,k,V),a);return f?F:F.endOf(b)},w=function(V,k){return g.w(a.toDate()[V].apply(a.toDate("s"),(f?[0,0,0,0]:[23,59,59,999]).slice(k)),a)},S=this.$W,v=this.$M,C=this.$D,J="set"+(this.$u?"UTC":"");switch(m){case I:return f?d(1,0):d(31,11);case T:return f?d(1,v):d(0,v+1);case h:var q=this.$locale().weekStart||0,nt=(S<q?S+7:S)-q;return d(f?C-nt:C+(6-nt),v);case b:case L:return w(J+"Hours",0);case l:return w(J+"Minutes",1);case y:return w(J+"Seconds",2);case i:return w(J+"Milliseconds",3);default:return this.clone()}},s.endOf=function(o){return this.startOf(o,!1)},s.$set=function(o,u){var a,f=g.p(o),m="set"+(this.$u?"UTC":""),d=(a={},a[b]=m+"Date",a[L]=m+"Date",a[T]=m+"Month",a[I]=m+"FullYear",a[l]=m+"Hours",a[y]=m+"Minutes",a[i]=m+"Seconds",a[r]=m+"Milliseconds",a)[f],w=f===b?this.$D+(u-this.$W):u;if(f===T||f===I){var S=this.clone().set(L,1);S.$d[d](w),S.init(),this.$d=S.set(L,Math.min(this.$D,S.daysInMonth())).$d}else d&&this.$d[d](w);return this.init(),this},s.set=function(o,u){return this.clone().$set(o,u)},s.get=function(o){return this[g.p(o)]()},s.add=function(o,u){var a,f=this;o=Number(o);var m=g.p(u),d=function(v){var C=$(f);return g.w(C.date(C.date()+Math.round(v*o)),f)};if(m===T)return this.set(T,this.$M+o);if(m===I)return this.set(I,this.$y+o);if(m===b)return d(1);if(m===h)return d(7);var w=(a={},a[y]=e,a[l]=n,a[i]=t,a)[m]||1,S=this.$d.getTime()+o*w;return g.w(S,this)},s.subtract=function(o,u){return this.add(-1*o,u)},s.format=function(o){var u=this,a=this.$locale();if(!this.isValid())return a.invalidDate||at;var f=o||"YYYY-MM-DDTHH:mm:ssZ",m=g.z(this),d=this.$H,w=this.$m,S=this.$M,v=a.weekdays,C=a.months,J=a.meridiem,q=function(k,F,B,Q){return k&&(k[F]||k(u,f))||B[F].slice(0,Q)},nt=function(k){return g.s(d%12||12,k,"0")},V=J||function(k,F,B){var Q=k<12?"AM":"PM";return B?Q.toLowerCase():Q};return f.replace(x,function(k,F){return F||function(B){switch(B){case"YY":return String(u.$y).slice(-2);case"YYYY":return g.s(u.$y,4,"0");case"M":return S+1;case"MM":return g.s(S+1,2,"0");case"MMM":return q(a.monthsShort,S,C,3);case"MMMM":return q(C,S);case"D":return u.$D;case"DD":return g.s(u.$D,2,"0");case"d":return String(u.$W);case"dd":return q(a.weekdaysMin,u.$W,v,2);case"ddd":return q(a.weekdaysShort,u.$W,v,3);case"dddd":return v[u.$W];case"H":return String(d);case"HH":return g.s(d,2,"0");case"h":return nt(1);case"hh":return nt(2);case"a":return V(d,w,!0);case"A":return V(d,w,!1);case"m":return String(w);case"mm":return g.s(w,2,"0");case"s":return String(u.$s);case"ss":return g.s(u.$s,2,"0");case"SSS":return g.s(u.$ms,3,"0");case"Z":return m}return null}(k)||m.replace(":","")})},s.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},s.diff=function(o,u,a){var f,m=this,d=g.p(u),w=$(o),S=(w.utcOffset()-this.utcOffset())*e,v=this-w,C=function(){return g.m(m,w)};switch(d){case I:f=C()/12;break;case T:f=C();break;case X:f=C()/3;break;case h:f=(v-S)/6048e5;break;case b:f=(v-S)/864e5;break;case l:f=v/n;break;case y:f=v/e;break;case i:f=v/t;break;default:f=v}return a?f:g.a(f)},s.daysInMonth=function(){return this.endOf(T).$D},s.$locale=function(){return P[this.$L]},s.locale=function(o,u){if(!o)return this.$L;var a=this.clone(),f=R(o,u,!0);return f&&(a.$L=f),a},s.clone=function(){return g.w(this.$d,this)},s.toDate=function(){return new Date(this.valueOf())},s.toJSON=function(){return this.isValid()?this.toISOString():null},s.toISOString=function(){return this.$d.toISOString()},s.toString=function(){return this.$d.toUTCString()},c}(),E=Y.prototype;return $.prototype=E,[["$ms",r],["$s",i],["$m",y],["$H",l],["$W",b],["$M",T],["$y",I],["$D",L]].forEach(function(c){E[c[1]]=function(s){return this.$g(s,c[0],c[1])}}),$.extend=function(c,s){return c.$i||(c(s,Y,$),c.$i=!0),$},$.locale=R,$.isDayjs=N,$.unix=function(c){return $(1e3*c)},$.en=P[j],$.Ls=P,$.p={},$})});var Lt=Ht((Nt,_t)=>{"use strict";(function(t,e){typeof Nt=="object"&&typeof _t<"u"?_t.exports=e():typeof define=="function"&&define.amd?define(e):(t=typeof globalThis<"u"?globalThis:t||self).dayjs_plugin_customParseFormat=e()})(Nt,function(){"use strict";var t={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},e=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,n=/\d/,r=/\d\d/,i=/\d\d?/,y=/\d*[^-_:/,()\s\d]+/,l={},b=function(p){return(p=+p)+(p>68?1900:2e3)},h=function(p){return function(x){this[p]=+x}},T=[/[+-]\d\d:?(\d\d)?|Z/,function(p){(this.zone||(this.zone={})).offset=function(x){if(!x||x==="Z")return 0;var O=x.match(/([+-]|\d\d)/g),M=60*O[1]+(+O[2]||0);return M===0?0:O[0]==="+"?-M:M}(p)}],X=function(p){var x=l[p];return x&&(x.indexOf?x:x.s.concat(x.f))},I=function(p,x){var O,M=l.meridiem;if(M){for(var W=1;W<=24;W+=1)if(p.indexOf(M(W,0,x))>-1){O=W>12;break}}else O=p===(x?"pm":"PM");return O},L={A:[y,function(p){this.afternoon=I(p,!1)}],a:[y,function(p){this.afternoon=I(p,!0)}],Q:[n,function(p){this.month=3*(p-1)+1}],S:[n,function(p){this.milliseconds=100*+p}],SS:[r,function(p){this.milliseconds=10*+p}],SSS:[/\d{3}/,function(p){this.milliseconds=+p}],s:[i,h("seconds")],ss:[i,h("seconds")],m:[i,h("minutes")],mm:[i,h("minutes")],H:[i,h("hours")],h:[i,h("hours")],HH:[i,h("hours")],hh:[i,h("hours")],D:[i,h("day")],DD:[r,h("day")],Do:[y,function(p){var x=l.ordinal,O=p.match(/\d+/);if(this.day=O[0],x)for(var M=1;M<=31;M+=1)x(M).replace(/\[|\]/g,"")===p&&(this.day=M)}],w:[i,h("week")],ww:[r,h("week")],M:[i,h("month")],MM:[r,h("month")],MMM:[y,function(p){var x=X("months"),O=(X("monthsShort")||x.map(function(M){return M.slice(0,3)})).indexOf(p)+1;if(O<1)throw new Error;this.month=O%12||O}],MMMM:[y,function(p){var x=X("months").indexOf(p)+1;if(x<1)throw new Error;this.month=x%12||x}],Y:[/[+-]?\d+/,h("year")],YY:[r,function(p){this.year=b(p)}],YYYY:[/\d{4}/,h("year")],Z:T,ZZ:T};function at(p){var x,O;x=p,O=l&&l.formats;for(var M=(p=x.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function($,g,Y){var E=Y&&Y.toUpperCase();return g||O[Y]||t[Y]||O[E].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(c,s,o){return s||o.slice(1)})})).match(e),W=M.length,j=0;j<W;j+=1){var P=M[j],K=L[P],N=K&&K[0],R=K&&K[1];M[j]=R?{regex:N,parser:R}:P.replace(/^\[|\]$/g,"")}return function($){for(var g={},Y=0,E=0;Y<W;Y+=1){var c=M[Y];if(typeof c=="string")E+=c.length;else{var s=c.regex,o=c.parser,u=$.slice(E),a=s.exec(u)[0];o.call(g,a),$=$.replace(a,"")}}return function(f){var m=f.afternoon;if(m!==void 0){var d=f.hours;m?d<12&&(f.hours+=12):d===12&&(f.hours=0),delete f.afternoon}}(g),g}}return function(p,x,O){O.p.customParseFormat=!0,p&&p.parseTwoDigitYear&&(b=p.parseTwoDigitYear);var M=x.prototype,W=M.parse;M.parse=function(j){var P=j.date,K=j.utc,N=j.args;this.$u=K;var R=N[1];if(typeof R=="string"){var $=N[2]===!0,g=N[3]===!0,Y=$||g,E=N[2];g&&(E=N[2]),l=this.$locale(),!$&&E&&(l=O.Ls[E]),this.$d=function(u,a,f,m){try{if(["x","X"].indexOf(a)>-1)return new Date((a==="X"?1e3:1)*u);var d=at(a)(u),w=d.year,S=d.month,v=d.day,C=d.hours,J=d.minutes,q=d.seconds,nt=d.milliseconds,V=d.zone,k=d.week,F=new Date,B=v||(w||S?1:F.getDate()),Q=w||F.getFullYear(),ut=0;w&&!S||(ut=S>0?S-1:F.getMonth());var ct,bt=C||0,$t=J||0,Mt=q||0,wt=nt||0;return V?new Date(Date.UTC(Q,ut,B,bt,$t,Mt,wt+60*V.offset*1e3)):f?new Date(Date.UTC(Q,ut,B,bt,$t,Mt,wt)):(ct=new Date(Q,ut,B,bt,$t,Mt,wt),k&&(ct=m(ct).week(k).toDate()),ct)}catch{return new Date("")}}(P,R,K,O),this.init(),E&&E!==!0&&(this.$L=this.locale(E).$L),Y&&P!=this.format(R)&&(this.$d=new Date("")),l={}}else if(R instanceof Array)for(var c=R.length,s=1;s<=c;s+=1){N[1]=R[s-1];var o=O.apply(this,N);if(o.isValid()){this.$d=o.$d,this.$L=o.$L,this.init();break}s===c&&(this.$d=new Date(""))}else W.call(this,j)}}})});var yn={};re(yn,{base64Decode:()=>de,base64Encode:()=>pe,castArray:()=>et,compose:()=>le,composeRight:()=>ge,debounce:()=>he,debugWarn:()=>Yt,debugWarnInvalidTypeMessage:()=>we,decimalToBinary:()=>me,deepClone:()=>ot,deepMerge:()=>jt,deprecated:()=>Rt,error:()=>$e,generateRandomArray:()=>Ce,generateRandomColor:()=>Ie,generateRandomDate:()=>ht,generateRandomEmail:()=>qt,generateRandomFloat:()=>Ze,generateRandomIdCard:()=>We,generateRandomMobilePhone:()=>ze,generateRandomStringFromSource:()=>xt,getRandomInt:()=>A,getRandomItem:()=>_,getRandomString:()=>Z,getRandomUrl:()=>Ke,hasChanged:()=>fe,isArray:()=>U,isBoolean:()=>se,isChineseString:()=>en,isDate:()=>At,isDateString:()=>Gt,isDef:()=>ce,isEmail:()=>gn,isEmptyString:()=>hn,isEnglishAphabet:()=>Xe,isFloat:()=>nn,isFunction:()=>st,isIdCard:()=>xn,isInteger:()=>un,isLowerCase:()=>Je,isLowerCaseAndNumber:()=>Qe,isLowerCaseAndNumberAndChinese:()=>tn,isMap:()=>Dt,isMobilePhone:()=>dn,isNegativeFloat:()=>sn,isNegativeInteger:()=>mn,isNonNegativeFloat:()=>on,isNonNegativeInteger:()=>fn,isNonPositiveFloat:()=>an,isNonPositiveInteger:()=>pn,isNull:()=>ae,isNumber:()=>H,isNumberOrNumberString:()=>Ve,isObject:()=>ie,isObjectLike:()=>it,isPlainObject:()=>G,isPositiveFloat:()=>rn,isPositiveInteger:()=>cn,isPromise:()=>kt,isRegExp:()=>Tt,isSet:()=>vt,isString:()=>Ot,isSymbol:()=>St,isUndef:()=>rt,isUndefined:()=>ue,isUpperCase:()=>qe,isUpperCaseAndNumber:()=>Be,isUpperCaseAndNumberAndChinese:()=>Ge,isUrl:()=>ln,log:()=>gt,objectToString:()=>Zt,omit:()=>Ee,pick:()=>Et,qs:()=>De,throttle:()=>ve,throwError:()=>D,throwErrorInvalidTypeMessage:()=>Me,toTypeString:()=>tt,toTypeValue:()=>pt,validatorChineseOrEnglish:()=>Te,validatorChineseOrEnglishOrNumber:()=>Ae,validatorEmail:()=>Ye,validatorUppercaseOrNumbersOrSpecial:()=>ke,validatorUppercaseOrNumbersOrUnderline:()=>je,warn:()=>be});function ie(t){let e=typeof t;return t!==null&&(e==="object"||e==="function")}function it(t){return t!==null&&typeof t=="object"}var Zt=Object.prototype.toString,tt=t=>Zt.call(t),pt=t=>tt(t).slice(8,-1),Ot=t=>typeof t=="string",H=t=>typeof t=="number"&&Number.isFinite(t),se=t=>typeof t=="boolean",ae=t=>t===null,ue=t=>t===void 0,St=t=>typeof t=="symbol",U=Array.isArray,st=t=>typeof t=="function",Dt=t=>tt(t)==="[object Map]",vt=t=>tt(t)==="[object Set]",At=t=>tt(t)==="[object Date]",Tt=t=>tt(t)==="[object RegExp]",kt=t=>it(t)&&st(t?.then)&&st(t?.catch),rt=t=>t==null,ce=t=>t!=null,fe=(t,e)=>t!==e;function G(t){return tt(t)==="[object Object]"}function et(t){return U(t)?t:[t]}function me(t){let e=[],n,r="";for(;t>0;)n=Math.floor(t%2),e.push(n),t=Math.floor(t/2);for(;e.length>0;)r+=e.pop().toString();return r}var Wt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function pe(t){let e="",n="";for(let i=0;i<t.length;i++)n+=t[i].charCodeAt(0).toString(2).padStart(8,"0");for(let i=0;i<n.length;i+=6)e+=Wt[parseInt(n.slice(i,i+6).padEnd(6,"0"),2)];let r=e.length%4;return r!==0&&(e+="=".repeat(4-r)),e}function de(t){let e="",n="";for(let r=0;r<t.length&&t[r]!=="=";r++)n+=Wt.indexOf(t[r]).toString(2).padStart(6,"0");for(let r=0;r<n.length;r+=8){let i=parseInt(n.slice(r,r+8),2);i&&(e+=String.fromCharCode(i))}return e}function le(...t){return t.reduce((e,n)=>function(...r){return n(e(...r))})}function ge(...t){return t.reduce((e,n)=>function(...r){return e(n(...r))})}function he(t,e=500){let n=null;return function(...r){n&&clearTimeout(n),n=setTimeout(()=>{t.apply(this,r)},e)}}function ot(t){let e=new WeakMap;function n(r){if(!it(r))return r;if(At(r))return new Date(r);if(Tt(r))return new RegExp(r);if(kt(r))return r;if(e.has(r))return e.get(r);if(Dt(r)){let l=new Map;return e.set(r,l),r.forEach((b,h)=>l.set(n(h),n(b))),l}if(vt(r)){let l=new Set;return e.set(r,l),r.forEach(b=>l.add(n(b))),l}let i=U(r)?Object.setPrototypeOf([],Object.getPrototypeOf(r)):Object.create(Object.getPrototypeOf(r));e.set(r,i);let y=Object.getOwnPropertyDescriptors(r);for(let l of Reflect.ownKeys(y)){let b=y[l];b.get||b.set?Object.defineProperty(i,l,b):Object.defineProperty(i,l,{...b,value:n(b.value)})}return i}return n(t)}function jt(t,e,n={}){return Kt(zt(t,n),zt(e,n),n)}function Kt(t,e,n){return U(t)?ye(t,e,n):xe(t,e,n)}function xe(t,e,n){if(!G(e))return e;let r=Object.getOwnPropertyDescriptors(e);return Reflect.ownKeys(e).forEach(i=>{(G(t[i])||U(t[i]))&&(G(e[i])||U(e[i]))?t[i]=Kt(t[i],e[i],n):Object.defineProperty(t,i,r[i])}),t}function ye(t,e,n){let{mergeStrategy:r="replace"}=n;if(U(e))switch(r){case"merge":return t.concat(e);case"replace":return e;default:return e}return e}function zt(t,e){let{deepClone:n=!0}=e;return n?ot(t):t}var dt=class extends Error{constructor(e,n="Utils"){super(e),this.name=n}};function D(t,e){throw new dt(`[${t}] ${e}`)}function Yt(t,e){let n=Ot(t)?new dt(`[${t}] ${e}`,"UtilsWarn"):t;console.warn(n)}function be(...t){console.warn(...t)}function $e(...t){console.error(...t)}var Rt=({from:t,replacement:e,version:n,type:r="API"})=>{Yt(`${r}`,`${t} is about to be deprecated in version ${n}, please use ${e} instead.`)};function Me(t,e,n,r){let i=`Invalid params: type check failed for params "${e}". Expected ${n}, got ${pt(r)} with value ${r}.`;D(t,i)}function we(t,e,n,r){let i=`Invalid params: type check failed for params "${e}". Expected ${n}, got ${pt(r)} with value ${r}.`;Yt(t,i)}var lt=(t,e,...n)=>{if(!e)return;let r=n.length===0?"":n.length===1?n[0]:n;console[t](`[Log] ${e}:`,r)},gt=(t,...e)=>{lt("info",t,...e)};gt.info=(t,...e)=>{lt("info",t,...e)};gt.error=(t,...e)=>{lt("error",t,...e)};gt.warn=(t,...e)=>{lt("warn",t,...e)};function Oe(t,e){let{decode:n=!0}=e||{},r={};t.startsWith("?")&&(t=t.slice(1)),t.includes("?")&&(t=t.slice(t.indexOf("?")+1));let i=t.split("&").filter(Boolean);for(let y of i){let[l,b]=y.split("=");r[l]=n?decodeURIComponent(b):b}return r}function Vt(t,e){let{encode:n=!0}=e||{},r=[];for(let i in t){let y=t[i];r.push(`${i}=${n?encodeURIComponent(y):y}`)}return r.join("&")}function Se(t,e,n){let r=jt({encode:!0},{...n}),i=Vt(e,r);return t.includes("?")?t.endsWith("?")||t.endsWith("&")?`${t}${i}`:`${t}&${i}`:`${t}?${i}`}var De={parse:Oe,stringify:Vt,appendQueryString:Se};function ve(t,e=500){let n=null;return function(...r){if(rt(n))return n=Date.now(),t.apply(this,r);let i=Date.now();if(i-n>=e)return n=i,t.apply(this,r)}}function Ae(t){return!rt(t)&&/^[\dA-Z\u4E00-\u9FA5]+$/i.test(t)}function Te(t){return!rt(t)&&/^[A-Z\u4E00-\u9FA5]+$/i.test(t)}function ke(t){return!rt(t)&&/^[\d!"#$%&'()*+,./:;<=>?@A-Z[\\\]^_`{|}~]+$/.test(t)}function je(t){return/^[\dA-Z_]+$/.test(t)}function Ye(t){return Rt({from:"validatorEmail",replacement:"isEmail",version:"2.4.0"}),/^([\w-])+@([\w-])+(\.[\w-])+/.test(t)}function Et(t,e,n={}){let{includeProto:r=!1,includeSymbols:i=!0,includeNonEnum:y=!1}=n,l={};return G(t)&&et(e).forEach(h=>{St(h)&&!i||!(r?h in t:Object.hasOwn(t,h))||!y&&(r?Re(t,h):Object.getOwnPropertyDescriptor(t,h))?.enumerable===!1||(l[h]=ot(t[h]))}),l}function Re(t,e){let n=t;for(;n!==null;){let r=Object.getOwnPropertyDescriptor(n,e);if(r)return r;n=Object.getPrototypeOf(n)}}function Ee(t,e){if(!G(t))return{};let n=ot(t),r=et(e),i=Object.keys(n).filter(y=>!r.includes(y));return Et(n,i)}function Ce(t,e){return(!H(t)||t<=0)&&D("generateRandomArray","num \u5FC5\u987B\u5927\u4E8E0"),st(e)||D("generateRandomArray","cb \u5FC5\u987B\u662F\u51FD\u6570"),Array.from({length:t}).fill(0).map((n,r)=>e(n,r))}function Ie(){return`#${Math.random().toString(16).slice(2,8).padEnd(6,"0")}`}var z=mt(Pt(),1),Xt=mt(Lt(),1);function _(t){return t[Math.floor(Math.random()*t.length)]}function A(t={}){H(t)&&(t={max:t});let{min:e=1,max:n=_(Ne())}=t;Pe(e,n);let r=Math.ceil(e),i=Math.floor(n);return Math.floor(Math.random()*(i-r+1)+r)}function Pe(t,e){let n=Math.ceil(t),r=Math.floor(e);Number.isSafeInteger(n)||D("getRandomInt",`The minimum value Math.ceil(${t}) should be a safe integer`),Number.isSafeInteger(r)||D("getRandomInt",`The maximum value Math.floor(${e}) should be a safe integer`),r<n&&(e>=t&&D("getRandomInt",`No integer value found between ${t} and ${e}`),D("getRandomInt",`The maximum value ${e} should be greater than the minimum value ${t}`))}function Ne(){return Array.from({length:Number.MAX_SAFE_INTEGER.toString().length}).map((t,e)=>{let n=Number.MAX_SAFE_INTEGER.toString().slice(0,e+1);return Number(n)})}(0,z.extend)(Xt.default);function ht(t={}){let{start:e="1800-01-01 00:00:00",end:n=(0,z.default)().format("YYYY-MM-DD HH:mm:ss"),format:r="YYYY-MM-DD HH:mm:ss"}=t;(!(0,z.default)(e).isValid()||!(0,z.default)(n).isValid())&&D("generateRandomDate","start end \u53C2\u6570\u5FC5\u987B\u662F\u5408\u6CD5\u7684\u65F6\u95F4\u683C\u5F0F");let i=(0,z.default)(e).year(),y=(0,z.default)(n).year(),l=A({min:i,max:y}),b=A({min:1,max:12}),h=A({min:1,max:31}),T=A(23),X=A(59),I=A(59),L=(0,z.default)(`${l}-${b}-${h} ${T}:${X}:${I}`);return L.isBefore((0,z.default)(e))||L.isAfter((0,z.default)(n))?ht(t):L.format(r)}function Z(t={}){let e=Le(t),n=Fe(e);He(n);let{length:r}=e;Ue(r.min,r.max);let i=A(r),y=e.prefix||"";for(let l=0;l<i;l++)y+=n.charAt(Math.floor(Math.random()*n.length));return y+(e.suffix||"")}var _e=16,Ft=1;function Le(t){let e=H(t);return{lowerCase:!0,upperCase:!0,number:!0,...e?{}:t,length:e?{max:t,min:t}:H(t.length)?{max:t.length,min:t.length}:{max:_e,min:Ft,...t.length},extra:e?[]:[...new Set(et(t.extra||[]))]}}function Fe(t){let e="";return t.lowerCase&&(e+="abcdefghijklmnopqrstuvwxyz"),t.upperCase&&(e+="ABCDEFGHIJKLMNOPQRSTUVWXYZ"),t.number&&(e+="0123456789"),e+=et(t.extra).join(""),e}function He(t){t.length===0&&D("getRandomString","At least one character set (lowercase, uppercase, number) must be enabled or extra characters provided")}function Ue(t,e){Number.isInteger(t)||D("getRandomString","min must be an integer"),Number.isInteger(e)||D("getRandomString","max must be an integer"),t<Ft&&D("getRandomString",`Minimum length cannot be less than ${Ft}`),e<t&&D("getRandomString","Maximum length cannot be less than minimum length")}function qt(){let t=["gmail.com","outlook.com.cn","example.com","qq.com","163.com","test.com.cn"],e=`${Z(1)}${Z({length:A({max:30,min:1})})}${Z(1)}@${_(t)}`;return/\.{2,}/.test(e)?qt():e}function Ze(t={}){H(t)&&(t={max:t});let{min:e=0,max:n=1,fractionDigits:r=2}=t;if(e===n)return e;if(e>n)throw new Error(`\u6700\u5927\u503C ${n} \u5E94\u5927\u4E8E\u6700\u5C0F\u503C ${e}`);return Math.random()*(n-e)+e}function xt(t,e){(!H(t)||t<=0)&&D("generateRandomStringFromSource","num \u5FC5\u987B\u5927\u4E8E0"),(!U(e)||e.length===0)&&D("generateRandomStringFromSource","source \u4E0D\u80FD\u4E3A\u7A7A\u6570\u7EC4");let n="";for(let r=0;r<t;r++)n+=_(e);return n}function We(){let t=A({min:1e5,max:999999}),e=[0,1,2,3,4,5,6,7,8,9];return[t,ht({format:"YYYYMMDD"}),xt(3,e),xt(1,[...e,"X","x"])].join("")}function ze(){return _(["13","14","15","16","17","18","19"])+A(999999999).toString().padEnd(9,"0")}function Ke(){let t=["http://","https://"],e=[".com",".net",".org",".cn",".top"],n=[`?name=${Z({length:{min:4,max:8}})}`,`?id=${A()}`,`?page=${Z({length:{min:2,max:4}})}`,`?query=${Z({length:{min:5,max:6}})}`,`?search=${Z({length:{min:1,max:4}})}`,`?token=${Z({length:{min:16,max:16}})}`];return`${_(t)}${Z({length:{min:5,max:25}})}${_(e)}${_(n)}`}function Ve(t){return/^\d+$/.test(t)}function Xe(t){return/^[A-Z]+$/i.test(t)}function qe(t){return/^[A-Z]+$/.test(t)}function Be(t){return/^[\dA-Z]+$/.test(t)}function Ge(t){return/^[\dA-Z\u4E00-\u9FA5]+$/.test(t)}function Je(t){return/^[a-z]+$/.test(t)}function Qe(t){return/^[\da-z]+$/.test(t)}function tn(t){return/^[\da-z\u4E00-\u9FA5]+$/.test(t)}function en(t){return/^[\u4E00-\u9FA5]+$/.test(t)}function nn(t){return/^-?(?:0|[1-9]\d*)\.\d+$/.test(t)}function rn(t){return/^(?:0\.0*[1-9]\d*|[1-9]\d*\.\d+)$/.test(t)}function on(t){return/^(?:0|[1-9]\d*)\.\d+$/.test(t)}function sn(t){return/^-(?:0\.0*[1-9]\d*|[1-9]\d*\.\d+)$/.test(t)}function an(t){return/^-(?:0|[1-9]\d*)\.\d+$/.test(t)}function un(t){return/^-?(?:0|[1-9]\d*)$/.test(t)}function cn(t){return/^[1-9]\d*$/.test(t)}function fn(t){return/^(?:0|[1-9]\d*)$/.test(t)&&!Object.is(t,-0)}function mn(t){return/^-[1-9]\d*$/.test(t)}function pn(t){return/^-(?:0|[1-9]\d*)$/.test(t)||Object.is(t,-0)}var yt=mt(Pt(),1),Bt=mt(Lt(),1);function dn(t){return/^1[3-9]\d{9}$/.test(t)}function ln(t){return/^https?:\/\/\S+$/i.test(t)}function gn(t){return/^[^\s@]+@[^\s@][^\s.@]*\.[^\s@]+$/.test(t)}function hn(t){return t===""}function Gt(t,e="YYYY-MM-DD HH:mm:ss"){return(0,yt.extend)(Bt.default),(0,yt.default)(t,e,!0).isValid()}function xn(t){return/^[1-9]\d{5}(?:18|19|20)\d{2}(?:0[1-9]|1[0-2])(?:0[1-9]|[12]\d|3[01])\d{3}[\dX]$/i.test(t)&&Gt(t.slice(6,14),"YYYYMMDD")}return oe(yn);})();
|
|
1
|
+
"use strict";var lntvowUtils=(()=>{var Gt=Object.create;var ft=Object.defineProperty;var Jt=Object.getOwnPropertyDescriptor;var Qt=Object.getOwnPropertyNames;var te=Object.getPrototypeOf,ee=Object.prototype.hasOwnProperty;var Ft=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),ne=(t,e)=>{for(var n in e)ft(t,n,{get:e[n],enumerable:!0})},Ht=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Qt(e))!ee.call(t,i)&&i!==n&&ft(t,i,{get:()=>e[i],enumerable:!(r=Jt(e,i))||r.enumerable});return t};var mt=(t,e,n)=>(n=t!=null?Gt(te(t)):{},Ht(e||!t||!t.__esModule?ft(n,"default",{value:t,enumerable:!0}):n,t)),re=t=>Ht(ft({},"__esModule",{value:!0}),t);var It=Ft((Et,Ct)=>{"use strict";(function(t,e){typeof Et=="object"&&typeof Ct<"u"?Ct.exports=e():typeof define=="function"&&define.amd?define(e):(t=typeof globalThis<"u"?globalThis:t||self).dayjs=e()})(Et,function(){"use strict";var t=1e3,e=6e4,n=36e5,r="millisecond",i="second",y="minute",l="hour",b="day",h="week",T="month",X="quarter",I="year",L="date",at="Invalid Date",p=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,x=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,O={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(c){var s=["th","st","nd","rd"],o=c%100;return"["+c+(s[(o-20)%10]||s[o]||s[0])+"]"}},M=function(c,s,o){var u=String(c);return!u||u.length>=s?c:""+Array(s+1-u.length).join(o)+c},W={s:M,z:function(c){var s=-c.utcOffset(),o=Math.abs(s),u=Math.floor(o/60),a=o%60;return(s<=0?"+":"-")+M(u,2,"0")+":"+M(a,2,"0")},m:function c(s,o){if(s.date()<o.date())return-c(o,s);var u=12*(o.year()-s.year())+(o.month()-s.month()),a=s.clone().add(u,T),f=o-a<0,m=s.clone().add(u+(f?-1:1),T);return+(-(u+(o-a)/(f?a-m:m-a))||0)},a:function(c){return c<0?Math.ceil(c)||0:Math.floor(c)},p:function(c){return{M:T,y:I,w:h,d:b,D:L,h:l,m:y,s:i,ms:r,Q:X}[c]||String(c||"").toLowerCase().replace(/s$/,"")},u:function(c){return c===void 0}},j="en",P={};P[j]=O;var K="$isDayjsObject",N=function(c){return c instanceof Y||!(!c||!c[K])},R=function c(s,o,u){var a;if(!s)return j;if(typeof s=="string"){var f=s.toLowerCase();P[f]&&(a=f),o&&(P[f]=o,a=f);var m=s.split("-");if(!a&&m.length>1)return c(m[0])}else{var d=s.name;P[d]=s,a=d}return!u&&a&&(j=a),a||!u&&j},$=function(c,s){if(N(c))return c.clone();var o=typeof s=="object"?s:{};return o.date=c,o.args=arguments,new Y(o)},g=W;g.l=R,g.i=N,g.w=function(c,s){return $(c,{locale:s.$L,utc:s.$u,x:s.$x,$offset:s.$offset})};var Y=function(){function c(o){this.$L=R(o.locale,null,!0),this.parse(o),this.$x=this.$x||o.x||{},this[K]=!0}var s=c.prototype;return s.parse=function(o){this.$d=function(u){var a=u.date,f=u.utc;if(a===null)return new Date(NaN);if(g.u(a))return new Date;if(a instanceof Date)return new Date(a);if(typeof a=="string"&&!/Z$/i.test(a)){var m=a.match(p);if(m){var d=m[2]-1||0,w=(m[7]||"0").substring(0,3);return f?new Date(Date.UTC(m[1],d,m[3]||1,m[4]||0,m[5]||0,m[6]||0,w)):new Date(m[1],d,m[3]||1,m[4]||0,m[5]||0,m[6]||0,w)}}return new Date(a)}(o),this.init()},s.init=function(){var o=this.$d;this.$y=o.getFullYear(),this.$M=o.getMonth(),this.$D=o.getDate(),this.$W=o.getDay(),this.$H=o.getHours(),this.$m=o.getMinutes(),this.$s=o.getSeconds(),this.$ms=o.getMilliseconds()},s.$utils=function(){return g},s.isValid=function(){return this.$d.toString()!==at},s.isSame=function(o,u){var a=$(o);return this.startOf(u)<=a&&a<=this.endOf(u)},s.isAfter=function(o,u){return $(o)<this.startOf(u)},s.isBefore=function(o,u){return this.endOf(u)<$(o)},s.$g=function(o,u,a){return g.u(o)?this[u]:this.set(a,o)},s.unix=function(){return Math.floor(this.valueOf()/1e3)},s.valueOf=function(){return this.$d.getTime()},s.startOf=function(o,u){var a=this,f=!!g.u(u)||u,m=g.p(o),d=function(V,k){var F=g.w(a.$u?Date.UTC(a.$y,k,V):new Date(a.$y,k,V),a);return f?F:F.endOf(b)},w=function(V,k){return g.w(a.toDate()[V].apply(a.toDate("s"),(f?[0,0,0,0]:[23,59,59,999]).slice(k)),a)},S=this.$W,A=this.$M,C=this.$D,J="set"+(this.$u?"UTC":"");switch(m){case I:return f?d(1,0):d(31,11);case T:return f?d(1,A):d(0,A+1);case h:var q=this.$locale().weekStart||0,nt=(S<q?S+7:S)-q;return d(f?C-nt:C+(6-nt),A);case b:case L:return w(J+"Hours",0);case l:return w(J+"Minutes",1);case y:return w(J+"Seconds",2);case i:return w(J+"Milliseconds",3);default:return this.clone()}},s.endOf=function(o){return this.startOf(o,!1)},s.$set=function(o,u){var a,f=g.p(o),m="set"+(this.$u?"UTC":""),d=(a={},a[b]=m+"Date",a[L]=m+"Date",a[T]=m+"Month",a[I]=m+"FullYear",a[l]=m+"Hours",a[y]=m+"Minutes",a[i]=m+"Seconds",a[r]=m+"Milliseconds",a)[f],w=f===b?this.$D+(u-this.$W):u;if(f===T||f===I){var S=this.clone().set(L,1);S.$d[d](w),S.init(),this.$d=S.set(L,Math.min(this.$D,S.daysInMonth())).$d}else d&&this.$d[d](w);return this.init(),this},s.set=function(o,u){return this.clone().$set(o,u)},s.get=function(o){return this[g.p(o)]()},s.add=function(o,u){var a,f=this;o=Number(o);var m=g.p(u),d=function(A){var C=$(f);return g.w(C.date(C.date()+Math.round(A*o)),f)};if(m===T)return this.set(T,this.$M+o);if(m===I)return this.set(I,this.$y+o);if(m===b)return d(1);if(m===h)return d(7);var w=(a={},a[y]=e,a[l]=n,a[i]=t,a)[m]||1,S=this.$d.getTime()+o*w;return g.w(S,this)},s.subtract=function(o,u){return this.add(-1*o,u)},s.format=function(o){var u=this,a=this.$locale();if(!this.isValid())return a.invalidDate||at;var f=o||"YYYY-MM-DDTHH:mm:ssZ",m=g.z(this),d=this.$H,w=this.$m,S=this.$M,A=a.weekdays,C=a.months,J=a.meridiem,q=function(k,F,B,Q){return k&&(k[F]||k(u,f))||B[F].slice(0,Q)},nt=function(k){return g.s(d%12||12,k,"0")},V=J||function(k,F,B){var Q=k<12?"AM":"PM";return B?Q.toLowerCase():Q};return f.replace(x,function(k,F){return F||function(B){switch(B){case"YY":return String(u.$y).slice(-2);case"YYYY":return g.s(u.$y,4,"0");case"M":return S+1;case"MM":return g.s(S+1,2,"0");case"MMM":return q(a.monthsShort,S,C,3);case"MMMM":return q(C,S);case"D":return u.$D;case"DD":return g.s(u.$D,2,"0");case"d":return String(u.$W);case"dd":return q(a.weekdaysMin,u.$W,A,2);case"ddd":return q(a.weekdaysShort,u.$W,A,3);case"dddd":return A[u.$W];case"H":return String(d);case"HH":return g.s(d,2,"0");case"h":return nt(1);case"hh":return nt(2);case"a":return V(d,w,!0);case"A":return V(d,w,!1);case"m":return String(w);case"mm":return g.s(w,2,"0");case"s":return String(u.$s);case"ss":return g.s(u.$s,2,"0");case"SSS":return g.s(u.$ms,3,"0");case"Z":return m}return null}(k)||m.replace(":","")})},s.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},s.diff=function(o,u,a){var f,m=this,d=g.p(u),w=$(o),S=(w.utcOffset()-this.utcOffset())*e,A=this-w,C=function(){return g.m(m,w)};switch(d){case I:f=C()/12;break;case T:f=C();break;case X:f=C()/3;break;case h:f=(A-S)/6048e5;break;case b:f=(A-S)/864e5;break;case l:f=A/n;break;case y:f=A/e;break;case i:f=A/t;break;default:f=A}return a?f:g.a(f)},s.daysInMonth=function(){return this.endOf(T).$D},s.$locale=function(){return P[this.$L]},s.locale=function(o,u){if(!o)return this.$L;var a=this.clone(),f=R(o,u,!0);return f&&(a.$L=f),a},s.clone=function(){return g.w(this.$d,this)},s.toDate=function(){return new Date(this.valueOf())},s.toJSON=function(){return this.isValid()?this.toISOString():null},s.toISOString=function(){return this.$d.toISOString()},s.toString=function(){return this.$d.toUTCString()},c}(),E=Y.prototype;return $.prototype=E,[["$ms",r],["$s",i],["$m",y],["$H",l],["$W",b],["$M",T],["$y",I],["$D",L]].forEach(function(c){E[c[1]]=function(s){return this.$g(s,c[0],c[1])}}),$.extend=function(c,s){return c.$i||(c(s,Y,$),c.$i=!0),$},$.locale=R,$.isDayjs=N,$.unix=function(c){return $(1e3*c)},$.en=P[j],$.Ls=P,$.p={},$})});var _t=Ft((Pt,Nt)=>{"use strict";(function(t,e){typeof Pt=="object"&&typeof Nt<"u"?Nt.exports=e():typeof define=="function"&&define.amd?define(e):(t=typeof globalThis<"u"?globalThis:t||self).dayjs_plugin_customParseFormat=e()})(Pt,function(){"use strict";var t={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},e=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,n=/\d/,r=/\d\d/,i=/\d\d?/,y=/\d*[^-_:/,()\s\d]+/,l={},b=function(p){return(p=+p)+(p>68?1900:2e3)},h=function(p){return function(x){this[p]=+x}},T=[/[+-]\d\d:?(\d\d)?|Z/,function(p){(this.zone||(this.zone={})).offset=function(x){if(!x||x==="Z")return 0;var O=x.match(/([+-]|\d\d)/g),M=60*O[1]+(+O[2]||0);return M===0?0:O[0]==="+"?-M:M}(p)}],X=function(p){var x=l[p];return x&&(x.indexOf?x:x.s.concat(x.f))},I=function(p,x){var O,M=l.meridiem;if(M){for(var W=1;W<=24;W+=1)if(p.indexOf(M(W,0,x))>-1){O=W>12;break}}else O=p===(x?"pm":"PM");return O},L={A:[y,function(p){this.afternoon=I(p,!1)}],a:[y,function(p){this.afternoon=I(p,!0)}],Q:[n,function(p){this.month=3*(p-1)+1}],S:[n,function(p){this.milliseconds=100*+p}],SS:[r,function(p){this.milliseconds=10*+p}],SSS:[/\d{3}/,function(p){this.milliseconds=+p}],s:[i,h("seconds")],ss:[i,h("seconds")],m:[i,h("minutes")],mm:[i,h("minutes")],H:[i,h("hours")],h:[i,h("hours")],HH:[i,h("hours")],hh:[i,h("hours")],D:[i,h("day")],DD:[r,h("day")],Do:[y,function(p){var x=l.ordinal,O=p.match(/\d+/);if(this.day=O[0],x)for(var M=1;M<=31;M+=1)x(M).replace(/\[|\]/g,"")===p&&(this.day=M)}],w:[i,h("week")],ww:[r,h("week")],M:[i,h("month")],MM:[r,h("month")],MMM:[y,function(p){var x=X("months"),O=(X("monthsShort")||x.map(function(M){return M.slice(0,3)})).indexOf(p)+1;if(O<1)throw new Error;this.month=O%12||O}],MMMM:[y,function(p){var x=X("months").indexOf(p)+1;if(x<1)throw new Error;this.month=x%12||x}],Y:[/[+-]?\d+/,h("year")],YY:[r,function(p){this.year=b(p)}],YYYY:[/\d{4}/,h("year")],Z:T,ZZ:T};function at(p){var x,O;x=p,O=l&&l.formats;for(var M=(p=x.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function($,g,Y){var E=Y&&Y.toUpperCase();return g||O[Y]||t[Y]||O[E].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(c,s,o){return s||o.slice(1)})})).match(e),W=M.length,j=0;j<W;j+=1){var P=M[j],K=L[P],N=K&&K[0],R=K&&K[1];M[j]=R?{regex:N,parser:R}:P.replace(/^\[|\]$/g,"")}return function($){for(var g={},Y=0,E=0;Y<W;Y+=1){var c=M[Y];if(typeof c=="string")E+=c.length;else{var s=c.regex,o=c.parser,u=$.slice(E),a=s.exec(u)[0];o.call(g,a),$=$.replace(a,"")}}return function(f){var m=f.afternoon;if(m!==void 0){var d=f.hours;m?d<12&&(f.hours+=12):d===12&&(f.hours=0),delete f.afternoon}}(g),g}}return function(p,x,O){O.p.customParseFormat=!0,p&&p.parseTwoDigitYear&&(b=p.parseTwoDigitYear);var M=x.prototype,W=M.parse;M.parse=function(j){var P=j.date,K=j.utc,N=j.args;this.$u=K;var R=N[1];if(typeof R=="string"){var $=N[2]===!0,g=N[3]===!0,Y=$||g,E=N[2];g&&(E=N[2]),l=this.$locale(),!$&&E&&(l=O.Ls[E]),this.$d=function(u,a,f,m){try{if(["x","X"].indexOf(a)>-1)return new Date((a==="X"?1e3:1)*u);var d=at(a)(u),w=d.year,S=d.month,A=d.day,C=d.hours,J=d.minutes,q=d.seconds,nt=d.milliseconds,V=d.zone,k=d.week,F=new Date,B=A||(w||S?1:F.getDate()),Q=w||F.getFullYear(),ut=0;w&&!S||(ut=S>0?S-1:F.getMonth());var ct,bt=C||0,$t=J||0,Mt=q||0,wt=nt||0;return V?new Date(Date.UTC(Q,ut,B,bt,$t,Mt,wt+60*V.offset*1e3)):f?new Date(Date.UTC(Q,ut,B,bt,$t,Mt,wt)):(ct=new Date(Q,ut,B,bt,$t,Mt,wt),k&&(ct=m(ct).week(k).toDate()),ct)}catch{return new Date("")}}(P,R,K,O),this.init(),E&&E!==!0&&(this.$L=this.locale(E).$L),Y&&P!=this.format(R)&&(this.$d=new Date("")),l={}}else if(R instanceof Array)for(var c=R.length,s=1;s<=c;s+=1){N[1]=R[s-1];var o=O.apply(this,N);if(o.isValid()){this.$d=o.$d,this.$L=o.$L,this.init();break}s===c&&(this.$d=new Date(""))}else W.call(this,j)}}})});var xn={};ne(xn,{base64Decode:()=>pe,base64Encode:()=>me,castArray:()=>et,compose:()=>de,composeRight:()=>le,debounce:()=>ge,debugWarn:()=>Yt,debugWarnInvalidTypeMessage:()=>we,decimalToBinary:()=>fe,deepClone:()=>ot,deepMerge:()=>jt,deprecated:()=>$e,error:()=>be,generateRandomArray:()=>Ee,generateRandomColor:()=>Ce,generateRandomDate:()=>ht,generateRandomEmail:()=>Xt,generateRandomFloat:()=>Ue,generateRandomIdCard:()=>Ze,generateRandomMobilePhone:()=>We,generateRandomStringFromSource:()=>xt,getRandomInt:()=>v,getRandomItem:()=>_,getRandomString:()=>Z,getRandomUrl:()=>ze,hasChanged:()=>ce,isArray:()=>U,isBoolean:()=>ie,isChineseString:()=>tn,isDate:()=>vt,isDateString:()=>Bt,isDef:()=>ue,isEmail:()=>ln,isEmptyString:()=>gn,isEnglishAphabet:()=>Ve,isFloat:()=>en,isFunction:()=>st,isIdCard:()=>hn,isInteger:()=>an,isLowerCase:()=>Ge,isLowerCaseAndNumber:()=>Je,isLowerCaseAndNumberAndChinese:()=>Qe,isMap:()=>Dt,isMobilePhone:()=>pn,isNegativeFloat:()=>on,isNegativeInteger:()=>fn,isNonNegativeFloat:()=>rn,isNonNegativeInteger:()=>cn,isNonPositiveFloat:()=>sn,isNonPositiveInteger:()=>mn,isNull:()=>se,isNumber:()=>H,isNumberOrNumberString:()=>Ke,isObject:()=>oe,isObjectLike:()=>it,isPlainObject:()=>G,isPositiveFloat:()=>nn,isPositiveInteger:()=>un,isPromise:()=>kt,isRegExp:()=>Tt,isSet:()=>At,isString:()=>Ot,isSymbol:()=>St,isUndef:()=>rt,isUndefined:()=>ae,isUpperCase:()=>Xe,isUpperCaseAndNumber:()=>qe,isUpperCaseAndNumberAndChinese:()=>Be,isUrl:()=>dn,log:()=>gt,objectToString:()=>Ut,omit:()=>Re,pick:()=>Rt,qs:()=>De,throttle:()=>Ae,throwError:()=>D,throwErrorInvalidTypeMessage:()=>Me,toTypeString:()=>tt,toTypeValue:()=>pt,validatorChineseOrEnglish:()=>Te,validatorChineseOrEnglishOrNumber:()=>ve,validatorUppercaseOrNumbersOrSpecial:()=>ke,validatorUppercaseOrNumbersOrUnderline:()=>je,warn:()=>ye});function oe(t){let e=typeof t;return t!==null&&(e==="object"||e==="function")}function it(t){return t!==null&&typeof t=="object"}var Ut=Object.prototype.toString,tt=t=>Ut.call(t),pt=t=>tt(t).slice(8,-1),Ot=t=>typeof t=="string",H=t=>typeof t=="number"&&Number.isFinite(t),ie=t=>typeof t=="boolean",se=t=>t===null,ae=t=>t===void 0,St=t=>typeof t=="symbol",U=Array.isArray,st=t=>typeof t=="function",Dt=t=>tt(t)==="[object Map]",At=t=>tt(t)==="[object Set]",vt=t=>tt(t)==="[object Date]",Tt=t=>tt(t)==="[object RegExp]",kt=t=>it(t)&&st(t?.then)&&st(t?.catch),rt=t=>t==null,ue=t=>t!=null,ce=(t,e)=>t!==e;function G(t){return tt(t)==="[object Object]"}function et(t){return U(t)?t:[t]}function fe(t){let e=[],n,r="";for(;t>0;)n=Math.floor(t%2),e.push(n),t=Math.floor(t/2);for(;e.length>0;)r+=e.pop().toString();return r}var Zt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function me(t){let e="",n="";for(let i=0;i<t.length;i++)n+=t[i].charCodeAt(0).toString(2).padStart(8,"0");for(let i=0;i<n.length;i+=6)e+=Zt[parseInt(n.slice(i,i+6).padEnd(6,"0"),2)];let r=e.length%4;return r!==0&&(e+="=".repeat(4-r)),e}function pe(t){let e="",n="";for(let r=0;r<t.length&&t[r]!=="=";r++)n+=Zt.indexOf(t[r]).toString(2).padStart(6,"0");for(let r=0;r<n.length;r+=8){let i=parseInt(n.slice(r,r+8),2);i&&(e+=String.fromCharCode(i))}return e}function de(...t){return t.reduce((e,n)=>function(...r){return n(e(...r))})}function le(...t){return t.reduce((e,n)=>function(...r){return e(n(...r))})}function ge(t,e=500){let n=null;return function(...r){n&&clearTimeout(n),n=setTimeout(()=>{t.apply(this,r)},e)}}function ot(t){let e=new WeakMap;function n(r){if(!it(r))return r;if(vt(r))return new Date(r);if(Tt(r))return new RegExp(r);if(kt(r))return r;if(e.has(r))return e.get(r);if(Dt(r)){let l=new Map;return e.set(r,l),r.forEach((b,h)=>l.set(n(h),n(b))),l}if(At(r)){let l=new Set;return e.set(r,l),r.forEach(b=>l.add(n(b))),l}let i=U(r)?Object.setPrototypeOf([],Object.getPrototypeOf(r)):Object.create(Object.getPrototypeOf(r));e.set(r,i);let y=Object.getOwnPropertyDescriptors(r);for(let l of Reflect.ownKeys(y)){let b=y[l];b.get||b.set?Object.defineProperty(i,l,b):Object.defineProperty(i,l,{...b,value:n(b.value)})}return i}return n(t)}function jt(t,e,n={}){return zt(Wt(t,n),Wt(e,n),n)}function zt(t,e,n){return U(t)?xe(t,e,n):he(t,e,n)}function he(t,e,n){if(!G(e))return e;let r=Object.getOwnPropertyDescriptors(e);return Reflect.ownKeys(e).forEach(i=>{(G(t[i])||U(t[i]))&&(G(e[i])||U(e[i]))?t[i]=zt(t[i],e[i],n):Object.defineProperty(t,i,r[i])}),t}function xe(t,e,n){let{mergeStrategy:r="replace"}=n;if(U(e))switch(r){case"merge":return t.concat(e);case"replace":return e;default:return e}return e}function Wt(t,e){let{deepClone:n=!0}=e;return n?ot(t):t}var dt=class extends Error{constructor(e,n="Utils"){super(e),this.name=n}};function D(t,e){throw new dt(`[${t}] ${e}`)}function Yt(t,e){let n=Ot(t)?new dt(`[${t}] ${e}`,"UtilsWarn"):t;console.warn(n)}function ye(...t){console.warn(...t)}function be(...t){console.error(...t)}var $e=({from:t,replacement:e,version:n,type:r="API"})=>{Yt(`${r}`,`${t} is about to be deprecated in version ${n}, please use ${e} instead.`)};function Me(t,e,n,r){let i=`Invalid params: type check failed for params "${e}". Expected ${n}, got ${pt(r)} with value ${r}.`;D(t,i)}function we(t,e,n,r){let i=`Invalid params: type check failed for params "${e}". Expected ${n}, got ${pt(r)} with value ${r}.`;Yt(t,i)}var lt=(t,e,...n)=>{if(!e)return;let r=n.length===0?"":n.length===1?n[0]:n;console[t](`[Log] ${e}:`,r)},gt=(t,...e)=>{lt("info",t,...e)};gt.info=(t,...e)=>{lt("info",t,...e)};gt.error=(t,...e)=>{lt("error",t,...e)};gt.warn=(t,...e)=>{lt("warn",t,...e)};function Oe(t,e){let{decode:n=!0}=e||{},r={};t.startsWith("?")&&(t=t.slice(1)),t.includes("?")&&(t=t.slice(t.indexOf("?")+1));let i=t.split("&").filter(Boolean);for(let y of i){let[l,b]=y.split("=");r[l]=n?decodeURIComponent(b):b}return r}function Kt(t,e){let{encode:n=!0}=e||{},r=[];for(let i in t){let y=t[i];r.push(`${i}=${n?encodeURIComponent(y):y}`)}return r.join("&")}function Se(t,e,n){let r=jt({encode:!0},{...n}),i=Kt(e,r);return t.includes("?")?t.endsWith("?")||t.endsWith("&")?`${t}${i}`:`${t}&${i}`:`${t}?${i}`}var De={parse:Oe,stringify:Kt,appendQueryString:Se};function Ae(t,e=500){let n=null;return function(...r){if(rt(n))return n=Date.now(),t.apply(this,r);let i=Date.now();if(i-n>=e)return n=i,t.apply(this,r)}}function ve(t){return!rt(t)&&/^[\dA-Z\u4E00-\u9FA5]+$/i.test(t)}function Te(t){return!rt(t)&&/^[A-Z\u4E00-\u9FA5]+$/i.test(t)}function ke(t){return!rt(t)&&/^[\d!"#$%&'()*+,./:;<=>?@A-Z[\\\]^_`{|}~]+$/.test(t)}function je(t){return/^[\dA-Z_]+$/.test(t)}function Rt(t,e,n={}){let{includeProto:r=!1,includeSymbols:i=!0,includeNonEnum:y=!1}=n,l={};return G(t)&&et(e).forEach(h=>{St(h)&&!i||!(r?h in t:Object.hasOwn(t,h))||!y&&(r?Ye(t,h):Object.getOwnPropertyDescriptor(t,h))?.enumerable===!1||(l[h]=ot(t[h]))}),l}function Ye(t,e){let n=t;for(;n!==null;){let r=Object.getOwnPropertyDescriptor(n,e);if(r)return r;n=Object.getPrototypeOf(n)}}function Re(t,e){if(!G(t))return{};let n=ot(t),r=et(e),i=Object.keys(n).filter(y=>!r.includes(y));return Rt(n,i)}function Ee(t,e){return(!H(t)||t<=0)&&D("generateRandomArray","num \u5FC5\u987B\u5927\u4E8E0"),st(e)||D("generateRandomArray","cb \u5FC5\u987B\u662F\u51FD\u6570"),Array.from({length:t}).fill(0).map((n,r)=>e(n,r))}function Ce(){return`#${Math.random().toString(16).slice(2,8).padEnd(6,"0")}`}var z=mt(It(),1),Vt=mt(_t(),1);function _(t){return t[Math.floor(Math.random()*t.length)]}function v(t={}){H(t)&&(t={max:t});let{min:e=1,max:n=_(Pe())}=t;Ie(e,n);let r=Math.ceil(e),i=Math.floor(n);return Math.floor(Math.random()*(i-r+1)+r)}function Ie(t,e){let n=Math.ceil(t),r=Math.floor(e);Number.isSafeInteger(n)||D("getRandomInt",`The minimum value Math.ceil(${t}) should be a safe integer`),Number.isSafeInteger(r)||D("getRandomInt",`The maximum value Math.floor(${e}) should be a safe integer`),r<n&&(e>=t&&D("getRandomInt",`No integer value found between ${t} and ${e}`),D("getRandomInt",`The maximum value ${e} should be greater than the minimum value ${t}`))}function Pe(){return Array.from({length:Number.MAX_SAFE_INTEGER.toString().length}).map((t,e)=>{let n=Number.MAX_SAFE_INTEGER.toString().slice(0,e+1);return Number(n)})}(0,z.extend)(Vt.default);function ht(t={}){let{start:e="1800-01-01 00:00:00",end:n=(0,z.default)().format("YYYY-MM-DD HH:mm:ss"),format:r="YYYY-MM-DD HH:mm:ss"}=t;(!(0,z.default)(e).isValid()||!(0,z.default)(n).isValid())&&D("generateRandomDate","start end \u53C2\u6570\u5FC5\u987B\u662F\u5408\u6CD5\u7684\u65F6\u95F4\u683C\u5F0F");let i=(0,z.default)(e).year(),y=(0,z.default)(n).year(),l=v({min:i,max:y}),b=v({min:1,max:12}),h=v({min:1,max:31}),T=v(23),X=v(59),I=v(59),L=(0,z.default)(`${l}-${b}-${h} ${T}:${X}:${I}`);return L.isBefore((0,z.default)(e))||L.isAfter((0,z.default)(n))?ht(t):L.format(r)}function Z(t={}){let e=_e(t),n=Le(e);Fe(n);let{length:r}=e;He(r.min,r.max);let i=v(r),y=e.prefix||"";for(let l=0;l<i;l++)y+=n.charAt(Math.floor(Math.random()*n.length));return y+(e.suffix||"")}var Ne=16,Lt=1;function _e(t){let e=H(t);return{lowerCase:!0,upperCase:!0,number:!0,...e?{}:t,length:e?{max:t,min:t}:H(t.length)?{max:t.length,min:t.length}:{max:Ne,min:Lt,...t.length},extra:e?[]:[...new Set(et(t.extra||[]))]}}function Le(t){let e="";return t.lowerCase&&(e+="abcdefghijklmnopqrstuvwxyz"),t.upperCase&&(e+="ABCDEFGHIJKLMNOPQRSTUVWXYZ"),t.number&&(e+="0123456789"),e+=et(t.extra).join(""),e}function Fe(t){t.length===0&&D("getRandomString","At least one character set (lowercase, uppercase, number) must be enabled or extra characters provided")}function He(t,e){Number.isInteger(t)||D("getRandomString","min must be an integer"),Number.isInteger(e)||D("getRandomString","max must be an integer"),t<Lt&&D("getRandomString",`Minimum length cannot be less than ${Lt}`),e<t&&D("getRandomString","Maximum length cannot be less than minimum length")}function Xt(){let t=["gmail.com","outlook.com.cn","example.com","qq.com","163.com","test.com.cn"],e=`${Z(1)}${Z({length:v({max:30,min:1})})}${Z(1)}@${_(t)}`;return/\.{2,}/.test(e)?Xt():e}function Ue(t={}){H(t)&&(t={max:t});let{min:e=0,max:n=1,fractionDigits:r=2}=t;if(e===n)return e;if(e>n)throw new Error(`\u6700\u5927\u503C ${n} \u5E94\u5927\u4E8E\u6700\u5C0F\u503C ${e}`);return Math.random()*(n-e)+e}function xt(t,e){(!H(t)||t<=0)&&D("generateRandomStringFromSource","num \u5FC5\u987B\u5927\u4E8E0"),(!U(e)||e.length===0)&&D("generateRandomStringFromSource","source \u4E0D\u80FD\u4E3A\u7A7A\u6570\u7EC4");let n="";for(let r=0;r<t;r++)n+=_(e);return n}function Ze(){let t=v({min:1e5,max:999999}),e=[0,1,2,3,4,5,6,7,8,9];return[t,ht({format:"YYYYMMDD"}),xt(3,e),xt(1,[...e,"X","x"])].join("")}function We(){return _(["13","14","15","16","17","18","19"])+v(999999999).toString().padEnd(9,"0")}function ze(){let t=["http://","https://"],e=[".com",".net",".org",".cn",".top"],n=[`?name=${Z({length:{min:4,max:8}})}`,`?id=${v()}`,`?page=${Z({length:{min:2,max:4}})}`,`?query=${Z({length:{min:5,max:6}})}`,`?search=${Z({length:{min:1,max:4}})}`,`?token=${Z({length:{min:16,max:16}})}`];return`${_(t)}${Z({length:{min:5,max:25}})}${_(e)}${_(n)}`}function Ke(t){return/^\d+$/.test(t)}function Ve(t){return/^[A-Z]+$/i.test(t)}function Xe(t){return/^[A-Z]+$/.test(t)}function qe(t){return/^[\dA-Z]+$/.test(t)}function Be(t){return/^[\dA-Z\u4E00-\u9FA5]+$/.test(t)}function Ge(t){return/^[a-z]+$/.test(t)}function Je(t){return/^[\da-z]+$/.test(t)}function Qe(t){return/^[\da-z\u4E00-\u9FA5]+$/.test(t)}function tn(t){return/^[\u4E00-\u9FA5]+$/.test(t)}function en(t){return/^-?(?:0|[1-9]\d*)\.\d+$/.test(t)}function nn(t){return/^(?:0\.0*[1-9]\d*|[1-9]\d*\.\d+)$/.test(t)}function rn(t){return/^(?:0|[1-9]\d*)\.\d+$/.test(t)}function on(t){return/^-(?:0\.0*[1-9]\d*|[1-9]\d*\.\d+)$/.test(t)}function sn(t){return/^-(?:0|[1-9]\d*)\.\d+$/.test(t)}function an(t){return/^-?(?:0|[1-9]\d*)$/.test(t)}function un(t){return/^[1-9]\d*$/.test(t)}function cn(t){return/^(?:0|[1-9]\d*)$/.test(t)&&!Object.is(t,-0)}function fn(t){return/^-[1-9]\d*$/.test(t)}function mn(t){return/^-(?:0|[1-9]\d*)$/.test(t)||Object.is(t,-0)}var yt=mt(It(),1),qt=mt(_t(),1);function pn(t){return/^1[3-9]\d{9}$/.test(t)}function dn(t){return/^https?:\/\/\S+$/i.test(t)}function ln(t){return/^[^\s@]+@[^\s@][^\s.@]*\.[^\s@]+$/.test(t)}function gn(t){return t===""}function Bt(t,e="YYYY-MM-DD HH:mm:ss"){return(0,yt.extend)(qt.default),(0,yt.default)(t,e,!0).isValid()}function hn(t){return/^[1-9]\d{5}(?:18|19|20)\d{2}(?:0[1-9]|1[0-2])(?:0[1-9]|[12]\d|3[01])\d{3}[\dX]$/i.test(t)&&Bt(t.slice(6,14),"YYYYMMDD")}return re(xn);})();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lntvow/utils",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.11",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "工具库",
|
|
6
6
|
"keywords": [
|
|
@@ -14,15 +14,15 @@
|
|
|
14
14
|
"files": [
|
|
15
15
|
"dist"
|
|
16
16
|
],
|
|
17
|
+
"types": "dist/utils.esm-bundler.d.ts",
|
|
17
18
|
"main": "dist/utils.cjs-bundler.cjs",
|
|
18
19
|
"module": "dist/utils.esm-bundler.mjs",
|
|
19
|
-
"types": "dist/utils.esm-bundler.d.ts",
|
|
20
20
|
"unpkg": "dist/utils.global.js",
|
|
21
21
|
"exports": {
|
|
22
22
|
".": {
|
|
23
|
+
"types": "./dist/utils.esm-bundler.d.ts",
|
|
23
24
|
"require": "./dist/utils.cjs-bundler.cjs",
|
|
24
|
-
"import": "./dist/utils.esm-bundler.mjs"
|
|
25
|
-
"types": "./dist/utils.esm-bundler.d.ts"
|
|
25
|
+
"import": "./dist/utils.esm-bundler.mjs"
|
|
26
26
|
}
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|