@lntvow/utils 4.1.0 → 4.2.0

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 ne=Object.create;var S=Object.defineProperty;var oe=Object.getOwnPropertyDescriptor;var ie=Object.getOwnPropertyNames;var se=Object.getPrototypeOf,ae=Object.prototype.hasOwnProperty;var me=(e,t)=>{for(var r in t)S(e,r,{get:t[r],enumerable:!0})},Z=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of ie(t))!ae.call(e,o)&&o!==r&&S(e,o,{get:()=>t[o],enumerable:!(n=oe(t,o))||n.enumerable});return e};var N=(e,t,r)=>(r=e!=null?ne(se(e)):{},Z(t||!e||!e.__esModule?S(r,"default",{value:e,enumerable:!0}):r,e)),pe=e=>Z(S({},"__esModule",{value:!0}),e);var Ot={};me(Ot,{base64Decode:()=>ye,base64Encode:()=>be,castArray:()=>h,compose:()=>he,composeRight:()=>Oe,debounce:()=>we,debugWarn:()=>L,debugWarnInvalidTypeMessage:()=>je,decimalToBinary:()=>xe,deepClone:()=>w,deepMerge:()=>K,deprecated:()=>Se,generateRandomArray:()=>ve,generateRandomColor:()=>Ye,generateRandomDate:()=>k,generateRandomEmail:()=>J,generateRandomFloat:()=>Ze,generateRandomIdCard:()=>Ge,generateRandomMobilePhone:()=>qe,generateRandomStringFromSource:()=>E,getRandomInt:()=>m,getRandomItem:()=>f,getRandomString:()=>l,getRandomUrl:()=>Be,hasChanged:()=>de,isArray:()=>g,isBoolean:()=>fe,isChineseString:()=>ot,isDate:()=>v,isDateString:()=>te,isDef:()=>le,isEmail:()=>bt,isEmptyString:()=>yt,isEnglishAphabet:()=>Xe,isFloat:()=>it,isFunction:()=>A,isIdCard:()=>ht,isInteger:()=>ct,isLowerCase:()=>tt,isLowerCaseAndNumber:()=>rt,isLowerCaseAndNumberAndChinese:()=>nt,isMap:()=>C,isMobilePhone:()=>dt,isNegativeFloat:()=>mt,isNegativeInteger:()=>gt,isNonNegativeFloat:()=>at,isNonNegativeInteger:()=>ut,isNonPositiveFloat:()=>pt,isNonPositiveInteger:()=>lt,isNull:()=>ue,isNumber:()=>u,isNumberOrNumberString:()=>Ve,isObject:()=>ce,isObjectLike:()=>$,isPlainObject:()=>b,isPositiveFloat:()=>st,isPositiveInteger:()=>ft,isPromise:()=>U,isRegExp:()=>Y,isSet:()=>F,isString:()=>D,isSymbol:()=>I,isURL:()=>xt,isUndef:()=>O,isUndefined:()=>ge,isUpperCase:()=>Qe,isUpperCaseAndNumber:()=>Je,isUpperCaseAndNumberAndChinese:()=>et,objectToString:()=>G,omit:()=>Fe,pick:()=>_,qs:()=>ke,throttle:()=>Ee,throwError:()=>a,throwErrorInvalidTypeMessage:()=>Re,toTypeString:()=>y,toTypeValue:()=>R,validatorChineseOrEnglish:()=>Ne,validatorChineseOrEnglishOrNumber:()=>Pe,validatorUppercaseOrNumbersOrSpecial:()=>De,validatorUppercaseOrNumbersOrUnderline:()=>Ie});module.exports=pe(Ot);function ce(e){let t=typeof e;return e!==null&&(t==="object"||t==="function")}function $(e){return e!==null&&typeof e=="object"}var G=Object.prototype.toString,y=e=>G.call(e),R=e=>y(e).slice(8,-1),D=e=>typeof e=="string",u=e=>typeof e=="number"&&Number.isFinite(e),fe=e=>typeof e=="boolean",ue=e=>e===null,ge=e=>e===void 0,I=e=>typeof e=="symbol",g=Array.isArray,A=e=>typeof e=="function",C=e=>y(e)==="[object Map]",F=e=>y(e)==="[object Set]",v=e=>y(e)==="[object Date]",Y=e=>y(e)==="[object RegExp]",U=e=>$(e)&&A(e?.then)&&A(e?.catch),O=e=>e==null,le=e=>e!=null,de=(e,t)=>e!==t;function b(e){return y(e)==="[object Object]"}function h(e){return g(e)?e:[e]}function xe(e){let t=[],r,n="";for(;e>0;)r=Math.floor(e%2),t.push(r),e=Math.floor(e/2);for(;t.length>0;)n+=t.pop().toString();return n}var q="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function be(e){let t="",r="";for(let o=0;o<e.length;o++)r+=e[o].charCodeAt(0).toString(2).padStart(8,"0");for(let o=0;o<r.length;o+=6)t+=q[Number.parseInt(r.slice(o,o+6).padEnd(6,"0"),2)];let n=t.length%4;return n!==0&&(t+="=".repeat(4-n)),t}function ye(e){let t="",r="";for(let n=0;n<e.length&&e[n]!=="=";n++)r+=q.indexOf(e[n]).toString(2).padStart(6,"0");for(let n=0;n<r.length;n+=8){let o=Number.parseInt(r.slice(n,n+8),2);o&&(t+=String.fromCharCode(o))}return t}function he(...e){return e.reduce((t,r)=>function(...n){return r(t(...n))})}function Oe(...e){return e.reduce((t,r)=>function(...n){return t(r(...n))})}function we(e,t=500){let r=null;return function(...n){r&&clearTimeout(r),r=setTimeout(()=>{e.apply(this,n)},t)}}function w(e){let t=new WeakMap;function r(n){if(!$(n))return n;if(v(n))return new Date(n);if(Y(n))return new RegExp(n);if(U(n))return n;if(t.has(n))return t.get(n);if(C(n)){let s=new Map;return t.set(n,s),n.forEach((c,d)=>s.set(r(d),r(c))),s}if(F(n)){let s=new Set;return t.set(n,s),n.forEach(c=>s.add(r(c))),s}let o=g(n)?Object.setPrototypeOf([],Object.getPrototypeOf(n)):Object.create(Object.getPrototypeOf(n));t.set(n,o);let p=Object.getOwnPropertyDescriptors(n);for(let s of Reflect.ownKeys(p)){let c=p[s];c.get||c.set?Object.defineProperty(o,s,c):Object.defineProperty(o,s,{...c,value:r(c.value)})}return o}return r(e)}function K(e,t,r={}){return V(B(e,r),B(t,r),r)}function V(e,t,r){return g(e)?Ae(e,t,r):$e(e,t,r)}function $e(e,t,r){if(!b(t))return t;let n=Object.getOwnPropertyDescriptors(t);return Reflect.ownKeys(t).forEach(o=>{(b(e[o])||g(e[o]))&&(b(t[o])||g(t[o]))?e[o]=V(e[o],t[o],r):Object.defineProperty(e,o,n[o])}),e}function Ae(e,t,r){let{mergeStrategy:n="replace"}=r;if(g(t))switch(n){case"merge":return e.concat(t);case"replace":return t;default:return t}return t}function B(e,t){let{deepClone:r=!0}=t;return r?w(e):e}var j=class extends Error{constructor(t,r="Utils"){super(t),this.name=r}};function a(e,t){throw new j(`[${e}] ${t}`)}function L(e,t){let r=D(e)?new j(`[${e}] ${t}`,"UtilsWarn"):e;console.warn(r)}var Se=({from:e,replacement:t,version:r,type:n="API"})=>{L(`${n}`,`${e} is about to be deprecated in version ${r}, please use ${t} instead.`)};function Re(e,t,r,n){let o=`Invalid params: type check failed for params "${t}". Expected ${r}, got ${R(n)} with value ${n}.`;a(e,o)}function je(e,t,r,n){let o=`Invalid params: type check failed for params "${t}". Expected ${r}, got ${R(n)} with value ${n}.`;L(e,o)}var T=(e,t,...r)=>{if(!t)return;let n=r.length===0?"":r.length===1?r[0]:r;console[e](`[Log] ${t}:`,n)},M=(e,...t)=>{T("info",e,...t)};M.info=(e,...t)=>{T("info",e,...t)};M.error=(e,...t)=>{T("error",e,...t)};M.warn=(e,...t)=>{T("warn",e,...t)};typeof globalThis<"u"&&(globalThis.log=M);function Te(e,t){let{decode:r=!0}=t||{},n={};e.startsWith("?")&&(e=e.slice(1)),e.includes("?")&&(e=e.slice(e.indexOf("?")+1));let o=e.split("&").filter(Boolean);for(let p of o){let[s,c]=p.split("=");n[s]=r?decodeURIComponent(c):c}return n}function X(e,t){let{encode:r=!0}=t||{},n=[];for(let o in e){let p=e[o];n.push(`${o}=${r?encodeURIComponent(p):p}`)}return n.join("&")}function Me(e,t,r){let n=K({encode:!0},{...r}),o=X(t,n);return e.includes("?")?e.endsWith("?")||e.endsWith("&")?`${e}${o}`:`${e}&${o}`:`${e}?${o}`}var ke={parse:Te,stringify:X,appendQueryString:Me};function Ee(e,t=500){let r=null;return function(...n){if(O(r))return r=Date.now(),e.apply(this,n);let o=Date.now();if(o-r>=t)return r=o,e.apply(this,n)}}function Pe(e){return!O(e)&&/^[\dA-Z\u4E00-\u9FA5]+$/i.test(e)}function Ne(e){return!O(e)&&/^[A-Z\u4E00-\u9FA5]+$/i.test(e)}function De(e){return!O(e)&&/^[\d!"#$%&'()*+,./:;<=>?@A-Z[\\\]^_`{|}~]+$/.test(e)}function Ie(e){return/^[\dA-Z_]+$/.test(e)}function _(e,t,r={}){let{includeProto:n=!1,includeSymbols:o=!0,includeNonEnum:p=!1}=r,s={};return b(e)&&h(t).forEach(d=>{I(d)&&!o||!(n?d in e:Object.hasOwn(e,d))||!p&&(n?Ce(e,d):Object.getOwnPropertyDescriptor(e,d))?.enumerable===!1||(s[d]=w(e[d]))}),s}function Ce(e,t){let r=e;for(;r!==null;){let n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Object.getPrototypeOf(r)}}function Fe(e,t){if(!b(e))return{};let r=w(e),n=h(t),o=Object.keys(r).filter(p=>!n.includes(p));return _(r,o)}function ve(e,t){return(!u(e)||e<=0)&&a("generateRandomArray","num \u5FC5\u987B\u5927\u4E8E0"),A(t)||a("generateRandomArray","cb \u5FC5\u987B\u662F\u51FD\u6570"),Array.from({length:e}).fill(0).map((r,n)=>t(r,n))}function Ye(){return`#${Math.random().toString(16).slice(2,8).padEnd(6,"0")}`}var x=N(require("dayjs"),1),Q=N(require("dayjs/plugin/customParseFormat.js"),1);function f(e){return e[Math.floor(Math.random()*e.length)]}function m(e={}){u(e)&&(e={max:e});let{min:t=1,max:r=f(Ke())}=e;Ue(t,r);let n=Math.ceil(t),o=Math.floor(r);return Math.floor(Math.random()*(o-n+1)+n)}function Ue(e,t){let r=Math.ceil(e),n=Math.floor(t);Number.isSafeInteger(r)||a("getRandomInt",`The minimum value Math.ceil(${e}) should be a safe integer`),Number.isSafeInteger(n)||a("getRandomInt",`The maximum value Math.floor(${t}) should be a safe integer`),n<r&&(t>=e&&a("getRandomInt",`No integer value found between ${e} and ${t}`),a("getRandomInt",`The maximum value ${t} should be greater than the minimum value ${e}`))}function Ke(){return Array.from({length:Number.MAX_SAFE_INTEGER.toString().length}).map((e,t)=>{let r=Number.MAX_SAFE_INTEGER.toString().slice(0,t+1);return Number(r)})}x.default.extend(Q.default);function k(e={}){let{start:t="1800-01-01 00:00:00",end:r=(0,x.default)().format("YYYY-MM-DD HH:mm:ss"),format:n="YYYY-MM-DD HH:mm:ss"}=e;(!(0,x.default)(t).isValid()||!(0,x.default)(r).isValid())&&a("generateRandomDate","start end \u53C2\u6570\u5FC5\u987B\u662F\u5408\u6CD5\u7684\u65F6\u95F4\u683C\u5F0F");let o=(0,x.default)(t).year(),p=(0,x.default)(r).year(),s=m({min:o,max:p}),c=m({min:1,max:12}),d=m({min:1,max:31}),W=m(23),H=m(59),re=m(59),P=(0,x.default)(`${s}-${c}-${d} ${W}:${H}:${re}`);return P.isBefore((0,x.default)(t))||P.isAfter((0,x.default)(r))?k(e):P.format(n)}function l(e={}){let t=_e(e),r=ze(t);We(r);let{length:n}=t;He(n.min,n.max);let o=m(n),p=t.prefix||"";for(let s=0;s<o;s++)p+=r.charAt(Math.floor(Math.random()*r.length));return p+(t.suffix||"")}var Le=16,z=1;function _e(e){let t=u(e);return{lowerCase:!0,upperCase:!0,number:!0,...t?{}:e,length:t?{max:e,min:e}:u(e.length)?{max:e.length,min:e.length}:{max:Le,min:z,...e.length},extra:t?[]:[...new Set(h(e.extra||[]))]}}function ze(e){let t="";return e.lowerCase&&(t+="abcdefghijklmnopqrstuvwxyz"),e.upperCase&&(t+="ABCDEFGHIJKLMNOPQRSTUVWXYZ"),e.number&&(t+="0123456789"),t+=h(e.extra).join(""),t}function We(e){e.length===0&&a("getRandomString","At least one character set (lowercase, uppercase, number) must be enabled or extra characters provided")}function He(e,t){Number.isInteger(e)||a("getRandomString","min must be an integer"),Number.isInteger(t)||a("getRandomString","max must be an integer"),e<z&&a("getRandomString",`Minimum length cannot be less than ${z}`),t<e&&a("getRandomString","Maximum length cannot be less than minimum length")}function J(){let e=["gmail.com","outlook.com.cn","example.com","qq.com","163.com","test.com.cn"],t=`${l(1)}${l({length:m({max:30,min:1})})}${l(1)}@${f(e)}`;return/\.{2,}/.test(t)?J():t}function Ze(e={}){u(e)&&(e={max:e});let{min:t=0,max:r=1,fractionDigits:n=2}=e;if(t===r)return t;if(t>r)throw new Error(`\u6700\u5927\u503C ${r} \u5E94\u5927\u4E8E\u6700\u5C0F\u503C ${t}`);return Math.random()*(r-t)+t}function E(e,t){(!u(e)||e<=0)&&a("generateRandomStringFromSource","num \u5FC5\u987B\u5927\u4E8E0"),(!g(t)||t.length===0)&&a("generateRandomStringFromSource","source \u4E0D\u80FD\u4E3A\u7A7A\u6570\u7EC4");let r="";for(let n=0;n<e;n++)r+=f(t);return r}function Ge(){let e=m({min:1e5,max:999999}),t=[0,1,2,3,4,5,6,7,8,9];return[e,k({format:"YYYYMMDD"}),E(3,t),E(1,[...t,"X","x"])].join("")}function qe(){return f(["13","14","15","16","17","18","19"])+m(999999999).toString().padEnd(9,"0")}function Be(){let e=["http://","https://"],t=[".com",".net",".org",".cn",".top"],r=[`?name=${l({length:{min:4,max:8}})}`,`?id=${m()}`,`?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`${f(e)}${l({length:{min:5,max:25}})}${f(t)}${f(r)}`}function Ve(e){return/^\d+$/.test(e)}function Xe(e){return/^[A-Z]+$/i.test(e)}function Qe(e){return/^[A-Z]+$/.test(e)}function Je(e){return/^[\dA-Z]+$/.test(e)}function et(e){return/^[\dA-Z\u4E00-\u9FA5]+$/.test(e)}function tt(e){return/^[a-z]+$/.test(e)}function rt(e){return/^[\da-z]+$/.test(e)}function nt(e){return/^[\da-z\u4E00-\u9FA5]+$/.test(e)}function ot(e){return/^[\u4E00-\u9FA5]+$/.test(e)}function it(e){return/^-?(?:0|[1-9]\d*)\.\d+$/.test(e)}function st(e){return/^(?:0\.0*[1-9]\d*|[1-9]\d*\.\d+)$/.test(e)}function at(e){return/^(?:0|[1-9]\d*)\.\d+$/.test(e)}function mt(e){return/^-(?:0\.0*[1-9]\d*|[1-9]\d*\.\d+)$/.test(e)}function pt(e){return/^-(?:0|[1-9]\d*)\.\d+$/.test(e)}function ct(e){return/^-?(?:0|[1-9]\d*)$/.test(e)}function ft(e){return/^[1-9]\d*$/.test(e)}function ut(e){return/^(?:0|[1-9]\d*)$/.test(e)&&!Object.is(e,-0)}function gt(e){return/^-[1-9]\d*$/.test(e)}function lt(e){return/^-(?:0|[1-9]\d*)$/.test(e)||Object.is(e,-0)}var ee=N(require("dayjs"),1);function dt(e){return/^1[3-9]\d{9}$/.test(e)}function xt(e){return/^https?:\/\/\S+$/i.test(e)}function bt(e){return/^[^\s@]+@[^\s@][^\s.@]*\.[^\s@]+$/.test(e)}function yt(e){return e===""}function te(e,t="YYYY-MM-DD HH:mm:ss"){return(0,ee.default)(e,t,!0).isValid()}function ht(e){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(e)&&te(e.slice(6,14),"YYYYMMDD")}0&&(module.exports={base64Decode,base64Encode,castArray,compose,composeRight,debounce,debugWarn,debugWarnInvalidTypeMessage,decimalToBinary,deepClone,deepMerge,deprecated,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,isURL,isUndef,isUndefined,isUpperCase,isUpperCaseAndNumber,isUpperCaseAndNumberAndChinese,objectToString,omit,pick,qs,throttle,throwError,throwErrorInvalidTypeMessage,toTypeString,toTypeValue,validatorChineseOrEnglish,validatorChineseOrEnglishOrNumber,validatorUppercaseOrNumbersOrSpecial,validatorUppercaseOrNumbersOrUnderline});
1
+ "use strict";var me=Object.create;var N=Object.defineProperty;var ce=Object.getOwnPropertyDescriptor;var fe=Object.getOwnPropertyNames;var ue=Object.getPrototypeOf,pe=Object.prototype.hasOwnProperty;var le=(e,t)=>{for(var r in t)N(e,r,{get:t[r],enumerable:!0})},V=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of fe(t))!pe.call(e,o)&&o!==r&&N(e,o,{get:()=>t[o],enumerable:!(n=ce(t,o))||n.enumerable});return e};var Y=(e,t,r)=>(r=e!=null?me(ue(e)):{},V(t||!e||!e.__esModule?N(r,"default",{value:e,enumerable:!0}):r,e)),ge=e=>V(N({},"__esModule",{value:!0}),e);var Tt={};le(Tt,{UtilsError:()=>k,base64Decode:()=>we,base64Encode:()=>Oe,castArray:()=>w,compose:()=>Ae,composeRight:()=>$e,debounce:()=>Re,debugWarn:()=>H,debugWarnInvalidTypeMessage:()=>Me,decimalToBinary:()=>he,deepClone:()=>$,deepMerge:()=>G,deprecated:()=>Ee,generateRandomArray:()=>Ke,generateRandomColor:()=>Be,generateRandomDate:()=>v,generateRandomEmail:()=>oe,generateRandomFloat:()=>Ve,generateRandomIdCard:()=>Qe,generateRandomMobilePhone:()=>Je,generateRandomStringFromSource:()=>F,getRandomInt:()=>f,getRandomItem:()=>p,getRandomString:()=>d,getRandomUrl:()=>et,hasChanged:()=>ye,isArray:()=>g,isBoolean:()=>U,isChineseString:()=>ct,isDate:()=>B,isDateString:()=>se,isDef:()=>be,isEmail:()=>$t,isEmptyString:()=>Rt,isEnglishAphabet:()=>rt,isFloat:()=>ft,isFunction:()=>M,isIdCard:()=>St,isInteger:()=>dt,isLowerCase:()=>st,isLowerCaseAndNumber:()=>at,isLowerCaseAndNumberAndChinese:()=>mt,isMap:()=>L,isMobilePhone:()=>wt,isNegativeFloat:()=>lt,isNegativeInteger:()=>yt,isNonNegativeFloat:()=>pt,isNonNegativeInteger:()=>bt,isNonPositiveFloat:()=>gt,isNonPositiveInteger:()=>ht,isNull:()=>xe,isNumber:()=>u,isNumberOrNumberString:()=>tt,isObject:()=>de,isObjectLike:()=>j,isPlainObject:()=>x,isPositiveFloat:()=>ut,isPositiveInteger:()=>xt,isPromise:()=>z,isRegExp:()=>W,isSet:()=>K,isString:()=>P,isStringNumber:()=>Ot,isSymbol:()=>_,isURL:()=>At,isUndef:()=>A,isUndefined:()=>S,isUpperCase:()=>nt,isUpperCaseAndNumber:()=>ot,isUpperCaseAndNumberAndChinese:()=>it,objectToString:()=>Q,omit:()=>Le,pick:()=>Z,qs:()=>Ne,throttle:()=>De,throwError:()=>s,throwErrorInvalidTypeMessage:()=>je,toTypeString:()=>O,toTypeValue:()=>D,validatorChineseOrEnglish:()=>Ce,validatorChineseOrEnglishOrNumber:()=>Ie,validatorUppercaseOrNumbersOrSpecial:()=>ve,validatorUppercaseOrNumbersOrUnderline:()=>Fe,withRetry:()=>Ye});module.exports=ge(Tt);function de(e){let t=typeof e;return e!==null&&(t==="object"||t==="function")}function j(e){return e!==null&&typeof e=="object"}var Q=Object.prototype.toString,O=e=>Q.call(e),D=e=>O(e).slice(8,-1),P=e=>typeof e=="string",u=e=>typeof e=="number"&&Number.isFinite(e),U=e=>typeof e=="boolean",xe=e=>e===null,S=e=>e===void 0,_=e=>typeof e=="symbol",g=Array.isArray,M=e=>typeof e=="function",L=e=>O(e)==="[object Map]",K=e=>O(e)==="[object Set]",B=e=>O(e)==="[object Date]",W=e=>O(e)==="[object RegExp]",z=e=>j(e)&&M(e?.then)&&M(e?.catch),A=e=>e==null,be=e=>e!=null,ye=(e,t)=>e!==t;function x(e){return O(e)==="[object Object]"}function w(e){return g(e)?e:[e]}function he(e){let t=[],r,n="";for(;e>0;)r=Math.floor(e%2),t.push(r),e=Math.floor(e/2);for(;t.length>0;)n+=t.pop().toString();return n}var J="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function Oe(e){let t="",r="";for(let o=0;o<e.length;o++)r+=e[o].charCodeAt(0).toString(2).padStart(8,"0");for(let o=0;o<r.length;o+=6)t+=J[Number.parseInt(r.slice(o,o+6).padEnd(6,"0"),2)];let n=t.length%4;return n!==0&&(t+="=".repeat(4-n)),t}function we(e){let t="",r="";for(let n=0;n<e.length&&e[n]!=="=";n++)r+=J.indexOf(e[n]).toString(2).padStart(6,"0");for(let n=0;n<r.length;n+=8){let o=Number.parseInt(r.slice(n,n+8),2);o&&(t+=String.fromCharCode(o))}return t}function Ae(...e){return e.reduce((t,r)=>function(...n){return r(t(...n))})}function $e(...e){return e.reduce((t,r)=>function(...n){return t(r(...n))})}function Re(e,t=500){let r=null;return function(...n){r&&clearTimeout(r),r=setTimeout(()=>{e.apply(this,n)},t)}}function $(e){let t=new WeakMap;function r(n){if(!j(n))return n;if(B(n))return new Date(n);if(W(n))return new RegExp(n);if(z(n))return n;if(t.has(n))return t.get(n);if(L(n)){let a=new Map;return t.set(n,a),n.forEach((c,l)=>a.set(r(l),r(c))),a}if(K(n)){let a=new Set;return t.set(n,a),n.forEach(c=>a.add(r(c))),a}let o=g(n)?Object.setPrototypeOf([],Object.getPrototypeOf(n)):Object.create(Object.getPrototypeOf(n));t.set(n,o);let m=Object.getOwnPropertyDescriptors(n);for(let a of Reflect.ownKeys(m)){let c=m[a];c.get||c.set?Object.defineProperty(o,a,c):Object.defineProperty(o,a,{...c,value:r(c.value)})}return o}return r(e)}function G(e,t,r={}){return te(ee(e,r),ee(t,r),r)}function te(e,t,r){return g(e)?Te(e,t,r):Se(e,t,r)}function Se(e,t,r){if(!x(t))return t;let n=Object.getOwnPropertyDescriptors(t);return Reflect.ownKeys(t).forEach(o=>{(x(e[o])||g(e[o]))&&(x(t[o])||g(t[o]))?e[o]=te(e[o],t[o],r):Object.defineProperty(e,o,n[o])}),e}function Te(e,t,r){let{mergeStrategy:n="replace"}=r;if(g(t))switch(n){case"merge":return e.concat(t);case"replace":return t;default:return t}return t}function ee(e,t){let{deepClone:r=!0}=t;return r?$(e):e}var k=class extends Error{constructor(t,r="Utils"){super(t),this.name=r}};function s(e,t){throw new k(`[${e}] ${t}`)}function H(e,t){let r=P(e)?new k(`[${e}] ${t}`,"UtilsWarn"):e;console.warn(r)}var Ee=({from:e,replacement:t,version:r,type:n="API"})=>{H(`${n}`,`${e} is about to be deprecated in version ${r}, please use ${t} instead.`)};function je(e,t,r,n){let o=`Invalid params: type check failed for params "${t}". Expected ${r}, got ${D(n)} with value ${n}.`;s(e,o)}function Me(e,t,r,n){let o=`Invalid params: type check failed for params "${t}". Expected ${r}, got ${D(n)} with value ${n}.`;H(e,o)}var I=(e,t,...r)=>{if(!t)return;let n=r.length===0?"":r.length===1?r[0]:r;console[e](`[Log] ${t}:`,n)},C=(e,...t)=>{I("info",e,...t)};C.info=(e,...t)=>{I("info",e,...t)};C.error=(e,...t)=>{I("error",e,...t)};C.warn=(e,...t)=>{I("warn",e,...t)};typeof globalThis<"u"&&(globalThis.log=C);function Pe(e,t){let{decode:r=!0}=t||{},n={};e.startsWith("?")&&(e=e.slice(1)),e.includes("?")&&(e=e.slice(e.indexOf("?")+1));let o=e.split("&").filter(Boolean);for(let m of o){let[a,c]=m.split("=");n[a]=r?decodeURIComponent(c):c}return n}function re(e,t){let{encode:r=!0}=t||{},n=[];for(let o in e){let m=e[o];n.push(`${o}=${r?encodeURIComponent(m):m}`)}return n.join("&")}function ke(e,t,r){let n=G({encode:!0},{...r}),o=re(t,n);return e.includes("?")?e.endsWith("?")||e.endsWith("&")?`${e}${o}`:`${e}&${o}`:`${e}?${o}`}var Ne={parse:Pe,stringify:re,appendQueryString:ke};function De(e,t=500){let r=null;return function(...n){if(A(r))return r=Date.now(),e.apply(this,n);let o=Date.now();if(o-r>=t)return r=o,e.apply(this,n)}}function Ie(e){return!A(e)&&/^[\dA-Z\u4E00-\u9FA5]+$/i.test(e)}function Ce(e){return!A(e)&&/^[A-Z\u4E00-\u9FA5]+$/i.test(e)}function ve(e){return!A(e)&&/^[\d!"#$%&'()*+,./:;<=>?@A-Z[\\\]^_`{|}~]+$/.test(e)}function Fe(e){return/^[\dA-Z_]+$/.test(e)}function Ye(e){Ue(e);let{fn:t,maxAttempts:r=3,retryDelay:n=1e3,enableExponentialBackoff:o=!1,signal:m}=e,a,c=m?new Promise((T,h)=>{let E=()=>h(new Error("Operation Cancelled"));m.addEventListener("abort",E),a=()=>m.removeEventListener("abort",E)}):null;return new Promise((T,h)=>{(async()=>{for(let y=1;y<=r;y++){if(m?.aborted)return h(new Error("Operation Cancelled"));try{let R=await Promise.race(c?[t(),c]:[t()]);return T(R)}catch(R){if(R instanceof Error&&R.message==="Operation Cancelled"||y===r)return h(R);let q=o?n*2**(y-1):n;log("withRetry",`Attempt ${y}/${r} failed. Retrying in ${q}ms...`),await new Promise(ae=>setTimeout(ae,q))}}})()}).finally(()=>a?.())}function Ue(e){x(e)||s("withRetry",'"Options" must be an object'),typeof e.fn!="function"&&s("withRetry",'"fn" must be a function that returns a Promise'),!S(e.maxAttempts)&&(!Number.isInteger(e.maxAttempts)||e.maxAttempts<1)&&s("withRetry",'"maxAttempts" must be a positive integer'),!S(e.retryDelay)&&(!u(e.retryDelay)||e.retryDelay<0)&&s("withRetry",'"retryDelay" must be a non-negative number'),!S(e.enableExponentialBackoff)&&!U(e.enableExponentialBackoff)&&s("withRetry",'"enableExponentialBackoff" must be a boolean'),!S(e.signal)&&typeof e.signal!="object"&&s("withRetry",'"signal" must be an AbortSignal')}function Z(e,t,r={}){let{includeProto:n=!1,includeSymbols:o=!0,includeNonEnum:m=!1}=r,a={};return x(e)&&w(t).forEach(l=>{_(l)&&!o||!(n?l in e:Object.hasOwn(e,l))||!m&&(n?_e(e,l):Object.getOwnPropertyDescriptor(e,l))?.enumerable===!1||(a[l]=$(e[l]))}),a}function _e(e,t){let r=e;for(;r!==null;){let n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Object.getPrototypeOf(r)}}function Le(e,t){if(!x(e))return{};let r=$(e),n=w(t),o=Object.keys(r).filter(m=>!n.includes(m));return Z(r,o)}function Ke(e,t){return(!u(e)||e<=0)&&s("generateRandomArray","num must be greater than 0"),M(t)||s("generateRandomArray","cb must be a function"),Array.from({length:e}).fill(0).map((r,n)=>t(r,n))}function Be(){return`#${Math.random().toString(16).slice(2,8).padEnd(6,"0")}`}var b=Y(require("dayjs"),1),ne=Y(require("dayjs/plugin/customParseFormat.js"),1);function p(e){return e[Math.floor(Math.random()*e.length)]}function f(e={}){u(e)&&(e={max:e});let{min:t=1,max:r=p(ze())}=e;We(t,r);let n=Math.ceil(t),o=Math.floor(r);return Math.floor(Math.random()*(o-n+1)+n)}function We(e,t){let r=Math.ceil(e),n=Math.floor(t);Number.isSafeInteger(r)||s("getRandomInt",`The minimum value Math.ceil(${e}) should be a safe integer`),Number.isSafeInteger(n)||s("getRandomInt",`The maximum value Math.floor(${t}) should be a safe integer`),n<r&&(t>=e&&s("getRandomInt",`No integer value found between ${e} and ${t}`),s("getRandomInt",`The maximum value ${t} should be greater than the minimum value ${e}`))}function ze(){return Array.from({length:Number.MAX_SAFE_INTEGER.toString().length}).map((e,t)=>{let r=Number.MAX_SAFE_INTEGER.toString().slice(0,t+1);return Number(r)})}b.default.extend(ne.default);function v(e={}){let{start:t="1800-01-01 00:00:00",end:r=(0,b.default)().format("YYYY-MM-DD HH:mm:ss"),format:n="YYYY-MM-DD HH:mm:ss"}=e;(!(0,b.default)(t).isValid()||!(0,b.default)(r).isValid())&&s("generateRandomDate","start and end parameters must be valid date format");let o=(0,b.default)(t).year(),m=(0,b.default)(r).year(),a=f({min:o,max:m}),c=f({min:1,max:12}),l=f({min:1,max:31}),T=f(23),h=f(59),E=f(59),y=(0,b.default)(`${a}-${c}-${l} ${T}:${h}:${E}`);return y.isBefore((0,b.default)(t))||y.isAfter((0,b.default)(r))?v(e):y.format(n)}function d(e={}){let t=He(e),r=Ze(t);Xe(r);let{length:n}=t;qe(n.min,n.max);let o=f(n),m=t.prefix||"";for(let a=0;a<o;a++)m+=r.charAt(Math.floor(Math.random()*r.length));return m+(t.suffix||"")}var Ge=16,X=1;function He(e){let t=u(e);return{lowerCase:!0,upperCase:!0,number:!0,...t?{}:e,length:t?{max:e,min:e}:u(e.length)?{max:e.length,min:e.length}:{max:Ge,min:X,...e.length},extra:t?[]:[...new Set(w(e.extra||[]))]}}function Ze(e){let t="";return e.lowerCase&&(t+="abcdefghijklmnopqrstuvwxyz"),e.upperCase&&(t+="ABCDEFGHIJKLMNOPQRSTUVWXYZ"),e.number&&(t+="0123456789"),t+=w(e.extra).join(""),t}function Xe(e){e.length===0&&s("getRandomString","At least one character set (lowercase, uppercase, number) must be enabled or extra characters provided")}function qe(e,t){Number.isInteger(e)||s("getRandomString","min must be an integer"),Number.isInteger(t)||s("getRandomString","max must be an integer"),e<X&&s("getRandomString",`Minimum length cannot be less than ${X}`),t<e&&s("getRandomString","Maximum length cannot be less than minimum length")}function oe(){let e=["gmail.com","outlook.com.cn","example.com","qq.com","163.com","test.com.cn"],t=`${d(1)}${d({length:f({max:30,min:1})})}${d(1)}@${p(e)}`;return/\.{2,}/.test(t)?oe():t}function Ve(e={}){u(e)&&(e={max:e});let{min:t=0,max:r=1,fractionDigits:n=2}=e;if(t===r)return t;if(t>r)throw new Error(`Maximum value ${r} should be greater than minimum value ${t}`);return Math.random()*(r-t)+t}function F(e,t){(!u(e)||e<=0)&&s("generateRandomStringFromSource","num must be greater than 0"),(!g(t)||t.length===0)&&s("generateRandomStringFromSource","source cannot be empty array");let r="";for(let n=0;n<e;n++)r+=p(t);return r}function Qe(){let e=f({min:1e5,max:999999}),t=[0,1,2,3,4,5,6,7,8,9];return[e,v({format:"YYYYMMDD"}),F(3,t),F(1,[...t,"X","x"])].join("")}function Je(){return p(["13","14","15","16","17","18","19"])+f(999999999).toString().padEnd(9,"0")}function et(){let e=["http://","https://"],t=[".com",".net",".org",".cn",".top"],r=[`?name=${d({length:{min:4,max:8}})}`,`?id=${f()}`,`?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(e)}${d({length:{min:5,max:25}})}${p(t)}${p(r)}`}function tt(e){return/^\d+$/.test(e)}function rt(e){return/^[A-Z]+$/i.test(e)}function nt(e){return/^[A-Z]+$/.test(e)}function ot(e){return/^[\dA-Z]+$/.test(e)}function it(e){return/^[\dA-Z\u4E00-\u9FA5]+$/.test(e)}function st(e){return/^[a-z]+$/.test(e)}function at(e){return/^[\da-z]+$/.test(e)}function mt(e){return/^[\da-z\u4E00-\u9FA5]+$/.test(e)}function ct(e){return/^[\u4E00-\u9FA5]+$/.test(e)}function ft(e){return/^-?(?:0|[1-9]\d*)\.\d+$/.test(e)}function ut(e){return/^(?:0\.0*[1-9]\d*|[1-9]\d*\.\d+)$/.test(e)}function pt(e){return/^(?:0|[1-9]\d*)\.\d+$/.test(e)}function lt(e){return/^-(?:0\.0*[1-9]\d*|[1-9]\d*\.\d+)$/.test(e)}function gt(e){return/^-(?:0|[1-9]\d*)\.\d+$/.test(e)}function dt(e){return/^-?(?:0|[1-9]\d*)$/.test(e)}function xt(e){return/^[1-9]\d*$/.test(e)}function bt(e){return/^(?:0|[1-9]\d*)$/.test(e)&&!Object.is(e,-0)}function yt(e){return/^-[1-9]\d*$/.test(e)}function ht(e){return/^-(?:0|[1-9]\d*)$/.test(e)||Object.is(e,-0)}var Ot=e=>{if(!P(e))return!1;let t=e.trim();if(t===""||t.includes("e")||t.includes("E")||t.includes("0x")||t.includes("0X")||t.includes("0o")||t.includes("0O")||t.includes("0b")||t.includes("0B"))return!1;let r=Number(t);return!(!Number.isFinite(r)||r>Number.MAX_SAFE_INTEGER||r<Number.MIN_SAFE_INTEGER)};var ie=Y(require("dayjs"),1);function wt(e){return/^1[3-9]\d{9}$/.test(e)}function At(e){return/^https?:\/\/\S+$/i.test(e)}function $t(e){return/^[^\s@]+@[^\s@][^\s.@]*\.[^\s@]+$/.test(e)}function Rt(e){return e===""}function se(e,t="YYYY-MM-DD HH:mm:ss"){return(0,ie.default)(e,t,!0).isValid()}function St(e){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(e)&&se(e.slice(6,14),"YYYYMMDD")}0&&(module.exports={UtilsError,base64Decode,base64Encode,castArray,compose,composeRight,debounce,debugWarn,debugWarnInvalidTypeMessage,decimalToBinary,deepClone,deepMerge,deprecated,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,isStringNumber,isSymbol,isURL,isUndef,isUndefined,isUpperCase,isUpperCaseAndNumber,isUpperCaseAndNumberAndChinese,objectToString,omit,pick,qs,throttle,throwError,throwErrorInvalidTypeMessage,toTypeString,toTypeValue,validatorChineseOrEnglish,validatorChineseOrEnglishOrNumber,validatorUppercaseOrNumbersOrSpecial,validatorUppercaseOrNumbersOrUnderline,withRetry});
@@ -1 +1 @@
1
- var qt=Object.create;var jt=Object.defineProperty;var Bt=Object.getOwnPropertyDescriptor;var Gt=Object.getOwnPropertyNames;var Jt=Object.getPrototypeOf,Qt=Object.prototype.hasOwnProperty;var te=(t,e)=>()=>(t&&(e=t(t=0)),e);var Yt=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var ee=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of Gt(e))!Qt.call(t,s)&&s!==n&&jt(t,s,{get:()=>e[s],enumerable:!(r=Bt(e,s))||r.enumerable});return t};var $t=(t,e,n)=>(n=t!=null?qt(Jt(t)):{},ee(e||!t||!t.__esModule?jt(n,"default",{value:t,enumerable:!0}):n,t));import $e from"path";import{fileURLToPath as we}from"url";var o=te(()=>{"use strict"});var St=Yt((wt,Ot)=>{"use strict";o();(function(t,e){typeof wt=="object"&&typeof Ot<"u"?Ot.exports=e():typeof define=="function"&&define.amd?define(e):(t=typeof globalThis<"u"?globalThis:t||self).dayjs=e()})(wt,function(){"use strict";var t=1e3,e=6e4,n=36e5,r="millisecond",s="second",M="minute",y="hour",w="day",b="week",j="month",G="quarter",_="year",U="date",ut="Invalid Date",g=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,$=/\[([^\]]+)]|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,A={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(f){var a=["th","st","nd","rd"],i=f%100;return"["+f+(a[(i-20)%10]||a[i]||a[0])+"]"}},S=function(f,a,i){var c=String(f);return!c||c.length>=a?f:""+Array(a+1-c.length).join(i)+f},W={s:S,z:function(f){var a=-f.utcOffset(),i=Math.abs(a),c=Math.floor(i/60),u=i%60;return(a<=0?"+":"-")+S(c,2,"0")+":"+S(u,2,"0")},m:function f(a,i){if(a.date()<i.date())return-f(i,a);var c=12*(i.year()-a.year())+(i.month()-a.month()),u=a.clone().add(c,j),m=i-u<0,p=a.clone().add(c+(m?-1:1),j);return+(-(c+(i-u)/(m?u-p:p-u))||0)},a:function(f){return f<0?Math.ceil(f)||0:Math.floor(f)},p:function(f){return{M:j,y:_,w:b,d:w,D:U,h:y,m:M,s,ms:r,Q:G}[f]||String(f||"").toLowerCase().replace(/s$/,"")},u:function(f){return f===void 0}},E="en",L={};L[E]=A;var X="$isDayjsObject",F=function(f){return f instanceof C||!(!f||!f[X])},P=function f(a,i,c){var u;if(!a)return E;if(typeof a=="string"){var m=a.toLowerCase();L[m]&&(u=m),i&&(L[m]=i,u=m);var p=a.split("-");if(!u&&p.length>1)return f(p[0])}else{var h=a.name;L[h]=a,u=h}return!c&&u&&(E=u),u||!c&&E},O=function(f,a){if(F(f))return f.clone();var i=typeof a=="object"?a:{};return i.date=f,i.args=arguments,new C(i)},x=W;x.l=P,x.i=F,x.w=function(f,a){return O(f,{locale:a.$L,utc:a.$u,x:a.$x,$offset:a.$offset})};var C=function(){function f(i){this.$L=P(i.locale,null,!0),this.parse(i),this.$x=this.$x||i.x||{},this[X]=!0}var a=f.prototype;return a.parse=function(i){this.$d=function(c){var u=c.date,m=c.utc;if(u===null)return new Date(NaN);if(x.u(u))return new Date;if(u instanceof Date)return new Date(u);if(typeof u=="string"&&!/Z$/i.test(u)){var p=u.match(g);if(p){var h=p[2]-1||0,D=(p[7]||"0").substring(0,3);return m?new Date(Date.UTC(p[1],h,p[3]||1,p[4]||0,p[5]||0,p[6]||0,D)):new Date(p[1],h,p[3]||1,p[4]||0,p[5]||0,p[6]||0,D)}}return new Date(u)}(i),this.init()},a.init=function(){var i=this.$d;this.$y=i.getFullYear(),this.$M=i.getMonth(),this.$D=i.getDate(),this.$W=i.getDay(),this.$H=i.getHours(),this.$m=i.getMinutes(),this.$s=i.getSeconds(),this.$ms=i.getMilliseconds()},a.$utils=function(){return x},a.isValid=function(){return this.$d.toString()!==ut},a.isSame=function(i,c){var u=O(i);return this.startOf(c)<=u&&u<=this.endOf(c)},a.isAfter=function(i,c){return O(i)<this.startOf(c)},a.isBefore=function(i,c){return this.endOf(c)<O(i)},a.$g=function(i,c,u){return x.u(i)?this[c]:this.set(u,i)},a.unix=function(){return Math.floor(this.valueOf()/1e3)},a.valueOf=function(){return this.$d.getTime()},a.startOf=function(i,c){var u=this,m=!!x.u(c)||c,p=x.p(i),h=function(q,Y){var H=x.w(u.$u?Date.UTC(u.$y,Y,q):new Date(u.$y,Y,q),u);return m?H:H.endOf(w)},D=function(q,Y){return x.w(u.toDate()[q].apply(u.toDate("s"),(m?[0,0,0,0]:[23,59,59,999]).slice(Y)),u)},v=this.$W,k=this.$M,N=this.$D,tt="set"+(this.$u?"UTC":"");switch(p){case _:return m?h(1,0):h(31,11);case j:return m?h(1,k):h(0,k+1);case b:var J=this.$locale().weekStart||0,rt=(v<J?v+7:v)-J;return h(m?N-rt:N+(6-rt),k);case w:case U:return D(tt+"Hours",0);case y:return D(tt+"Minutes",1);case M:return D(tt+"Seconds",2);case s:return D(tt+"Milliseconds",3);default:return this.clone()}},a.endOf=function(i){return this.startOf(i,!1)},a.$set=function(i,c){var u,m=x.p(i),p="set"+(this.$u?"UTC":""),h=(u={},u[w]=p+"Date",u[U]=p+"Date",u[j]=p+"Month",u[_]=p+"FullYear",u[y]=p+"Hours",u[M]=p+"Minutes",u[s]=p+"Seconds",u[r]=p+"Milliseconds",u)[m],D=m===w?this.$D+(c-this.$W):c;if(m===j||m===_){var v=this.clone().set(U,1);v.$d[h](D),v.init(),this.$d=v.set(U,Math.min(this.$D,v.daysInMonth())).$d}else h&&this.$d[h](D);return this.init(),this},a.set=function(i,c){return this.clone().$set(i,c)},a.get=function(i){return this[x.p(i)]()},a.add=function(i,c){var u,m=this;i=Number(i);var p=x.p(c),h=function(k){var N=O(m);return x.w(N.date(N.date()+Math.round(k*i)),m)};if(p===j)return this.set(j,this.$M+i);if(p===_)return this.set(_,this.$y+i);if(p===w)return h(1);if(p===b)return h(7);var D=(u={},u[M]=e,u[y]=n,u[s]=t,u)[p]||1,v=this.$d.getTime()+i*D;return x.w(v,this)},a.subtract=function(i,c){return this.add(-1*i,c)},a.format=function(i){var c=this,u=this.$locale();if(!this.isValid())return u.invalidDate||ut;var m=i||"YYYY-MM-DDTHH:mm:ssZ",p=x.z(this),h=this.$H,D=this.$m,v=this.$M,k=u.weekdays,N=u.months,tt=u.meridiem,J=function(Y,H,Q,et){return Y&&(Y[H]||Y(c,m))||Q[H].slice(0,et)},rt=function(Y){return x.s(h%12||12,Y,"0")},q=tt||function(Y,H,Q){var et=Y<12?"AM":"PM";return Q?et.toLowerCase():et};return m.replace($,function(Y,H){return H||function(Q){switch(Q){case"YY":return String(c.$y).slice(-2);case"YYYY":return x.s(c.$y,4,"0");case"M":return v+1;case"MM":return x.s(v+1,2,"0");case"MMM":return J(u.monthsShort,v,N,3);case"MMMM":return J(N,v);case"D":return c.$D;case"DD":return x.s(c.$D,2,"0");case"d":return String(c.$W);case"dd":return J(u.weekdaysMin,c.$W,k,2);case"ddd":return J(u.weekdaysShort,c.$W,k,3);case"dddd":return k[c.$W];case"H":return String(h);case"HH":return x.s(h,2,"0");case"h":return rt(1);case"hh":return rt(2);case"a":return q(h,D,!0);case"A":return q(h,D,!1);case"m":return String(D);case"mm":return x.s(D,2,"0");case"s":return String(c.$s);case"ss":return x.s(c.$s,2,"0");case"SSS":return x.s(c.$ms,3,"0");case"Z":return p}return null}(Y)||p.replace(":","")})},a.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},a.diff=function(i,c,u){var m,p=this,h=x.p(c),D=O(i),v=(D.utcOffset()-this.utcOffset())*e,k=this-D,N=function(){return x.m(p,D)};switch(h){case _:m=N()/12;break;case j:m=N();break;case G:m=N()/3;break;case b:m=(k-v)/6048e5;break;case w:m=(k-v)/864e5;break;case y:m=k/n;break;case M:m=k/e;break;case s:m=k/t;break;default:m=k}return u?m:x.a(m)},a.daysInMonth=function(){return this.endOf(j).$D},a.$locale=function(){return L[this.$L]},a.locale=function(i,c){if(!i)return this.$L;var u=this.clone(),m=P(i,c,!0);return m&&(u.$L=m),u},a.clone=function(){return x.w(this.$d,this)},a.toDate=function(){return new Date(this.valueOf())},a.toJSON=function(){return this.isValid()?this.toISOString():null},a.toISOString=function(){return this.$d.toISOString()},a.toString=function(){return this.$d.toUTCString()},f}(),I=C.prototype;return O.prototype=I,[["$ms",r],["$s",s],["$m",M],["$H",y],["$W",w],["$M",j],["$y",_],["$D",U]].forEach(function(f){I[f[1]]=function(a){return this.$g(a,f[0],f[1])}}),O.extend=function(f,a){return f.$i||(f(a,C,O),f.$i=!0),O},O.locale=P,O.isDayjs=F,O.unix=function(f){return O(1e3*f)},O.en=L[E],O.Ls=L,O.p={},O})});var Kt=Yt((Dt,At)=>{"use strict";o();(function(t,e){typeof Dt=="object"&&typeof At<"u"?At.exports=e():typeof define=="function"&&define.amd?define(e):(t=typeof globalThis<"u"?globalThis:t||self).dayjs_plugin_customParseFormat=e()})(Dt,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/,s=/\d\d?/,M=/\d*[^-_:/,()\s\d]+/,y={},w=function(g){return(g=+g)+(g>68?1900:2e3)},b=function(g){return function($){this[g]=+$}},j=[/[+-]\d\d:?(\d\d)?|Z/,function(g){(this.zone||(this.zone={})).offset=function($){if(!$||$==="Z")return 0;var A=$.match(/([+-]|\d\d)/g),S=60*A[1]+(+A[2]||0);return S===0?0:A[0]==="+"?-S:S}(g)}],G=function(g){var $=y[g];return $&&($.indexOf?$:$.s.concat($.f))},_=function(g,$){var A,S=y.meridiem;if(S){for(var W=1;W<=24;W+=1)if(g.indexOf(S(W,0,$))>-1){A=W>12;break}}else A=g===($?"pm":"PM");return A},U={A:[M,function(g){this.afternoon=_(g,!1)}],a:[M,function(g){this.afternoon=_(g,!0)}],Q:[n,function(g){this.month=3*(g-1)+1}],S:[n,function(g){this.milliseconds=100*+g}],SS:[r,function(g){this.milliseconds=10*+g}],SSS:[/\d{3}/,function(g){this.milliseconds=+g}],s:[s,b("seconds")],ss:[s,b("seconds")],m:[s,b("minutes")],mm:[s,b("minutes")],H:[s,b("hours")],h:[s,b("hours")],HH:[s,b("hours")],hh:[s,b("hours")],D:[s,b("day")],DD:[r,b("day")],Do:[M,function(g){var $=y.ordinal,A=g.match(/\d+/);if(this.day=A[0],$)for(var S=1;S<=31;S+=1)$(S).replace(/\[|\]/g,"")===g&&(this.day=S)}],w:[s,b("week")],ww:[r,b("week")],M:[s,b("month")],MM:[r,b("month")],MMM:[M,function(g){var $=G("months"),A=(G("monthsShort")||$.map(function(S){return S.slice(0,3)})).indexOf(g)+1;if(A<1)throw new Error;this.month=A%12||A}],MMMM:[M,function(g){var $=G("months").indexOf(g)+1;if($<1)throw new Error;this.month=$%12||$}],Y:[/[+-]?\d+/,b("year")],YY:[r,function(g){this.year=w(g)}],YYYY:[/\d{4}/,b("year")],Z:j,ZZ:j};function ut(g){var $,A;$=g,A=y&&y.formats;for(var S=(g=$.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(O,x,C){var I=C&&C.toUpperCase();return x||A[C]||t[C]||A[I].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(f,a,i){return a||i.slice(1)})})).match(e),W=S.length,E=0;E<W;E+=1){var L=S[E],X=U[L],F=X&&X[0],P=X&&X[1];S[E]=P?{regex:F,parser:P}:L.replace(/^\[|\]$/g,"")}return function(O){for(var x={},C=0,I=0;C<W;C+=1){var f=S[C];if(typeof f=="string")I+=f.length;else{var a=f.regex,i=f.parser,c=O.slice(I),u=a.exec(c)[0];i.call(x,u),O=O.replace(u,"")}}return function(m){var p=m.afternoon;if(p!==void 0){var h=m.hours;p?h<12&&(m.hours+=12):h===12&&(m.hours=0),delete m.afternoon}}(x),x}}return function(g,$,A){A.p.customParseFormat=!0,g&&g.parseTwoDigitYear&&(w=g.parseTwoDigitYear);var S=$.prototype,W=S.parse;S.parse=function(E){var L=E.date,X=E.utc,F=E.args;this.$u=X;var P=F[1];if(typeof P=="string"){var O=F[2]===!0,x=F[3]===!0,C=O||x,I=F[2];x&&(I=F[2]),y=this.$locale(),!O&&I&&(y=A.Ls[I]),this.$d=function(c,u,m,p){try{if(["x","X"].indexOf(u)>-1)return new Date((u==="X"?1e3:1)*c);var h=ut(u)(c),D=h.year,v=h.month,k=h.day,N=h.hours,tt=h.minutes,J=h.seconds,rt=h.milliseconds,q=h.zone,Y=h.week,H=new Date,Q=k||(D||v?1:H.getDate()),et=D||H.getFullYear(),ct=0;D&&!v||(ct=v>0?v-1:H.getMonth());var ft,ht=N||0,yt=tt||0,xt=J||0,bt=rt||0;return q?new Date(Date.UTC(et,ct,Q,ht,yt,xt,bt+60*q.offset*1e3)):m?new Date(Date.UTC(et,ct,Q,ht,yt,xt,bt)):(ft=new Date(et,ct,Q,ht,yt,xt,bt),Y&&(ft=p(ft).week(Y).toDate()),ft)}catch{return new Date("")}}(L,P,X,A),this.init(),I&&I!==!0&&(this.$L=this.locale(I).$L),C&&L!=this.format(P)&&(this.$d=new Date("")),y={}}else if(P instanceof Array)for(var f=P.length,a=1;a<=f;a+=1){F[1]=P[a-1];var i=A.apply(this,F);if(i.isValid()){this.$d=i.$d,this.$L=i.$L,this.init();break}a===f&&(this.$d=new Date(""))}else W.call(this,E)}}})});o();o();o();o();o();function Se(t){let e=typeof t;return t!==null&&(e==="object"||e==="function")}o();function mt(t){return t!==null&&typeof t=="object"}o();o();var ne=Object.prototype.toString,ot=t=>ne.call(t),Mt=t=>ot(t).slice(8,-1),Rt=t=>typeof t=="string",z=t=>typeof t=="number"&&Number.isFinite(t),je=t=>typeof t=="boolean",Ye=t=>t===null,Re=t=>t===void 0,Et=t=>typeof t=="symbol",K=Array.isArray,pt=t=>typeof t=="function",Ct=t=>ot(t)==="[object Map]",Pt=t=>ot(t)==="[object Set]",It=t=>ot(t)==="[object Date]",Nt=t=>ot(t)==="[object RegExp]",_t=t=>mt(t)&&pt(t?.then)&&pt(t?.catch),st=t=>t==null,Ee=t=>t!=null,Ce=(t,e)=>t!==e;function nt(t){return ot(t)==="[object Object]"}function it(t){return K(t)?t:[t]}o();o();o();o();o();function Je(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 Lt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function Qe(t){let e="",n="";for(let s=0;s<t.length;s++)n+=t[s].charCodeAt(0).toString(2).padStart(8,"0");for(let s=0;s<n.length;s+=6)e+=Lt[Number.parseInt(n.slice(s,s+6).padEnd(6,"0"),2)];let r=e.length%4;return r!==0&&(e+="=".repeat(4-r)),e}function tn(t){let e="",n="";for(let r=0;r<t.length&&t[r]!=="=";r++)n+=Lt.indexOf(t[r]).toString(2).padStart(6,"0");for(let r=0;r<n.length;r+=8){let s=Number.parseInt(n.slice(r,r+8),2);s&&(e+=String.fromCharCode(s))}return e}o();function rn(...t){return t.reduce((e,n)=>function(...r){return n(e(...r))})}function on(...t){return t.reduce((e,n)=>function(...r){return e(n(...r))})}o();function un(t,e=500){let n=null;return function(...r){n&&clearTimeout(n),n=setTimeout(()=>{t.apply(this,r)},e)}}o();function at(t){let e=new WeakMap;function n(r){if(!mt(r))return r;if(It(r))return new Date(r);if(Nt(r))return new RegExp(r);if(_t(r))return r;if(e.has(r))return e.get(r);if(Ct(r)){let y=new Map;return e.set(r,y),r.forEach((w,b)=>y.set(n(b),n(w))),y}if(Pt(r)){let y=new Set;return e.set(r,y),r.forEach(w=>y.add(n(w))),y}let s=K(r)?Object.setPrototypeOf([],Object.getPrototypeOf(r)):Object.create(Object.getPrototypeOf(r));e.set(r,s);let M=Object.getOwnPropertyDescriptors(r);for(let y of Reflect.ownKeys(M)){let w=M[y];w.get||w.set?Object.defineProperty(s,y,w):Object.defineProperty(s,y,{...w,value:n(w.value)})}return s}return n(t)}o();function Ut(t,e,n={}){return Ht(Ft(t,n),Ft(e,n),n)}function Ht(t,e,n){return K(t)?oe(t,e,n):re(t,e,n)}function re(t,e,n){if(!nt(e))return e;let r=Object.getOwnPropertyDescriptors(e);return Reflect.ownKeys(e).forEach(s=>{(nt(t[s])||K(t[s]))&&(nt(e[s])||K(e[s]))?t[s]=Ht(t[s],e[s],n):Object.defineProperty(t,s,r[s])}),t}function oe(t,e,n){let{mergeStrategy:r="replace"}=n;if(K(e))switch(r){case"merge":return t.concat(e);case"replace":return e;default:return e}return e}function Ft(t,e){let{deepClone:n=!0}=e;return n?at(t):t}o();var dt=class extends Error{constructor(e,n="Utils"){super(e),this.name=n}};function T(t,e){throw new dt(`[${t}] ${e}`)}function Zt(t,e){let n=Rt(t)?new dt(`[${t}] ${e}`,"UtilsWarn"):t;console.warn(n)}var bn=({from:t,replacement:e,version:n,type:r="API"})=>{Zt(`${r}`,`${t} is about to be deprecated in version ${n}, please use ${e} instead.`)};function $n(t,e,n,r){let s=`Invalid params: type check failed for params "${e}". Expected ${n}, got ${Mt(r)} with value ${r}.`;T(t,s)}function Mn(t,e,n,r){let s=`Invalid params: type check failed for params "${e}". Expected ${n}, got ${Mt(r)} with value ${r}.`;Zt(t,s)}o();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)};typeof globalThis<"u"&&(globalThis.log=gt);o();function ie(t,e){let{decode:n=!0}=e||{},r={};t.startsWith("?")&&(t=t.slice(1)),t.includes("?")&&(t=t.slice(t.indexOf("?")+1));let s=t.split("&").filter(Boolean);for(let M of s){let[y,w]=M.split("=");r[y]=n?decodeURIComponent(w):w}return r}function Wt(t,e){let{encode:n=!0}=e||{},r=[];for(let s in t){let M=t[s];r.push(`${s}=${n?encodeURIComponent(M):M}`)}return r.join("&")}function se(t,e,n){let r=Ut({encode:!0},{...n}),s=Wt(e,r);return t.includes("?")?t.endsWith("?")||t.endsWith("&")?`${t}${s}`:`${t}&${s}`:`${t}?${s}`}var An={parse:ie,stringify:Wt,appendQueryString:se};o();function jn(t,e=500){let n=null;return function(...r){if(st(n))return n=Date.now(),t.apply(this,r);let s=Date.now();if(s-n>=e)return n=s,t.apply(this,r)}}o();function Cn(t){return!st(t)&&/^[\dA-Z\u4E00-\u9FA5]+$/i.test(t)}function Pn(t){return!st(t)&&/^[A-Z\u4E00-\u9FA5]+$/i.test(t)}function In(t){return!st(t)&&/^[\d!"#$%&'()*+,./:;<=>?@A-Z[\\\]^_`{|}~]+$/.test(t)}function Nn(t){return/^[\dA-Z_]+$/.test(t)}function zt(t,e,n={}){let{includeProto:r=!1,includeSymbols:s=!0,includeNonEnum:M=!1}=n,y={};return nt(t)&&it(e).forEach(b=>{Et(b)&&!s||!(r?b in t:Object.hasOwn(t,b))||!M&&(r?ae(t,b):Object.getOwnPropertyDescriptor(t,b))?.enumerable===!1||(y[b]=at(t[b]))}),y}function ae(t,e){let n=t;for(;n!==null;){let r=Object.getOwnPropertyDescriptor(n,e);if(r)return r;n=Object.getPrototypeOf(n)}}function ar(t,e){if(!nt(t))return{};let n=at(t),r=it(e),s=Object.keys(n).filter(M=>!r.includes(M));return zt(n,s)}o();o();function hr(t,e){return(!z(t)||t<=0)&&T("generateRandomArray","num \u5FC5\u987B\u5927\u4E8E0"),pt(e)||T("generateRandomArray","cb \u5FC5\u987B\u662F\u51FD\u6570"),Array.from({length:t}).fill(0).map((n,r)=>e(n,r))}o();function br(){return`#${Math.random().toString(16).slice(2,8).padEnd(6,"0")}`}o();var B=$t(St(),1),Vt=$t(Kt(),1);o();o();function Z(t){return t[Math.floor(Math.random()*t.length)]}function R(t={}){z(t)&&(t={max:t});let{min:e=1,max:n=Z(ce())}=t;ue(e,n);let r=Math.ceil(e),s=Math.floor(n);return Math.floor(Math.random()*(s-r+1)+r)}function ue(t,e){let n=Math.ceil(t),r=Math.floor(e);Number.isSafeInteger(n)||T("getRandomInt",`The minimum value Math.ceil(${t}) should be a safe integer`),Number.isSafeInteger(r)||T("getRandomInt",`The maximum value Math.floor(${e}) should be a safe integer`),r<n&&(e>=t&&T("getRandomInt",`No integer value found between ${t} and ${e}`),T("getRandomInt",`The maximum value ${e} should be greater than the minimum value ${t}`))}function ce(){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)})}B.default.extend(Vt.default);function vt(t={}){let{start:e="1800-01-01 00:00:00",end:n=(0,B.default)().format("YYYY-MM-DD HH:mm:ss"),format:r="YYYY-MM-DD HH:mm:ss"}=t;(!(0,B.default)(e).isValid()||!(0,B.default)(n).isValid())&&T("generateRandomDate","start end \u53C2\u6570\u5FC5\u987B\u662F\u5408\u6CD5\u7684\u65F6\u95F4\u683C\u5F0F");let s=(0,B.default)(e).year(),M=(0,B.default)(n).year(),y=R({min:s,max:M}),w=R({min:1,max:12}),b=R({min:1,max:31}),j=R(23),G=R(59),_=R(59),U=(0,B.default)(`${y}-${w}-${b} ${j}:${G}:${_}`);return U.isBefore((0,B.default)(e))||U.isAfter((0,B.default)(n))?vt(t):U.format(r)}o();o();function V(t={}){let e=me(t),n=pe(e);de(n);let{length:r}=e;le(r.min,r.max);let s=R(r),M=e.prefix||"";for(let y=0;y<s;y++)M+=n.charAt(Math.floor(Math.random()*n.length));return M+(e.suffix||"")}var fe=16,Tt=1;function me(t){let e=z(t);return{lowerCase:!0,upperCase:!0,number:!0,...e?{}:t,length:e?{max:t,min:t}:z(t.length)?{max:t.length,min:t.length}:{max:fe,min:Tt,...t.length},extra:e?[]:[...new Set(it(t.extra||[]))]}}function pe(t){let e="";return t.lowerCase&&(e+="abcdefghijklmnopqrstuvwxyz"),t.upperCase&&(e+="ABCDEFGHIJKLMNOPQRSTUVWXYZ"),t.number&&(e+="0123456789"),e+=it(t.extra).join(""),e}function de(t){t.length===0&&T("getRandomString","At least one character set (lowercase, uppercase, number) must be enabled or extra characters provided")}function le(t,e){Number.isInteger(t)||T("getRandomString","min must be an integer"),Number.isInteger(e)||T("getRandomString","max must be an integer"),t<Tt&&T("getRandomString",`Minimum length cannot be less than ${Tt}`),e<t&&T("getRandomString","Maximum length cannot be less than minimum length")}function ge(){let t=["gmail.com","outlook.com.cn","example.com","qq.com","163.com","test.com.cn"],e=`${V(1)}${V({length:R({max:30,min:1})})}${V(1)}@${Z(t)}`;return/\.{2,}/.test(e)?ge():e}o();function Vr(t={}){z(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}o();o();function kt(t,e){(!z(t)||t<=0)&&T("generateRandomStringFromSource","num \u5FC5\u987B\u5927\u4E8E0"),(!K(e)||e.length===0)&&T("generateRandomStringFromSource","source \u4E0D\u80FD\u4E3A\u7A7A\u6570\u7EC4");let n="";for(let r=0;r<t;r++)n+=Z(e);return n}function oo(){let t=R({min:1e5,max:999999}),e=[0,1,2,3,4,5,6,7,8,9];return[t,vt({format:"YYYYMMDD"}),kt(3,e),kt(1,[...e,"X","x"])].join("")}o();function co(){return Z(["13","14","15","16","17","18","19"])+R(999999999).toString().padEnd(9,"0")}o();function ho(){let t=["http://","https://"],e=[".com",".net",".org",".cn",".top"],n=[`?name=${V({length:{min:4,max:8}})}`,`?id=${R()}`,`?page=${V({length:{min:2,max:4}})}`,`?query=${V({length:{min:5,max:6}})}`,`?search=${V({length:{min:1,max:4}})}`,`?token=${V({length:{min:16,max:16}})}`];return`${Z(t)}${V({length:{min:5,max:25}})}${Z(e)}${Z(n)}`}o();o();o();o();function Io(t){return/^\d+$/.test(t)}function No(t){return/^[A-Z]+$/i.test(t)}function _o(t){return/^[A-Z]+$/.test(t)}function Lo(t){return/^[\dA-Z]+$/.test(t)}function Fo(t){return/^[\dA-Z\u4E00-\u9FA5]+$/.test(t)}function Uo(t){return/^[a-z]+$/.test(t)}function Ho(t){return/^[\da-z]+$/.test(t)}function Zo(t){return/^[\da-z\u4E00-\u9FA5]+$/.test(t)}function Wo(t){return/^[\u4E00-\u9FA5]+$/.test(t)}o();function Vo(t){return/^-?(?:0|[1-9]\d*)\.\d+$/.test(t)}function Xo(t){return/^(?:0\.0*[1-9]\d*|[1-9]\d*\.\d+)$/.test(t)}function qo(t){return/^(?:0|[1-9]\d*)\.\d+$/.test(t)}function Bo(t){return/^-(?:0\.0*[1-9]\d*|[1-9]\d*\.\d+)$/.test(t)}function Go(t){return/^-(?:0|[1-9]\d*)\.\d+$/.test(t)}o();function ti(t){return/^-?(?:0|[1-9]\d*)$/.test(t)}function ei(t){return/^[1-9]\d*$/.test(t)}function ni(t){return/^(?:0|[1-9]\d*)$/.test(t)&&!Object.is(t,-0)}function ri(t){return/^-[1-9]\d*$/.test(t)}function oi(t){return/^-(?:0|[1-9]\d*)$/.test(t)||Object.is(t,-0)}o();var Xt=$t(St(),1);function ai(t){return/^1[3-9]\d{9}$/.test(t)}function ui(t){return/^https?:\/\/\S+$/i.test(t)}function ci(t){return/^[^\s@]+@[^\s@][^\s.@]*\.[^\s@]+$/.test(t)}function fi(t){return t===""}function he(t,e="YYYY-MM-DD HH:mm:ss"){return(0,Xt.default)(t,e,!0).isValid()}function mi(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)&&he(t.slice(6,14),"YYYYMMDD")}export{tn as base64Decode,Qe as base64Encode,it as castArray,rn as compose,on as composeRight,un as debounce,Zt as debugWarn,Mn as debugWarnInvalidTypeMessage,Je as decimalToBinary,at as deepClone,Ut as deepMerge,bn as deprecated,hr as generateRandomArray,br as generateRandomColor,vt as generateRandomDate,ge as generateRandomEmail,Vr as generateRandomFloat,oo as generateRandomIdCard,co as generateRandomMobilePhone,kt as generateRandomStringFromSource,R as getRandomInt,Z as getRandomItem,V as getRandomString,ho as getRandomUrl,Ce as hasChanged,K as isArray,je as isBoolean,Wo as isChineseString,It as isDate,he as isDateString,Ee as isDef,ci as isEmail,fi as isEmptyString,No as isEnglishAphabet,Vo as isFloat,pt as isFunction,mi as isIdCard,ti as isInteger,Uo as isLowerCase,Ho as isLowerCaseAndNumber,Zo as isLowerCaseAndNumberAndChinese,Ct as isMap,ai as isMobilePhone,Bo as isNegativeFloat,ri as isNegativeInteger,qo as isNonNegativeFloat,ni as isNonNegativeInteger,Go as isNonPositiveFloat,oi as isNonPositiveInteger,Ye as isNull,z as isNumber,Io as isNumberOrNumberString,Se as isObject,mt as isObjectLike,nt as isPlainObject,Xo as isPositiveFloat,ei as isPositiveInteger,_t as isPromise,Nt as isRegExp,Pt as isSet,Rt as isString,Et as isSymbol,ui as isURL,st as isUndef,Re as isUndefined,_o as isUpperCase,Lo as isUpperCaseAndNumber,Fo as isUpperCaseAndNumberAndChinese,ne as objectToString,ar as omit,zt as pick,An as qs,jn as throttle,T as throwError,$n as throwErrorInvalidTypeMessage,ot as toTypeString,Mt as toTypeValue,Pn as validatorChineseOrEnglish,Cn as validatorChineseOrEnglishOrNumber,In as validatorUppercaseOrNumbersOrSpecial,Nn as validatorUppercaseOrNumbersOrUnderline};
1
+ var qt=Object.create;var Et=Object.defineProperty;var Jt=Object.getOwnPropertyDescriptor;var Qt=Object.getOwnPropertyNames;var te=Object.getPrototypeOf,ee=Object.prototype.hasOwnProperty;var ne=(t,e)=>()=>(t&&(e=t(t=0)),e);var Yt=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var re=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Qt(e))!ee.call(t,i)&&i!==n&&Et(t,i,{get:()=>e[i],enumerable:!(r=Jt(e,i))||r.enumerable});return t};var Mt=(t,e,n)=>(n=t!=null?qt(te(t)):{},re(e||!t||!t.__esModule?Et(n,"default",{value:t,enumerable:!0}):n,t));import Oe from"path";import{fileURLToPath as De}from"url";var o=ne(()=>{"use strict"});var At=Yt((St,Dt)=>{"use strict";o();(function(t,e){typeof St=="object"&&typeof Dt<"u"?Dt.exports=e():typeof define=="function"&&define.amd?define(e):(t=typeof globalThis<"u"?globalThis:t||self).dayjs=e()})(St,function(){"use strict";var t=1e3,e=6e4,n=36e5,r="millisecond",i="second",x="minute",h="hour",M="day",$="week",R="month",N="quarter",E="year",k="date",K="Invalid Date",l=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,w=/\[([^\]]+)]|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,v={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(f){var a=["th","st","nd","rd"],s=f%100;return"["+f+(a[(s-20)%10]||a[s]||a[0])+"]"}},D=function(f,a,s){var c=String(f);return!c||c.length>=a?f:""+Array(a+1-c.length).join(s)+f},B={s:D,z:function(f){var a=-f.utcOffset(),s=Math.abs(a),c=Math.floor(s/60),u=s%60;return(a<=0?"+":"-")+D(c,2,"0")+":"+D(u,2,"0")},m:function f(a,s){if(a.date()<s.date())return-f(s,a);var c=12*(s.year()-a.year())+(s.month()-a.month()),u=a.clone().add(c,R),m=s-u<0,p=a.clone().add(c+(m?-1:1),R);return+(-(c+(s-u)/(m?u-p:p-u))||0)},a:function(f){return f<0?Math.ceil(f)||0:Math.floor(f)},p:function(f){return{M:R,y:E,w:$,d:M,D:k,h,m:x,s:i,ms:r,Q:N}[f]||String(f||"").toLowerCase().replace(/s$/,"")},u:function(f){return f===void 0}},C="en",U={};U[C]=v;var G="$isDayjsObject",H=function(f){return f instanceof I||!(!f||!f[G])},_=function f(a,s,c){var u;if(!a)return C;if(typeof a=="string"){var m=a.toLowerCase();U[m]&&(u=m),s&&(U[m]=s,u=m);var p=a.split("-");if(!u&&p.length>1)return f(p[0])}else{var y=a.name;U[y]=a,u=y}return!c&&u&&(C=u),u||!c&&C},S=function(f,a){if(H(f))return f.clone();var s=typeof a=="object"?a:{};return s.date=f,s.args=arguments,new I(s)},b=B;b.l=_,b.i=H,b.w=function(f,a){return S(f,{locale:a.$L,utc:a.$u,x:a.$x,$offset:a.$offset})};var I=function(){function f(s){this.$L=_(s.locale,null,!0),this.parse(s),this.$x=this.$x||s.x||{},this[G]=!0}var a=f.prototype;return a.parse=function(s){this.$d=function(c){var u=c.date,m=c.utc;if(u===null)return new Date(NaN);if(b.u(u))return new Date;if(u instanceof Date)return new Date(u);if(typeof u=="string"&&!/Z$/i.test(u)){var p=u.match(l);if(p){var y=p[2]-1||0,A=(p[7]||"0").substring(0,3);return m?new Date(Date.UTC(p[1],y,p[3]||1,p[4]||0,p[5]||0,p[6]||0,A)):new Date(p[1],y,p[3]||1,p[4]||0,p[5]||0,p[6]||0,A)}}return new Date(u)}(s),this.init()},a.init=function(){var s=this.$d;this.$y=s.getFullYear(),this.$M=s.getMonth(),this.$D=s.getDate(),this.$W=s.getDay(),this.$H=s.getHours(),this.$m=s.getMinutes(),this.$s=s.getSeconds(),this.$ms=s.getMilliseconds()},a.$utils=function(){return b},a.isValid=function(){return this.$d.toString()!==K},a.isSame=function(s,c){var u=S(s);return this.startOf(c)<=u&&u<=this.endOf(c)},a.isAfter=function(s,c){return S(s)<this.startOf(c)},a.isBefore=function(s,c){return this.endOf(c)<S(s)},a.$g=function(s,c,u){return b.u(s)?this[c]:this.set(u,s)},a.unix=function(){return Math.floor(this.valueOf()/1e3)},a.valueOf=function(){return this.$d.getTime()},a.startOf=function(s,c){var u=this,m=!!b.u(c)||c,p=b.p(s),y=function(q,Y){var Z=b.w(u.$u?Date.UTC(u.$y,Y,q):new Date(u.$y,Y,q),u);return m?Z:Z.endOf(M)},A=function(q,Y){return b.w(u.toDate()[q].apply(u.toDate("s"),(m?[0,0,0,0]:[23,59,59,999]).slice(Y)),u)},T=this.$W,j=this.$M,F=this.$D,nt="set"+(this.$u?"UTC":"");switch(p){case E:return m?y(1,0):y(31,11);case R:return m?y(1,j):y(0,j+1);case $:var tt=this.$locale().weekStart||0,ot=(T<tt?T+7:T)-tt;return y(m?F-ot:F+(6-ot),j);case M:case k:return A(nt+"Hours",0);case h:return A(nt+"Minutes",1);case x:return A(nt+"Seconds",2);case i:return A(nt+"Milliseconds",3);default:return this.clone()}},a.endOf=function(s){return this.startOf(s,!1)},a.$set=function(s,c){var u,m=b.p(s),p="set"+(this.$u?"UTC":""),y=(u={},u[M]=p+"Date",u[k]=p+"Date",u[R]=p+"Month",u[E]=p+"FullYear",u[h]=p+"Hours",u[x]=p+"Minutes",u[i]=p+"Seconds",u[r]=p+"Milliseconds",u)[m],A=m===M?this.$D+(c-this.$W):c;if(m===R||m===E){var T=this.clone().set(k,1);T.$d[y](A),T.init(),this.$d=T.set(k,Math.min(this.$D,T.daysInMonth())).$d}else y&&this.$d[y](A);return this.init(),this},a.set=function(s,c){return this.clone().$set(s,c)},a.get=function(s){return this[b.p(s)]()},a.add=function(s,c){var u,m=this;s=Number(s);var p=b.p(c),y=function(j){var F=S(m);return b.w(F.date(F.date()+Math.round(j*s)),m)};if(p===R)return this.set(R,this.$M+s);if(p===E)return this.set(E,this.$y+s);if(p===M)return y(1);if(p===$)return y(7);var A=(u={},u[x]=e,u[h]=n,u[i]=t,u)[p]||1,T=this.$d.getTime()+s*A;return b.w(T,this)},a.subtract=function(s,c){return this.add(-1*s,c)},a.format=function(s){var c=this,u=this.$locale();if(!this.isValid())return u.invalidDate||K;var m=s||"YYYY-MM-DDTHH:mm:ssZ",p=b.z(this),y=this.$H,A=this.$m,T=this.$M,j=u.weekdays,F=u.months,nt=u.meridiem,tt=function(Y,Z,et,rt){return Y&&(Y[Z]||Y(c,m))||et[Z].slice(0,rt)},ot=function(Y){return b.s(y%12||12,Y,"0")},q=nt||function(Y,Z,et){var rt=Y<12?"AM":"PM";return et?rt.toLowerCase():rt};return m.replace(w,function(Y,Z){return Z||function(et){switch(et){case"YY":return String(c.$y).slice(-2);case"YYYY":return b.s(c.$y,4,"0");case"M":return T+1;case"MM":return b.s(T+1,2,"0");case"MMM":return tt(u.monthsShort,T,F,3);case"MMMM":return tt(F,T);case"D":return c.$D;case"DD":return b.s(c.$D,2,"0");case"d":return String(c.$W);case"dd":return tt(u.weekdaysMin,c.$W,j,2);case"ddd":return tt(u.weekdaysShort,c.$W,j,3);case"dddd":return j[c.$W];case"H":return String(y);case"HH":return b.s(y,2,"0");case"h":return ot(1);case"hh":return ot(2);case"a":return q(y,A,!0);case"A":return q(y,A,!1);case"m":return String(A);case"mm":return b.s(A,2,"0");case"s":return String(c.$s);case"ss":return b.s(c.$s,2,"0");case"SSS":return b.s(c.$ms,3,"0");case"Z":return p}return null}(Y)||p.replace(":","")})},a.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},a.diff=function(s,c,u){var m,p=this,y=b.p(c),A=S(s),T=(A.utcOffset()-this.utcOffset())*e,j=this-A,F=function(){return b.m(p,A)};switch(y){case E:m=F()/12;break;case R:m=F();break;case N:m=F()/3;break;case $:m=(j-T)/6048e5;break;case M:m=(j-T)/864e5;break;case h:m=j/n;break;case x:m=j/e;break;case i:m=j/t;break;default:m=j}return u?m:b.a(m)},a.daysInMonth=function(){return this.endOf(R).$D},a.$locale=function(){return U[this.$L]},a.locale=function(s,c){if(!s)return this.$L;var u=this.clone(),m=_(s,c,!0);return m&&(u.$L=m),u},a.clone=function(){return b.w(this.$d,this)},a.toDate=function(){return new Date(this.valueOf())},a.toJSON=function(){return this.isValid()?this.toISOString():null},a.toISOString=function(){return this.$d.toISOString()},a.toString=function(){return this.$d.toUTCString()},f}(),L=I.prototype;return S.prototype=L,[["$ms",r],["$s",i],["$m",x],["$H",h],["$W",M],["$M",R],["$y",E],["$D",k]].forEach(function(f){L[f[1]]=function(a){return this.$g(a,f[0],f[1])}}),S.extend=function(f,a){return f.$i||(f(a,I,S),f.$i=!0),S},S.locale=_,S.isDayjs=H,S.unix=function(f){return S(1e3*f)},S.en=U[C],S.Ls=U,S.p={},S})});var Vt=Yt((vt,Tt)=>{"use strict";o();(function(t,e){typeof vt=="object"&&typeof Tt<"u"?Tt.exports=e():typeof define=="function"&&define.amd?define(e):(t=typeof globalThis<"u"?globalThis:t||self).dayjs_plugin_customParseFormat=e()})(vt,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?/,x=/\d*[^-_:/,()\s\d]+/,h={},M=function(l){return(l=+l)+(l>68?1900:2e3)},$=function(l){return function(w){this[l]=+w}},R=[/[+-]\d\d:?(\d\d)?|Z/,function(l){(this.zone||(this.zone={})).offset=function(w){if(!w||w==="Z")return 0;var v=w.match(/([+-]|\d\d)/g),D=60*v[1]+(+v[2]||0);return D===0?0:v[0]==="+"?-D:D}(l)}],N=function(l){var w=h[l];return w&&(w.indexOf?w:w.s.concat(w.f))},E=function(l,w){var v,D=h.meridiem;if(D){for(var B=1;B<=24;B+=1)if(l.indexOf(D(B,0,w))>-1){v=B>12;break}}else v=l===(w?"pm":"PM");return v},k={A:[x,function(l){this.afternoon=E(l,!1)}],a:[x,function(l){this.afternoon=E(l,!0)}],Q:[n,function(l){this.month=3*(l-1)+1}],S:[n,function(l){this.milliseconds=100*+l}],SS:[r,function(l){this.milliseconds=10*+l}],SSS:[/\d{3}/,function(l){this.milliseconds=+l}],s:[i,$("seconds")],ss:[i,$("seconds")],m:[i,$("minutes")],mm:[i,$("minutes")],H:[i,$("hours")],h:[i,$("hours")],HH:[i,$("hours")],hh:[i,$("hours")],D:[i,$("day")],DD:[r,$("day")],Do:[x,function(l){var w=h.ordinal,v=l.match(/\d+/);if(this.day=v[0],w)for(var D=1;D<=31;D+=1)w(D).replace(/\[|\]/g,"")===l&&(this.day=D)}],w:[i,$("week")],ww:[r,$("week")],M:[i,$("month")],MM:[r,$("month")],MMM:[x,function(l){var w=N("months"),v=(N("monthsShort")||w.map(function(D){return D.slice(0,3)})).indexOf(l)+1;if(v<1)throw new Error;this.month=v%12||v}],MMMM:[x,function(l){var w=N("months").indexOf(l)+1;if(w<1)throw new Error;this.month=w%12||w}],Y:[/[+-]?\d+/,$("year")],YY:[r,function(l){this.year=M(l)}],YYYY:[/\d{4}/,$("year")],Z:R,ZZ:R};function K(l){var w,v;w=l,v=h&&h.formats;for(var D=(l=w.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(S,b,I){var L=I&&I.toUpperCase();return b||v[I]||t[I]||v[L].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(f,a,s){return a||s.slice(1)})})).match(e),B=D.length,C=0;C<B;C+=1){var U=D[C],G=k[U],H=G&&G[0],_=G&&G[1];D[C]=_?{regex:H,parser:_}:U.replace(/^\[|\]$/g,"")}return function(S){for(var b={},I=0,L=0;I<B;I+=1){var f=D[I];if(typeof f=="string")L+=f.length;else{var a=f.regex,s=f.parser,c=S.slice(L),u=a.exec(c)[0];s.call(b,u),S=S.replace(u,"")}}return function(m){var p=m.afternoon;if(p!==void 0){var y=m.hours;p?y<12&&(m.hours+=12):y===12&&(m.hours=0),delete m.afternoon}}(b),b}}return function(l,w,v){v.p.customParseFormat=!0,l&&l.parseTwoDigitYear&&(M=l.parseTwoDigitYear);var D=w.prototype,B=D.parse;D.parse=function(C){var U=C.date,G=C.utc,H=C.args;this.$u=G;var _=H[1];if(typeof _=="string"){var S=H[2]===!0,b=H[3]===!0,I=S||b,L=H[2];b&&(L=H[2]),h=this.$locale(),!S&&L&&(h=v.Ls[L]),this.$d=function(c,u,m,p){try{if(["x","X"].indexOf(u)>-1)return new Date((u==="X"?1e3:1)*c);var y=K(u)(c),A=y.year,T=y.month,j=y.day,F=y.hours,nt=y.minutes,tt=y.seconds,ot=y.milliseconds,q=y.zone,Y=y.week,Z=new Date,et=j||(A||T?1:Z.getDate()),rt=A||Z.getFullYear(),ft=0;A&&!T||(ft=T>0?T-1:Z.getMonth());var mt,bt=F||0,xt=nt||0,$t=tt||0,wt=ot||0;return q?new Date(Date.UTC(rt,ft,et,bt,xt,$t,wt+60*q.offset*1e3)):m?new Date(Date.UTC(rt,ft,et,bt,xt,$t,wt)):(mt=new Date(rt,ft,et,bt,xt,$t,wt),Y&&(mt=p(mt).week(Y).toDate()),mt)}catch{return new Date("")}}(U,_,G,v),this.init(),L&&L!==!0&&(this.$L=this.locale(L).$L),I&&U!=this.format(_)&&(this.$d=new Date("")),h={}}else if(_ instanceof Array)for(var f=_.length,a=1;a<=f;a+=1){H[1]=_[a-1];var s=v.apply(this,H);if(s.isValid()){this.$d=s.$d,this.$L=s.$L,this.init();break}a===f&&(this.$d=new Date(""))}else B.call(this,C)}}})});o();o();o();o();o();function ve(t){let e=typeof t;return t!==null&&(e==="object"||e==="function")}o();function pt(t){return t!==null&&typeof t=="object"}o();o();var oe=Object.prototype.toString,it=t=>oe.call(t),Ot=t=>it(t).slice(8,-1),dt=t=>typeof t=="string",W=t=>typeof t=="number"&&Number.isFinite(t),Pt=t=>typeof t=="boolean",Ye=t=>t===null,ct=t=>t===void 0,Nt=t=>typeof t=="symbol",V=Array.isArray,lt=t=>typeof t=="function",Ct=t=>it(t)==="[object Map]",It=t=>it(t)==="[object Set]",_t=t=>it(t)==="[object Date]",Lt=t=>it(t)==="[object RegExp]",Ft=t=>pt(t)&&lt(t?.then)&&lt(t?.catch),at=t=>t==null,Pe=t=>t!=null,Ne=(t,e)=>t!==e;function J(t){return it(t)==="[object Object]"}function st(t){return V(t)?t:[t]}o();o();o();o();o();function Qe(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 Ut="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function tn(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+=Ut[Number.parseInt(n.slice(i,i+6).padEnd(6,"0"),2)];let r=e.length%4;return r!==0&&(e+="=".repeat(4-r)),e}function en(t){let e="",n="";for(let r=0;r<t.length&&t[r]!=="=";r++)n+=Ut.indexOf(t[r]).toString(2).padStart(6,"0");for(let r=0;r<n.length;r+=8){let i=Number.parseInt(n.slice(r,r+8),2);i&&(e+=String.fromCharCode(i))}return e}o();function on(...t){return t.reduce((e,n)=>function(...r){return n(e(...r))})}function sn(...t){return t.reduce((e,n)=>function(...r){return e(n(...r))})}o();function cn(t,e=500){let n=null;return function(...r){n&&clearTimeout(n),n=setTimeout(()=>{t.apply(this,r)},e)}}o();function ut(t){let e=new WeakMap;function n(r){if(!pt(r))return r;if(_t(r))return new Date(r);if(Lt(r))return new RegExp(r);if(Ft(r))return r;if(e.has(r))return e.get(r);if(Ct(r)){let h=new Map;return e.set(r,h),r.forEach((M,$)=>h.set(n($),n(M))),h}if(It(r)){let h=new Set;return e.set(r,h),r.forEach(M=>h.add(n(M))),h}let i=V(r)?Object.setPrototypeOf([],Object.getPrototypeOf(r)):Object.create(Object.getPrototypeOf(r));e.set(r,i);let x=Object.getOwnPropertyDescriptors(r);for(let h of Reflect.ownKeys(x)){let M=x[h];M.get||M.set?Object.defineProperty(i,h,M):Object.defineProperty(i,h,{...M,value:n(M.value)})}return i}return n(t)}o();function Wt(t,e,n={}){return Zt(Ht(t,n),Ht(e,n),n)}function Zt(t,e,n){return V(t)?se(t,e,n):ie(t,e,n)}function ie(t,e,n){if(!J(e))return e;let r=Object.getOwnPropertyDescriptors(e);return Reflect.ownKeys(e).forEach(i=>{(J(t[i])||V(t[i]))&&(J(e[i])||V(e[i]))?t[i]=Zt(t[i],e[i],n):Object.defineProperty(t,i,r[i])}),t}function se(t,e,n){let{mergeStrategy:r="replace"}=n;if(V(e))switch(r){case"merge":return t.concat(e);case"replace":return e;default:return e}return e}function Ht(t,e){let{deepClone:n=!0}=e;return n?ut(t):t}o();var gt=class extends Error{constructor(e,n="Utils"){super(e),this.name=n}};function O(t,e){throw new gt(`[${t}] ${e}`)}function zt(t,e){let n=dt(t)?new gt(`[${t}] ${e}`,"UtilsWarn"):t;console.warn(n)}var $n=({from:t,replacement:e,version:n,type:r="API"})=>{zt(`${r}`,`${t} is about to be deprecated in version ${n}, please use ${e} instead.`)};function wn(t,e,n,r){let i=`Invalid params: type check failed for params "${e}". Expected ${n}, got ${Ot(r)} with value ${r}.`;O(t,i)}function Mn(t,e,n,r){let i=`Invalid params: type check failed for params "${e}". Expected ${n}, got ${Ot(r)} with value ${r}.`;zt(t,i)}o();var ht=(t,e,...n)=>{if(!e)return;let r=n.length===0?"":n.length===1?n[0]:n;console[t](`[Log] ${e}:`,r)},yt=(t,...e)=>{ht("info",t,...e)};yt.info=(t,...e)=>{ht("info",t,...e)};yt.error=(t,...e)=>{ht("error",t,...e)};yt.warn=(t,...e)=>{ht("warn",t,...e)};typeof globalThis<"u"&&(globalThis.log=yt);o();function ae(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 x of i){let[h,M]=x.split("=");r[h]=n?decodeURIComponent(M):M}return r}function Kt(t,e){let{encode:n=!0}=e||{},r=[];for(let i in t){let x=t[i];r.push(`${i}=${n?encodeURIComponent(x):x}`)}return r.join("&")}function ue(t,e,n){let r=Wt({encode:!0},{...n}),i=Kt(e,r);return t.includes("?")?t.endsWith("?")||t.endsWith("&")?`${t}${i}`:`${t}&${i}`:`${t}?${i}`}var vn={parse:ae,stringify:Kt,appendQueryString:ue};o();function jn(t,e=500){let n=null;return function(...r){if(at(n))return n=Date.now(),t.apply(this,r);let i=Date.now();if(i-n>=e)return n=i,t.apply(this,r)}}o();function Nn(t){return!at(t)&&/^[\dA-Z\u4E00-\u9FA5]+$/i.test(t)}function Cn(t){return!at(t)&&/^[A-Z\u4E00-\u9FA5]+$/i.test(t)}function In(t){return!at(t)&&/^[\d!"#$%&'()*+,./:;<=>?@A-Z[\\\]^_`{|}~]+$/.test(t)}function _n(t){return/^[\dA-Z_]+$/.test(t)}o();function Wn(t){ce(t);let{fn:e,maxAttempts:n=3,retryDelay:r=1e3,enableExponentialBackoff:i=!1,signal:x}=t,h,M=x?new Promise((R,N)=>{let E=()=>N(new Error("Operation Cancelled"));x.addEventListener("abort",E),h=()=>x.removeEventListener("abort",E)}):null;return new Promise((R,N)=>{(async()=>{for(let k=1;k<=n;k++){if(x?.aborted)return N(new Error("Operation Cancelled"));try{let K=await Promise.race(M?[e(),M]:[e()]);return R(K)}catch(K){if(K instanceof Error&&K.message==="Operation Cancelled"||k===n)return N(K);let l=i?r*2**(k-1):r;log("withRetry",`Attempt ${k}/${n} failed. Retrying in ${l}ms...`),await new Promise(w=>setTimeout(w,l))}}})()}).finally(()=>h?.())}function ce(t){J(t)||O("withRetry",'"Options" must be an object'),typeof t.fn!="function"&&O("withRetry",'"fn" must be a function that returns a Promise'),!ct(t.maxAttempts)&&(!Number.isInteger(t.maxAttempts)||t.maxAttempts<1)&&O("withRetry",'"maxAttempts" must be a positive integer'),!ct(t.retryDelay)&&(!W(t.retryDelay)||t.retryDelay<0)&&O("withRetry",'"retryDelay" must be a non-negative number'),!ct(t.enableExponentialBackoff)&&!Pt(t.enableExponentialBackoff)&&O("withRetry",'"enableExponentialBackoff" must be a boolean'),!ct(t.signal)&&typeof t.signal!="object"&&O("withRetry",'"signal" must be an AbortSignal')}function Bt(t,e,n={}){let{includeProto:r=!1,includeSymbols:i=!0,includeNonEnum:x=!1}=n,h={};return J(t)&&st(e).forEach($=>{Nt($)&&!i||!(r?$ in t:Object.hasOwn(t,$))||!x&&(r?fe(t,$):Object.getOwnPropertyDescriptor(t,$))?.enumerable===!1||(h[$]=ut(t[$]))}),h}function fe(t,e){let n=t;for(;n!==null;){let r=Object.getOwnPropertyDescriptor(n,e);if(r)return r;n=Object.getPrototypeOf(n)}}function dr(t,e){if(!J(t))return{};let n=ut(t),r=st(e),i=Object.keys(n).filter(x=>!r.includes(x));return Bt(n,i)}o();o();function Or(t,e){return(!W(t)||t<=0)&&O("generateRandomArray","num must be greater than 0"),lt(e)||O("generateRandomArray","cb must be a function"),Array.from({length:t}).fill(0).map((n,r)=>e(n,r))}o();function Ar(){return`#${Math.random().toString(16).slice(2,8).padEnd(6,"0")}`}o();var Q=Mt(At(),1),Xt=Mt(Vt(),1);o();o();function z(t){return t[Math.floor(Math.random()*t.length)]}function P(t={}){W(t)&&(t={max:t});let{min:e=1,max:n=z(pe())}=t;me(e,n);let r=Math.ceil(e),i=Math.floor(n);return Math.floor(Math.random()*(i-r+1)+r)}function me(t,e){let n=Math.ceil(t),r=Math.floor(e);Number.isSafeInteger(n)||O("getRandomInt",`The minimum value Math.ceil(${t}) should be a safe integer`),Number.isSafeInteger(r)||O("getRandomInt",`The maximum value Math.floor(${e}) should be a safe integer`),r<n&&(e>=t&&O("getRandomInt",`No integer value found between ${t} and ${e}`),O("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)})}Q.default.extend(Xt.default);function Rt(t={}){let{start:e="1800-01-01 00:00:00",end:n=(0,Q.default)().format("YYYY-MM-DD HH:mm:ss"),format:r="YYYY-MM-DD HH:mm:ss"}=t;(!(0,Q.default)(e).isValid()||!(0,Q.default)(n).isValid())&&O("generateRandomDate","start and end parameters must be valid date format");let i=(0,Q.default)(e).year(),x=(0,Q.default)(n).year(),h=P({min:i,max:x}),M=P({min:1,max:12}),$=P({min:1,max:31}),R=P(23),N=P(59),E=P(59),k=(0,Q.default)(`${h}-${M}-${$} ${R}:${N}:${E}`);return k.isBefore((0,Q.default)(e))||k.isAfter((0,Q.default)(n))?Rt(t):k.format(r)}o();o();function X(t={}){let e=de(t),n=ge(e);he(n);let{length:r}=e;ye(r.min,r.max);let i=P(r),x=e.prefix||"";for(let h=0;h<i;h++)x+=n.charAt(Math.floor(Math.random()*n.length));return x+(e.suffix||"")}var le=16,kt=1;function de(t){let e=W(t);return{lowerCase:!0,upperCase:!0,number:!0,...e?{}:t,length:e?{max:t,min:t}:W(t.length)?{max:t.length,min:t.length}:{max:le,min:kt,...t.length},extra:e?[]:[...new Set(st(t.extra||[]))]}}function ge(t){let e="";return t.lowerCase&&(e+="abcdefghijklmnopqrstuvwxyz"),t.upperCase&&(e+="ABCDEFGHIJKLMNOPQRSTUVWXYZ"),t.number&&(e+="0123456789"),e+=st(t.extra).join(""),e}function he(t){t.length===0&&O("getRandomString","At least one character set (lowercase, uppercase, number) must be enabled or extra characters provided")}function ye(t,e){Number.isInteger(t)||O("getRandomString","min must be an integer"),Number.isInteger(e)||O("getRandomString","max must be an integer"),t<kt&&O("getRandomString",`Minimum length cannot be less than ${kt}`),e<t&&O("getRandomString","Maximum length cannot be less than minimum length")}function be(){let t=["gmail.com","outlook.com.cn","example.com","qq.com","163.com","test.com.cn"],e=`${X(1)}${X({length:P({max:30,min:1})})}${X(1)}@${z(t)}`;return/\.{2,}/.test(e)?be():e}o();function to(t={}){W(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(`Maximum value ${n} should be greater than minimum value ${e}`);return Math.random()*(n-e)+e}o();o();function jt(t,e){(!W(t)||t<=0)&&O("generateRandomStringFromSource","num must be greater than 0"),(!V(e)||e.length===0)&&O("generateRandomStringFromSource","source cannot be empty array");let n="";for(let r=0;r<t;r++)n+=z(e);return n}function mo(){let t=P({min:1e5,max:999999}),e=[0,1,2,3,4,5,6,7,8,9];return[t,Rt({format:"YYYYMMDD"}),jt(3,e),jt(1,[...e,"X","x"])].join("")}o();function yo(){return z(["13","14","15","16","17","18","19"])+P(999999999).toString().padEnd(9,"0")}o();function Oo(){let t=["http://","https://"],e=[".com",".net",".org",".cn",".top"],n=[`?name=${X({length:{min:4,max:8}})}`,`?id=${P()}`,`?page=${X({length:{min:2,max:4}})}`,`?query=${X({length:{min:5,max:6}})}`,`?search=${X({length:{min:1,max:4}})}`,`?token=${X({length:{min:16,max:16}})}`];return`${z(t)}${X({length:{min:5,max:25}})}${z(e)}${z(n)}`}o();o();o();o();function Wo(t){return/^\d+$/.test(t)}function Zo(t){return/^[A-Z]+$/i.test(t)}function zo(t){return/^[A-Z]+$/.test(t)}function Ko(t){return/^[\dA-Z]+$/.test(t)}function Bo(t){return/^[\dA-Z\u4E00-\u9FA5]+$/.test(t)}function Vo(t){return/^[a-z]+$/.test(t)}function Xo(t){return/^[\da-z]+$/.test(t)}function Go(t){return/^[\da-z\u4E00-\u9FA5]+$/.test(t)}function qo(t){return/^[\u4E00-\u9FA5]+$/.test(t)}o();function ti(t){return/^-?(?:0|[1-9]\d*)\.\d+$/.test(t)}function ei(t){return/^(?:0\.0*[1-9]\d*|[1-9]\d*\.\d+)$/.test(t)}function ni(t){return/^(?:0|[1-9]\d*)\.\d+$/.test(t)}function ri(t){return/^-(?:0\.0*[1-9]\d*|[1-9]\d*\.\d+)$/.test(t)}function oi(t){return/^-(?:0|[1-9]\d*)\.\d+$/.test(t)}o();function ai(t){return/^-?(?:0|[1-9]\d*)$/.test(t)}function ui(t){return/^[1-9]\d*$/.test(t)}function ci(t){return/^(?:0|[1-9]\d*)$/.test(t)&&!Object.is(t,-0)}function fi(t){return/^-[1-9]\d*$/.test(t)}function mi(t){return/^-(?:0|[1-9]\d*)$/.test(t)||Object.is(t,-0)}o();var gi=t=>{if(!dt(t))return!1;let e=t.trim();if(e===""||e.includes("e")||e.includes("E")||e.includes("0x")||e.includes("0X")||e.includes("0o")||e.includes("0O")||e.includes("0b")||e.includes("0B"))return!1;let n=Number(e);return!(!Number.isFinite(n)||n>Number.MAX_SAFE_INTEGER||n<Number.MIN_SAFE_INTEGER)};o();var Gt=Mt(At(),1);function bi(t){return/^1[3-9]\d{9}$/.test(t)}function xi(t){return/^https?:\/\/\S+$/i.test(t)}function $i(t){return/^[^\s@]+@[^\s@][^\s.@]*\.[^\s@]+$/.test(t)}function wi(t){return t===""}function xe(t,e="YYYY-MM-DD HH:mm:ss"){return(0,Gt.default)(t,e,!0).isValid()}function Mi(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)&&xe(t.slice(6,14),"YYYYMMDD")}export{gt as UtilsError,en as base64Decode,tn as base64Encode,st as castArray,on as compose,sn as composeRight,cn as debounce,zt as debugWarn,Mn as debugWarnInvalidTypeMessage,Qe as decimalToBinary,ut as deepClone,Wt as deepMerge,$n as deprecated,Or as generateRandomArray,Ar as generateRandomColor,Rt as generateRandomDate,be as generateRandomEmail,to as generateRandomFloat,mo as generateRandomIdCard,yo as generateRandomMobilePhone,jt as generateRandomStringFromSource,P as getRandomInt,z as getRandomItem,X as getRandomString,Oo as getRandomUrl,Ne as hasChanged,V as isArray,Pt as isBoolean,qo as isChineseString,_t as isDate,xe as isDateString,Pe as isDef,$i as isEmail,wi as isEmptyString,Zo as isEnglishAphabet,ti as isFloat,lt as isFunction,Mi as isIdCard,ai as isInteger,Vo as isLowerCase,Xo as isLowerCaseAndNumber,Go as isLowerCaseAndNumberAndChinese,Ct as isMap,bi as isMobilePhone,ri as isNegativeFloat,fi as isNegativeInteger,ni as isNonNegativeFloat,ci as isNonNegativeInteger,oi as isNonPositiveFloat,mi as isNonPositiveInteger,Ye as isNull,W as isNumber,Wo as isNumberOrNumberString,ve as isObject,pt as isObjectLike,J as isPlainObject,ei as isPositiveFloat,ui as isPositiveInteger,Ft as isPromise,Lt as isRegExp,It as isSet,dt as isString,gi as isStringNumber,Nt as isSymbol,xi as isURL,at as isUndef,ct as isUndefined,zo as isUpperCase,Ko as isUpperCaseAndNumber,Bo as isUpperCaseAndNumberAndChinese,oe as objectToString,dr as omit,Bt as pick,vn as qs,jn as throttle,O as throwError,wn as throwErrorInvalidTypeMessage,it as toTypeString,Ot as toTypeValue,Cn as validatorChineseOrEnglish,Nn as validatorChineseOrEnglishOrNumber,In as validatorUppercaseOrNumbersOrSpecial,_n as validatorUppercaseOrNumbersOrUnderline,Wn as withRetry};