Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@nevware21/ts-utils

Package Overview
Dependencies
Maintainers
1
Versions
46
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nevware21/ts-utils - npm Package Compare versions

Comparing version 0.4.1 to 0.4.2

dist-esm/helpers/length.js

158

bundle/ts-polyfills-utils.js
/*!
* NevWare21 - ts-utils Polyfills, 0.4.1
* NevWare21 - ts-utils Polyfills, 0.4.2
* https://github.com/nevware21/ts-utils

@@ -10,5 +10,20 @@ * Copyright (c) NevWare21 and contributors. All rights reserved.

var EMPTY = "";
var NUMBER = "number";
var OBJECT = "object";
var PROTOTYPE = "prototype";
var STRING = "string";
var UNDEFINED = "undefined";
var HAS_OWN_PROPERTY = "hasOwnProperty";
var LENGTH = "length";
var ObjClass = Object;
var ObjProto = ObjClass[PROTOTYPE];
var StrCls = String;
var StrProto = StrCls[PROTOTYPE];
var MathCls = Math;
var ArrCls = Array;
function arrForEach(arr, callbackfn, thisArg) {
if (arr) {
var len = arr.length;
var len = arr[LENGTH];
for (var idx = 0; idx < len; idx++) {

@@ -24,15 +39,2 @@ if (idx in arr) {

var EMPTY = "";
var NUMBER = "number";
var OBJECT = "object";
var PROTOTYPE = "prototype";
var STRING = "string";
var UNDEFINED = "undefined";
var HAS_OWN_PROPERTY = "hasOwnProperty";
var ObjClass = Object;
var ObjProto = ObjClass[PROTOTYPE];
var StrProto = String[PROTOTYPE];
var MathCls = Math;
var ArrCls = Array;
function _createIs(theType) {

@@ -59,60 +61,26 @@ return function (value) {

}
ArrCls.isArray;
var isNumber = _createIs(NUMBER);
function objHasOwnProperty(obj, prop) {
return obj && ObjProto[HAS_OWN_PROPERTY].call(obj, prop);
}
function objForEachKey(theObject, callbackfn, thisArg) {
if (theObject && isObject(theObject)) {
for (var prop in theObject) {
if (objHasOwnProperty(theObject, prop)) {
if (callbackfn.call(thisArg || theObject, prop, theObject[prop]) === -1) {
break;
}
}
}
function polyIsArray(value) {
if (isNullOrUndefined(value)) {
return false;
}
return objToString(value) === "[object Array]";
}
function objSetPrototypeOf(obj, proto) {
var fn = ObjClass["setPrototypeOf"] ||
({ __proto__: [] } instanceof Array && function (d, b) {
d.__proto__ = b;
}) ||
function (d, b) {
objForEachKey(b, function (key, value) {
d[key] = value;
});
};
return fn(obj, proto);
function objHasOwnProperty(obj, prop) {
return obj && ObjProto[HAS_OWN_PROPERTY].call(obj, prop);
}
function _createCustomError(name, d, b) {
objSetPrototypeOf(d, b);
function __() {
this.constructor = d;
function polyObjKeys(obj) {
if (!isObject(obj) || obj === null) {
throw new TypeError("polyObjKeys called on non-object");
}
__[PROTOTYPE] = b[PROTOTYPE];
__[PROTOTYPE].name = name;
d[PROTOTYPE] = new __();
return d;
}
function createCustomError(name, constructCb) {
var baseClass = Error;
var customError = _createCustomError(name, function () {
var _this = this;
_this = baseClass.apply(_this, arguments) || _this;
constructCb && constructCb(_this, arguments);
return _this;
}, baseClass);
return customError;
}
var _unsupportedError;
function throwUnsupported(message) {
if (!_unsupportedError) {
_unsupportedError = createCustomError("UnsupportedError");
var result = [];
for (var prop in obj) {
if (objHasOwnProperty(obj, prop)) {
result.push(prop);
}
}
throw new _unsupportedError(message);
return result;
}

@@ -142,31 +110,2 @@

var _objDefineProperty = ObjClass["defineProperty"];
function objDefineProp(target, key, descriptor) {
if (_objDefineProperty) {
_objDefineProperty(target, key, descriptor);
return target;
}
throwUnsupported("Unable to define property [" + objToString(key) + "] on " + dumpObj(target));
}
function polyIsArray(value) {
if (isNullOrUndefined(value)) {
return false;
}
return objToString(value) === "[object Array]";
}
function polyObjKeys(obj) {
if (!isObject(obj) || obj === null) {
throw new TypeError("polyObjKeys called on non-object");
}
var result = [];
for (var prop in obj) {
if (objHasOwnProperty(obj, prop)) {
result.push(prop);
}
}
return result;
}
function throwTypeError(message) {

@@ -192,2 +131,4 @@ throw new TypeError(message);

var strSubstring = _unwrapFunction("substring");
function polyStrStartsWith(value, searchString, position) {

@@ -198,5 +139,5 @@ if (!isString(value)) {

var searchValue = isString(searchString) ? searchString : "" + searchString;
var chkLen = searchValue.length;
var chkLen = searchValue[LENGTH];
var pos = position > 0 ? position : 0;
return value.substring(pos, pos + chkLen) === searchValue;
return strSubstring(value, pos, pos + chkLen) === searchValue;
}

@@ -209,6 +150,6 @@

var searchValue = isString(searchString) ? searchString : "" + searchString;
var chkLen = searchValue.length;
var len = value.length;
var chkLen = searchValue[LENGTH];
var len = value[LENGTH];
var end = !isUndefined(length) && length < len ? length : len;
return value.substring(end - chkLen, end) === searchValue;
return strSubstring(value, end - chkLen, end) === searchValue;
}

@@ -273,11 +214,11 @@

targetLength >>= 0;
var len = value.length;
var len = value[LENGTH];
if (len < targetLength) {
result = isNullOrUndefined(padString) ? " " : "" + padString;
targetLength = targetLength - len;
if (targetLength > result.length) {
result = strRepeat(result, mathCeil(targetLength / result.length));
if (targetLength > result[LENGTH]) {
result = strRepeat(result, mathCeil(targetLength / result[LENGTH]));
}
if (result.length > targetLength) {
result = result.substring(0, targetLength);
if (result[LENGTH] > targetLength) {
result = strSubstring(result, 0, targetLength);
}

@@ -297,3 +238,3 @@ }

var theArgs = [this];
for (var lp = 0; lp < arguments.length; lp++) {
for (var lp = 0; lp < arguments[LENGTH]; lp++) {
theArgs.push(arguments[lp]);

@@ -307,4 +248,3 @@ }

var objectPolyfills = {
"keys": polyObjKeys,
"defineProperty": objDefineProp
"keys": polyObjKeys
};

@@ -322,3 +262,2 @@ var stringPolyfills = {

};
var ObjClass = Object;
arrForEach(polyObjKeys(objectPolyfills), function (key) {

@@ -329,6 +268,5 @@ if (!ObjClass[key]) {

});
if (!Array.isArray) {
Array.isArray = makePolyFn(polyIsArray);
if (!ArrCls.isArray) {
ArrCls.isArray = makePolyFn(polyIsArray);
}
var StrProto = String[PROTOTYPE];
arrForEach(polyObjKeys(stringPolyfills), function (key) {

@@ -335,0 +273,0 @@ if (!StrProto[key]) {

/*!
* NevWare21 - ts-utils, 0.4.1
* NevWare21 - ts-utils, 0.4.2
* https://github.com/nevware21/ts-utils

@@ -7,3 +7,3 @@ * Copyright (c) NevWare21 and contributors. All rights reserved.

*/
!function(){"use strict";function n(n,r,t){if(n)for(var e=n.length,i=0;i<e&&!(i in n&&-1===r.call(t||n,n[i],i,n));i++);}var r="object",a="prototype",t="undefined",e="hasOwnProperty",c=Object,i=c[a],o=Math;function u(r){return function(n){return typeof n===r}}function f(n){return i.toString.call(n)}function s(n){return typeof n===t||n===t}function l(n){return null===n||s(n)}var p=u("string");function g(n){return!l(n)&&n&&typeof n===r}var y,h=u("number");function v(n,r){return n&&i[e].call(n,r)}function d(n,r){var t,e,i,o,u=Error;function f(){this.constructor=t}return n=n,i=t=function(){var n=this,n=u.apply(n,arguments)||n;return r&&r(n,arguments),n},o=e=u,(c.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){var t,e=r;if(e&&g(e))for(var i in e)v(e,i)&&(t=i,i=e[i],n[t]=i)})(i,o),(f[a]=e[a]).name=n,t[a]=new f,t}function b(n,r){var t=f(n);return t+": "+("[object Error]"===t?"{ stack: '"+n.stack+"', message: '"+n.message+"', name: '"+n.name+"'":r?h(r)?JSON.stringify(n,null,r):JSON.stringify(n,null,r?4:0):JSON.stringify(n))}var m=c.defineProperty;function w(n){if(!g(n)||null===n)throw new TypeError("polyObjKeys called on non-object");var r,t=[];for(r in n)v(n,r)&&t.push(r);return t}function E(n){throw new TypeError(n)}function O(n){throw new RangeError(n)}function S(r){return function(n){return l(n)&&E("strTrim called ["+b(n)+"]"),n&&n.replace?n.replace(r,""):n}}var _=S(/^\s+|(?=\s)\s+$/g),j=S(/^\s+/g),A=S(/(?=\s)\s+$/g),P=o.floor,k=o.ceil,$=o.trunc||function(n){n=+n;return(0<n?P:k)(n)};function J(n,r){var t=+n;return t==Infinity&&r&&O("invalid value ["+b(n)+"]"),t!=t||0==t?0:$(t)}var N,T,I,R,o="repeat",K=String[a][o]?function(n){for(var r=[],t=1;t<arguments.length;t++)r[t-1]=arguments[t];if((n||""===n)&&n.repeat)return n.repeat.apply(n,r);E("'repeat' not defined for "+b(n))}:function(n,r){l(n)&&E("can't convert ["+b(n)+"]"),(r=J(r,!0))<0&&O("invalid count must be >= 0 && < Infinity");for(var t=p(n)?n:""+n,e="";0<r;(r>>>=1)&&(t+=t))1&r&&(e+=t);return e};function U(n,r,t){var e="",n=(r=J(r,!0),n.length);return n<(r>>=0)&&(e=(r-=n)>(e=l(t)?" ":""+t).length?K(e,k(r/e.length)):e).length>r?e.substring(0,r):e}function W(t){return function(){for(var n=[this],r=0;r<arguments.length;r++)n.push(arguments[r]);return t.apply(this,n)}}T={startsWith:function(n,r,t){p(n)||E("'"+b(n)+"' is not a string");var r=p(r)?r:""+r,e=r.length,t=0<t?t:0;return n.substring(t,t+e)===r},endsWith:function(n,r,t){p(n)||E("'"+b(n)+"' is not a string");var r=p(r)?r:""+r,e=r.length,i=n.length,t=!s(t)&&t<i?t:i;return n.substring(t-e,t)===r},padStart:function(n,r,t){return U(n,r,t)+n},padEnd:function(n,r,t){return n+U(n,r,t)},trim:_,trimStart:j,trimLeft:j,trimEnd:A,trimRight:A},I=Object,n(w(N={keys:w,defineProperty:function(n,r,t){if(m)return m(n,r,t),n;t="Unable to define property ["+f(r)+"] on "+b(n);throw new(y=y||d("UnsupportedError"))(t)}}),function(n){I[n]||(I[n]=W(N[n]))}),Array.isArray||(Array.isArray=W(function(n){return!l(n)&&"[object Array]"===f(n)})),R=String[a],n(w(T),function(n){R[n]||(R[n]=W(T[n]))})}();
!function(){"use strict";var n="prototype",r="undefined",u="length",t=Object,o=t[n],i=String[n],n=Math,e=Array;function a(n,r,t){if(n)for(var i=n[u],e=0;e<i&&!(e in n&&-1===r.call(t||n,n[e],e,n));e++);}function f(r){return function(n){return typeof n===r}}function c(n){return o.toString.call(n)}function s(n){return typeof n===r||n===r}function l(n){return null===n||s(n)}var y=f("string"),p=f("number");function v(n){if(l(r=n)||!r||"object"!=typeof r||null===n)throw new TypeError("polyObjKeys called on non-object");var r,t,i,e,u=[];for(t in n)e=t,(i=n)&&o.hasOwnProperty.call(i,e)&&u.push(t);return u}function g(n,r){var t=c(n);return t+": "+("[object Error]"===t?"{ stack: '"+n.stack+"', message: '"+n.message+"', name: '"+n.name+"'":r?p(r)?JSON.stringify(n,null,r):JSON.stringify(n,null,r?4:0):JSON.stringify(n))}function h(n){throw new TypeError(n)}function d(n){throw new RangeError(n)}function m(i){return function(n){for(var r=[],t=1;t<arguments.length;t++)r[t-1]=arguments[t];if((n||""===n)&&n[i])return n[i].apply(n,r);h("'"+i+"' not defined for "+g(n))}}var b=m("substring");function w(r){return function(n){return l(n)&&h("strTrim called ["+g(n)+"]"),n&&n.replace?n.replace(r,""):n}}var S=w(/^\s+|(?=\s)\s+$/g),j=w(/^\s+/g),E=w(/(?=\s)\s+$/g),O=n.floor,A=n.ceil,k=n.trunc||function(n){n=+n;return(0<n?O:A)(n)};function J(n,r){var t=+n;return t==Infinity&&r&&d("invalid value ["+g(n)+"]"),t!=t||0==t?0:k(t)}var N,T,n="repeat",I=i[n]?m(n):function(n,r){l(n)&&h("can't convert ["+g(n)+"]"),(r=J(r,!0))<0&&d("invalid count must be >= 0 && < Infinity");for(var t=y(n)?n:""+n,i="";0<r;(r>>>=1)&&(t+=t))1&r&&(i+=t);return i};function R(n,r,t){var i="",n=(r=J(r,!0),n[u]);return n<(r>>=0)&&(i=(r-=n)>(i=l(t)?" ":""+t)[u]?I(i,A(r/i[u])):i)[u]>r?b(i,0,r):i}function W(t){return function(){for(var n=[this],r=0;r<arguments[u];r++)n.push(arguments[r]);return t.apply(this,n)}}T={startsWith:function(n,r,t){y(n)||h("'"+g(n)+"' is not a string");var r=y(r)?r:""+r,i=r[u],t=0<t?t:0;return b(n,t,t+i)===r},endsWith:function(n,r,t){y(n)||h("'"+g(n)+"' is not a string");var r=y(r)?r:""+r,i=r[u],e=n[u],t=!s(t)&&t<e?t:e;return b(n,t-i,t)===r},padStart:function(n,r,t){return R(n,r,t)+n},padEnd:function(n,r,t){return n+R(n,r,t)},trim:S,trimStart:j,trimLeft:j,trimEnd:E,trimRight:E},a(v(N={keys:v}),function(n){t[n]||(t[n]=W(N[n]))}),e.isArray||(e.isArray=W(function(n){return!l(n)&&"[object Array]"===c(n)})),a(v(T),function(n){i[n]||(i[n]=W(T[n]))})}();
//# sourceMappingURL=ts-polyfills-utils.min.js.map
import { isArray, isUndefined } from "../helpers/base";
import { isIterator } from "../helpers/iterator";
import { ArrProto } from "../internal/constants";
import { isIterator } from "../iterator/iterator";
import { ArrProto, DONE, VALUE } from "../internal/constants";
export function arrAppend(target, elms) {

@@ -11,4 +11,4 @@ if (!isUndefined(elms) && target) {

var value = elms.next();
while (!value.done) {
target.push(value.value);
while (!value[DONE]) {
target.push(value[VALUE]);
value = elms.next();

@@ -15,0 +15,0 @@ }

@@ -0,4 +1,5 @@

import { LENGTH } from "../internal/constants";
export function arrForEach(arr, callbackfn, thisArg) {
if (arr) {
var len = arr.length;
var len = arr[LENGTH];
for (var idx = 0; idx < len; idx++) {

@@ -5,0 +6,0 @@ if (idx in arr) {

@@ -1,2 +0,2 @@

import { ArrCls, BOOLEAN, FUNCTION, NUMBER, OBJECT, ObjProto, STRING, UNDEFINED } from "../internal/constants";
import { ArrCls, BOOLEAN, FUNCTION, NUMBER, OBJECT, ObjProto, STRING, UNDEFINED, UNDEF_VALUE } from "../internal/constants";
import { _safeCheck } from "../internal/safe_check";

@@ -32,3 +32,3 @@ export function _createIs(theType) {

export function isDefined(arg) {
return !!arg || arg !== undefined;
return !!arg || arg !== UNDEF_VALUE;
}

@@ -35,0 +35,0 @@ export var isString = _createIs(STRING);

import { arrForEach } from "../array/forEach";
import { isArray, isBoolean, isDate, isFunction, isNullOrUndefined, isObject, isTruthy } from "./base";
import { objKeys } from "../object/object";
import { LENGTH } from "../internal/constants";
function _checkLength(value, props) {

@@ -19,3 +20,3 @@ var result;

if (isArray(value)) {
result = value.length > 0;
result = value[LENGTH] > 0;
}

@@ -30,3 +31,3 @@ else if (isDate(value)) {

try {
var chkValue = _checkLength(value, ["length", "byteLength", "size", "count"]);
var chkValue = _checkLength(value, [LENGTH, "byteLength", "size", "count"]);
if (isBoolean(chkValue)) {

@@ -41,3 +42,3 @@ return chkValue;

}
return !!objKeys(value).length;
return !!objKeys(value)[LENGTH];
}

@@ -44,0 +45,0 @@ else {

@@ -12,7 +12,13 @@ export { arrAppend } from "./array/append";

export { deepExtend, objExtend } from "./helpers/extend";
export { getLength } from "./helpers/length";
export { getIntValue } from "./helpers/number";
export { throwError, throwTypeError, throwRangeError } from "./helpers/throw";
export { hasValue } from "./helpers/value";
export { isIterable, isIterator } from "./helpers/iterator";
export { createArrayIterator } from "./iterator/array";
export { createIterator, createIterable, makeIterable } from "./iterator/create";
export { iterForOf } from "./iterator/forOf";
export { isIterable, isIterator } from "./iterator/iterator";
export { createRangeIterator } from "./iterator/range";
export { mathCeil, mathFloor } from "./math/floor";
export { mathMin, mathMax } from "./math/min_max";
export { mathToInt } from "./math/to_int";

@@ -33,2 +39,3 @@ export { mathTrunc } from "./math/trunc";

export { strStartsWith } from "./string/starts_with";
export { strSubstr, strSubstring, strLeft, strRight, polyStrSubstr } from "./string/substring";
export { strTrim, strTrimEnd, strTrimLeft, strTrimRight, strTrimStart } from "./string/trim";

@@ -35,0 +42,0 @@ export { isSymbol, getSymbol, getKnownSymbol, hasSymbol, newSymbol, symbolFor, symbolKeyFor } from "./symbol/symbol";

@@ -0,1 +1,2 @@

export var UNDEF_VALUE = undefined;
export var EMPTY = "";

@@ -15,5 +16,9 @@ export var BOOLEAN = "boolean";

export var LAST_INDEX_OF = "lastIndexOf";
export var LENGTH = "length";
export var DONE = "done";
export var VALUE = "value";
export var ObjClass = Object;
export var ObjProto = ObjClass[PROTOTYPE];
export var StrProto = String[PROTOTYPE];
export var StrCls = String;
export var StrProto = StrCls[PROTOTYPE];
export var MathCls = Math;

@@ -20,0 +25,0 @@ export var ArrCls = Array;

@@ -0,5 +1,6 @@

import { LENGTH } from "./constants";
export function makePolyFn(poly) {
return function () {
var theArgs = [this];
for (var lp = 0; lp < arguments.length; lp++) {
for (var lp = 0; lp < arguments[LENGTH]; lp++) {
theArgs.push(arguments[lp]);

@@ -6,0 +7,0 @@ }

@@ -16,2 +16,7 @@ import { dumpObj } from "../helpers/diagnostics";

}
export function _unwrapProp(propName) {
return function (thisArg) {
return thisArg[propName];
};
}
//# sourceMappingURL=unwrapFunction.js.map

@@ -1,2 +0,2 @@

import { ObjClass } from "../internal/constants";
import { ObjClass, VALUE } from "../internal/constants";
import { isFunction, isUndefined, objToString } from "../helpers/base";

@@ -22,3 +22,3 @@ import { throwUnsupported } from "../helpers/customError";

else {
desc.value = value;
desc[VALUE] = value;
}

@@ -25,0 +25,0 @@ return objDefineProp(target, key, desc);

import { arrForEach } from "./array/forEach";
import { objDefineProp } from "./object/define";
import { PROTOTYPE } from "./internal/constants";
import { ArrCls, ObjClass, StrProto } from "./internal/constants";
import { polyIsArray } from "./polyfills/array";

@@ -13,4 +12,3 @@ import { polyObjKeys } from "./polyfills/object";

var objectPolyfills = {
"keys": polyObjKeys,
"defineProperty": objDefineProp
"keys": polyObjKeys
};

@@ -28,3 +26,2 @@ var stringPolyfills = {

};
var ObjClass = Object;
arrForEach(polyObjKeys(objectPolyfills), function (key) {

@@ -35,6 +32,5 @@ if (!ObjClass[key]) {

});
if (!Array.isArray) {
Array.isArray = makePolyFn(polyIsArray);
if (!ArrCls.isArray) {
ArrCls.isArray = makePolyFn(polyIsArray);
}
var StrProto = String[PROTOTYPE];
arrForEach(polyObjKeys(stringPolyfills), function (key) {

@@ -41,0 +37,0 @@ if (!StrProto[key]) {

import { isString, isUndefined } from "../helpers/base";
import { dumpObj } from "../helpers/diagnostics";
import { throwTypeError } from "../helpers/throw";
import { StrProto } from "../internal/constants";
import { LENGTH, StrProto } from "../internal/constants";
import { _unwrapFunction } from "../internal/unwrapFunction";
import { strSubstring } from "./substring";
var ENDS_WITH = "endsWith";

@@ -13,7 +14,7 @@ export var strEndsWith = StrProto[ENDS_WITH] ? _unwrapFunction(ENDS_WITH) : polyStrEndsWith;

var searchValue = isString(searchString) ? searchString : "" + searchString;
var chkLen = searchValue.length;
var len = value.length;
var chkLen = searchValue[LENGTH];
var len = value[LENGTH];
var end = !isUndefined(length) && length < len ? length : len;
return value.substring(end - chkLen, end) === searchValue;
return strSubstring(value, end - chkLen, end) === searchValue;
}
//# sourceMappingURL=ends_with.js.map
import { isNullOrUndefined } from "../helpers/base";
import { EMPTY, StrProto } from "../internal/constants";
import { EMPTY, LENGTH, StrProto } from "../internal/constants";
import { _unwrapFunction } from "../internal/unwrapFunction";

@@ -7,2 +7,3 @@ import { mathCeil } from "../math/floor";

import { strRepeat } from "./repeat";
import { strSubstring } from "./substring";
var PAD_START = "padStart";

@@ -14,11 +15,11 @@ var PAD_END = "padEnd";

targetLength >>= 0;
var len = value.length;
var len = value[LENGTH];
if (len < targetLength) {
result = isNullOrUndefined(padString) ? " " : "" + padString;
targetLength = targetLength - len;
if (targetLength > result.length) {
result = strRepeat(result, mathCeil(targetLength / result.length));
if (targetLength > result[LENGTH]) {
result = strRepeat(result, mathCeil(targetLength / result[LENGTH]));
}
if (result.length > targetLength) {
result = result.substring(0, targetLength);
if (result[LENGTH] > targetLength) {
result = strSubstring(result, 0, targetLength);
}

@@ -25,0 +26,0 @@ }

import { isString } from "../helpers/base";
import { dumpObj } from "../helpers/diagnostics";
import { throwTypeError } from "../helpers/throw";
import { StrProto } from "../internal/constants";
import { LENGTH, StrProto } from "../internal/constants";
import { _unwrapFunction } from "../internal/unwrapFunction";
import { strSubstring } from "./substring";
var STARTS_WITH = "startsWith";

@@ -13,6 +14,6 @@ export var strStartsWith = StrProto[STARTS_WITH] ? _unwrapFunction(STARTS_WITH) : polyStrStartsWith;

var searchValue = isString(searchString) ? searchString : "" + searchString;
var chkLen = searchValue.length;
var chkLen = searchValue[LENGTH];
var pos = position > 0 ? position : 0;
return value.substring(pos, pos + chkLen) === searchValue;
return strSubstring(value, pos, pos + chkLen) === searchValue;
}
//# sourceMappingURL=starts_with.js.map
/*!
* NevWare21 - ts-utils, 0.4.1
* NevWare21 - ts-utils, 0.4.2
* https://github.com/nevware21/ts-utils

@@ -9,2 +9,3 @@ * Copyright (c) NevWare21 and contributors. All rights reserved.

var UNDEF_VALUE = undefined;
var EMPTY = "";

@@ -23,5 +24,9 @@ var BOOLEAN = "boolean";

var LAST_INDEX_OF = "lastIndexOf";
var LENGTH = "length";
var DONE = "done";
var VALUE = "value";
var ObjClass = Object;
var ObjProto = ObjClass[PROTOTYPE];
var StrProto = String[PROTOTYPE];
var StrCls = String;
var StrProto = StrCls[PROTOTYPE];
var MathCls = Math;

@@ -70,3 +75,3 @@ var ArrCls = Array;

function isDefined(arg) {
return !!arg || arg !== undefined;
return !!arg || arg !== UNDEF_VALUE;
}

@@ -193,3 +198,3 @@ var isString = _createIs(STRING);

if (arr) {
var len = arr.length;
var len = arr[LENGTH];
for (var idx = 0; idx < len; idx++) {

@@ -381,3 +386,3 @@ if (idx in arr) {

function isIterable(value) {
return !isStrictNullOrUndefined(value) && (hasSymbol() ? isFunction(value[getKnownSymbol(3)]) : isIterator(value));
return !isStrictNullOrUndefined(value) && isFunction(value[getKnownSymbol(3)]);
}

@@ -392,4 +397,4 @@

var value = elms.next();
while (!value.done) {
target.push(value.value);
while (!value[DONE]) {
target.push(value[VALUE]);
value = elms.next();

@@ -439,2 +444,7 @@ }

}
function _unwrapProp(propName) {
return function (thisArg) {
return thisArg[propName];
};
}

@@ -509,2 +519,4 @@ var arrIndexOf = _unwrapFunction(INDEX_OF);

var getLength = _unwrapProp(LENGTH);
function getIntValue(value, defValue) {

@@ -536,3 +548,3 @@ if (!isNullOrUndefined(value)) {

if (isArray(value)) {
result = value.length > 0;
result = value[LENGTH] > 0;
}

@@ -547,3 +559,3 @@ else if (isDate(value)) {

try {
var chkValue = _checkLength(value, ["length", "byteLength", "size", "count"]);
var chkValue = _checkLength(value, [LENGTH, "byteLength", "size", "count"]);
if (isBoolean(chkValue)) {

@@ -558,3 +570,3 @@ return chkValue;

}
return !!objKeys(value).length;
return !!objKeys(value)[LENGTH];
}

@@ -571,35 +583,2 @@ else {

var mathFloor = MathCls.floor;
var mathCeil = MathCls.ceil;
var _mathTrunc = MathCls.trunc;
var mathTrunc = _mathTrunc ? _mathTrunc : polyMathTrunc;
function polyMathTrunc(value) {
var theValue = +value;
return (theValue > 0 ? mathFloor : mathCeil)(theValue);
}
function mathToInt(value, throwInfinity) {
var result = +value;
if (result == Infinity && throwInfinity) {
throwRangeError("invalid value [" + dumpObj(value) + "]");
}
return result !== result || result === 0 ? 0 : mathTrunc(result);
}
var _objCreate = ObjClass["create"];
var objCreate = _objCreate ? _objCreate : polyObjCreate;
function polyObjCreate(obj) {
if (!obj) {
return {};
}
var type = typeof obj;
if (type !== OBJECT && type !== FUNCTION) {
throw new TypeError("Prototype must be an Object or function: " + dumpObj(obj));
}
function tempFunc() { }
tempFunc[PROTOTYPE] = obj;
return new tempFunc();
}
var _objDefineProperty = ObjClass["defineProperty"];

@@ -622,3 +601,3 @@ function objDefineProp(target, key, descriptor) {

else {
desc.value = value;
desc[VALUE] = value;
}

@@ -648,2 +627,204 @@ return objDefineProp(target, key, desc);

function createIterable(ctx) {
return makeIterable({}, ctx);
}
function makeIterable(target, ctx) {
var itSymbol = getKnownSymbol(3);
function _createIterator() {
return createIterator(ctx);
}
target[itSymbol] = _createIterator;
return target;
}
function createIterator(ctx) {
var isDone = false;
function _value() {
return ctx.v;
}
function _next() {
var _a;
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
isDone = isDone || (ctx.n ? ctx.n(args) : true);
var result = (_a = {},
_a[DONE] = isDone,
_a);
if (!isDone) {
objDefineGet(result, VALUE, _value);
}
return result;
}
function _return(value) {
var _a;
return _a = {},
_a[DONE] = true,
_a[VALUE] = ctx.r && ctx.r(value),
_a;
}
function _throw(e) {
var _a;
return _a = {},
_a[DONE] = true,
_a[VALUE] = ctx.t && ctx.t(e),
_a;
}
var theIterator = {
next: _next
};
if (ctx.r) {
theIterator.return = _return;
}
if (ctx.t) {
theIterator.throw = _throw;
}
return theIterator;
}
function createArrayIterator(values) {
var idx = -1;
var theValues = values ? values.slice() : [];
var len = theValues[LENGTH];
function _value() {
if (idx >= 0 && idx < len) {
return theValues[idx];
}
}
function _getNext() {
idx++;
return idx >= len;
}
var ctx = {
n: _getNext
};
objDefineAccessors(ctx, "v", _value);
return createIterator(ctx);
}
function iterForOf(iter, callbackfn, thisArg) {
if (iter) {
if (!isIterator(iter)) {
var itSymbol = getKnownSymbol(3);
iter = iter[itSymbol] ? iter[itSymbol]() : null;
}
if (isIterator(iter)) {
try {
var count = 0;
var value = iter.next();
while (!value[DONE]) {
if (callbackfn.call(thisArg || iter, value[VALUE], count, iter) === -1) {
break;
}
count++;
value = iter.next();
}
iter.return && iter.return(value);
}
catch (e) {
iter.throw && iter.throw(e);
}
}
}
}
function createRangeIterator(start, end, step) {
var nextValue = start;
var theValue = UNDEF_VALUE;
if (isNullOrUndefined(end)) {
end = start;
}
var theStep = step || ((start <= end) ? 1 : -1);
function _value() {
return theValue;
}
function _getNext() {
var isDone = false;
if (theStep > 0) {
isDone = nextValue > end;
}
else {
isDone = nextValue < end;
}
if (!isDone) {
theValue = nextValue;
nextValue += theStep;
}
return isDone;
}
var ctx = {
n: _getNext
};
objDefineAccessors(ctx, "v", _value);
return createIterator(ctx);
}
var mathFloor = MathCls.floor;
var mathCeil = MathCls.ceil;
var mathMin = MathCls.min;
var mathMax = MathCls.max;
var _mathTrunc = MathCls.trunc;
var mathTrunc = _mathTrunc ? _mathTrunc : polyMathTrunc;
function polyMathTrunc(value) {
var theValue = +value;
return (theValue > 0 ? mathFloor : mathCeil)(theValue);
}
function mathToInt(value, throwInfinity) {
var result = +value;
if (result == Infinity && throwInfinity) {
throwRangeError("invalid value [" + dumpObj(value) + "]");
}
return result !== result || result === 0 ? 0 : mathTrunc(result);
}
var _objCreate = ObjClass["create"];
var objCreate = _objCreate ? _objCreate : polyObjCreate;
function polyObjCreate(obj) {
if (!obj) {
return {};
}
var type = typeof obj;
if (type !== OBJECT && type !== FUNCTION) {
throw new TypeError("Prototype must be an Object or function: " + dumpObj(obj));
}
function tempFunc() { }
tempFunc[PROTOTYPE] = obj;
return new tempFunc();
}
var strSlice = _unwrapFunction("slice");
var SUB_STR = "substr";
var strSubstring = _unwrapFunction("substring");
var strSubstr = StrProto[SUB_STR] ? _unwrapFunction(SUB_STR) : polyStrSubstr;
function polyStrSubstr(value, start, length) {
if (isNullOrUndefined(value)) {
throwTypeError("'polyStrSubstr called with invalid " + dumpObj(value));
}
if (length < 0) {
return EMPTY;
}
start = start || 0;
if (start < 0) {
start = mathMax(start + value[LENGTH], 0);
}
if (isUndefined(length)) {
return strSlice(value, start);
}
return strSlice(value, start, start + length);
}
function strLeft(value, count) {
return strSubstring(value, 0, count);
}
function strRight(value, count) {
var len = value[LENGTH];
if (count <= 0) {
return EMPTY;
}
return len > count ? strSubstring(value, len - count) : value;
}
var ENDS_WITH = "endsWith";

@@ -656,6 +837,6 @@ var strEndsWith = StrProto[ENDS_WITH] ? _unwrapFunction(ENDS_WITH) : polyStrEndsWith;

var searchValue = isString(searchString) ? searchString : "" + searchString;
var chkLen = searchValue.length;
var len = value.length;
var chkLen = searchValue[LENGTH];
var len = value[LENGTH];
var end = !isUndefined(length) && length < len ? length : len;
return value.substring(end - chkLen, end) === searchValue;
return strSubstring(value, end - chkLen, end) === searchValue;
}

@@ -705,11 +886,11 @@

targetLength >>= 0;
var len = value.length;
var len = value[LENGTH];
if (len < targetLength) {
result = isNullOrUndefined(padString) ? " " : "" + padString;
targetLength = targetLength - len;
if (targetLength > result.length) {
result = strRepeat(result, mathCeil(targetLength / result.length));
if (targetLength > result[LENGTH]) {
result = strRepeat(result, mathCeil(targetLength / result[LENGTH]));
}
if (result.length > targetLength) {
result = result.substring(0, targetLength);
if (result[LENGTH] > targetLength) {
result = strSubstring(result, 0, targetLength);
}

@@ -728,4 +909,2 @@ }

var strSlice = _unwrapFunction("slice");
var STARTS_WITH = "startsWith";

@@ -738,5 +917,5 @@ var strStartsWith = StrProto[STARTS_WITH] ? _unwrapFunction(STARTS_WITH) : polyStrStartsWith;

var searchValue = isString(searchString) ? searchString : "" + searchString;
var chkLen = searchValue.length;
var chkLen = searchValue[LENGTH];
var pos = position > 0 ? position : 0;
return value.substring(pos, pos + chkLen) === searchValue;
return strSubstring(value, pos, pos + chkLen) === searchValue;
}

@@ -793,2 +972,3 @@

exports.arrReduce = arrReduce;
exports.createArrayIterator = createArrayIterator;
exports.createCustomError = createCustomError;

@@ -798,2 +978,5 @@ exports.createEnum = createEnum;

exports.createEnumValueMap = createEnumValueMap;
exports.createIterable = createIterable;
exports.createIterator = createIterator;
exports.createRangeIterator = createRangeIterator;
exports.createSimpleMap = createSimpleMap;

@@ -809,2 +992,3 @@ exports.createTypeMap = createTypeMap;

exports.getKnownSymbol = getKnownSymbol;
exports.getLength = getLength;
exports.getNavigator = getNavigator;

@@ -847,4 +1031,8 @@ exports.getSymbol = getSymbol;

exports.isWebWorker = isWebWorker;
exports.iterForOf = iterForOf;
exports.makeIterable = makeIterable;
exports.mathCeil = mathCeil;
exports.mathFloor = mathFloor;
exports.mathMax = mathMax;
exports.mathMin = mathMin;
exports.mathToInt = mathToInt;

@@ -873,2 +1061,3 @@ exports.mathTrunc = mathTrunc;

exports.polyObjKeys = polyObjKeys;
exports.polyStrSubstr = polyStrSubstr;
exports.polyStrTrim = polyStrTrim;

@@ -884,7 +1073,11 @@ exports.polyStrTrimEnd = polyStrTrimEnd;

exports.strLastIndexOf = strLastIndexOf;
exports.strLeft = strLeft;
exports.strPadEnd = strPadEnd;
exports.strPadStart = strPadStart;
exports.strRepeat = strRepeat;
exports.strRight = strRight;
exports.strSlice = strSlice;
exports.strStartsWith = strStartsWith;
exports.strSubstr = strSubstr;
exports.strSubstring = strSubstring;
exports.strTrim = strTrim;

@@ -891,0 +1084,0 @@ exports.strTrimEnd = strTrimEnd;

/*!
* NevWare21 - ts-utils, 0.4.1
* NevWare21 - ts-utils, 0.4.2
* https://github.com/nevware21/ts-utils

@@ -7,3 +7,3 @@ * Copyright (c) NevWare21 and contributors. All rights reserved.

*/
define(["exports"],function(n){"use strict";var o="",W="function",U="object",u="prototype",r="undefined",M="hasOwnProperty",t="Symbol",R="_polyfill",e="indexOf",i=Object,C=i[u],f=String[u],c=Math,a=Array,B=a[u];function s(n,r){try{r=n()}catch(t){}return r}function l(r){return function(n){return typeof n===r}}function p(r){return function(n){return!(!n||y(n)!==r)}}function y(n){return C.toString.call(n)}function b(n){return typeof n===r||n===r}function d(n){return null===n||b(n)}function z(n){return null===n||!h(n)}function h(n){return!!n||n!==undefined}var g=l("string"),m=l(W);function v(n){return!d(n)&&!!n&&typeof n===U}var S=a.isArray,G=p("[object Date]"),w=l("number"),j=l("boolean"),a=p("[object RegExp]"),L=p("[object File]"),H=p("[object FormData]"),J=p("[object Blob]"),V=p("[object ArrayBuffer]"),$=p("[object Error]");function q(n){return!!n&&m(n.then)}function Q(n){return!(!n||s(function(){return!(n&&0+n)},!n))}var X="window",Y=null,Z=s(function(){return h(window)},!1),nn=s(function(){return h(document)},!1),rn=s(function(){return h(navigator)},!1),tn=s(function(){return h(history)},!1),en=s(function(){return!!(self&&self instanceof WorkerGlobalScope)},!1),on=s(function(){return!(!process||!(process.versions||{}).node)},!1);function E(n){n=!1===n?null:Y;return n||((n=(n=(n=typeof globalThis!==r?globalThis:n)||typeof self===r?n:self)||typeof window===r?n:window)||typeof global===r||(n=global),Y=n),n}function O(n,r){r=E(r);return r&&r[n]?r[n]:n===X&&Z?window:null}function un(){return nn?document:O("document")}function fn(){return Z?window:O(X)}function cn(){return rn?navigator:O("navigator")}function an(){return tn?history:O("history")}function T(n,r){return n&&C[M].call(n,r)}function I(n,r,t){if(n&&v(n))for(var e in n)if(T(n,e)&&-1===r.call(t||n,e,n[e]))break}function N(n,r,t){if(n)for(var e=n.length,o=0;o<e&&!(o in n&&-1===r.call(t||n,n[o],o,n));o++);}function F(n){throw new TypeError(n)}function sn(n){throw new RangeError(n)}var ln=i.assign,pn=i.freeze;function yn(n){return n}function bn(n){return v(n)&&null!==n||F("objKeys called on non-object"),i.keys(n)}function P(n){var r;return S(n)?(r=[],N(n,function(n){r.push(P(n))}),r):v(n)?dn({},n):n}function dn(t,n){return d(n)||I(n,function(n,r){t[n]=P(r)}),t}function _(n){return pn&&I(n,function(n,r){(S(r)||v(r))&&pn(r)}),hn(n)}var hn=pn||yn,gn=i.seal||yn;function mn(n){var t={};return I(n,function(n,r){t[n]=n,t[r]=n}),_(t)}function vn(n){var t={};return I(n,function(n,r){t[n]=r[1],t[r[0]]=r[1]}),_(t)}var Sn,wn=mn({asyncIterator:0,hasInstance:1,isConcatSpreadable:2,iterator:3,match:4,matchAll:5,replace:6,search:7,species:8,split:9,toPrimitive:10,toStringTag:11,unscopables:12}),jn="__polySymbols$ts_utils";function En(){var n;return Sn||(n=E(),Sn=n[jn]=n[jn]||{k:{},s:{}}),Sn}var On={};function x(n){var r={description:""+n,toString:function(){return t+"("+n+")"}};return r[R]=!0,r}function Tn(n){var r,t=En();return T(t,n)||(r=x(n),t.k[n]=r,t.s[r]=""+n),t.k[n]}function In(n){return!d(n)&&"null"!=n||F(n+" is not a symbol"),En().s[n]}function Nn(n){n=wn[n];return n?On[n]=On[n]||x(t+"."+n):void 0}var Fn=s(function(){return h(Symbol)},!1),A=O(t),Pn=l("symbol");function _n(n){return!!xn(n)}function xn(n){return A=!1===n?O(t,n):A,Fn&&A}function An(n,r){var t=wn[n];return A?A[t||n]:r?null:Nn(n)}var Dn=A&&s(function(){return A["for"]},null)||Tn,kn=A&&s(function(){return A.keyFor},null)||In;function Kn(n){return!!n&&m(n.next)}function D(n,r){var t=y(n);return t+": "+("[object Error]"===t?"{ stack: '"+n.stack+"', message: '"+n.message+"', name: '"+n.name+"'":r?w(r)?JSON.stringify(n,null,r):JSON.stringify(n,null,r?4:0):JSON.stringify(n))}function k(e){return function(n){for(var r=[],t=1;t<arguments.length;t++)r[t-1]=arguments[t];if((n||n===o)&&n[e])return n[e].apply(n,r);F("'"+e+"' not defined for "+D(n))}}var Wn,Un=k(e),Mn=k("map"),Rn=k("reduce");function Cn(n,r){return(i.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(t,n){I(n,function(n,r){t[n]=r})})(n,r)}function Bn(n,r){var t,e,o=Error;function i(){this.constructor=t}return n=n,Cn(t=function(){var n=this,n=o.apply(n,arguments)||n;return r&&r(n,arguments),n},e=o),(i[u]=e[u]).name=n,t[u]=new i,t}function zn(n){throw new(Wn=Wn||Bn("UnsupportedError"))(n)}function Gn(r,n){return N(n,function(n){dn(r,n)}),r}var Ln=c.floor,Hn=c.ceil,Jn=c.trunc||function(n){n=+n;return(0<n?Ln:Hn)(n)};function Vn(n,r){var t=+n;return t==Infinity&&r&&sn("invalid value ["+D(n)+"]"),t!=t||0==t?0:Jn(t)}var c=i.create||function(n){if(!n)return{};var r=typeof n;if(r===U||r==W)return t[u]=n,new t;function t(){}throw new TypeError("Prototype must be an Object or function: "+D(n))},$n=i.defineProperty;function qn(n,r,t){if($n)return $n(n,r,t),n;zn("Unable to define property ["+y(r)+"] on "+D(n))}var Qn="endsWith",Qn=f[Qn]?k(Qn):function(n,r,t){g(n)||F("'"+D(n)+"' is not a string");var r=g(r)?r:""+r,e=r.length,o=n.length,t=!b(t)&&t<o?t:o;return n.substring(t-e,t)===r},e=k(e),Xn=k("lastIndexOf"),Yn=f.repeat?k("repeat"):function(n,r){d(n)&&F("can't convert ["+D(n)+"]"),(r=Vn(r,!0))<0&&sn("invalid count must be >= 0 && < Infinity");for(var t=g(n)?n:""+n,e=o;0<r;(r>>>=1)&&(t+=t))1&r&&(e+=t);return e},Zn="padStart";function nr(n,r,t){var e=o,n=(r=Vn(r,!0),n.length);return n<(r>>=0)&&(e=(r-=n)>(e=d(t)?" ":""+t).length?Yn(e,Hn(r/e.length)):e).length>r?e.substring(0,r):e}var Zn=f[Zn]?k(Zn):function(n,r,t){return nr(n,r,t)+n},rr=f.padEnd?k("padEnd"):function(n,r,t){return n+nr(n,r,t)},tr=k("slice"),er="startsWith",er=f[er]?k(er):function(n,r,t){g(n)||F("'"+D(n)+"' is not a string");var r=g(r)?r:""+r,e=r.length,t=0<t?t:0;return n.substring(t,t+e)===r};function or(r){return function(n){return d(n)&&F("strTrim called ["+D(n)+"]"),n&&n.replace?n.replace(r,""):n}}var ir=or(/^\s+|(?=\s)\s+$/g),ur=or(/^\s+/g),fr=or(/(?=\s)\s+$/g),K="trimStart",cr="trimEnd",ar=f.trim?k("trim"):ir,K=f[K]?k(K):ur,sr=K,f=f[cr]?k(cr):fr,cr=f;n.arrAppend=function(n,r){if(!b(r)&&n)if(S(r))B.push.apply(n,r);else if(Kn(r))for(var t=r.next();!t.done;)n.push(t.value),t=r.next();else n.push(r);return n},n.arrForEach=N,n.arrIndexOf=Un,n.arrMap=Mn,n.arrReduce=Rn,n.createCustomError=Bn,n.createEnum=function(n){var t={};return I(n,function(n,r){t[n]=r,t[r]=n}),_(t)},n.createEnumKeyMap=mn,n.createEnumValueMap=function(n){var t={};return I(n,function(n,r){t[n]=r,t[r]=r}),_(t)},n.createSimpleMap=vn,n.createTypeMap=vn,n.deepExtend=function(n){for(var r=[],t=1;t<arguments.length;t++)r[t-1]=arguments[t];return Gn(P(n)||{},r)},n.dumpObj=D,n.getDocument=un,n.getGlobal=E,n.getHistory=an,n.getInst=O,n.getIntValue=function(n,r){if(d(n))return r;if(w(n))return n;n=parseInt(n,10);return isNaN(n)?r:n},n.getKnownSymbol=An,n.getNavigator=cn,n.getSymbol=xn,n.getWindow=fn,n.hasDocument=function(){return!!un()},n.hasHistory=function(){return!!an()},n.hasNavigator=function(){return!!cn()},n.hasSymbol=_n,n.hasValue=function(n){return function f(n,r){var t,e,o=!1===n||0===n;if(!o&&!d(n))if(S(n))o=0<n.length;else if(G(n))o=!isNaN(n.getTime());else{if(j(n))return!0;if(v(n)){try{t=n,N(["length","byteLength","size","count"],function(n){if(n in t)return n=t[n],e=0<(m(n)?n():n),-1});var i=e;if(j(i))return i;if(m(n.valueOf)&&r<5)return f(n.valueOf(),++r)}catch(u){}return!!bn(n).length}o=Q(n)}return o}(n,0)},n.hasWindow=function(){return!!fn()},n.isArray=S,n.isArrayBuffer=V,n.isBlob=J,n.isBoolean=j,n.isDate=G,n.isDefined=h,n.isError=$,n.isFile=L,n.isFormData=H,n.isFunction=m,n.isIterable=function(n){return!z(n)&&(_n()?m(n[An(3)]):Kn(n))},n.isIterator=Kn,n.isNode=function(){return on},n.isNotTruthy=function(n){return!n||!s(function(){return n&&0+n},n)},n.isNullOrUndefined=d,n.isNumber=w,n.isObject=v,n.isPromise=function(n){return q(n)&&m(n["catch"])},n.isPromiseLike=q,n.isRegExp=a,n.isStrictNullOrUndefined=z,n.isStrictUndefined=function(n){return!h(n)},n.isString=g,n.isSymbol=Pn,n.isTruthy=Q,n.isTypeof=function(n,r){return typeof n===r},n.isUndefined=b,n.isWebWorker=function(){return en},n.mathCeil=Hn,n.mathFloor=Ln,n.mathToInt=Vn,n.mathTrunc=Jn,n.newSymbol=function(n,r){return Fn?Symbol(n):r?null:x(n)},n.objAssign=ln,n.objCopyProps=dn,n.objCreate=c,n.objDeepCopy=P,n.objDeepFreeze=_,n.objDefineAccessors=function(n,r,t,e,o){if($n)try{var i={enumerable:!0,configurable:!!b(o)||o};return t&&(i.get=t),e&&(i.set=e),qn(n,r,i)}catch(u){zn("Unable to define accessors for ["+y(r)+"] on "+D(n))}},n.objDefineGet=function(n,r,t,e){e={enumerable:!0,configurable:!!b(e)||e};return m(t)?e.get=t:e.value=t,qn(n,r,e)},n.objDefineProp=qn,n.objExtend=function(n){for(var r=[],t=1;t<arguments.length;t++)r[t-1]=arguments[t];return Gn(n||{},r)},n.objForEachKey=I,n.objFreeze=hn,n.objHasOwnProperty=T,n.objKeys=bn,n.objSeal=gn,n.objSetPrototypeOf=Cn,n.objToString=y,n.polyGetKnownSymbol=Nn,n.polyIsArray=function(n){return!d(n)&&"[object Array]"===y(n)},n.polyNewSymbol=x,n.polyObjKeys=function(n){if(!v(n)||null===n)throw new TypeError("polyObjKeys called on non-object");var r,t=[];for(r in n)T(n,r)&&t.push(r);return t},n.polyStrTrim=ir,n.polyStrTrimEnd=fr,n.polyStrTrimStart=ur,n.polySymbolFor=Tn,n.polySymbolKeyFor=In,n.strEndsWith=Qn,n.strIndexOf=e,n.strIsNullOrEmpty=function(n){return g(n)?n===o:d(n)},n.strIsNullOrWhiteSpace=function(n){return g(n)?n.replace(/[\s\t\r\n\f]+/g,o)===o:d(n)},n.strLastIndexOf=Xn,n.strPadEnd=rr,n.strPadStart=Zn,n.strRepeat=Yn,n.strSlice=tr,n.strStartsWith=er,n.strTrim=ar,n.strTrimEnd=f,n.strTrimLeft=sr,n.strTrimRight=cr,n.strTrimStart=K,n.symbolFor=Dn,n.symbolKeyFor=kn,n.throwError=function(n){throw Error(n)},n.throwRangeError=sn,n.throwTypeError=F,n.throwUnsupported=zn,Object.defineProperty(n,"__esModule",{value:!0})});
define(["exports"],function(r){"use strict";var W=undefined,o="",M="function",R="object",i="prototype",n="undefined",U="hasOwnProperty",t="Symbol",C="_polyfill",L="indexOf",c="length",B="done",a="value",e=Object,z=e[i],u=String[i],f=Math,G=Array,H=G[i];function s(r,n){try{n=r()}catch(t){}return n}function l(n){return function(r){return typeof r===n}}function p(n){return function(r){return!(!r||y(r)!==n)}}function y(r){return z.toString.call(r)}function b(r){return typeof r===n||r===n}function v(r){return null===r||b(r)}function J(r){return null===r||!d(r)}function d(r){return!!r||r!==W}var m=l("string"),h=l(M);function g(r){return!v(r)&&!!r&&typeof r===R}var S=G.isArray,V=p("[object Date]"),$=l("number"),q=l("boolean"),G=p("[object RegExp]"),Q=p("[object File]"),X=p("[object FormData]"),Y=p("[object Blob]"),Z=p("[object ArrayBuffer]"),rr=p("[object Error]");function nr(r){return!!r&&h(r.then)}function tr(r){return!(!r||s(function(){return!(r&&0+r)},!r))}var er=null,or=s(function(){return d(window)},!1),ur=s(function(){return d(document)},!1),ir=s(function(){return d(navigator)},!1),ar=s(function(){return d(history)},!1),cr=s(function(){return!!(self&&self instanceof WorkerGlobalScope)},!1),fr=s(function(){return!(!process||!(process.versions||{}).node)},!1);function sr(r){r=!1===r?null:er;return r||((r=(r=(r=typeof globalThis!==n?globalThis:r)||typeof self===n?r:self)||typeof window===n?r:window)||typeof global===n||(r=global),er=r),r}function w(r,n){n=sr(n);return n&&n[r]?n[r]:"window"===r&&or?window:null}function lr(){return ur?document:w("document")}function pr(){return or?window:w("window")}function yr(){return ir?navigator:w("navigator")}function br(){return ar?history:w("history")}function j(r,n){return r&&z[U].call(r,n)}function E(r,n,t){if(r&&g(r))for(var e in r)if(j(r,e)&&-1===n.call(t||r,e,r[e]))break}function O(r,n,t){if(r)for(var e=r[c],o=0;o<e&&!(o in r&&-1===n.call(t||r,r[o],o,r));o++);}function T(r){throw new TypeError(r)}function vr(r){throw new RangeError(r)}var dr=e.assign,mr=e.freeze;function hr(r){return r}function gr(r){return g(r)&&null!==r||T("objKeys called on non-object"),e.keys(r)}function I(r){var n;return S(r)?(n=[],O(r,function(r){n.push(I(r))}),n):g(r)?Sr({},r):r}function Sr(t,r){return v(r)||E(r,function(r,n){t[r]=I(n)}),t}function x(r){return mr&&E(r,function(r,n){(S(n)||g(n))&&mr(n)}),wr(r)}var wr=mr||hr,jr=e.seal||hr;function Er(r){var t={};return E(r,function(r,n){t[r]=r,t[n]=r}),x(t)}function Or(r){var t={};return E(r,function(r,n){t[r]=n[1],t[n[0]]=n[1]}),x(t)}var Tr,Ir=Er({asyncIterator:0,hasInstance:1,isConcatSpreadable:2,iterator:3,match:4,matchAll:5,replace:6,search:7,species:8,split:9,toPrimitive:10,toStringTag:11,unscopables:12}),xr="__polySymbols$ts_utils";function Nr(){var r;return Tr||(r=sr(),Tr=r[xr]=r[xr]||{k:{},s:{}}),Tr}var Fr={};function N(r){var n={description:""+r,toString:function(){return t+"("+r+")"}};return n[C]=!0,n}function Pr(r){var n,t=Nr();return j(t,r)||(n=N(r),t.k[r]=n,t.s[n]=""+r),t.k[r]}function _r(r){return!v(r)&&"null"!=r||T(r+" is not a symbol"),Nr().s[r]}function Ar(r){r=Ir[r];return r?Fr[r]=Fr[r]||N(t+"."+r):void 0}var kr=s(function(){return d(Symbol)},!1),F=w(t),Dr=l("symbol");function Kr(r){return F=!1===r?w(t,r):F,kr&&F}function P(r,n){var t=Ir[r];return F?F[t||r]:n?null:Ar(r)}var Wr=F&&s(function(){return F["for"]},null)||Pr,Mr=F&&s(function(){return F.keyFor},null)||_r;function _(r){return!!r&&h(r.next)}function A(r,n){var t=y(r);return t+": "+("[object Error]"===t?"{ stack: '"+r.stack+"', message: '"+r.message+"', name: '"+r.name+"'":n?$(n)?JSON.stringify(r,null,n):JSON.stringify(r,null,n?4:0):JSON.stringify(r))}function k(e){return function(r){for(var n=[],t=1;t<arguments.length;t++)n[t-1]=arguments[t];if((r||r===o)&&r[e])return r[e].apply(r,n);T("'"+e+"' not defined for "+A(r))}}var Rr,Ur=k(L),Cr=k("map"),Lr=k("reduce");function Br(r,n){return(e.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(t,r){E(r,function(r,n){t[r]=n})})(r,n)}function zr(r,n){var t,e,o=Error;function u(){this.constructor=t}return r=r,Br(t=function(){var r=this,r=o.apply(r,arguments)||r;return n&&n(r,arguments),r},e=o),(u[i]=e[i]).name=r,t[i]=new u,t}function Gr(r){throw new(Rr=Rr||zr("UnsupportedError"))(r)}function Hr(n,r){return O(r,function(r){Sr(n,r)}),n}var Jr=e.defineProperty;function Vr(r,n,t){if(Jr)return Jr(r,n,t),r;Gr("Unable to define property ["+y(n)+"] on "+A(r))}function $r(r,n,t,e){e={enumerable:!0,configurable:!!b(e)||e};return h(t)?e.get=t:e[a]=t,Vr(r,n,e)}function qr(r,n,t,e,o){if(Jr)try{var u={enumerable:!0,configurable:!!b(o)||o};return t&&(u.get=t),e&&(u.set=e),Vr(r,n,u)}catch(i){Gr("Unable to define accessors for ["+y(n)+"] on "+A(r))}}function Qr(r,n){return r[P(3)]=function(){return D(n)},r}function D(e){var o=!1;function u(){return e.v}var r={next:function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];o=o||!e.n||e.n(r),(t={})[B]=o;var t;return o||$r(t,a,u),t}};return e.r&&(r["return"]=function(r){var n={done:!0};return n[a]=e.r&&e.r(r),n}),e.t&&(r["throw"]=function(r){var n={done:!0};return n[a]=e.t&&e.t(r),n}),r}var Xr=f.floor,Yr=f.ceil,Zr=f.min,rn=f.max,nn=f.trunc||function(r){r=+r;return(0<r?Xr:Yr)(r)};function tn(r,n){var t=+r;return t==Infinity&&n&&vr("invalid value ["+A(r)+"]"),t!=t||0==t?0:nn(t)}var f=e.create||function(r){if(!r)return{};var n=typeof r;if(n===R||n==M)return t[i]=r,new t;function t(){}throw new TypeError("Prototype must be an Object or function: "+A(r))},en=k("slice"),K=k("substring"),on=u.substr?k("substr"):un;function un(r,n,t){return v(r)&&T("'polyStrSubstr called with invalid "+A(r)),t<0?o:((n=n||0)<0&&(n=rn(n+r[c],0)),b(t)?en(r,n):en(r,n,n+t))}var an="endsWith",an=u[an]?k(an):function(r,n,t){m(r)||T("'"+A(r)+"' is not a string");var n=m(n)?n:""+n,e=n[c],o=r[c],t=!b(t)&&t<o?t:o;return K(r,t-e,t)===n},L=k(L),cn=k("lastIndexOf"),fn=u.repeat?k("repeat"):function(r,n){v(r)&&T("can't convert ["+A(r)+"]"),(n=tn(n,!0))<0&&vr("invalid count must be >= 0 && < Infinity");for(var t=m(r)?r:""+r,e=o;0<n;(n>>>=1)&&(t+=t))1&n&&(e+=t);return e},sn="padStart";function ln(r,n,t){var e=o,r=(n=tn(n,!0),r[c]);return r<(n>>=0)&&(e=(n-=r)>(e=v(t)?" ":""+t)[c]?fn(e,Yr(n/e[c])):e)[c]>n?K(e,0,n):e}var sn=u[sn]?k(sn):function(r,n,t){return ln(r,n,t)+r},pn=u.padEnd?k("padEnd"):function(r,n,t){return r+ln(r,n,t)},yn="startsWith",yn=u[yn]?k(yn):function(r,n,t){m(r)||T("'"+A(r)+"' is not a string");var n=m(n)?n:""+n,e=n[c],t=0<t?t:0;return K(r,t,t+e)===n};function bn(n){return function(r){return v(r)&&T("strTrim called ["+A(r)+"]"),r&&r.replace?r.replace(n,""):r}}var vn=bn(/^\s+|(?=\s)\s+$/g),dn=bn(/^\s+/g),mn=bn(/(?=\s)\s+$/g),hn="trimStart",gn="trimEnd",Sn=u.trim?k("trim"):vn,hn=u[hn]?k(hn):dn,wn=hn,u=u[gn]?k(gn):mn,gn=u;r.arrAppend=function(r,n){if(!b(n)&&r)if(S(n))H.push.apply(r,n);else if(_(n))for(var t=n.next();!t[B];)r.push(t[a]),t=n.next();else r.push(n);return r},r.arrForEach=O,r.arrIndexOf=Ur,r.arrMap=Cr,r.arrReduce=Lr,r.createArrayIterator=function(r){var n=-1,t=r?r.slice():[],e=t[c],r={n:function(){return e<=++n}};return qr(r,"v",function(){if(0<=n&&n<e)return t[n]}),D(r)},r.createCustomError=zr,r.createEnum=function(r){var t={};return E(r,function(r,n){t[r]=n,t[n]=r}),x(t)},r.createEnumKeyMap=Er,r.createEnumValueMap=function(r){var t={};return E(r,function(r,n){t[r]=n,t[n]=n}),x(t)},r.createIterable=function(r){return Qr({},r)},r.createIterator=D,r.createRangeIterator=function(r,n,t){var e=r,o=W,u=(v(n)&&(n=r),t||(r<=n?1:-1)),t={n:function(){var r;return(r=0<u?n<e:e<n)||(o=e,e+=u),r}};return qr(t,"v",function(){return o}),D(t)},r.createSimpleMap=Or,r.createTypeMap=Or,r.deepExtend=function(r){for(var n=[],t=1;t<arguments.length;t++)n[t-1]=arguments[t];return Hr(I(r)||{},n)},r.dumpObj=A,r.getDocument=lr,r.getGlobal=sr,r.getHistory=br,r.getInst=w,r.getIntValue=function(r,n){if(v(r))return n;if($(r))return r;r=parseInt(r,10);return isNaN(r)?n:r},r.getKnownSymbol=P,r.getLength=function(r){return r.length},r.getNavigator=yr,r.getSymbol=Kr,r.getWindow=pr,r.hasDocument=function(){return!!lr()},r.hasHistory=function(){return!!br()},r.hasNavigator=function(){return!!yr()},r.hasSymbol=function(r){return!!Kr(r)},r.hasValue=function(r){return function a(r,n){var t,e,o=!1===r||0===r;if(!o&&!v(r))if(S(r))o=0<r[c];else if(V(r))o=!isNaN(r.getTime());else{if(q(r))return!0;if(g(r)){try{t=r,O([c,"byteLength","size","count"],function(r){if(r in t)return r=t[r],e=0<(h(r)?r():r),-1});var u=e;if(q(u))return u;if(h(r.valueOf)&&n<5)return a(r.valueOf(),++n)}catch(i){}return!!gr(r)[c]}o=tr(r)}return o}(r,0)},r.hasWindow=function(){return!!pr()},r.isArray=S,r.isArrayBuffer=Z,r.isBlob=Y,r.isBoolean=q,r.isDate=V,r.isDefined=d,r.isError=rr,r.isFile=Q,r.isFormData=X,r.isFunction=h,r.isIterable=function(r){return!J(r)&&h(r[P(3)])},r.isIterator=_,r.isNode=function(){return fr},r.isNotTruthy=function(r){return!r||!s(function(){return r&&0+r},r)},r.isNullOrUndefined=v,r.isNumber=$,r.isObject=g,r.isPromise=function(r){return nr(r)&&h(r["catch"])},r.isPromiseLike=nr,r.isRegExp=G,r.isStrictNullOrUndefined=J,r.isStrictUndefined=function(r){return!d(r)},r.isString=m,r.isSymbol=Dr,r.isTruthy=tr,r.isTypeof=function(r,n){return typeof r===n},r.isUndefined=b,r.isWebWorker=function(){return cr},r.iterForOf=function(r,n,t){var e;if(r&&(_(r)||(r=r[e=P(3)]?r[e]():null),_(r)))try{for(var o=0,u=r.next();!u[B]&&-1!==n.call(t||r,u[a],o,r);)o++,u=r.next();r["return"]&&r["return"](u)}catch(i){r["throw"]&&r["throw"](i)}},r.makeIterable=Qr,r.mathCeil=Yr,r.mathFloor=Xr,r.mathMax=rn,r.mathMin=Zr,r.mathToInt=tn,r.mathTrunc=nn,r.newSymbol=function(r,n){return kr?Symbol(r):n?null:N(r)},r.objAssign=dr,r.objCopyProps=Sr,r.objCreate=f,r.objDeepCopy=I,r.objDeepFreeze=x,r.objDefineAccessors=qr,r.objDefineGet=$r,r.objDefineProp=Vr,r.objExtend=function(r){for(var n=[],t=1;t<arguments.length;t++)n[t-1]=arguments[t];return Hr(r||{},n)},r.objForEachKey=E,r.objFreeze=wr,r.objHasOwnProperty=j,r.objKeys=gr,r.objSeal=jr,r.objSetPrototypeOf=Br,r.objToString=y,r.polyGetKnownSymbol=Ar,r.polyIsArray=function(r){return!v(r)&&"[object Array]"===y(r)},r.polyNewSymbol=N,r.polyObjKeys=function(r){if(!g(r)||null===r)throw new TypeError("polyObjKeys called on non-object");var n,t=[];for(n in r)j(r,n)&&t.push(n);return t},r.polyStrSubstr=un,r.polyStrTrim=vn,r.polyStrTrimEnd=mn,r.polyStrTrimStart=dn,r.polySymbolFor=Pr,r.polySymbolKeyFor=_r,r.strEndsWith=an,r.strIndexOf=L,r.strIsNullOrEmpty=function(r){return m(r)?r===o:v(r)},r.strIsNullOrWhiteSpace=function(r){return m(r)?r.replace(/[\s\t\r\n\f]+/g,o)===o:v(r)},r.strLastIndexOf=cn,r.strLeft=function(r,n){return K(r,0,n)},r.strPadEnd=pn,r.strPadStart=sn,r.strRepeat=fn,r.strRight=function(r,n){var t=r[c];return n<=0?o:n<t?K(r,t-n):r},r.strSlice=en,r.strStartsWith=yn,r.strSubstr=on,r.strSubstring=K,r.strTrim=Sn,r.strTrimEnd=u,r.strTrimLeft=wn,r.strTrimRight=gn,r.strTrimStart=hn,r.symbolFor=Wr,r.symbolKeyFor=Mr,r.throwError=function(r){throw Error(r)},r.throwRangeError=vr,r.throwTypeError=T,r.throwUnsupported=Gr,Object.defineProperty(r,"__esModule",{value:!0})});
//# sourceMappingURL=ts-utils.min.js.map
/*!
* NevWare21 - ts-utils, 0.4.1
* NevWare21 - ts-utils, 0.4.2
* https://github.com/nevware21/ts-utils

@@ -11,2 +11,3 @@ * Copyright (c) NevWare21 and contributors. All rights reserved.

var UNDEF_VALUE = undefined;
var EMPTY = "";

@@ -25,5 +26,9 @@ var BOOLEAN = "boolean";

var LAST_INDEX_OF = "lastIndexOf";
var LENGTH = "length";
var DONE = "done";
var VALUE = "value";
var ObjClass = Object;
var ObjProto = ObjClass[PROTOTYPE];
var StrProto = String[PROTOTYPE];
var StrCls = String;
var StrProto = StrCls[PROTOTYPE];
var MathCls = Math;

@@ -72,3 +77,3 @@ var ArrCls = Array;

function isDefined(arg) {
return !!arg || arg !== undefined;
return !!arg || arg !== UNDEF_VALUE;
}

@@ -195,3 +200,3 @@ var isString = _createIs(STRING);

if (arr) {
var len = arr.length;
var len = arr[LENGTH];
for (var idx = 0; idx < len; idx++) {

@@ -383,3 +388,3 @@ if (idx in arr) {

function isIterable(value) {
return !isStrictNullOrUndefined(value) && (hasSymbol() ? isFunction(value[getKnownSymbol(3)]) : isIterator(value));
return !isStrictNullOrUndefined(value) && isFunction(value[getKnownSymbol(3)]);
}

@@ -394,4 +399,4 @@

var value = elms.next();
while (!value.done) {
target.push(value.value);
while (!value[DONE]) {
target.push(value[VALUE]);
value = elms.next();

@@ -441,2 +446,7 @@ }

}
function _unwrapProp(propName) {
return function (thisArg) {
return thisArg[propName];
};
}

@@ -511,2 +521,4 @@ var arrIndexOf = _unwrapFunction(INDEX_OF);

var getLength = _unwrapProp(LENGTH);
function getIntValue(value, defValue) {

@@ -538,3 +550,3 @@ if (!isNullOrUndefined(value)) {

if (isArray(value)) {
result = value.length > 0;
result = value[LENGTH] > 0;
}

@@ -549,3 +561,3 @@ else if (isDate(value)) {

try {
var chkValue = _checkLength(value, ["length", "byteLength", "size", "count"]);
var chkValue = _checkLength(value, [LENGTH, "byteLength", "size", "count"]);
if (isBoolean(chkValue)) {

@@ -560,3 +572,3 @@ return chkValue;

}
return !!objKeys(value).length;
return !!objKeys(value)[LENGTH];
}

@@ -573,35 +585,2 @@ else {

var mathFloor = MathCls.floor;
var mathCeil = MathCls.ceil;
var _mathTrunc = MathCls.trunc;
var mathTrunc = _mathTrunc ? _mathTrunc : polyMathTrunc;
function polyMathTrunc(value) {
var theValue = +value;
return (theValue > 0 ? mathFloor : mathCeil)(theValue);
}
function mathToInt(value, throwInfinity) {
var result = +value;
if (result == Infinity && throwInfinity) {
throwRangeError("invalid value [" + dumpObj(value) + "]");
}
return result !== result || result === 0 ? 0 : mathTrunc(result);
}
var _objCreate = ObjClass["create"];
var objCreate = _objCreate ? _objCreate : polyObjCreate;
function polyObjCreate(obj) {
if (!obj) {
return {};
}
var type = typeof obj;
if (type !== OBJECT && type !== FUNCTION) {
throw new TypeError("Prototype must be an Object or function: " + dumpObj(obj));
}
function tempFunc() { }
tempFunc[PROTOTYPE] = obj;
return new tempFunc();
}
var _objDefineProperty = ObjClass["defineProperty"];

@@ -624,3 +603,3 @@ function objDefineProp(target, key, descriptor) {

else {
desc.value = value;
desc[VALUE] = value;
}

@@ -650,2 +629,204 @@ return objDefineProp(target, key, desc);

function createIterable(ctx) {
return makeIterable({}, ctx);
}
function makeIterable(target, ctx) {
var itSymbol = getKnownSymbol(3);
function _createIterator() {
return createIterator(ctx);
}
target[itSymbol] = _createIterator;
return target;
}
function createIterator(ctx) {
var isDone = false;
function _value() {
return ctx.v;
}
function _next() {
var _a;
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
isDone = isDone || (ctx.n ? ctx.n(args) : true);
var result = (_a = {},
_a[DONE] = isDone,
_a);
if (!isDone) {
objDefineGet(result, VALUE, _value);
}
return result;
}
function _return(value) {
var _a;
return _a = {},
_a[DONE] = true,
_a[VALUE] = ctx.r && ctx.r(value),
_a;
}
function _throw(e) {
var _a;
return _a = {},
_a[DONE] = true,
_a[VALUE] = ctx.t && ctx.t(e),
_a;
}
var theIterator = {
next: _next
};
if (ctx.r) {
theIterator.return = _return;
}
if (ctx.t) {
theIterator.throw = _throw;
}
return theIterator;
}
function createArrayIterator(values) {
var idx = -1;
var theValues = values ? values.slice() : [];
var len = theValues[LENGTH];
function _value() {
if (idx >= 0 && idx < len) {
return theValues[idx];
}
}
function _getNext() {
idx++;
return idx >= len;
}
var ctx = {
n: _getNext
};
objDefineAccessors(ctx, "v", _value);
return createIterator(ctx);
}
function iterForOf(iter, callbackfn, thisArg) {
if (iter) {
if (!isIterator(iter)) {
var itSymbol = getKnownSymbol(3);
iter = iter[itSymbol] ? iter[itSymbol]() : null;
}
if (isIterator(iter)) {
try {
var count = 0;
var value = iter.next();
while (!value[DONE]) {
if (callbackfn.call(thisArg || iter, value[VALUE], count, iter) === -1) {
break;
}
count++;
value = iter.next();
}
iter.return && iter.return(value);
}
catch (e) {
iter.throw && iter.throw(e);
}
}
}
}
function createRangeIterator(start, end, step) {
var nextValue = start;
var theValue = UNDEF_VALUE;
if (isNullOrUndefined(end)) {
end = start;
}
var theStep = step || ((start <= end) ? 1 : -1);
function _value() {
return theValue;
}
function _getNext() {
var isDone = false;
if (theStep > 0) {
isDone = nextValue > end;
}
else {
isDone = nextValue < end;
}
if (!isDone) {
theValue = nextValue;
nextValue += theStep;
}
return isDone;
}
var ctx = {
n: _getNext
};
objDefineAccessors(ctx, "v", _value);
return createIterator(ctx);
}
var mathFloor = MathCls.floor;
var mathCeil = MathCls.ceil;
var mathMin = MathCls.min;
var mathMax = MathCls.max;
var _mathTrunc = MathCls.trunc;
var mathTrunc = _mathTrunc ? _mathTrunc : polyMathTrunc;
function polyMathTrunc(value) {
var theValue = +value;
return (theValue > 0 ? mathFloor : mathCeil)(theValue);
}
function mathToInt(value, throwInfinity) {
var result = +value;
if (result == Infinity && throwInfinity) {
throwRangeError("invalid value [" + dumpObj(value) + "]");
}
return result !== result || result === 0 ? 0 : mathTrunc(result);
}
var _objCreate = ObjClass["create"];
var objCreate = _objCreate ? _objCreate : polyObjCreate;
function polyObjCreate(obj) {
if (!obj) {
return {};
}
var type = typeof obj;
if (type !== OBJECT && type !== FUNCTION) {
throw new TypeError("Prototype must be an Object or function: " + dumpObj(obj));
}
function tempFunc() { }
tempFunc[PROTOTYPE] = obj;
return new tempFunc();
}
var strSlice = _unwrapFunction("slice");
var SUB_STR = "substr";
var strSubstring = _unwrapFunction("substring");
var strSubstr = StrProto[SUB_STR] ? _unwrapFunction(SUB_STR) : polyStrSubstr;
function polyStrSubstr(value, start, length) {
if (isNullOrUndefined(value)) {
throwTypeError("'polyStrSubstr called with invalid " + dumpObj(value));
}
if (length < 0) {
return EMPTY;
}
start = start || 0;
if (start < 0) {
start = mathMax(start + value[LENGTH], 0);
}
if (isUndefined(length)) {
return strSlice(value, start);
}
return strSlice(value, start, start + length);
}
function strLeft(value, count) {
return strSubstring(value, 0, count);
}
function strRight(value, count) {
var len = value[LENGTH];
if (count <= 0) {
return EMPTY;
}
return len > count ? strSubstring(value, len - count) : value;
}
var ENDS_WITH = "endsWith";

@@ -658,6 +839,6 @@ var strEndsWith = StrProto[ENDS_WITH] ? _unwrapFunction(ENDS_WITH) : polyStrEndsWith;

var searchValue = isString(searchString) ? searchString : "" + searchString;
var chkLen = searchValue.length;
var len = value.length;
var chkLen = searchValue[LENGTH];
var len = value[LENGTH];
var end = !isUndefined(length) && length < len ? length : len;
return value.substring(end - chkLen, end) === searchValue;
return strSubstring(value, end - chkLen, end) === searchValue;
}

@@ -707,11 +888,11 @@

targetLength >>= 0;
var len = value.length;
var len = value[LENGTH];
if (len < targetLength) {
result = isNullOrUndefined(padString) ? " " : "" + padString;
targetLength = targetLength - len;
if (targetLength > result.length) {
result = strRepeat(result, mathCeil(targetLength / result.length));
if (targetLength > result[LENGTH]) {
result = strRepeat(result, mathCeil(targetLength / result[LENGTH]));
}
if (result.length > targetLength) {
result = result.substring(0, targetLength);
if (result[LENGTH] > targetLength) {
result = strSubstring(result, 0, targetLength);
}

@@ -730,4 +911,2 @@ }

var strSlice = _unwrapFunction("slice");
var STARTS_WITH = "startsWith";

@@ -740,5 +919,5 @@ var strStartsWith = StrProto[STARTS_WITH] ? _unwrapFunction(STARTS_WITH) : polyStrStartsWith;

var searchValue = isString(searchString) ? searchString : "" + searchString;
var chkLen = searchValue.length;
var chkLen = searchValue[LENGTH];
var pos = position > 0 ? position : 0;
return value.substring(pos, pos + chkLen) === searchValue;
return strSubstring(value, pos, pos + chkLen) === searchValue;
}

@@ -795,2 +974,3 @@

exports.arrReduce = arrReduce;
exports.createArrayIterator = createArrayIterator;
exports.createCustomError = createCustomError;

@@ -800,2 +980,5 @@ exports.createEnum = createEnum;

exports.createEnumValueMap = createEnumValueMap;
exports.createIterable = createIterable;
exports.createIterator = createIterator;
exports.createRangeIterator = createRangeIterator;
exports.createSimpleMap = createSimpleMap;

@@ -811,2 +994,3 @@ exports.createTypeMap = createTypeMap;

exports.getKnownSymbol = getKnownSymbol;
exports.getLength = getLength;
exports.getNavigator = getNavigator;

@@ -849,4 +1033,8 @@ exports.getSymbol = getSymbol;

exports.isWebWorker = isWebWorker;
exports.iterForOf = iterForOf;
exports.makeIterable = makeIterable;
exports.mathCeil = mathCeil;
exports.mathFloor = mathFloor;
exports.mathMax = mathMax;
exports.mathMin = mathMin;
exports.mathToInt = mathToInt;

@@ -875,2 +1063,3 @@ exports.mathTrunc = mathTrunc;

exports.polyObjKeys = polyObjKeys;
exports.polyStrSubstr = polyStrSubstr;
exports.polyStrTrim = polyStrTrim;

@@ -886,7 +1075,11 @@ exports.polyStrTrimEnd = polyStrTrimEnd;

exports.strLastIndexOf = strLastIndexOf;
exports.strLeft = strLeft;
exports.strPadEnd = strPadEnd;
exports.strPadStart = strPadStart;
exports.strRepeat = strRepeat;
exports.strRight = strRight;
exports.strSlice = strSlice;
exports.strStartsWith = strStartsWith;
exports.strSubstr = strSubstr;
exports.strSubstring = strSubstring;
exports.strTrim = strTrim;

@@ -893,0 +1086,0 @@ exports.strTrimEnd = strTrimEnd;

/*!
* NevWare21 - ts-utils, 0.4.1
* NevWare21 - ts-utils, 0.4.2
* https://github.com/nevware21/ts-utils

@@ -7,3 +7,3 @@ * Copyright (c) NevWare21 and contributors. All rights reserved.

*/
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var o="",W="function",U="object",u="prototype",t="undefined",M="hasOwnProperty",n="Symbol",R="_polyfill",r="indexOf",e=Object,C=e[u],i=String[u],s=Math,c=Array,B=c[u];function f(r,t){try{t=r()}catch(n){}return t}function p(t){return function(r){return typeof r===t}}function a(t){return function(r){return!(!r||l(r)!==t)}}function l(r){return C.toString.call(r)}function x(r){return typeof r===t||r===t}function y(r){return null===r||x(r)}function z(r){return null===r||!b(r)}function b(r){return!!r||r!==undefined}var d=p("string"),h=p(W);function g(r){return!y(r)&&!!r&&typeof r===U}var m=c.isArray,G=a("[object Date]"),v=p("number"),S=p("boolean"),c=a("[object RegExp]"),L=a("[object File]"),H=a("[object FormData]"),J=a("[object Blob]"),V=a("[object ArrayBuffer]"),$=a("[object Error]");function q(r){return!!r&&h(r.then)}function Q(r){return!(!r||f(function(){return!(r&&0+r)},!r))}var X="window",Y=null,Z=f(function(){return b(window)},!1),rr=f(function(){return b(document)},!1),tr=f(function(){return b(navigator)},!1),nr=f(function(){return b(history)},!1),er=f(function(){return!!(self&&self instanceof WorkerGlobalScope)},!1),or=f(function(){return!(!process||!(process.versions||{}).node)},!1);function w(r){r=!1===r?null:Y;return r||((r=(r=(r=typeof globalThis!==t?globalThis:r)||typeof self===t?r:self)||typeof window===t?r:window)||typeof global===t||(r=global),Y=r),r}function j(r,t){t=w(t);return t&&t[r]?t[r]:r===X&&Z?window:null}function ir(){return rr?document:j("document")}function ur(){return Z?window:j(X)}function sr(){return tr?navigator:j("navigator")}function cr(){return nr?history:j("history")}function E(r,t){return r&&C[M].call(r,t)}function O(r,t,n){if(r&&g(r))for(var e in r)if(E(r,e)&&-1===t.call(n||r,e,r[e]))break}function T(r,t,n){if(r)for(var e=r.length,o=0;o<e&&!(o in r&&-1===t.call(n||r,r[o],o,r));o++);}function I(r){throw new TypeError(r)}function N(r){throw new RangeError(r)}var fr=e.assign,pr=e.freeze;function ar(r){return r}function lr(r){return g(r)&&null!==r||I("objKeys called on non-object"),e.keys(r)}function F(r){var t;return m(r)?(t=[],T(r,function(r){t.push(F(r))}),t):g(r)?xr({},r):r}function xr(n,r){return y(r)||O(r,function(r,t){n[r]=F(t)}),n}function P(r){return pr&&O(r,function(r,t){(m(t)||g(t))&&pr(t)}),yr(r)}var yr=pr||ar,br=e.seal||ar;function dr(r){var n={};return O(r,function(r,t){n[r]=r,n[t]=r}),P(n)}function hr(r){var n={};return O(r,function(r,t){n[r]=t[1],n[t[0]]=t[1]}),P(n)}var gr,mr=dr({asyncIterator:0,hasInstance:1,isConcatSpreadable:2,iterator:3,match:4,matchAll:5,replace:6,search:7,species:8,split:9,toPrimitive:10,toStringTag:11,unscopables:12}),vr="__polySymbols$ts_utils";function Sr(){var r;return gr||(r=w(),gr=r[vr]=r[vr]||{k:{},s:{}}),gr}var wr={};function _(r){var t={description:""+r,toString:function(){return n+"("+r+")"}};return t[R]=!0,t}function jr(r){var t,n=Sr();return E(n,r)||(t=_(r),n.k[r]=t,n.s[t]=""+r),n.k[r]}function Er(r){return!y(r)&&"null"!=r||I(r+" is not a symbol"),Sr().s[r]}function Or(r){r=mr[r];return r?wr[r]=wr[r]||_(n+"."+r):void 0}var Tr=f(function(){return b(Symbol)},!1),A=j(n),Ir=p("symbol");function Nr(r){return!!Fr(r)}function Fr(r){return A=!1===r?j(n,r):A,Tr&&A}function Pr(r,t){var n=mr[r];return A?A[n||r]:t?null:Or(r)}var _r=A&&f(function(){return A["for"]},null)||jr,Ar=A&&f(function(){return A.keyFor},null)||Er;function Dr(r){return!!r&&h(r.next)}function D(r,t){var n=l(r);return n+": "+("[object Error]"===n?"{ stack: '"+r.stack+"', message: '"+r.message+"', name: '"+r.name+"'":t?v(t)?JSON.stringify(r,null,t):JSON.stringify(r,null,t?4:0):JSON.stringify(r))}function k(e){return function(r){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if((r||r===o)&&r[e])return r[e].apply(r,t);I("'"+e+"' not defined for "+D(r))}}var kr,Kr=k(r),Wr=k("map"),Ur=k("reduce");function Mr(r,t){return(e.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,t){r.__proto__=t}||function(n,r){O(r,function(r,t){n[r]=t})})(r,t)}function Rr(r,t){var n,e,o=Error;function i(){this.constructor=n}return r=r,Mr(n=function(){var r=this,r=o.apply(r,arguments)||r;return t&&t(r,arguments),r},e=o),(i[u]=e[u]).name=r,n[u]=new i,n}function Cr(r){throw new(kr=kr||Rr("UnsupportedError"))(r)}function Br(t,r){return T(r,function(r){xr(t,r)}),t}var zr=s.floor,Gr=s.ceil,Lr=s.trunc||function(r){r=+r;return(0<r?zr:Gr)(r)};function Hr(r,t){var n=+r;return n==Infinity&&t&&N("invalid value ["+D(r)+"]"),n!=n||0==n?0:Lr(n)}var s=e.create||function(r){if(!r)return{};var t=typeof r;if(t===U||t==W)return n[u]=r,new n;function n(){}throw new TypeError("Prototype must be an Object or function: "+D(r))},Jr=e.defineProperty;function Vr(r,t,n){if(Jr)return Jr(r,t,n),r;Cr("Unable to define property ["+l(t)+"] on "+D(r))}var $r="endsWith",$r=i[$r]?k($r):function(r,t,n){d(r)||I("'"+D(r)+"' is not a string");var t=d(t)?t:""+t,e=t.length,o=r.length,n=!x(n)&&n<o?n:o;return r.substring(n-e,n)===t},r=k(r),qr=k("lastIndexOf"),Qr=i.repeat?k("repeat"):function(r,t){y(r)&&I("can't convert ["+D(r)+"]"),(t=Hr(t,!0))<0&&N("invalid count must be >= 0 && < Infinity");for(var n=d(r)?r:""+r,e=o;0<t;(t>>>=1)&&(n+=n))1&t&&(e+=n);return e},Xr="padStart";function Yr(r,t,n){var e=o,r=(t=Hr(t,!0),r.length);return r<(t>>=0)&&(e=(t-=r)>(e=y(n)?" ":""+n).length?Qr(e,Gr(t/e.length)):e).length>t?e.substring(0,t):e}var Xr=i[Xr]?k(Xr):function(r,t,n){return Yr(r,t,n)+r},Zr=i.padEnd?k("padEnd"):function(r,t,n){return r+Yr(r,t,n)},rt=k("slice"),tt="startsWith",tt=i[tt]?k(tt):function(r,t,n){d(r)||I("'"+D(r)+"' is not a string");var t=d(t)?t:""+t,e=t.length,n=0<n?n:0;return r.substring(n,n+e)===t};function nt(t){return function(r){return y(r)&&I("strTrim called ["+D(r)+"]"),r&&r.replace?r.replace(t,""):r}}var et=nt(/^\s+|(?=\s)\s+$/g),ot=nt(/^\s+/g),it=nt(/(?=\s)\s+$/g),K="trimStart",ut="trimEnd",st=i.trim?k("trim"):et,K=i[K]?k(K):ot,ct=K,i=i[ut]?k(ut):it,ut=i;exports.arrAppend=function(r,t){if(!x(t)&&r)if(m(t))B.push.apply(r,t);else if(Dr(t))for(var n=t.next();!n.done;)r.push(n.value),n=t.next();else r.push(t);return r},exports.arrForEach=T,exports.arrIndexOf=Kr,exports.arrMap=Wr,exports.arrReduce=Ur,exports.createCustomError=Rr,exports.createEnum=function(r){var n={};return O(r,function(r,t){n[r]=t,n[t]=r}),P(n)},exports.createEnumKeyMap=dr,exports.createEnumValueMap=function(r){var n={};return O(r,function(r,t){n[r]=t,n[t]=t}),P(n)},exports.createSimpleMap=hr,exports.createTypeMap=hr,exports.deepExtend=function(r){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return Br(F(r)||{},t)},exports.dumpObj=D,exports.getDocument=ir,exports.getGlobal=w,exports.getHistory=cr,exports.getInst=j,exports.getIntValue=function(r,t){if(y(r))return t;if(v(r))return r;r=parseInt(r,10);return isNaN(r)?t:r},exports.getKnownSymbol=Pr,exports.getNavigator=sr,exports.getSymbol=Fr,exports.getWindow=ur,exports.hasDocument=function(){return!!ir()},exports.hasHistory=function(){return!!cr()},exports.hasNavigator=function(){return!!sr()},exports.hasSymbol=Nr,exports.hasValue=function(r){return function s(r,t){var n,e,o=!1===r||0===r;if(!o&&!y(r))if(m(r))o=0<r.length;else if(G(r))o=!isNaN(r.getTime());else{if(S(r))return!0;if(g(r)){try{n=r,T(["length","byteLength","size","count"],function(r){if(r in n)return r=n[r],e=0<(h(r)?r():r),-1});var i=e;if(S(i))return i;if(h(r.valueOf)&&t<5)return s(r.valueOf(),++t)}catch(u){}return!!lr(r).length}o=Q(r)}return o}(r,0)},exports.hasWindow=function(){return!!ur()},exports.isArray=m,exports.isArrayBuffer=V,exports.isBlob=J,exports.isBoolean=S,exports.isDate=G,exports.isDefined=b,exports.isError=$,exports.isFile=L,exports.isFormData=H,exports.isFunction=h,exports.isIterable=function(r){return!z(r)&&(Nr()?h(r[Pr(3)]):Dr(r))},exports.isIterator=Dr,exports.isNode=function(){return or},exports.isNotTruthy=function(r){return!r||!f(function(){return r&&0+r},r)},exports.isNullOrUndefined=y,exports.isNumber=v,exports.isObject=g,exports.isPromise=function(r){return q(r)&&h(r["catch"])},exports.isPromiseLike=q,exports.isRegExp=c,exports.isStrictNullOrUndefined=z,exports.isStrictUndefined=function(r){return!b(r)},exports.isString=d,exports.isSymbol=Ir,exports.isTruthy=Q,exports.isTypeof=function(r,t){return typeof r===t},exports.isUndefined=x,exports.isWebWorker=function(){return er},exports.mathCeil=Gr,exports.mathFloor=zr,exports.mathToInt=Hr,exports.mathTrunc=Lr,exports.newSymbol=function(r,t){return Tr?Symbol(r):t?null:_(r)},exports.objAssign=fr,exports.objCopyProps=xr,exports.objCreate=s,exports.objDeepCopy=F,exports.objDeepFreeze=P,exports.objDefineAccessors=function(r,t,n,e,o){if(Jr)try{var i={enumerable:!0,configurable:!!x(o)||o};return n&&(i.get=n),e&&(i.set=e),Vr(r,t,i)}catch(u){Cr("Unable to define accessors for ["+l(t)+"] on "+D(r))}},exports.objDefineGet=function(r,t,n,e){e={enumerable:!0,configurable:!!x(e)||e};return h(n)?e.get=n:e.value=n,Vr(r,t,e)},exports.objDefineProp=Vr,exports.objExtend=function(r){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return Br(r||{},t)},exports.objForEachKey=O,exports.objFreeze=yr,exports.objHasOwnProperty=E,exports.objKeys=lr,exports.objSeal=br,exports.objSetPrototypeOf=Mr,exports.objToString=l,exports.polyGetKnownSymbol=Or,exports.polyIsArray=function(r){return!y(r)&&"[object Array]"===l(r)},exports.polyNewSymbol=_,exports.polyObjKeys=function(r){if(!g(r)||null===r)throw new TypeError("polyObjKeys called on non-object");var t,n=[];for(t in r)E(r,t)&&n.push(t);return n},exports.polyStrTrim=et,exports.polyStrTrimEnd=it,exports.polyStrTrimStart=ot,exports.polySymbolFor=jr,exports.polySymbolKeyFor=Er,exports.strEndsWith=$r,exports.strIndexOf=r,exports.strIsNullOrEmpty=function(r){return d(r)?r===o:y(r)},exports.strIsNullOrWhiteSpace=function(r){return d(r)?r.replace(/[\s\t\r\n\f]+/g,o)===o:y(r)},exports.strLastIndexOf=qr,exports.strPadEnd=Zr,exports.strPadStart=Xr,exports.strRepeat=Qr,exports.strSlice=rt,exports.strStartsWith=tt,exports.strTrim=st,exports.strTrimEnd=i,exports.strTrimLeft=ct,exports.strTrimRight=ut,exports.strTrimStart=K,exports.symbolFor=_r,exports.symbolKeyFor=Ar,exports.throwError=function(r){throw Error(r)},exports.throwRangeError=N,exports.throwTypeError=I,exports.throwUnsupported=Cr;
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var W=undefined,o="",M="function",R="object",i="prototype",t="undefined",U="hasOwnProperty",n="Symbol",C="_polyfill",L="indexOf",a="length",B="done",s="value",e=Object,z=e[i],r=String[i],u=Math,G=Array,H=G[i];function c(r,t){try{t=r()}catch(n){}return t}function f(t){return function(r){return typeof r===t}}function p(t){return function(r){return!(!r||l(r)!==t)}}function l(r){return z.toString.call(r)}function x(r){return typeof r===t||r===t}function y(r){return null===r||x(r)}function J(r){return null===r||!b(r)}function b(r){return!!r||r!==W}var v=f("string"),d=f(M);function m(r){return!y(r)&&!!r&&typeof r===R}var h=G.isArray,V=p("[object Date]"),$=f("number"),q=f("boolean"),G=p("[object RegExp]"),Q=p("[object File]"),X=p("[object FormData]"),Y=p("[object Blob]"),Z=p("[object ArrayBuffer]"),rr=p("[object Error]");function tr(r){return!!r&&d(r.then)}function nr(r){return!(!r||c(function(){return!(r&&0+r)},!r))}var er=null,or=c(function(){return b(window)},!1),ur=c(function(){return b(document)},!1),ir=c(function(){return b(navigator)},!1),sr=c(function(){return b(history)},!1),ar=c(function(){return!!(self&&self instanceof WorkerGlobalScope)},!1),cr=c(function(){return!(!process||!(process.versions||{}).node)},!1);function fr(r){r=!1===r?null:er;return r||((r=(r=(r=typeof globalThis!==t?globalThis:r)||typeof self===t?r:self)||typeof window===t?r:window)||typeof global===t||(r=global),er=r),r}function g(r,t){t=fr(t);return t&&t[r]?t[r]:"window"===r&&or?window:null}function pr(){return ur?document:g("document")}function lr(){return or?window:g("window")}function xr(){return ir?navigator:g("navigator")}function yr(){return sr?history:g("history")}function S(r,t){return r&&z[U].call(r,t)}function w(r,t,n){if(r&&m(r))for(var e in r)if(S(r,e)&&-1===t.call(n||r,e,r[e]))break}function j(r,t,n){if(r)for(var e=r[a],o=0;o<e&&!(o in r&&-1===t.call(n||r,r[o],o,r));o++);}function E(r){throw new TypeError(r)}function br(r){throw new RangeError(r)}var vr=e.assign,dr=e.freeze;function mr(r){return r}function hr(r){return m(r)&&null!==r||E("objKeys called on non-object"),e.keys(r)}function O(r){var t;return h(r)?(t=[],j(r,function(r){t.push(O(r))}),t):m(r)?gr({},r):r}function gr(n,r){return y(r)||w(r,function(r,t){n[r]=O(t)}),n}function T(r){return dr&&w(r,function(r,t){(h(t)||m(t))&&dr(t)}),Sr(r)}var Sr=dr||mr,wr=e.seal||mr;function jr(r){var n={};return w(r,function(r,t){n[r]=r,n[t]=r}),T(n)}function Er(r){var n={};return w(r,function(r,t){n[r]=t[1],n[t[0]]=t[1]}),T(n)}var Or,Tr=jr({asyncIterator:0,hasInstance:1,isConcatSpreadable:2,iterator:3,match:4,matchAll:5,replace:6,search:7,species:8,split:9,toPrimitive:10,toStringTag:11,unscopables:12}),Ir="__polySymbols$ts_utils";function Nr(){var r;return Or||(r=fr(),Or=r[Ir]=r[Ir]||{k:{},s:{}}),Or}var Fr={};function I(r){var t={description:""+r,toString:function(){return n+"("+r+")"}};return t[C]=!0,t}function Pr(r){var t,n=Nr();return S(n,r)||(t=I(r),n.k[r]=t,n.s[t]=""+r),n.k[r]}function _r(r){return!y(r)&&"null"!=r||E(r+" is not a symbol"),Nr().s[r]}function Ar(r){r=Tr[r];return r?Fr[r]=Fr[r]||I(n+"."+r):void 0}var kr=c(function(){return b(Symbol)},!1),N=g(n),Dr=f("symbol");function Kr(r){return N=!1===r?g(n,r):N,kr&&N}function F(r,t){var n=Tr[r];return N?N[n||r]:t?null:Ar(r)}var Wr=N&&c(function(){return N["for"]},null)||Pr,Mr=N&&c(function(){return N.keyFor},null)||_r;function P(r){return!!r&&d(r.next)}function _(r,t){var n=l(r);return n+": "+("[object Error]"===n?"{ stack: '"+r.stack+"', message: '"+r.message+"', name: '"+r.name+"'":t?$(t)?JSON.stringify(r,null,t):JSON.stringify(r,null,t?4:0):JSON.stringify(r))}function A(e){return function(r){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if((r||r===o)&&r[e])return r[e].apply(r,t);E("'"+e+"' not defined for "+_(r))}}var Rr,Ur=A(L),Cr=A("map"),Lr=A("reduce");function Br(r,t){return(e.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,t){r.__proto__=t}||function(n,r){w(r,function(r,t){n[r]=t})})(r,t)}function zr(r,t){var n,e,o=Error;function u(){this.constructor=n}return r=r,Br(n=function(){var r=this,r=o.apply(r,arguments)||r;return t&&t(r,arguments),r},e=o),(u[i]=e[i]).name=r,n[i]=new u,n}function Gr(r){throw new(Rr=Rr||zr("UnsupportedError"))(r)}function Hr(t,r){return j(r,function(r){gr(t,r)}),t}var Jr=e.defineProperty;function Vr(r,t,n){if(Jr)return Jr(r,t,n),r;Gr("Unable to define property ["+l(t)+"] on "+_(r))}function $r(r,t,n,e){e={enumerable:!0,configurable:!!x(e)||e};return d(n)?e.get=n:e[s]=n,Vr(r,t,e)}function qr(r,t,n,e,o){if(Jr)try{var u={enumerable:!0,configurable:!!x(o)||o};return n&&(u.get=n),e&&(u.set=e),Vr(r,t,u)}catch(i){Gr("Unable to define accessors for ["+l(t)+"] on "+_(r))}}function Qr(r,t){return r[F(3)]=function(){return k(t)},r}function k(e){var o=!1;function u(){return e.v}var r={next:function(){for(var r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];o=o||!e.n||e.n(r),(n={})[B]=o;var n;return o||$r(n,s,u),n}};return e.r&&(r["return"]=function(r){var t={done:!0};return t[s]=e.r&&e.r(r),t}),e.t&&(r["throw"]=function(r){var t={done:!0};return t[s]=e.t&&e.t(r),t}),r}var Xr=u.floor,Yr=u.ceil,Zr=u.min,rt=u.max,tt=u.trunc||function(r){r=+r;return(0<r?Xr:Yr)(r)};function nt(r,t){var n=+r;return n==Infinity&&t&&br("invalid value ["+_(r)+"]"),n!=n||0==n?0:tt(n)}var u=e.create||function(r){if(!r)return{};var t=typeof r;if(t===R||t==M)return n[i]=r,new n;function n(){}throw new TypeError("Prototype must be an Object or function: "+_(r))},et=A("slice"),D=A("substring"),ot=r.substr?A("substr"):ut;function ut(r,t,n){return y(r)&&E("'polyStrSubstr called with invalid "+_(r)),n<0?o:((t=t||0)<0&&(t=rt(t+r[a],0)),x(n)?et(r,t):et(r,t,t+n))}var it="endsWith",it=r[it]?A(it):function(r,t,n){v(r)||E("'"+_(r)+"' is not a string");var t=v(t)?t:""+t,e=t[a],o=r[a],n=!x(n)&&n<o?n:o;return D(r,n-e,n)===t},L=A(L),st=A("lastIndexOf"),at=r.repeat?A("repeat"):function(r,t){y(r)&&E("can't convert ["+_(r)+"]"),(t=nt(t,!0))<0&&br("invalid count must be >= 0 && < Infinity");for(var n=v(r)?r:""+r,e=o;0<t;(t>>>=1)&&(n+=n))1&t&&(e+=n);return e},ct="padStart";function ft(r,t,n){var e=o,r=(t=nt(t,!0),r[a]);return r<(t>>=0)&&(e=(t-=r)>(e=y(n)?" ":""+n)[a]?at(e,Yr(t/e[a])):e)[a]>t?D(e,0,t):e}var ct=r[ct]?A(ct):function(r,t,n){return ft(r,t,n)+r},pt=r.padEnd?A("padEnd"):function(r,t,n){return r+ft(r,t,n)},lt="startsWith",lt=r[lt]?A(lt):function(r,t,n){v(r)||E("'"+_(r)+"' is not a string");var t=v(t)?t:""+t,e=t[a],n=0<n?n:0;return D(r,n,n+e)===t};function xt(t){return function(r){return y(r)&&E("strTrim called ["+_(r)+"]"),r&&r.replace?r.replace(t,""):r}}var yt=xt(/^\s+|(?=\s)\s+$/g),bt=xt(/^\s+/g),vt=xt(/(?=\s)\s+$/g),K="trimStart",dt="trimEnd",mt=r.trim?A("trim"):yt,K=r[K]?A(K):bt,ht=K,r=r[dt]?A(dt):vt,dt=r;exports.arrAppend=function(r,t){if(!x(t)&&r)if(h(t))H.push.apply(r,t);else if(P(t))for(var n=t.next();!n[B];)r.push(n[s]),n=t.next();else r.push(t);return r},exports.arrForEach=j,exports.arrIndexOf=Ur,exports.arrMap=Cr,exports.arrReduce=Lr,exports.createArrayIterator=function(r){var t=-1,n=r?r.slice():[],e=n[a],r={n:function(){return e<=++t}};return qr(r,"v",function(){if(0<=t&&t<e)return n[t]}),k(r)},exports.createCustomError=zr,exports.createEnum=function(r){var n={};return w(r,function(r,t){n[r]=t,n[t]=r}),T(n)},exports.createEnumKeyMap=jr,exports.createEnumValueMap=function(r){var n={};return w(r,function(r,t){n[r]=t,n[t]=t}),T(n)},exports.createIterable=function(r){return Qr({},r)},exports.createIterator=k,exports.createRangeIterator=function(r,t,n){var e=r,o=W,u=(y(t)&&(t=r),n||(r<=t?1:-1)),n={n:function(){var r;return(r=0<u?t<e:e<t)||(o=e,e+=u),r}};return qr(n,"v",function(){return o}),k(n)},exports.createSimpleMap=Er,exports.createTypeMap=Er,exports.deepExtend=function(r){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return Hr(O(r)||{},t)},exports.dumpObj=_,exports.getDocument=pr,exports.getGlobal=fr,exports.getHistory=yr,exports.getInst=g,exports.getIntValue=function(r,t){if(y(r))return t;if($(r))return r;r=parseInt(r,10);return isNaN(r)?t:r},exports.getKnownSymbol=F,exports.getLength=function(r){return r.length},exports.getNavigator=xr,exports.getSymbol=Kr,exports.getWindow=lr,exports.hasDocument=function(){return!!pr()},exports.hasHistory=function(){return!!yr()},exports.hasNavigator=function(){return!!xr()},exports.hasSymbol=function(r){return!!Kr(r)},exports.hasValue=function(r){return function s(r,t){var n,e,o=!1===r||0===r;if(!o&&!y(r))if(h(r))o=0<r[a];else if(V(r))o=!isNaN(r.getTime());else{if(q(r))return!0;if(m(r)){try{n=r,j([a,"byteLength","size","count"],function(r){if(r in n)return r=n[r],e=0<(d(r)?r():r),-1});var u=e;if(q(u))return u;if(d(r.valueOf)&&t<5)return s(r.valueOf(),++t)}catch(i){}return!!hr(r)[a]}o=nr(r)}return o}(r,0)},exports.hasWindow=function(){return!!lr()},exports.isArray=h,exports.isArrayBuffer=Z,exports.isBlob=Y,exports.isBoolean=q,exports.isDate=V,exports.isDefined=b,exports.isError=rr,exports.isFile=Q,exports.isFormData=X,exports.isFunction=d,exports.isIterable=function(r){return!J(r)&&d(r[F(3)])},exports.isIterator=P,exports.isNode=function(){return cr},exports.isNotTruthy=function(r){return!r||!c(function(){return r&&0+r},r)},exports.isNullOrUndefined=y,exports.isNumber=$,exports.isObject=m,exports.isPromise=function(r){return tr(r)&&d(r["catch"])},exports.isPromiseLike=tr,exports.isRegExp=G,exports.isStrictNullOrUndefined=J,exports.isStrictUndefined=function(r){return!b(r)},exports.isString=v,exports.isSymbol=Dr,exports.isTruthy=nr,exports.isTypeof=function(r,t){return typeof r===t},exports.isUndefined=x,exports.isWebWorker=function(){return ar},exports.iterForOf=function(r,t,n){var e;if(r&&(P(r)||(r=r[e=F(3)]?r[e]():null),P(r)))try{for(var o=0,u=r.next();!u[B]&&-1!==t.call(n||r,u[s],o,r);)o++,u=r.next();r["return"]&&r["return"](u)}catch(i){r["throw"]&&r["throw"](i)}},exports.makeIterable=Qr,exports.mathCeil=Yr,exports.mathFloor=Xr,exports.mathMax=rt,exports.mathMin=Zr,exports.mathToInt=nt,exports.mathTrunc=tt,exports.newSymbol=function(r,t){return kr?Symbol(r):t?null:I(r)},exports.objAssign=vr,exports.objCopyProps=gr,exports.objCreate=u,exports.objDeepCopy=O,exports.objDeepFreeze=T,exports.objDefineAccessors=qr,exports.objDefineGet=$r,exports.objDefineProp=Vr,exports.objExtend=function(r){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return Hr(r||{},t)},exports.objForEachKey=w,exports.objFreeze=Sr,exports.objHasOwnProperty=S,exports.objKeys=hr,exports.objSeal=wr,exports.objSetPrototypeOf=Br,exports.objToString=l,exports.polyGetKnownSymbol=Ar,exports.polyIsArray=function(r){return!y(r)&&"[object Array]"===l(r)},exports.polyNewSymbol=I,exports.polyObjKeys=function(r){if(!m(r)||null===r)throw new TypeError("polyObjKeys called on non-object");var t,n=[];for(t in r)S(r,t)&&n.push(t);return n},exports.polyStrSubstr=ut,exports.polyStrTrim=yt,exports.polyStrTrimEnd=vt,exports.polyStrTrimStart=bt,exports.polySymbolFor=Pr,exports.polySymbolKeyFor=_r,exports.strEndsWith=it,exports.strIndexOf=L,exports.strIsNullOrEmpty=function(r){return v(r)?r===o:y(r)},exports.strIsNullOrWhiteSpace=function(r){return v(r)?r.replace(/[\s\t\r\n\f]+/g,o)===o:y(r)},exports.strLastIndexOf=st,exports.strLeft=function(r,t){return D(r,0,t)},exports.strPadEnd=pt,exports.strPadStart=ct,exports.strRepeat=at,exports.strRight=function(r,t){var n=r[a];return t<=0?o:t<n?D(r,n-t):r},exports.strSlice=et,exports.strStartsWith=lt,exports.strSubstr=ot,exports.strSubstring=D,exports.strTrim=mt,exports.strTrimEnd=r,exports.strTrimLeft=ht,exports.strTrimRight=dt,exports.strTrimStart=K,exports.symbolFor=Wr,exports.symbolKeyFor=Mr,exports.throwError=function(r){throw Error(r)},exports.throwRangeError=br,exports.throwTypeError=E,exports.throwUnsupported=Gr;
//# sourceMappingURL=ts-utils.min.js.map
/*!
* NevWare21 - ts-utils, 0.4.1
* NevWare21 - ts-utils, 0.4.2
* https://github.com/nevware21/ts-utils

@@ -7,2 +7,3 @@ * Copyright (c) NevWare21 and contributors. All rights reserved.

*/
var UNDEF_VALUE = undefined;
var EMPTY = "";

@@ -21,5 +22,9 @@ var BOOLEAN = "boolean";

var LAST_INDEX_OF = "lastIndexOf";
var LENGTH = "length";
var DONE = "done";
var VALUE = "value";
var ObjClass = Object;
var ObjProto = ObjClass[PROTOTYPE];
var StrProto = String[PROTOTYPE];
var StrCls = String;
var StrProto = StrCls[PROTOTYPE];
var MathCls = Math;

@@ -68,3 +73,3 @@ var ArrCls = Array;

function isDefined(arg) {
return !!arg || arg !== undefined;
return !!arg || arg !== UNDEF_VALUE;
}

@@ -191,3 +196,3 @@ var isString = _createIs(STRING);

if (arr) {
var len = arr.length;
var len = arr[LENGTH];
for (var idx = 0; idx < len; idx++) {

@@ -379,3 +384,3 @@ if (idx in arr) {

function isIterable(value) {
return !isStrictNullOrUndefined(value) && (hasSymbol() ? isFunction(value[getKnownSymbol(3)]) : isIterator(value));
return !isStrictNullOrUndefined(value) && isFunction(value[getKnownSymbol(3)]);
}

@@ -390,4 +395,4 @@

var value = elms.next();
while (!value.done) {
target.push(value.value);
while (!value[DONE]) {
target.push(value[VALUE]);
value = elms.next();

@@ -437,2 +442,7 @@ }

}
function _unwrapProp(propName) {
return function (thisArg) {
return thisArg[propName];
};
}

@@ -507,2 +517,4 @@ var arrIndexOf = _unwrapFunction(INDEX_OF);

var getLength = _unwrapProp(LENGTH);
function getIntValue(value, defValue) {

@@ -534,3 +546,3 @@ if (!isNullOrUndefined(value)) {

if (isArray(value)) {
result = value.length > 0;
result = value[LENGTH] > 0;
}

@@ -545,3 +557,3 @@ else if (isDate(value)) {

try {
var chkValue = _checkLength(value, ["length", "byteLength", "size", "count"]);
var chkValue = _checkLength(value, [LENGTH, "byteLength", "size", "count"]);
if (isBoolean(chkValue)) {

@@ -556,3 +568,3 @@ return chkValue;

}
return !!objKeys(value).length;
return !!objKeys(value)[LENGTH];
}

@@ -569,35 +581,2 @@ else {

var mathFloor = MathCls.floor;
var mathCeil = MathCls.ceil;
var _mathTrunc = MathCls.trunc;
var mathTrunc = _mathTrunc ? _mathTrunc : polyMathTrunc;
function polyMathTrunc(value) {
var theValue = +value;
return (theValue > 0 ? mathFloor : mathCeil)(theValue);
}
function mathToInt(value, throwInfinity) {
var result = +value;
if (result == Infinity && throwInfinity) {
throwRangeError("invalid value [" + dumpObj(value) + "]");
}
return result !== result || result === 0 ? 0 : mathTrunc(result);
}
var _objCreate = ObjClass["create"];
var objCreate = _objCreate ? _objCreate : polyObjCreate;
function polyObjCreate(obj) {
if (!obj) {
return {};
}
var type = typeof obj;
if (type !== OBJECT && type !== FUNCTION) {
throw new TypeError("Prototype must be an Object or function: " + dumpObj(obj));
}
function tempFunc() { }
tempFunc[PROTOTYPE] = obj;
return new tempFunc();
}
var _objDefineProperty = ObjClass["defineProperty"];

@@ -620,3 +599,3 @@ function objDefineProp(target, key, descriptor) {

else {
desc.value = value;
desc[VALUE] = value;
}

@@ -646,2 +625,204 @@ return objDefineProp(target, key, desc);

function createIterable(ctx) {
return makeIterable({}, ctx);
}
function makeIterable(target, ctx) {
var itSymbol = getKnownSymbol(3);
function _createIterator() {
return createIterator(ctx);
}
target[itSymbol] = _createIterator;
return target;
}
function createIterator(ctx) {
var isDone = false;
function _value() {
return ctx.v;
}
function _next() {
var _a;
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
isDone = isDone || (ctx.n ? ctx.n(args) : true);
var result = (_a = {},
_a[DONE] = isDone,
_a);
if (!isDone) {
objDefineGet(result, VALUE, _value);
}
return result;
}
function _return(value) {
var _a;
return _a = {},
_a[DONE] = true,
_a[VALUE] = ctx.r && ctx.r(value),
_a;
}
function _throw(e) {
var _a;
return _a = {},
_a[DONE] = true,
_a[VALUE] = ctx.t && ctx.t(e),
_a;
}
var theIterator = {
next: _next
};
if (ctx.r) {
theIterator.return = _return;
}
if (ctx.t) {
theIterator.throw = _throw;
}
return theIterator;
}
function createArrayIterator(values) {
var idx = -1;
var theValues = values ? values.slice() : [];
var len = theValues[LENGTH];
function _value() {
if (idx >= 0 && idx < len) {
return theValues[idx];
}
}
function _getNext() {
idx++;
return idx >= len;
}
var ctx = {
n: _getNext
};
objDefineAccessors(ctx, "v", _value);
return createIterator(ctx);
}
function iterForOf(iter, callbackfn, thisArg) {
if (iter) {
if (!isIterator(iter)) {
var itSymbol = getKnownSymbol(3);
iter = iter[itSymbol] ? iter[itSymbol]() : null;
}
if (isIterator(iter)) {
try {
var count = 0;
var value = iter.next();
while (!value[DONE]) {
if (callbackfn.call(thisArg || iter, value[VALUE], count, iter) === -1) {
break;
}
count++;
value = iter.next();
}
iter.return && iter.return(value);
}
catch (e) {
iter.throw && iter.throw(e);
}
}
}
}
function createRangeIterator(start, end, step) {
var nextValue = start;
var theValue = UNDEF_VALUE;
if (isNullOrUndefined(end)) {
end = start;
}
var theStep = step || ((start <= end) ? 1 : -1);
function _value() {
return theValue;
}
function _getNext() {
var isDone = false;
if (theStep > 0) {
isDone = nextValue > end;
}
else {
isDone = nextValue < end;
}
if (!isDone) {
theValue = nextValue;
nextValue += theStep;
}
return isDone;
}
var ctx = {
n: _getNext
};
objDefineAccessors(ctx, "v", _value);
return createIterator(ctx);
}
var mathFloor = MathCls.floor;
var mathCeil = MathCls.ceil;
var mathMin = MathCls.min;
var mathMax = MathCls.max;
var _mathTrunc = MathCls.trunc;
var mathTrunc = _mathTrunc ? _mathTrunc : polyMathTrunc;
function polyMathTrunc(value) {
var theValue = +value;
return (theValue > 0 ? mathFloor : mathCeil)(theValue);
}
function mathToInt(value, throwInfinity) {
var result = +value;
if (result == Infinity && throwInfinity) {
throwRangeError("invalid value [" + dumpObj(value) + "]");
}
return result !== result || result === 0 ? 0 : mathTrunc(result);
}
var _objCreate = ObjClass["create"];
var objCreate = _objCreate ? _objCreate : polyObjCreate;
function polyObjCreate(obj) {
if (!obj) {
return {};
}
var type = typeof obj;
if (type !== OBJECT && type !== FUNCTION) {
throw new TypeError("Prototype must be an Object or function: " + dumpObj(obj));
}
function tempFunc() { }
tempFunc[PROTOTYPE] = obj;
return new tempFunc();
}
var strSlice = _unwrapFunction("slice");
var SUB_STR = "substr";
var strSubstring = _unwrapFunction("substring");
var strSubstr = StrProto[SUB_STR] ? _unwrapFunction(SUB_STR) : polyStrSubstr;
function polyStrSubstr(value, start, length) {
if (isNullOrUndefined(value)) {
throwTypeError("'polyStrSubstr called with invalid " + dumpObj(value));
}
if (length < 0) {
return EMPTY;
}
start = start || 0;
if (start < 0) {
start = mathMax(start + value[LENGTH], 0);
}
if (isUndefined(length)) {
return strSlice(value, start);
}
return strSlice(value, start, start + length);
}
function strLeft(value, count) {
return strSubstring(value, 0, count);
}
function strRight(value, count) {
var len = value[LENGTH];
if (count <= 0) {
return EMPTY;
}
return len > count ? strSubstring(value, len - count) : value;
}
var ENDS_WITH = "endsWith";

@@ -654,6 +835,6 @@ var strEndsWith = StrProto[ENDS_WITH] ? _unwrapFunction(ENDS_WITH) : polyStrEndsWith;

var searchValue = isString(searchString) ? searchString : "" + searchString;
var chkLen = searchValue.length;
var len = value.length;
var chkLen = searchValue[LENGTH];
var len = value[LENGTH];
var end = !isUndefined(length) && length < len ? length : len;
return value.substring(end - chkLen, end) === searchValue;
return strSubstring(value, end - chkLen, end) === searchValue;
}

@@ -703,11 +884,11 @@

targetLength >>= 0;
var len = value.length;
var len = value[LENGTH];
if (len < targetLength) {
result = isNullOrUndefined(padString) ? " " : "" + padString;
targetLength = targetLength - len;
if (targetLength > result.length) {
result = strRepeat(result, mathCeil(targetLength / result.length));
if (targetLength > result[LENGTH]) {
result = strRepeat(result, mathCeil(targetLength / result[LENGTH]));
}
if (result.length > targetLength) {
result = result.substring(0, targetLength);
if (result[LENGTH] > targetLength) {
result = strSubstring(result, 0, targetLength);
}

@@ -726,4 +907,2 @@ }

var strSlice = _unwrapFunction("slice");
var STARTS_WITH = "startsWith";

@@ -736,5 +915,5 @@ var strStartsWith = StrProto[STARTS_WITH] ? _unwrapFunction(STARTS_WITH) : polyStrStartsWith;

var searchValue = isString(searchString) ? searchString : "" + searchString;
var chkLen = searchValue.length;
var chkLen = searchValue[LENGTH];
var pos = position > 0 ? position : 0;
return value.substring(pos, pos + chkLen) === searchValue;
return strSubstring(value, pos, pos + chkLen) === searchValue;
}

@@ -786,3 +965,3 @@

export { arrAppend, arrForEach, arrIndexOf, arrMap, arrReduce, createCustomError, createEnum, createEnumKeyMap, createEnumValueMap, createSimpleMap, createTypeMap, deepExtend, dumpObj, getDocument, getGlobal, getHistory, getInst, getIntValue, getKnownSymbol, getNavigator, getSymbol, getWindow, hasDocument, hasHistory, hasNavigator, hasSymbol, hasValue, hasWindow, isArray, isArrayBuffer, isBlob, isBoolean, isDate, isDefined, isError, isFile, isFormData, isFunction, isIterable, isIterator, isNode, isNotTruthy, isNullOrUndefined, isNumber, isObject, isPromise, isPromiseLike, isRegExp, isStrictNullOrUndefined, isStrictUndefined, isString, isSymbol, isTruthy, isTypeof, isUndefined, isWebWorker, mathCeil, mathFloor, mathToInt, mathTrunc, newSymbol, objAssign, objCopyProps, objCreate, objDeepCopy, objDeepFreeze, objDefineAccessors, objDefineGet, objDefineProp, objExtend, objForEachKey, objFreeze, objHasOwnProperty, objKeys, objSeal, objSetPrototypeOf, objToString, polyGetKnownSymbol, polyIsArray, polyNewSymbol, polyObjKeys, polyStrTrim, polyStrTrimEnd, polyStrTrimStart, polySymbolFor, polySymbolKeyFor, strEndsWith, strIndexOf, strIsNullOrEmpty, strIsNullOrWhiteSpace, strLastIndexOf, strPadEnd, strPadStart, strRepeat, strSlice, strStartsWith, strTrim, strTrimEnd, strTrimLeft, strTrimRight, strTrimStart, symbolFor, symbolKeyFor, throwError, throwRangeError, throwTypeError, throwUnsupported };
export { arrAppend, arrForEach, arrIndexOf, arrMap, arrReduce, createArrayIterator, createCustomError, createEnum, createEnumKeyMap, createEnumValueMap, createIterable, createIterator, createRangeIterator, createSimpleMap, createTypeMap, deepExtend, dumpObj, getDocument, getGlobal, getHistory, getInst, getIntValue, getKnownSymbol, getLength, getNavigator, getSymbol, getWindow, hasDocument, hasHistory, hasNavigator, hasSymbol, hasValue, hasWindow, isArray, isArrayBuffer, isBlob, isBoolean, isDate, isDefined, isError, isFile, isFormData, isFunction, isIterable, isIterator, isNode, isNotTruthy, isNullOrUndefined, isNumber, isObject, isPromise, isPromiseLike, isRegExp, isStrictNullOrUndefined, isStrictUndefined, isString, isSymbol, isTruthy, isTypeof, isUndefined, isWebWorker, iterForOf, makeIterable, mathCeil, mathFloor, mathMax, mathMin, mathToInt, mathTrunc, newSymbol, objAssign, objCopyProps, objCreate, objDeepCopy, objDeepFreeze, objDefineAccessors, objDefineGet, objDefineProp, objExtend, objForEachKey, objFreeze, objHasOwnProperty, objKeys, objSeal, objSetPrototypeOf, objToString, polyGetKnownSymbol, polyIsArray, polyNewSymbol, polyObjKeys, polyStrSubstr, polyStrTrim, polyStrTrimEnd, polyStrTrimStart, polySymbolFor, polySymbolKeyFor, strEndsWith, strIndexOf, strIsNullOrEmpty, strIsNullOrWhiteSpace, strLastIndexOf, strLeft, strPadEnd, strPadStart, strRepeat, strRight, strSlice, strStartsWith, strSubstr, strSubstring, strTrim, strTrimEnd, strTrimLeft, strTrimRight, strTrimStart, symbolFor, symbolKeyFor, throwError, throwRangeError, throwTypeError, throwUnsupported };
//# sourceMappingURL=ts-utils.js.map
/*!
* NevWare21 - ts-utils, 0.4.1
* NevWare21 - ts-utils, 0.4.2
* https://github.com/nevware21/ts-utils

@@ -7,3 +7,3 @@ * Copyright (c) NevWare21 and contributors. All rights reserved.

*/
var o="",W="function",U="object",i="prototype",r="undefined",R="hasOwnProperty",t="Symbol",C="_polyfill",n="indexOf",e=Object,M=e[i],a=String[i],u=Math,s=Array,B=s[i];function f(n,r){try{r=n()}catch(t){}return r}function c(r){return function(n){return typeof n===r}}function l(r){return function(n){return!(!n||p(n)!==r)}}function p(n){return M.toString.call(n)}function z(n,r){return typeof n===r}function y(n){return typeof n===r||n===r}function G(n){return!h(n)}function b(n){return null===n||y(n)}function L(n){return null===n||!h(n)}function h(n){return!!n||n!==undefined}var d=c("string"),g=c(W);function m(n){return!b(n)&&!!n&&typeof n===U}var v=s.isArray,H=l("[object Date]"),S=c("number"),w=c("boolean"),s=l("[object RegExp]"),J=l("[object File]"),V=l("[object FormData]"),$=l("[object Blob]"),q=l("[object ArrayBuffer]"),Q=l("[object Error]");function X(n){return!!n&&g(n.then)}function Y(n){return X(n)&&g(n["catch"])}function Z(n){return!n||!f(function(){return n&&0+n},n)}function nn(n){return!(!n||f(function(){return!(n&&0+n)},!n))}var rn="window",tn=null,en=f(function(){return h(window)},!1),on=f(function(){return h(document)},!1),an=f(function(){return h(navigator)},!1),un=f(function(){return h(history)},!1),sn=f(function(){return!!(self&&self instanceof WorkerGlobalScope)},!1),fn=f(function(){return!(!process||!(process.versions||{}).node)},!1);function j(n){n=!1===n?null:tn;return n||((n=(n=(n=typeof globalThis!==r?globalThis:n)||typeof self===r?n:self)||typeof window===r?n:window)||typeof global===r||(n=global),tn=n),n}function E(n,r){r=j(r);return r&&r[n]?r[n]:n===rn&&en?window:null}function cn(){return!!ln()}function ln(){return on?document:E("document")}function pn(){return!!yn()}function yn(){return en?window:E(rn)}function bn(){return!!hn()}function hn(){return an?navigator:E("navigator")}function dn(){return!!gn()}function gn(){return un?history:E("history")}function mn(){return fn}function vn(){return sn}function O(n,r){return n&&M[R].call(n,r)}function T(n,r,t){if(n&&m(n))for(var e in n)if(O(n,e)&&-1===r.call(t||n,e,n[e]))break}function I(n,r,t){if(n)for(var e=n.length,o=0;o<e&&!(o in n&&-1===r.call(t||n,n[o],o,n));o++);}function Sn(n){throw Error(n)}function N(n){throw new TypeError(n)}function F(n){throw new RangeError(n)}var wn=e.assign,jn=e.freeze;function En(n){return n}function On(n){return m(n)&&null!==n||N("objKeys called on non-object"),e.keys(n)}function x(n){var r;return v(n)?(r=[],I(n,function(n){r.push(x(n))}),r):m(n)?Tn({},n):n}function Tn(t,n){return b(n)||T(n,function(n,r){t[n]=x(r)}),t}function P(n){return jn&&T(n,function(n,r){(v(r)||m(r))&&jn(r)}),In(n)}var In=jn||En,Nn=e.seal||En;function Fn(n){var t={};return T(n,function(n,r){t[n]=r,t[r]=n}),P(t)}function xn(n){var t={};return T(n,function(n,r){t[n]=n,t[r]=n}),P(t)}function Pn(n){var t={};return T(n,function(n,r){t[n]=r,t[r]=r}),P(t)}function An(n){var t={};return T(n,function(n,r){t[n]=r[1],t[r[0]]=r[1]}),P(t)}function Dn(n){return An(n)}var _n,kn=xn({asyncIterator:0,hasInstance:1,isConcatSpreadable:2,iterator:3,match:4,matchAll:5,replace:6,search:7,species:8,split:9,toPrimitive:10,toStringTag:11,unscopables:12}),Kn="__polySymbols$ts_utils";function Wn(){var n;return _n||(n=j(),_n=n[Kn]=n[Kn]||{k:{},s:{}}),_n}var Un={};function A(n){var r={description:""+n,toString:function(){return t+"("+n+")"}};return r[C]=!0,r}function Rn(n){var r,t=Wn();return O(t,n)||(r=A(n),t.k[n]=r,t.s[r]=""+n),t.k[n]}function Cn(n){return!b(n)&&"null"!=n||N(n+" is not a symbol"),Wn().s[n]}function Mn(n){n=kn[n];return n?Un[n]=Un[n]||A(t+"."+n):void 0}var Bn=f(function(){return h(Symbol)},!1),D=E(t),zn=c("symbol");function Gn(n){return!!Ln(n)}function Ln(n){return D=!1===n?E(t,n):D,Bn&&D}function Hn(n,r){var t=kn[n];return D?D[t||n]:r?null:Mn(n)}function Jn(n,r){return Bn?Symbol(n):r?null:A(n)}var Vn=D&&f(function(){return D["for"]},null)||Rn,$n=D&&f(function(){return D.keyFor},null)||Cn;function qn(n){return!!n&&g(n.next)}function Qn(n){return!L(n)&&(Gn()?g(n[Hn(3)]):qn(n))}function Xn(n,r){if(!y(r)&&n)if(v(r))B.push.apply(n,r);else if(qn(r))for(var t=r.next();!t.done;)n.push(t.value),t=r.next();else n.push(r);return n}function _(n,r){var t=p(n);return t+": "+("[object Error]"===t?"{ stack: '"+n.stack+"', message: '"+n.message+"', name: '"+n.name+"'":r?S(r)?JSON.stringify(n,null,r):JSON.stringify(n,null,r?4:0):JSON.stringify(n))}function k(e){return function(n){for(var r=[],t=1;t<arguments.length;t++)r[t-1]=arguments[t];if((n||n===o)&&n[e])return n[e].apply(n,r);N("'"+e+"' not defined for "+_(n))}}var Yn,Zn=k(n),nr=k("map"),rr=k("reduce");function tr(n,r){return(e.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(t,n){T(n,function(n,r){t[n]=r})})(n,r)}function er(n,r){var t,e,o=Error;function a(){this.constructor=t}return n=n,tr(t=function(){var n=this,n=o.apply(n,arguments)||n;return r&&r(n,arguments),n},e=o),(a[i]=e[i]).name=n,t[i]=new a,t}function or(n){throw new(Yn=Yn||er("UnsupportedError"))(n)}function ar(r,n){return I(n,function(n){Tn(r,n)}),r}function ir(n){for(var r=[],t=1;t<arguments.length;t++)r[t-1]=arguments[t];return ar(x(n)||{},r)}function ur(n){for(var r=[],t=1;t<arguments.length;t++)r[t-1]=arguments[t];return ar(n||{},r)}function sr(n,r){if(b(n))return r;if(S(n))return n;n=parseInt(n,10);return isNaN(n)?r:n}function fr(n){return function u(n,r){var t,e,o=!1===n||0===n;if(!o&&!b(n))if(v(n))o=0<n.length;else if(H(n))o=!isNaN(n.getTime());else{if(w(n))return!0;if(m(n)){try{t=n,I(["length","byteLength","size","count"],function(n){if(n in t)return n=t[n],e=0<(g(n)?n():n),-1});var a=e;if(w(a))return a;if(g(n.valueOf)&&r<5)return u(n.valueOf(),++r)}catch(i){}return!!On(n).length}o=nn(n)}return o}(n,0)}var cr=u.floor,lr=u.ceil,pr=u.trunc||function(n){n=+n;return(0<n?cr:lr)(n)};function yr(n,r){var t=+n;return t==Infinity&&r&&F("invalid value ["+_(n)+"]"),t!=t||0==t?0:pr(t)}var u=e.create||function(n){if(!n)return{};var r=typeof n;if(r===U||r==W)return t[i]=n,new t;function t(){}throw new TypeError("Prototype must be an Object or function: "+_(n))},br=e.defineProperty;function hr(n,r,t){if(br)return br(n,r,t),n;or("Unable to define property ["+p(r)+"] on "+_(n))}function dr(n,r,t,e){e={enumerable:!0,configurable:!!y(e)||e};return g(t)?e.get=t:e.value=t,hr(n,r,e)}function gr(n,r,t,e,o){if(br)try{var a={enumerable:!0,configurable:!!y(o)||o};return t&&(a.get=t),e&&(a.set=e),hr(n,r,a)}catch(i){or("Unable to define accessors for ["+p(r)+"] on "+_(n))}}var mr="endsWith",mr=a[mr]?k(mr):function(n,r,t){d(n)||N("'"+_(n)+"' is not a string");var r=d(r)?r:""+r,e=r.length,o=n.length,t=!y(t)&&t<o?t:o;return n.substring(t-e,t)===r},n=k(n),vr=k("lastIndexOf");function Sr(n){return d(n)?n.replace(/[\s\t\r\n\f]+/g,o)===o:b(n)}function wr(n){return d(n)?n===o:b(n)}var jr=a.repeat?k("repeat"):function(n,r){b(n)&&N("can't convert ["+_(n)+"]"),(r=yr(r,!0))<0&&F("invalid count must be >= 0 && < Infinity");for(var t=d(n)?n:""+n,e=o;0<r;(r>>>=1)&&(t+=t))1&r&&(e+=t);return e},Er="padStart";function Or(n,r,t){var e=o,n=(r=yr(r,!0),n.length);return n<(r>>=0)&&(e=(r-=n)>(e=b(t)?" ":""+t).length?jr(e,lr(r/e.length)):e).length>r?e.substring(0,r):e}var Er=a[Er]?k(Er):function(n,r,t){return Or(n,r,t)+n},Tr=a.padEnd?k("padEnd"):function(n,r,t){return n+Or(n,r,t)},Ir=k("slice"),Nr="startsWith",Nr=a[Nr]?k(Nr):function(n,r,t){d(n)||N("'"+_(n)+"' is not a string");var r=d(r)?r:""+r,e=r.length,t=0<t?t:0;return n.substring(t,t+e)===r};function Fr(r){return function(n){return b(n)&&N("strTrim called ["+_(n)+"]"),n&&n.replace?n.replace(r,""):n}}var xr=Fr(/^\s+|(?=\s)\s+$/g),Pr=Fr(/^\s+/g),Ar=Fr(/(?=\s)\s+$/g),K="trimStart",Dr="trimEnd",_r=a.trim?k("trim"):xr,K=a[K]?k(K):Pr,kr=K,a=a[Dr]?k(Dr):Ar,Dr=a;function Kr(n){return!b(n)&&"[object Array]"===p(n)}function Wr(n){if(!m(n)||null===n)throw new TypeError("polyObjKeys called on non-object");var r,t=[];for(r in n)O(n,r)&&t.push(r);return t}export{Xn as arrAppend,I as arrForEach,Zn as arrIndexOf,nr as arrMap,rr as arrReduce,er as createCustomError,Fn as createEnum,xn as createEnumKeyMap,Pn as createEnumValueMap,An as createSimpleMap,Dn as createTypeMap,ir as deepExtend,_ as dumpObj,ln as getDocument,j as getGlobal,gn as getHistory,E as getInst,sr as getIntValue,Hn as getKnownSymbol,hn as getNavigator,Ln as getSymbol,yn as getWindow,cn as hasDocument,dn as hasHistory,bn as hasNavigator,Gn as hasSymbol,fr as hasValue,pn as hasWindow,v as isArray,q as isArrayBuffer,$ as isBlob,w as isBoolean,H as isDate,h as isDefined,Q as isError,J as isFile,V as isFormData,g as isFunction,Qn as isIterable,qn as isIterator,mn as isNode,Z as isNotTruthy,b as isNullOrUndefined,S as isNumber,m as isObject,Y as isPromise,X as isPromiseLike,s as isRegExp,L as isStrictNullOrUndefined,G as isStrictUndefined,d as isString,zn as isSymbol,nn as isTruthy,z as isTypeof,y as isUndefined,vn as isWebWorker,lr as mathCeil,cr as mathFloor,yr as mathToInt,pr as mathTrunc,Jn as newSymbol,wn as objAssign,Tn as objCopyProps,u as objCreate,x as objDeepCopy,P as objDeepFreeze,gr as objDefineAccessors,dr as objDefineGet,hr as objDefineProp,ur as objExtend,T as objForEachKey,In as objFreeze,O as objHasOwnProperty,On as objKeys,Nn as objSeal,tr as objSetPrototypeOf,p as objToString,Mn as polyGetKnownSymbol,Kr as polyIsArray,A as polyNewSymbol,Wr as polyObjKeys,xr as polyStrTrim,Ar as polyStrTrimEnd,Pr as polyStrTrimStart,Rn as polySymbolFor,Cn as polySymbolKeyFor,mr as strEndsWith,n as strIndexOf,wr as strIsNullOrEmpty,Sr as strIsNullOrWhiteSpace,vr as strLastIndexOf,Tr as strPadEnd,Er as strPadStart,jr as strRepeat,Ir as strSlice,Nr as strStartsWith,_r as strTrim,a as strTrimEnd,kr as strTrimLeft,Dr as strTrimRight,K as strTrimStart,Vn as symbolFor,$n as symbolKeyFor,Sn as throwError,F as throwRangeError,N as throwTypeError,or as throwUnsupported};
var W=undefined,o="",R="function",M="object",u="prototype",n="undefined",U="hasOwnProperty",t="Symbol",C="_polyfill",L="indexOf",s="length",i="done",c="value",e=Object,B=e[u],r=String[u],a=Math,z=Array,G=z[u];function f(r,n){try{n=r()}catch(t){}return n}function l(n){return function(r){return typeof r===n}}function p(n){return function(r){return!(!r||y(r)!==n)}}function y(r){return B.toString.call(r)}function H(r,n){return typeof r===n}function b(r){return typeof r===n||r===n}function J(r){return!m(r)}function v(r){return null===r||b(r)}function V(r){return null===r||!m(r)}function m(r){return!!r||r!==W}var d=l("string"),h=l(R);function g(r){return!v(r)&&!!r&&typeof r===M}var S=z.isArray,$=p("[object Date]"),q=l("number"),Q=l("boolean"),z=p("[object RegExp]"),X=p("[object File]"),Y=p("[object FormData]"),Z=p("[object Blob]"),rr=p("[object ArrayBuffer]"),nr=p("[object Error]");function tr(r){return!!r&&h(r.then)}function er(r){return tr(r)&&h(r["catch"])}function or(r){return!r||!f(function(){return r&&0+r},r)}function ar(r){return!(!r||f(function(){return!(r&&0+r)},!r))}var ur=null,ir=f(function(){return m(window)},!1),sr=f(function(){return m(document)},!1),cr=f(function(){return m(navigator)},!1),fr=f(function(){return m(history)},!1),lr=f(function(){return!!(self&&self instanceof WorkerGlobalScope)},!1),pr=f(function(){return!(!process||!(process.versions||{}).node)},!1);function yr(r){r=!1===r?null:ur;return r||((r=(r=(r=typeof globalThis!==n?globalThis:r)||typeof self===n?r:self)||typeof window===n?r:window)||typeof global===n||(r=global),ur=r),r}function w(r,n){n=yr(n);return n&&n[r]?n[r]:"window"===r&&ir?window:null}function br(){return!!vr()}function vr(){return sr?document:w("document")}function mr(){return!!dr()}function dr(){return ir?window:w("window")}function hr(){return!!gr()}function gr(){return cr?navigator:w("navigator")}function Sr(){return!!wr()}function wr(){return fr?history:w("history")}function jr(){return pr}function Er(){return lr}function j(r,n){return r&&B[U].call(r,n)}function E(r,n,t){if(r&&g(r))for(var e in r)if(j(r,e)&&-1===n.call(t||r,e,r[e]))break}function O(r,n,t){if(r)for(var e=r[s],o=0;o<e&&!(o in r&&-1===n.call(t||r,r[o],o,r));o++);}function Or(r){throw Error(r)}function T(r){throw new TypeError(r)}function Tr(r){throw new RangeError(r)}var Ir=e.assign,xr=e.freeze;function Nr(r){return r}function Fr(r){return g(r)&&null!==r||T("objKeys called on non-object"),e.keys(r)}function I(r){var n;return S(r)?(n=[],O(r,function(r){n.push(I(r))}),n):g(r)?Ar({},r):r}function Ar(t,r){return v(r)||E(r,function(r,n){t[r]=I(n)}),t}function x(r){return xr&&E(r,function(r,n){(S(n)||g(n))&&xr(n)}),Pr(r)}var Pr=xr||Nr,kr=e.seal||Nr;function Dr(r){var t={};return E(r,function(r,n){t[r]=n,t[n]=r}),x(t)}function _r(r){var t={};return E(r,function(r,n){t[r]=r,t[n]=r}),x(t)}function Kr(r){var t={};return E(r,function(r,n){t[r]=n,t[n]=n}),x(t)}function Wr(r){var t={};return E(r,function(r,n){t[r]=n[1],t[n[0]]=n[1]}),x(t)}function Rr(r){return Wr(r)}var Mr,Ur=_r({asyncIterator:0,hasInstance:1,isConcatSpreadable:2,iterator:3,match:4,matchAll:5,replace:6,search:7,species:8,split:9,toPrimitive:10,toStringTag:11,unscopables:12}),Cr="__polySymbols$ts_utils";function Lr(){var r;return Mr||(r=yr(),Mr=r[Cr]=r[Cr]||{k:{},s:{}}),Mr}var Br={};function N(r){var n={description:""+r,toString:function(){return t+"("+r+")"}};return n[C]=!0,n}function zr(r){var n,t=Lr();return j(t,r)||(n=N(r),t.k[r]=n,t.s[n]=""+r),t.k[r]}function Gr(r){return!v(r)&&"null"!=r||T(r+" is not a symbol"),Lr().s[r]}function Hr(r){r=Ur[r];return r?Br[r]=Br[r]||N(t+"."+r):void 0}var Jr=f(function(){return m(Symbol)},!1),F=w(t),Vr=l("symbol");function $r(r){return!!qr(r)}function qr(r){return F=!1===r?w(t,r):F,Jr&&F}function A(r,n){var t=Ur[r];return F?F[t||r]:n?null:Hr(r)}function Qr(r,n){return Jr?Symbol(r):n?null:N(r)}var Xr=F&&f(function(){return F["for"]},null)||zr,Yr=F&&f(function(){return F.keyFor},null)||Gr;function P(r){return!!r&&h(r.next)}function Zr(r){return!V(r)&&h(r[A(3)])}function rn(r,n){if(!b(n)&&r)if(S(n))G.push.apply(r,n);else if(P(n))for(var t=n.next();!t[i];)r.push(t[c]),t=n.next();else r.push(n);return r}function k(r,n){var t=y(r);return t+": "+("[object Error]"===t?"{ stack: '"+r.stack+"', message: '"+r.message+"', name: '"+r.name+"'":n?q(n)?JSON.stringify(r,null,n):JSON.stringify(r,null,n?4:0):JSON.stringify(r))}function D(e){return function(r){for(var n=[],t=1;t<arguments.length;t++)n[t-1]=arguments[t];if((r||r===o)&&r[e])return r[e].apply(r,n);T("'"+e+"' not defined for "+k(r))}}var nn,tn=D(L),en=D("map"),on=D("reduce");function an(r,n){return(e.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(t,r){E(r,function(r,n){t[r]=n})})(r,n)}function un(r,n){var t,e,o=Error;function a(){this.constructor=t}return r=r,an(t=function(){var r=this,r=o.apply(r,arguments)||r;return n&&n(r,arguments),r},e=o),(a[u]=e[u]).name=r,t[u]=new a,t}function sn(r){throw new(nn=nn||un("UnsupportedError"))(r)}function cn(n,r){return O(r,function(r){Ar(n,r)}),n}function fn(r){for(var n=[],t=1;t<arguments.length;t++)n[t-1]=arguments[t];return cn(I(r)||{},n)}function ln(r){for(var n=[],t=1;t<arguments.length;t++)n[t-1]=arguments[t];return cn(r||{},n)}var pn=s,yn=function(r){return r[pn]};function bn(r,n){if(v(r))return n;if(q(r))return r;r=parseInt(r,10);return isNaN(r)?n:r}function vn(r){return function i(r,n){var t,e,o=!1===r||0===r;if(!o&&!v(r))if(S(r))o=0<r[s];else if($(r))o=!isNaN(r.getTime());else{if(Q(r))return!0;if(g(r)){try{t=r,O([s,"byteLength","size","count"],function(r){if(r in t)return r=t[r],e=0<(h(r)?r():r),-1});var a=e;if(Q(a))return a;if(h(r.valueOf)&&n<5)return i(r.valueOf(),++n)}catch(u){}return!!Fr(r)[s]}o=ar(r)}return o}(r,0)}var mn=e.defineProperty;function dn(r,n,t){if(mn)return mn(r,n,t),r;sn("Unable to define property ["+y(n)+"] on "+k(r))}function hn(r,n,t,e){e={enumerable:!0,configurable:!!b(e)||e};return h(t)?e.get=t:e[c]=t,dn(r,n,e)}function gn(r,n,t,e,o){if(mn)try{var a={enumerable:!0,configurable:!!b(o)||o};return t&&(a.get=t),e&&(a.set=e),dn(r,n,a)}catch(u){sn("Unable to define accessors for ["+y(n)+"] on "+k(r))}}function Sn(r){return wn({},r)}function wn(r,n){return r[A(3)]=function(){return _(n)},r}function _(e){var o=!1;function a(){return e.v}var r={next:function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];o=o||!e.n||e.n(r),(t={})[i]=o;var t;return o||hn(t,c,a),t}};return e.r&&(r["return"]=function(r){var n={};return n[i]=!0,n[c]=e.r&&e.r(r),n}),e.t&&(r["throw"]=function(r){var n={};return n[i]=!0,n[c]=e.t&&e.t(r),n}),r}function jn(r){var n=-1,t=r?r.slice():[],e=t[s],r={n:function(){return e<=++n}};return gn(r,"v",function(){if(0<=n&&n<e)return t[n]}),_(r)}function En(r,n,t){var e;if(r&&(P(r)||(r=r[e=A(3)]?r[e]():null),P(r)))try{for(var o=0,a=r.next();!a[i]&&-1!==n.call(t||r,a[c],o,r);)o++,a=r.next();r["return"]&&r["return"](a)}catch(u){r["throw"]&&r["throw"](u)}}function On(r,n,t){var e=r,o=W,a=(v(n)&&(n=r),t||(r<=n?1:-1)),t={n:function(){var r;return(r=0<a?n<e:e<n)||(o=e,e+=a),r}};return gn(t,"v",function(){return o}),_(t)}var Tn=a.floor,In=a.ceil,xn=a.min,Nn=a.max,Fn=a.trunc||function(r){r=+r;return(0<r?Tn:In)(r)};function An(r,n){var t=+r;return t==Infinity&&n&&Tr("invalid value ["+k(r)+"]"),t!=t||0==t?0:Fn(t)}var a=e.create||function(r){if(!r)return{};var n=typeof r;if(n===M||n==R)return t[u]=r,new t;function t(){}throw new TypeError("Prototype must be an Object or function: "+k(r))},Pn=D("slice"),K=D("substring"),kn=r.substr?D("substr"):Dn;function Dn(r,n,t){return v(r)&&T("'polyStrSubstr called with invalid "+k(r)),t<0?o:((n=n||0)<0&&(n=Nn(n+r[s],0)),b(t)?Pn(r,n):Pn(r,n,n+t))}function _n(r,n){return K(r,0,n)}function Kn(r,n){var t=r[s];return n<=0?o:n<t?K(r,t-n):r}var Wn="endsWith",Wn=r[Wn]?D(Wn):function(r,n,t){d(r)||T("'"+k(r)+"' is not a string");var n=d(n)?n:""+n,e=n[s],o=r[s],t=!b(t)&&t<o?t:o;return K(r,t-e,t)===n},L=D(L),Rn=D("lastIndexOf");function Mn(r){return d(r)?r.replace(/[\s\t\r\n\f]+/g,o)===o:v(r)}function Un(r){return d(r)?r===o:v(r)}var Cn=r.repeat?D("repeat"):function(r,n){v(r)&&T("can't convert ["+k(r)+"]"),(n=An(n,!0))<0&&Tr("invalid count must be >= 0 && < Infinity");for(var t=d(r)?r:""+r,e=o;0<n;(n>>>=1)&&(t+=t))1&n&&(e+=t);return e},Ln="padStart";function Bn(r,n,t){var e=o,r=(n=An(n,!0),r[s]);return r<(n>>=0)&&(e=(n-=r)>(e=v(t)?" ":""+t)[s]?Cn(e,In(n/e[s])):e)[s]>n?K(e,0,n):e}var Ln=r[Ln]?D(Ln):function(r,n,t){return Bn(r,n,t)+r},zn=r.padEnd?D("padEnd"):function(r,n,t){return r+Bn(r,n,t)},Gn="startsWith",Gn=r[Gn]?D(Gn):function(r,n,t){d(r)||T("'"+k(r)+"' is not a string");var n=d(n)?n:""+n,e=n[s],t=0<t?t:0;return K(r,t,t+e)===n};function Hn(n){return function(r){return v(r)&&T("strTrim called ["+k(r)+"]"),r&&r.replace?r.replace(n,""):r}}var Jn=Hn(/^\s+|(?=\s)\s+$/g),Vn=Hn(/^\s+/g),$n=Hn(/(?=\s)\s+$/g),qn="trimStart",Qn="trimEnd",Xn=r.trim?D("trim"):Jn,qn=r[qn]?D(qn):Vn,Yn=qn,r=r[Qn]?D(Qn):$n,Qn=r;function Zn(r){return!v(r)&&"[object Array]"===y(r)}function rt(r){if(!g(r)||null===r)throw new TypeError("polyObjKeys called on non-object");var n,t=[];for(n in r)j(r,n)&&t.push(n);return t}export{rn as arrAppend,O as arrForEach,tn as arrIndexOf,en as arrMap,on as arrReduce,jn as createArrayIterator,un as createCustomError,Dr as createEnum,_r as createEnumKeyMap,Kr as createEnumValueMap,Sn as createIterable,_ as createIterator,On as createRangeIterator,Wr as createSimpleMap,Rr as createTypeMap,fn as deepExtend,k as dumpObj,vr as getDocument,yr as getGlobal,wr as getHistory,w as getInst,bn as getIntValue,A as getKnownSymbol,yn as getLength,gr as getNavigator,qr as getSymbol,dr as getWindow,br as hasDocument,Sr as hasHistory,hr as hasNavigator,$r as hasSymbol,vn as hasValue,mr as hasWindow,S as isArray,rr as isArrayBuffer,Z as isBlob,Q as isBoolean,$ as isDate,m as isDefined,nr as isError,X as isFile,Y as isFormData,h as isFunction,Zr as isIterable,P as isIterator,jr as isNode,or as isNotTruthy,v as isNullOrUndefined,q as isNumber,g as isObject,er as isPromise,tr as isPromiseLike,z as isRegExp,V as isStrictNullOrUndefined,J as isStrictUndefined,d as isString,Vr as isSymbol,ar as isTruthy,H as isTypeof,b as isUndefined,Er as isWebWorker,En as iterForOf,wn as makeIterable,In as mathCeil,Tn as mathFloor,Nn as mathMax,xn as mathMin,An as mathToInt,Fn as mathTrunc,Qr as newSymbol,Ir as objAssign,Ar as objCopyProps,a as objCreate,I as objDeepCopy,x as objDeepFreeze,gn as objDefineAccessors,hn as objDefineGet,dn as objDefineProp,ln as objExtend,E as objForEachKey,Pr as objFreeze,j as objHasOwnProperty,Fr as objKeys,kr as objSeal,an as objSetPrototypeOf,y as objToString,Hr as polyGetKnownSymbol,Zn as polyIsArray,N as polyNewSymbol,rt as polyObjKeys,Dn as polyStrSubstr,Jn as polyStrTrim,$n as polyStrTrimEnd,Vn as polyStrTrimStart,zr as polySymbolFor,Gr as polySymbolKeyFor,Wn as strEndsWith,L as strIndexOf,Un as strIsNullOrEmpty,Mn as strIsNullOrWhiteSpace,Rn as strLastIndexOf,_n as strLeft,zn as strPadEnd,Ln as strPadStart,Cn as strRepeat,Kn as strRight,Pn as strSlice,Gn as strStartsWith,kn as strSubstr,K as strSubstring,Xn as strTrim,r as strTrimEnd,Yn as strTrimLeft,Qn as strTrimRight,qn as strTrimStart,Xr as symbolFor,Yr as symbolKeyFor,Or as throwError,Tr as throwRangeError,T as throwTypeError,sn as throwUnsupported};
//# sourceMappingURL=ts-utils.min.js.map
/*!
* NevWare21 - ts-utils, 0.4.1
* NevWare21 - ts-utils, 0.4.2
* https://github.com/nevware21/ts-utils

@@ -11,2 +11,3 @@ * Copyright (c) NevWare21 and contributors. All rights reserved.

var UNDEF_VALUE = undefined;
var EMPTY = "";

@@ -25,5 +26,9 @@ var BOOLEAN = "boolean";

var LAST_INDEX_OF = "lastIndexOf";
var LENGTH = "length";
var DONE = "done";
var VALUE = "value";
var ObjClass = Object;
var ObjProto = ObjClass[PROTOTYPE];
var StrProto = String[PROTOTYPE];
var StrCls = String;
var StrProto = StrCls[PROTOTYPE];
var MathCls = Math;

@@ -72,3 +77,3 @@ var ArrCls = Array;

function isDefined(arg) {
return !!arg || arg !== undefined;
return !!arg || arg !== UNDEF_VALUE;
}

@@ -195,3 +200,3 @@ var isString = _createIs(STRING);

if (arr) {
var len = arr.length;
var len = arr[LENGTH];
for (var idx = 0; idx < len; idx++) {

@@ -383,3 +388,3 @@ if (idx in arr) {

function isIterable(value) {
return !isStrictNullOrUndefined(value) && (hasSymbol() ? isFunction(value[getKnownSymbol(3)]) : isIterator(value));
return !isStrictNullOrUndefined(value) && isFunction(value[getKnownSymbol(3)]);
}

@@ -394,4 +399,4 @@

var value = elms.next();
while (!value.done) {
target.push(value.value);
while (!value[DONE]) {
target.push(value[VALUE]);
value = elms.next();

@@ -441,2 +446,7 @@ }

}
function _unwrapProp(propName) {
return function (thisArg) {
return thisArg[propName];
};
}

@@ -511,2 +521,4 @@ var arrIndexOf = _unwrapFunction(INDEX_OF);

var getLength = _unwrapProp(LENGTH);
function getIntValue(value, defValue) {

@@ -538,3 +550,3 @@ if (!isNullOrUndefined(value)) {

if (isArray(value)) {
result = value.length > 0;
result = value[LENGTH] > 0;
}

@@ -549,3 +561,3 @@ else if (isDate(value)) {

try {
var chkValue = _checkLength(value, ["length", "byteLength", "size", "count"]);
var chkValue = _checkLength(value, [LENGTH, "byteLength", "size", "count"]);
if (isBoolean(chkValue)) {

@@ -560,3 +572,3 @@ return chkValue;

}
return !!objKeys(value).length;
return !!objKeys(value)[LENGTH];
}

@@ -573,35 +585,2 @@ else {

var mathFloor = MathCls.floor;
var mathCeil = MathCls.ceil;
var _mathTrunc = MathCls.trunc;
var mathTrunc = _mathTrunc ? _mathTrunc : polyMathTrunc;
function polyMathTrunc(value) {
var theValue = +value;
return (theValue > 0 ? mathFloor : mathCeil)(theValue);
}
function mathToInt(value, throwInfinity) {
var result = +value;
if (result == Infinity && throwInfinity) {
throwRangeError("invalid value [" + dumpObj(value) + "]");
}
return result !== result || result === 0 ? 0 : mathTrunc(result);
}
var _objCreate = ObjClass["create"];
var objCreate = _objCreate ? _objCreate : polyObjCreate;
function polyObjCreate(obj) {
if (!obj) {
return {};
}
var type = typeof obj;
if (type !== OBJECT && type !== FUNCTION) {
throw new TypeError("Prototype must be an Object or function: " + dumpObj(obj));
}
function tempFunc() { }
tempFunc[PROTOTYPE] = obj;
return new tempFunc();
}
var _objDefineProperty = ObjClass["defineProperty"];

@@ -624,3 +603,3 @@ function objDefineProp(target, key, descriptor) {

else {
desc.value = value;
desc[VALUE] = value;
}

@@ -650,2 +629,204 @@ return objDefineProp(target, key, desc);

function createIterable(ctx) {
return makeIterable({}, ctx);
}
function makeIterable(target, ctx) {
var itSymbol = getKnownSymbol(3);
function _createIterator() {
return createIterator(ctx);
}
target[itSymbol] = _createIterator;
return target;
}
function createIterator(ctx) {
var isDone = false;
function _value() {
return ctx.v;
}
function _next() {
var _a;
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
isDone = isDone || (ctx.n ? ctx.n(args) : true);
var result = (_a = {},
_a[DONE] = isDone,
_a);
if (!isDone) {
objDefineGet(result, VALUE, _value);
}
return result;
}
function _return(value) {
var _a;
return _a = {},
_a[DONE] = true,
_a[VALUE] = ctx.r && ctx.r(value),
_a;
}
function _throw(e) {
var _a;
return _a = {},
_a[DONE] = true,
_a[VALUE] = ctx.t && ctx.t(e),
_a;
}
var theIterator = {
next: _next
};
if (ctx.r) {
theIterator.return = _return;
}
if (ctx.t) {
theIterator.throw = _throw;
}
return theIterator;
}
function createArrayIterator(values) {
var idx = -1;
var theValues = values ? values.slice() : [];
var len = theValues[LENGTH];
function _value() {
if (idx >= 0 && idx < len) {
return theValues[idx];
}
}
function _getNext() {
idx++;
return idx >= len;
}
var ctx = {
n: _getNext
};
objDefineAccessors(ctx, "v", _value);
return createIterator(ctx);
}
function iterForOf(iter, callbackfn, thisArg) {
if (iter) {
if (!isIterator(iter)) {
var itSymbol = getKnownSymbol(3);
iter = iter[itSymbol] ? iter[itSymbol]() : null;
}
if (isIterator(iter)) {
try {
var count = 0;
var value = iter.next();
while (!value[DONE]) {
if (callbackfn.call(thisArg || iter, value[VALUE], count, iter) === -1) {
break;
}
count++;
value = iter.next();
}
iter.return && iter.return(value);
}
catch (e) {
iter.throw && iter.throw(e);
}
}
}
}
function createRangeIterator(start, end, step) {
var nextValue = start;
var theValue = UNDEF_VALUE;
if (isNullOrUndefined(end)) {
end = start;
}
var theStep = step || ((start <= end) ? 1 : -1);
function _value() {
return theValue;
}
function _getNext() {
var isDone = false;
if (theStep > 0) {
isDone = nextValue > end;
}
else {
isDone = nextValue < end;
}
if (!isDone) {
theValue = nextValue;
nextValue += theStep;
}
return isDone;
}
var ctx = {
n: _getNext
};
objDefineAccessors(ctx, "v", _value);
return createIterator(ctx);
}
var mathFloor = MathCls.floor;
var mathCeil = MathCls.ceil;
var mathMin = MathCls.min;
var mathMax = MathCls.max;
var _mathTrunc = MathCls.trunc;
var mathTrunc = _mathTrunc ? _mathTrunc : polyMathTrunc;
function polyMathTrunc(value) {
var theValue = +value;
return (theValue > 0 ? mathFloor : mathCeil)(theValue);
}
function mathToInt(value, throwInfinity) {
var result = +value;
if (result == Infinity && throwInfinity) {
throwRangeError("invalid value [" + dumpObj(value) + "]");
}
return result !== result || result === 0 ? 0 : mathTrunc(result);
}
var _objCreate = ObjClass["create"];
var objCreate = _objCreate ? _objCreate : polyObjCreate;
function polyObjCreate(obj) {
if (!obj) {
return {};
}
var type = typeof obj;
if (type !== OBJECT && type !== FUNCTION) {
throw new TypeError("Prototype must be an Object or function: " + dumpObj(obj));
}
function tempFunc() { }
tempFunc[PROTOTYPE] = obj;
return new tempFunc();
}
var strSlice = _unwrapFunction("slice");
var SUB_STR = "substr";
var strSubstring = _unwrapFunction("substring");
var strSubstr = StrProto[SUB_STR] ? _unwrapFunction(SUB_STR) : polyStrSubstr;
function polyStrSubstr(value, start, length) {
if (isNullOrUndefined(value)) {
throwTypeError("'polyStrSubstr called with invalid " + dumpObj(value));
}
if (length < 0) {
return EMPTY;
}
start = start || 0;
if (start < 0) {
start = mathMax(start + value[LENGTH], 0);
}
if (isUndefined(length)) {
return strSlice(value, start);
}
return strSlice(value, start, start + length);
}
function strLeft(value, count) {
return strSubstring(value, 0, count);
}
function strRight(value, count) {
var len = value[LENGTH];
if (count <= 0) {
return EMPTY;
}
return len > count ? strSubstring(value, len - count) : value;
}
var ENDS_WITH = "endsWith";

@@ -658,6 +839,6 @@ var strEndsWith = StrProto[ENDS_WITH] ? _unwrapFunction(ENDS_WITH) : polyStrEndsWith;

var searchValue = isString(searchString) ? searchString : "" + searchString;
var chkLen = searchValue.length;
var len = value.length;
var chkLen = searchValue[LENGTH];
var len = value[LENGTH];
var end = !isUndefined(length) && length < len ? length : len;
return value.substring(end - chkLen, end) === searchValue;
return strSubstring(value, end - chkLen, end) === searchValue;
}

@@ -707,11 +888,11 @@

targetLength >>= 0;
var len = value.length;
var len = value[LENGTH];
if (len < targetLength) {
result = isNullOrUndefined(padString) ? " " : "" + padString;
targetLength = targetLength - len;
if (targetLength > result.length) {
result = strRepeat(result, mathCeil(targetLength / result.length));
if (targetLength > result[LENGTH]) {
result = strRepeat(result, mathCeil(targetLength / result[LENGTH]));
}
if (result.length > targetLength) {
result = result.substring(0, targetLength);
if (result[LENGTH] > targetLength) {
result = strSubstring(result, 0, targetLength);
}

@@ -730,4 +911,2 @@ }

var strSlice = _unwrapFunction("slice");
var STARTS_WITH = "startsWith";

@@ -740,5 +919,5 @@ var strStartsWith = StrProto[STARTS_WITH] ? _unwrapFunction(STARTS_WITH) : polyStrStartsWith;

var searchValue = isString(searchString) ? searchString : "" + searchString;
var chkLen = searchValue.length;
var chkLen = searchValue[LENGTH];
var pos = position > 0 ? position : 0;
return value.substring(pos, pos + chkLen) === searchValue;
return strSubstring(value, pos, pos + chkLen) === searchValue;
}

@@ -795,2 +974,3 @@

exports.arrReduce = arrReduce;
exports.createArrayIterator = createArrayIterator;
exports.createCustomError = createCustomError;

@@ -800,2 +980,5 @@ exports.createEnum = createEnum;

exports.createEnumValueMap = createEnumValueMap;
exports.createIterable = createIterable;
exports.createIterator = createIterator;
exports.createRangeIterator = createRangeIterator;
exports.createSimpleMap = createSimpleMap;

@@ -811,2 +994,3 @@ exports.createTypeMap = createTypeMap;

exports.getKnownSymbol = getKnownSymbol;
exports.getLength = getLength;
exports.getNavigator = getNavigator;

@@ -849,4 +1033,8 @@ exports.getSymbol = getSymbol;

exports.isWebWorker = isWebWorker;
exports.iterForOf = iterForOf;
exports.makeIterable = makeIterable;
exports.mathCeil = mathCeil;
exports.mathFloor = mathFloor;
exports.mathMax = mathMax;
exports.mathMin = mathMin;
exports.mathToInt = mathToInt;

@@ -875,2 +1063,3 @@ exports.mathTrunc = mathTrunc;

exports.polyObjKeys = polyObjKeys;
exports.polyStrSubstr = polyStrSubstr;
exports.polyStrTrim = polyStrTrim;

@@ -886,7 +1075,11 @@ exports.polyStrTrimEnd = polyStrTrimEnd;

exports.strLastIndexOf = strLastIndexOf;
exports.strLeft = strLeft;
exports.strPadEnd = strPadEnd;
exports.strPadStart = strPadStart;
exports.strRepeat = strRepeat;
exports.strRight = strRight;
exports.strSlice = strSlice;
exports.strStartsWith = strStartsWith;
exports.strSubstr = strSubstr;
exports.strSubstring = strSubstring;
exports.strTrim = strTrim;

@@ -893,0 +1086,0 @@ exports.strTrimEnd = strTrimEnd;

/*!
* NevWare21 - ts-utils, 0.4.1
* NevWare21 - ts-utils, 0.4.2
* https://github.com/nevware21/ts-utils

@@ -7,3 +7,3 @@ * Copyright (c) NevWare21 and contributors. All rights reserved.

*/
this.nevware21=this.nevware21||{},this.nevware21["ts-utils"]=function(n){"use strict";var o="",W="function",U="object",u="prototype",r="undefined",M="hasOwnProperty",t="Symbol",R="_polyfill",e="indexOf",i=Object,C=i[u],a=String[u],c=Math,f=Array,B=f[u];function s(n,r){try{r=n()}catch(t){}return r}function l(r){return function(n){return typeof n===r}}function p(r){return function(n){return!(!n||y(n)!==r)}}function y(n){return C.toString.call(n)}function b(n){return typeof n===r||n===r}function h(n){return null===n||b(n)}function z(n){return null===n||!d(n)}function d(n){return!!n||n!==undefined}var g=l("string"),m=l(W);function v(n){return!h(n)&&!!n&&typeof n===U}var w=f.isArray,G=p("[object Date]"),S=l("number"),j=l("boolean"),f=p("[object RegExp]"),L=p("[object File]"),H=p("[object FormData]"),J=p("[object Blob]"),V=p("[object ArrayBuffer]"),$=p("[object Error]");function q(n){return!!n&&m(n.then)}function Q(n){return!(!n||s(function(){return!(n&&0+n)},!n))}var X="window",Y=null,Z=s(function(){return d(window)},!1),nn=s(function(){return d(document)},!1),rn=s(function(){return d(navigator)},!1),tn=s(function(){return d(history)},!1),en=s(function(){return!!(self&&self instanceof WorkerGlobalScope)},!1),on=s(function(){return!(!process||!(process.versions||{}).node)},!1);function E(n){n=!1===n?null:Y;return n||((n=(n=(n=typeof globalThis!==r?globalThis:n)||typeof self===r?n:self)||typeof window===r?n:window)||typeof global===r||(n=global),Y=n),n}function O(n,r){r=E(r);return r&&r[n]?r[n]:n===X&&Z?window:null}function un(){return nn?document:O("document")}function an(){return Z?window:O(X)}function cn(){return rn?navigator:O("navigator")}function fn(){return tn?history:O("history")}function T(n,r){return n&&C[M].call(n,r)}function I(n,r,t){if(n&&v(n))for(var e in n)if(T(n,e)&&-1===r.call(t||n,e,n[e]))break}function N(n,r,t){if(n)for(var e=n.length,o=0;o<e&&!(o in n&&-1===r.call(t||n,n[o],o,n));o++);}function F(n){throw new TypeError(n)}function sn(n){throw new RangeError(n)}var ln=i.assign,pn=i.freeze;function yn(n){return n}function bn(n){return v(n)&&null!==n||F("objKeys called on non-object"),i.keys(n)}function P(n){var r;return w(n)?(r=[],N(n,function(n){r.push(P(n))}),r):v(n)?hn({},n):n}function hn(t,n){return h(n)||I(n,function(n,r){t[n]=P(r)}),t}function _(n){return pn&&I(n,function(n,r){(w(r)||v(r))&&pn(r)}),dn(n)}var dn=pn||yn,gn=i.seal||yn;function mn(n){var t={};return I(n,function(n,r){t[n]=n,t[r]=n}),_(t)}function vn(n){var t={};return I(n,function(n,r){t[n]=r[1],t[r[0]]=r[1]}),_(t)}var wn,Sn=mn({asyncIterator:0,hasInstance:1,isConcatSpreadable:2,iterator:3,match:4,matchAll:5,replace:6,search:7,species:8,split:9,toPrimitive:10,toStringTag:11,unscopables:12}),jn="__polySymbols$ts_utils";function En(){var n;return wn||(n=E(),wn=n[jn]=n[jn]||{k:{},s:{}}),wn}var On={};function x(n){var r={description:""+n,toString:function(){return t+"("+n+")"}};return r[R]=!0,r}function Tn(n){var r,t=En();return T(t,n)||(r=x(n),t.k[n]=r,t.s[r]=""+n),t.k[n]}function In(n){return!h(n)&&"null"!=n||F(n+" is not a symbol"),En().s[n]}function Nn(n){n=Sn[n];return n?On[n]=On[n]||x(t+"."+n):void 0}var Fn=s(function(){return d(Symbol)},!1),A=O(t),Pn=l("symbol");function _n(n){return!!xn(n)}function xn(n){return A=!1===n?O(t,n):A,Fn&&A}function An(n,r){var t=Sn[n];return A?A[t||n]:r?null:Nn(n)}var Dn=A&&s(function(){return A["for"]},null)||Tn,kn=A&&s(function(){return A.keyFor},null)||In;function Kn(n){return!!n&&m(n.next)}function D(n,r){var t=y(n);return t+": "+("[object Error]"===t?"{ stack: '"+n.stack+"', message: '"+n.message+"', name: '"+n.name+"'":r?S(r)?JSON.stringify(n,null,r):JSON.stringify(n,null,r?4:0):JSON.stringify(n))}function k(e){return function(n){for(var r=[],t=1;t<arguments.length;t++)r[t-1]=arguments[t];if((n||n===o)&&n[e])return n[e].apply(n,r);F("'"+e+"' not defined for "+D(n))}}var Wn,Un=k(e),Mn=k("map"),Rn=k("reduce");function Cn(n,r){return(i.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(t,n){I(n,function(n,r){t[n]=r})})(n,r)}function Bn(n,r){var t,e,o=Error;function i(){this.constructor=t}return n=n,Cn(t=function(){var n=this,n=o.apply(n,arguments)||n;return r&&r(n,arguments),n},e=o),(i[u]=e[u]).name=n,t[u]=new i,t}function zn(n){throw new(Wn=Wn||Bn("UnsupportedError"))(n)}function Gn(r,n){return N(n,function(n){hn(r,n)}),r}var Ln=c.floor,Hn=c.ceil,Jn=c.trunc||function(n){n=+n;return(0<n?Ln:Hn)(n)};function Vn(n,r){var t=+n;return t==Infinity&&r&&sn("invalid value ["+D(n)+"]"),t!=t||0==t?0:Jn(t)}var c=i.create||function(n){if(!n)return{};var r=typeof n;if(r===U||r==W)return t[u]=n,new t;function t(){}throw new TypeError("Prototype must be an Object or function: "+D(n))},$n=i.defineProperty;function qn(n,r,t){if($n)return $n(n,r,t),n;zn("Unable to define property ["+y(r)+"] on "+D(n))}var Qn="endsWith",Qn=a[Qn]?k(Qn):function(n,r,t){g(n)||F("'"+D(n)+"' is not a string");var r=g(r)?r:""+r,e=r.length,o=n.length,t=!b(t)&&t<o?t:o;return n.substring(t-e,t)===r},e=k(e),Xn=k("lastIndexOf"),Yn=a.repeat?k("repeat"):function(n,r){h(n)&&F("can't convert ["+D(n)+"]"),(r=Vn(r,!0))<0&&sn("invalid count must be >= 0 && < Infinity");for(var t=g(n)?n:""+n,e=o;0<r;(r>>>=1)&&(t+=t))1&r&&(e+=t);return e},Zn="padStart";function nr(n,r,t){var e=o,n=(r=Vn(r,!0),n.length);return n<(r>>=0)&&(e=(r-=n)>(e=h(t)?" ":""+t).length?Yn(e,Hn(r/e.length)):e).length>r?e.substring(0,r):e}var Zn=a[Zn]?k(Zn):function(n,r,t){return nr(n,r,t)+n},rr=a.padEnd?k("padEnd"):function(n,r,t){return n+nr(n,r,t)},tr=k("slice"),er="startsWith",er=a[er]?k(er):function(n,r,t){g(n)||F("'"+D(n)+"' is not a string");var r=g(r)?r:""+r,e=r.length,t=0<t?t:0;return n.substring(t,t+e)===r};function or(r){return function(n){return h(n)&&F("strTrim called ["+D(n)+"]"),n&&n.replace?n.replace(r,""):n}}var ir=or(/^\s+|(?=\s)\s+$/g),ur=or(/^\s+/g),ar=or(/(?=\s)\s+$/g),K="trimStart",cr="trimEnd",fr=a.trim?k("trim"):ir,K=a[K]?k(K):ur,sr=K,a=a[cr]?k(cr):ar,cr=a;return n.arrAppend=function(n,r){if(!b(r)&&n)if(w(r))B.push.apply(n,r);else if(Kn(r))for(var t=r.next();!t.done;)n.push(t.value),t=r.next();else n.push(r);return n},n.arrForEach=N,n.arrIndexOf=Un,n.arrMap=Mn,n.arrReduce=Rn,n.createCustomError=Bn,n.createEnum=function(n){var t={};return I(n,function(n,r){t[n]=r,t[r]=n}),_(t)},n.createEnumKeyMap=mn,n.createEnumValueMap=function(n){var t={};return I(n,function(n,r){t[n]=r,t[r]=r}),_(t)},n.createSimpleMap=vn,n.createTypeMap=vn,n.deepExtend=function(n){for(var r=[],t=1;t<arguments.length;t++)r[t-1]=arguments[t];return Gn(P(n)||{},r)},n.dumpObj=D,n.getDocument=un,n.getGlobal=E,n.getHistory=fn,n.getInst=O,n.getIntValue=function(n,r){if(h(n))return r;if(S(n))return n;n=parseInt(n,10);return isNaN(n)?r:n},n.getKnownSymbol=An,n.getNavigator=cn,n.getSymbol=xn,n.getWindow=an,n.hasDocument=function(){return!!un()},n.hasHistory=function(){return!!fn()},n.hasNavigator=function(){return!!cn()},n.hasSymbol=_n,n.hasValue=function(n){return function a(n,r){var t,e,o=!1===n||0===n;if(!o&&!h(n))if(w(n))o=0<n.length;else if(G(n))o=!isNaN(n.getTime());else{if(j(n))return!0;if(v(n)){try{t=n,N(["length","byteLength","size","count"],function(n){if(n in t)return n=t[n],e=0<(m(n)?n():n),-1});var i=e;if(j(i))return i;if(m(n.valueOf)&&r<5)return a(n.valueOf(),++r)}catch(u){}return!!bn(n).length}o=Q(n)}return o}(n,0)},n.hasWindow=function(){return!!an()},n.isArray=w,n.isArrayBuffer=V,n.isBlob=J,n.isBoolean=j,n.isDate=G,n.isDefined=d,n.isError=$,n.isFile=L,n.isFormData=H,n.isFunction=m,n.isIterable=function(n){return!z(n)&&(_n()?m(n[An(3)]):Kn(n))},n.isIterator=Kn,n.isNode=function(){return on},n.isNotTruthy=function(n){return!n||!s(function(){return n&&0+n},n)},n.isNullOrUndefined=h,n.isNumber=S,n.isObject=v,n.isPromise=function(n){return q(n)&&m(n["catch"])},n.isPromiseLike=q,n.isRegExp=f,n.isStrictNullOrUndefined=z,n.isStrictUndefined=function(n){return!d(n)},n.isString=g,n.isSymbol=Pn,n.isTruthy=Q,n.isTypeof=function(n,r){return typeof n===r},n.isUndefined=b,n.isWebWorker=function(){return en},n.mathCeil=Hn,n.mathFloor=Ln,n.mathToInt=Vn,n.mathTrunc=Jn,n.newSymbol=function(n,r){return Fn?Symbol(n):r?null:x(n)},n.objAssign=ln,n.objCopyProps=hn,n.objCreate=c,n.objDeepCopy=P,n.objDeepFreeze=_,n.objDefineAccessors=function(n,r,t,e,o){if($n)try{var i={enumerable:!0,configurable:!!b(o)||o};return t&&(i.get=t),e&&(i.set=e),qn(n,r,i)}catch(u){zn("Unable to define accessors for ["+y(r)+"] on "+D(n))}},n.objDefineGet=function(n,r,t,e){e={enumerable:!0,configurable:!!b(e)||e};return m(t)?e.get=t:e.value=t,qn(n,r,e)},n.objDefineProp=qn,n.objExtend=function(n){for(var r=[],t=1;t<arguments.length;t++)r[t-1]=arguments[t];return Gn(n||{},r)},n.objForEachKey=I,n.objFreeze=dn,n.objHasOwnProperty=T,n.objKeys=bn,n.objSeal=gn,n.objSetPrototypeOf=Cn,n.objToString=y,n.polyGetKnownSymbol=Nn,n.polyIsArray=function(n){return!h(n)&&"[object Array]"===y(n)},n.polyNewSymbol=x,n.polyObjKeys=function(n){if(!v(n)||null===n)throw new TypeError("polyObjKeys called on non-object");var r,t=[];for(r in n)T(n,r)&&t.push(r);return t},n.polyStrTrim=ir,n.polyStrTrimEnd=ar,n.polyStrTrimStart=ur,n.polySymbolFor=Tn,n.polySymbolKeyFor=In,n.strEndsWith=Qn,n.strIndexOf=e,n.strIsNullOrEmpty=function(n){return g(n)?n===o:h(n)},n.strIsNullOrWhiteSpace=function(n){return g(n)?n.replace(/[\s\t\r\n\f]+/g,o)===o:h(n)},n.strLastIndexOf=Xn,n.strPadEnd=rr,n.strPadStart=Zn,n.strRepeat=Yn,n.strSlice=tr,n.strStartsWith=er,n.strTrim=fr,n.strTrimEnd=a,n.strTrimLeft=sr,n.strTrimRight=cr,n.strTrimStart=K,n.symbolFor=Dn,n.symbolKeyFor=kn,n.throwError=function(n){throw Error(n)},n.throwRangeError=sn,n.throwTypeError=F,n.throwUnsupported=zn,Object.defineProperty(n,"__esModule",{value:!0}),n}({});
this.nevware21=this.nevware21||{},this.nevware21["ts-utils"]=function(r){"use strict";var W=undefined,o="",M="function",R="object",i="prototype",n="undefined",U="hasOwnProperty",t="Symbol",C="_polyfill",L="indexOf",c="length",B="done",a="value",e=Object,z=e[i],u=String[i],f=Math,G=Array,H=G[i];function s(r,n){try{n=r()}catch(t){}return n}function l(n){return function(r){return typeof r===n}}function y(n){return function(r){return!(!r||p(r)!==n)}}function p(r){return z.toString.call(r)}function b(r){return typeof r===n||r===n}function v(r){return null===r||b(r)}function J(r){return null===r||!d(r)}function d(r){return!!r||r!==W}var h=l("string"),m=l(M);function g(r){return!v(r)&&!!r&&typeof r===R}var w=G.isArray,V=y("[object Date]"),$=l("number"),q=l("boolean"),G=y("[object RegExp]"),Q=y("[object File]"),X=y("[object FormData]"),Y=y("[object Blob]"),Z=y("[object ArrayBuffer]"),rr=y("[object Error]");function nr(r){return!!r&&m(r.then)}function tr(r){return!(!r||s(function(){return!(r&&0+r)},!r))}var er=null,or=s(function(){return d(window)},!1),ur=s(function(){return d(document)},!1),ir=s(function(){return d(navigator)},!1),ar=s(function(){return d(history)},!1),cr=s(function(){return!!(self&&self instanceof WorkerGlobalScope)},!1),fr=s(function(){return!(!process||!(process.versions||{}).node)},!1);function sr(r){r=!1===r?null:er;return r||((r=(r=(r=typeof globalThis!==n?globalThis:r)||typeof self===n?r:self)||typeof window===n?r:window)||typeof global===n||(r=global),er=r),r}function S(r,n){n=sr(n);return n&&n[r]?n[r]:"window"===r&&or?window:null}function lr(){return ur?document:S("document")}function yr(){return or?window:S("window")}function pr(){return ir?navigator:S("navigator")}function br(){return ar?history:S("history")}function j(r,n){return r&&z[U].call(r,n)}function E(r,n,t){if(r&&g(r))for(var e in r)if(j(r,e)&&-1===n.call(t||r,e,r[e]))break}function O(r,n,t){if(r)for(var e=r[c],o=0;o<e&&!(o in r&&-1===n.call(t||r,r[o],o,r));o++);}function T(r){throw new TypeError(r)}function vr(r){throw new RangeError(r)}var dr=e.assign,hr=e.freeze;function mr(r){return r}function gr(r){return g(r)&&null!==r||T("objKeys called on non-object"),e.keys(r)}function I(r){var n;return w(r)?(n=[],O(r,function(r){n.push(I(r))}),n):g(r)?wr({},r):r}function wr(t,r){return v(r)||E(r,function(r,n){t[r]=I(n)}),t}function x(r){return hr&&E(r,function(r,n){(w(n)||g(n))&&hr(n)}),Sr(r)}var Sr=hr||mr,jr=e.seal||mr;function Er(r){var t={};return E(r,function(r,n){t[r]=r,t[n]=r}),x(t)}function Or(r){var t={};return E(r,function(r,n){t[r]=n[1],t[n[0]]=n[1]}),x(t)}var Tr,Ir=Er({asyncIterator:0,hasInstance:1,isConcatSpreadable:2,iterator:3,match:4,matchAll:5,replace:6,search:7,species:8,split:9,toPrimitive:10,toStringTag:11,unscopables:12}),xr="__polySymbols$ts_utils";function Nr(){var r;return Tr||(r=sr(),Tr=r[xr]=r[xr]||{k:{},s:{}}),Tr}var Fr={};function N(r){var n={description:""+r,toString:function(){return t+"("+r+")"}};return n[C]=!0,n}function Pr(r){var n,t=Nr();return j(t,r)||(n=N(r),t.k[r]=n,t.s[n]=""+r),t.k[r]}function _r(r){return!v(r)&&"null"!=r||T(r+" is not a symbol"),Nr().s[r]}function Ar(r){r=Ir[r];return r?Fr[r]=Fr[r]||N(t+"."+r):void 0}var kr=s(function(){return d(Symbol)},!1),F=S(t),Dr=l("symbol");function Kr(r){return F=!1===r?S(t,r):F,kr&&F}function P(r,n){var t=Ir[r];return F?F[t||r]:n?null:Ar(r)}var Wr=F&&s(function(){return F["for"]},null)||Pr,Mr=F&&s(function(){return F.keyFor},null)||_r;function _(r){return!!r&&m(r.next)}function A(r,n){var t=p(r);return t+": "+("[object Error]"===t?"{ stack: '"+r.stack+"', message: '"+r.message+"', name: '"+r.name+"'":n?$(n)?JSON.stringify(r,null,n):JSON.stringify(r,null,n?4:0):JSON.stringify(r))}function k(e){return function(r){for(var n=[],t=1;t<arguments.length;t++)n[t-1]=arguments[t];if((r||r===o)&&r[e])return r[e].apply(r,n);T("'"+e+"' not defined for "+A(r))}}var Rr,Ur=k(L),Cr=k("map"),Lr=k("reduce");function Br(r,n){return(e.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(t,r){E(r,function(r,n){t[r]=n})})(r,n)}function zr(r,n){var t,e,o=Error;function u(){this.constructor=t}return r=r,Br(t=function(){var r=this,r=o.apply(r,arguments)||r;return n&&n(r,arguments),r},e=o),(u[i]=e[i]).name=r,t[i]=new u,t}function Gr(r){throw new(Rr=Rr||zr("UnsupportedError"))(r)}function Hr(n,r){return O(r,function(r){wr(n,r)}),n}var Jr=e.defineProperty;function Vr(r,n,t){if(Jr)return Jr(r,n,t),r;Gr("Unable to define property ["+p(n)+"] on "+A(r))}function $r(r,n,t,e){e={enumerable:!0,configurable:!!b(e)||e};return m(t)?e.get=t:e[a]=t,Vr(r,n,e)}function qr(r,n,t,e,o){if(Jr)try{var u={enumerable:!0,configurable:!!b(o)||o};return t&&(u.get=t),e&&(u.set=e),Vr(r,n,u)}catch(i){Gr("Unable to define accessors for ["+p(n)+"] on "+A(r))}}function Qr(r,n){return r[P(3)]=function(){return D(n)},r}function D(e){var o=!1;function u(){return e.v}var r={next:function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];o=o||!e.n||e.n(r),(t={})[B]=o;var t;return o||$r(t,a,u),t}};return e.r&&(r["return"]=function(r){var n={done:!0};return n[a]=e.r&&e.r(r),n}),e.t&&(r["throw"]=function(r){var n={done:!0};return n[a]=e.t&&e.t(r),n}),r}var Xr=f.floor,Yr=f.ceil,Zr=f.min,rn=f.max,nn=f.trunc||function(r){r=+r;return(0<r?Xr:Yr)(r)};function tn(r,n){var t=+r;return t==Infinity&&n&&vr("invalid value ["+A(r)+"]"),t!=t||0==t?0:nn(t)}var f=e.create||function(r){if(!r)return{};var n=typeof r;if(n===R||n==M)return t[i]=r,new t;function t(){}throw new TypeError("Prototype must be an Object or function: "+A(r))},en=k("slice"),K=k("substring"),on=u.substr?k("substr"):un;function un(r,n,t){return v(r)&&T("'polyStrSubstr called with invalid "+A(r)),t<0?o:((n=n||0)<0&&(n=rn(n+r[c],0)),b(t)?en(r,n):en(r,n,n+t))}var an="endsWith",an=u[an]?k(an):function(r,n,t){h(r)||T("'"+A(r)+"' is not a string");var n=h(n)?n:""+n,e=n[c],o=r[c],t=!b(t)&&t<o?t:o;return K(r,t-e,t)===n},L=k(L),cn=k("lastIndexOf"),fn=u.repeat?k("repeat"):function(r,n){v(r)&&T("can't convert ["+A(r)+"]"),(n=tn(n,!0))<0&&vr("invalid count must be >= 0 && < Infinity");for(var t=h(r)?r:""+r,e=o;0<n;(n>>>=1)&&(t+=t))1&n&&(e+=t);return e},sn="padStart";function ln(r,n,t){var e=o,r=(n=tn(n,!0),r[c]);return r<(n>>=0)&&(e=(n-=r)>(e=v(t)?" ":""+t)[c]?fn(e,Yr(n/e[c])):e)[c]>n?K(e,0,n):e}var sn=u[sn]?k(sn):function(r,n,t){return ln(r,n,t)+r},yn=u.padEnd?k("padEnd"):function(r,n,t){return r+ln(r,n,t)},pn="startsWith",pn=u[pn]?k(pn):function(r,n,t){h(r)||T("'"+A(r)+"' is not a string");var n=h(n)?n:""+n,e=n[c],t=0<t?t:0;return K(r,t,t+e)===n};function bn(n){return function(r){return v(r)&&T("strTrim called ["+A(r)+"]"),r&&r.replace?r.replace(n,""):r}}var vn=bn(/^\s+|(?=\s)\s+$/g),dn=bn(/^\s+/g),hn=bn(/(?=\s)\s+$/g),mn="trimStart",gn="trimEnd",wn=u.trim?k("trim"):vn,mn=u[mn]?k(mn):dn,Sn=mn,u=u[gn]?k(gn):hn,gn=u;return r.arrAppend=function(r,n){if(!b(n)&&r)if(w(n))H.push.apply(r,n);else if(_(n))for(var t=n.next();!t[B];)r.push(t[a]),t=n.next();else r.push(n);return r},r.arrForEach=O,r.arrIndexOf=Ur,r.arrMap=Cr,r.arrReduce=Lr,r.createArrayIterator=function(r){var n=-1,t=r?r.slice():[],e=t[c],r={n:function(){return e<=++n}};return qr(r,"v",function(){if(0<=n&&n<e)return t[n]}),D(r)},r.createCustomError=zr,r.createEnum=function(r){var t={};return E(r,function(r,n){t[r]=n,t[n]=r}),x(t)},r.createEnumKeyMap=Er,r.createEnumValueMap=function(r){var t={};return E(r,function(r,n){t[r]=n,t[n]=n}),x(t)},r.createIterable=function(r){return Qr({},r)},r.createIterator=D,r.createRangeIterator=function(r,n,t){var e=r,o=W,u=(v(n)&&(n=r),t||(r<=n?1:-1)),t={n:function(){var r;return(r=0<u?n<e:e<n)||(o=e,e+=u),r}};return qr(t,"v",function(){return o}),D(t)},r.createSimpleMap=Or,r.createTypeMap=Or,r.deepExtend=function(r){for(var n=[],t=1;t<arguments.length;t++)n[t-1]=arguments[t];return Hr(I(r)||{},n)},r.dumpObj=A,r.getDocument=lr,r.getGlobal=sr,r.getHistory=br,r.getInst=S,r.getIntValue=function(r,n){if(v(r))return n;if($(r))return r;r=parseInt(r,10);return isNaN(r)?n:r},r.getKnownSymbol=P,r.getLength=function(r){return r.length},r.getNavigator=pr,r.getSymbol=Kr,r.getWindow=yr,r.hasDocument=function(){return!!lr()},r.hasHistory=function(){return!!br()},r.hasNavigator=function(){return!!pr()},r.hasSymbol=function(r){return!!Kr(r)},r.hasValue=function(r){return function a(r,n){var t,e,o=!1===r||0===r;if(!o&&!v(r))if(w(r))o=0<r[c];else if(V(r))o=!isNaN(r.getTime());else{if(q(r))return!0;if(g(r)){try{t=r,O([c,"byteLength","size","count"],function(r){if(r in t)return r=t[r],e=0<(m(r)?r():r),-1});var u=e;if(q(u))return u;if(m(r.valueOf)&&n<5)return a(r.valueOf(),++n)}catch(i){}return!!gr(r)[c]}o=tr(r)}return o}(r,0)},r.hasWindow=function(){return!!yr()},r.isArray=w,r.isArrayBuffer=Z,r.isBlob=Y,r.isBoolean=q,r.isDate=V,r.isDefined=d,r.isError=rr,r.isFile=Q,r.isFormData=X,r.isFunction=m,r.isIterable=function(r){return!J(r)&&m(r[P(3)])},r.isIterator=_,r.isNode=function(){return fr},r.isNotTruthy=function(r){return!r||!s(function(){return r&&0+r},r)},r.isNullOrUndefined=v,r.isNumber=$,r.isObject=g,r.isPromise=function(r){return nr(r)&&m(r["catch"])},r.isPromiseLike=nr,r.isRegExp=G,r.isStrictNullOrUndefined=J,r.isStrictUndefined=function(r){return!d(r)},r.isString=h,r.isSymbol=Dr,r.isTruthy=tr,r.isTypeof=function(r,n){return typeof r===n},r.isUndefined=b,r.isWebWorker=function(){return cr},r.iterForOf=function(r,n,t){var e;if(r&&(_(r)||(r=r[e=P(3)]?r[e]():null),_(r)))try{for(var o=0,u=r.next();!u[B]&&-1!==n.call(t||r,u[a],o,r);)o++,u=r.next();r["return"]&&r["return"](u)}catch(i){r["throw"]&&r["throw"](i)}},r.makeIterable=Qr,r.mathCeil=Yr,r.mathFloor=Xr,r.mathMax=rn,r.mathMin=Zr,r.mathToInt=tn,r.mathTrunc=nn,r.newSymbol=function(r,n){return kr?Symbol(r):n?null:N(r)},r.objAssign=dr,r.objCopyProps=wr,r.objCreate=f,r.objDeepCopy=I,r.objDeepFreeze=x,r.objDefineAccessors=qr,r.objDefineGet=$r,r.objDefineProp=Vr,r.objExtend=function(r){for(var n=[],t=1;t<arguments.length;t++)n[t-1]=arguments[t];return Hr(r||{},n)},r.objForEachKey=E,r.objFreeze=Sr,r.objHasOwnProperty=j,r.objKeys=gr,r.objSeal=jr,r.objSetPrototypeOf=Br,r.objToString=p,r.polyGetKnownSymbol=Ar,r.polyIsArray=function(r){return!v(r)&&"[object Array]"===p(r)},r.polyNewSymbol=N,r.polyObjKeys=function(r){if(!g(r)||null===r)throw new TypeError("polyObjKeys called on non-object");var n,t=[];for(n in r)j(r,n)&&t.push(n);return t},r.polyStrSubstr=un,r.polyStrTrim=vn,r.polyStrTrimEnd=hn,r.polyStrTrimStart=dn,r.polySymbolFor=Pr,r.polySymbolKeyFor=_r,r.strEndsWith=an,r.strIndexOf=L,r.strIsNullOrEmpty=function(r){return h(r)?r===o:v(r)},r.strIsNullOrWhiteSpace=function(r){return h(r)?r.replace(/[\s\t\r\n\f]+/g,o)===o:v(r)},r.strLastIndexOf=cn,r.strLeft=function(r,n){return K(r,0,n)},r.strPadEnd=yn,r.strPadStart=sn,r.strRepeat=fn,r.strRight=function(r,n){var t=r[c];return n<=0?o:n<t?K(r,t-n):r},r.strSlice=en,r.strStartsWith=pn,r.strSubstr=on,r.strSubstring=K,r.strTrim=wn,r.strTrimEnd=u,r.strTrimLeft=Sn,r.strTrimRight=gn,r.strTrimStart=mn,r.symbolFor=Wr,r.symbolKeyFor=Mr,r.throwError=function(r){throw Error(r)},r.throwRangeError=vr,r.throwTypeError=T,r.throwUnsupported=Gr,Object.defineProperty(r,"__esModule",{value:!0}),r}({});
//# sourceMappingURL=ts-utils.min.js.map
/*!
* NevWare21 - ts-utils, 0.4.1
* NevWare21 - ts-utils, 0.4.2
* https://github.com/nevware21/ts-utils

@@ -13,2 +13,3 @@ * Copyright (c) NevWare21 and contributors. All rights reserved.

var UNDEF_VALUE = undefined;
var EMPTY = "";

@@ -27,5 +28,9 @@ var BOOLEAN = "boolean";

var LAST_INDEX_OF = "lastIndexOf";
var LENGTH = "length";
var DONE = "done";
var VALUE = "value";
var ObjClass = Object;
var ObjProto = ObjClass[PROTOTYPE];
var StrProto = String[PROTOTYPE];
var StrCls = String;
var StrProto = StrCls[PROTOTYPE];
var MathCls = Math;

@@ -74,3 +79,3 @@ var ArrCls = Array;

function isDefined(arg) {
return !!arg || arg !== undefined;
return !!arg || arg !== UNDEF_VALUE;
}

@@ -197,3 +202,3 @@ var isString = _createIs(STRING);

if (arr) {
var len = arr.length;
var len = arr[LENGTH];
for (var idx = 0; idx < len; idx++) {

@@ -385,3 +390,3 @@ if (idx in arr) {

function isIterable(value) {
return !isStrictNullOrUndefined(value) && (hasSymbol() ? isFunction(value[getKnownSymbol(3)]) : isIterator(value));
return !isStrictNullOrUndefined(value) && isFunction(value[getKnownSymbol(3)]);
}

@@ -396,4 +401,4 @@

var value = elms.next();
while (!value.done) {
target.push(value.value);
while (!value[DONE]) {
target.push(value[VALUE]);
value = elms.next();

@@ -443,2 +448,7 @@ }

}
function _unwrapProp(propName) {
return function (thisArg) {
return thisArg[propName];
};
}

@@ -513,2 +523,4 @@ var arrIndexOf = _unwrapFunction(INDEX_OF);

var getLength = _unwrapProp(LENGTH);
function getIntValue(value, defValue) {

@@ -540,3 +552,3 @@ if (!isNullOrUndefined(value)) {

if (isArray(value)) {
result = value.length > 0;
result = value[LENGTH] > 0;
}

@@ -551,3 +563,3 @@ else if (isDate(value)) {

try {
var chkValue = _checkLength(value, ["length", "byteLength", "size", "count"]);
var chkValue = _checkLength(value, [LENGTH, "byteLength", "size", "count"]);
if (isBoolean(chkValue)) {

@@ -562,3 +574,3 @@ return chkValue;

}
return !!objKeys(value).length;
return !!objKeys(value)[LENGTH];
}

@@ -575,35 +587,2 @@ else {

var mathFloor = MathCls.floor;
var mathCeil = MathCls.ceil;
var _mathTrunc = MathCls.trunc;
var mathTrunc = _mathTrunc ? _mathTrunc : polyMathTrunc;
function polyMathTrunc(value) {
var theValue = +value;
return (theValue > 0 ? mathFloor : mathCeil)(theValue);
}
function mathToInt(value, throwInfinity) {
var result = +value;
if (result == Infinity && throwInfinity) {
throwRangeError("invalid value [" + dumpObj(value) + "]");
}
return result !== result || result === 0 ? 0 : mathTrunc(result);
}
var _objCreate = ObjClass["create"];
var objCreate = _objCreate ? _objCreate : polyObjCreate;
function polyObjCreate(obj) {
if (!obj) {
return {};
}
var type = typeof obj;
if (type !== OBJECT && type !== FUNCTION) {
throw new TypeError("Prototype must be an Object or function: " + dumpObj(obj));
}
function tempFunc() { }
tempFunc[PROTOTYPE] = obj;
return new tempFunc();
}
var _objDefineProperty = ObjClass["defineProperty"];

@@ -626,3 +605,3 @@ function objDefineProp(target, key, descriptor) {

else {
desc.value = value;
desc[VALUE] = value;
}

@@ -652,2 +631,204 @@ return objDefineProp(target, key, desc);

function createIterable(ctx) {
return makeIterable({}, ctx);
}
function makeIterable(target, ctx) {
var itSymbol = getKnownSymbol(3);
function _createIterator() {
return createIterator(ctx);
}
target[itSymbol] = _createIterator;
return target;
}
function createIterator(ctx) {
var isDone = false;
function _value() {
return ctx.v;
}
function _next() {
var _a;
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
isDone = isDone || (ctx.n ? ctx.n(args) : true);
var result = (_a = {},
_a[DONE] = isDone,
_a);
if (!isDone) {
objDefineGet(result, VALUE, _value);
}
return result;
}
function _return(value) {
var _a;
return _a = {},
_a[DONE] = true,
_a[VALUE] = ctx.r && ctx.r(value),
_a;
}
function _throw(e) {
var _a;
return _a = {},
_a[DONE] = true,
_a[VALUE] = ctx.t && ctx.t(e),
_a;
}
var theIterator = {
next: _next
};
if (ctx.r) {
theIterator.return = _return;
}
if (ctx.t) {
theIterator.throw = _throw;
}
return theIterator;
}
function createArrayIterator(values) {
var idx = -1;
var theValues = values ? values.slice() : [];
var len = theValues[LENGTH];
function _value() {
if (idx >= 0 && idx < len) {
return theValues[idx];
}
}
function _getNext() {
idx++;
return idx >= len;
}
var ctx = {
n: _getNext
};
objDefineAccessors(ctx, "v", _value);
return createIterator(ctx);
}
function iterForOf(iter, callbackfn, thisArg) {
if (iter) {
if (!isIterator(iter)) {
var itSymbol = getKnownSymbol(3);
iter = iter[itSymbol] ? iter[itSymbol]() : null;
}
if (isIterator(iter)) {
try {
var count = 0;
var value = iter.next();
while (!value[DONE]) {
if (callbackfn.call(thisArg || iter, value[VALUE], count, iter) === -1) {
break;
}
count++;
value = iter.next();
}
iter.return && iter.return(value);
}
catch (e) {
iter.throw && iter.throw(e);
}
}
}
}
function createRangeIterator(start, end, step) {
var nextValue = start;
var theValue = UNDEF_VALUE;
if (isNullOrUndefined(end)) {
end = start;
}
var theStep = step || ((start <= end) ? 1 : -1);
function _value() {
return theValue;
}
function _getNext() {
var isDone = false;
if (theStep > 0) {
isDone = nextValue > end;
}
else {
isDone = nextValue < end;
}
if (!isDone) {
theValue = nextValue;
nextValue += theStep;
}
return isDone;
}
var ctx = {
n: _getNext
};
objDefineAccessors(ctx, "v", _value);
return createIterator(ctx);
}
var mathFloor = MathCls.floor;
var mathCeil = MathCls.ceil;
var mathMin = MathCls.min;
var mathMax = MathCls.max;
var _mathTrunc = MathCls.trunc;
var mathTrunc = _mathTrunc ? _mathTrunc : polyMathTrunc;
function polyMathTrunc(value) {
var theValue = +value;
return (theValue > 0 ? mathFloor : mathCeil)(theValue);
}
function mathToInt(value, throwInfinity) {
var result = +value;
if (result == Infinity && throwInfinity) {
throwRangeError("invalid value [" + dumpObj(value) + "]");
}
return result !== result || result === 0 ? 0 : mathTrunc(result);
}
var _objCreate = ObjClass["create"];
var objCreate = _objCreate ? _objCreate : polyObjCreate;
function polyObjCreate(obj) {
if (!obj) {
return {};
}
var type = typeof obj;
if (type !== OBJECT && type !== FUNCTION) {
throw new TypeError("Prototype must be an Object or function: " + dumpObj(obj));
}
function tempFunc() { }
tempFunc[PROTOTYPE] = obj;
return new tempFunc();
}
var strSlice = _unwrapFunction("slice");
var SUB_STR = "substr";
var strSubstring = _unwrapFunction("substring");
var strSubstr = StrProto[SUB_STR] ? _unwrapFunction(SUB_STR) : polyStrSubstr;
function polyStrSubstr(value, start, length) {
if (isNullOrUndefined(value)) {
throwTypeError("'polyStrSubstr called with invalid " + dumpObj(value));
}
if (length < 0) {
return EMPTY;
}
start = start || 0;
if (start < 0) {
start = mathMax(start + value[LENGTH], 0);
}
if (isUndefined(length)) {
return strSlice(value, start);
}
return strSlice(value, start, start + length);
}
function strLeft(value, count) {
return strSubstring(value, 0, count);
}
function strRight(value, count) {
var len = value[LENGTH];
if (count <= 0) {
return EMPTY;
}
return len > count ? strSubstring(value, len - count) : value;
}
var ENDS_WITH = "endsWith";

@@ -660,6 +841,6 @@ var strEndsWith = StrProto[ENDS_WITH] ? _unwrapFunction(ENDS_WITH) : polyStrEndsWith;

var searchValue = isString(searchString) ? searchString : "" + searchString;
var chkLen = searchValue.length;
var len = value.length;
var chkLen = searchValue[LENGTH];
var len = value[LENGTH];
var end = !isUndefined(length) && length < len ? length : len;
return value.substring(end - chkLen, end) === searchValue;
return strSubstring(value, end - chkLen, end) === searchValue;
}

@@ -709,11 +890,11 @@

targetLength >>= 0;
var len = value.length;
var len = value[LENGTH];
if (len < targetLength) {
result = isNullOrUndefined(padString) ? " " : "" + padString;
targetLength = targetLength - len;
if (targetLength > result.length) {
result = strRepeat(result, mathCeil(targetLength / result.length));
if (targetLength > result[LENGTH]) {
result = strRepeat(result, mathCeil(targetLength / result[LENGTH]));
}
if (result.length > targetLength) {
result = result.substring(0, targetLength);
if (result[LENGTH] > targetLength) {
result = strSubstring(result, 0, targetLength);
}

@@ -732,4 +913,2 @@ }

var strSlice = _unwrapFunction("slice");
var STARTS_WITH = "startsWith";

@@ -742,5 +921,5 @@ var strStartsWith = StrProto[STARTS_WITH] ? _unwrapFunction(STARTS_WITH) : polyStrStartsWith;

var searchValue = isString(searchString) ? searchString : "" + searchString;
var chkLen = searchValue.length;
var chkLen = searchValue[LENGTH];
var pos = position > 0 ? position : 0;
return value.substring(pos, pos + chkLen) === searchValue;
return strSubstring(value, pos, pos + chkLen) === searchValue;
}

@@ -797,2 +976,3 @@

exports.arrReduce = arrReduce;
exports.createArrayIterator = createArrayIterator;
exports.createCustomError = createCustomError;

@@ -802,2 +982,5 @@ exports.createEnum = createEnum;

exports.createEnumValueMap = createEnumValueMap;
exports.createIterable = createIterable;
exports.createIterator = createIterator;
exports.createRangeIterator = createRangeIterator;
exports.createSimpleMap = createSimpleMap;

@@ -813,2 +996,3 @@ exports.createTypeMap = createTypeMap;

exports.getKnownSymbol = getKnownSymbol;
exports.getLength = getLength;
exports.getNavigator = getNavigator;

@@ -851,4 +1035,8 @@ exports.getSymbol = getSymbol;

exports.isWebWorker = isWebWorker;
exports.iterForOf = iterForOf;
exports.makeIterable = makeIterable;
exports.mathCeil = mathCeil;
exports.mathFloor = mathFloor;
exports.mathMax = mathMax;
exports.mathMin = mathMin;
exports.mathToInt = mathToInt;

@@ -877,2 +1065,3 @@ exports.mathTrunc = mathTrunc;

exports.polyObjKeys = polyObjKeys;
exports.polyStrSubstr = polyStrSubstr;
exports.polyStrTrim = polyStrTrim;

@@ -888,7 +1077,11 @@ exports.polyStrTrimEnd = polyStrTrimEnd;

exports.strLastIndexOf = strLastIndexOf;
exports.strLeft = strLeft;
exports.strPadEnd = strPadEnd;
exports.strPadStart = strPadStart;
exports.strRepeat = strRepeat;
exports.strRight = strRight;
exports.strSlice = strSlice;
exports.strStartsWith = strStartsWith;
exports.strSubstr = strSubstr;
exports.strSubstring = strSubstring;
exports.strTrim = strTrim;

@@ -895,0 +1088,0 @@ exports.strTrimEnd = strTrimEnd;

/*!
* NevWare21 - ts-utils, 0.4.1
* NevWare21 - ts-utils, 0.4.2
* https://github.com/nevware21/ts-utils

@@ -7,3 +7,3 @@ * Copyright (c) NevWare21 and contributors. All rights reserved.

*/
var n=this,r=function(n){"use strict";var o="",W="function",U="object",u="prototype",r="undefined",M="hasOwnProperty",t="Symbol",R="_polyfill",e="indexOf",i=Object,C=i[u],f=String[u],a=Math,c=Array,B=c[u];function s(n,r){try{r=n()}catch(t){}return r}function l(r){return function(n){return typeof n===r}}function p(r){return function(n){return!(!n||y(n)!==r)}}function y(n){return C.toString.call(n)}function b(n){return typeof n===r||n===r}function d(n){return null===n||b(n)}function z(n){return null===n||!h(n)}function h(n){return!!n||n!==undefined}var g=l("string"),m=l(W);function v(n){return!d(n)&&!!n&&typeof n===U}var w=c.isArray,G=p("[object Date]"),S=l("number"),j=l("boolean"),c=p("[object RegExp]"),L=p("[object File]"),H=p("[object FormData]"),J=p("[object Blob]"),V=p("[object ArrayBuffer]"),$=p("[object Error]");function q(n){return!!n&&m(n.then)}function Q(n){return!(!n||s(function(){return!(n&&0+n)},!n))}var X="window",Y=null,Z=s(function(){return h(window)},!1),nn=s(function(){return h(document)},!1),rn=s(function(){return h(navigator)},!1),tn=s(function(){return h(history)},!1),en=s(function(){return!!(self&&self instanceof WorkerGlobalScope)},!1),on=s(function(){return!(!process||!(process.versions||{}).node)},!1);function E(n){n=!1===n?null:Y;return n||((n=(n=(n=typeof globalThis!==r?globalThis:n)||typeof self===r?n:self)||typeof window===r?n:window)||typeof global===r||(n=global),Y=n),n}function T(n,r){r=E(r);return r&&r[n]?r[n]:n===X&&Z?window:null}function un(){return nn?document:T("document")}function fn(){return Z?window:T(X)}function an(){return rn?navigator:T("navigator")}function cn(){return tn?history:T("history")}function O(n,r){return n&&C[M].call(n,r)}function I(n,r,t){if(n&&v(n))for(var e in n)if(O(n,e)&&-1===r.call(t||n,e,n[e]))break}function N(n,r,t){if(n)for(var e=n.length,o=0;o<e&&!(o in n&&-1===r.call(t||n,n[o],o,n));o++);}function x(n){throw new TypeError(n)}function sn(n){throw new RangeError(n)}var ln=i.assign,pn=i.freeze;function yn(n){return n}function bn(n){return v(n)&&null!==n||x("objKeys called on non-object"),i.keys(n)}function F(n){var r;return w(n)?(r=[],N(n,function(n){r.push(F(n))}),r):v(n)?dn({},n):n}function dn(t,n){return d(n)||I(n,function(n,r){t[n]=F(r)}),t}function P(n){return pn&&I(n,function(n,r){(w(r)||v(r))&&pn(r)}),hn(n)}var hn=pn||yn,gn=i.seal||yn;function mn(n){var t={};return I(n,function(n,r){t[n]=n,t[r]=n}),P(t)}function vn(n){var t={};return I(n,function(n,r){t[n]=r[1],t[r[0]]=r[1]}),P(t)}var wn,Sn=mn({asyncIterator:0,hasInstance:1,isConcatSpreadable:2,iterator:3,match:4,matchAll:5,replace:6,search:7,species:8,split:9,toPrimitive:10,toStringTag:11,unscopables:12}),jn="__polySymbols$ts_utils";function En(){var n;return wn||(n=E(),wn=n[jn]=n[jn]||{k:{},s:{}}),wn}var Tn={};function _(n){var r={description:""+n,toString:function(){return t+"("+n+")"}};return r[R]=!0,r}function On(n){var r,t=En();return O(t,n)||(r=_(n),t.k[n]=r,t.s[r]=""+n),t.k[n]}function In(n){return!d(n)&&"null"!=n||x(n+" is not a symbol"),En().s[n]}function Nn(n){n=Sn[n];return n?Tn[n]=Tn[n]||_(t+"."+n):void 0}var xn=s(function(){return h(Symbol)},!1),A=T(t),Fn=l("symbol");function Pn(n){return!!_n(n)}function _n(n){return A=!1===n?T(t,n):A,xn&&A}function An(n,r){var t=Sn[n];return A?A[t||n]:r?null:Nn(n)}var Dn=A&&s(function(){return A["for"]},null)||On,kn=A&&s(function(){return A.keyFor},null)||In;function Kn(n){return!!n&&m(n.next)}function D(n,r){var t=y(n);return t+": "+("[object Error]"===t?"{ stack: '"+n.stack+"', message: '"+n.message+"', name: '"+n.name+"'":r?S(r)?JSON.stringify(n,null,r):JSON.stringify(n,null,r?4:0):JSON.stringify(n))}function k(e){return function(n){for(var r=[],t=1;t<arguments.length;t++)r[t-1]=arguments[t];if((n||n===o)&&n[e])return n[e].apply(n,r);x("'"+e+"' not defined for "+D(n))}}var Wn,Un=k(e),Mn=k("map"),Rn=k("reduce");function Cn(n,r){return(i.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(t,n){I(n,function(n,r){t[n]=r})})(n,r)}function Bn(n,r){var t,e,o=Error;function i(){this.constructor=t}return n=n,Cn(t=function(){var n=this,n=o.apply(n,arguments)||n;return r&&r(n,arguments),n},e=o),(i[u]=e[u]).name=n,t[u]=new i,t}function zn(n){throw new(Wn=Wn||Bn("UnsupportedError"))(n)}function Gn(r,n){return N(n,function(n){dn(r,n)}),r}var Ln=a.floor,Hn=a.ceil,Jn=a.trunc||function(n){n=+n;return(0<n?Ln:Hn)(n)};function Vn(n,r){var t=+n;return t==Infinity&&r&&sn("invalid value ["+D(n)+"]"),t!=t||0==t?0:Jn(t)}var a=i.create||function(n){if(!n)return{};var r=typeof n;if(r===U||r==W)return t[u]=n,new t;function t(){}throw new TypeError("Prototype must be an Object or function: "+D(n))},$n=i.defineProperty;function qn(n,r,t){if($n)return $n(n,r,t),n;zn("Unable to define property ["+y(r)+"] on "+D(n))}var Qn="endsWith",Qn=f[Qn]?k(Qn):function(n,r,t){g(n)||x("'"+D(n)+"' is not a string");var r=g(r)?r:""+r,e=r.length,o=n.length,t=!b(t)&&t<o?t:o;return n.substring(t-e,t)===r},e=k(e),Xn=k("lastIndexOf"),Yn=f.repeat?k("repeat"):function(n,r){d(n)&&x("can't convert ["+D(n)+"]"),(r=Vn(r,!0))<0&&sn("invalid count must be >= 0 && < Infinity");for(var t=g(n)?n:""+n,e=o;0<r;(r>>>=1)&&(t+=t))1&r&&(e+=t);return e},Zn="padStart";function nr(n,r,t){var e=o,n=(r=Vn(r,!0),n.length);return n<(r>>=0)&&(e=(r-=n)>(e=d(t)?" ":""+t).length?Yn(e,Hn(r/e.length)):e).length>r?e.substring(0,r):e}var Zn=f[Zn]?k(Zn):function(n,r,t){return nr(n,r,t)+n},rr=f.padEnd?k("padEnd"):function(n,r,t){return n+nr(n,r,t)},tr=k("slice"),er="startsWith",er=f[er]?k(er):function(n,r,t){g(n)||x("'"+D(n)+"' is not a string");var r=g(r)?r:""+r,e=r.length,t=0<t?t:0;return n.substring(t,t+e)===r};function or(r){return function(n){return d(n)&&x("strTrim called ["+D(n)+"]"),n&&n.replace?n.replace(r,""):n}}var ir=or(/^\s+|(?=\s)\s+$/g),ur=or(/^\s+/g),fr=or(/(?=\s)\s+$/g),K="trimStart",ar="trimEnd",cr=f.trim?k("trim"):ir,K=f[K]?k(K):ur,sr=K,f=f[ar]?k(ar):fr,ar=f;n.arrAppend=function(n,r){if(!b(r)&&n)if(w(r))B.push.apply(n,r);else if(Kn(r))for(var t=r.next();!t.done;)n.push(t.value),t=r.next();else n.push(r);return n},n.arrForEach=N,n.arrIndexOf=Un,n.arrMap=Mn,n.arrReduce=Rn,n.createCustomError=Bn,n.createEnum=function(n){var t={};return I(n,function(n,r){t[n]=r,t[r]=n}),P(t)},n.createEnumKeyMap=mn,n.createEnumValueMap=function(n){var t={};return I(n,function(n,r){t[n]=r,t[r]=r}),P(t)},n.createSimpleMap=vn,n.createTypeMap=vn,n.deepExtend=function(n){for(var r=[],t=1;t<arguments.length;t++)r[t-1]=arguments[t];return Gn(F(n)||{},r)},n.dumpObj=D,n.getDocument=un,n.getGlobal=E,n.getHistory=cn,n.getInst=T,n.getIntValue=function(n,r){if(d(n))return r;if(S(n))return n;n=parseInt(n,10);return isNaN(n)?r:n},n.getKnownSymbol=An,n.getNavigator=an,n.getSymbol=_n,n.getWindow=fn,n.hasDocument=function(){return!!un()},n.hasHistory=function(){return!!cn()},n.hasNavigator=function(){return!!an()},n.hasSymbol=Pn,n.hasValue=function(n){return function f(n,r){var t,e,o=!1===n||0===n;if(!o&&!d(n))if(w(n))o=0<n.length;else if(G(n))o=!isNaN(n.getTime());else{if(j(n))return!0;if(v(n)){try{t=n,N(["length","byteLength","size","count"],function(n){if(n in t)return n=t[n],e=0<(m(n)?n():n),-1});var i=e;if(j(i))return i;if(m(n.valueOf)&&r<5)return f(n.valueOf(),++r)}catch(u){}return!!bn(n).length}o=Q(n)}return o}(n,0)},n.hasWindow=function(){return!!fn()},n.isArray=w,n.isArrayBuffer=V,n.isBlob=J,n.isBoolean=j,n.isDate=G,n.isDefined=h,n.isError=$,n.isFile=L,n.isFormData=H,n.isFunction=m,n.isIterable=function(n){return!z(n)&&(Pn()?m(n[An(3)]):Kn(n))},n.isIterator=Kn,n.isNode=function(){return on},n.isNotTruthy=function(n){return!n||!s(function(){return n&&0+n},n)},n.isNullOrUndefined=d,n.isNumber=S,n.isObject=v,n.isPromise=function(n){return q(n)&&m(n["catch"])},n.isPromiseLike=q,n.isRegExp=c,n.isStrictNullOrUndefined=z,n.isStrictUndefined=function(n){return!h(n)},n.isString=g,n.isSymbol=Fn,n.isTruthy=Q,n.isTypeof=function(n,r){return typeof n===r},n.isUndefined=b,n.isWebWorker=function(){return en},n.mathCeil=Hn,n.mathFloor=Ln,n.mathToInt=Vn,n.mathTrunc=Jn,n.newSymbol=function(n,r){return xn?Symbol(n):r?null:_(n)},n.objAssign=ln,n.objCopyProps=dn,n.objCreate=a,n.objDeepCopy=F,n.objDeepFreeze=P,n.objDefineAccessors=function(n,r,t,e,o){if($n)try{var i={enumerable:!0,configurable:!!b(o)||o};return t&&(i.get=t),e&&(i.set=e),qn(n,r,i)}catch(u){zn("Unable to define accessors for ["+y(r)+"] on "+D(n))}},n.objDefineGet=function(n,r,t,e){e={enumerable:!0,configurable:!!b(e)||e};return m(t)?e.get=t:e.value=t,qn(n,r,e)},n.objDefineProp=qn,n.objExtend=function(n){for(var r=[],t=1;t<arguments.length;t++)r[t-1]=arguments[t];return Gn(n||{},r)},n.objForEachKey=I,n.objFreeze=hn,n.objHasOwnProperty=O,n.objKeys=bn,n.objSeal=gn,n.objSetPrototypeOf=Cn,n.objToString=y,n.polyGetKnownSymbol=Nn,n.polyIsArray=function(n){return!d(n)&&"[object Array]"===y(n)},n.polyNewSymbol=_,n.polyObjKeys=function(n){if(!v(n)||null===n)throw new TypeError("polyObjKeys called on non-object");var r,t=[];for(r in n)O(n,r)&&t.push(r);return t},n.polyStrTrim=ir,n.polyStrTrimEnd=fr,n.polyStrTrimStart=ur,n.polySymbolFor=On,n.polySymbolKeyFor=In,n.strEndsWith=Qn,n.strIndexOf=e,n.strIsNullOrEmpty=function(n){return g(n)?n===o:d(n)},n.strIsNullOrWhiteSpace=function(n){return g(n)?n.replace(/[\s\t\r\n\f]+/g,o)===o:d(n)},n.strLastIndexOf=Xn,n.strPadEnd=rr,n.strPadStart=Zn,n.strRepeat=Yn,n.strSlice=tr,n.strStartsWith=er,n.strTrim=cr,n.strTrimEnd=f,n.strTrimLeft=sr,n.strTrimRight=ar,n.strTrimStart=K,n.symbolFor=Dn,n.symbolKeyFor=kn,n.throwError=function(n){throw Error(n)},n.throwRangeError=sn,n.throwTypeError=x,n.throwUnsupported=zn,Object.defineProperty(n,"__esModule",{value:!0})};"object"==typeof exports&&"undefined"!=typeof module?r(exports):"function"==typeof define&&define.amd?define(["exports"],r):r(((n="undefined"!=typeof globalThis?globalThis:n||self).nevware21=n.nevware21||{},n.nevware21["ts-utils"]={}));
var n=this,r=function(n){"use strict";var W=undefined,o="",M="function",R="object",i="prototype",r="undefined",U="hasOwnProperty",t="Symbol",C="_polyfill",L="indexOf",f="length",B="done",a="value",e=Object,z=e[i],u=String[i],c=Math,G=Array,H=G[i];function s(n,r){try{r=n()}catch(t){}return r}function l(r){return function(n){return typeof n===r}}function p(r){return function(n){return!(!n||y(n)!==r)}}function y(n){return z.toString.call(n)}function b(n){return typeof n===r||n===r}function d(n){return null===n||b(n)}function J(n){return null===n||!v(n)}function v(n){return!!n||n!==W}var m=l("string"),h=l(M);function g(n){return!d(n)&&!!n&&typeof n===R}var w=G.isArray,V=p("[object Date]"),$=l("number"),q=l("boolean"),G=p("[object RegExp]"),Q=p("[object File]"),X=p("[object FormData]"),Y=p("[object Blob]"),Z=p("[object ArrayBuffer]"),nn=p("[object Error]");function rn(n){return!!n&&h(n.then)}function tn(n){return!(!n||s(function(){return!(n&&0+n)},!n))}var en=null,on=s(function(){return v(window)},!1),un=s(function(){return v(document)},!1),an=s(function(){return v(navigator)},!1),fn=s(function(){return v(history)},!1),cn=s(function(){return!!(self&&self instanceof WorkerGlobalScope)},!1),sn=s(function(){return!(!process||!(process.versions||{}).node)},!1);function ln(n){n=!1===n?null:en;return n||((n=(n=(n=typeof globalThis!==r?globalThis:n)||typeof self===r?n:self)||typeof window===r?n:window)||typeof global===r||(n=global),en=n),n}function S(n,r){r=ln(r);return r&&r[n]?r[n]:"window"===n&&on?window:null}function pn(){return un?document:S("document")}function yn(){return on?window:S("window")}function bn(){return an?navigator:S("navigator")}function dn(){return fn?history:S("history")}function j(n,r){return n&&z[U].call(n,r)}function E(n,r,t){if(n&&g(n))for(var e in n)if(j(n,e)&&-1===r.call(t||n,e,n[e]))break}function O(n,r,t){if(n)for(var e=n[f],o=0;o<e&&!(o in n&&-1===r.call(t||n,n[o],o,n));o++);}function T(n){throw new TypeError(n)}function vn(n){throw new RangeError(n)}var mn=e.assign,hn=e.freeze;function gn(n){return n}function wn(n){return g(n)&&null!==n||T("objKeys called on non-object"),e.keys(n)}function I(n){var r;return w(n)?(r=[],O(n,function(n){r.push(I(n))}),r):g(n)?Sn({},n):n}function Sn(t,n){return d(n)||E(n,function(n,r){t[n]=I(r)}),t}function x(n){return hn&&E(n,function(n,r){(w(r)||g(r))&&hn(r)}),jn(n)}var jn=hn||gn,En=e.seal||gn;function On(n){var t={};return E(n,function(n,r){t[n]=n,t[r]=n}),x(t)}function Tn(n){var t={};return E(n,function(n,r){t[n]=r[1],t[r[0]]=r[1]}),x(t)}var In,xn=On({asyncIterator:0,hasInstance:1,isConcatSpreadable:2,iterator:3,match:4,matchAll:5,replace:6,search:7,species:8,split:9,toPrimitive:10,toStringTag:11,unscopables:12}),Nn="__polySymbols$ts_utils";function Fn(){var n;return In||(n=ln(),In=n[Nn]=n[Nn]||{k:{},s:{}}),In}var Pn={};function N(n){var r={description:""+n,toString:function(){return t+"("+n+")"}};return r[C]=!0,r}function _n(n){var r,t=Fn();return j(t,n)||(r=N(n),t.k[n]=r,t.s[r]=""+n),t.k[n]}function An(n){return!d(n)&&"null"!=n||T(n+" is not a symbol"),Fn().s[n]}function kn(n){n=xn[n];return n?Pn[n]=Pn[n]||N(t+"."+n):void 0}var Dn=s(function(){return v(Symbol)},!1),F=S(t),Kn=l("symbol");function Wn(n){return F=!1===n?S(t,n):F,Dn&&F}function P(n,r){var t=xn[n];return F?F[t||n]:r?null:kn(n)}var Mn=F&&s(function(){return F["for"]},null)||_n,Rn=F&&s(function(){return F.keyFor},null)||An;function _(n){return!!n&&h(n.next)}function A(n,r){var t=y(n);return t+": "+("[object Error]"===t?"{ stack: '"+n.stack+"', message: '"+n.message+"', name: '"+n.name+"'":r?$(r)?JSON.stringify(n,null,r):JSON.stringify(n,null,r?4:0):JSON.stringify(n))}function k(e){return function(n){for(var r=[],t=1;t<arguments.length;t++)r[t-1]=arguments[t];if((n||n===o)&&n[e])return n[e].apply(n,r);T("'"+e+"' not defined for "+A(n))}}var Un,Cn=k(L),Ln=k("map"),Bn=k("reduce");function zn(n,r){return(e.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(t,n){E(n,function(n,r){t[n]=r})})(n,r)}function Gn(n,r){var t,e,o=Error;function u(){this.constructor=t}return n=n,zn(t=function(){var n=this,n=o.apply(n,arguments)||n;return r&&r(n,arguments),n},e=o),(u[i]=e[i]).name=n,t[i]=new u,t}function Hn(n){throw new(Un=Un||Gn("UnsupportedError"))(n)}function Jn(r,n){return O(n,function(n){Sn(r,n)}),r}var Vn=e.defineProperty;function $n(n,r,t){if(Vn)return Vn(n,r,t),n;Hn("Unable to define property ["+y(r)+"] on "+A(n))}function qn(n,r,t,e){e={enumerable:!0,configurable:!!b(e)||e};return h(t)?e.get=t:e[a]=t,$n(n,r,e)}function Qn(n,r,t,e,o){if(Vn)try{var u={enumerable:!0,configurable:!!b(o)||o};return t&&(u.get=t),e&&(u.set=e),$n(n,r,u)}catch(i){Hn("Unable to define accessors for ["+y(r)+"] on "+A(n))}}function Xn(n,r){return n[P(3)]=function(){return D(r)},n}function D(e){var o=!1;function u(){return e.v}var n={next:function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];o=o||!e.n||e.n(n),(t={})[B]=o;var t;return o||qn(t,a,u),t}};return e.r&&(n["return"]=function(n){var r={done:!0};return r[a]=e.r&&e.r(n),r}),e.t&&(n["throw"]=function(n){var r={done:!0};return r[a]=e.t&&e.t(n),r}),n}var Yn=c.floor,Zn=c.ceil,nr=c.min,rr=c.max,tr=c.trunc||function(n){n=+n;return(0<n?Yn:Zn)(n)};function er(n,r){var t=+n;return t==Infinity&&r&&vn("invalid value ["+A(n)+"]"),t!=t||0==t?0:tr(t)}var c=e.create||function(n){if(!n)return{};var r=typeof n;if(r===R||r==M)return t[i]=n,new t;function t(){}throw new TypeError("Prototype must be an Object or function: "+A(n))},or=k("slice"),K=k("substring"),ur=u.substr?k("substr"):ir;function ir(n,r,t){return d(n)&&T("'polyStrSubstr called with invalid "+A(n)),t<0?o:((r=r||0)<0&&(r=rr(r+n[f],0)),b(t)?or(n,r):or(n,r,r+t))}var ar="endsWith",ar=u[ar]?k(ar):function(n,r,t){m(n)||T("'"+A(n)+"' is not a string");var r=m(r)?r:""+r,e=r[f],o=n[f],t=!b(t)&&t<o?t:o;return K(n,t-e,t)===r},L=k(L),fr=k("lastIndexOf"),cr=u.repeat?k("repeat"):function(n,r){d(n)&&T("can't convert ["+A(n)+"]"),(r=er(r,!0))<0&&vn("invalid count must be >= 0 && < Infinity");for(var t=m(n)?n:""+n,e=o;0<r;(r>>>=1)&&(t+=t))1&r&&(e+=t);return e},sr="padStart";function lr(n,r,t){var e=o,n=(r=er(r,!0),n[f]);return n<(r>>=0)&&(e=(r-=n)>(e=d(t)?" ":""+t)[f]?cr(e,Zn(r/e[f])):e)[f]>r?K(e,0,r):e}var sr=u[sr]?k(sr):function(n,r,t){return lr(n,r,t)+n},pr=u.padEnd?k("padEnd"):function(n,r,t){return n+lr(n,r,t)},yr="startsWith",yr=u[yr]?k(yr):function(n,r,t){m(n)||T("'"+A(n)+"' is not a string");var r=m(r)?r:""+r,e=r[f],t=0<t?t:0;return K(n,t,t+e)===r};function br(r){return function(n){return d(n)&&T("strTrim called ["+A(n)+"]"),n&&n.replace?n.replace(r,""):n}}var dr=br(/^\s+|(?=\s)\s+$/g),vr=br(/^\s+/g),mr=br(/(?=\s)\s+$/g),hr="trimStart",gr="trimEnd",wr=u.trim?k("trim"):dr,hr=u[hr]?k(hr):vr,Sr=hr,u=u[gr]?k(gr):mr,gr=u;n.arrAppend=function(n,r){if(!b(r)&&n)if(w(r))H.push.apply(n,r);else if(_(r))for(var t=r.next();!t[B];)n.push(t[a]),t=r.next();else n.push(r);return n},n.arrForEach=O,n.arrIndexOf=Cn,n.arrMap=Ln,n.arrReduce=Bn,n.createArrayIterator=function(n){var r=-1,t=n?n.slice():[],e=t[f],n={n:function(){return e<=++r}};return Qn(n,"v",function(){if(0<=r&&r<e)return t[r]}),D(n)},n.createCustomError=Gn,n.createEnum=function(n){var t={};return E(n,function(n,r){t[n]=r,t[r]=n}),x(t)},n.createEnumKeyMap=On,n.createEnumValueMap=function(n){var t={};return E(n,function(n,r){t[n]=r,t[r]=r}),x(t)},n.createIterable=function(n){return Xn({},n)},n.createIterator=D,n.createRangeIterator=function(n,r,t){var e=n,o=W,u=(d(r)&&(r=n),t||(n<=r?1:-1)),t={n:function(){var n;return(n=0<u?r<e:e<r)||(o=e,e+=u),n}};return Qn(t,"v",function(){return o}),D(t)},n.createSimpleMap=Tn,n.createTypeMap=Tn,n.deepExtend=function(n){for(var r=[],t=1;t<arguments.length;t++)r[t-1]=arguments[t];return Jn(I(n)||{},r)},n.dumpObj=A,n.getDocument=pn,n.getGlobal=ln,n.getHistory=dn,n.getInst=S,n.getIntValue=function(n,r){if(d(n))return r;if($(n))return n;n=parseInt(n,10);return isNaN(n)?r:n},n.getKnownSymbol=P,n.getLength=function(n){return n.length},n.getNavigator=bn,n.getSymbol=Wn,n.getWindow=yn,n.hasDocument=function(){return!!pn()},n.hasHistory=function(){return!!dn()},n.hasNavigator=function(){return!!bn()},n.hasSymbol=function(n){return!!Wn(n)},n.hasValue=function(n){return function a(n,r){var t,e,o=!1===n||0===n;if(!o&&!d(n))if(w(n))o=0<n[f];else if(V(n))o=!isNaN(n.getTime());else{if(q(n))return!0;if(g(n)){try{t=n,O([f,"byteLength","size","count"],function(n){if(n in t)return n=t[n],e=0<(h(n)?n():n),-1});var u=e;if(q(u))return u;if(h(n.valueOf)&&r<5)return a(n.valueOf(),++r)}catch(i){}return!!wn(n)[f]}o=tn(n)}return o}(n,0)},n.hasWindow=function(){return!!yn()},n.isArray=w,n.isArrayBuffer=Z,n.isBlob=Y,n.isBoolean=q,n.isDate=V,n.isDefined=v,n.isError=nn,n.isFile=Q,n.isFormData=X,n.isFunction=h,n.isIterable=function(n){return!J(n)&&h(n[P(3)])},n.isIterator=_,n.isNode=function(){return sn},n.isNotTruthy=function(n){return!n||!s(function(){return n&&0+n},n)},n.isNullOrUndefined=d,n.isNumber=$,n.isObject=g,n.isPromise=function(n){return rn(n)&&h(n["catch"])},n.isPromiseLike=rn,n.isRegExp=G,n.isStrictNullOrUndefined=J,n.isStrictUndefined=function(n){return!v(n)},n.isString=m,n.isSymbol=Kn,n.isTruthy=tn,n.isTypeof=function(n,r){return typeof n===r},n.isUndefined=b,n.isWebWorker=function(){return cn},n.iterForOf=function(n,r,t){var e;if(n&&(_(n)||(n=n[e=P(3)]?n[e]():null),_(n)))try{for(var o=0,u=n.next();!u[B]&&-1!==r.call(t||n,u[a],o,n);)o++,u=n.next();n["return"]&&n["return"](u)}catch(i){n["throw"]&&n["throw"](i)}},n.makeIterable=Xn,n.mathCeil=Zn,n.mathFloor=Yn,n.mathMax=rr,n.mathMin=nr,n.mathToInt=er,n.mathTrunc=tr,n.newSymbol=function(n,r){return Dn?Symbol(n):r?null:N(n)},n.objAssign=mn,n.objCopyProps=Sn,n.objCreate=c,n.objDeepCopy=I,n.objDeepFreeze=x,n.objDefineAccessors=Qn,n.objDefineGet=qn,n.objDefineProp=$n,n.objExtend=function(n){for(var r=[],t=1;t<arguments.length;t++)r[t-1]=arguments[t];return Jn(n||{},r)},n.objForEachKey=E,n.objFreeze=jn,n.objHasOwnProperty=j,n.objKeys=wn,n.objSeal=En,n.objSetPrototypeOf=zn,n.objToString=y,n.polyGetKnownSymbol=kn,n.polyIsArray=function(n){return!d(n)&&"[object Array]"===y(n)},n.polyNewSymbol=N,n.polyObjKeys=function(n){if(!g(n)||null===n)throw new TypeError("polyObjKeys called on non-object");var r,t=[];for(r in n)j(n,r)&&t.push(r);return t},n.polyStrSubstr=ir,n.polyStrTrim=dr,n.polyStrTrimEnd=mr,n.polyStrTrimStart=vr,n.polySymbolFor=_n,n.polySymbolKeyFor=An,n.strEndsWith=ar,n.strIndexOf=L,n.strIsNullOrEmpty=function(n){return m(n)?n===o:d(n)},n.strIsNullOrWhiteSpace=function(n){return m(n)?n.replace(/[\s\t\r\n\f]+/g,o)===o:d(n)},n.strLastIndexOf=fr,n.strLeft=function(n,r){return K(n,0,r)},n.strPadEnd=pr,n.strPadStart=sr,n.strRepeat=cr,n.strRight=function(n,r){var t=n[f];return r<=0?o:r<t?K(n,t-r):n},n.strSlice=or,n.strStartsWith=yr,n.strSubstr=ur,n.strSubstring=K,n.strTrim=wr,n.strTrimEnd=u,n.strTrimLeft=Sr,n.strTrimRight=gr,n.strTrimStart=hr,n.symbolFor=Mn,n.symbolKeyFor=Rn,n.throwError=function(n){throw Error(n)},n.throwRangeError=vn,n.throwTypeError=T,n.throwUnsupported=Hn,Object.defineProperty(n,"__esModule",{value:!0})};"object"==typeof exports&&"undefined"!=typeof module?r(exports):"function"==typeof define&&define.amd?define(["exports"],r):r(((n="undefined"!=typeof globalThis?globalThis:n||self).nevware21=n.nevware21||{},n.nevware21["ts-utils"]={}));
//# sourceMappingURL=ts-utils.min.js.map
/*!
* NevWare21 - ts-utils, 0.4.1
* NevWare21 - ts-utils, 0.4.2
* https://github.com/nevware21/ts-utils

@@ -15,2 +15,3 @@ * Copyright (c) NevWare21 and contributors. All rights reserved.

arrForEach: arrForEach,
createArrayIterator: createArrayIterator,
createCustomError: createCustomError,

@@ -20,2 +21,5 @@ createEnum: createEnum,

createEnumValueMap: createEnumValueMap,
createIterable: createIterable,
createIterator: createIterator,
createRangeIterator: createRangeIterator,
createSimpleMap: createSimpleMap,

@@ -55,2 +59,4 @@ createTypeMap: createTypeMap,

isWebWorker: isWebWorker,
iterForOf: iterForOf,
makeIterable: makeIterable,
mathToInt: mathToInt,

@@ -74,2 +80,3 @@ newSymbol: newSymbol,

polyObjKeys: polyObjKeys,
polyStrSubstr: polyStrSubstr,
polySymbolFor: polySymbolFor,

@@ -79,2 +86,4 @@ polySymbolKeyFor: polySymbolKeyFor,

strIsNullOrWhiteSpace: strIsNullOrWhiteSpace,
strLeft: strLeft,
strRight: strRight,
throwError: throwError,

@@ -86,2 +95,3 @@ throwRangeError: throwRangeError,

var UNDEF_VALUE = undefined;
var EMPTY = "";

@@ -100,5 +110,9 @@ var BOOLEAN = "boolean";

var LAST_INDEX_OF = "lastIndexOf";
var LENGTH = "length";
var DONE = "done";
var VALUE = "value";
var ObjClass = Object;
var ObjProto = ObjClass[PROTOTYPE];
var StrProto = String[PROTOTYPE];
var StrCls = String;
var StrProto = StrCls[PROTOTYPE];
var MathCls = Math;

@@ -147,3 +161,3 @@ var ArrCls = Array;

function isDefined(arg) {
return !!arg || arg !== undefined;
return !!arg || arg !== UNDEF_VALUE;
}

@@ -270,3 +284,3 @@ var isString = exports('isString', _createIs(STRING));

if (arr) {
var len = arr.length;
var len = arr[LENGTH];
for (var idx = 0; idx < len; idx++) {

@@ -458,3 +472,3 @@ if (idx in arr) {

function isIterable(value) {
return !isStrictNullOrUndefined(value) && (hasSymbol() ? isFunction(value[getKnownSymbol(3)]) : isIterator(value));
return !isStrictNullOrUndefined(value) && isFunction(value[getKnownSymbol(3)]);
}

@@ -469,4 +483,4 @@

var value = elms.next();
while (!value.done) {
target.push(value.value);
while (!value[DONE]) {
target.push(value[VALUE]);
value = elms.next();

@@ -516,2 +530,7 @@ }

}
function _unwrapProp(propName) {
return function (thisArg) {
return thisArg[propName];
};
}

@@ -586,2 +605,4 @@ var arrIndexOf = exports('arrIndexOf', _unwrapFunction(INDEX_OF));

var getLength = exports('getLength', _unwrapProp(LENGTH));
function getIntValue(value, defValue) {

@@ -613,3 +634,3 @@ if (!isNullOrUndefined(value)) {

if (isArray(value)) {
result = value.length > 0;
result = value[LENGTH] > 0;
}

@@ -624,3 +645,3 @@ else if (isDate(value)) {

try {
var chkValue = _checkLength(value, ["length", "byteLength", "size", "count"]);
var chkValue = _checkLength(value, [LENGTH, "byteLength", "size", "count"]);
if (isBoolean(chkValue)) {

@@ -635,3 +656,3 @@ return chkValue;

}
return !!objKeys(value).length;
return !!objKeys(value)[LENGTH];
}

@@ -648,35 +669,2 @@ else {

var mathFloor = exports('mathFloor', MathCls.floor);
var mathCeil = exports('mathCeil', MathCls.ceil);
var _mathTrunc = MathCls.trunc;
var mathTrunc = exports('mathTrunc', _mathTrunc ? _mathTrunc : polyMathTrunc);
function polyMathTrunc(value) {
var theValue = +value;
return (theValue > 0 ? mathFloor : mathCeil)(theValue);
}
function mathToInt(value, throwInfinity) {
var result = +value;
if (result == Infinity && throwInfinity) {
throwRangeError("invalid value [" + dumpObj(value) + "]");
}
return result !== result || result === 0 ? 0 : mathTrunc(result);
}
var _objCreate = ObjClass["create"];
var objCreate = exports('objCreate', _objCreate ? _objCreate : polyObjCreate);
function polyObjCreate(obj) {
if (!obj) {
return {};
}
var type = typeof obj;
if (type !== OBJECT && type !== FUNCTION) {
throw new TypeError("Prototype must be an Object or function: " + dumpObj(obj));
}
function tempFunc() { }
tempFunc[PROTOTYPE] = obj;
return new tempFunc();
}
var _objDefineProperty = ObjClass["defineProperty"];

@@ -699,3 +687,3 @@ function objDefineProp(target, key, descriptor) {

else {
desc.value = value;
desc[VALUE] = value;
}

@@ -725,2 +713,204 @@ return objDefineProp(target, key, desc);

function createIterable(ctx) {
return makeIterable({}, ctx);
}
function makeIterable(target, ctx) {
var itSymbol = getKnownSymbol(3);
function _createIterator() {
return createIterator(ctx);
}
target[itSymbol] = _createIterator;
return target;
}
function createIterator(ctx) {
var isDone = false;
function _value() {
return ctx.v;
}
function _next() {
var _a;
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
isDone = isDone || (ctx.n ? ctx.n(args) : true);
var result = (_a = {},
_a[DONE] = isDone,
_a);
if (!isDone) {
objDefineGet(result, VALUE, _value);
}
return result;
}
function _return(value) {
var _a;
return _a = {},
_a[DONE] = true,
_a[VALUE] = ctx.r && ctx.r(value),
_a;
}
function _throw(e) {
var _a;
return _a = {},
_a[DONE] = true,
_a[VALUE] = ctx.t && ctx.t(e),
_a;
}
var theIterator = {
next: _next
};
if (ctx.r) {
theIterator.return = _return;
}
if (ctx.t) {
theIterator.throw = _throw;
}
return theIterator;
}
function createArrayIterator(values) {
var idx = -1;
var theValues = values ? values.slice() : [];
var len = theValues[LENGTH];
function _value() {
if (idx >= 0 && idx < len) {
return theValues[idx];
}
}
function _getNext() {
idx++;
return idx >= len;
}
var ctx = {
n: _getNext
};
objDefineAccessors(ctx, "v", _value);
return createIterator(ctx);
}
function iterForOf(iter, callbackfn, thisArg) {
if (iter) {
if (!isIterator(iter)) {
var itSymbol = getKnownSymbol(3);
iter = iter[itSymbol] ? iter[itSymbol]() : null;
}
if (isIterator(iter)) {
try {
var count = 0;
var value = iter.next();
while (!value[DONE]) {
if (callbackfn.call(thisArg || iter, value[VALUE], count, iter) === -1) {
break;
}
count++;
value = iter.next();
}
iter.return && iter.return(value);
}
catch (e) {
iter.throw && iter.throw(e);
}
}
}
}
function createRangeIterator(start, end, step) {
var nextValue = start;
var theValue = UNDEF_VALUE;
if (isNullOrUndefined(end)) {
end = start;
}
var theStep = step || ((start <= end) ? 1 : -1);
function _value() {
return theValue;
}
function _getNext() {
var isDone = false;
if (theStep > 0) {
isDone = nextValue > end;
}
else {
isDone = nextValue < end;
}
if (!isDone) {
theValue = nextValue;
nextValue += theStep;
}
return isDone;
}
var ctx = {
n: _getNext
};
objDefineAccessors(ctx, "v", _value);
return createIterator(ctx);
}
var mathFloor = exports('mathFloor', MathCls.floor);
var mathCeil = exports('mathCeil', MathCls.ceil);
var mathMin = exports('mathMin', MathCls.min);
var mathMax = exports('mathMax', MathCls.max);
var _mathTrunc = MathCls.trunc;
var mathTrunc = exports('mathTrunc', _mathTrunc ? _mathTrunc : polyMathTrunc);
function polyMathTrunc(value) {
var theValue = +value;
return (theValue > 0 ? mathFloor : mathCeil)(theValue);
}
function mathToInt(value, throwInfinity) {
var result = +value;
if (result == Infinity && throwInfinity) {
throwRangeError("invalid value [" + dumpObj(value) + "]");
}
return result !== result || result === 0 ? 0 : mathTrunc(result);
}
var _objCreate = ObjClass["create"];
var objCreate = exports('objCreate', _objCreate ? _objCreate : polyObjCreate);
function polyObjCreate(obj) {
if (!obj) {
return {};
}
var type = typeof obj;
if (type !== OBJECT && type !== FUNCTION) {
throw new TypeError("Prototype must be an Object or function: " + dumpObj(obj));
}
function tempFunc() { }
tempFunc[PROTOTYPE] = obj;
return new tempFunc();
}
var strSlice = exports('strSlice', _unwrapFunction("slice"));
var SUB_STR = "substr";
var strSubstring = exports('strSubstring', _unwrapFunction("substring"));
var strSubstr = exports('strSubstr', StrProto[SUB_STR] ? _unwrapFunction(SUB_STR) : polyStrSubstr);
function polyStrSubstr(value, start, length) {
if (isNullOrUndefined(value)) {
throwTypeError("'polyStrSubstr called with invalid " + dumpObj(value));
}
if (length < 0) {
return EMPTY;
}
start = start || 0;
if (start < 0) {
start = mathMax(start + value[LENGTH], 0);
}
if (isUndefined(length)) {
return strSlice(value, start);
}
return strSlice(value, start, start + length);
}
function strLeft(value, count) {
return strSubstring(value, 0, count);
}
function strRight(value, count) {
var len = value[LENGTH];
if (count <= 0) {
return EMPTY;
}
return len > count ? strSubstring(value, len - count) : value;
}
var ENDS_WITH = "endsWith";

@@ -733,6 +923,6 @@ var strEndsWith = exports('strEndsWith', StrProto[ENDS_WITH] ? _unwrapFunction(ENDS_WITH) : polyStrEndsWith);

var searchValue = isString(searchString) ? searchString : "" + searchString;
var chkLen = searchValue.length;
var len = value.length;
var chkLen = searchValue[LENGTH];
var len = value[LENGTH];
var end = !isUndefined(length) && length < len ? length : len;
return value.substring(end - chkLen, end) === searchValue;
return strSubstring(value, end - chkLen, end) === searchValue;
}

@@ -782,11 +972,11 @@

targetLength >>= 0;
var len = value.length;
var len = value[LENGTH];
if (len < targetLength) {
result = isNullOrUndefined(padString) ? " " : "" + padString;
targetLength = targetLength - len;
if (targetLength > result.length) {
result = strRepeat(result, mathCeil(targetLength / result.length));
if (targetLength > result[LENGTH]) {
result = strRepeat(result, mathCeil(targetLength / result[LENGTH]));
}
if (result.length > targetLength) {
result = result.substring(0, targetLength);
if (result[LENGTH] > targetLength) {
result = strSubstring(result, 0, targetLength);
}

@@ -805,4 +995,2 @@ }

var strSlice = exports('strSlice', _unwrapFunction("slice"));
var STARTS_WITH = "startsWith";

@@ -815,5 +1003,5 @@ var strStartsWith = exports('strStartsWith', StrProto[STARTS_WITH] ? _unwrapFunction(STARTS_WITH) : polyStrStartsWith);

var searchValue = isString(searchString) ? searchString : "" + searchString;
var chkLen = searchValue.length;
var chkLen = searchValue[LENGTH];
var pos = position > 0 ? position : 0;
return value.substring(pos, pos + chkLen) === searchValue;
return strSubstring(value, pos, pos + chkLen) === searchValue;
}

@@ -820,0 +1008,0 @@

/*!
* NevWare21 - ts-utils, 0.4.1
* NevWare21 - ts-utils, 0.4.2
* https://github.com/nevware21/ts-utils

@@ -7,3 +7,3 @@ * Copyright (c) NevWare21 and contributors. All rights reserved.

*/
System.register("nevware21.ts-utils",[],function(Gn){"use strict";return{execute:function(){Gn({arrAppend:function(n,r){if(!y(r)&&n)if(v(r))B.push.apply(n,r);else if(Fn(r))for(var t=r.next();!t.done;)n.push(t.value),t=r.next();else n.push(r);return n},arrForEach:O,createCustomError:Pn,createEnum:function(n){var t={};return E(n,function(n,r){t[n]=r,t[r]=n}),P(t)},createEnumKeyMap:yn,createEnumValueMap:function(n){var t={};return E(n,function(n,r){t[n]=r,t[r]=r}),P(t)},createSimpleMap:bn,createTypeMap:bn,deepExtend:function(n){for(var r=[],t=1;t<arguments.length;t++)r[t-1]=arguments[t];return Dn(F(n)||{},r)},dumpObj:k,getDocument:un,getGlobal:S,getHistory:an,getInst:w,getIntValue:function(n,r){if(b(n))return r;if(L(n))return n;n=parseInt(n,10);return isNaN(n)?r:n},getKnownSymbol:Nn,getNavigator:fn,getSymbol:In,getWindow:cn,hasDocument:function(){return!!un()},hasHistory:function(){return!!an()},hasNavigator:function(){return!!fn()},hasSymbol:Tn,hasValue:function(n){return function c(n,r){var t,e,o=!1===n||0===n;if(!o&&!b(n))if(v(n))o=0<n.length;else if(G(n))o=!isNaN(n.getTime());else{if(H(n))return!0;if(m(n)){try{t=n,O(["length","byteLength","size","count"],function(n){if(n in t)return n=t[n],e=0<(d(n)?n():n),-1});var i=e;if(H(i))return i;if(d(n.valueOf)&&r<5)return c(n.valueOf(),++r)}catch(u){}return!!ln(n).length}o=V(n)}return o}(n,0)},hasWindow:function(){return!!cn()},isDefined:g,isIterable:function(n){return!z(n)&&(Tn()?d(n[Nn(3)]):Fn(n))},isIterator:Fn,isNode:function(){return on},isNotTruthy:function(n){return!n||!a(function(){return n&&0+n},n)},isNullOrUndefined:b,isObject:m,isPromise:function(n){return J(n)&&d(n["catch"])},isPromiseLike:J,isStrictNullOrUndefined:z,isStrictUndefined:function(n){return!g(n)},isTruthy:V,isTypeof:function(n,r){return typeof n===r},isUndefined:y,isWebWorker:function(){return en},mathToInt:Wn,newSymbol:function(n,r){return On?Symbol(n):r?null:A(n)},objCopyProps:x,objDeepCopy:F,objDeepFreeze:P,objDefineAccessors:function(n,r,t,e,o){if(Un)try{var i={enumerable:!0,configurable:!!y(o)||o};return t&&(i.get=t),e&&(i.set=e),Rn(n,r,i)}catch(u){An("Unable to define accessors for ["+p(r)+"] on "+k(n))}},objDefineGet:function(n,r,t,e){e={enumerable:!0,configurable:!!y(e)||e};return d(t)?e.get=t:e.value=t,Rn(n,r,e)},objDefineProp:Rn,objExtend:function(n){for(var r=[],t=1;t<arguments.length;t++)r[t-1]=arguments[t];return Dn(n||{},r)},objForEachKey:E,objHasOwnProperty:j,objKeys:ln,objSetPrototypeOf:xn,objToString:p,polyGetKnownSymbol:jn,polyIsArray:function(n){return!b(n)&&"[object Array]"===p(n)},polyNewSymbol:A,polyObjKeys:function(n){if(!m(n)||null===n)throw new TypeError("polyObjKeys called on non-object");var r,t=[];for(r in n)j(n,r)&&t.push(r);return t},polySymbolFor:Sn,polySymbolKeyFor:wn,strIsNullOrEmpty:function(n){return h(n)?n===o:b(n)},strIsNullOrWhiteSpace:function(n){return h(n)?n.replace(/[\s\t\r\n\f]+/g,o)===o:b(n)},throwError:function(n){throw Error(n)},throwRangeError:I,throwTypeError:T,throwUnsupported:An});var o="",W="function",U="object",u="prototype",r="undefined",R="hasOwnProperty",t="Symbol",C="_polyfill",n="indexOf",e=Object,M=e[u],i=String[u],c=Math,f=Array,B=f[u];function a(n,r){try{r=n()}catch(t){}return r}function s(r){return function(n){return typeof n===r}}function l(r){return function(n){return!(!n||p(n)!==r)}}function p(n){return M.toString.call(n)}function y(n){return typeof n===r||n===r}function b(n){return null===n||y(n)}function z(n){return null===n||!g(n)}function g(n){return!!n||n!==undefined}var h=Gn("isString",s("string")),d=Gn("isFunction",s(W));function m(n){return!b(n)&&!!n&&typeof n===U}var v=Gn("isArray",f.isArray),G=Gn("isDate",l("[object Date]")),L=Gn("isNumber",s("number")),H=Gn("isBoolean",s("boolean"));function J(n){return!!n&&d(n.then)}function V(n){return!(!n||a(function(){return!(n&&0+n)},!n))}Gn("isRegExp",l("[object RegExp]")),Gn("isFile",l("[object File]")),Gn("isFormData",l("[object FormData]")),Gn("isBlob",l("[object Blob]")),Gn("isArrayBuffer",l("[object ArrayBuffer]")),Gn("isError",l("[object Error]"));var $="document",q="history",Q="navigator",X="window",Y=null,Z=a(function(){return g(window)},!1),nn=a(function(){return g(document)},!1),rn=a(function(){return g(navigator)},!1),tn=a(function(){return g(history)},!1),en=a(function(){return!!(self&&self instanceof WorkerGlobalScope)},!1),on=a(function(){return!(!process||!(process.versions||{}).node)},!1);function S(n){n=!1===n?null:Y;return n||((n=(n=(n=typeof globalThis!==r?globalThis:n)||typeof self===r?n:self)||typeof window===r?n:window)||typeof global===r||(n=global),Y=n),n}function w(n,r){r=S(r);return r&&r[n]?r[n]:n===X&&Z?window:null}function un(){return nn?document:w($)}function cn(){return Z?window:w(X)}function fn(){return rn?navigator:w(Q)}function an(){return tn?history:w(q)}function j(n,r){return n&&M[R].call(n,r)}function E(n,r,t){if(n&&m(n))for(var e in n)if(j(n,e)&&-1===r.call(t||n,e,n[e]))break}function O(n,r,t){if(n)for(var e=n.length,o=0;o<e&&!(o in n&&-1===r.call(t||n,n[o],o,n));o++);}function T(n){throw new TypeError(n)}function I(n){throw new RangeError(n)}var f=e.assign,N=e.freeze;function sn(n){return n}function ln(n){return m(n)&&null!==n||T("objKeys called on non-object"),e.keys(n)}function F(n){var r;return v(n)?(r=[],O(n,function(n){r.push(F(n))}),r):m(n)?x({},n):n}function x(t,n){return b(n)||E(n,function(n,r){t[n]=F(r)}),t}function P(n){return N&&E(n,function(n,r){(v(r)||m(r))&&N(r)}),pn(n)}Gn("objAssign",f);var pn=Gn("objFreeze",N||sn);function yn(n){var t={};return E(n,function(n,r){t[n]=n,t[r]=n}),P(t)}function bn(n){var t={};return E(n,function(n,r){t[n]=r[1],t[r[0]]=r[1]}),P(t)}Gn("objSeal",e.seal||sn);var gn,hn=yn({asyncIterator:0,hasInstance:1,isConcatSpreadable:2,iterator:3,match:4,matchAll:5,replace:6,search:7,species:8,split:9,toPrimitive:10,toStringTag:11,unscopables:12}),dn="__polySymbols$ts_utils";function mn(){var n;return gn||(n=S(),gn=n[dn]=n[dn]||{k:{},s:{}}),gn}var vn={};function A(n){var r={description:""+n,toString:function(){return t+"("+n+")"}};return r[C]=!0,r}function Sn(n){var r,t=mn();return j(t,n)||(r=A(n),t.k[n]=r,t.s[r]=""+n),t.k[n]}function wn(n){return!b(n)&&"null"!=n||T(n+" is not a symbol"),mn().s[n]}function jn(n){n=hn[n];return n?vn[n]=vn[n]||A(t+"."+n):void 0}var En,On=a(function(){return g(Symbol)},!1),D=w(t),f=D&&a(function(){return D["for"]},null),_=D&&a(function(){return D.keyFor},null);function Tn(n){return!!In(n)}function In(n){return D=!1===n?w(t,n):D,On&&D}function Nn(n,r){var t=hn[n];return D?D[t||n]:r?null:jn(n)}function Fn(n){return!!n&&d(n.next)}function k(n,r){var t=p(n);return t+": "+("[object Error]"===t?"{ stack: '"+n.stack+"', message: '"+n.message+"', name: '"+n.name+"'":r?L(r)?JSON.stringify(n,null,r):JSON.stringify(n,null,r?4:0):JSON.stringify(n))}function K(e){return function(n){for(var r=[],t=1;t<arguments.length;t++)r[t-1]=arguments[t];if((n||n===o)&&n[e])return n[e].apply(n,r);T("'"+e+"' not defined for "+k(n))}}function xn(n,r){return(e.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(t,n){E(n,function(n,r){t[n]=r})})(n,r)}function Pn(n,r){var t,e,o=Error;function i(){this.constructor=t}return n=n,xn(t=function(){var n=this,n=o.apply(n,arguments)||n;return r&&r(n,arguments),n},e=o),(i[u]=e[u]).name=n,t[u]=new i,t}function An(n){throw new(En=En||Pn("UnsupportedError"))(n)}function Dn(r,n){return O(n,function(n){x(r,n)}),r}Gn("isSymbol",s("symbol")),Gn("symbolFor",f||Sn),Gn("symbolKeyFor",_||wn),Gn("arrIndexOf",K(n)),Gn("arrMap",K("map")),Gn("arrReduce",K("reduce"));var _n=Gn("mathFloor",c.floor),kn=Gn("mathCeil",c.ceil),Kn=Gn("mathTrunc",c.trunc||function(n){n=+n;return(0<n?_n:kn)(n)});function Wn(n,r){var t=+n;return t==Infinity&&r&&I("invalid value ["+k(n)+"]"),t!=t||0==t?0:Kn(t)}var f=e.create,Un=(Gn("objCreate",f||function(n){if(!n)return{};var r=typeof n;if(r===U||r==W)return t[u]=n,new t;function t(){}throw new TypeError("Prototype must be an Object or function: "+k(n))}),e.defineProperty);function Rn(n,r,t){if(Un)return Un(n,r,t),n;An("Unable to define property ["+p(r)+"] on "+k(n))}var _="endsWith",Cn=(Gn("strEndsWith",i[_]?K(_):function(n,r,t){h(n)||T("'"+k(n)+"' is not a string");var r=h(r)?r:""+r,e=r.length,o=n.length,t=!y(t)&&t<o?t:o;return n.substring(t-e,t)===r}),Gn("strIndexOf",K(n)),Gn("strLastIndexOf",K("lastIndexOf")),Gn("strRepeat",i.repeat?K("repeat"):function(n,r){b(n)&&T("can't convert ["+k(n)+"]"),(r=Wn(r,!0))<0&&I("invalid count must be >= 0 && < Infinity");for(var t=h(n)?n:""+n,e=o;0<r;(r>>>=1)&&(t+=t))1&r&&(e+=t);return e})),c="padStart";function Mn(n,r,t){var e=o,n=(r=Wn(r,!0),n.length);return n<(r>>=0)&&(e=(r-=n)>(e=b(t)?" ":""+t).length?Cn(e,kn(r/e.length)):e).length>r?e.substring(0,r):e}Gn("strPadStart",i[c]?K(c):function(n,r,t){return Mn(n,r,t)+n}),Gn("strPadEnd",i.padEnd?K("padEnd"):function(n,r,t){return n+Mn(n,r,t)}),Gn("strSlice",K("slice"));f="startsWith";function Bn(r){return function(n){return b(n)&&T("strTrim called ["+k(n)+"]"),n&&n.replace?n.replace(r,""):n}}Gn("strStartsWith",i[f]?K(f):function(n,r,t){h(n)||T("'"+k(n)+"' is not a string");var r=h(r)?r:""+r,e=r.length,t=0<t?t:0;return n.substring(t,t+e)===r});var _=Gn("polyStrTrim",Bn(/^\s+|(?=\s)\s+$/g)),n=Gn("polyStrTrimStart",Bn(/^\s+/g)),c=Gn("polyStrTrimEnd",Bn(/(?=\s)\s+$/g)),f="trimStart",zn="trimEnd",_=(Gn("strTrim",i.trim?K("trim"):_),Gn("strTrimStart",i[f]?K(f):n)),f=(Gn("strTrimLeft",_),Gn("strTrimEnd",i[zn]?K(zn):c));Gn("strTrimRight",f)}}});
System.register("nevware21.ts-utils",[],function(rn){"use strict";return{execute:function(){rn({arrAppend:function(r,n){if(!v(n)&&r)if(w(n))z.push.apply(r,n);else if(kr(n))for(var t=n.next();!t[c];)r.push(t[f]),t=n.next();else r.push(n);return r},arrForEach:T,createArrayIterator:function(r){var n=-1,t=r?r.slice():[],e=t[a],r={n:function(){return e<=++n}};return Cr(r,"v",function(){if(0<=n&&n<e)return t[n]}),Br(r)},createCustomError:_r,createEnum:function(r){var t={};return O(r,function(r,n){t[r]=n,t[n]=r}),N(t)},createEnumKeyMap:hr,createEnumValueMap:function(r){var t={};return O(r,function(r,n){t[r]=n,t[n]=n}),N(t)},createIterable:function(r){return Lr({},r)},createIterator:Br,createRangeIterator:function(r,n,t){var e=r,o=W,u=(m(n)&&(n=r),t||(r<=n?1:-1)),t={n:function(){var r;return(r=0<u?n<e:e<n)||(o=e,e+=u),r}};return Cr(t,"v",function(){return o}),Br(t)},createSimpleMap:gr,createTypeMap:gr,deepExtend:function(r){for(var n=[],t=1;t<arguments.length;t++)n[t-1]=arguments[t];return Wr(x(r)||{},n)},dumpObj:D,getDocument:ar,getGlobal:cr,getHistory:lr,getInst:j,getIntValue:function(r,n){if(m(r))return n;if(J(r))return r;r=parseInt(r,10);return isNaN(r)?n:r},getKnownSymbol:k,getNavigator:sr,getSymbol:Pr,getWindow:fr,hasDocument:function(){return!!ar()},hasHistory:function(){return!!lr()},hasNavigator:function(){return!!sr()},hasSymbol:function(r){return!!Pr(r)},hasValue:function(r){return function c(r,n){var t,e,o=!1===r||0===r;if(!o&&!m(r))if(w(r))o=0<r[a];else if(H(r))o=!isNaN(r.getTime());else{if(V(r))return!0;if(S(r)){try{t=r,T([a,"byteLength","size","count"],function(r){if(r in t)return r=t[r],e=0<(g(r)?r():r),-1});var u=e;if(V(u))return u;if(g(r.valueOf)&&n<5)return c(r.valueOf(),++n)}catch(i){}return!!vr(r)[a]}o=q(r)}return o}(r,0)},hasWindow:function(){return!!fr()},isDefined:d,isIterable:function(r){return!G(r)&&g(r[k(3)])},isIterator:kr,isNode:function(){return ir},isNotTruthy:function(r){return!r||!l(function(){return r&&0+r},r)},isNullOrUndefined:m,isObject:S,isPromise:function(r){return $(r)&&g(r["catch"])},isPromiseLike:$,isStrictNullOrUndefined:G,isStrictUndefined:function(r){return!d(r)},isTruthy:q,isTypeof:function(r,n){return typeof r===n},isUndefined:v,isWebWorker:function(){return ur},iterForOf:function(r,n,t){var e;if(r&&(kr(r)||(r=r[e=k(3)]?r[e]():null),kr(r)))try{for(var o=0,u=r.next();!u[c]&&-1!==n.call(t||r,u[f],o,r);)o++,u=r.next();r["return"]&&r["return"](u)}catch(i){r["throw"]&&r["throw"](i)}},makeIterable:Lr,mathToInt:Vr,newSymbol:function(r,n){return Ar?Symbol(r):n?null:F(r)},objCopyProps:mr,objDeepCopy:x,objDeepFreeze:N,objDefineAccessors:Cr,objDefineGet:Ur,objDefineProp:Mr,objExtend:function(r){for(var n=[],t=1;t<arguments.length;t++)n[t-1]=arguments[t];return Wr(r||{},n)},objForEachKey:O,objHasOwnProperty:E,objKeys:vr,objSetPrototypeOf:Dr,objToString:b,polyGetKnownSymbol:xr,polyIsArray:function(r){return!m(r)&&"[object Array]"===b(r)},polyNewSymbol:F,polyObjKeys:function(r){if(!S(r)||null===r)throw new TypeError("polyObjKeys called on non-object");var n,t=[];for(n in r)E(r,n)&&t.push(n);return t},polyStrSubstr:qr,polySymbolFor:Tr,polySymbolKeyFor:Ir,strIsNullOrEmpty:function(r){return h(r)?r===o:m(r)},strIsNullOrWhiteSpace:function(r){return h(r)?r.replace(/[\s\t\r\n\f]+/g,o)===o:m(r)},strLeft:function(r,n){return K(r,0,n)},strRight:function(r,n){var t=r[a];return n<=0?o:n<t?K(r,t-n):r},throwError:function(r){throw Error(r)},throwRangeError:yr,throwTypeError:I,throwUnsupported:Kr});var W=undefined,o="",R="function",M="object",i="prototype",n="undefined",U="hasOwnProperty",t="Symbol",C="_polyfill",L="indexOf",a="length",c="done",f="value",e=Object,B=e[i],r=String[i],u=Math,s=Array,z=s[i];function l(r,n){try{n=r()}catch(t){}return n}function y(n){return function(r){return typeof r===n}}function p(n){return function(r){return!(!r||b(r)!==n)}}function b(r){return B.toString.call(r)}function v(r){return typeof r===n||r===n}function m(r){return null===r||v(r)}function G(r){return null===r||!d(r)}function d(r){return!!r||r!==W}var h=rn("isString",y("string")),g=rn("isFunction",y(R));function S(r){return!m(r)&&!!r&&typeof r===M}var w=rn("isArray",s.isArray),H=rn("isDate",p("[object Date]")),J=rn("isNumber",y("number")),V=rn("isBoolean",y("boolean"));function $(r){return!!r&&g(r.then)}function q(r){return!(!r||l(function(){return!(r&&0+r)},!r))}rn("isRegExp",p("[object RegExp]")),rn("isFile",p("[object File]")),rn("isFormData",p("[object FormData]")),rn("isBlob",p("[object Blob]")),rn("isArrayBuffer",p("[object ArrayBuffer]")),rn("isError",p("[object Error]"));var Q="document",X="history",Y="navigator",Z="window",rr=null,nr=l(function(){return d(window)},!1),tr=l(function(){return d(document)},!1),er=l(function(){return d(navigator)},!1),or=l(function(){return d(history)},!1),ur=l(function(){return!!(self&&self instanceof WorkerGlobalScope)},!1),ir=l(function(){return!(!process||!(process.versions||{}).node)},!1);function cr(r){r=!1===r?null:rr;return r||((r=(r=(r=typeof globalThis!==n?globalThis:r)||typeof self===n?r:self)||typeof window===n?r:window)||typeof global===n||(r=global),rr=r),r}function j(r,n){n=cr(n);return n&&n[r]?n[r]:r===Z&&nr?window:null}function ar(){return tr?document:j(Q)}function fr(){return nr?window:j(Z)}function sr(){return er?navigator:j(Y)}function lr(){return or?history:j(X)}function E(r,n){return r&&B[U].call(r,n)}function O(r,n,t){if(r&&S(r))for(var e in r)if(E(r,e)&&-1===n.call(t||r,e,r[e]))break}function T(r,n,t){if(r)for(var e=r[a],o=0;o<e&&!(o in r&&-1===n.call(t||r,r[o],o,r));o++);}function I(r){throw new TypeError(r)}function yr(r){throw new RangeError(r)}var s=e.assign,pr=e.freeze;function br(r){return r}function vr(r){return S(r)&&null!==r||I("objKeys called on non-object"),e.keys(r)}function x(r){var n;return w(r)?(n=[],T(r,function(r){n.push(x(r))}),n):S(r)?mr({},r):r}function mr(t,r){return m(r)||O(r,function(r,n){t[r]=x(n)}),t}function N(r){return pr&&O(r,function(r,n){(w(n)||S(n))&&pr(n)}),dr(r)}rn("objAssign",s);var dr=rn("objFreeze",pr||br);function hr(r){var t={};return O(r,function(r,n){t[r]=r,t[n]=r}),N(t)}function gr(r){var t={};return O(r,function(r,n){t[r]=n[1],t[n[0]]=n[1]}),N(t)}rn("objSeal",e.seal||br);var Sr,wr=hr({asyncIterator:0,hasInstance:1,isConcatSpreadable:2,iterator:3,match:4,matchAll:5,replace:6,search:7,species:8,split:9,toPrimitive:10,toStringTag:11,unscopables:12}),jr="__polySymbols$ts_utils";function Er(){var r;return Sr||(r=cr(),Sr=r[jr]=r[jr]||{k:{},s:{}}),Sr}var Or={};function F(r){var n={description:""+r,toString:function(){return t+"("+r+")"}};return n[C]=!0,n}function Tr(r){var n,t=Er();return E(t,r)||(n=F(r),t.k[r]=n,t.s[n]=""+r),t.k[r]}function Ir(r){return!m(r)&&"null"!=r||I(r+" is not a symbol"),Er().s[r]}function xr(r){r=wr[r];return r?Or[r]=Or[r]||F(t+"."+r):void 0}var Nr,Fr,Ar=l(function(){return d(Symbol)},!1),A=j(t),s=A&&l(function(){return A["for"]},null),P=A&&l(function(){return A.keyFor},null);function Pr(r){return A=!1===r?j(t,r):A,Ar&&A}function k(r,n){var t=wr[r];return A?A[t||r]:n?null:xr(r)}function kr(r){return!!r&&g(r.next)}function D(r,n){var t=b(r);return t+": "+("[object Error]"===t?"{ stack: '"+r.stack+"', message: '"+r.message+"', name: '"+r.name+"'":n?J(n)?JSON.stringify(r,null,n):JSON.stringify(r,null,n?4:0):JSON.stringify(r))}function _(e){return function(r){for(var n=[],t=1;t<arguments.length;t++)n[t-1]=arguments[t];if((r||r===o)&&r[e])return r[e].apply(r,n);I("'"+e+"' not defined for "+D(r))}}function Dr(r,n){return(e.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(t,r){O(r,function(r,n){t[r]=n})})(r,n)}function _r(r,n){var t,e,o=Error;function u(){this.constructor=t}return r=r,Dr(t=function(){var r=this,r=o.apply(r,arguments)||r;return n&&n(r,arguments),r},e=o),(u[i]=e[i]).name=r,t[i]=new u,t}function Kr(r){throw new(Nr=Nr||_r("UnsupportedError"))(r)}function Wr(n,r){return T(r,function(r){mr(n,r)}),n}rn("isSymbol",y("symbol")),rn("symbolFor",s||Tr),rn("symbolKeyFor",P||Ir),rn("arrIndexOf",_(L)),rn("arrMap",_("map")),rn("arrReduce",_("reduce")),rn("getLength",(Fr=a,function(r){return r[Fr]}));var Rr=e.defineProperty;function Mr(r,n,t){if(Rr)return Rr(r,n,t),r;Kr("Unable to define property ["+b(n)+"] on "+D(r))}function Ur(r,n,t,e){e={enumerable:!0,configurable:!!v(e)||e};return g(t)?e.get=t:e[f]=t,Mr(r,n,e)}function Cr(r,n,t,e,o){if(Rr)try{var u={enumerable:!0,configurable:!!v(o)||o};return t&&(u.get=t),e&&(u.set=e),Mr(r,n,u)}catch(i){Kr("Unable to define accessors for ["+b(n)+"] on "+D(r))}}function Lr(r,n){return r[k(3)]=function(){return Br(n)},r}function Br(e){var o=!1;function u(){return e.v}var r={next:function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];o=o||!e.n||e.n(r),(t={})[c]=o;var t;return o||Ur(t,f,u),t}};return e.r&&(r["return"]=function(r){var n={};return n[c]=!0,n[f]=e.r&&e.r(r),n}),e.t&&(r["throw"]=function(r){var n={};return n[c]=!0,n[f]=e.t&&e.t(r),n}),r}var zr=rn("mathFloor",u.floor),Gr=rn("mathCeil",u.ceil),Hr=(rn("mathMin",u.min),rn("mathMax",u.max)),Jr=rn("mathTrunc",u.trunc||function(r){r=+r;return(0<r?zr:Gr)(r)});function Vr(r,n){var t=+r;return t==Infinity&&n&&yr("invalid value ["+D(r)+"]"),t!=t||0==t?0:Jr(t)}var s=e.create,$r=(rn("objCreate",s||function(r){if(!r)return{};var n=typeof r;if(n===M||n==R)return t[i]=r,new t;function t(){}throw new TypeError("Prototype must be an Object or function: "+D(r))}),rn("strSlice",_("slice"))),K=rn("strSubstring",_("substring"));function qr(r,n,t){return m(r)&&I("'polyStrSubstr called with invalid "+D(r)),t<0?o:((n=n||0)<0&&(n=Hr(n+r[a],0)),v(t)?$r(r,n):$r(r,n,n+t))}rn("strSubstr",r.substr?_("substr"):qr);var P="endsWith",Qr=(rn("strEndsWith",r[P]?_(P):function(r,n,t){h(r)||I("'"+D(r)+"' is not a string");var n=h(n)?n:""+n,e=n[a],o=r[a],t=!v(t)&&t<o?t:o;return K(r,t-e,t)===n}),rn("strIndexOf",_(L)),rn("strLastIndexOf",_("lastIndexOf")),rn("strRepeat",r.repeat?_("repeat"):function(r,n){m(r)&&I("can't convert ["+D(r)+"]"),(n=Vr(n,!0))<0&&yr("invalid count must be >= 0 && < Infinity");for(var t=h(r)?r:""+r,e=o;0<n;(n>>>=1)&&(t+=t))1&n&&(e+=t);return e})),u="padStart";function Xr(r,n,t){var e=o,r=(n=Vr(n,!0),r[a]);return r<(n>>=0)&&(e=(n-=r)>(e=m(t)?" ":""+t)[a]?Qr(e,Gr(n/e[a])):e)[a]>n?K(e,0,n):e}rn("strPadStart",r[u]?_(u):function(r,n,t){return Xr(r,n,t)+r}),rn("strPadEnd",r.padEnd?_("padEnd"):function(r,n,t){return r+Xr(r,n,t)});s="startsWith";function Yr(n){return function(r){return m(r)&&I("strTrim called ["+D(r)+"]"),r&&r.replace?r.replace(n,""):r}}rn("strStartsWith",r[s]?_(s):function(r,n,t){h(r)||I("'"+D(r)+"' is not a string");var n=h(n)?n:""+n,e=n[a],t=0<t?t:0;return K(r,t,t+e)===n});var P=rn("polyStrTrim",Yr(/^\s+|(?=\s)\s+$/g)),L=rn("polyStrTrimStart",Yr(/^\s+/g)),u=rn("polyStrTrimEnd",Yr(/(?=\s)\s+$/g)),s="trimStart",Zr="trimEnd",P=(rn("strTrim",r.trim?_("trim"):P),rn("strTrimStart",r[s]?_(s):L)),s=(rn("strTrimLeft",P),rn("strTrimEnd",r[Zr]?_(Zr):u));rn("strTrimRight",s)}}});
//# sourceMappingURL=ts-utils.min.js.map
/*!
* NevWare21 - ts-utils, 0.4.1
* NevWare21 - ts-utils, 0.4.2
* https://github.com/nevware21/ts-utils

@@ -13,2 +13,3 @@ * Copyright (c) NevWare21 and contributors. All rights reserved.

var UNDEF_VALUE = undefined;
var EMPTY = "";

@@ -27,5 +28,9 @@ var BOOLEAN = "boolean";

var LAST_INDEX_OF = "lastIndexOf";
var LENGTH = "length";
var DONE = "done";
var VALUE = "value";
var ObjClass = Object;
var ObjProto = ObjClass[PROTOTYPE];
var StrProto = String[PROTOTYPE];
var StrCls = String;
var StrProto = StrCls[PROTOTYPE];
var MathCls = Math;

@@ -74,3 +79,3 @@ var ArrCls = Array;

function isDefined(arg) {
return !!arg || arg !== undefined;
return !!arg || arg !== UNDEF_VALUE;
}

@@ -197,3 +202,3 @@ var isString = _createIs(STRING);

if (arr) {
var len = arr.length;
var len = arr[LENGTH];
for (var idx = 0; idx < len; idx++) {

@@ -385,3 +390,3 @@ if (idx in arr) {

function isIterable(value) {
return !isStrictNullOrUndefined(value) && (hasSymbol() ? isFunction(value[getKnownSymbol(3)]) : isIterator(value));
return !isStrictNullOrUndefined(value) && isFunction(value[getKnownSymbol(3)]);
}

@@ -396,4 +401,4 @@

var value = elms.next();
while (!value.done) {
target.push(value.value);
while (!value[DONE]) {
target.push(value[VALUE]);
value = elms.next();

@@ -443,2 +448,7 @@ }

}
function _unwrapProp(propName) {
return function (thisArg) {
return thisArg[propName];
};
}

@@ -513,2 +523,4 @@ var arrIndexOf = _unwrapFunction(INDEX_OF);

var getLength = _unwrapProp(LENGTH);
function getIntValue(value, defValue) {

@@ -540,3 +552,3 @@ if (!isNullOrUndefined(value)) {

if (isArray(value)) {
result = value.length > 0;
result = value[LENGTH] > 0;
}

@@ -551,3 +563,3 @@ else if (isDate(value)) {

try {
var chkValue = _checkLength(value, ["length", "byteLength", "size", "count"]);
var chkValue = _checkLength(value, [LENGTH, "byteLength", "size", "count"]);
if (isBoolean(chkValue)) {

@@ -562,3 +574,3 @@ return chkValue;

}
return !!objKeys(value).length;
return !!objKeys(value)[LENGTH];
}

@@ -575,35 +587,2 @@ else {

var mathFloor = MathCls.floor;
var mathCeil = MathCls.ceil;
var _mathTrunc = MathCls.trunc;
var mathTrunc = _mathTrunc ? _mathTrunc : polyMathTrunc;
function polyMathTrunc(value) {
var theValue = +value;
return (theValue > 0 ? mathFloor : mathCeil)(theValue);
}
function mathToInt(value, throwInfinity) {
var result = +value;
if (result == Infinity && throwInfinity) {
throwRangeError("invalid value [" + dumpObj(value) + "]");
}
return result !== result || result === 0 ? 0 : mathTrunc(result);
}
var _objCreate = ObjClass["create"];
var objCreate = _objCreate ? _objCreate : polyObjCreate;
function polyObjCreate(obj) {
if (!obj) {
return {};
}
var type = typeof obj;
if (type !== OBJECT && type !== FUNCTION) {
throw new TypeError("Prototype must be an Object or function: " + dumpObj(obj));
}
function tempFunc() { }
tempFunc[PROTOTYPE] = obj;
return new tempFunc();
}
var _objDefineProperty = ObjClass["defineProperty"];

@@ -626,3 +605,3 @@ function objDefineProp(target, key, descriptor) {

else {
desc.value = value;
desc[VALUE] = value;
}

@@ -652,2 +631,204 @@ return objDefineProp(target, key, desc);

function createIterable(ctx) {
return makeIterable({}, ctx);
}
function makeIterable(target, ctx) {
var itSymbol = getKnownSymbol(3);
function _createIterator() {
return createIterator(ctx);
}
target[itSymbol] = _createIterator;
return target;
}
function createIterator(ctx) {
var isDone = false;
function _value() {
return ctx.v;
}
function _next() {
var _a;
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
isDone = isDone || (ctx.n ? ctx.n(args) : true);
var result = (_a = {},
_a[DONE] = isDone,
_a);
if (!isDone) {
objDefineGet(result, VALUE, _value);
}
return result;
}
function _return(value) {
var _a;
return _a = {},
_a[DONE] = true,
_a[VALUE] = ctx.r && ctx.r(value),
_a;
}
function _throw(e) {
var _a;
return _a = {},
_a[DONE] = true,
_a[VALUE] = ctx.t && ctx.t(e),
_a;
}
var theIterator = {
next: _next
};
if (ctx.r) {
theIterator.return = _return;
}
if (ctx.t) {
theIterator.throw = _throw;
}
return theIterator;
}
function createArrayIterator(values) {
var idx = -1;
var theValues = values ? values.slice() : [];
var len = theValues[LENGTH];
function _value() {
if (idx >= 0 && idx < len) {
return theValues[idx];
}
}
function _getNext() {
idx++;
return idx >= len;
}
var ctx = {
n: _getNext
};
objDefineAccessors(ctx, "v", _value);
return createIterator(ctx);
}
function iterForOf(iter, callbackfn, thisArg) {
if (iter) {
if (!isIterator(iter)) {
var itSymbol = getKnownSymbol(3);
iter = iter[itSymbol] ? iter[itSymbol]() : null;
}
if (isIterator(iter)) {
try {
var count = 0;
var value = iter.next();
while (!value[DONE]) {
if (callbackfn.call(thisArg || iter, value[VALUE], count, iter) === -1) {
break;
}
count++;
value = iter.next();
}
iter.return && iter.return(value);
}
catch (e) {
iter.throw && iter.throw(e);
}
}
}
}
function createRangeIterator(start, end, step) {
var nextValue = start;
var theValue = UNDEF_VALUE;
if (isNullOrUndefined(end)) {
end = start;
}
var theStep = step || ((start <= end) ? 1 : -1);
function _value() {
return theValue;
}
function _getNext() {
var isDone = false;
if (theStep > 0) {
isDone = nextValue > end;
}
else {
isDone = nextValue < end;
}
if (!isDone) {
theValue = nextValue;
nextValue += theStep;
}
return isDone;
}
var ctx = {
n: _getNext
};
objDefineAccessors(ctx, "v", _value);
return createIterator(ctx);
}
var mathFloor = MathCls.floor;
var mathCeil = MathCls.ceil;
var mathMin = MathCls.min;
var mathMax = MathCls.max;
var _mathTrunc = MathCls.trunc;
var mathTrunc = _mathTrunc ? _mathTrunc : polyMathTrunc;
function polyMathTrunc(value) {
var theValue = +value;
return (theValue > 0 ? mathFloor : mathCeil)(theValue);
}
function mathToInt(value, throwInfinity) {
var result = +value;
if (result == Infinity && throwInfinity) {
throwRangeError("invalid value [" + dumpObj(value) + "]");
}
return result !== result || result === 0 ? 0 : mathTrunc(result);
}
var _objCreate = ObjClass["create"];
var objCreate = _objCreate ? _objCreate : polyObjCreate;
function polyObjCreate(obj) {
if (!obj) {
return {};
}
var type = typeof obj;
if (type !== OBJECT && type !== FUNCTION) {
throw new TypeError("Prototype must be an Object or function: " + dumpObj(obj));
}
function tempFunc() { }
tempFunc[PROTOTYPE] = obj;
return new tempFunc();
}
var strSlice = _unwrapFunction("slice");
var SUB_STR = "substr";
var strSubstring = _unwrapFunction("substring");
var strSubstr = StrProto[SUB_STR] ? _unwrapFunction(SUB_STR) : polyStrSubstr;
function polyStrSubstr(value, start, length) {
if (isNullOrUndefined(value)) {
throwTypeError("'polyStrSubstr called with invalid " + dumpObj(value));
}
if (length < 0) {
return EMPTY;
}
start = start || 0;
if (start < 0) {
start = mathMax(start + value[LENGTH], 0);
}
if (isUndefined(length)) {
return strSlice(value, start);
}
return strSlice(value, start, start + length);
}
function strLeft(value, count) {
return strSubstring(value, 0, count);
}
function strRight(value, count) {
var len = value[LENGTH];
if (count <= 0) {
return EMPTY;
}
return len > count ? strSubstring(value, len - count) : value;
}
var ENDS_WITH = "endsWith";

@@ -660,6 +841,6 @@ var strEndsWith = StrProto[ENDS_WITH] ? _unwrapFunction(ENDS_WITH) : polyStrEndsWith;

var searchValue = isString(searchString) ? searchString : "" + searchString;
var chkLen = searchValue.length;
var len = value.length;
var chkLen = searchValue[LENGTH];
var len = value[LENGTH];
var end = !isUndefined(length) && length < len ? length : len;
return value.substring(end - chkLen, end) === searchValue;
return strSubstring(value, end - chkLen, end) === searchValue;
}

@@ -709,11 +890,11 @@

targetLength >>= 0;
var len = value.length;
var len = value[LENGTH];
if (len < targetLength) {
result = isNullOrUndefined(padString) ? " " : "" + padString;
targetLength = targetLength - len;
if (targetLength > result.length) {
result = strRepeat(result, mathCeil(targetLength / result.length));
if (targetLength > result[LENGTH]) {
result = strRepeat(result, mathCeil(targetLength / result[LENGTH]));
}
if (result.length > targetLength) {
result = result.substring(0, targetLength);
if (result[LENGTH] > targetLength) {
result = strSubstring(result, 0, targetLength);
}

@@ -732,4 +913,2 @@ }

var strSlice = _unwrapFunction("slice");
var STARTS_WITH = "startsWith";

@@ -742,5 +921,5 @@ var strStartsWith = StrProto[STARTS_WITH] ? _unwrapFunction(STARTS_WITH) : polyStrStartsWith;

var searchValue = isString(searchString) ? searchString : "" + searchString;
var chkLen = searchValue.length;
var chkLen = searchValue[LENGTH];
var pos = position > 0 ? position : 0;
return value.substring(pos, pos + chkLen) === searchValue;
return strSubstring(value, pos, pos + chkLen) === searchValue;
}

@@ -797,2 +976,3 @@

exports.arrReduce = arrReduce;
exports.createArrayIterator = createArrayIterator;
exports.createCustomError = createCustomError;

@@ -802,2 +982,5 @@ exports.createEnum = createEnum;

exports.createEnumValueMap = createEnumValueMap;
exports.createIterable = createIterable;
exports.createIterator = createIterator;
exports.createRangeIterator = createRangeIterator;
exports.createSimpleMap = createSimpleMap;

@@ -813,2 +996,3 @@ exports.createTypeMap = createTypeMap;

exports.getKnownSymbol = getKnownSymbol;
exports.getLength = getLength;
exports.getNavigator = getNavigator;

@@ -851,4 +1035,8 @@ exports.getSymbol = getSymbol;

exports.isWebWorker = isWebWorker;
exports.iterForOf = iterForOf;
exports.makeIterable = makeIterable;
exports.mathCeil = mathCeil;
exports.mathFloor = mathFloor;
exports.mathMax = mathMax;
exports.mathMin = mathMin;
exports.mathToInt = mathToInt;

@@ -877,2 +1065,3 @@ exports.mathTrunc = mathTrunc;

exports.polyObjKeys = polyObjKeys;
exports.polyStrSubstr = polyStrSubstr;
exports.polyStrTrim = polyStrTrim;

@@ -888,7 +1077,11 @@ exports.polyStrTrimEnd = polyStrTrimEnd;

exports.strLastIndexOf = strLastIndexOf;
exports.strLeft = strLeft;
exports.strPadEnd = strPadEnd;
exports.strPadStart = strPadStart;
exports.strRepeat = strRepeat;
exports.strRight = strRight;
exports.strSlice = strSlice;
exports.strStartsWith = strStartsWith;
exports.strSubstr = strSubstr;
exports.strSubstring = strSubstring;
exports.strTrim = strTrim;

@@ -895,0 +1088,0 @@ exports.strTrimEnd = strTrimEnd;

/*!
* NevWare21 - ts-utils, 0.4.1
* NevWare21 - ts-utils, 0.4.2
* https://github.com/nevware21/ts-utils

@@ -7,3 +7,3 @@ * Copyright (c) NevWare21 and contributors. All rights reserved.

*/
var n=this,r=function(n){"use strict";var o="",W="function",U="object",u="prototype",r="undefined",M="hasOwnProperty",t="Symbol",R="_polyfill",e="indexOf",i=Object,C=i[u],f=String[u],a=Math,c=Array,B=c[u];function s(n,r){try{r=n()}catch(t){}return r}function l(r){return function(n){return typeof n===r}}function p(r){return function(n){return!(!n||y(n)!==r)}}function y(n){return C.toString.call(n)}function b(n){return typeof n===r||n===r}function d(n){return null===n||b(n)}function z(n){return null===n||!h(n)}function h(n){return!!n||n!==undefined}var g=l("string"),m=l(W);function v(n){return!d(n)&&!!n&&typeof n===U}var w=c.isArray,G=p("[object Date]"),S=l("number"),j=l("boolean"),c=p("[object RegExp]"),L=p("[object File]"),H=p("[object FormData]"),J=p("[object Blob]"),V=p("[object ArrayBuffer]"),$=p("[object Error]");function q(n){return!!n&&m(n.then)}function Q(n){return!(!n||s(function(){return!(n&&0+n)},!n))}var X="window",Y=null,Z=s(function(){return h(window)},!1),nn=s(function(){return h(document)},!1),rn=s(function(){return h(navigator)},!1),tn=s(function(){return h(history)},!1),en=s(function(){return!!(self&&self instanceof WorkerGlobalScope)},!1),on=s(function(){return!(!process||!(process.versions||{}).node)},!1);function E(n){n=!1===n?null:Y;return n||((n=(n=(n=typeof globalThis!==r?globalThis:n)||typeof self===r?n:self)||typeof window===r?n:window)||typeof global===r||(n=global),Y=n),n}function T(n,r){r=E(r);return r&&r[n]?r[n]:n===X&&Z?window:null}function un(){return nn?document:T("document")}function fn(){return Z?window:T(X)}function an(){return rn?navigator:T("navigator")}function cn(){return tn?history:T("history")}function O(n,r){return n&&C[M].call(n,r)}function I(n,r,t){if(n&&v(n))for(var e in n)if(O(n,e)&&-1===r.call(t||n,e,n[e]))break}function N(n,r,t){if(n)for(var e=n.length,o=0;o<e&&!(o in n&&-1===r.call(t||n,n[o],o,n));o++);}function x(n){throw new TypeError(n)}function sn(n){throw new RangeError(n)}var ln=i.assign,pn=i.freeze;function yn(n){return n}function bn(n){return v(n)&&null!==n||x("objKeys called on non-object"),i.keys(n)}function F(n){var r;return w(n)?(r=[],N(n,function(n){r.push(F(n))}),r):v(n)?dn({},n):n}function dn(t,n){return d(n)||I(n,function(n,r){t[n]=F(r)}),t}function P(n){return pn&&I(n,function(n,r){(w(r)||v(r))&&pn(r)}),hn(n)}var hn=pn||yn,gn=i.seal||yn;function mn(n){var t={};return I(n,function(n,r){t[n]=n,t[r]=n}),P(t)}function vn(n){var t={};return I(n,function(n,r){t[n]=r[1],t[r[0]]=r[1]}),P(t)}var wn,Sn=mn({asyncIterator:0,hasInstance:1,isConcatSpreadable:2,iterator:3,match:4,matchAll:5,replace:6,search:7,species:8,split:9,toPrimitive:10,toStringTag:11,unscopables:12}),jn="__polySymbols$ts_utils";function En(){var n;return wn||(n=E(),wn=n[jn]=n[jn]||{k:{},s:{}}),wn}var Tn={};function _(n){var r={description:""+n,toString:function(){return t+"("+n+")"}};return r[R]=!0,r}function On(n){var r,t=En();return O(t,n)||(r=_(n),t.k[n]=r,t.s[r]=""+n),t.k[n]}function In(n){return!d(n)&&"null"!=n||x(n+" is not a symbol"),En().s[n]}function Nn(n){n=Sn[n];return n?Tn[n]=Tn[n]||_(t+"."+n):void 0}var xn=s(function(){return h(Symbol)},!1),A=T(t),Fn=l("symbol");function Pn(n){return!!_n(n)}function _n(n){return A=!1===n?T(t,n):A,xn&&A}function An(n,r){var t=Sn[n];return A?A[t||n]:r?null:Nn(n)}var Dn=A&&s(function(){return A["for"]},null)||On,kn=A&&s(function(){return A.keyFor},null)||In;function Kn(n){return!!n&&m(n.next)}function D(n,r){var t=y(n);return t+": "+("[object Error]"===t?"{ stack: '"+n.stack+"', message: '"+n.message+"', name: '"+n.name+"'":r?S(r)?JSON.stringify(n,null,r):JSON.stringify(n,null,r?4:0):JSON.stringify(n))}function k(e){return function(n){for(var r=[],t=1;t<arguments.length;t++)r[t-1]=arguments[t];if((n||n===o)&&n[e])return n[e].apply(n,r);x("'"+e+"' not defined for "+D(n))}}var Wn,Un=k(e),Mn=k("map"),Rn=k("reduce");function Cn(n,r){return(i.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(t,n){I(n,function(n,r){t[n]=r})})(n,r)}function Bn(n,r){var t,e,o=Error;function i(){this.constructor=t}return n=n,Cn(t=function(){var n=this,n=o.apply(n,arguments)||n;return r&&r(n,arguments),n},e=o),(i[u]=e[u]).name=n,t[u]=new i,t}function zn(n){throw new(Wn=Wn||Bn("UnsupportedError"))(n)}function Gn(r,n){return N(n,function(n){dn(r,n)}),r}var Ln=a.floor,Hn=a.ceil,Jn=a.trunc||function(n){n=+n;return(0<n?Ln:Hn)(n)};function Vn(n,r){var t=+n;return t==Infinity&&r&&sn("invalid value ["+D(n)+"]"),t!=t||0==t?0:Jn(t)}var a=i.create||function(n){if(!n)return{};var r=typeof n;if(r===U||r==W)return t[u]=n,new t;function t(){}throw new TypeError("Prototype must be an Object or function: "+D(n))},$n=i.defineProperty;function qn(n,r,t){if($n)return $n(n,r,t),n;zn("Unable to define property ["+y(r)+"] on "+D(n))}var Qn="endsWith",Qn=f[Qn]?k(Qn):function(n,r,t){g(n)||x("'"+D(n)+"' is not a string");var r=g(r)?r:""+r,e=r.length,o=n.length,t=!b(t)&&t<o?t:o;return n.substring(t-e,t)===r},e=k(e),Xn=k("lastIndexOf"),Yn=f.repeat?k("repeat"):function(n,r){d(n)&&x("can't convert ["+D(n)+"]"),(r=Vn(r,!0))<0&&sn("invalid count must be >= 0 && < Infinity");for(var t=g(n)?n:""+n,e=o;0<r;(r>>>=1)&&(t+=t))1&r&&(e+=t);return e},Zn="padStart";function nr(n,r,t){var e=o,n=(r=Vn(r,!0),n.length);return n<(r>>=0)&&(e=(r-=n)>(e=d(t)?" ":""+t).length?Yn(e,Hn(r/e.length)):e).length>r?e.substring(0,r):e}var Zn=f[Zn]?k(Zn):function(n,r,t){return nr(n,r,t)+n},rr=f.padEnd?k("padEnd"):function(n,r,t){return n+nr(n,r,t)},tr=k("slice"),er="startsWith",er=f[er]?k(er):function(n,r,t){g(n)||x("'"+D(n)+"' is not a string");var r=g(r)?r:""+r,e=r.length,t=0<t?t:0;return n.substring(t,t+e)===r};function or(r){return function(n){return d(n)&&x("strTrim called ["+D(n)+"]"),n&&n.replace?n.replace(r,""):n}}var ir=or(/^\s+|(?=\s)\s+$/g),ur=or(/^\s+/g),fr=or(/(?=\s)\s+$/g),K="trimStart",ar="trimEnd",cr=f.trim?k("trim"):ir,K=f[K]?k(K):ur,sr=K,f=f[ar]?k(ar):fr,ar=f;n.arrAppend=function(n,r){if(!b(r)&&n)if(w(r))B.push.apply(n,r);else if(Kn(r))for(var t=r.next();!t.done;)n.push(t.value),t=r.next();else n.push(r);return n},n.arrForEach=N,n.arrIndexOf=Un,n.arrMap=Mn,n.arrReduce=Rn,n.createCustomError=Bn,n.createEnum=function(n){var t={};return I(n,function(n,r){t[n]=r,t[r]=n}),P(t)},n.createEnumKeyMap=mn,n.createEnumValueMap=function(n){var t={};return I(n,function(n,r){t[n]=r,t[r]=r}),P(t)},n.createSimpleMap=vn,n.createTypeMap=vn,n.deepExtend=function(n){for(var r=[],t=1;t<arguments.length;t++)r[t-1]=arguments[t];return Gn(F(n)||{},r)},n.dumpObj=D,n.getDocument=un,n.getGlobal=E,n.getHistory=cn,n.getInst=T,n.getIntValue=function(n,r){if(d(n))return r;if(S(n))return n;n=parseInt(n,10);return isNaN(n)?r:n},n.getKnownSymbol=An,n.getNavigator=an,n.getSymbol=_n,n.getWindow=fn,n.hasDocument=function(){return!!un()},n.hasHistory=function(){return!!cn()},n.hasNavigator=function(){return!!an()},n.hasSymbol=Pn,n.hasValue=function(n){return function f(n,r){var t,e,o=!1===n||0===n;if(!o&&!d(n))if(w(n))o=0<n.length;else if(G(n))o=!isNaN(n.getTime());else{if(j(n))return!0;if(v(n)){try{t=n,N(["length","byteLength","size","count"],function(n){if(n in t)return n=t[n],e=0<(m(n)?n():n),-1});var i=e;if(j(i))return i;if(m(n.valueOf)&&r<5)return f(n.valueOf(),++r)}catch(u){}return!!bn(n).length}o=Q(n)}return o}(n,0)},n.hasWindow=function(){return!!fn()},n.isArray=w,n.isArrayBuffer=V,n.isBlob=J,n.isBoolean=j,n.isDate=G,n.isDefined=h,n.isError=$,n.isFile=L,n.isFormData=H,n.isFunction=m,n.isIterable=function(n){return!z(n)&&(Pn()?m(n[An(3)]):Kn(n))},n.isIterator=Kn,n.isNode=function(){return on},n.isNotTruthy=function(n){return!n||!s(function(){return n&&0+n},n)},n.isNullOrUndefined=d,n.isNumber=S,n.isObject=v,n.isPromise=function(n){return q(n)&&m(n["catch"])},n.isPromiseLike=q,n.isRegExp=c,n.isStrictNullOrUndefined=z,n.isStrictUndefined=function(n){return!h(n)},n.isString=g,n.isSymbol=Fn,n.isTruthy=Q,n.isTypeof=function(n,r){return typeof n===r},n.isUndefined=b,n.isWebWorker=function(){return en},n.mathCeil=Hn,n.mathFloor=Ln,n.mathToInt=Vn,n.mathTrunc=Jn,n.newSymbol=function(n,r){return xn?Symbol(n):r?null:_(n)},n.objAssign=ln,n.objCopyProps=dn,n.objCreate=a,n.objDeepCopy=F,n.objDeepFreeze=P,n.objDefineAccessors=function(n,r,t,e,o){if($n)try{var i={enumerable:!0,configurable:!!b(o)||o};return t&&(i.get=t),e&&(i.set=e),qn(n,r,i)}catch(u){zn("Unable to define accessors for ["+y(r)+"] on "+D(n))}},n.objDefineGet=function(n,r,t,e){e={enumerable:!0,configurable:!!b(e)||e};return m(t)?e.get=t:e.value=t,qn(n,r,e)},n.objDefineProp=qn,n.objExtend=function(n){for(var r=[],t=1;t<arguments.length;t++)r[t-1]=arguments[t];return Gn(n||{},r)},n.objForEachKey=I,n.objFreeze=hn,n.objHasOwnProperty=O,n.objKeys=bn,n.objSeal=gn,n.objSetPrototypeOf=Cn,n.objToString=y,n.polyGetKnownSymbol=Nn,n.polyIsArray=function(n){return!d(n)&&"[object Array]"===y(n)},n.polyNewSymbol=_,n.polyObjKeys=function(n){if(!v(n)||null===n)throw new TypeError("polyObjKeys called on non-object");var r,t=[];for(r in n)O(n,r)&&t.push(r);return t},n.polyStrTrim=ir,n.polyStrTrimEnd=fr,n.polyStrTrimStart=ur,n.polySymbolFor=On,n.polySymbolKeyFor=In,n.strEndsWith=Qn,n.strIndexOf=e,n.strIsNullOrEmpty=function(n){return g(n)?n===o:d(n)},n.strIsNullOrWhiteSpace=function(n){return g(n)?n.replace(/[\s\t\r\n\f]+/g,o)===o:d(n)},n.strLastIndexOf=Xn,n.strPadEnd=rr,n.strPadStart=Zn,n.strRepeat=Yn,n.strSlice=tr,n.strStartsWith=er,n.strTrim=cr,n.strTrimEnd=f,n.strTrimLeft=sr,n.strTrimRight=ar,n.strTrimStart=K,n.symbolFor=Dn,n.symbolKeyFor=kn,n.throwError=function(n){throw Error(n)},n.throwRangeError=sn,n.throwTypeError=x,n.throwUnsupported=zn,Object.defineProperty(n,"__esModule",{value:!0})};"object"==typeof exports&&"undefined"!=typeof module?r(exports):"function"==typeof define&&define.amd?define(["exports"],r):r(((n="undefined"!=typeof globalThis?globalThis:n||self).nevware21=n.nevware21||{},n.nevware21["ts-utils"]={}));
var n=this,r=function(n){"use strict";var W=undefined,o="",M="function",R="object",i="prototype",r="undefined",U="hasOwnProperty",t="Symbol",C="_polyfill",L="indexOf",f="length",B="done",a="value",e=Object,z=e[i],u=String[i],c=Math,G=Array,H=G[i];function s(n,r){try{r=n()}catch(t){}return r}function l(r){return function(n){return typeof n===r}}function p(r){return function(n){return!(!n||y(n)!==r)}}function y(n){return z.toString.call(n)}function b(n){return typeof n===r||n===r}function d(n){return null===n||b(n)}function J(n){return null===n||!v(n)}function v(n){return!!n||n!==W}var m=l("string"),h=l(M);function g(n){return!d(n)&&!!n&&typeof n===R}var w=G.isArray,V=p("[object Date]"),$=l("number"),q=l("boolean"),G=p("[object RegExp]"),Q=p("[object File]"),X=p("[object FormData]"),Y=p("[object Blob]"),Z=p("[object ArrayBuffer]"),nn=p("[object Error]");function rn(n){return!!n&&h(n.then)}function tn(n){return!(!n||s(function(){return!(n&&0+n)},!n))}var en=null,on=s(function(){return v(window)},!1),un=s(function(){return v(document)},!1),an=s(function(){return v(navigator)},!1),fn=s(function(){return v(history)},!1),cn=s(function(){return!!(self&&self instanceof WorkerGlobalScope)},!1),sn=s(function(){return!(!process||!(process.versions||{}).node)},!1);function ln(n){n=!1===n?null:en;return n||((n=(n=(n=typeof globalThis!==r?globalThis:n)||typeof self===r?n:self)||typeof window===r?n:window)||typeof global===r||(n=global),en=n),n}function S(n,r){r=ln(r);return r&&r[n]?r[n]:"window"===n&&on?window:null}function pn(){return un?document:S("document")}function yn(){return on?window:S("window")}function bn(){return an?navigator:S("navigator")}function dn(){return fn?history:S("history")}function j(n,r){return n&&z[U].call(n,r)}function E(n,r,t){if(n&&g(n))for(var e in n)if(j(n,e)&&-1===r.call(t||n,e,n[e]))break}function O(n,r,t){if(n)for(var e=n[f],o=0;o<e&&!(o in n&&-1===r.call(t||n,n[o],o,n));o++);}function T(n){throw new TypeError(n)}function vn(n){throw new RangeError(n)}var mn=e.assign,hn=e.freeze;function gn(n){return n}function wn(n){return g(n)&&null!==n||T("objKeys called on non-object"),e.keys(n)}function I(n){var r;return w(n)?(r=[],O(n,function(n){r.push(I(n))}),r):g(n)?Sn({},n):n}function Sn(t,n){return d(n)||E(n,function(n,r){t[n]=I(r)}),t}function x(n){return hn&&E(n,function(n,r){(w(r)||g(r))&&hn(r)}),jn(n)}var jn=hn||gn,En=e.seal||gn;function On(n){var t={};return E(n,function(n,r){t[n]=n,t[r]=n}),x(t)}function Tn(n){var t={};return E(n,function(n,r){t[n]=r[1],t[r[0]]=r[1]}),x(t)}var In,xn=On({asyncIterator:0,hasInstance:1,isConcatSpreadable:2,iterator:3,match:4,matchAll:5,replace:6,search:7,species:8,split:9,toPrimitive:10,toStringTag:11,unscopables:12}),Nn="__polySymbols$ts_utils";function Fn(){var n;return In||(n=ln(),In=n[Nn]=n[Nn]||{k:{},s:{}}),In}var Pn={};function N(n){var r={description:""+n,toString:function(){return t+"("+n+")"}};return r[C]=!0,r}function _n(n){var r,t=Fn();return j(t,n)||(r=N(n),t.k[n]=r,t.s[r]=""+n),t.k[n]}function An(n){return!d(n)&&"null"!=n||T(n+" is not a symbol"),Fn().s[n]}function kn(n){n=xn[n];return n?Pn[n]=Pn[n]||N(t+"."+n):void 0}var Dn=s(function(){return v(Symbol)},!1),F=S(t),Kn=l("symbol");function Wn(n){return F=!1===n?S(t,n):F,Dn&&F}function P(n,r){var t=xn[n];return F?F[t||n]:r?null:kn(n)}var Mn=F&&s(function(){return F["for"]},null)||_n,Rn=F&&s(function(){return F.keyFor},null)||An;function _(n){return!!n&&h(n.next)}function A(n,r){var t=y(n);return t+": "+("[object Error]"===t?"{ stack: '"+n.stack+"', message: '"+n.message+"', name: '"+n.name+"'":r?$(r)?JSON.stringify(n,null,r):JSON.stringify(n,null,r?4:0):JSON.stringify(n))}function k(e){return function(n){for(var r=[],t=1;t<arguments.length;t++)r[t-1]=arguments[t];if((n||n===o)&&n[e])return n[e].apply(n,r);T("'"+e+"' not defined for "+A(n))}}var Un,Cn=k(L),Ln=k("map"),Bn=k("reduce");function zn(n,r){return(e.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(t,n){E(n,function(n,r){t[n]=r})})(n,r)}function Gn(n,r){var t,e,o=Error;function u(){this.constructor=t}return n=n,zn(t=function(){var n=this,n=o.apply(n,arguments)||n;return r&&r(n,arguments),n},e=o),(u[i]=e[i]).name=n,t[i]=new u,t}function Hn(n){throw new(Un=Un||Gn("UnsupportedError"))(n)}function Jn(r,n){return O(n,function(n){Sn(r,n)}),r}var Vn=e.defineProperty;function $n(n,r,t){if(Vn)return Vn(n,r,t),n;Hn("Unable to define property ["+y(r)+"] on "+A(n))}function qn(n,r,t,e){e={enumerable:!0,configurable:!!b(e)||e};return h(t)?e.get=t:e[a]=t,$n(n,r,e)}function Qn(n,r,t,e,o){if(Vn)try{var u={enumerable:!0,configurable:!!b(o)||o};return t&&(u.get=t),e&&(u.set=e),$n(n,r,u)}catch(i){Hn("Unable to define accessors for ["+y(r)+"] on "+A(n))}}function Xn(n,r){return n[P(3)]=function(){return D(r)},n}function D(e){var o=!1;function u(){return e.v}var n={next:function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];o=o||!e.n||e.n(n),(t={})[B]=o;var t;return o||qn(t,a,u),t}};return e.r&&(n["return"]=function(n){var r={done:!0};return r[a]=e.r&&e.r(n),r}),e.t&&(n["throw"]=function(n){var r={done:!0};return r[a]=e.t&&e.t(n),r}),n}var Yn=c.floor,Zn=c.ceil,nr=c.min,rr=c.max,tr=c.trunc||function(n){n=+n;return(0<n?Yn:Zn)(n)};function er(n,r){var t=+n;return t==Infinity&&r&&vn("invalid value ["+A(n)+"]"),t!=t||0==t?0:tr(t)}var c=e.create||function(n){if(!n)return{};var r=typeof n;if(r===R||r==M)return t[i]=n,new t;function t(){}throw new TypeError("Prototype must be an Object or function: "+A(n))},or=k("slice"),K=k("substring"),ur=u.substr?k("substr"):ir;function ir(n,r,t){return d(n)&&T("'polyStrSubstr called with invalid "+A(n)),t<0?o:((r=r||0)<0&&(r=rr(r+n[f],0)),b(t)?or(n,r):or(n,r,r+t))}var ar="endsWith",ar=u[ar]?k(ar):function(n,r,t){m(n)||T("'"+A(n)+"' is not a string");var r=m(r)?r:""+r,e=r[f],o=n[f],t=!b(t)&&t<o?t:o;return K(n,t-e,t)===r},L=k(L),fr=k("lastIndexOf"),cr=u.repeat?k("repeat"):function(n,r){d(n)&&T("can't convert ["+A(n)+"]"),(r=er(r,!0))<0&&vn("invalid count must be >= 0 && < Infinity");for(var t=m(n)?n:""+n,e=o;0<r;(r>>>=1)&&(t+=t))1&r&&(e+=t);return e},sr="padStart";function lr(n,r,t){var e=o,n=(r=er(r,!0),n[f]);return n<(r>>=0)&&(e=(r-=n)>(e=d(t)?" ":""+t)[f]?cr(e,Zn(r/e[f])):e)[f]>r?K(e,0,r):e}var sr=u[sr]?k(sr):function(n,r,t){return lr(n,r,t)+n},pr=u.padEnd?k("padEnd"):function(n,r,t){return n+lr(n,r,t)},yr="startsWith",yr=u[yr]?k(yr):function(n,r,t){m(n)||T("'"+A(n)+"' is not a string");var r=m(r)?r:""+r,e=r[f],t=0<t?t:0;return K(n,t,t+e)===r};function br(r){return function(n){return d(n)&&T("strTrim called ["+A(n)+"]"),n&&n.replace?n.replace(r,""):n}}var dr=br(/^\s+|(?=\s)\s+$/g),vr=br(/^\s+/g),mr=br(/(?=\s)\s+$/g),hr="trimStart",gr="trimEnd",wr=u.trim?k("trim"):dr,hr=u[hr]?k(hr):vr,Sr=hr,u=u[gr]?k(gr):mr,gr=u;n.arrAppend=function(n,r){if(!b(r)&&n)if(w(r))H.push.apply(n,r);else if(_(r))for(var t=r.next();!t[B];)n.push(t[a]),t=r.next();else n.push(r);return n},n.arrForEach=O,n.arrIndexOf=Cn,n.arrMap=Ln,n.arrReduce=Bn,n.createArrayIterator=function(n){var r=-1,t=n?n.slice():[],e=t[f],n={n:function(){return e<=++r}};return Qn(n,"v",function(){if(0<=r&&r<e)return t[r]}),D(n)},n.createCustomError=Gn,n.createEnum=function(n){var t={};return E(n,function(n,r){t[n]=r,t[r]=n}),x(t)},n.createEnumKeyMap=On,n.createEnumValueMap=function(n){var t={};return E(n,function(n,r){t[n]=r,t[r]=r}),x(t)},n.createIterable=function(n){return Xn({},n)},n.createIterator=D,n.createRangeIterator=function(n,r,t){var e=n,o=W,u=(d(r)&&(r=n),t||(n<=r?1:-1)),t={n:function(){var n;return(n=0<u?r<e:e<r)||(o=e,e+=u),n}};return Qn(t,"v",function(){return o}),D(t)},n.createSimpleMap=Tn,n.createTypeMap=Tn,n.deepExtend=function(n){for(var r=[],t=1;t<arguments.length;t++)r[t-1]=arguments[t];return Jn(I(n)||{},r)},n.dumpObj=A,n.getDocument=pn,n.getGlobal=ln,n.getHistory=dn,n.getInst=S,n.getIntValue=function(n,r){if(d(n))return r;if($(n))return n;n=parseInt(n,10);return isNaN(n)?r:n},n.getKnownSymbol=P,n.getLength=function(n){return n.length},n.getNavigator=bn,n.getSymbol=Wn,n.getWindow=yn,n.hasDocument=function(){return!!pn()},n.hasHistory=function(){return!!dn()},n.hasNavigator=function(){return!!bn()},n.hasSymbol=function(n){return!!Wn(n)},n.hasValue=function(n){return function a(n,r){var t,e,o=!1===n||0===n;if(!o&&!d(n))if(w(n))o=0<n[f];else if(V(n))o=!isNaN(n.getTime());else{if(q(n))return!0;if(g(n)){try{t=n,O([f,"byteLength","size","count"],function(n){if(n in t)return n=t[n],e=0<(h(n)?n():n),-1});var u=e;if(q(u))return u;if(h(n.valueOf)&&r<5)return a(n.valueOf(),++r)}catch(i){}return!!wn(n)[f]}o=tn(n)}return o}(n,0)},n.hasWindow=function(){return!!yn()},n.isArray=w,n.isArrayBuffer=Z,n.isBlob=Y,n.isBoolean=q,n.isDate=V,n.isDefined=v,n.isError=nn,n.isFile=Q,n.isFormData=X,n.isFunction=h,n.isIterable=function(n){return!J(n)&&h(n[P(3)])},n.isIterator=_,n.isNode=function(){return sn},n.isNotTruthy=function(n){return!n||!s(function(){return n&&0+n},n)},n.isNullOrUndefined=d,n.isNumber=$,n.isObject=g,n.isPromise=function(n){return rn(n)&&h(n["catch"])},n.isPromiseLike=rn,n.isRegExp=G,n.isStrictNullOrUndefined=J,n.isStrictUndefined=function(n){return!v(n)},n.isString=m,n.isSymbol=Kn,n.isTruthy=tn,n.isTypeof=function(n,r){return typeof n===r},n.isUndefined=b,n.isWebWorker=function(){return cn},n.iterForOf=function(n,r,t){var e;if(n&&(_(n)||(n=n[e=P(3)]?n[e]():null),_(n)))try{for(var o=0,u=n.next();!u[B]&&-1!==r.call(t||n,u[a],o,n);)o++,u=n.next();n["return"]&&n["return"](u)}catch(i){n["throw"]&&n["throw"](i)}},n.makeIterable=Xn,n.mathCeil=Zn,n.mathFloor=Yn,n.mathMax=rr,n.mathMin=nr,n.mathToInt=er,n.mathTrunc=tr,n.newSymbol=function(n,r){return Dn?Symbol(n):r?null:N(n)},n.objAssign=mn,n.objCopyProps=Sn,n.objCreate=c,n.objDeepCopy=I,n.objDeepFreeze=x,n.objDefineAccessors=Qn,n.objDefineGet=qn,n.objDefineProp=$n,n.objExtend=function(n){for(var r=[],t=1;t<arguments.length;t++)r[t-1]=arguments[t];return Jn(n||{},r)},n.objForEachKey=E,n.objFreeze=jn,n.objHasOwnProperty=j,n.objKeys=wn,n.objSeal=En,n.objSetPrototypeOf=zn,n.objToString=y,n.polyGetKnownSymbol=kn,n.polyIsArray=function(n){return!d(n)&&"[object Array]"===y(n)},n.polyNewSymbol=N,n.polyObjKeys=function(n){if(!g(n)||null===n)throw new TypeError("polyObjKeys called on non-object");var r,t=[];for(r in n)j(n,r)&&t.push(r);return t},n.polyStrSubstr=ir,n.polyStrTrim=dr,n.polyStrTrimEnd=mr,n.polyStrTrimStart=vr,n.polySymbolFor=_n,n.polySymbolKeyFor=An,n.strEndsWith=ar,n.strIndexOf=L,n.strIsNullOrEmpty=function(n){return m(n)?n===o:d(n)},n.strIsNullOrWhiteSpace=function(n){return m(n)?n.replace(/[\s\t\r\n\f]+/g,o)===o:d(n)},n.strLastIndexOf=fr,n.strLeft=function(n,r){return K(n,0,r)},n.strPadEnd=pr,n.strPadStart=sr,n.strRepeat=cr,n.strRight=function(n,r){var t=n[f];return r<=0?o:r<t?K(n,t-r):n},n.strSlice=or,n.strStartsWith=yr,n.strSubstr=ur,n.strSubstring=K,n.strTrim=wr,n.strTrimEnd=u,n.strTrimLeft=Sr,n.strTrimRight=gr,n.strTrimStart=hr,n.symbolFor=Mn,n.symbolKeyFor=Rn,n.throwError=function(n){throw Error(n)},n.throwRangeError=vn,n.throwTypeError=T,n.throwUnsupported=Hn,Object.defineProperty(n,"__esModule",{value:!0})};"object"==typeof exports&&"undefined"!=typeof module?r(exports):"function"==typeof define&&define.amd?define(["exports"],r):r(((n="undefined"!=typeof globalThis?globalThis:n||self).nevware21=n.nevware21||{},n.nevware21["ts-utils"]={}));
//# sourceMappingURL=ts-utils.min.js.map
{
"name": "@nevware21/ts-utils",
"description": "Common JavaScript/TypeScript helper functions for better minification",
"version": "0.4.1",
"version": "0.4.2",
"homepage": "https://github.com/nevware21/ts-utils",

@@ -42,3 +42,46 @@ "license": "MIT",

"ECMAScript 2019",
"ECMAScript 2020"
"ECMAScript 2020",
"getDocument",
"getGlobal",
"getHistory",
"getInst",
"getNavigator",
"getWindow",
"hasDocument",
"hasHistory",
"hasNavigator",
"hasWindow",
"isNode",
"isWebWorker",
"isArray",
"isArrayBuffer",
"isBlob",
"isBoolean",
"isDate",
"isError",
"isFile",
"isFormData",
"isFunction",
"isIterable",
"isIterator",
"isNullOrUndefined",
"isNumber",
"isObject",
"isPromise",
"isPromiseLike",
"isRegExp",
"isStrictNullOrUndefined",
"isStrictUndefined",
"isString",
"isTypeof",
"isUndefined",
"hasValue",
"isDefined",
"isNotTruthy",
"isTruthy",
"string left",
"strLeft",
"string right",
"strRight",
"custom error"
],

@@ -45,0 +88,0 @@ "main": "dist/umd/ts-utils.js",

@@ -15,10 +15,34 @@ <h1 align="center">@nevware21 ts-utils</h1>

Support for standard JavaScript functions (ES5+) that are not support in all environments will be backed by internal polyfill implementations when not available. All of the polyfill functions are tested against the standard native implementations for node, browser and web-worker to ensure compatibility.
Support for standard JavaScript functions (ES5+) that are not support in all environments will be backed by internal polyfill implementations when not available.
### Test Environments
- Node (12, 14, 16)
- Browser (Chromium - headless)
- Web Worker (Chromium - headless)
All of the polyfill functions are tested against the standard native implementations for node, browser and web-worker to ensure compatibility.
### Documentation and details
Documentation [generated from source code](https://nevware21.github.io/ts-utils/typedoc/index.html) via typedoc
See the documentation [generated from source code](https://nevware21.github.io/ts-utils/typedoc/index.html) via typedoc for a full list and details of all of the available types, functions and interfaces.
Some polyfills are provided for simple backward compatability to enable the utility functions in older environments (such as ES3 / IE8), you don't have to use or include the provided polyfils (AND they are NOT exported as part of the main module). If you need them you will need to import the "polyfill" file directly or host and load the provided `bundle/ts-polyfills-utils.min.js` or provide your own alternatives.
See [Browser Support](#browser-support) for details.
| Type | Functions / Helpers / Aliases / Polyfills
|----------------------------|---------------------------------------------------
| Runtime Environment Checks | <code>getDocument(); getGlobal(); getHistory(); getInst(); getNavigator(); getWindow(); hasDocument(); hasHistory(); hasNavigator(); hasWindow(); isNode(); isWebWorker();</code>
| Type Identity | <code>isArray(); isArrayBuffer(); isBlob(); isBoolean(); isDate(); isError(); isFile(); isFormData(); isFunction(); isIterable(); isIterator(); isNullOrUndefined(); isNumber(); isObject(); isPromise(); isPromiseLike(); isRegExp(); isStrictNullOrUndefined(); isStrictUndefined(); isString(); isTypeof(); isUndefined();</code>
| Value Check | <code>hasValue(); isDefined(); isNotTruthy(); isNullOrUndefined(); isStrictNullOrUndefined(); isStrictUndefined(); isTruthy(); isUndefined();</code>
| &nbsp; | &nbsp;
| Array | <code>arrAppend(); arrForEach(); arrIndexOf(); arrMap(); arrReduce(); getLength(); isArray();<br/>polyIsArray</code>
| Enum | <code>createEnum(); createEnumKeyMap(); createEnumValueMap(); createSimpleMap(); createTypeMap();</code>
| Error | <code>createCustomError(); isError(); throwError(); throwRangeError(); throwTypeError(); throwUnsupported();</code>
| Iterator | <code>createArrayIterator(); createIterator(); createIterable(); createRangeIterator(); iterForOf(); isIterable(); isIterator(); makeIterable();</code>
| Math | <code>mathCeil(); mathFloor(); mathMax(); mathMin(); mathToInt(); mathTrunc();</code>
| Object | <code>deepExtend(); isObject(); objAssign(); objCopyProps(); objCreate(); objDeepCopy(); objDeepFreeze(); objDefineAccessors(); objDefineGet(); objDefineProp(); objExtend(); objForEachKey(); objFreeze(); objHasOwnProperty(); objKeys(); objSeal(); objSetPrototypeOf(); objToString();<br/>polyObjKeys</code>
| String | <code>getLength(); isString(); strEndsWith(); strIndexOf(); strIsNullOrEmpty(); strIsNullOrWhiteSpace(); strLastIndexOf(); strLeft(); strPadEnd(); strPadStart(); strRepeat(); strRight(); strSlice(); strStartsWith(); strSubstr(); strSubstring(); strTrim(); strTrimEnd(); strTrimLeft(); strTrimRight(); strTrimStart(); toString();<br/>polyStrSubstr(); polyStrTrim(); polyStrTrimEnd(); polyStrTrimStart();</code>
| Symbol | <code>WellKnownSymbols (const enum);<br/>getKnownSymbol(); getSymbol(); hasSymbol(); isSymbol(); newSymbol(); symbolFor(); symbolKeyFor();<br/>polyGetKnownSymbol(); polyNewSymbol(); polySymbolFor(); polySymbolKeyFor();</code><br/>Polyfills are used to automatically backfill runtimes that do not support `Symbol`, not all of the Symbol functionality is provided.
> Unless otherwise stated in the functions documentation polyfills are used to automatically backfill unsupported functions in older ES5 runtimes
## Quickstart

@@ -65,8 +89,19 @@

```
## Browser Support
General support is currently set to ES5 supported runtimes higher.
![Chrome](https://raw.githubusercontent.com/alrra/browser-logos/master/src/chrome/chrome_48x48.png) | ![Firefox](https://raw.githubusercontent.com/alrra/browser-logos/master/src/firefox/firefox_48x48.png) | ![IE](https://raw.githubusercontent.com/alrra/browser-logos/master/src/edge/edge_48x48.png) | ![Opera](https://raw.githubusercontent.com/alrra/browser-logos/master/src/opera/opera_48x48.png) | ![Safari](https://raw.githubusercontent.com/alrra/browser-logos/master/src/safari/safari_48x48.png)
--- | --- | --- | --- | --- |
Latest ? | Latest ? | 9+ Full ?<br/><sub>8- polyfills<br/>needed</sub> | Latest ? | Latest ? |
Latest ? | Latest ? | <center>9+</center> | Latest ? | Latest ? |
> Note: While some polyfills are provided to "somewhat" support ES3/IE8 this library does not intend to become a fully fledged polyfill library. And the polyfills provided (or contributed) are just the minimum set that have been required over time. And should be less necessary are time moves forward.
#### Polyfills
All of the included polyfills are tested against the current native implementation running in `node`, `browser` and `worker` environments to ensure that they conform to the current specification, these polyfills are only internally used for ES5 compatibility and when running in an environment (mostly IE) that does not support the required function.
Some additional polyfills are provided for simple backward compatability to enable the utility functions in older environments (such as ES3 / IE8), however, you don't have to use or include these provided polyfils. If you need to use them you will need to import the pre-packaged "polyfill" bundle (`bundle/ts-polyfills-utils.min.js`) directly by hosting it on your own CDN or all of the non-internal polyfill implementations are exported so you could implement your own version of the [polyfill initializer](https://github.com/nevware21/ts-utils/blob/main/lib/src/polyfills.ts) or more simply provide your own alternatives.
> Note: Several functions use the [Object.defineProperty](https://caniuse.com/?search=Object.defineProperty) and therefore support is limited to runtimes or good polyfills that can correctly implement this functionality. (eg. createIterator; createIterable)
## Contributing

@@ -73,0 +108,0 @@

@@ -10,4 +10,4 @@ /*

import { isArray, isUndefined } from "../helpers/base";
import { isIterator } from "../helpers/iterator";
import { ArrProto } from "../internal/constants";
import { isIterator } from "../iterator/iterator";
import { ArrProto, DONE, VALUE } from "../internal/constants";

@@ -35,4 +35,4 @@ /**

let value = elms.next();
while(!value.done) {
target.push(value.value);
while(!value[DONE]) {
target.push(value[VALUE]);
value = elms.next();

@@ -39,0 +39,0 @@ }

@@ -9,2 +9,4 @@ /*

import { LENGTH } from "../internal/constants";
/**

@@ -49,3 +51,3 @@ * Calls the provided `callbackFn` function once for each element in an array in ascending index order. It is not invoked for index properties

if (arr) {
const len = arr.length;
const len = arr[LENGTH];
for (let idx = 0; idx < len; idx++) {

@@ -52,0 +54,0 @@ if (idx in arr) {

@@ -14,2 +14,4 @@ /*

* executes, the returned value is added to newArray.
*
* @since 0.3.3
* @group Array

@@ -35,2 +37,4 @@ * @typeParam T - Identifies the type of the array elements

* - indexes which have been deleted.
*
* @since 0.3.3
* @group Array

@@ -37,0 +41,0 @@ * @typeParam T - Identifies the type of the array elements

@@ -9,3 +9,3 @@ /*

import { ArrCls, BOOLEAN, FUNCTION, NUMBER, OBJECT, ObjProto, STRING, UNDEFINED } from "../internal/constants";
import { ArrCls, BOOLEAN, FUNCTION, NUMBER, OBJECT, ObjProto, STRING, UNDEFINED, UNDEF_VALUE } from "../internal/constants";
import { _safeCheck } from "../internal/safe_check";

@@ -168,3 +168,3 @@

export function isDefined(arg: any): boolean {
return !!arg || arg !== undefined;
return !!arg || arg !== UNDEF_VALUE;
}

@@ -171,0 +171,0 @@

@@ -15,3 +15,3 @@ /*

* default value.
* @group Integer
* @group Number
* @param value - The string or numeric value to get the integer value from

@@ -18,0 +18,0 @@ * @param defValue - The default value if unsuccessful

@@ -12,2 +12,3 @@ /*

import { objKeys } from "../object/object";
import { LENGTH } from "../internal/constants";

@@ -33,3 +34,3 @@ function _checkLength(value: any, props: string[]) {

if (isArray(value)) {
result = value.length > 0;
result = value[LENGTH] > 0;
} else if (isDate(value)) {

@@ -41,3 +42,3 @@ result = !isNaN(value.getTime());

try {
let chkValue = _checkLength(value, [ "length", "byteLength", "size", "count"]);
let chkValue = _checkLength(value, [ LENGTH, "byteLength", "size", "count"]);
if (isBoolean(chkValue)) {

@@ -54,3 +55,3 @@ return chkValue;

return !!objKeys(value).length;
return !!objKeys(value)[LENGTH];
} else {

@@ -57,0 +58,0 @@ result = isTruthy(value);

@@ -29,7 +29,13 @@ /*

} from "./helpers/extend";
export { IGetLength as GetLengthImpl, getLength } from "./helpers/length";
export { getIntValue } from "./helpers/number";
export { throwError, throwTypeError, throwRangeError } from "./helpers/throw";
export { hasValue } from "./helpers/value";
export { isIterable, isIterator} from "./helpers/iterator";
export { createArrayIterator } from "./iterator/array";
export { CreateIteratorContext, createIterator, createIterable, makeIterable } from "./iterator/create";
export { iterForOf } from "./iterator/forOf";
export { isIterable, isIterator } from "./iterator/iterator";
export { createRangeIterator } from "./iterator/range";
export { mathCeil, mathFloor } from "./math/floor";
export { mathMin, mathMax } from "./math/min_max";
export { mathToInt } from "./math/to_int";

@@ -52,2 +58,3 @@ export { mathTrunc } from "./math/trunc";

export { strStartsWith } from "./string/starts_with";
export { strSubstr, strSubstring, strLeft, strRight, polyStrSubstr } from "./string/substring";
export { strTrim, strTrimEnd, strTrimLeft, strTrimRight, strTrimStart } from "./string/trim";

@@ -54,0 +61,0 @@ export { isSymbol, getSymbol, getKnownSymbol, hasSymbol, newSymbol, symbolFor, symbolKeyFor } from "./symbol/symbol";

@@ -12,2 +12,3 @@ /*

export const UNDEF_VALUE: undefined = undefined;

@@ -28,2 +29,5 @@ export const EMPTY = "";

export const LAST_INDEX_OF = "lastIndexOf";
export const LENGTH = "length";
export const DONE = "done";
export const VALUE = "value";

@@ -43,3 +47,3 @@ /**

*/
export const StrProto = String[PROTOTYPE];
export const StrCls = String;

@@ -49,2 +53,7 @@ /**

*/
export const StrProto = StrCls[PROTOTYPE];
/**
* @ignore
*/
export const MathCls = Math;

@@ -51,0 +60,0 @@

@@ -9,6 +9,8 @@ /*

import { LENGTH } from "./constants";
export function makePolyFn<T extends Function>(poly: T): T {
return function(): T {
let theArgs = [ this ];
for (let lp = 0; lp < arguments.length; lp++) {
for (let lp = 0; lp < arguments[LENGTH]; lp++) {
theArgs.push(arguments[lp]);

@@ -15,0 +17,0 @@ }

@@ -28,2 +28,18 @@ /*

};
}
/**
* @internal
* @ignore
* Internal helper to lookup and return the named property from the first argument (which becomes the this)
*
* @since 0.4.2
* @typeParam T - The type of the object which contains the propName
* @param propName - The property name
* @returns The value of the property
*/
export function _unwrapProp<T>(propName: keyof T) {
return function (thisArg: T) {
return thisArg[propName];
};
}

@@ -9,3 +9,3 @@ /*

import { ObjClass } from "../internal/constants";
import { ObjClass, VALUE } from "../internal/constants";
import { isFunction, isUndefined, objToString } from "../helpers/base";

@@ -51,3 +51,3 @@ import { throwUnsupported } from "../helpers/customError";

} else {
desc.value = value;
desc[VALUE] = value;
}

@@ -54,0 +54,0 @@

@@ -10,4 +10,3 @@ /*

import { arrForEach } from "./array/forEach";
import { objDefineProp } from "./object/define";
import { PROTOTYPE } from "./internal/constants";
import { ArrCls, ObjClass, StrProto } from "./internal/constants";
import { polyIsArray } from "./polyfills/array";

@@ -24,4 +23,3 @@ import { polyObjKeys } from "./polyfills/object";

const objectPolyfills = {
"keys": polyObjKeys,
"defineProperty": objDefineProp
"keys": polyObjKeys
};

@@ -42,3 +40,2 @@

// Add Object polyfills
const ObjClass = Object;
arrForEach(polyObjKeys(objectPolyfills), (key) => {

@@ -50,7 +47,6 @@ if (!ObjClass[key]) {

if (!Array.isArray) {
Array.isArray = makePolyFn(polyIsArray);
if (!ArrCls.isArray) {
ArrCls.isArray = makePolyFn(polyIsArray);
}
const StrProto = String[PROTOTYPE];
arrForEach(polyObjKeys(stringPolyfills), (key) => {

@@ -57,0 +53,0 @@ if (!StrProto[key]) {

@@ -12,4 +12,5 @@ /*

import { throwTypeError } from "../helpers/throw";
import { StrProto } from "../internal/constants";
import { LENGTH, StrProto } from "../internal/constants";
import { _unwrapFunction } from "../internal/unwrapFunction";
import { strSubstring } from "./substring";

@@ -41,7 +42,7 @@ const ENDS_WITH = "endsWith";

let searchValue = isString(searchString) ? searchString : "" + searchString;
let chkLen = searchValue.length;
let len = value.length;
let chkLen = searchValue[LENGTH];
let len = value[LENGTH];
let end = !isUndefined(length) && length < len ? length : len;
return value.substring(end - chkLen, end) === searchValue;
return strSubstring(value, end - chkLen, end) === searchValue;
}

@@ -10,3 +10,3 @@ /*

import { isNullOrUndefined } from "../helpers/base";
import { EMPTY, StrProto } from "../internal/constants";
import { EMPTY, LENGTH, StrProto } from "../internal/constants";
import { _unwrapFunction } from "../internal/unwrapFunction";

@@ -16,2 +16,3 @@ import { mathCeil } from "../math/floor";

import { strRepeat } from "./repeat";
import { strSubstring } from "./substring";

@@ -26,12 +27,12 @@ const PAD_START = "padStart";

let len = value.length;
let len = value[LENGTH];
if (len < targetLength) {
result = isNullOrUndefined(padString) ? " " : "" + padString;
targetLength = targetLength - len;
if (targetLength > result.length) {
result = strRepeat(result, mathCeil(targetLength / result.length));
if (targetLength > result[LENGTH]) {
result = strRepeat(result, mathCeil(targetLength / result[LENGTH]));
}
if (result.length > targetLength) {
result = result.substring(0, targetLength);
if (result[LENGTH] > targetLength) {
result = strSubstring(result, 0, targetLength);
}

@@ -38,0 +39,0 @@ }

@@ -12,4 +12,5 @@ /*

import { throwTypeError } from "../helpers/throw";
import { StrProto } from "../internal/constants";
import { LENGTH, StrProto } from "../internal/constants";
import { _unwrapFunction } from "../internal/unwrapFunction";
import { strSubstring } from "./substring";

@@ -44,6 +45,6 @@ const STARTS_WITH = "startsWith";

let searchValue = isString(searchString) ? searchString : "" + searchString;
let chkLen = searchValue.length;
let chkLen = searchValue[LENGTH];
let pos = position > 0 ? position : 0;
return value.substring(pos, pos + chkLen) === searchValue;
return strSubstring(value, pos, pos + chkLen) === searchValue;
}

@@ -12,7 +12,13 @@ export { arrAppend } from "./array/append";

export { deepExtend, objExtend } from "./helpers/extend";
export { IGetLength as GetLengthImpl, getLength } from "./helpers/length";
export { getIntValue } from "./helpers/number";
export { throwError, throwTypeError, throwRangeError } from "./helpers/throw";
export { hasValue } from "./helpers/value";
export { isIterable, isIterator } from "./helpers/iterator";
export { createArrayIterator } from "./iterator/array";
export { CreateIteratorContext, createIterator, createIterable, makeIterable } from "./iterator/create";
export { iterForOf } from "./iterator/forOf";
export { isIterable, isIterator } from "./iterator/iterator";
export { createRangeIterator } from "./iterator/range";
export { mathCeil, mathFloor } from "./math/floor";
export { mathMin, mathMax } from "./math/min_max";
export { mathToInt } from "./math/to_int";

@@ -33,2 +39,3 @@ export { mathTrunc } from "./math/trunc";

export { strStartsWith } from "./string/starts_with";
export { strSubstr, strSubstring, strLeft, strRight, polyStrSubstr } from "./string/substring";
export { strTrim, strTrimEnd, strTrimLeft, strTrimRight, strTrimStart } from "./string/trim";

@@ -35,0 +42,0 @@ export { isSymbol, getSymbol, getKnownSymbol, hasSymbol, newSymbol, symbolFor, symbolKeyFor } from "./symbol/symbol";

@@ -0,1 +1,2 @@

export declare const UNDEF_VALUE: undefined;
export declare const EMPTY = "";

@@ -15,4 +16,8 @@ export declare const BOOLEAN = "boolean";

export declare const LAST_INDEX_OF = "lastIndexOf";
export declare const LENGTH = "length";
export declare const DONE = "done";
export declare const VALUE = "value";
export declare const ObjClass: ObjectConstructor;
export declare const ObjProto: Object;
export declare const StrCls: StringConstructor;
export declare const StrProto: String;

@@ -19,0 +24,0 @@ export declare const MathCls: Math;

export declare function _unwrapFunction<T>(funcName: string): (thisArg: any, ...args: any[]) => T;
export declare function _unwrapProp<T>(propName: keyof T): (thisArg: T) => T[keyof T];

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc