shogi-player
Version:
Shogi board web components has functions for replaying, manipulating, and editing
1,857 lines (1,438 loc) • 5.08 MB
JavaScript
/******/ (() => { // webpackBootstrap
/******/ var __webpack_modules__ = ({
/***/ 48255:
/***/ ((module) => {
if (typeof Object.create === 'function') {
// implementation from standard node.js 'util' module
module.exports = function inherits(ctor, superCtor) {
ctor.super_ = superCtor
ctor.prototype = Object.create(superCtor.prototype, {
constructor: {
value: ctor,
enumerable: false,
writable: true,
configurable: true
}
});
};
} else {
// old school shim for old browsers
module.exports = function inherits(ctor, superCtor) {
ctor.super_ = superCtor
var TempCtor = function () {}
TempCtor.prototype = superCtor.prototype
ctor.prototype = new TempCtor()
ctor.prototype.constructor = ctor
}
}
/***/ }),
/***/ 23464:
/***/ ((module) => {
module.exports = function isBuffer(arg) {
return arg && typeof arg === 'object'
&& typeof arg.copy === 'function'
&& typeof arg.fill === 'function'
&& typeof arg.readUInt8 === 'function';
}
/***/ }),
/***/ 18800:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
// Copyright Joyent, Inc. and other Node contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to permit
// persons to whom the Software is furnished to do so, subject to the
// following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE.
var getOwnPropertyDescriptors = Object.getOwnPropertyDescriptors ||
function getOwnPropertyDescriptors(obj) {
var keys = Object.keys(obj);
var descriptors = {};
for (var i = 0; i < keys.length; i++) {
descriptors[keys[i]] = Object.getOwnPropertyDescriptor(obj, keys[i]);
}
return descriptors;
};
var formatRegExp = /%[sdj%]/g;
exports.format = function(f) {
if (!isString(f)) {
var objects = [];
for (var i = 0; i < arguments.length; i++) {
objects.push(inspect(arguments[i]));
}
return objects.join(' ');
}
var i = 1;
var args = arguments;
var len = args.length;
var str = String(f).replace(formatRegExp, function(x) {
if (x === '%%') return '%';
if (i >= len) return x;
switch (x) {
case '%s': return String(args[i++]);
case '%d': return Number(args[i++]);
case '%j':
try {
return JSON.stringify(args[i++]);
} catch (_) {
return '[Circular]';
}
default:
return x;
}
});
for (var x = args[i]; i < len; x = args[++i]) {
if (isNull(x) || !isObject(x)) {
str += ' ' + x;
} else {
str += ' ' + inspect(x);
}
}
return str;
};
// Mark that a method should not be used.
// Returns a modified function which warns once by default.
// If --no-deprecation is set, then it is a no-op.
exports.deprecate = function(fn, msg) {
if (typeof process !== 'undefined' && process.noDeprecation === true) {
return fn;
}
// Allow for deprecating things in the process of starting up.
if (typeof process === 'undefined') {
return function() {
return exports.deprecate(fn, msg).apply(this, arguments);
};
}
var warned = false;
function deprecated() {
if (!warned) {
if (process.throwDeprecation) {
throw new Error(msg);
} else if (process.traceDeprecation) {
console.trace(msg);
} else {
console.error(msg);
}
warned = true;
}
return fn.apply(this, arguments);
}
return deprecated;
};
var debugs = {};
var debugEnviron;
exports.debuglog = function(set) {
if (isUndefined(debugEnviron))
debugEnviron = ({"NODE_ENV":"production","BASE_URL":"/"}).NODE_DEBUG || '';
set = set.toUpperCase();
if (!debugs[set]) {
if (new RegExp('\\b' + set + '\\b', 'i').test(debugEnviron)) {
var pid = process.pid;
debugs[set] = function() {
var msg = exports.format.apply(exports, arguments);
console.error('%s %d: %s', set, pid, msg);
};
} else {
debugs[set] = function() {};
}
}
return debugs[set];
};
/**
* Echos the value of a value. Trys to print the value out
* in the best way possible given the different types.
*
* @param {Object} obj The object to print out.
* @param {Object} opts Optional options object that alters the output.
*/
/* legacy: obj, showHidden, depth, colors*/
function inspect(obj, opts) {
// default options
var ctx = {
seen: [],
stylize: stylizeNoColor
};
// legacy...
if (arguments.length >= 3) ctx.depth = arguments[2];
if (arguments.length >= 4) ctx.colors = arguments[3];
if (isBoolean(opts)) {
// legacy...
ctx.showHidden = opts;
} else if (opts) {
// got an "options" object
exports._extend(ctx, opts);
}
// set default options
if (isUndefined(ctx.showHidden)) ctx.showHidden = false;
if (isUndefined(ctx.depth)) ctx.depth = 2;
if (isUndefined(ctx.colors)) ctx.colors = false;
if (isUndefined(ctx.customInspect)) ctx.customInspect = true;
if (ctx.colors) ctx.stylize = stylizeWithColor;
return formatValue(ctx, obj, ctx.depth);
}
exports.inspect = inspect;
// http://en.wikipedia.org/wiki/ANSI_escape_code#graphics
inspect.colors = {
'bold' : [1, 22],
'italic' : [3, 23],
'underline' : [4, 24],
'inverse' : [7, 27],
'white' : [37, 39],
'grey' : [90, 39],
'black' : [30, 39],
'blue' : [34, 39],
'cyan' : [36, 39],
'green' : [32, 39],
'magenta' : [35, 39],
'red' : [31, 39],
'yellow' : [33, 39]
};
// Don't use 'blue' not visible on cmd.exe
inspect.styles = {
'special': 'cyan',
'number': 'yellow',
'boolean': 'yellow',
'undefined': 'grey',
'null': 'bold',
'string': 'green',
'date': 'magenta',
// "name": intentionally not styling
'regexp': 'red'
};
function stylizeWithColor(str, styleType) {
var style = inspect.styles[styleType];
if (style) {
return '\u001b[' + inspect.colors[style][0] + 'm' + str +
'\u001b[' + inspect.colors[style][1] + 'm';
} else {
return str;
}
}
function stylizeNoColor(str, styleType) {
return str;
}
function arrayToHash(array) {
var hash = {};
array.forEach(function(val, idx) {
hash[val] = true;
});
return hash;
}
function formatValue(ctx, value, recurseTimes) {
// Provide a hook for user-specified inspect functions.
// Check that value is an object with an inspect function on it
if (ctx.customInspect &&
value &&
isFunction(value.inspect) &&
// Filter out the util module, it's inspect function is special
value.inspect !== exports.inspect &&
// Also filter out any prototype objects using the circular check.
!(value.constructor && value.constructor.prototype === value)) {
var ret = value.inspect(recurseTimes, ctx);
if (!isString(ret)) {
ret = formatValue(ctx, ret, recurseTimes);
}
return ret;
}
// Primitive types cannot have properties
var primitive = formatPrimitive(ctx, value);
if (primitive) {
return primitive;
}
// Look up the keys of the object.
var keys = Object.keys(value);
var visibleKeys = arrayToHash(keys);
if (ctx.showHidden) {
keys = Object.getOwnPropertyNames(value);
}
// IE doesn't make error fields non-enumerable
// http://msdn.microsoft.com/en-us/library/ie/dww52sbt(v=vs.94).aspx
if (isError(value)
&& (keys.indexOf('message') >= 0 || keys.indexOf('description') >= 0)) {
return formatError(value);
}
// Some type of object without properties can be shortcutted.
if (keys.length === 0) {
if (isFunction(value)) {
var name = value.name ? ': ' + value.name : '';
return ctx.stylize('[Function' + name + ']', 'special');
}
if (isRegExp(value)) {
return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');
}
if (isDate(value)) {
return ctx.stylize(Date.prototype.toString.call(value), 'date');
}
if (isError(value)) {
return formatError(value);
}
}
var base = '', array = false, braces = ['{', '}'];
// Make Array say that they are Array
if (isArray(value)) {
array = true;
braces = ['[', ']'];
}
// Make functions say that they are functions
if (isFunction(value)) {
var n = value.name ? ': ' + value.name : '';
base = ' [Function' + n + ']';
}
// Make RegExps say that they are RegExps
if (isRegExp(value)) {
base = ' ' + RegExp.prototype.toString.call(value);
}
// Make dates with properties first say the date
if (isDate(value)) {
base = ' ' + Date.prototype.toUTCString.call(value);
}
// Make error with message first say the error
if (isError(value)) {
base = ' ' + formatError(value);
}
if (keys.length === 0 && (!array || value.length == 0)) {
return braces[0] + base + braces[1];
}
if (recurseTimes < 0) {
if (isRegExp(value)) {
return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');
} else {
return ctx.stylize('[Object]', 'special');
}
}
ctx.seen.push(value);
var output;
if (array) {
output = formatArray(ctx, value, recurseTimes, visibleKeys, keys);
} else {
output = keys.map(function(key) {
return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array);
});
}
ctx.seen.pop();
return reduceToSingleString(output, base, braces);
}
function formatPrimitive(ctx, value) {
if (isUndefined(value))
return ctx.stylize('undefined', 'undefined');
if (isString(value)) {
var simple = '\'' + JSON.stringify(value).replace(/^"|"$/g, '')
.replace(/'/g, "\\'")
.replace(/\\"/g, '"') + '\'';
return ctx.stylize(simple, 'string');
}
if (isNumber(value))
return ctx.stylize('' + value, 'number');
if (isBoolean(value))
return ctx.stylize('' + value, 'boolean');
// For some reason typeof null is "object", so special case here.
if (isNull(value))
return ctx.stylize('null', 'null');
}
function formatError(value) {
return '[' + Error.prototype.toString.call(value) + ']';
}
function formatArray(ctx, value, recurseTimes, visibleKeys, keys) {
var output = [];
for (var i = 0, l = value.length; i < l; ++i) {
if (hasOwnProperty(value, String(i))) {
output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,
String(i), true));
} else {
output.push('');
}
}
keys.forEach(function(key) {
if (!key.match(/^\d+$/)) {
output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,
key, true));
}
});
return output;
}
function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) {
var name, str, desc;
desc = Object.getOwnPropertyDescriptor(value, key) || { value: value[key] };
if (desc.get) {
if (desc.set) {
str = ctx.stylize('[Getter/Setter]', 'special');
} else {
str = ctx.stylize('[Getter]', 'special');
}
} else {
if (desc.set) {
str = ctx.stylize('[Setter]', 'special');
}
}
if (!hasOwnProperty(visibleKeys, key)) {
name = '[' + key + ']';
}
if (!str) {
if (ctx.seen.indexOf(desc.value) < 0) {
if (isNull(recurseTimes)) {
str = formatValue(ctx, desc.value, null);
} else {
str = formatValue(ctx, desc.value, recurseTimes - 1);
}
if (str.indexOf('\n') > -1) {
if (array) {
str = str.split('\n').map(function(line) {
return ' ' + line;
}).join('\n').substr(2);
} else {
str = '\n' + str.split('\n').map(function(line) {
return ' ' + line;
}).join('\n');
}
}
} else {
str = ctx.stylize('[Circular]', 'special');
}
}
if (isUndefined(name)) {
if (array && key.match(/^\d+$/)) {
return str;
}
name = JSON.stringify('' + key);
if (name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)) {
name = name.substr(1, name.length - 2);
name = ctx.stylize(name, 'name');
} else {
name = name.replace(/'/g, "\\'")
.replace(/\\"/g, '"')
.replace(/(^"|"$)/g, "'");
name = ctx.stylize(name, 'string');
}
}
return name + ': ' + str;
}
function reduceToSingleString(output, base, braces) {
var numLinesEst = 0;
var length = output.reduce(function(prev, cur) {
numLinesEst++;
if (cur.indexOf('\n') >= 0) numLinesEst++;
return prev + cur.replace(/\u001b\[\d\d?m/g, '').length + 1;
}, 0);
if (length > 60) {
return braces[0] +
(base === '' ? '' : base + '\n ') +
' ' +
output.join(',\n ') +
' ' +
braces[1];
}
return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1];
}
// NOTE: These type checking functions intentionally don't use `instanceof`
// because it is fragile and can be easily faked with `Object.create()`.
function isArray(ar) {
return Array.isArray(ar);
}
exports.isArray = isArray;
function isBoolean(arg) {
return typeof arg === 'boolean';
}
exports.isBoolean = isBoolean;
function isNull(arg) {
return arg === null;
}
exports.isNull = isNull;
function isNullOrUndefined(arg) {
return arg == null;
}
exports.isNullOrUndefined = isNullOrUndefined;
function isNumber(arg) {
return typeof arg === 'number';
}
exports.isNumber = isNumber;
function isString(arg) {
return typeof arg === 'string';
}
exports.isString = isString;
function isSymbol(arg) {
return typeof arg === 'symbol';
}
exports.isSymbol = isSymbol;
function isUndefined(arg) {
return arg === void 0;
}
exports.isUndefined = isUndefined;
function isRegExp(re) {
return isObject(re) && objectToString(re) === '[object RegExp]';
}
exports.isRegExp = isRegExp;
function isObject(arg) {
return typeof arg === 'object' && arg !== null;
}
exports.isObject = isObject;
function isDate(d) {
return isObject(d) && objectToString(d) === '[object Date]';
}
exports.isDate = isDate;
function isError(e) {
return isObject(e) &&
(objectToString(e) === '[object Error]' || e instanceof Error);
}
exports.isError = isError;
function isFunction(arg) {
return typeof arg === 'function';
}
exports.isFunction = isFunction;
function isPrimitive(arg) {
return arg === null ||
typeof arg === 'boolean' ||
typeof arg === 'number' ||
typeof arg === 'string' ||
typeof arg === 'symbol' || // ES6 symbol
typeof arg === 'undefined';
}
exports.isPrimitive = isPrimitive;
exports.isBuffer = __webpack_require__(23464);
function objectToString(o) {
return Object.prototype.toString.call(o);
}
function pad(n) {
return n < 10 ? '0' + n.toString(10) : n.toString(10);
}
var months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep',
'Oct', 'Nov', 'Dec'];
// 26 Feb 16:19:34
function timestamp() {
var d = new Date();
var time = [pad(d.getHours()),
pad(d.getMinutes()),
pad(d.getSeconds())].join(':');
return [d.getDate(), months[d.getMonth()], time].join(' ');
}
// log is just a thin wrapper to console.log that prepends a timestamp
exports.log = function() {
console.log('%s - %s', timestamp(), exports.format.apply(exports, arguments));
};
/**
* Inherit the prototype methods from one constructor into another.
*
* The Function.prototype.inherits from lang.js rewritten as a standalone
* function (not on Function.prototype). NOTE: If this file is to be loaded
* during bootstrapping this function needs to be rewritten using some native
* functions as prototype setup using normal JavaScript does not work as
* expected during bootstrapping (see mirror.js in r114903).
*
* @param {function} ctor Constructor function which needs to inherit the
* prototype.
* @param {function} superCtor Constructor function to inherit prototype from.
*/
exports.inherits = __webpack_require__(48255);
exports._extend = function(origin, add) {
// Don't do anything if add isn't an object
if (!add || !isObject(add)) return origin;
var keys = Object.keys(add);
var i = keys.length;
while (i--) {
origin[keys[i]] = add[keys[i]];
}
return origin;
};
function hasOwnProperty(obj, prop) {
return Object.prototype.hasOwnProperty.call(obj, prop);
}
var kCustomPromisifiedSymbol = typeof Symbol !== 'undefined' ? Symbol('util.promisify.custom') : undefined;
exports.promisify = function promisify(original) {
if (typeof original !== 'function')
throw new TypeError('The "original" argument must be of type Function');
if (kCustomPromisifiedSymbol && original[kCustomPromisifiedSymbol]) {
var fn = original[kCustomPromisifiedSymbol];
if (typeof fn !== 'function') {
throw new TypeError('The "util.promisify.custom" argument must be of type Function');
}
Object.defineProperty(fn, kCustomPromisifiedSymbol, {
value: fn, enumerable: false, writable: false, configurable: true
});
return fn;
}
function fn() {
var promiseResolve, promiseReject;
var promise = new Promise(function (resolve, reject) {
promiseResolve = resolve;
promiseReject = reject;
});
var args = [];
for (var i = 0; i < arguments.length; i++) {
args.push(arguments[i]);
}
args.push(function (err, value) {
if (err) {
promiseReject(err);
} else {
promiseResolve(value);
}
});
try {
original.apply(this, args);
} catch (err) {
promiseReject(err);
}
return promise;
}
Object.setPrototypeOf(fn, Object.getPrototypeOf(original));
if (kCustomPromisifiedSymbol) Object.defineProperty(fn, kCustomPromisifiedSymbol, {
value: fn, enumerable: false, writable: false, configurable: true
});
return Object.defineProperties(
fn,
getOwnPropertyDescriptors(original)
);
}
exports.promisify.custom = kCustomPromisifiedSymbol
function callbackifyOnRejected(reason, cb) {
// `!reason` guard inspired by bluebird (Ref: https://goo.gl/t5IS6M).
// Because `null` is a special error value in callbacks which means "no error
// occurred", we error-wrap so the callback consumer can distinguish between
// "the promise rejected with null" or "the promise fulfilled with undefined".
if (!reason) {
var newReason = new Error('Promise was rejected with a falsy value');
newReason.reason = reason;
reason = newReason;
}
return cb(reason);
}
function callbackify(original) {
if (typeof original !== 'function') {
throw new TypeError('The "original" argument must be of type Function');
}
// We DO NOT return the promise as it gives the user a false sense that
// the promise is actually somehow related to the callback's execution
// and that the callback throwing will reject the promise.
function callbackified() {
var args = [];
for (var i = 0; i < arguments.length; i++) {
args.push(arguments[i]);
}
var maybeCb = args.pop();
if (typeof maybeCb !== 'function') {
throw new TypeError('The last argument must be of type Function');
}
var self = this;
var cb = function() {
return maybeCb.apply(self, arguments);
};
// In true node style we process the callback on `nextTick` with all the
// implications (stack, `uncaughtException`, `async_hooks`)
original.apply(this, args)
.then(function(ret) { process.nextTick(cb, null, ret) },
function(rej) { process.nextTick(callbackifyOnRejected, rej, cb) });
}
Object.setPrototypeOf(callbackified, Object.getPrototypeOf(original));
Object.defineProperties(callbackified,
getOwnPropertyDescriptors(original));
return callbackified;
}
exports.callbackify = callbackify;
/***/ }),
/***/ 83849:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({
value: true
}));
exports.Xassertion = void 0;
var _lodash = _interopRequireDefault(__webpack_require__(32699));
var _xobject = __webpack_require__(39366);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
var Xassertion = {
assert: function assert(value) {
var message = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
if (!value) {
console.error("".concat(value, ": ").concat(message));
this.assert_debugger(message);
}
},
assert_equal: function assert_equal(expected, actual) {
var message = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
if (actual !== expected) {
console.error("<".concat(expected, "> expected but was <").concat(actual, ">"));
this.assert_debugger(message);
}
},
assert_kind_of_integer: function assert_kind_of_integer(value) {
var message = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "Assertion failed: not integer";
this.assert(Number.isInteger(value));
},
assert_kind_of_string: function assert_kind_of_string(value) {
var message = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "Assertion failed: not string";
this.assert_equal("string", _typeof(value), message);
},
assert_kind_of_array: function assert_kind_of_array(value) {
var message = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "Assertion failed: not array";
this.assert(_lodash["default"].isArray(value), message);
},
assert_kind_of_hash: function assert_kind_of_hash(value) {
var message = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "Assertion failed: not hash";
this.assert_equal("object", _typeof(value), message);
},
assert_kind_of_object: function assert_kind_of_object(value) {
var message = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "Assertion failed: not object";
this.assert_equal("object", _typeof(value), message);
},
assert_present: function assert_present(value) {
var message = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "Assertion failed: blank";
this.assert(_xobject.Xobject.present_p(value), message);
},
assert_blank: function assert_blank(value) {
var message = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "Assertion failed: present";
this.assert(_xobject.Xobject.blank_p(value), message);
},
assert_nonzero: function assert_nonzero(v) {
var message = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "divided by 0";
this.assert(v !== 0, message);
},
assert_debugger: function assert_debugger() {
var _message;
var message = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
debugger;
(_message = message) !== null && _message !== void 0 ? _message : message = "Assertion failed";
if (typeof window !== 'undefined') {
alert(message);
} else {
throw new Error(message);
}
}
};
exports.Xassertion = Xassertion;
//# sourceMappingURL=xassertion.js.map
/***/ }),
/***/ 31490:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
"use strict";
var __webpack_unused_export__;
__webpack_unused_export__ = ({
value: true
});
exports.e = void 0;
var _xassertion = __webpack_require__(83849);
var Xinteger = {
imodulo: function imodulo(v, n) {
_xassertion.Xassertion.assert_nonzero(n);
v = v % n;
v = Math.trunc(v);
if (v < 0) {
v = n + v;
}
return v + 0;
},
idiv: function idiv(v, n) {
_xassertion.Xassertion.assert_nonzero(n);
return Math.floor(v / n);
},
idivmod: function idivmod(v, n) {
return [this.idiv(v, n), this.imodulo(v, n)];
},
even_p: function even_p(v) {
return v % 2 === 0;
},
odd_p: function odd_p(v) {
return !this.even_p(v);
},
gcd: function gcd(a, b) {
if (a === 0) {
return b;
}
return this.gcd(b % a, a);
},
lcm: function lcm(a, b) {
return a * b / this.gcd(a, b);
},
iclamp: function iclamp(value, min, max) {
if (max < max) {
throw new Error("min argument must be smaller than max argument");
}
if (value < min) {
value = min;
}
if (max < value) {
value = max;
}
return value;
}
};
exports.e = Xinteger;
//# sourceMappingURL=xinteger.js.map
/***/ }),
/***/ 39366:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({
value: true
}));
exports.Xobject = void 0;
var _lodash = _interopRequireDefault(__webpack_require__(32699));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
var util = __webpack_require__(18800);
var Xobject = {
equal_p: function equal_p(a, b) {
return _lodash["default"].isEqual(a, b);
},
blank_p: function blank_p(value) {
return value === undefined || value === null || value === false || _typeof(value) === "object" && Object.keys(value).length === 0 || typeof value === "string" && value.trim().length === 0;
},
present_p: function present_p(value) {
return !this.blank_p(value);
},
presence: function presence(value) {
if (this.blank_p(value)) {
return undefined;
}
return value;
},
p: function p(value) {
console.log(value);
},
pp: function pp(value) {
console.log(util.inspect(value));
},
short_inspect: function short_inspect(value) {
return util.inspect(value);
},
i: function i(value) {
return util.inspect(value);
},
pretty_inspect: function pretty_inspect(value) {
return JSON.stringify(value, null, 4);
},
a: function a(value) {
alert(this.i(value));
},
sleep: function sleep(second) {
return new Promise(function (resolve) {
return setTimeout(resolve, second * 1000);
});
},
to_i: function to_i(value) {
return Math.trunc(Number(value !== null && value !== void 0 ? value : 0));
},
to_f: function to_f(value) {
return Number(value !== null && value !== void 0 ? value : 0);
}
};
exports.Xobject = Xobject;
//# sourceMappingURL=xobject.js.map
/***/ }),
/***/ 22231:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var parent = __webpack_require__(71621);
module.exports = parent;
/***/ }),
/***/ 52522:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var parent = __webpack_require__(89911);
module.exports = parent;
/***/ }),
/***/ 75888:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var parent = __webpack_require__(11544);
module.exports = parent;
/***/ }),
/***/ 94962:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var parent = __webpack_require__(74679);
module.exports = parent;
/***/ }),
/***/ 93423:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var parent = __webpack_require__(58489);
module.exports = parent;
/***/ }),
/***/ 45486:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var parent = __webpack_require__(24964);
__webpack_require__(65099);
__webpack_require__(21065);
__webpack_require__(74401);
module.exports = parent;
/***/ }),
/***/ 52971:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
__webpack_require__(481);
__webpack_require__(74743);
var path = __webpack_require__(28488);
module.exports = path.Array.from;
/***/ }),
/***/ 14924:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
__webpack_require__(92824);
var path = __webpack_require__(28488);
module.exports = path.Array.isArray;
/***/ }),
/***/ 49045:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
__webpack_require__(1358);
var entryVirtual = __webpack_require__(30816);
module.exports = entryVirtual('Array').concat;
/***/ }),
/***/ 30985:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
__webpack_require__(40754);
var entryVirtual = __webpack_require__(30816);
module.exports = entryVirtual('Array').forEach;
/***/ }),
/***/ 85869:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
__webpack_require__(21221);
var entryVirtual = __webpack_require__(30816);
module.exports = entryVirtual('Array').indexOf;
/***/ }),
/***/ 94876:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
__webpack_require__(37463);
var entryVirtual = __webpack_require__(30816);
module.exports = entryVirtual('Array').map;
/***/ }),
/***/ 55074:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
__webpack_require__(89539);
var entryVirtual = __webpack_require__(30816);
module.exports = entryVirtual('Array').push;
/***/ }),
/***/ 92615:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
__webpack_require__(37043);
var entryVirtual = __webpack_require__(30816);
module.exports = entryVirtual('Array').reduce;
/***/ }),
/***/ 42714:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
__webpack_require__(76276);
var entryVirtual = __webpack_require__(30816);
module.exports = entryVirtual('Array').slice;
/***/ }),
/***/ 64930:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
__webpack_require__(66502);
var entryVirtual = __webpack_require__(30816);
module.exports = entryVirtual('Array').sort;
/***/ }),
/***/ 8437:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
__webpack_require__(39742);
__webpack_require__(481);
var getIteratorMethod = __webpack_require__(9988);
module.exports = getIteratorMethod;
/***/ }),
/***/ 48661:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var isPrototypeOf = __webpack_require__(32397);
var method = __webpack_require__(49045);
var ArrayPrototype = Array.prototype;
module.exports = function (it) {
var own = it.concat;
return it === ArrayPrototype || (isPrototypeOf(ArrayPrototype, it) && own === ArrayPrototype.concat) ? method : own;
};
/***/ }),
/***/ 62358:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var isPrototypeOf = __webpack_require__(32397);
var flags = __webpack_require__(17606);
var RegExpPrototype = RegExp.prototype;
module.exports = function (it) {
return (it === RegExpPrototype || isPrototypeOf(RegExpPrototype, it)) ? flags(it) : it.flags;
};
/***/ }),
/***/ 12724:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var isPrototypeOf = __webpack_require__(32397);
var method = __webpack_require__(85869);
var ArrayPrototype = Array.prototype;
module.exports = function (it) {
var own = it.indexOf;
return it === ArrayPrototype || (isPrototypeOf(ArrayPrototype, it) && own === ArrayPrototype.indexOf) ? method : own;
};
/***/ }),
/***/ 18344:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var isPrototypeOf = __webpack_require__(32397);
var method = __webpack_require__(94876);
var ArrayPrototype = Array.prototype;
module.exports = function (it) {
var own = it.map;
return it === ArrayPrototype || (isPrototypeOf(ArrayPrototype, it) && own === ArrayPrototype.map) ? method : own;
};
/***/ }),
/***/ 17777:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var isPrototypeOf = __webpack_require__(32397);
var method = __webpack_require__(55074);
var ArrayPrototype = Array.prototype;
module.exports = function (it) {
var own = it.push;
return it === ArrayPrototype || (isPrototypeOf(ArrayPrototype, it) && own === ArrayPrototype.push) ? method : own;
};
/***/ }),
/***/ 19111:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var isPrototypeOf = __webpack_require__(32397);
var method = __webpack_require__(92615);
var ArrayPrototype = Array.prototype;
module.exports = function (it) {
var own = it.reduce;
return it === ArrayPrototype || (isPrototypeOf(ArrayPrototype, it) && own === ArrayPrototype.reduce) ? method : own;
};
/***/ }),
/***/ 81793:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var isPrototypeOf = __webpack_require__(32397);
var method = __webpack_require__(42714);
var ArrayPrototype = Array.prototype;
module.exports = function (it) {
var own = it.slice;
return it === ArrayPrototype || (isPrototypeOf(ArrayPrototype, it) && own === ArrayPrototype.slice) ? method : own;
};
/***/ }),
/***/ 49770:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var isPrototypeOf = __webpack_require__(32397);
var method = __webpack_require__(64930);
var ArrayPrototype = Array.prototype;
module.exports = function (it) {
var own = it.sort;
return it === ArrayPrototype || (isPrototypeOf(ArrayPrototype, it) && own === ArrayPrototype.sort) ? method : own;
};
/***/ }),
/***/ 22773:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
__webpack_require__(82370);
var path = __webpack_require__(28488);
var Object = path.Object;
module.exports = function create(P, D) {
return Object.create(P, D);
};
/***/ }),
/***/ 91822:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
__webpack_require__(1168);
var path = __webpack_require__(28488);
var Object = path.Object;
var defineProperty = module.exports = function defineProperty(it, key, desc) {
return Object.defineProperty(it, key, desc);
};
if (Object.defineProperty.sham) defineProperty.sham = true;
/***/ }),
/***/ 55243:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
__webpack_require__(42711);
var path = __webpack_require__(28488);
module.exports = path.parseInt;
/***/ }),
/***/ 17606:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
__webpack_require__(77546);
var getRegExpFlags = __webpack_require__(30769);
module.exports = getRegExpFlags;
/***/ }),
/***/ 98844:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
__webpack_require__(1358);
__webpack_require__(63125);
__webpack_require__(71068);
__webpack_require__(70381);
__webpack_require__(45889);
__webpack_require__(41258);
__webpack_require__(20646);
__webpack_require__(50055);
__webpack_require__(7357);
__webpack_require__(91867);
__webpack_require__(89201);
__webpack_require__(41789);
__webpack_require__(43751);
__webpack_require__(59802);
__webpack_require__(57764);
__webpack_require__(69933);
__webpack_require__(68220);
__webpack_require__(98412);
__webpack_require__(11035);
__webpack_require__(69922);
var path = __webpack_require__(28488);
module.exports = path.Symbol;
/***/ }),
/***/ 6041:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
module.exports = __webpack_require__(4796);
/***/ }),
/***/ 67860:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
module.exports = __webpack_require__(42913);
/***/ }),
/***/ 47841:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
module.exports = __webpack_require__(9220);
/***/ }),
/***/ 43144:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
module.exports = __webpack_require__(50301);
/***/ }),
/***/ 40838:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
module.exports = __webpack_require__(35114);
/***/ }),
/***/ 88188:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
module.exports = __webpack_require__(10410);
/***/ }),
/***/ 4796:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var parent = __webpack_require__(22231);
module.exports = parent;
/***/ }),
/***/ 42913:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var parent = __webpack_require__(52522);
module.exports = parent;
/***/ }),
/***/ 9220:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var parent = __webpack_require__(75888);
module.exports = parent;
/***/ }),
/***/ 50301:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var parent = __webpack_require__(94962);
module.exports = parent;
/***/ }),
/***/ 35114:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var parent = __webpack_require__(93423);
module.exports = parent;
/***/ }),
/***/ 10410:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var parent = __webpack_require__(45486);
__webpack_require__(68602);
__webpack_require__(89401);
__webpack_require__(20843);
__webpack_require__(12111);
__webpack_require__(33047);
// TODO: Remove from `core-js@4`
__webpack_require__(4467);
__webpack_require__(74289);
__webpack_require__(56315);
__webpack_require__(10348);
__webpack_require__(65541);
module.exports = parent;
/***/ }),
/***/ 65593:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var isCallable = __webpack_require__(20183);
var tryToString = __webpack_require__(87594);
var $TypeError = TypeError;
// `Assert: IsCallable(argument) is true`
module.exports = function (argument) {
if (isCallable(argument)) return argument;
throw $TypeError(tryToString(argument) + ' is not a function');
};
/***/ }),
/***/ 97294:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var isCallable = __webpack_require__(20183);
var $String = String;
var $TypeError = TypeError;
module.exports = function (argument) {
if (typeof argument == 'object' || isCallable(argument)) return argument;
throw $TypeError("Can't set " + $String(argument) + ' as a prototype');
};
/***/ }),
/***/ 19622:
/***/ ((module) => {
module.exports = function () { /* empty */ };
/***/ }),
/***/ 62923:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var isObject = __webpack_require__(5648);
var $String = String;
var $TypeError = TypeError;
// `Assert: Type(argument) is Object`
module.exports = function (argument) {
if (isObject(argument)) return argument;
throw $TypeError($String(argument) + ' is not an object');
};
/***/ }),
/***/ 62967:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
"use strict";
var $forEach = (__webpack_require__(80802).forEach);
var arrayMethodIsStrict = __webpack_require__(90413);
var STRICT_METHOD = arrayMethodIsStrict('forEach');
// `Array.prototype.forEach` method implementation
// https://tc39.es/ecma262/#sec-array.prototype.foreach
module.exports = !STRICT_METHOD ? function forEach(callbackfn /* , thisArg */) {
return $forEach(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
// eslint-disable-next-line es/no-array-prototype-foreach -- safe
} : [].forEach;
/***/ }),
/***/ 15337:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
"use strict";
var bind = __webpack_require__(57144);
var call = __webpack_require__(75322);
var toObject = __webpack_require__(87774);
var callWithSafeIterationClosing = __webpack_require__(73814);
var isArrayIteratorMethod = __webpack_require__(31971);
var isConstructor = __webpack_require__(38586);
var lengthOfArrayLike = __webpack_require__(53352);
var createProperty = __webpack_require__(38962);
var getIterator = __webpack_require__(17090);
var getIteratorMethod = __webpack_require__(9988);
var $Array = Array;
// `Array.from` method implementation
// https://tc39.es/ecma262/#sec-array.from
module.exports = function from(arrayLike /* , mapfn = undefined, thisArg = undefined */) {
var O = toObject(arrayLike);
var IS_CONSTRUCTOR = isConstructor(this);
var argumentsLength = arguments.length;
var mapfn = argumentsLength > 1 ? arguments[1] : undefined;
var mapping = mapfn !== undefined;
if (mapping) mapfn = bind(mapfn, argumentsLength > 2 ? arguments[2] : undefined);
var iteratorMethod = getIteratorMethod(O);
var index = 0;
var length, result, step, iterator, next, value;
// if the target is not iterable or it's an array with the default iterator - use a simple case
if (iteratorMethod && !(this === $Array && isArrayIteratorMethod(iteratorMethod))) {
iterator = getIterator(O, iteratorMethod);
next = iterator.next;
result = IS_CONSTRUCTOR ? new this() : [];
for (;!(step = call(next, iterator)).done; index++) {
value = mapping ? callWithSafeIterationClosing(iterator, mapfn, [step.value, index], true) : step.value;
createProperty(result, index, value);
}
} else {
length = lengthOfArrayLike(O);
result = IS_CONSTRUCTOR ? new this(length) : $Array(length);
for (;length > index; index++) {
value = mapping ? mapfn(O[index], index) : O[index];
createProperty(result, index, value);
}
}
result.length = index;
return result;
};
/***/ }),
/***/ 85557:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var toIndexedObject = __webpack_require__(61810);
var toAbsoluteIndex = __webpack_require__(56119);
var lengthOfArrayLike = __webpack_require__(53352);
// `Array.prototype.{ indexOf, includes }` methods implementation
var createMethod = function (IS_INCLUDES) {
return function ($this, el, fromIndex) {
var O = toIndexedObject($this);
var length = lengthOfArrayLike(O);
var index = toAbsoluteIndex(fromIndex, length);
var value;
// Array#includes uses SameValueZero equality algorithm
// eslint-disable-next-line no-self-compare -- NaN check
if (IS_INCLUDES && el != el) while (length > index) {
value = O[index++];
// eslint-disable-next-line no-self-compare -- NaN check
if (value != value) return true;
// Array#indexOf ignores holes, Array#includes - not
} else for (;length > index; index++) {
if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
} return !IS_INCLUDES && -1;
};
};
module.exports = {
// `Array.prototype.includes` method
// https://tc39.es/ecma262/#sec-array.prototype.includes
includes: createMethod(true),
// `Array.prototype.indexOf` method
// https://tc39.es/ecma262/#sec-array.prototype.indexof
indexOf: createMethod(false)
};
/***/ }),
/***/ 80802:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var bind = __webpack_require__(57144);
var uncurryThis = __webpack_require__(67870);
var IndexedObject = __webpack_require__(4712);
var toObject = __webpack_require__(87774);
var lengthOfArrayLike = __webpack_require__(53352);
var arraySpeciesCreate = __webpack_require__(18531);
var push = uncurryThis([].push);
// `Array.prototype.{ forEach, map, filter, some, every, find, findIndex, filterReject }` methods implementation
var createMethod = function (TYPE) {
var IS_MAP = TYPE == 1;
var IS_FILTER = TYPE == 2;
var IS_SOME = TYPE == 3;
var IS_EVERY = TYPE == 4;
var IS_FIND_INDEX = TYPE == 6;
var IS_FILTER_REJECT = TYPE == 7;
var NO_HOLES = TYPE == 5 || IS_FIND_INDEX;
return function ($this, callbackfn, that, specificCreate) {
var O = toObject($this);
var self = IndexedObject(O);
var boundFunction = bind(callbackfn, that);
var length = lengthOfArrayLike(self);
var index = 0;
var create = specificCreate || arraySpeciesCreate;
var target = IS_MAP ? create($this, length) : IS_FILTER || IS_FILTER_REJECT ? create($this, 0) : undefined;
var value, result;
for (;length > index; index++) if (NO_HOLES || index in self) {
value = self[index];
result = boundFunction(value, index, O);
if (TYPE) {
if (IS_MAP) target[index] = result; // map
else if (result) switch (TYPE) {
case 3: return true; // some
case 5: return value; // find
case 6: return index; // findIndex
case 2: push(target, value); // filter
} else switch (TYPE) {
case 4: return false; // every
case 7: push(target, value); // filterReject
}
}
}
return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : target;
};
};
module.exports = {
// `Array.prototype.forEach` method
// https://tc39.es/ecma262/#sec-array.prototype.foreach
forEach: createMethod(0),
// `Array.prototype.map` method
// https://tc39.es/ecma262/#sec-array.prototype.map
map: createMethod(1),
// `Array.prototype.filter` method
// https://tc39.es/ecma262/#sec-array.prototype.filter
filter: createMethod(2),
// `Array.prototype.some` method
// https://tc39.es/ecma262/#sec-array.prototype.some
some: createMethod(3),
// `Array.prototype.every` method
// https://tc39.es/ecma262/#sec-array.prototype.every
every: createMethod(4),
// `Array.prototype.find` method
// https://tc39.es/ecma262/#sec-array.prototype.find
find: createMethod(5),
// `Array.prototype.findIndex` method
// https://tc39.es/ecma262/#sec-array.prototype.findIndex
findIndex: createMethod(6),
// `Array.prototype.filterReject` method
// https://github.com/tc39/proposal-array-filtering
filterReject: createMethod(7)
};
/***/ }),
/***/ 59927:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var fails = __webpack_require__(13437);
var wellKnownSymbol = __webpack_require__(27659);
var V8_VERSION = __webpack_require__(59398);
var SPECIES = wellKnownSymbol('species');
module.exports = function (METHOD_NAME) {
// We can't use this feature detection in V8 since it causes
// deoptimization and serious performance degradation
// https://github.com/zloirock/core-js/issues/677
return V8_VERSION >= 51 || !fails(function () {
var array = [];
var constructor = array.constructor = {};
constructor[SPECIES] = function () {
return { foo: 1 };
};
return array[METHOD_NAME](Boolean).foo !== 1;
});
};
/***/ }),
/***/ 90413:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
"use strict";
var fails = __webpack_require__(13437);
module.exports = function (METHOD_NAME, argument) {
var method = [][METHOD_NAME];
return !!method && fails(function () {
// eslint-disable-next-line no-useless-call -- required for testing
method.call(null, argument || function () { return 1; }, 1);
});
};
/***/ }),
/***/ 12482:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var aCallable = __webpack_require__(65593);
var toObject = __webpack_require__(87774);
var IndexedObject = __webpack_require__(4712);
var lengthOfArrayLike = __webpack_require__(53352);
var $TypeError = TypeError;
// `Array.prototype.{ reduce, reduceRight }` methods implementation
var createMethod = function (IS_RIGHT) {
return function (that, callbackfn, argumentsLength, memo) {
aCallable(callbackfn);
var O = toObject(that);
var self = IndexedObject(O);
var length = lengthOfArrayLike(O);
var index = IS_RIGHT ? length - 1 : 0;
var i = IS_RIGHT ? -1 : 1;
if (argumentsLength < 2) while (true) {
if (index in self) {
memo = self[index];
index += i;
break;
}
index += i;
if (IS_RIGHT ? index < 0 : length <= index) {
throw $TypeError('Reduce of empty array with no initial value');
}
}
for (;IS_RIGHT ? index >= 0 : length > index; index += i) if (index in self) {
memo = callbackfn(memo, self[index], index, O);
}
return memo;
};
};
module.exports = {
// `Array.prototype.reduce` method
// https://tc39.es/ecma262/#sec-array.prototype.reduce
left: createMethod(false),
// `Array.prototype.reduceRight` method
// https://tc39.es/ecma262/#sec-array.prototype.reduceright
right: createMethod(true)
};
/***/ }),
/***/ 62720:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
"use strict";
var DESCRIPTORS = __webpack_require__(10435);
var isArray = __webpack_require__(50016);
var $TypeError = TypeError;
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
// Safari < 13 does not throw an error in this case
var SILENT_ON_NON_WRITABLE_LENGTH_SET = DESCRIPTORS && !function () {
// makes no sense without proper strict mode support
if (this !== undefined) return true;
try {
// eslint-disable-next-line es/no-object-defineproperty -- safe
Object.defineProperty([], 'length', { writable: false }).length = 1;
} catch (error) {
return error instanceof TypeError;
}
}();
module.exports = SILENT_ON_NON_WRITABLE_LENGTH_SET ? function (O, length) {
if (isArray(O) && !getOwnPropertyDescriptor(O, 'length').writable) {
throw $TypeError('Cannot set read only .length');
} return O.length = length;
} : function (O, length) {
return O.length = length;
};
/***/ }),
/*