@creejs/commons-lang 2.1.20 → 2.1.21

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,2 +1,2 @@
1
- var t={constructorName:e,defaults:function(t,...e){if(null==t)throw new TypeError('"target" must not be null or undefined');for(const r of e)if(null!=r)for(const e in r)void 0===t[e]&&(t[e]=r[e]);return t},extend:r,extends:r,equals:function(t,e){if(t===e)return!0;if("function"==typeof t?.equals)return t.equals(e);if("function"==typeof e?.equals)return e.equals(t);return!1},isBrowser:n,isNode:function(){return!n()},cloneToPlainObject:function(t){if(null==t)return t;if("object"!=typeof t)throw new Error("Only Object allowed to clone");return{...t}},deepCloneToPlainObject:function(t){if(null==t)return t;if("object"!=typeof t)throw new Error("Only Object allowed to clone");return JSON.parse(JSON.stringify(t))}};function e(t){return t?.constructor?.name}function r(t,...e){if(null==t)throw new TypeError('"target" must not be null or undefined');for(const r of e)if(null!=r)for(const e in r)t[e]=r[e];return t}function n(){return"undefined"!=typeof window&&"undefined"!=typeof document}var o={isArray:i,isBoolean:s,isBuffer:function(t){return null!=t&&Buffer.isBuffer(t)},isFunction:u,isInstance:f,isIterable:function(t){return null!=t&&"function"==typeof t[Symbol.iterator]},isDate:function(t){return null!=t&&t instanceof Date},isError:function(t){return null!=t&&t instanceof Error},isMap:function(t){return null!=t&&"object"==typeof t&&t.constructor===Map},isWeakMap:function(t){return null!=t&&"object"==typeof t&&t.constructor===WeakMap},isNumber:g,isPositive:c,isNegative:y,isNotNegative:l,isNil:a,isNullOrUndefined:function(t){return null==t},isNull:h,isUndefined:p,isPlainObject:d,isObject:w,isPromise:m,isRegExp:function(t){return null!=t&&"object"==typeof t&&t.constructor===RegExp},isSet:function(t){return null!=t&&"object"==typeof t&&t.constructor===Set},isWeakSet:function(t){return null!=t&&"object"==typeof t&&t.constructor===WeakSet},isStream:function(t){return null!=t&&"function"==typeof t.pipe},isString:b,isSymbol:A,isPrimitive:function(t){return null!==t&&("string"==typeof t||"number"==typeof t||"boolean"==typeof t)},isInt8Array:$,isUint8Array:N,isUint8ClampedArray:v,isInt16Array:O,isUint16Array:j,isInt32Array:P,isUint32Array:x,isFloat32Array:S,isFloat64Array:U,isBigInt64Array:B,isBigUint64Array:T,isTypedArray:E,isArrayBuffer:I};function i(t){return Array.isArray(t)}function s(t){return"boolean"==typeof t}function u(t){return"function"==typeof t}function f(t){return null!=t&&"object"==typeof t&&!d(t)}function a(t){return null==t}function c(t){return!!g(t)&&t>0}function l(t){return!!g(t)&&t>=0}function y(t){return!!g(t)&&t<0}function h(t){return null===t}function p(t){return void 0===t}function g(t){return null!=t&&"number"==typeof t}function w(t){return null!=t&&"object"==typeof t}function d(t){return null!==t&&"object"==typeof t&&(t.constructor===Object||void 0===t.constructor)}function m(t){return null!=t&&"function"==typeof t.then}function b(t){return null!=t&&"string"==typeof t}function A(t){return null!=t&&"symbol"==typeof t}function E(t){return ArrayBuffer.isView(t)&&t.constructor!==DataView}function $(t){return t instanceof Int8Array}function N(t){return t instanceof Uint8Array}function v(t){return t instanceof Uint8ClampedArray}function O(t){return t instanceof Int16Array}function j(t){return t instanceof Uint16Array}function P(t){return t instanceof Int32Array}function x(t){return t instanceof Uint32Array}function S(t){return t instanceof Float32Array}function U(t){return t instanceof Float64Array}function B(t){return t instanceof BigInt64Array}function T(t){return t instanceof BigUint64Array}function I(t){return t instanceof ArrayBuffer}var k={assertNumber:F,assertPositive:q,assertNegative:function(t,e){if(!y(t))throw new Error(`${e?'"'+e+'" ':""}Not Negative: ${t}`)},assertNotNegative:D,assertBoolean:function(t,e){if(!s(t))throw new Error(`${e?'"'+e+'" ':""}Not Boolean: type=${typeof t} value=${Q(t)}`)},assertObject:M,assertPlainObject:function(t,e){if(!d(t))throw new Error(`${e?'"'+e+'" ':""}Not PlainObject: type=${typeof t} value=${Q(t)}`)},assertSymbol:function(t,e){if(!A(t))throw new Error(`${e?'"'+e+'" ':""}Not Symbol: type=${typeof t} value=${Q(t)}`)},assertFunction:J,assertInstance:function(t,e){if(!f(t))throw new Error(`${e?'"'+e+'" ':""}Not Class Instance: type=${typeof t} value=${Q(t)}`)},assertPromise:R,assertNil:function(t,e){if(!a(t))throw new Error(`${e?'"'+e+'" ':""}Neither Null nor Undefined: type=${typeof t} value=${Q(t)}`)},assertNotNil:W,assertNull:function(t,e){if(!h(t))throw new Error(`${e?'"'+e+'" ':""}Not Null: type=${typeof t} value=${Q(t)}`)},assertNotNull:function(t,e){if(h(t))throw new Error((e?'"'+e+'" ':"")+"Should Not Null")},assertUndefined:function(t,e){if(!p(t))throw new Error(`${e?'"'+e+'" ':""}Not Undefined: type=${typeof t} value=${Q(t)}`)},assertString:C,assertArray:L,assertStringOrSymbol:function(t,e){if(!b(t)&&!A(t))throw new Error(`${e?'"'+e+'" ':""}Not String or Symbol: type=${typeof t} value=${Q(t)}`)},assertInt8Array:function(t,e){if($(t))throw new Error((e?'"'+e+'" ':"")+"Not Int8Array")},assertUint8Array:function(t,e){if(N(t))throw new Error((e?'"'+e+'" ':"")+"Not Uint8Array")},assertUint8ClampedArray:function(t,e){if(v(t))throw new Error((e?'"'+e+'" ':"")+"Not Uint8ClampedArray")},assertInt16Array:function(t,e){if(O(t))throw new Error((e?'"'+e+'" ':"")+"Not Int16Array")},assertUint16Array:function(t,e){if(j(t))throw new Error((e?'"'+e+'" ':"")+"Not Uint16Array")},assertInt32Array:function(t,e){if(P(t))throw new Error((e?'"'+e+'" ':"")+"Not Int32Array")},assertUint32Array:function(t,e){if(x(t))throw new Error((e?'"'+e+'" ':"")+"Not Uint32Array")},assertFloat32Array:function(t,e){if(S(t))throw new Error((e?'"'+e+'" ':"")+"Not Float32Array")},assertFloat64Array:function(t,e){if(U(t))throw new Error((e?'"'+e+'" ':"")+"Not Float64Array")},assertBigInt64Array:function(t,e){if(B(t))throw new Error((e?'"'+e+'" ':"")+"Not BigInt64Array")},assertBigUint64Array:function(t,e){if(T(t))throw new Error((e?'"'+e+'" ':"")+"Not BigUint64Array")},assertTypedArray:function(t,e){if(E(t))throw new Error((e?'"'+e+'" ':"")+"Not TypedArray")},assertArrayBuffer:H};function L(t,e){if(!Array.isArray(t))throw new Error(`${e?'"'+e+'" ':""}Not Array: type=${typeof t} value=${Q(t)}`)}function C(t,e){if(!b(t))throw new Error(`${e?'"'+e+'" ':""}Not String: type=${typeof t} value=${Q(t)}`)}function F(t,e){if(!g(t))throw new Error(`${e?'"'+e+'" ':""}Not Number: type=${typeof t} value=${Q(t)}`)}function q(t,e){if(!c(t))throw new Error(`${e?'"'+e+'" ':""}Not Positive: ${t}`)}function D(t,e){if(!l(t))throw new Error(`${e?'"'+e+'" ':""}Not "0 or Positive": ${t}`)}function M(t,e){if(!w(t))throw new Error(`${e?'"'+e+'" ':""}Not Object: type=${typeof t} value=${Q(t)}`)}function J(t,e){if(!u(t))throw new Error(`${e?'"'+e+'" ':""}Not Function: type=${typeof t} value=${Q(t)}`)}function R(t,e){if(!m(t))throw new Error(`${e?'"'+e+'" ':""}Not Promise: type=${typeof t} value=${Q(t)}`)}function W(t,e){if(a(t))throw new Error((e?'"'+e+'" ':"")+"Should Not Nil")}function H(t,e){if(!I(t))throw new Error((e?'"'+e+'" ':"")+"Not ArrayBuffer")}var V={isEmpty:z,assertNotEmpty:_,isBlank:G,assertNotBlank:function(t){if(G(t))throw new Error(`Blank String: ${t}`)},capitalize:function(t){if(C(t),0===t.length)return t;const e=t.charAt(0),r=e.toUpperCase();return e===r?t:r+t.slice(1)},decapitalize:function(t){if(C(t),0===t.length)return t;const e=t.charAt(0),r=e.toLowerCase();return e===r?t:r+t.slice(1)},splitWithFixedLength:function(t,e,r=" "){if(C(t),F(e),C(r),0===t.length)return[];if(e<=0)throw new Error("length muse >=0");if(t.length<e)return[t.padEnd(e,r)];const n=[];for(let o=0;o<t.length;o+=e){const i=t.substring(o,o+e);n.push(i.padEnd(e,r))}return n},split:function(t,...e){C(t);if(0===t.length)return[];const r=[...e];0===e.length&&e.push(",");const n=K(t,...r);if(0===n.length)return[];const o=[];let i="",s=0;for(const{marker:e,index:r}of n)i=t.substring(s,r),o.push(i),s=r+e.length;return i=t.substring(s),o.push(i),o},findMarkerPositions:function(t,...e){if(C(t),0===e.length)throw new Error("At least one marker must be provided");const r=[];for(const n of new Set(e)){if(z(n))continue;C(n);let e=t.indexOf(n);for(;-1!==e;)r.push({marker:n,index:e}),e=t.indexOf(n,e+n.length)}return r.sort((t,e)=>t.index-e.index),r},findMarkerPositionsRegex:K,substringBefore:function(t,e){if(C(t),C(e),0===t.length||0===e.length)return;const r=t.indexOf(e);if(-1===r)return;return t.substring(0,r)},substringBeforeLast:function(t,e){if(C(t),C(e),0===t.length||0===e.length)return;const r=t.lastIndexOf(e);if(-1===r)return;return t.substring(0,r)},substringAfter:function(t,e){if(C(t),C(e),0===t.length||0===e.length)return;const r=t.indexOf(e);if(-1===r)return;return t.substring(r+e.length)},substringAfterLast:function(t,e){if(C(t),C(e),0===t.length||0===e.length)return;const r=t.lastIndexOf(e);if(-1===r)return;return t.substring(r+e.length)},substringBetween:function(t,e,r){_(t),_(e),_(r);const n=t.indexOf(e);if(-1===n)return;const o=t.indexOf(r,n+e.length);if(-1===o)return;return t.substring(n+e.length,o)},substringBetweenGreedy:function(t,e,r){_(t),_(e),_(r);const n=t.indexOf(e);if(-1===n)return;const o=t.lastIndexOf(r);if(-1===o||o<=n)return;return t.substring(n+e.length,o)},substringsBetween:function(t,e,r){_(t),_(e),_(r);const n=[];let o=0;for(;;){const i=t.indexOf(e,o);if(-1===i)break;const s=t.indexOf(r,i+e.length);if(-1===s)break;n.push(t.substring(i+e.length,s)),o=s+r.length}return n},safeToString:Q};function z(t){return null==t||(C(t),0===t.length)}function _(t){if(z(t))throw new Error(`Empty String: ${t}`)}function G(t){return null==t||(C(t),0===t.trim().length)}function K(t,...e){if(C(t),0===e.length)throw new Error("At least one marker must be provided");const r=[...new Set(e.filter(t=>null!=t))].map(t=>(C(t),t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"))),n=new RegExp(r.map(t=>`(${t})`).join("|"),"g"),o=[];let i=null;for(;null!==(i=n.exec(t));){for(let t=1;t<i.length;t++)if(i[t]){o.push({marker:e[t-1],index:i.index});break}0===i[0].length&&n.lastIndex++}return o}function Q(t){let e;try{e=JSON.stringify(t)}catch(r){e=t.toString()}return e}var X={quiet:function(t,e){J(t);try{const r=t();return m(r)?r.catch(t=>{e&&e.isErrorEnabled()&&e.error("quiet() with async error:",t)}):r}catch(t){e&&e.isErrorEnabled()&&e.error("quiet() with sync error:",t)}},quietKeepError:function(t,e){J(t),L(e);try{const r=t();return m(r)?r.catch(t=>e.push(t)):r}catch(t){e.push(t)}}},Y={any:function(t){if(L(t),0===t.length)throw new Error("Empty Tasks");const e=Z(),r=[];for(let n=0;n<t.length;n++){const i=t[n];let s;if(o.isPromise(i))s=i;else{if(!o.isFunction(i)){r.push(new Error(`Invalid Task at index ${n}/${t.length-1}: ${i}`));continue}s=et(i)}s.then(t=>{e.resolve(t)}).catch(n=>{r.push(n),r.length>=t.length&&e.reject(r)})}r.length===t.length&&e.reject(r);return e.promise},defer:Z,delay:function(t,e){o.isNumber(t)?(e=t,t=Promise.resolve()):null==t&&null==e&&(e=1,t=Promise.resolve());null!=t&&R(t),F(e=e??1e3);const r=Z(),n=Date.now();return t.then((...t)=>{const o=Date.now()-n;o<e?setTimeout(()=>r.resolve(...t),e-o):r.resolve(...t)}).catch(t=>{const o=Date.now()-n;o<e?setTimeout(()=>r.reject(t),e-o):r.reject(t)}),r.promise},timeout:function(t,e,r){R(t),F(e=e??1);const n=Z(e,r),o=Date.now();return t.then((...t)=>{Date.now()-o<=e?n.resolve(...t):n.reject(new Error(r??`Promise Timeout: ${e}ms`))}).catch(t=>{!n.resolved&&!n.rejected&&n.reject(t)}),n.promise},allSettled:tt,returnValuePromised:et,series:async function(t){L(t);const e=[];for(const r of t)if(J(r),o.isFunction(r))e.push(await et(r));else{if(!o.isPromise(r))throw new Error(`Invalid Task: ${r}`);e.push(await r)}return e},seriesAllSettled:async function(t){L(t);const e=[];for(const r of t){J(r);try{e.push({ok:!0,result:await r()})}catch(t){e.push({ok:!1,result:t})}}return e},parallel:async function(t,e=5){if(L(t),F(e),e<=0)throw new Error(`Invalid maxParallel: ${e}, should > 0`);t.forEach(t=>J(t));const r=[];if(t.length<=e){const e=await Promise.all(t.map(t=>et(t)));return r.push(...e),r}const n=[];for(const o of t)if(J(o),n.push(o),n.length>=e){const t=await Promise.all(n.map(t=>et(t)));r.push(...t),n.length=0}if(n.length>0&&n.length<e){const t=await Promise.all(n.map(t=>et(t)));r.push(...t)}return r},parallelAny:async function(t,e=5){if(L(t,"tasks"),F(e),0===t.length)throw new Error("Empty Tasks");if(e<=0)throw new Error(`Invalid maxParallel: ${e}, should > 0`);const r=[];let n=0,i=0;const s=Z();function u(){if(n>=t.length)return;if(i>e)return;const f=t[n++];let a;if(i++,o.isPromise(f))a=f;else{if(!o.isFunction(f))return r.push(new TypeError(`Invalid task: ${f}`)),void u();a=et(f)}a.then(t=>{s.resolve(t)}).catch(e=>{r.push(e),r.length>=t.length&&s.pending?s.reject(r):u()}).finally(()=>{i--})}for(;i<e;)u();return s.promise},parallelAllSettled:async function(t,e=5){if(L(t),F(e),e<=0)throw new Error(`Invalid maxParallel: ${e}, should > 0`);t.forEach(t=>J(t));const r=[];if(t.length<=e){const e=await tt(t.map(t=>et(t)));return r.push(...e),r}const n=[];for(const o of t)if(n.push(o),n.length>=e){const t=await tt(n.map(t=>et(t)));r.push(...t),n.length=0}if(n.length>0&&n.length<e){const t=await tt(n.map(t=>et(t)));r.push(...t)}return r},wait:function(t){D(t);const e={};let r;return e.timerHandler=r=setTimeout(()=>{clearTimeout(r),e._resolve()},t),e.promise=new Promise((t,n)=>{e._resolve=e=>{null!=r&&clearTimeout(r),t(e)}}),e.wakeup=()=>{e._resolve()},e}};function Z(t=-1,e){F(t);const r={};let n;return r.pending=!0,r.canceled=!1,r.rejected=!1,r.resolved=!1,t>=0&&(r.timerCleared=!1,r.timerHandler=n=setTimeout(()=>{clearTimeout(n),r.timerCleared=!0,r.reject(new Error(e??`Promise Timeout: ${t}ms`))},t)),r.promise=new Promise((t,e)=>{r.resolve=e=>{r.resolved||r.rejected||r.canceled||(null!=n&&(clearTimeout(n),r.timerCleared=!0),r.pending=!1,r.canceled=!1,r.rejected=!1,r.resolved=!0,t(e))},r.reject=t=>{r.resolved||r.rejected||r.canceled||(null!=n&&(clearTimeout(n),r.timerCleared=!0),r.pending=!1,r.canceled=!1,r.resolved=!1,r.rejected=!0,e(t))}}),r.cancel=r.promise.cancel=t=>{r.resolved||r.rejected||r.canceled||(null!=n&&(clearTimeout(n),r.timerCleared=!0),r.reject(t??new Error("Cancelled")),r.canceled=r.promise.canceled=!0)},r}async function tt(t){L(t);const e=await Promise.allSettled(t),r=[];for(const t of e)"fulfilled"===t.status&&r.push({ok:!0,result:t.value}),"rejected"===t.status&&r.push({ok:!1,result:t.reason});return r}function et(t){try{const e=t();return o.isPromise(e)?e:Promise.resolve(e)}catch(t){return Promise.reject(t)}}const{isPlainObject:rt}=o;var nt={proxy:ot,newProxyInstance:function(t,e,r,n=!0){const o=ot(t,r,n);return Reflect.construct(o,e??[])}};function ot(t,e,r=!0){if("function"!=typeof t)throw new TypeError(`Not Class: type=${typeof t}, value=${JSON.stringify(t)}`);if(null!=e){if(!rt(e))throw new TypeError(`Not PropertyHandler: type=${typeof e}, value=${JSON.stringify(e)}`);const{get:t,set:r}=e;if(null!=t&&"function"!=typeof t)throw new TypeError(`Not PropertyHandler.get: type=${typeof t}, value=${JSON.stringify(t)}`);if(null!=r&&"function"!=typeof r)throw new TypeError(`Not PropertyHandler.set: type=${typeof r}, value=${JSON.stringify(r)}`)}const n={construct(t,n,o){const i=Reflect.construct(t,n);return new Proxy(r?Object.preventExtensions(i):i,e??{})}};return new Proxy(t,n)}var it={proxy:function(t,e,r=!0){if(a(t)||!w(t)||i(t))throw new TypeError(`Not Object: type=${typeof t}, value=${JSON.stringify(t)}`);return new Proxy(r?Object.preventExtensions(t):t,e??{})}};function st(t){M(t,"obj");const e=new Set;let r=t;for(;r&&r!==Object.prototype;){const n=Object.getOwnPropertyNames(r);for(const r of n)"constructor"!==r&&"function"==typeof t[r]&&e.add(r);r=Object.getPrototypeOf(r)}return[...new Set(e)]}var ut={getMethodsOfClass:function(t){J(t,"cls");const e=new Set;let r=t.prototype;for(;r&&r!==Object.prototype;){const t=Object.getOwnPropertyNames(r);for(const n of t)"constructor"!==n&&"function"==typeof r[n]&&e.add(n);r=Object.getPrototypeOf(r)}return[...new Set(e)]},getStaticMethodsOfClass:function(t){J(t,"cls");const e=new Set;let r=t;for(;r&&r!==Object.getPrototypeOf(Object);){const t=Object.getOwnPropertyNames(r);for(const n of t)"function"==typeof r[n]&&e.add(n);r=Object.getPrototypeOf(r)}return[...e]},getMethods:st,getMethodsOfObject:st},ft={startsWith:function(t,e){W(t,"src"),W(e,"searching");return ct(t.subarray(0,e.length),e)},isSameType:at,equals:ct};function at(t,r){return W(t,"src"),W(r,"target"),e(t)===e(r)}function ct(t,e){if(W(t,"src"),W(e,"target"),!at(t,e))return!1;if(t.byteLength!==e.byteLength)return!1;const r=new DataView(t.buffer,t.byteOffset,t.byteLength),n=new DataView(e.buffer,e.byteOffset,e.byteLength);for(let e=0;e<t.byteLength;e++)if(r.getUint8(e)!==n.getUint8(e))return!1;return!0}var lt={readString:function(t,e=0,r){if(H(t),D(e),e>=t.byteLength)return;let n=null;null!=r?(q(r),n=e+r>=t.byteLength?new Uint8Array(t,e):new Uint8Array(t,e,r)):n=new Uint8Array(t,e);return yt.decode(n)},writeString:function(t,e,r=0){H(t,"buffer"),C(e,"str"),D(r,"offset");const n=ht.encode(e),o=n.byteLength;if(r+o>t.byteLength)throw new Error(`offset + str.byteLength > buffer.byteLength:${r+o} > ${t.byteLength}`);new Uint8Array(t,r,n.byteLength).set(n)},writeArrayBuffer:function(t,e,r=0,n=0,o){H(t),H(e),F(r),F(n);const i=t.byteLength;if(r<-1*i)r=0;else if(r<0)r+=i;else if(r>=i)throw new Error(`Out of target Bounds: targetOffset(${r}) >= targetLength(${i})`);const s=e.byteLength;if(n<-1*s)n=0;else if(n<0)n+=s;else if(n>=s)throw new Error(`Out of data Bounds: dataOffset(${n}) >= dataArrayBufferLength(${s})`);null!=o&&(q(o,"dataLength"),n+o>s&&(o=void 0));const u=new Uint8Array(e,n,o);if(u.byteLength>i-r)throw new Error(`Out of target Bounds: from targetOffset(${r}), No Space to store dataArrayBuffer(${n}, ${o??"NoLimit"})`);new Uint8Array(t).set(u,r)}};const yt=new TextDecoder,ht=new TextEncoder;const pt=1e6;var gt={s2ns:1e9,ms2ns:pt,timestamp64:wt,lapseNano:dt,lapseMillis:mt,timeoutNano:function(t,e){return dt(t)>e},timeoutMillis:function(t,e){return mt(t)>e}};function wt(){if("undefined"!=typeof performance&&"number"==typeof performance.timeOrigin){const t=performance.timeOrigin,e=performance.now();return BigInt((t+e)*pt)}return BigInt(Date.now()*pt)}function dt(t,e){return(e??wt())-t}function mt(t,e){e=e??wt();return BigInt(e-t)/BigInt(pt)}var bt={first:function(t,e){return L(t,"arr"),t[0]??e},chunk:function(t,e){if(L(t,"array"),q(e,"size"),t.length<=e)return t;const r=[];let n=0;for(;n<t.length;)r.push(t.slice(n,e+n)),n+=e;return r},last:function(t,e){return L(t,"arr"),t[t.length-1]??e},equals:function(t,e,r){if(!Array.isArray(t)||!Array.isArray(e))return!1;if(t.length!==e.length)return!1;for(let n=0;n<t.length;n++)if(r){if(0!==r(t[n],e[n]))return!1}else if(t[n]!==e[n])return!1;return!0},equalsIgnoreOrder:function(t,e,r){if(!Array.isArray(t)||!Array.isArray(e))return!1;if(t.length!==e.length)return!1;t.sort(r),e.sort(r);for(let n=0;n<t.length;n++)if(r){if(0!==r(t[n],e[n]))return!1}else if(t[n]!==e[n])return!1;return!0}};var At={LangUtils:t,StringUtils:V,TypeUtils:o,TypeAssert:k,ExecUtils:X,PromiseUtils:Y,Lang:t,Type:o,Exec:X,ClassProxyUtils:nt,InstanceProxyUtils:it,ReflectUtils:ut,TypedArrayUtils:ft,ArrayBufferUtils:lt,TimeUtils:gt,ArrayUtils:bt};export{lt as ArrayBufferUtils,bt as ArrayUtils,nt as ClassProxyUtils,X as Exec,X as ExecUtils,it as InstanceProxyUtils,t as Lang,t as LangUtils,Y as PromiseUtils,ut as ReflectUtils,V as StringUtils,gt as TimeUtils,o as Type,k as TypeAssert,o as TypeUtils,ft as TypedArrayUtils,At as default};
1
+ class t extends Error{static notFound(r){return new t(`Not Found: ${r}`,404)}static notImpled(){return new t("Not Impled Yet",501)}static notSupported(r){return new t("Not Supported:"+r,505)}static isNotSupported(t){return 505===t?.code}constructor(t,r){super(t),this.code=r}}class r extends Error{static isAggregatedErrorLike(t){return t&&Array.isArray(t.errors)}static isAggregatedError(t){return t instanceof r}constructor(t,r){super(t),this.errors=r??[]}addError(t){this.errors.push(t)}removeError(t){const r=this.errors.indexOf(t);return-1!==r&&(this.errors.splice(r,1),!0)}}var e={constructorName:n,defaults:function(t,...r){if(null==t)throw new TypeError('"target" must not be null or undefined');for(const e of r)if(null!=e)for(const r in e)void 0===t[r]&&(t[r]=e[r]);return t},extend:o,extends:o,equals:function(t,r){if(t===r)return!0;if("function"==typeof t?.equals)return t.equals(r);if("function"==typeof r?.equals)return r.equals(t);return!1},isBrowser:i,isNode:function(){return!i()},cloneToPlainObject:function(t){if(null==t)return t;if("object"!=typeof t)throw new Error("Only Object allowed to clone");return{...t}},deepCloneToPlainObject:function(t){if(null==t)return t;if("object"!=typeof t)throw new Error("Only Object allowed to clone");return JSON.parse(JSON.stringify(t))}};function n(t){return t?.constructor?.name}function o(t,...r){if(null==t)throw new TypeError('"target" must not be null or undefined');for(const e of r)if(null!=e)for(const r in e)t[r]=e[r];return t}function i(){return"undefined"!=typeof window&&"undefined"!=typeof document}var s={isArray:u,isBoolean:f,isBuffer:function(t){return null!=t&&Buffer.isBuffer(t)},isFunction:a,isInstance:c,isIterable:function(t){return null!=t&&"function"==typeof t[Symbol.iterator]},isDate:function(t){return null!=t&&t instanceof Date},isError:function(t){return null!=t&&t instanceof Error},isMap:function(t){return null!=t&&"object"==typeof t&&t.constructor===Map},isWeakMap:function(t){return null!=t&&"object"==typeof t&&t.constructor===WeakMap},isNumber:d,isPositive:y,isNegative:h,isNotNegative:p,isNil:l,isNullOrUndefined:function(t){return null==t},isNull:g,isUndefined:w,isPlainObject:b,isObject:m,isPromise:A,isRegExp:function(t){return null!=t&&"object"==typeof t&&t.constructor===RegExp},isSet:function(t){return null!=t&&"object"==typeof t&&t.constructor===Set},isWeakSet:function(t){return null!=t&&"object"==typeof t&&t.constructor===WeakSet},isStream:function(t){return null!=t&&"function"==typeof t.pipe},isString:E,isSymbol:N,isPrimitive:function(t){return null!==t&&("string"==typeof t||"number"==typeof t||"boolean"==typeof t)},isInt8Array:v,isUint8Array:O,isUint8ClampedArray:j,isInt16Array:P,isUint16Array:x,isInt32Array:S,isUint32Array:U,isFloat32Array:B,isFloat64Array:I,isBigInt64Array:T,isBigUint64Array:k,isTypedArray:$,isArrayBuffer:L};function u(t){return Array.isArray(t)}function f(t){return"boolean"==typeof t}function a(t){return"function"==typeof t}function c(t){return null!=t&&"object"==typeof t&&!b(t)}function l(t){return null==t}function y(t){return!!d(t)&&t>0}function p(t){return!!d(t)&&t>=0}function h(t){return!!d(t)&&t<0}function g(t){return null===t}function w(t){return void 0===t}function d(t){return null!=t&&"number"==typeof t}function m(t){return null!=t&&"object"==typeof t}function b(t){return null!==t&&"object"==typeof t&&(t.constructor===Object||void 0===t.constructor)}function A(t){return null!=t&&"function"==typeof t.then}function E(t){return null!=t&&"string"==typeof t}function N(t){return null!=t&&"symbol"==typeof t}function $(t){return ArrayBuffer.isView(t)&&t.constructor!==DataView}function v(t){return t instanceof Int8Array}function O(t){return t instanceof Uint8Array}function j(t){return t instanceof Uint8ClampedArray}function P(t){return t instanceof Int16Array}function x(t){return t instanceof Uint16Array}function S(t){return t instanceof Int32Array}function U(t){return t instanceof Uint32Array}function B(t){return t instanceof Float32Array}function I(t){return t instanceof Float64Array}function T(t){return t instanceof BigInt64Array}function k(t){return t instanceof BigUint64Array}function L(t){return t instanceof ArrayBuffer}var C={assertNumber:D,assertPositive:M,assertNegative:function(t,r){if(!h(t))throw new Error(`${r?'"'+r+'" ':""}Not Negative: ${t}`)},assertNotNegative:J,assertBoolean:function(t,r){if(!f(t))throw new Error(`${r?'"'+r+'" ':""}Not Boolean: type=${typeof t} value=${X(t)}`)},assertObject:R,assertPlainObject:function(t,r){if(!b(t))throw new Error(`${r?'"'+r+'" ':""}Not PlainObject: type=${typeof t} value=${X(t)}`)},assertSymbol:function(t,r){if(!N(t))throw new Error(`${r?'"'+r+'" ':""}Not Symbol: type=${typeof t} value=${X(t)}`)},assertFunction:W,assertInstance:function(t,r){if(!c(t))throw new Error(`${r?'"'+r+'" ':""}Not Class Instance: type=${typeof t} value=${X(t)}`)},assertPromise:H,assertNil:function(t,r){if(!l(t))throw new Error(`${r?'"'+r+'" ':""}Neither Null nor Undefined: type=${typeof t} value=${X(t)}`)},assertNotNil:V,assertNull:function(t,r){if(!g(t))throw new Error(`${r?'"'+r+'" ':""}Not Null: type=${typeof t} value=${X(t)}`)},assertNotNull:function(t,r){if(g(t))throw new Error((r?'"'+r+'" ':"")+"Should Not Null")},assertUndefined:function(t,r){if(!w(t))throw new Error(`${r?'"'+r+'" ':""}Not Undefined: type=${typeof t} value=${X(t)}`)},assertString:q,assertArray:F,assertStringOrSymbol:function(t,r){if(!E(t)&&!N(t))throw new Error(`${r?'"'+r+'" ':""}Not String or Symbol: type=${typeof t} value=${X(t)}`)},assertInt8Array:function(t,r){if(v(t))throw new Error((r?'"'+r+'" ':"")+"Not Int8Array")},assertUint8Array:function(t,r){if(O(t))throw new Error((r?'"'+r+'" ':"")+"Not Uint8Array")},assertUint8ClampedArray:function(t,r){if(j(t))throw new Error((r?'"'+r+'" ':"")+"Not Uint8ClampedArray")},assertInt16Array:function(t,r){if(P(t))throw new Error((r?'"'+r+'" ':"")+"Not Int16Array")},assertUint16Array:function(t,r){if(x(t))throw new Error((r?'"'+r+'" ':"")+"Not Uint16Array")},assertInt32Array:function(t,r){if(S(t))throw new Error((r?'"'+r+'" ':"")+"Not Int32Array")},assertUint32Array:function(t,r){if(U(t))throw new Error((r?'"'+r+'" ':"")+"Not Uint32Array")},assertFloat32Array:function(t,r){if(B(t))throw new Error((r?'"'+r+'" ':"")+"Not Float32Array")},assertFloat64Array:function(t,r){if(I(t))throw new Error((r?'"'+r+'" ':"")+"Not Float64Array")},assertBigInt64Array:function(t,r){if(T(t))throw new Error((r?'"'+r+'" ':"")+"Not BigInt64Array")},assertBigUint64Array:function(t,r){if(k(t))throw new Error((r?'"'+r+'" ':"")+"Not BigUint64Array")},assertTypedArray:function(t,r){if($(t))throw new Error((r?'"'+r+'" ':"")+"Not TypedArray")},assertArrayBuffer:_};function F(t,r){if(!Array.isArray(t))throw new Error(`${r?'"'+r+'" ':""}Not Array: type=${typeof t} value=${X(t)}`)}function q(t,r){if(!E(t))throw new Error(`${r?'"'+r+'" ':""}Not String: type=${typeof t} value=${X(t)}`)}function D(t,r){if(!d(t))throw new Error(`${r?'"'+r+'" ':""}Not Number: type=${typeof t} value=${X(t)}`)}function M(t,r){if(!y(t))throw new Error(`${r?'"'+r+'" ':""}Not Positive: ${t}`)}function J(t,r){if(!p(t))throw new Error(`${r?'"'+r+'" ':""}Not "0 or Positive": ${t}`)}function R(t,r){if(!m(t))throw new Error(`${r?'"'+r+'" ':""}Not Object: type=${typeof t} value=${X(t)}`)}function W(t,r){if(!a(t))throw new Error(`${r?'"'+r+'" ':""}Not Function: type=${typeof t} value=${X(t)}`)}function H(t,r){if(!A(t))throw new Error(`${r?'"'+r+'" ':""}Not Promise: type=${typeof t} value=${X(t)}`)}function V(t,r){if(l(t))throw new Error((r?'"'+r+'" ':"")+"Should Not Nil")}function _(t,r){if(!L(t))throw new Error((r?'"'+r+'" ':"")+"Not ArrayBuffer")}var z={isEmpty:G,assertNotEmpty:K,isBlank:Y,assertNotBlank:function(t){if(Y(t))throw new Error(`Blank String: ${t}`)},capitalize:function(t){if(q(t),0===t.length)return t;const r=t.charAt(0),e=r.toUpperCase();return r===e?t:e+t.slice(1)},decapitalize:function(t){if(q(t),0===t.length)return t;const r=t.charAt(0),e=r.toLowerCase();return r===e?t:e+t.slice(1)},splitWithFixedLength:function(t,r,e=" "){if(q(t),D(r),q(e),0===t.length)return[];if(r<=0)throw new Error("length muse >=0");if(t.length<r)return[t.padEnd(r,e)];const n=[];for(let o=0;o<t.length;o+=r){const i=t.substring(o,o+r);n.push(i.padEnd(r,e))}return n},split:function(t,...r){q(t);if(0===t.length)return[];const e=[...r];0===r.length&&r.push(",");const n=Q(t,...e);if(0===n.length)return[];const o=[];let i="",s=0;for(const{marker:r,index:e}of n)i=t.substring(s,e),o.push(i),s=e+r.length;return i=t.substring(s),o.push(i),o},findMarkerPositions:function(t,...r){if(q(t),0===r.length)throw new Error("At least one marker must be provided");const e=[];for(const n of new Set(r)){if(G(n))continue;q(n);let r=t.indexOf(n);for(;-1!==r;)e.push({marker:n,index:r}),r=t.indexOf(n,r+n.length)}return e.sort((t,r)=>t.index-r.index),e},findMarkerPositionsRegex:Q,substringBefore:function(t,r){if(q(t),q(r),0===t.length||0===r.length)return;const e=t.indexOf(r);if(-1===e)return;return t.substring(0,e)},substringBeforeLast:function(t,r){if(q(t),q(r),0===t.length||0===r.length)return;const e=t.lastIndexOf(r);if(-1===e)return;return t.substring(0,e)},substringAfter:function(t,r){if(q(t),q(r),0===t.length||0===r.length)return;const e=t.indexOf(r);if(-1===e)return;return t.substring(e+r.length)},substringAfterLast:function(t,r){if(q(t),q(r),0===t.length||0===r.length)return;const e=t.lastIndexOf(r);if(-1===e)return;return t.substring(e+r.length)},substringBetween:function(t,r,e){K(t),K(r),K(e);const n=t.indexOf(r);if(-1===n)return;const o=t.indexOf(e,n+r.length);if(-1===o)return;return t.substring(n+r.length,o)},substringBetweenGreedy:function(t,r,e){K(t),K(r),K(e);const n=t.indexOf(r);if(-1===n)return;const o=t.lastIndexOf(e);if(-1===o||o<=n)return;return t.substring(n+r.length,o)},substringsBetween:function(t,r,e){K(t),K(r),K(e);const n=[];let o=0;for(;;){const i=t.indexOf(r,o);if(-1===i)break;const s=t.indexOf(e,i+r.length);if(-1===s)break;n.push(t.substring(i+r.length,s)),o=s+e.length}return n},safeToString:X};function G(t){return null==t||(q(t),0===t.length)}function K(t){if(G(t))throw new Error(`Empty String: ${t}`)}function Y(t){return null==t||(q(t),0===t.trim().length)}function Q(t,...r){if(q(t),0===r.length)throw new Error("At least one marker must be provided");const e=[...new Set(r.filter(t=>null!=t))].map(t=>(q(t),t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"))),n=new RegExp(e.map(t=>`(${t})`).join("|"),"g"),o=[];let i=null;for(;null!==(i=n.exec(t));){for(let t=1;t<i.length;t++)if(i[t]){o.push({marker:r[t-1],index:i.index});break}0===i[0].length&&n.lastIndex++}return o}function X(t){let r;try{r=JSON.stringify(t)}catch(e){r=t.toString()}return r}var Z={quiet:function(t,r){W(t);try{const e=t();return A(e)?e.catch(t=>{r&&r.isErrorEnabled()&&r.error("quiet() with async error:",t)}):e}catch(t){r&&r.isErrorEnabled()&&r.error("quiet() with sync error:",t)}},quietKeepError:function(t,r){W(t),F(r);try{const e=t();return A(e)?e.catch(t=>r.push(t)):e}catch(t){r.push(t)}}},tt={any:function(t){if(F(t),0===t.length)throw new Error("Empty Tasks");const r=rt(),e=[];for(let n=0;n<t.length;n++){const o=t[n];let i;if(s.isPromise(o))i=o;else{if(!s.isFunction(o)){e.push(new Error(`Invalid Task at index ${n}/${t.length-1}: ${o}`));continue}i=nt(o)}i.then(t=>{r.resolve(t)}).catch(n=>{e.push(n),e.length>=t.length&&r.reject(e)})}e.length===t.length&&r.reject(e);return r.promise},defer:rt,delay:function(t,r){s.isNumber(t)?(r=t,t=Promise.resolve()):null==t&&null==r&&(r=1,t=Promise.resolve());null!=t&&H(t),D(r=r??1e3);const e=rt(),n=Date.now();return t.then((...t)=>{const o=Date.now()-n;o<r?setTimeout(()=>e.resolve(...t),r-o):e.resolve(...t)}).catch(t=>{const o=Date.now()-n;o<r?setTimeout(()=>e.reject(t),r-o):e.reject(t)}),e.promise},timeout:function(t,r,e){H(t),D(r=r??1);const n=rt(r,e),o=Date.now();return t.then((...t)=>{Date.now()-o<=r?n.resolve(...t):n.reject(new Error(e??`Promise Timeout: ${r}ms`))}).catch(t=>{!n.resolved&&!n.rejected&&n.reject(t)}),n.promise},allSettled:et,returnValuePromised:nt,series:async function(t){F(t);const r=[];for(const e of t)if(W(e),s.isFunction(e))r.push(await nt(e));else{if(!s.isPromise(e))throw new Error(`Invalid Task: ${e}`);r.push(await e)}return r},seriesAllSettled:async function(t){F(t);const r=[];for(const e of t){W(e);try{r.push({ok:!0,result:await e()})}catch(t){r.push({ok:!1,result:t})}}return r},parallel:async function(t,r=5){if(F(t),D(r),r<=0)throw new Error(`Invalid maxParallel: ${r}, should > 0`);t.forEach(t=>W(t));const e=[];if(t.length<=r){const r=await Promise.all(t.map(t=>nt(t)));return e.push(...r),e}const n=[];for(const o of t)if(W(o),n.push(o),n.length>=r){const t=await Promise.all(n.map(t=>nt(t)));e.push(...t),n.length=0}if(n.length>0&&n.length<r){const t=await Promise.all(n.map(t=>nt(t)));e.push(...t)}return e},parallelAny:async function(t,r=5){if(F(t,"tasks"),D(r),0===t.length)throw new Error("Empty Tasks");if(r<=0)throw new Error(`Invalid maxParallel: ${r}, should > 0`);const e=[];let n=0,o=0;const i=rt();function u(){if(n>=t.length)return;if(o>r)return;const f=t[n++];let a;if(o++,s.isPromise(f))a=f;else{if(!s.isFunction(f))return e.push(new TypeError(`Invalid task: ${f}`)),void u();a=nt(f)}a.then(t=>{i.resolve(t)}).catch(r=>{e.push(r),e.length>=t.length&&i.pending?i.reject(e):u()}).finally(()=>{o--})}for(;o<r;)u();return i.promise},parallelAllSettled:async function(t,r=5){if(F(t),D(r),r<=0)throw new Error(`Invalid maxParallel: ${r}, should > 0`);t.forEach(t=>W(t));const e=[];if(t.length<=r){const r=await et(t.map(t=>nt(t)));return e.push(...r),e}const n=[];for(const o of t)if(n.push(o),n.length>=r){const t=await et(n.map(t=>nt(t)));e.push(...t),n.length=0}if(n.length>0&&n.length<r){const t=await et(n.map(t=>nt(t)));e.push(...t)}return e},wait:function(t){J(t);const r={};let e;return r.timerHandler=e=setTimeout(()=>{clearTimeout(e),r._resolve()},t),r.promise=new Promise((t,n)=>{r._resolve=r=>{null!=e&&clearTimeout(e),t(r)}}),r.wakeup=()=>{r._resolve()},r}};function rt(t=-1,r){D(t);const e={};let n;return e.pending=!0,e.canceled=!1,e.rejected=!1,e.resolved=!1,t>=0&&(e.timerCleared=!1,e.timerHandler=n=setTimeout(()=>{clearTimeout(n),e.timerCleared=!0,e.reject(new Error(r??`Promise Timeout: ${t}ms`))},t)),e.promise=new Promise((t,r)=>{e.resolve=r=>{e.resolved||e.rejected||e.canceled||(null!=n&&(clearTimeout(n),e.timerCleared=!0),e.pending=!1,e.canceled=!1,e.rejected=!1,e.resolved=!0,t(r))},e.reject=t=>{e.resolved||e.rejected||e.canceled||(null!=n&&(clearTimeout(n),e.timerCleared=!0),e.pending=!1,e.canceled=!1,e.resolved=!1,e.rejected=!0,r(t))}}),e.cancel=e.promise.cancel=t=>{e.resolved||e.rejected||e.canceled||(null!=n&&(clearTimeout(n),e.timerCleared=!0),e.reject(t??new Error("Cancelled")),e.canceled=e.promise.canceled=!0)},e}async function et(t){F(t);const r=await Promise.allSettled(t),e=[];for(const t of r)"fulfilled"===t.status&&e.push({ok:!0,result:t.value}),"rejected"===t.status&&e.push({ok:!1,result:t.reason});return e}function nt(t){try{const r=t();return s.isPromise(r)?r:Promise.resolve(r)}catch(t){return Promise.reject(t)}}const{isPlainObject:ot}=s;var it={proxy:st,newProxyInstance:function(t,r,e,n=!0){const o=st(t,e,n);return Reflect.construct(o,r??[])}};function st(t,r,e=!0){if("function"!=typeof t)throw new TypeError(`Not Class: type=${typeof t}, value=${JSON.stringify(t)}`);if(null!=r){if(!ot(r))throw new TypeError(`Not PropertyHandler: type=${typeof r}, value=${JSON.stringify(r)}`);const{get:t,set:e}=r;if(null!=t&&"function"!=typeof t)throw new TypeError(`Not PropertyHandler.get: type=${typeof t}, value=${JSON.stringify(t)}`);if(null!=e&&"function"!=typeof e)throw new TypeError(`Not PropertyHandler.set: type=${typeof e}, value=${JSON.stringify(e)}`)}const n={construct(t,n,o){const i=Reflect.construct(t,n);return new Proxy(e?Object.preventExtensions(i):i,r??{})}};return new Proxy(t,n)}var ut={proxy:function(t,r,e=!0){if(l(t)||!m(t)||u(t))throw new TypeError(`Not Object: type=${typeof t}, value=${JSON.stringify(t)}`);return new Proxy(e?Object.preventExtensions(t):t,r??{})}};function ft(t){R(t,"obj");const r=new Set;let e=t;for(;e&&e!==Object.prototype;){const n=Object.getOwnPropertyNames(e);for(const e of n)"constructor"!==e&&"function"==typeof t[e]&&r.add(e);e=Object.getPrototypeOf(e)}return[...new Set(r)]}var at={getMethodsOfClass:function(t){W(t,"cls");const r=new Set;let e=t.prototype;for(;e&&e!==Object.prototype;){const t=Object.getOwnPropertyNames(e);for(const n of t)"constructor"!==n&&"function"==typeof e[n]&&r.add(n);e=Object.getPrototypeOf(e)}return[...new Set(r)]},getStaticMethodsOfClass:function(t){W(t,"cls");const r=new Set;let e=t;for(;e&&e!==Object.getPrototypeOf(Object);){const t=Object.getOwnPropertyNames(e);for(const n of t)"function"==typeof e[n]&&r.add(n);e=Object.getPrototypeOf(e)}return[...r]},getMethods:ft,getMethodsOfObject:ft},ct={startsWith:function(t,r){V(t,"src"),V(r,"searching");return yt(t.subarray(0,r.length),r)},isSameType:lt,equals:yt};function lt(t,r){return V(t,"src"),V(r,"target"),n(t)===n(r)}function yt(t,r){if(V(t,"src"),V(r,"target"),!lt(t,r))return!1;if(t.byteLength!==r.byteLength)return!1;const e=new DataView(t.buffer,t.byteOffset,t.byteLength),n=new DataView(r.buffer,r.byteOffset,r.byteLength);for(let r=0;r<t.byteLength;r++)if(e.getUint8(r)!==n.getUint8(r))return!1;return!0}var pt={readString:function(t,r=0,e){if(_(t),J(r),r>=t.byteLength)return;let n=null;null!=e?(M(e),n=r+e>=t.byteLength?new Uint8Array(t,r):new Uint8Array(t,r,e)):n=new Uint8Array(t,r);return ht.decode(n)},writeString:function(t,r,e=0){_(t,"buffer"),q(r,"str"),J(e,"offset");const n=gt.encode(r),o=n.byteLength;if(e+o>t.byteLength)throw new Error(`offset + str.byteLength > buffer.byteLength:${e+o} > ${t.byteLength}`);new Uint8Array(t,e,n.byteLength).set(n)},writeArrayBuffer:function(t,r,e=0,n=0,o){_(t),_(r),D(e),D(n);const i=t.byteLength;if(e<-1*i)e=0;else if(e<0)e+=i;else if(e>=i)throw new Error(`Out of target Bounds: targetOffset(${e}) >= targetLength(${i})`);const s=r.byteLength;if(n<-1*s)n=0;else if(n<0)n+=s;else if(n>=s)throw new Error(`Out of data Bounds: dataOffset(${n}) >= dataArrayBufferLength(${s})`);null!=o&&(M(o,"dataLength"),n+o>s&&(o=void 0));const u=new Uint8Array(r,n,o);if(u.byteLength>i-e)throw new Error(`Out of target Bounds: from targetOffset(${e}), No Space to store dataArrayBuffer(${n}, ${o??"NoLimit"})`);new Uint8Array(t).set(u,e)}};const ht=new TextDecoder,gt=new TextEncoder;const wt=1e6;var dt={s2ns:1e9,ms2ns:wt,timestamp64:mt,lapseNano:bt,lapseMillis:At,timeoutNano:function(t,r){return bt(t)>r},timeoutMillis:function(t,r){return At(t)>r}};function mt(){if("undefined"!=typeof performance&&"number"==typeof performance.timeOrigin){const t=performance.timeOrigin,r=performance.now();return BigInt((t+r)*wt)}return BigInt(Date.now()*wt)}function bt(t,r){return(r??mt())-t}function At(t,r){r=r??mt();return BigInt(r-t)/BigInt(wt)}var Et={first:function(t,r){return F(t,"arr"),t[0]??r},chunk:function(t,r){if(F(t,"array"),M(r,"size"),t.length<=r)return t;const e=[];let n=0;for(;n<t.length;)e.push(t.slice(n,r+n)),n+=r;return e},last:function(t,r){return F(t,"arr"),t[t.length-1]??r},equals:function(t,r,e){if(!Array.isArray(t)||!Array.isArray(r))return!1;if(t.length!==r.length)return!1;for(let n=0;n<t.length;n++)if(e){if(0!==e(t[n],r[n]))return!1}else if(t[n]!==r[n])return!1;return!0},equalsIgnoreOrder:function(t,r,e){if(!Array.isArray(t)||!Array.isArray(r))return!1;if(t.length!==r.length)return!1;t.sort(e),r.sort(e);for(let n=0;n<t.length;n++)if(e){if(0!==e(t[n],r[n]))return!1}else if(t[n]!==r[n])return!1;return!0}};var Nt={_Error:t,AggregatedError:r,LangUtils:e,StringUtils:z,TypeUtils:s,TypeAssert:C,ExecUtils:Z,PromiseUtils:tt,Lang:e,Type:s,Exec:Z,ClassProxyUtils:it,InstanceProxyUtils:ut,ReflectUtils:at,TypedArrayUtils:ct,ArrayBufferUtils:pt,TimeUtils:dt,ArrayUtils:Et};export{r as AggregatedError,pt as ArrayBufferUtils,Et as ArrayUtils,it as ClassProxyUtils,Z as Exec,Z as ExecUtils,ut as InstanceProxyUtils,e as Lang,e as LangUtils,tt as PromiseUtils,at as ReflectUtils,z as StringUtils,dt as TimeUtils,s as Type,C as TypeAssert,s as TypeUtils,ct as TypedArrayUtils,t as _Error,Nt as default};
2
2
  //# sourceMappingURL=index-min.js.map