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

@flekschas/utils

Package Overview
Dependencies
Maintainers
1
Versions
43
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@flekschas/utils - npm Package Compare versions

Comparing version 0.4.0 to 0.5.0

5

CHANGELOG.md

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

## v0.5.0
- Rename `withReadOnlyProperty()` to `withStaticProperty()`
- Add non-static version of `withReadOnlyProperty()`
## v0.4.0

@@ -2,0 +7,0 @@

2

esm/animation.js

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

// @flekschas/utils v0.4.0 Copyright 2020 Fritz Lekschas
// @flekschas/utils v0.5.0 Copyright 2020 Fritz Lekschas
/**

@@ -3,0 +3,0 @@ * Cubic in and out easing function

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

// @flekschas/utils v0.4.0 Copyright 2020 Fritz Lekschas
// @flekschas/utils v0.5.0 Copyright 2020 Fritz Lekschas
const isHexStr = str => str[0] === '#';

@@ -3,0 +3,0 @@

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

// @flekschas/utils v0.4.0 Copyright 2020 Fritz Lekschas
// @flekschas/utils v0.5.0 Copyright 2020 Fritz Lekschas
/**

@@ -3,0 +3,0 @@ * Store the values of an iterator in an array.

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

// @flekschas/utils v0.4.0 Copyright 2020 Fritz Lekschas
// @flekschas/utils v0.5.0 Copyright 2020 Fritz Lekschas
const XMLNS = 'http://www.w3.org/2000/svg';

@@ -3,0 +3,0 @@

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

// @flekschas/utils v0.4.0 Copyright 2020 Fritz Lekschas
// @flekschas/utils v0.5.0 Copyright 2020 Fritz Lekschas
/**

@@ -3,0 +3,0 @@ * Clone an event by invoking the source event's constructor and passing in

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

// @flekschas/utils v0.4.0 Copyright 2020 Fritz Lekschas
// @flekschas/utils v0.5.0 Copyright 2020 Fritz Lekschas
/**

@@ -155,5 +155,17 @@ * Identity function

* @param {string} name - Name of the property
* @param {function} getter - Getter function
*/
const withReadOnlyProperty = (name, getter) => self =>
assign(self, {
get [name]() {
return getter();
}
});
/**
* Assign a static property to an object
* @param {string} name - Name of the property
* @param {*} value - Static value
*/
const withReadOnlyProperty = (name, value) => self =>
const withStaticProperty = (name, value) => self =>
assign(self, {

@@ -165,2 +177,2 @@ get [name]() {

export { forEach, map, mapFilter, pipe, some, withConstructor, withProperty, withReadOnlyProperty };
export { forEach, map, mapFilter, pipe, some, withConstructor, withProperty, withReadOnlyProperty, withStaticProperty };

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

// @flekschas/utils v0.4.0 Copyright 2020 Fritz Lekschas
// @flekschas/utils v0.5.0 Copyright 2020 Fritz Lekschas
/**

@@ -3,0 +3,0 @@ * L distance between a pair of vectors

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

// @flekschas/utils v0.4.0 Copyright 2020 Fritz Lekschas
// @flekschas/utils v0.5.0 Copyright 2020 Fritz Lekschas
const mergeMaps = (map1, map2) =>

@@ -3,0 +3,0 @@ new Map(

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

// @flekschas/utils v0.4.0 Copyright 2020 Fritz Lekschas
// @flekschas/utils v0.5.0 Copyright 2020 Fritz Lekschas
/**

@@ -3,0 +3,0 @@ * Identity function

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

// @flekschas/utils v0.4.0 Copyright 2020 Fritz Lekschas
// @flekschas/utils v0.5.0 Copyright 2020 Fritz Lekschas
const assign = (target, ...sources) => {

@@ -3,0 +3,0 @@ sources.forEach(source => {

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

// @flekschas/utils v0.4.0 Copyright 2020 Fritz Lekschas
// @flekschas/utils v0.5.0 Copyright 2020 Fritz Lekschas
/**

@@ -3,0 +3,0 @@ * Create a worker from a function

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

// @flekschas/utils v0.4.0 Copyright 2020 Fritz Lekschas
// @flekschas/utils v0.5.0 Copyright 2020 Fritz Lekschas
const sortAsc = (a, b) => a - b;

@@ -3,0 +3,0 @@

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

// @flekschas/utils v0.4.0 Copyright 2020 Fritz Lekschas
// @flekschas/utils v0.5.0 Copyright 2020 Fritz Lekschas
const camelToConst = str =>

@@ -3,0 +3,0 @@ str

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

// @flekschas/utils v0.4.0 Copyright 2020 Fritz Lekschas
// @flekschas/utils v0.5.0 Copyright 2020 Fritz Lekschas
/**

@@ -3,0 +3,0 @@ * Debounce a function call.

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

// @flekschas/utils v0.4.0 Copyright 2020 Fritz Lekschas
// @flekschas/utils v0.5.0 Copyright 2020 Fritz Lekschas
/**

@@ -3,0 +3,0 @@ * Test if an object is a function

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

// @flekschas/utils v0.4.0 Copyright 2020 Fritz Lekschas
// @flekschas/utils v0.5.0 Copyright 2020 Fritz Lekschas
/**

@@ -3,0 +3,0 @@ * L distance between a pair of vectors

{
"name": "@flekschas/utils",
"version": "0.4.0",
"version": "0.5.0",
"description": "A set of utility functions I use across projects",

@@ -5,0 +5,0 @@ "author": {

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

// @flekschas/utils v0.4.0 Copyright 2020 Fritz Lekschas
// @flekschas/utils v0.5.0 Copyright 2020 Fritz Lekschas
(function (global, factory) {

@@ -3,0 +3,0 @@ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :

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

// @flekschas/utils v0.4.0 Copyright 2020 Fritz Lekschas
// @flekschas/utils v0.5.0 Copyright 2020 Fritz Lekschas
(function (global, factory) {

@@ -3,0 +3,0 @@ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :

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

// @flekschas/utils v0.4.0 Copyright 2020 Fritz Lekschas
// @flekschas/utils v0.5.0 Copyright 2020 Fritz Lekschas
(function (global, factory) {

@@ -3,0 +3,0 @@ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :

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

// @flekschas/utils v0.4.0 Copyright 2020 Fritz Lekschas
// @flekschas/utils v0.5.0 Copyright 2020 Fritz Lekschas
(function (global, factory) {

@@ -3,0 +3,0 @@ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :

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

// @flekschas/utils v0.4.0 Copyright 2020 Fritz Lekschas
// @flekschas/utils v0.5.0 Copyright 2020 Fritz Lekschas
(function (global, factory) {

@@ -3,0 +3,0 @@ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :

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

// @flekschas/utils v0.4.0 Copyright 2020 Fritz Lekschas
// @flekschas/utils v0.5.0 Copyright 2020 Fritz Lekschas
(function (global, factory) {

@@ -242,6 +242,6 @@ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :

* @param {string} name - Name of the property
* @param {*} value - Static value
* @param {function} getter - Getter function
*/
var withReadOnlyProperty = function withReadOnlyProperty(name, value) {
var withReadOnlyProperty = function withReadOnlyProperty(name, getter) {
return function (self) {

@@ -251,7 +251,22 @@ var _assign2, _mutatorMap2;

return assign(self, (_assign2 = {}, _mutatorMap2 = {}, _mutatorMap2[name] = _mutatorMap2[name] || {}, _mutatorMap2[name].get = function () {
return value;
return getter();
}, _defineEnumerableProperties(_assign2, _mutatorMap2), _assign2));
};
};
/**
* Assign a static property to an object
* @param {string} name - Name of the property
* @param {*} value - Static value
*/
var withStaticProperty = function withStaticProperty(name, value) {
return function (self) {
var _assign3, _mutatorMap3;
return assign(self, (_assign3 = {}, _mutatorMap3 = {}, _mutatorMap3[name] = _mutatorMap3[name] || {}, _mutatorMap3[name].get = function () {
return value;
}, _defineEnumerableProperties(_assign3, _mutatorMap3), _assign3));
};
};
exports.forEach = forEach;

@@ -265,2 +280,3 @@ exports.map = map;

exports.withReadOnlyProperty = withReadOnlyProperty;
exports.withStaticProperty = withStaticProperty;

@@ -267,0 +283,0 @@ Object.defineProperty(exports, '__esModule', { value: true });

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

!function(r,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((r=r||self).utils=r.utils||{})}(this,(function(r){"use strict";function t(r,t){for(var e in t){(u=t[e]).configurable=u.enumerable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(r,e,u)}if(Object.getOwnPropertySymbols)for(var n=Object.getOwnPropertySymbols(t),o=0;o<n.length;o++){var u,i=n[o];(u=t[i]).configurable=u.enumerable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(r,i,u)}return r}function e(r,t,e){return t in r?Object.defineProperty(r,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):r[t]=e,r}var n=function(r){return r},o=function(r){for(var t=arguments.length,e=new Array(t>1?t-1:0),n=1;n<t;n++)e[n-1]=arguments[n];return e.forEach((function(t){var e=Object.keys(t).reduce((function(r,e){return r[e]=Object.getOwnPropertyDescriptor(t,e),r}),{});Object.getOwnPropertySymbols(t).forEach((function(r){var n=Object.getOwnPropertyDescriptor(t,r);n.enumerable&&(e[r]=n)})),Object.defineProperties(r,e)})),r},u=function(r){return"".concat(r[0].toUpperCase()).concat(r.substr(1))};r.forEach=function(r){return function(t){return Array.prototype.forEach.call(t,r)}},r.map=function(r){return function(t){return Array.prototype.map.call(t,r)}},r.mapFilter=function(r,t){return function(e){for(var n=[],o=0;o<e.length;o++){var u=r(e[o],o);t(u,n.length)&&n.push(u)}return n}},r.pipe=function(){for(var r=arguments.length,t=new Array(r),e=0;e<r;e++)t[e]=arguments[e];return(function(r){return t.reduce((function(r,t){return t(r)}),r)})},r.some=function(r){return function(t){return Array.prototype.some.call(t,r)}},r.withConstructor=function(r){return function(t){return o(t,{__proto__:{constructor:r}})}},r.withProperty=function(r){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},c=i.initialValue,f=void 0===c?void 0:c,a=i.getter,l=i.setter,p=i.cloner,s=void 0===p?n:p,y=i.transformer,b=void 0===y?n:y,v=i.validator,d=void 0===v?function(){return!0}:v;return function(n){var i,c,p=f,y=a?function(){return a()}:function(){return s(p)},v=l?function(r){return l(r)}:function(r){var t=b(r);p=d(t)?t:p};return o(n,(i={},(c={})[r]=c[r]||{},c[r].get=function(){return y()},e(i,"set".concat(u(r)),(function(r){v(r)})),t(i,c),i))}},r.withReadOnlyProperty=function(r,e){return function(n){var u,i;return o(n,(u={},(i={})[r]=i[r]||{},i[r].get=function(){return e},t(u,i),u))}},Object.defineProperty(r,"__esModule",{value:!0})}));
!function(r,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((r=r||self).utils=r.utils||{})}(this,(function(r){"use strict";function t(r,t){for(var n in t){(u=t[n]).configurable=u.enumerable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(r,n,u)}if(Object.getOwnPropertySymbols)for(var e=Object.getOwnPropertySymbols(t),o=0;o<e.length;o++){var u,i=e[o];(u=t[i]).configurable=u.enumerable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(r,i,u)}return r}function n(r,t,n){return t in r?Object.defineProperty(r,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):r[t]=n,r}var e=function(r){return r},o=function(r){for(var t=arguments.length,n=new Array(t>1?t-1:0),e=1;e<t;e++)n[e-1]=arguments[e];return n.forEach((function(t){var n=Object.keys(t).reduce((function(r,n){return r[n]=Object.getOwnPropertyDescriptor(t,n),r}),{});Object.getOwnPropertySymbols(t).forEach((function(r){var e=Object.getOwnPropertyDescriptor(t,r);e.enumerable&&(n[r]=e)})),Object.defineProperties(r,n)})),r},u=function(r){return"".concat(r[0].toUpperCase()).concat(r.substr(1))};r.forEach=function(r){return function(t){return Array.prototype.forEach.call(t,r)}},r.map=function(r){return function(t){return Array.prototype.map.call(t,r)}},r.mapFilter=function(r,t){return function(n){for(var e=[],o=0;o<n.length;o++){var u=r(n[o],o);t(u,e.length)&&e.push(u)}return e}},r.pipe=function(){for(var r=arguments.length,t=new Array(r),n=0;n<r;n++)t[n]=arguments[n];return(function(r){return t.reduce((function(r,t){return t(r)}),r)})},r.some=function(r){return function(t){return Array.prototype.some.call(t,r)}},r.withConstructor=function(r){return function(t){return o(t,{__proto__:{constructor:r}})}},r.withProperty=function(r){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},c=i.initialValue,f=void 0===c?void 0:c,a=i.getter,l=i.setter,p=i.cloner,s=void 0===p?e:p,y=i.transformer,b=void 0===y?e:y,v=i.validator,d=void 0===v?function(){return!0}:v;return function(e){var i,c,p=f,y=a?function(){return a()}:function(){return s(p)},v=l?function(r){return l(r)}:function(r){var t=b(r);p=d(t)?t:p};return o(e,(i={},(c={})[r]=c[r]||{},c[r].get=function(){return y()},n(i,"set".concat(u(r)),(function(r){v(r)})),t(i,c),i))}},r.withReadOnlyProperty=function(r,n){return function(e){var u,i;return o(e,(u={},(i={})[r]=i[r]||{},i[r].get=function(){return n()},t(u,i),u))}},r.withStaticProperty=function(r,n){return function(e){var u,i;return o(e,(u={},(i={})[r]=i[r]||{},i[r].get=function(){return n},t(u,i),u))}},Object.defineProperty(r,"__esModule",{value:!0})}));

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

// @flekschas/utils v0.4.0 Copyright 2020 Fritz Lekschas
// @flekschas/utils v0.5.0 Copyright 2020 Fritz Lekschas
(function (global, factory) {

@@ -3,0 +3,0 @@ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :

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

// @flekschas/utils v0.4.0 Copyright 2020 Fritz Lekschas
// @flekschas/utils v0.5.0 Copyright 2020 Fritz Lekschas
(function (global, factory) {

@@ -3,0 +3,0 @@ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :

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

// @flekschas/utils v0.4.0 Copyright 2020 Fritz Lekschas
// @flekschas/utils v0.5.0 Copyright 2020 Fritz Lekschas
(function (global, factory) {

@@ -3,0 +3,0 @@ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :

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

// @flekschas/utils v0.4.0 Copyright 2020 Fritz Lekschas
// @flekschas/utils v0.5.0 Copyright 2020 Fritz Lekschas
(function (global, factory) {

@@ -3,0 +3,0 @@ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :

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

// @flekschas/utils v0.4.0 Copyright 2020 Fritz Lekschas
// @flekschas/utils v0.5.0 Copyright 2020 Fritz Lekschas
(function (global, factory) {

@@ -3,0 +3,0 @@ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :

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

// @flekschas/utils v0.4.0 Copyright 2020 Fritz Lekschas
// @flekschas/utils v0.5.0 Copyright 2020 Fritz Lekschas
(function (global, factory) {

@@ -3,0 +3,0 @@ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :

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

// @flekschas/utils v0.4.0 Copyright 2020 Fritz Lekschas
// @flekschas/utils v0.5.0 Copyright 2020 Fritz Lekschas
(function (global, factory) {

@@ -3,0 +3,0 @@ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :

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

// @flekschas/utils v0.4.0 Copyright 2020 Fritz Lekschas
// @flekschas/utils v0.5.0 Copyright 2020 Fritz Lekschas
(function (global, factory) {

@@ -3,0 +3,0 @@ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :

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

// @flekschas/utils v0.4.0 Copyright 2020 Fritz Lekschas
// @flekschas/utils v0.5.0 Copyright 2020 Fritz Lekschas
(function (global, factory) {

@@ -3,0 +3,0 @@ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :

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

// @flekschas/utils v0.4.0 Copyright 2020 Fritz Lekschas
// @flekschas/utils v0.5.0 Copyright 2020 Fritz Lekschas
(function (global, factory) {

@@ -3,0 +3,0 @@ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :

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

// @flekschas/utils v0.4.0 Copyright 2020 Fritz Lekschas
// @flekschas/utils v0.5.0 Copyright 2020 Fritz Lekschas
/**

@@ -429,5 +429,17 @@ * Cubic in and out easing function

* @param {string} name - Name of the property
* @param {function} getter - Getter function
*/
const withReadOnlyProperty = (name, getter) => self =>
assign(self, {
get [name]() {
return getter();
}
});
/**
* Assign a static property to an object
* @param {string} name - Name of the property
* @param {*} value - Static value
*/
const withReadOnlyProperty = (name, value) => self =>
const withStaticProperty = (name, value) => self =>
assign(self, {

@@ -920,4 +932,4 @@ get [name]() {

var version = "0.4.0";
var version = "0.5.0";
export { addClass, argSort, assign, camelToConst, capitalize, cloneEvent, createWorker, cubicInOut, debounce, deepClone, extend, forEach, forwardEvent, hasClass, hexStrToDec, identity, interpolateNumber, interpolateVector, isFunction, isHexStr, isParentOf, isPointHalfwayInRect, isPointInPolygon, isPointInRect, isRgbStr, isRgbaStr, iteratorToArray, l1Dist, l1PointDist, l2Dist, l2Norm, l2PointDist, lDist, lPointDist, map, mapFilter, max, mean, mergeMaps, min, mod, normalize, pipe, range, removeClass, rgbStrToDec, rgbToHex, some, sortAsc, sortDesc, sortPos, sum, throttle, throttleAndDebounce, toVoid, update, version, wait, withConstructor, withProperty, withReadOnlyProperty };
export { addClass, argSort, assign, camelToConst, capitalize, cloneEvent, createWorker, cubicInOut, debounce, deepClone, extend, forEach, forwardEvent, hasClass, hexStrToDec, identity, interpolateNumber, interpolateVector, isFunction, isHexStr, isParentOf, isPointHalfwayInRect, isPointInPolygon, isPointInRect, isRgbStr, isRgbaStr, iteratorToArray, l1Dist, l1PointDist, l2Dist, l2Norm, l2PointDist, lDist, lPointDist, map, mapFilter, max, mean, mergeMaps, min, mod, normalize, pipe, range, removeClass, rgbStrToDec, rgbToHex, some, sortAsc, sortDesc, sortPos, sum, throttle, throttleAndDebounce, toVoid, update, version, wait, withConstructor, withProperty, withReadOnlyProperty, withStaticProperty };

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

// @flekschas/utils v0.4.0 Copyright 2020 Fritz Lekschas
// @flekschas/utils v0.5.0 Copyright 2020 Fritz Lekschas
(function (global, factory) {

@@ -582,6 +582,6 @@ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :

* @param {string} name - Name of the property
* @param {*} value - Static value
* @param {function} getter - Getter function
*/
var withReadOnlyProperty = function withReadOnlyProperty(name, value) {
var withReadOnlyProperty = function withReadOnlyProperty(name, getter) {
return function (self) {

@@ -591,7 +591,22 @@ var _assign2, _mutatorMap2;

return assign(self, (_assign2 = {}, _mutatorMap2 = {}, _mutatorMap2[name] = _mutatorMap2[name] || {}, _mutatorMap2[name].get = function () {
return value;
return getter();
}, _defineEnumerableProperties(_assign2, _mutatorMap2), _assign2));
};
};
/**
* Assign a static property to an object
* @param {string} name - Name of the property
* @param {*} value - Static value
*/
var withStaticProperty = function withStaticProperty(name, value) {
return function (self) {
var _assign3, _mutatorMap3;
return assign(self, (_assign3 = {}, _mutatorMap3 = {}, _mutatorMap3[name] = _mutatorMap3[name] || {}, _mutatorMap3[name].get = function () {
return value;
}, _defineEnumerableProperties(_assign3, _mutatorMap3), _assign3));
};
};
/**

@@ -1182,3 +1197,3 @@ * L distance between a pair of vectors

var version = "0.4.0";
var version = "0.5.0";

@@ -1246,2 +1261,3 @@ exports.addClass = addClass;

exports.withReadOnlyProperty = withReadOnlyProperty;
exports.withStaticProperty = withStaticProperty;

@@ -1248,0 +1264,0 @@ Object.defineProperty(exports, '__esModule', { value: true });

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

!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n((t=t||self).utils={})}(this,(function(t){"use strict";var n=function(t,n,r){return t*(1-(r=Math.min(1,Math.max(0,r))))+n*r},r="http://www.w3.org/2000/svg",e=function(t,n){if(t.namespaceURI===r){var e=t.getAttribute("class");return e&&!!e.match(new RegExp("(\\s|^)".concat(n,"(\\s|$)")))}return t.classList?t.classList.contains(n):!!t.className.match(new RegExp("(\\s|^)".concat(n,"(\\s|$)")))},o=function(t){var n=new t.constructor(t.type,t);return n.sourceUid=t.sourceUid,n.forwarded=t.forwarded,n};function u(t){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function c(t,n){for(var r in n){(u=n[r]).configurable=u.enumerable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(t,r,u)}if(Object.getOwnPropertySymbols)for(var e=Object.getOwnPropertySymbols(n),o=0;o<e.length;o++){var u,c=e[o];(u=n[c]).configurable=u.enumerable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(t,c,u)}return t}function i(t,n,r){return n in t?Object.defineProperty(t,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[n]=r,t}function a(t,n){return function(t){if(Array.isArray(t))return t}(t)||function(t,n){if(!(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t)))return;var r=[],e=!0,o=!1,u=void 0;try{for(var c,i=t[Symbol.iterator]();!(e=(c=i.next()).done)&&(r.push(c.value),!n||r.length!==n);e=!0);}catch(t){o=!0,u=t}finally{try{e||null==i.return||i.return()}finally{if(o)throw u}}return r}(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var f=function(t){return t},s=function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),e=1;e<n;e++)r[e-1]=arguments[e];return r.forEach((function(n){var r=Object.keys(n).reduce((function(t,r){return t[r]=Object.getOwnPropertyDescriptor(n,r),t}),{});Object.getOwnPropertySymbols(n).forEach((function(t){var e=Object.getOwnPropertyDescriptor(n,t);e.enumerable&&(r[t]=e)})),Object.defineProperties(t,r)})),t},l=function t(n,r){if(null===r||"object"!==u(r))return r;if(r.constructor!==Object&&r.constructor!==Array)return r;if(r.constructor===Date||r.constructor===RegExp||r.constructor===Function||r.constructor===String||r.constructor===Number||r.constructor===Boolean)return new r.constructor(r);var e=n||new r.constructor;return Object.keys(r).forEach((function(n){e[n]=void 0===e[n]?t(void 0,r[n]):e[n]})),e},p=function(t){return"".concat(t[0].toUpperCase()).concat(t.substr(1))},d=function(t,n){return t-n},v=function(t){return Math.sqrt(t.reduce((function(t,n){return t+Math.pow(n,2)}),0))},y=function(t){return t.reduce((function(t,n){return t+n}),0)};t.addClass=function(t,n){if(t.namespaceURI===r){if(!e(t,n)){var o=t.getAttribute("class")||"";t.setAttribute("class","".concat(o," ").concat(n))}}else t.classList?t.classList.add(n):e(t,n)||(t.className+=" ".concat(n))},t.argSort=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.comparator,e=void 0===r?d:r,o=n.ignoreNull,u=void 0!==o&&o;return t.map(u?function(t,n){return null===t?void 0:[t,n]}:function(t,n){return[t,n]}).sort((function(t,n){return e(t[0],n[0])})).reduce((function(t,n){return n?(t.push(n[1]),t):t}),[])},t.assign=s,t.camelToConst=function(t){return t.split(/(?=[A-Z])/).join("_").toUpperCase()},t.capitalize=p,t.cloneEvent=o,t.createWorker=function(t){return new Worker(window.URL.createObjectURL(new Blob(["(".concat(t.toString(),")()")],{type:"text/javascript"})))},t.cubicInOut=function(t){return((t=2*Math.min(1,Math.max(0,t)))<=1?t*t*t:(t-=2)*t*t+2)/2},t.debounce=function(t,n){var r,e=function(){for(var e=arguments.length,o=new Array(e),u=0;u<e;u++)o[u]=arguments[u];var c=function(){r=null,t.apply(void 0,o)};clearTimeout(r),r=setTimeout(c,n)};return e.cancel=function(){clearTimeout(r)},e.now=function(){return t.apply(void 0,arguments)},e},t.deepClone=function(t){return l(void 0,t)},t.extend=l,t.forEach=function(t){return function(n){return Array.prototype.forEach.call(n,t)}},t.forwardEvent=function(t,n){n.dispatchEvent(o(t))},t.hasClass=e,t.hexStrToDec=function(t){return parseInt(t.substr(1),16)},t.identity=f,t.interpolateNumber=n,t.interpolateVector=function(t,r,e){return t.map((function(t,o){return n(t,r[o],e)}))},t.isFunction=function(t){return!!(t&&t.constructor&&t.call&&t.apply)},t.isHexStr=function(t){return"#"===t[0]},t.isParentOf=function(t,n){for(var r=t;r&&r!==n&&"HTML"!==r.tagName;)r=r.parentNode;return r===n},t.isPointHalfwayInRect=function(t,n){var r=a(t,2),e=r[0],o=r[1],u=a(n,4),c=u[0],i=u[1],f=u[2],s=u[3];return e>=c&&e<=i||o>=f&&o<=s},t.isPointInPolygon=function(){for(var t,n,r,e,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],u=a(o,2),c=u[0],i=u[1],f=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],s=!1,l=0,p=f.length-2;l<f.length;l+=2)t=f[l],n=f[l+1],r=f[p],n>i!=(e=f[p+1])>i&&c<(r-t)*(i-n)/(e-n)+t&&(s=!s),p=l;return s},t.isPointInRect=function(t,n){var r=a(t,2),e=r[0],o=r[1],u=a(n,4),c=u[0],i=u[1],f=u[2],s=u[3];return e>=c&&e<=i&&o>=f&&o<=s},t.isRgbStr=function(t){return"rgb("===t.substring(0,4)},t.isRgbaStr=function(t){return"rgba"===t.substring(0,4)},t.iteratorToArray=function(t){var n=[],r=!0,e=!1,o=void 0;try{for(var u,c=t[Symbol.iterator]();!(r=(u=c.next()).done);r=!0){var i=u.value;n.push(i)}}catch(t){e=!0,o=t}finally{try{r||null==c.return||c.return()}finally{if(e)throw o}}return n},t.l1Dist=function(t,n){return t.length===n.length?t.reduce((function(t,r,e){return t+Math.abs(r-n[e])}),0):void 0},t.l1PointDist=function(t,n,r,e){return Math.abs(t-r)+Math.abs(n-e)},t.l2Dist=function(t,n){return t.length===n.length?Math.sqrt(t.reduce((function(t,r,e){return t+Math.pow(r-n[e],2)}),0)):void 0},t.l2Norm=v,t.l2PointDist=function(t,n,r,e){return Math.sqrt(Math.pow(t-r,2)+Math.pow(n-e,2))},t.lDist=function(t){return function(n,r){return n.length===r.length?Math.pow(n.reduce((function(n,e,o){return n+Math.pow(Math.abs(e-r[o]),t)}),0),1/t):void 0}},t.lPointDist=function(t){return function(n,r,e,o){return Math.pow(Math.pow(Math.abs(n-e),t)+Math.pow(Math.abs(r-o),t),1/t)}},t.map=function(t){return function(n){return Array.prototype.map.call(n,t)}},t.mapFilter=function(t,n){return function(r){for(var e=[],o=0;o<r.length;o++){var u=t(r[o],o);n(u,e.length)&&e.push(u)}return e}},t.max=function(t){return t.reduce((function(t,n){return t>n?t:n}),-1/0)},t.mean=function(t){return y(t)/t.length},t.mergeMaps=function(t,n){return new Map(regeneratorRuntime.mark((function r(){return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.delegateYield(t,"t0",1);case 1:return r.delegateYield(n,"t1",2);case 2:case"end":return r.stop()}}),r)}))())},t.min=function(t){return t.reduce((function(t,n){return t<n?t:n}),1/0)},t.mod=function(t,n){return(t%n+t)%n},t.normalize=function(t){var n=v(t);return t.map((function(t){return t/n}))},t.pipe=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(function(t){return n.reduce((function(t,n){return n(t)}),t)})},t.range=function(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return Array(Math.ceil((n-t)/r)).fill().map((function(n,e){return t+e*r}))},t.removeClass=function(t,n){var o=new RegExp("(\\s|^)".concat(n,"(\\s|$)"));if(t.namespaceURI===r){var u=t.getAttribute("class")||"";t.setAttribute("class",u.replace(o," "))}else t.classList?t.classList.remove(n):e(t,n)&&(t.className=t.className.replace(o," "))},t.rgbStrToDec=function(t){return t.match(/(\d+),\s*(\d+),\s*(\d+),?\s*([\d.]+)?/).slice(1,4).map((function(t,n){return+t<<8*(2-n)})).reduce((function(t,n){return n+t}),0)},t.rgbToHex=function(t,n,r){var e=function(t){var n=t.toString(16);return 1===n.length?"0".concat(n):n};return"#".concat(e(t)).concat(e(n)).concat(e(r))},t.some=function(t){return function(n){return Array.prototype.some.call(n,t)}},t.sortAsc=d,t.sortDesc=function(t,n){return n-t},t.sortPos=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.comparator,e=void 0===r?d:r,o=n.ignoreNull,u=void 0!==o&&o;return t.map(u?function(t,n){return null===t?void 0:[t,n]}:function(t,n){return[t,n]}).sort((function(t,n){return e(t[0],n[0])})).reduce((function(t,n,r){return n?(t[n[1]]=r,t):t}),[])},t.sum=y,t.throttle=function(t,n){var r=!1,e=function(){r||(t.apply(void 0,arguments),r=!0,setTimeout((function(){r=!1}),n))};return e.reset=function(){r=!1},e.now=function(){return t.apply(void 0,arguments)},e},t.throttleAndDebounce=function(t,n){var r,e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,o=0;e=null===e?n:e;var u=function(){for(var n=arguments.length,u=new Array(n),c=0;c<n;c++)u[c]=arguments[c];var i=function(){o>0&&(t.apply(void 0,u),o=0)};clearTimeout(r),r=setTimeout(i,e)},c=!1,i=function(){c?(o++,u.apply(void 0,arguments)):(t.apply(void 0,arguments),u.apply(void 0,arguments),c=!0,o=0,setTimeout((function(){c=!1}),n))};return i.reset=function(){c=!1},i.cancel=function(){clearTimeout(r)},i.now=function(){return t.apply(void 0,arguments)},i},t.toVoid=function(){},t.update=function t(n,r){if(null===r||"object"!==u(r))return r;if(r.constructor!==Object&&r.constructor!==Array)return new r.constructor(r);var e=new n.constructor,o=!1;return Object.keys(r).forEach((function(u){e[u]=t(n[u],r[u]),o=o||e[u]!==n[u]})),(o=o||Object.keys(n).filter((function(t){return void 0===r[t]})).length)?e:n},t.version="0.4.0",t.wait=function(t){return new Promise((function(n){return setTimeout(n,t)}))},t.withConstructor=function(t){return function(n){return s(n,{__proto__:{constructor:t}})}},t.withProperty=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.initialValue,e=void 0===r?void 0:r,o=n.getter,u=n.setter,a=n.cloner,l=void 0===a?f:a,d=n.transformer,v=void 0===d?f:d,y=n.validator,h=void 0===y?function(){return!0}:y;return function(n){var r,a,f=e,d=o?function(){return o()}:function(){return l(f)},y=u?function(t){return u(t)}:function(t){var n=v(t);f=h(n)?n:f};return s(n,(r={},(a={})[t]=a[t]||{},a[t].get=function(){return d()},i(r,"set".concat(p(t)),(function(t){y(t)})),c(r,a),r))}},t.withReadOnlyProperty=function(t,n){return function(r){var e,o;return s(r,(e={},(o={})[t]=o[t]||{},o[t].get=function(){return n},c(e,o),e))}},Object.defineProperty(t,"__esModule",{value:!0})}));
!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n((t=t||self).utils={})}(this,(function(t){"use strict";var n=function(t,n,r){return t*(1-(r=Math.min(1,Math.max(0,r))))+n*r},r="http://www.w3.org/2000/svg",e=function(t,n){if(t.namespaceURI===r){var e=t.getAttribute("class");return e&&!!e.match(new RegExp("(\\s|^)".concat(n,"(\\s|$)")))}return t.classList?t.classList.contains(n):!!t.className.match(new RegExp("(\\s|^)".concat(n,"(\\s|$)")))},o=function(t){var n=new t.constructor(t.type,t);return n.sourceUid=t.sourceUid,n.forwarded=t.forwarded,n};function u(t){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function c(t,n){for(var r in n){(u=n[r]).configurable=u.enumerable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(t,r,u)}if(Object.getOwnPropertySymbols)for(var e=Object.getOwnPropertySymbols(n),o=0;o<e.length;o++){var u,c=e[o];(u=n[c]).configurable=u.enumerable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(t,c,u)}return t}function i(t,n,r){return n in t?Object.defineProperty(t,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[n]=r,t}function a(t,n){return function(t){if(Array.isArray(t))return t}(t)||function(t,n){if(!(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t)))return;var r=[],e=!0,o=!1,u=void 0;try{for(var c,i=t[Symbol.iterator]();!(e=(c=i.next()).done)&&(r.push(c.value),!n||r.length!==n);e=!0);}catch(t){o=!0,u=t}finally{try{e||null==i.return||i.return()}finally{if(o)throw u}}return r}(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var f=function(t){return t},s=function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),e=1;e<n;e++)r[e-1]=arguments[e];return r.forEach((function(n){var r=Object.keys(n).reduce((function(t,r){return t[r]=Object.getOwnPropertyDescriptor(n,r),t}),{});Object.getOwnPropertySymbols(n).forEach((function(t){var e=Object.getOwnPropertyDescriptor(n,t);e.enumerable&&(r[t]=e)})),Object.defineProperties(t,r)})),t},l=function t(n,r){if(null===r||"object"!==u(r))return r;if(r.constructor!==Object&&r.constructor!==Array)return r;if(r.constructor===Date||r.constructor===RegExp||r.constructor===Function||r.constructor===String||r.constructor===Number||r.constructor===Boolean)return new r.constructor(r);var e=n||new r.constructor;return Object.keys(r).forEach((function(n){e[n]=void 0===e[n]?t(void 0,r[n]):e[n]})),e},p=function(t){return"".concat(t[0].toUpperCase()).concat(t.substr(1))},v=function(t,n){return t-n},d=function(t){return Math.sqrt(t.reduce((function(t,n){return t+Math.pow(n,2)}),0))},y=function(t){return t.reduce((function(t,n){return t+n}),0)};t.addClass=function(t,n){if(t.namespaceURI===r){if(!e(t,n)){var o=t.getAttribute("class")||"";t.setAttribute("class","".concat(o," ").concat(n))}}else t.classList?t.classList.add(n):e(t,n)||(t.className+=" ".concat(n))},t.argSort=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.comparator,e=void 0===r?v:r,o=n.ignoreNull,u=void 0!==o&&o;return t.map(u?function(t,n){return null===t?void 0:[t,n]}:function(t,n){return[t,n]}).sort((function(t,n){return e(t[0],n[0])})).reduce((function(t,n){return n?(t.push(n[1]),t):t}),[])},t.assign=s,t.camelToConst=function(t){return t.split(/(?=[A-Z])/).join("_").toUpperCase()},t.capitalize=p,t.cloneEvent=o,t.createWorker=function(t){return new Worker(window.URL.createObjectURL(new Blob(["(".concat(t.toString(),")()")],{type:"text/javascript"})))},t.cubicInOut=function(t){return((t=2*Math.min(1,Math.max(0,t)))<=1?t*t*t:(t-=2)*t*t+2)/2},t.debounce=function(t,n){var r,e=function(){for(var e=arguments.length,o=new Array(e),u=0;u<e;u++)o[u]=arguments[u];var c=function(){r=null,t.apply(void 0,o)};clearTimeout(r),r=setTimeout(c,n)};return e.cancel=function(){clearTimeout(r)},e.now=function(){return t.apply(void 0,arguments)},e},t.deepClone=function(t){return l(void 0,t)},t.extend=l,t.forEach=function(t){return function(n){return Array.prototype.forEach.call(n,t)}},t.forwardEvent=function(t,n){n.dispatchEvent(o(t))},t.hasClass=e,t.hexStrToDec=function(t){return parseInt(t.substr(1),16)},t.identity=f,t.interpolateNumber=n,t.interpolateVector=function(t,r,e){return t.map((function(t,o){return n(t,r[o],e)}))},t.isFunction=function(t){return!!(t&&t.constructor&&t.call&&t.apply)},t.isHexStr=function(t){return"#"===t[0]},t.isParentOf=function(t,n){for(var r=t;r&&r!==n&&"HTML"!==r.tagName;)r=r.parentNode;return r===n},t.isPointHalfwayInRect=function(t,n){var r=a(t,2),e=r[0],o=r[1],u=a(n,4),c=u[0],i=u[1],f=u[2],s=u[3];return e>=c&&e<=i||o>=f&&o<=s},t.isPointInPolygon=function(){for(var t,n,r,e,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],u=a(o,2),c=u[0],i=u[1],f=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],s=!1,l=0,p=f.length-2;l<f.length;l+=2)t=f[l],n=f[l+1],r=f[p],n>i!=(e=f[p+1])>i&&c<(r-t)*(i-n)/(e-n)+t&&(s=!s),p=l;return s},t.isPointInRect=function(t,n){var r=a(t,2),e=r[0],o=r[1],u=a(n,4),c=u[0],i=u[1],f=u[2],s=u[3];return e>=c&&e<=i&&o>=f&&o<=s},t.isRgbStr=function(t){return"rgb("===t.substring(0,4)},t.isRgbaStr=function(t){return"rgba"===t.substring(0,4)},t.iteratorToArray=function(t){var n=[],r=!0,e=!1,o=void 0;try{for(var u,c=t[Symbol.iterator]();!(r=(u=c.next()).done);r=!0){var i=u.value;n.push(i)}}catch(t){e=!0,o=t}finally{try{r||null==c.return||c.return()}finally{if(e)throw o}}return n},t.l1Dist=function(t,n){return t.length===n.length?t.reduce((function(t,r,e){return t+Math.abs(r-n[e])}),0):void 0},t.l1PointDist=function(t,n,r,e){return Math.abs(t-r)+Math.abs(n-e)},t.l2Dist=function(t,n){return t.length===n.length?Math.sqrt(t.reduce((function(t,r,e){return t+Math.pow(r-n[e],2)}),0)):void 0},t.l2Norm=d,t.l2PointDist=function(t,n,r,e){return Math.sqrt(Math.pow(t-r,2)+Math.pow(n-e,2))},t.lDist=function(t){return function(n,r){return n.length===r.length?Math.pow(n.reduce((function(n,e,o){return n+Math.pow(Math.abs(e-r[o]),t)}),0),1/t):void 0}},t.lPointDist=function(t){return function(n,r,e,o){return Math.pow(Math.pow(Math.abs(n-e),t)+Math.pow(Math.abs(r-o),t),1/t)}},t.map=function(t){return function(n){return Array.prototype.map.call(n,t)}},t.mapFilter=function(t,n){return function(r){for(var e=[],o=0;o<r.length;o++){var u=t(r[o],o);n(u,e.length)&&e.push(u)}return e}},t.max=function(t){return t.reduce((function(t,n){return t>n?t:n}),-1/0)},t.mean=function(t){return y(t)/t.length},t.mergeMaps=function(t,n){return new Map(regeneratorRuntime.mark((function r(){return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.delegateYield(t,"t0",1);case 1:return r.delegateYield(n,"t1",2);case 2:case"end":return r.stop()}}),r)}))())},t.min=function(t){return t.reduce((function(t,n){return t<n?t:n}),1/0)},t.mod=function(t,n){return(t%n+t)%n},t.normalize=function(t){var n=d(t);return t.map((function(t){return t/n}))},t.pipe=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(function(t){return n.reduce((function(t,n){return n(t)}),t)})},t.range=function(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return Array(Math.ceil((n-t)/r)).fill().map((function(n,e){return t+e*r}))},t.removeClass=function(t,n){var o=new RegExp("(\\s|^)".concat(n,"(\\s|$)"));if(t.namespaceURI===r){var u=t.getAttribute("class")||"";t.setAttribute("class",u.replace(o," "))}else t.classList?t.classList.remove(n):e(t,n)&&(t.className=t.className.replace(o," "))},t.rgbStrToDec=function(t){return t.match(/(\d+),\s*(\d+),\s*(\d+),?\s*([\d.]+)?/).slice(1,4).map((function(t,n){return+t<<8*(2-n)})).reduce((function(t,n){return n+t}),0)},t.rgbToHex=function(t,n,r){var e=function(t){var n=t.toString(16);return 1===n.length?"0".concat(n):n};return"#".concat(e(t)).concat(e(n)).concat(e(r))},t.some=function(t){return function(n){return Array.prototype.some.call(n,t)}},t.sortAsc=v,t.sortDesc=function(t,n){return n-t},t.sortPos=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.comparator,e=void 0===r?v:r,o=n.ignoreNull,u=void 0!==o&&o;return t.map(u?function(t,n){return null===t?void 0:[t,n]}:function(t,n){return[t,n]}).sort((function(t,n){return e(t[0],n[0])})).reduce((function(t,n,r){return n?(t[n[1]]=r,t):t}),[])},t.sum=y,t.throttle=function(t,n){var r=!1,e=function(){r||(t.apply(void 0,arguments),r=!0,setTimeout((function(){r=!1}),n))};return e.reset=function(){r=!1},e.now=function(){return t.apply(void 0,arguments)},e},t.throttleAndDebounce=function(t,n){var r,e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,o=0;e=null===e?n:e;var u=function(){for(var n=arguments.length,u=new Array(n),c=0;c<n;c++)u[c]=arguments[c];var i=function(){o>0&&(t.apply(void 0,u),o=0)};clearTimeout(r),r=setTimeout(i,e)},c=!1,i=function(){c?(o++,u.apply(void 0,arguments)):(t.apply(void 0,arguments),u.apply(void 0,arguments),c=!0,o=0,setTimeout((function(){c=!1}),n))};return i.reset=function(){c=!1},i.cancel=function(){clearTimeout(r)},i.now=function(){return t.apply(void 0,arguments)},i},t.toVoid=function(){},t.update=function t(n,r){if(null===r||"object"!==u(r))return r;if(r.constructor!==Object&&r.constructor!==Array)return new r.constructor(r);var e=new n.constructor,o=!1;return Object.keys(r).forEach((function(u){e[u]=t(n[u],r[u]),o=o||e[u]!==n[u]})),(o=o||Object.keys(n).filter((function(t){return void 0===r[t]})).length)?e:n},t.version="0.5.0",t.wait=function(t){return new Promise((function(n){return setTimeout(n,t)}))},t.withConstructor=function(t){return function(n){return s(n,{__proto__:{constructor:t}})}},t.withProperty=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.initialValue,e=void 0===r?void 0:r,o=n.getter,u=n.setter,a=n.cloner,l=void 0===a?f:a,v=n.transformer,d=void 0===v?f:v,y=n.validator,h=void 0===y?function(){return!0}:y;return function(n){var r,a,f=e,v=o?function(){return o()}:function(){return l(f)},y=u?function(t){return u(t)}:function(t){var n=d(t);f=h(n)?n:f};return s(n,(r={},(a={})[t]=a[t]||{},a[t].get=function(){return v()},i(r,"set".concat(p(t)),(function(t){y(t)})),c(r,a),r))}},t.withReadOnlyProperty=function(t,n){return function(r){var e,o;return s(r,(e={},(o={})[t]=o[t]||{},o[t].get=function(){return n()},c(e,o),e))}},t.withStaticProperty=function(t,n){return function(r){var e,o;return s(r,(e={},(o={})[t]=o[t]||{},o[t].get=function(){return n},c(e,o),e))}},Object.defineProperty(t,"__esModule",{value:!0})}));
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