@tspro/ts-utils-lib 2.0.0 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +9 -0
- package/README.md +45 -2
- package/dist/index.d.mts +8 -3
- package/dist/index.d.ts +8 -3
- package/dist/index.es5.iife.js +1 -0
- package/dist/index.es5.polyfilled.iife.js +1 -0
- package/dist/index.js +3685 -3696
- package/dist/index.mjs +3661 -3654
- package/package.json +9 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,13 @@
|
|
|
1
1
|
# Changelog
|
|
2
|
+
## [2.1.0] - 2025-11-01
|
|
3
|
+
### Added
|
|
4
|
+
- Bundle ``index.es5.iife.js`
|
|
5
|
+
- Bundle `index.es5.polyfilled.iife.js`
|
|
6
|
+
- `AnchoredRect.toString()`
|
|
7
|
+
- `Utils.Str.stringify()`: detect custom `toString()`.
|
|
8
|
+
- `Utils.Str.stringify()`: detect constructor name.
|
|
9
|
+
- `getLibInfo()` (name, version, bundle format).
|
|
10
|
+
|
|
2
11
|
## [2.0.0] - 2025-10-31
|
|
3
12
|
### **Breaking Major Update**
|
|
4
13
|
- Removed all deprecated functions.
|
package/README.md
CHANGED
|
@@ -1,22 +1,65 @@
|
|
|
1
1
|
# TS Utils Lib
|
|
2
2
|
|
|
3
3
|
## About
|
|
4
|
-
A small collection of TypeScript functions, containers, modules, etc. used
|
|
4
|
+
A small collection of TypeScript functions, containers, modules, etc. used
|
|
5
|
+
in my personal projects.
|
|
6
|
+
|
|
7
|
+
I do not use much AI in my work but this is exception. Lot of stuff in this
|
|
8
|
+
lib is written by AI.
|
|
5
9
|
|
|
6
10
|
## Links
|
|
7
11
|
[Repository](https://github.com/pahkasoft/ts-utils-lib) |
|
|
8
12
|
[Package](https://www.npmjs.com/package/@tspro/ts-utils-lib) |
|
|
9
13
|
[Homepage](https://pahkasoft.github.io/ts-utils-lib)
|
|
10
14
|
|
|
15
|
+
Homepage contains TS Docs/API Reference.
|
|
16
|
+
|
|
11
17
|
## Install
|
|
12
18
|
`npm i @tspro/ts-utils-lib`
|
|
13
19
|
|
|
20
|
+
## Usage
|
|
21
|
+
```js
|
|
22
|
+
// Import
|
|
23
|
+
import { UniMap } from "@tspro/ts-utils-lib";
|
|
24
|
+
|
|
25
|
+
// TS example:
|
|
26
|
+
const map = new UniMap<string, number>();
|
|
27
|
+
|
|
28
|
+
// JS example:
|
|
29
|
+
const map = new UniMap();
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Browser Usage
|
|
33
|
+
Available in version `2.1.0`.
|
|
34
|
+
|
|
35
|
+
```html
|
|
36
|
+
<!--
|
|
37
|
+
Load this lighter TsUtilsLib version.
|
|
38
|
+
You must load polyfills of your choise first (optional).
|
|
39
|
+
-->
|
|
40
|
+
<script src="https://unpkg.com/@tspro/ts-utils-lib@2.1.0/dist/index.es5.iife.js"></script>
|
|
41
|
+
<script src="https://cdn.jsdelivr.net/npm/@tspro/ts-utils-lib@2.1.0/dist/index.es5.iife.js"></script>
|
|
42
|
+
|
|
43
|
+
<!--
|
|
44
|
+
Alternatively you can load this TsUtilsLib version that is bundled with polyfills.
|
|
45
|
+
-->
|
|
46
|
+
<script src="https://unpkg.com/@tspro/ts-utils-lib@2.1.0/dist/index.es5.polyfilled.iife.js"></script>
|
|
47
|
+
<script src="https://cdn.jsdelivr.net/npm/@tspro/ts-utils-lib@2.1.0/dist/index.es5.polyfilled.iife.js"></script>
|
|
48
|
+
|
|
49
|
+
<!-- Another JS example: -->
|
|
50
|
+
<script>
|
|
51
|
+
const { UniMap, Utils } = window.TsUtilsLib;
|
|
52
|
+
const map = new UniMap();
|
|
53
|
+
console.log(Utils.Str.stringify(map));
|
|
54
|
+
</script>
|
|
55
|
+
```
|
|
56
|
+
|
|
14
57
|
## Version 2 Update
|
|
15
58
|
|
|
16
59
|
Made major update because
|
|
17
60
|
- Wanted to remove deprecated renamed or obsoloted stuff.
|
|
18
61
|
- Wanted to upgrade Assert and Guard namespaces.
|
|
19
|
-
- Version 1 had already grown
|
|
62
|
+
- Version 1 had already grown a bit.
|
|
20
63
|
|
|
21
64
|
Deprecations and replacements
|
|
22
65
|
- `Vec2` -> `Vec`
|
package/dist/index.d.mts
CHANGED
|
@@ -528,12 +528,14 @@ declare namespace index$3 {
|
|
|
528
528
|
*/
|
|
529
529
|
declare function hasProperties<T extends readonly string[]>(obj: unknown, props: T | string[]): obj is Record<T[number], unknown>;
|
|
530
530
|
declare function deepEqual<T>(a: T, b: T): boolean;
|
|
531
|
+
declare function getCtorName(obj: any): string;
|
|
531
532
|
|
|
532
533
|
declare const index$2_deepEqual: typeof deepEqual;
|
|
534
|
+
declare const index$2_getCtorName: typeof getCtorName;
|
|
533
535
|
declare const index$2_hasProperties: typeof hasProperties;
|
|
534
536
|
declare const index$2_isObject: typeof isObject;
|
|
535
537
|
declare namespace index$2 {
|
|
536
|
-
export { index$2_deepEqual as deepEqual, index$2_hasProperties as hasProperties, index$2_isObject as isObject };
|
|
538
|
+
export { index$2_deepEqual as deepEqual, index$2_getCtorName as getCtorName, index$2_hasProperties as hasProperties, index$2_isObject as isObject };
|
|
537
539
|
}
|
|
538
540
|
|
|
539
541
|
/**
|
|
@@ -1006,6 +1008,7 @@ declare class AnchoredRect {
|
|
|
1006
1008
|
*/
|
|
1007
1009
|
getRect(): AnchoredRect;
|
|
1008
1010
|
toRect(): Rect;
|
|
1011
|
+
toString(): string;
|
|
1009
1012
|
}
|
|
1010
1013
|
|
|
1011
1014
|
/**
|
|
@@ -1410,7 +1413,7 @@ declare class MultiContainer<K extends any[], V> extends BaseContainer {
|
|
|
1410
1413
|
*
|
|
1411
1414
|
* ```ts
|
|
1412
1415
|
* // Usage:
|
|
1413
|
-
* const multi = asMulti(new
|
|
1416
|
+
* const multi = asMulti(new BiMap<string, string, number[]>());
|
|
1414
1417
|
* multi.add("a", "b", 5);
|
|
1415
1418
|
* multi.add("a", "b", 10);
|
|
1416
1419
|
* multi.add("a", "c", 15);
|
|
@@ -1470,4 +1473,6 @@ declare class LinkedList<V> extends BaseContainer implements Iterable<V> {
|
|
|
1470
1473
|
clone(): LinkedList<V>;
|
|
1471
1474
|
}
|
|
1472
1475
|
|
|
1473
|
-
|
|
1476
|
+
declare function getLibInfo(): string;
|
|
1477
|
+
|
|
1478
|
+
export { AnchoredRect, index$7 as Assert, BaseContainer, BiMap, cookies as Cookies, DefaultArray, DefaultEqualityFn, device as Device, type EqualityFn, index$6 as Guard, IndexArray, type KVComponent, LRUCache, LinkedList, MultiContainer, Rect, SignedIndexArray, Stack, TriMap, UniMap, index as Utils, ValueSet, Vec, asMulti, getLibInfo };
|
package/dist/index.d.ts
CHANGED
|
@@ -528,12 +528,14 @@ declare namespace index$3 {
|
|
|
528
528
|
*/
|
|
529
529
|
declare function hasProperties<T extends readonly string[]>(obj: unknown, props: T | string[]): obj is Record<T[number], unknown>;
|
|
530
530
|
declare function deepEqual<T>(a: T, b: T): boolean;
|
|
531
|
+
declare function getCtorName(obj: any): string;
|
|
531
532
|
|
|
532
533
|
declare const index$2_deepEqual: typeof deepEqual;
|
|
534
|
+
declare const index$2_getCtorName: typeof getCtorName;
|
|
533
535
|
declare const index$2_hasProperties: typeof hasProperties;
|
|
534
536
|
declare const index$2_isObject: typeof isObject;
|
|
535
537
|
declare namespace index$2 {
|
|
536
|
-
export { index$2_deepEqual as deepEqual, index$2_hasProperties as hasProperties, index$2_isObject as isObject };
|
|
538
|
+
export { index$2_deepEqual as deepEqual, index$2_getCtorName as getCtorName, index$2_hasProperties as hasProperties, index$2_isObject as isObject };
|
|
537
539
|
}
|
|
538
540
|
|
|
539
541
|
/**
|
|
@@ -1006,6 +1008,7 @@ declare class AnchoredRect {
|
|
|
1006
1008
|
*/
|
|
1007
1009
|
getRect(): AnchoredRect;
|
|
1008
1010
|
toRect(): Rect;
|
|
1011
|
+
toString(): string;
|
|
1009
1012
|
}
|
|
1010
1013
|
|
|
1011
1014
|
/**
|
|
@@ -1410,7 +1413,7 @@ declare class MultiContainer<K extends any[], V> extends BaseContainer {
|
|
|
1410
1413
|
*
|
|
1411
1414
|
* ```ts
|
|
1412
1415
|
* // Usage:
|
|
1413
|
-
* const multi = asMulti(new
|
|
1416
|
+
* const multi = asMulti(new BiMap<string, string, number[]>());
|
|
1414
1417
|
* multi.add("a", "b", 5);
|
|
1415
1418
|
* multi.add("a", "b", 10);
|
|
1416
1419
|
* multi.add("a", "c", 15);
|
|
@@ -1470,4 +1473,6 @@ declare class LinkedList<V> extends BaseContainer implements Iterable<V> {
|
|
|
1470
1473
|
clone(): LinkedList<V>;
|
|
1471
1474
|
}
|
|
1472
1475
|
|
|
1473
|
-
|
|
1476
|
+
declare function getLibInfo(): string;
|
|
1477
|
+
|
|
1478
|
+
export { AnchoredRect, index$7 as Assert, BaseContainer, BiMap, cookies as Cookies, DefaultArray, DefaultEqualityFn, device as Device, type EqualityFn, index$6 as Guard, IndexArray, type KVComponent, LRUCache, LinkedList, MultiContainer, Rect, SignedIndexArray, Stack, TriMap, UniMap, index as Utils, ValueSet, Vec, asMulti, getLibInfo };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";function e(e,t){if(t==null||t>e.length)t=e.length;for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function t(e){if(Array.isArray(e))return e}function r(t){if(Array.isArray(t))return e(t)}function n(e){if(e===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return e}function i(e,t,r){t=s(t);return p(e,x()?Reflect.construct(t,r||[],s(e).constructor):t.apply(e,r))}function u(e,t){if(!(e instanceof t)){throw new TypeError("Cannot call a class as a function")}}function a(e,t,r){if(x()){a=Reflect.construct}else{a=function e(e,t,r){var n=[null];n.push.apply(n,t);var i=Function.bind.apply(e,n);var u=new i;if(r)b(u,r.prototype);return u}}return a.apply(null,arguments)}function o(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||false;n.configurable=true;if("value"in n)n.writable=true;Object.defineProperty(e,n.key,n)}}function l(e,t,r){if(t)o(e.prototype,t);if(r)o(e,r);return e}function s(e){s=Object.setPrototypeOf?Object.getPrototypeOf:function e(e){return e.__proto__||Object.getPrototypeOf(e)};return s(e)}function c(e,t){if(typeof t!=="function"&&t!==null){throw new TypeError("Super expression must either be null or a function")}e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:true,configurable:true}});if(t)b(e,t)}function f(e,t){if(t!=null&&typeof Symbol!=="undefined"&&t[Symbol.hasInstance]){return!!t[Symbol.hasInstance](e)}else{return e instanceof t}}function h(e){if(typeof Symbol!=="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function v(e,t){var r=e==null?null:typeof Symbol!=="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(r==null)return;var n=[];var i=true;var u=false;var a,o;try{for(r=r.call(e);!(i=(a=r.next()).done);i=true){n.push(a.value);if(t&&n.length===t)break}}catch(e){u=true;o=e}finally{try{if(!i&&r["return"]!=null)r["return"]()}finally{if(u)throw o}}return n}function y(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function d(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function p(e,t){if(t&&(w(t)==="object"||typeof t==="function")){return t}return n(e)}function b(e,t){b=Object.setPrototypeOf||function e(e,t){e.__proto__=t;return e};return b(e,t)}function m(e,r){return t(e)||v(e,r)||k(e,r)||y()}function g(e){return r(e)||h(e)||k(e)||d()}function w(e){"@swc/helpers - typeof";return e&&typeof Symbol!=="undefined"&&e.constructor===Symbol?"symbol":typeof e}function k(t,r){if(!t)return;if(typeof t==="string")return e(t,r);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor)n=t.constructor.name;if(n==="Map"||n==="Set")return Array.from(n);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return e(t,r)}function x(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(x=function(){return!!e})()}function E(e,t){var r,n,i,u={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},a=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return a.next=o(0),a["throw"]=o(1),a["return"]=o(2),typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function o(e){return function(t){return l([e,t])}}function l(o){if(r)throw new TypeError("Generator is already executing.");while(a&&(a=0,o[0]&&(u=0)),u)try{if(r=1,n&&(i=o[0]&2?n["return"]:o[0]?n["throw"]||((i=n["return"])&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;if(n=0,i)o=[o[0]&2,i.value];switch(o[0]){case 0:case 1:i=o;break;case 4:u.label++;return{value:o[1],done:false};case 5:u.label++;n=o[1];o=[0];continue;case 7:o=u.ops.pop();u.trys.pop();continue;default:if(!(i=u.trys,i=i.length>0&&i[i.length-1])&&(o[0]===6||o[0]===2)){u=0;continue}if(o[0]===3&&(!i||o[1]>i[0]&&o[1]<i[3])){u.label=o[1];break}if(o[0]===6&&u.label<i[1]){u.label=i[1];i=o;break}if(i&&u.label<i[2]){u.label=i[2];u.ops.push(o);break}if(i[2])u.ops.pop();u.trys.pop();continue}o=t.call(e,u)}catch(e){o=[6,e];n=0}finally{r=i=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:true}}}function S(e){var t=typeof Symbol==="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length==="number")return{next:function(){if(e&&n>=e.length)e=void 0;return{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}var TsUtilsLib=function(){var e=function e(e){return Object.keys(e).filter(function(e){return isNaN(Number(e))})};var t=function t(t){return e(t).map(function(e){return t[e]})};var r=function t(t){return e(t).map(function(e){return[e,t[e]]})};var n=function t(t,r){return e(t).find(function(e){return t[e]===r})};var o=function e(e,t){var n=true,i=false,u=undefined;try{for(var a=r(e)[Symbol.iterator](),o;!(n=(o=a.next()).done);n=true){var l=m(o.value,2),s=l[0],c=l[1];t(s,c)}}catch(e){i=true;u=e}finally{try{if(!n&&a.return!=null){a.return()}}finally{if(i){throw u}}}};var s=function e(e,t){return e===t};var h=function e(e,t){return nh(e,t)};var v=function e(e){return e===void 0};var y=function e(e){return e===null};var d=function e(e){return e==null};var p=function e(e){return e!==void 0};var b=function e(e){return e!==null};var k=function e(e){return(typeof e==="undefined"?"undefined":w(e))=="object"&&e!==null&&!N(e)};var x=function e(e){return k(e)&&Object.keys(e).length===0};var A=function e(e){return e===void 0||k(e)};var I=function e(e){if(!k(e))return!1;var t=Object.getPrototypeOf(e);return t===Object.prototype||t===null};var O=function e(e,t){return k(e)&&t.every(function(t){return t in e})};var _=function e(e){return f(e,Set)};var N=function e(e){return!!e&&Object.prototype.toString.call(e)==="[object Array]"};var C=function e(e){return e===void 0||N(e)};var P=function e(e){return N(e)&&e.length===0};var M=function e(e){return N(e)&&e.length>0};var V=function e(e){return N(e)&&e.length===0||e===void 0};var j=function e(e){return N(e)&&e.length>0||e===void 0};var z=function e(e){return typeof e=="string"};var U=function e(e){return typeof e=="string"&&e.length===0};var T=function e(e){return typeof e=="string"&&e.length>0};var q=function e(e){return e===void 0||typeof e=="string"};var L=function e(e){return typeof e=="string"&&e.length===0||e===void 0};var R=function e(e){return typeof e=="string"&&e.length>0||e===void 0};var D=function e(e){return typeof e=="boolean"};var X=function e(e){return e===void 0||typeof e=="boolean"};var B=function e(e){return e===!0};var F=function e(e){return e===!0||e===void 0};var Y=function e(e){return e===!1};var K=function e(e){return e===!1||e===void 0};var W=function e(e){return typeof e=="function"};var Z=function e(e){return e===void 0||typeof e=="function"};var G=function e(e,r){return t(r).some(function(t){return t===e})};var H=function e(e,r){return e===void 0||t(r).some(function(t){return t===e})};var $=function e(e){if(typeof e!="string"||e.trim()==="")return!1;var t=+e;return Number.isFinite(t)};var J=function e(e){return(typeof e==="undefined"?"undefined":w(e))=="bigint"};var Q=function e(e){return typeof e=="number"};var ee=function e(e){return typeof e=="number"||e===void 0};var et=function e(e){return typeof e=="number"&&Number.isFinite(e)};var er=function e(e){return et(e)&&!en(e)};var en=function e(e){return typeof e=="number"&&et(e)&&e===Math.trunc(e)};var ei=function e(e){return en(e)&&Number.isSafeInteger(e)};var eu=function e(e){return typeof e=="number"&&et(e)&&e===Math.trunc(e)||e===void 0};var ea=function e(e,t){return en(e)&&e===t};var eo=function e(e,t){return en(e)&&Q(t)&&e>t};var el=function e(e,t){return en(e)&&Q(t)&&e>=t};var es=function e(e,t){return en(e)&&Q(t)&&e<t};var ec=function e(e,t){return en(e)&&Q(t)&&e<=t};var ef=function e(e,t,r){return en(e)&&Q(t)&&Q(r)&&e>=t&&e<=r};var eh=function e(e,t,r){return en(e)&&Q(t)&&Q(r)&&e>t&&e<r};var ev=function e(e,t,r){return Q(e)&&Q(t)&&Q(r)&&e>=t&&e<=r};var ey=function e(e,t,r){return Q(e)&&Q(t)&&Q(r)&&e>t&&e<r};var ed=function e(e){return typeof e=="number"&&Number.isNaN(e)};var ep=function e(e){return e===1/0||e===-1/0};var eb=function e(e){return e===1/0};var em=function e(e){return e===-1/0};var eg=function e(e){return typeof e=="number"&&e>0};var ew=function e(e){return typeof e=="number"&&e<0};var ek=function e(e){return typeof e=="number"&&e<=0};var ex=function e(e){return typeof e=="number"&&e>=0};var eE=function e(e){return typeof e=="number"&&e===0};var eS=function e(e){return typeof e=="number"&&e===0&&1/e===1/0};var eA=function e(e){return typeof e=="number"&&e===0&&1/e===-1/0};var eI=function e(e){return en(e)&&Math.abs(e)%2===1};var eO=function e(e){return en(e)&&e%2===0};var e_=function e(e,t){return typeof e=="number"&&typeof t=="number"&&e%t===0};var eN=function e(e){return en(e)&&e>0&&(e&e-1)===0};var eC=function e(e,t){return N(t)?t.includes(e):_(t)?t.has(e):!1};var eP=function e(e,t){return N(t)?ef(e,0,t.length-1):el(e,0)};var eM=function e(e){try{return e(),!1}catch(e){return!0}};var eV=function e(e){try{return e(),!0}catch(e){return!1}};var ej=function e(e,t){try{return e()}catch(e){return W(t)?t():t}};var ez=function e(e,t){return k(e)&&t.every(function(t){return t in e})};var eU=function e(e){return e===null?"null":N(e)?"Array":(typeof e==="undefined"?"undefined":w(e))!="object"?typeof e==="undefined"?"undefined":w(e):Object.prototype.toString.call(e).slice(8,-1)||"Object"};var eT=function e(e){return e.split("")};var eq=function e(e,t){if(!en(t)||t<0)throw new Error("repeatStr: Invalid repeatCount = "+t);return new Array(t+1).join(e)};var eL=function e(e,t){if(!en(t)||t<1)throw new Error("chunckString: Invalid chuckSize = "+t);var r=[];for(var n=0;n<e.length;n+=t)r.push(e.slice(n,n+t));return r};var eR=function e(e,t,r,n){if(!en(r)||r<0)throw new Error("replaceAt: Invalid removeCount = "+r);if(!en(t)||t<0||t+r>e.length)throw new Error("replaceAt: Invalid pos = "+t+", removeCount = "+r+", str.length = "+e.length);return e.substring(0,t)+n+e.substring(t+r)};var eD=function e(e,t,r){return eR(e,t,0,r)};var eX=function e(e,t,r){return eR(e,t,r,"")};var eB=function e(e,t){if(t.length!==1||e.length===0)return 0;var r=0;for(var n=0;n<e.length;n++)e[n]===t&&r++;return r};var eF=function e(e){if(e==="")return"";var t=e.charAt(0),r="",n=function(){t!==""&&(r===""?r+=t.charAt(0).toUpperCase()+t.substring(1):r+=" "+t,t="")},i=function(e){return e.toUpperCase()!==e.toLowerCase()&&e===e.toUpperCase()};for(var u=1;u<e.length;u++){var a=e.charAt(u);i(a)&&n(),t+=a.toLowerCase()}return n(),r};var eY=function e(e){nd=e!==null&&e!==void 0?e:Error};var eK=function e(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++){t[r]=arguments[r]}var n=t.join(", ");throw new nd("Assertion Failed!"+(n===""?"":" "+n))};var eW=function e(e,t){e||eK(t)};var eZ=function e(e,t){return e==null&&eK("Expected ".concat(ny(e)," not to be nullish"),t),e};var eG=function e(e,t){return e===void 0&&eK("Expected ".concat(ny(e)," not to be undefined"),t),e};var eH=function e(e,t,r){return nc.isIndex(e,t)||eK("Expected ".concat(e," to be index for array ").concat(ny(t)),r),t[e]};var e$=function e(e){eK(e)};var eJ=function e(e,t,r){return nc.isStrictEqual(e,t)||eK("Expected ".concat(ny(e)," to ne strict equal to ").concat(t),r),e};var eQ=function e(e,t,r){return nc.isDeepEqual(e,t)||eK("Expected ".concat(ny(e)," to deep equal with ").concat(ny(t)),r),e};var e0=function e(e,t){return nc.isUndefined(e)||eK("Expected ".concat(ny(e)," to be undefined"),t),e};var e1=function e(e,t){return nc.isNull(e)||eK("Expected ".concat(ny(e)," to be null"),t),e};var e2=function e(e,t){return nc.isNullish(e)||eK("Expected ".concat(ny(e)," to be null or undefined"),t),e};var e3=function e(e,t){return nc.isDefined(e)||eK("Expected ".concat(ny(e)," to be defined"),t),e};var e4=function e(e,t){return nc.isNonNull(e)||eK("Expected ".concat(ny(e)," to be defined"),t),e};var e8=function e(e,t){return nc.isObject(e)||eK("Expected ".concat(ny(e)," to be object"),t),e};var e5=function e(e,t){return nc.isEmptyObject(e)||eK("Expected ".concat(ny(e)," to be empty object"),t),e};var e7=function e(e,t){return nc.isPlainObject(e)||eK("Expected ".concat(ny(e)," to be plain object"),t),e};var e6=function e(e,t){return nc.isObjectOrUndefined(e)||eK("Expected ".concat(ny(e)," to be object or undefined"),t),e};var e9=function e(e,t,r){return nc.isTypedObject(e,t)||eK("Expected ".concat(ny(e)," to have keys ").concat(ny(t)),r),e};var te=function e(e,t){return nc.isArray(e)||eK("Expected ".concat(ny(e)," to be array"),t),e};var tt=function e(e,t){return nc.isArrayOrUndefined(e)||eK("Expected ".concat(ny(e)," to be array or undefined"),t),!0};var tr=function e(e,t){nc.isEmptyArray(e)||eK("Expected ".concat(ny(e)," to be empty array"),t)};var tn=function e(e,t){nc.isNonEmptyArray(e)||eK("Expected ".concat(ny(e)," to be non-empty array"),t)};var ti=function e(e,t){nc.isEmptyArrayOrUndefined(e)||eK("Expected ".concat(ny(e)," to be empty array or undefined"),t)};var tu=function e(e,t){nc.isNonEmptyArrayOrUndefined(e)||eK("Expected ".concat(ny(e)," to be non-empty array or undefined"),t)};var ta=function e(e,t){return nc.isString(e)||eK("Expected ".concat(ny(e)," to be string"),t),e};var to=function e(e,t){return nc.isEmptyString(e)||eK("Expected ".concat(ny(e)," to be empty string"),t),e};var tl=function e(e,t){return nc.isNonEmptyString(e)||eK("Expected ".concat(ny(e)," to be non-empty string"),t),e};var ts=function e(e,t){return nc.isStringOrUndefined(e)||eK("Expected ".concat(ny(e)," to be string or undefined"),t),e};var tc=function e(e,t){return nc.isEmptyStringOrUndefined(e)||eK("Expected ".concat(ny(e)," to be empty string or undefined"),t),e};var tf=function e(e,t){return nc.isNonEmptyStringOrUndefined(e)||eK("Expected ".concat(ny(e)," to be non-empty string or undefined"),t),e};var th=function e(e,t){return nc.isBoolean(e)||eK("Expected ".concat(ny(e)," to be boolean"),t),e};var tv=function e(e,t){return nc.isBooleanOrUndefined(e)||eK("Expected ".concat(ny(e)," to be boolean or undefined"),t),e};var ty=function e(e,t){return nc.isTrue(e)||eK("Expected ".concat(ny(e)," to be true"),t),e};var td=function e(e,t){return nc.isTrueOrUndefined(e)||eK("Expected ".concat(ny(e)," to be true or undefined"),t),e};var tp=function e(e,t){return nc.isFalse(e)||eK("Expected ".concat(ny(e)," to be false"),t),e};var tb=function e(e,t){return nc.isFalseOrUndefined(e)||eK("Expected ".concat(ny(e)," to be false or undefined"),t),e};var tm=function e(e,t){return nc.isFunction(e)||eK("Expected ".concat(ny(e)," to be function"),t),e};var tg=function e(e,t){return nc.isFunctionOrUndefined(e)||eK("Expected ".concat(ny(e)," to be function or undefined"),t),e};var tw=function e(e,t,r){return nc.isEnumValue(e,t)||eK("Expected ".concat(ny(e)," to be enum val"),r),e};var tk=function e(e,t,r){return nc.isEnumValueOrUndefined(e,t)||eK("Expected ".concat(ny(e)," to be enum val or undefined"),r),e};var tx=function e(e,t){return nc.isNumericString(e)||eK("Expected ".concat(ny(e)," to be numeric string"),t),e};var tE=function e(e,t){return nc.isBigInt(e)||eK("Expected ".concat(ny(e)," to be BigInt"),t),e};var tS=function e(e,t){return nc.isNumber(e)||eK("Expected ".concat(ny(e)," to be number"),t),e};var tA=function e(e,t){return nc.isNumberOrUndefined(e)||eK("Expected ".concat(ny(e)," to be number or undefined"),t),e};var tI=function e(e,t){return nc.isFinite(e)||eK("Expected ".concat(ny(e)," to be finite"),t),e};var tO=function e(e,t){return nc.isFloat(e)||eK("Expected ".concat(ny(e)," to be float"),t),e};var t_=function e(e,t){return nc.isInteger(e)||eK("Expected ".concat(ny(e)," to be integer"),t),e};var tN=function e(e,t){return nc.isSafeInteger(e)||eK("Expected ".concat(ny(e)," to be safe integer"),t),e};var tC=function e(e,t){return nc.isIntegerOrUndefined(e)||eK("Expected ".concat(ny(e)," to be integer or undefined"),t),e};var tP=function e(e,t,r){return nc.isIntegerEq(e,t)||eK("Expected ".concat(ny(e)," to be integer equal to ").concat(ny(t)),r),e};var tM=function e(e,t,r){return nc.isIntegerGt(e,t)||eK("Expected ".concat(ny(e)," to be integer > ").concat(ny(t)),r),e};var tV=function e(e,t,r){return nc.isIntegerGte(e,t)||eK("Expected ".concat(ny(e)," to be integer >= ").concat(ny(t)),r),e};var tj=function e(e,t,r){return nc.isIntegerLt(e,t)||eK("Expected ".concat(ny(e)," to be integer < ").concat(ny(t)),r),e};var tz=function e(e,t,r){return nc.isIntegerLte(e,t)||eK("Expected ".concat(ny(e)," to be integer <= ").concat(ny(t)),r),e};var tU=function e(e,t,r,n){return nc.isIntegerBetween(e,t,r)||eK("Expected integer ".concat(ny(t)," <= ").concat(ny(e)," <= ").concat(ny(r)),n),e};var tT=function e(e,t,r,n){return nc.isIntegerBetweenExclusive(e,t,r)||eK("Expected integer ".concat(ny(t)," < ").concat(ny(e)," < ").concat(ny(r)),n),e};var tq=function e(e,t,r,n){return nc.isNumberBetween(e,t,r)||eK("Expected number ".concat(ny(t)," <= ").concat(ny(e)," <= ").concat(ny(r)),n),e};var tL=function e(e,t,r,n){return nc.isNumberBetweenExclusive(e,t,r)||eK("Expected number ".concat(ny(t)," < ").concat(ny(e)," < ").concat(ny(r)),n),e};var tR=function e(e,t){return nc.isNaNValue(e)||eK("Expected ".concat(ny(e)," to be NaN"),t),NaN};var tD=function e(e,t){return nc.isInfinity(e)||eK("Expected ".concat(ny(e)," to be +-Infinity"),t),e};var tX=function e(e,t){return nc.isPosInfinity(e)||eK("Expected ".concat(ny(e)," to be +Infinity"),t),e};var tB=function e(e,t){return nc.isNegInfinity(e)||eK("Expected ".concat(ny(e)," to be -Infinity"),t),e};var tF=function e(e,t){return nc.isPos(e)||eK("Expected ".concat(ny(e)," to be positive (> 0)"),t),e};var tY=function e(e,t){return nc.isNeg(e)||eK("Expected ".concat(ny(e)," to be negative (< 0)"),t),e};var tK=function e(e,t){return nc.isNonPos(e)||eK("Expected ".concat(ny(e)," to be non-positive (<= 0)"),t),e};var tW=function e(e,t){return nc.isNonNeg(e)||eK("Expected ".concat(ny(e)," to be non-negative (>= 0)"),t),e};var tZ=function e(e,t){return nc.isZero(e)||eK("Expected ".concat(ny(e)," to be 0"),t),e};var tG=function e(e,t){return nc.isPosZero(e)||eK("Expected ".concat(ny(e)," to be +0"),t),e};var tH=function e(e,t){return nc.isNegZero(e)||eK("Expected ".concat(ny(e)," to be -0"),t),e};var t$=function e(e,t){return nc.isOdd(e)||eK("Expected ".concat(ny(e)," to odd"),t),e};var tJ=function e(e,t){return nc.isEven(e)||eK("Expected ".concat(ny(e)," to even"),t),e};var tQ=function e(e,t,r){return nc.isMultipleOf(e,t)||eK("Expected ".concat(ny(e)," to be divisble bu ").concat(ny(t)),r),e};var t0=function e(e,t){return nc.isPowerOfTwo(e)||eK("Expected ".concat(ny(e)," to be power of two"),t),e};var t1=function e(e,t,r){return nc.isIncluded(e,t)||eK("Expected ".concat(ny(e)," to be included in ").concat(ny(t)),r),e};var t2=function e(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++){t[r]=arguments[r]}var n=t.shift(),i=nc.isString(t[t.length-1])?t.pop():void 0,u=nc.isArray(t[0])?t.shift():void 0;return nc.isIndex(n,u)||eK(u===void 0?"Expected ".concat(n," to be index"):"Expected ".concat(n," to be index for ").concat(ny(u)),i),n};var t3=function e(e,t){return nc.doesThrow(e)||eK("Expected to throw",t),!0};var t4=function e(e,t){return nc.doesNotThrow(e)||eK("Expected to throw",t),!0};var t8=function e(){return document.cookie.split(";").map(function(e){return e.trim()})};var t5=function e(e,t){var r=e+"="+t.toString()+";sameSite=Lax;";return ng&&(r+="expires="+ng.toUTCString()+";"),document.cookie=r,t};var t7=function e(e,t){var r=t8().find(function(t){return t.startsWith(e+"=")});return r===void 0?t:r.substring(e.length+1)};var t6=function e(e){document.cookie=e+"=;expires=Thu, 01 Jan 1970 00:00:00 UTC;"};var t9=function e(e){ng=new Date,ng.setDate(ng.getDate()+e)};var re=function e(){return nm===void 0};var rt=function e(){nm="accept",t5(nb,nm)};var rr=function e(){nm="decline",t5(nb,nm)};var rn=function e(e,t){return nm==="accept"&&t5(e,t),t};var ri=function e(e,t){var r;return nm==="accept"?(r=t7(e,t))!==null&&r!==void 0?r:t:t};var ru=function e(e,t){if(nm==="accept"){var r=t7(e);return r===void 0?t:parseInt(r)}else return t};var ra=function e(e,t){if(nm==="accept"){var r=t7(e);return r===void 0?t:/true|1/i.test(r)}else return t};var ro=function e(e){(nm==="accept"||e===nb)&&t6(e)};var rl=function e(){document.cookie.split(";").forEach(function(e){return ro(e.trim().split("=")[0])})};var rs=function e(){var e=document.createElement("div");e.style.width="1in",document.body.appendChild(e);var t=e.offsetWidth;return e.remove(),t||96};var rc=function e(){try{var e=document.createElement("div");e.style.visibility="hidden",e.style.width="100px",document.body.appendChild(e);var t=e.offsetWidth;e.style.overflow="scroll";var r=document.createElement("div");r.style.width="100%",e.appendChild(r);var n=r.offsetWidth;return e.parentNode&&e.parentNode.removeChild(e),t-n}catch(e){return 0}};var rf=function e(){var e=document.createElement("div");e.style.cssText="display:inline-block; padding:0; line-height:1; position:absolute; visibility:hidden; font-size:1em",e.appendChild(document.createTextNode("M")),document.body.appendChild(e);var t=e.offsetHeight;return document.body.removeChild(e),t};var rh=function e(){if("ontouchstart"in window||"DocumentTouch"in window||"createTouch"in document&&"createTouchList"in document)return!0;var e=" -webkit- -moz- -o- -ms- ".split(" "),t=function e(e){return window.matchMedia(e).matches},r=["(",e.join("touch-enabled),("),"heartz",")"].join("");return t(r)};var rv=function e(){var e=navigator.userAgent||navigator.vendor||window.opera;return/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(e)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(e.substr(0,4))};var ry=function e(){return location.protocol+"//"+location.host};var rd=function e(e){return e/nA};var rp=function e(e){return e*nA};var rb=function e(e){if(typeof e=="number")return e;var t=NaN,r,n=e.toString().match(nE);if(n&&n[1]){t=parseFloat(n[1]);var i=n[2]?n[2].toLowerCase():"undefined";r=nx.test(i)?i:void 0,r||console.log("Unknown unit '"+i+"' => using 'px'.")}else t=parseFloat(e);switch(no.isFinite(t,"value in function toPx"),r){case"mm":return rp(t);case"cm":return rp(t)*10;case"in":case"inch":return rp(t)*25.4;case"em":return nO*t;default:case"px":return t}};var rm=function e(e){return N(e)?e:[e]};var rg=function e(e){var t;return(t=e===null||e===void 0?void 0:e.slice())!==null&&t!==void 0?t:[]};var rw=function e(e,t){return t!==void 0?e.filter(function(e,r,n){return r===n.findIndex(function(r){return t(e,r)})}):e.filter(function(e,t,r){return t===r.indexOf(e)})};var rk=function e(e,t){if(!en(t)||t<0)throw new Error("fillArray: Invalid fillCount = "+t);return new Array(t).fill(e)};var rx=function e(e,t){if(!en(e)||e<0)throw new Error("mapSequenceArray: Invalid len = "+e);var r=new Array(e);for(var n=0;n<e;n++)r[n]=t(n);return r};var rE=function e(e){return rx(e,function(e){return e})};var rS=function e(e,t,r){if(!en(e))throw new Error("mapRangeArray: Invalid start = "+t);if(!en(t))throw new Error("mapRangeArray: Invalid end = "+t);var n=Math.abs(t-e)+1,i=new Array(n);for(var u=0,a=e,o=Math.sign(t-e);u<n;a+=o,u++)i[u]=r(a);return i};var rA=function e(e,t){return rS(e,t,function(e){return e})};var rI=function e(e,t){return e.indexOf(t)>=0};var rO=function e(e,t){if(!en(t)||t<1)throw new Error("chunckArray: Invalid chunckSize = "+t);var r=[];for(var n=0;n<e.length;n+=t)r.push(e.slice(n,n+t));return r};var r_=function e(e){return e===void 0?void 0:nk.toPx(e)};var rN=function e(e,t){return t.length===0?!1:e.classList?e.classList.contains(t):!!e.className.match(new RegExp("(\\s|^)"+t+"(\\s|$)"))};var rC=function e(e,t){t.length!==0&&(e.classList?e.classList.add(t):rN(e,t)||(e.className+=" "+t))};var rP=function e(e,t){if(t.length!==0){if(e.classList)e.classList.remove(t);else if(rN(e,t)){var r=new RegExp("(\\s|^)"+t+"(\\s|$)");e.className=e.className.replace(r," ")}}};var rM=function e(e,t,r){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"px";e.style.left=t+n,e.style.top=r+n};var rV=function e(e){var t=e.getBoundingClientRect(),r=document.documentElement;return{top:t.top+window.pageYOffset-r.clientTop,left:t.left+window.pageXOffset-r.clientLeft}};var rj=function e(e){if(f(e,Window))return e.innerWidth;{var t=parseFloat(getComputedStyle(e,null).width.replace("px",""));return isNaN(t)?0:t}};var rz=function e(e,t){e.style.width=t+"px"};var rU=function e(e){if(f(e,Window))return e.innerHeight;{var t=parseFloat(getComputedStyle(e,null).height.replace("px",""));return isNaN(t)?0:t}};var rT=function e(e,t){e.style.height=t+"px"};var rq=function e(e,t){t.appendChild(e)};var rL=function e(e){e.remove()};var rR=function e(e,t){e.style.display=t?"block":"none"};var rD=function e(e,t,r,n,i){var u=arguments.length>5&&arguments[5]!==void 0?arguments[5]:"px";e.style.left=t+u,e.style.top=r+u,e.style.width=n+u,e.style.height=i+u};var rX=function e(e){var t=typeof e=="string"?document.getElementById(e):e;return f(t,HTMLButtonElement)?t:void 0};var rB=function e(e){var t=typeof e=="string"?document.getElementById(e):e;return f(t,HTMLCanvasElement)?t:void 0};var rF=function e(e){if(!e)return{top:0,right:0,bottom:0,left:0};var t;var r=r_(e.paddingTop),n=r_(e.paddingRight),i=r_(e.paddingBottom),u=r_(e.paddingLeft),a=((t=e.padding)!==null&&t!==void 0?t:"").toString().split(" ").filter(function(e){return e.length>0});switch(a.length){case 0:break;case 1:r!==null&&r!==void 0?r:r=r_(a[0]),n!==null&&n!==void 0?n:n=r_(a[0]),i!==null&&i!==void 0?i:i=r_(a[0]),u!==null&&u!==void 0?u:u=r_(a[0]);break;case 2:r!==null&&r!==void 0?r:r=r_(a[0]),n!==null&&n!==void 0?n:n=r_(a[1]),i!==null&&i!==void 0?i:i=r_(a[0]),u!==null&&u!==void 0?u:u=r_(a[1]);break;case 3:r!==null&&r!==void 0?r:r=r_(a[0]),n!==null&&n!==void 0?n:n=r_(a[1]),i!==null&&i!==void 0?i:i=r_(a[2]),u!==null&&u!==void 0?u:u=r_(a[1]);break;case 4:default:r!==null&&r!==void 0?r:r=r_(a[0]),n!==null&&n!==void 0?n:n=r_(a[1]),i!==null&&i!==void 0?i:i=r_(a[2]),u!==null&&u!==void 0?u:u=r_(a[3]);break}return r!==null&&r!==void 0?r:r=0,n!==null&&n!==void 0?n:n=0,i!==null&&i!==void 0?i:i=0,u!==null&&u!==void 0?u:u=0,{top:r,right:n,bottom:i,left:u}};var rY=function e(e){var t=r_(e===null||e===void 0?void 0:e.left),r=r_(e===null||e===void 0?void 0:e.right),n=r_(e===null||e===void 0?void 0:e.top),i=r_(e===null||e===void 0?void 0:e.bottom),u=r_(e===null||e===void 0?void 0:e.width),a=r_(e===null||e===void 0?void 0:e.height);return u===void 0&&t!==void 0&&r!==void 0&&(u=r-t),a===void 0&&n!==void 0&&i!==void 0&&(a=i-n),{left:t,top:n,width:u,height:a}};var rK=function e(e,t){return!e&&!t?!1:!e||!t?!0:e.left!==t.left||e.top!==t.top||e.right!==t.right||e.bottom!==t.bottom||e.width!==t.width||e.height!==t.height};var rW=function e(e,t){nj!==null&&nj!==void 0?nj:nj=document.createElement("canvas");var r=nj.getContext("2d");return r?(r.font=t,r.measureText(e).width):0};var rZ=function e(e){if(isFinite(e))return e<=0?-1/0:20*Math.log10(e);throw new Error("linearToDecibel: Invalid linearVolume = "+e)};var rG=function e(e,t){return(e%t+t)%t};var rH=function e(e){if(!en(e)||e<0)throw new Error("romanize: Invalid n = "+e);for(var t=String(+e).split(""),r=["","C","CC","CCC","CD","D","DC","DCC","DCCC","CM","","X","XX","XXX","XL","L","LX","LXX","LXXX","XC","","I","II","III","IV","V","VI","VII","VIII","IX"],n="",i=3;i--;)n=(r[+t.pop()+i*10]||"")+n;return Array(+t.join("")+1).join("M")+n};var r$=function e(e){if(!en(e))throw new Error("toOrdinalNumber: Invalid n = "+e);var t=e.toString(),r=Number(t.charAt(t.length-1));return e===1||e>=20&&r===1?t+"st":e===2||e>=20&&r===2?t+"nd":e===3||e>=20&&r===3?t+"rd":t+"th"};var rJ=function e(e,t,r,n,i){return{x:e+(r-e)*i,y:t+(n-t)*i}};var rQ=function e(e,t,r,n,i){var u=(i-e)/(r-e);return t+(n-t)*u};var r0=function e(e,t,r){return Math.min(Math.max(e,t),r)};var r1=function e(e,t,r,n){var i=r-e,u=-(n-t),a=i,o=Math.sqrt(u*u+a*a);return o>0?(u/=o,a/=o):(u=0,a=1),{nx:u,ny:a}};var r2=function e(e){return e.reduce(function(e,t){return t+e},0)};var r3=function e(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++){t[r]=arguments[r]}return r2(t)/t.length};var r4=function e(e,t){return e<t?-1:e>t?1:0};var r8=function e(e){return new nH(e)};var r5=function e(){return"TsUtilsLib v2.1.0 (iife)"};var r7=Object.defineProperty;var r6=Object.getOwnPropertyDescriptor;var r9=Object.getOwnPropertyNames;var ne=Object.prototype.hasOwnProperty;var nt=function(e,t,r){return t in e?r7(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r};var nr=function(e,t){for(var r in t)r7(e,r,{get:t[r],enumerable:!0})},nn=function(e,t,r,n){var i=true,u=false,a=undefined;if(t&&(typeof t==="undefined"?"undefined":w(t))=="object"||typeof t=="function")try{var o=function(){var i=s.value;!ne.call(e,i)&&i!==r&&r7(e,i,{get:function(){return t[i]},enumerable:!(n=r6(t,i))||n.enumerable})};for(var l=r9(t)[Symbol.iterator](),s;!(i=(s=l.next()).done);i=true)o()}catch(e){u=true;a=e}finally{try{if(!i&&l.return!=null){l.return()}}finally{if(u){throw a}}}return e};var ni=function(e){return nn(r7({},"__esModule",{value:!0}),e)};var nu=function(e,t,r){return nt(e,(typeof t==="undefined"?"undefined":w(t))!="symbol"?t+"":t,r)};var na={};nr(na,{AnchoredRect:function(){return nD},Assert:function(){return no},BaseContainer:function(){return nT},BiMap:function(){return nW},Cookies:function(){return np},DefaultArray:function(){return nY},DefaultEqualityFn:function(){return nU},Device:function(){return nk},Guard:function(){return nc},IndexArray:function(){return nB},LRUCache:function(){return nX},LinkedList:function(){return nJ},MultiContainer:function(){return nH},Rect:function(){return nR},SignedIndexArray:function(){return nF},Stack:function(){return nq},TriMap:function(){return nZ},UniMap:function(){return nK},Utils:function(){return nP},ValueSet:function(){return nG},Vec:function(){return nL},asMulti:function(){return r8},getLibInfo:function(){return r5}});var no={};nr(no,{assert:function(){return eW},doesNotThrow:function(){return t4},doesThrow:function(){return t3},fail:function(){return e$},isArray:function(){return te},isArrayOrUndefined:function(){return tt},isBigInt:function(){return tE},isBoolean:function(){return th},isBooleanOrUndefined:function(){return tv},isDeepEqual:function(){return eQ},isDefined:function(){return e3},isEmptyArray:function(){return tr},isEmptyArrayOrUndefined:function(){return ti},isEmptyObject:function(){return e5},isEmptyString:function(){return to},isEmptyStringOrUndefined:function(){return tc},isEnumValue:function(){return tw},isEnumValueOrUndefined:function(){return tk},isEven:function(){return tJ},isFalse:function(){return tp},isFalseOrUndefined:function(){return tb},isFinite:function(){return tI},isFloat:function(){return tO},isFunction:function(){return tm},isFunctionOrUndefined:function(){return tg},isIncluded:function(){return t1},isIndex:function(){return t2},isInfinity:function(){return tD},isInteger:function(){return t_},isIntegerBetween:function(){return tU},isIntegerBetweenExclusive:function(){return tT},isIntegerEq:function(){return tP},isIntegerGt:function(){return tM},isIntegerGte:function(){return tV},isIntegerLt:function(){return tj},isIntegerLte:function(){return tz},isIntegerOrUndefined:function(){return tC},isMultipleOf:function(){return tQ},isNaNValue:function(){return tR},isNeg:function(){return tY},isNegInfinity:function(){return tB},isNegZero:function(){return tH},isNonEmptyArray:function(){return tn},isNonEmptyArrayOrUndefined:function(){return tu},isNonEmptyString:function(){return tl},isNonEmptyStringOrUndefined:function(){return tf},isNonNeg:function(){return tW},isNonNull:function(){return e4},isNonPos:function(){return tK},isNull:function(){return e1},isNullish:function(){return e2},isNumber:function(){return tS},isNumberBetween:function(){return tq},isNumberBetweenExclusive:function(){return tL},isNumberOrUndefined:function(){return tA},isNumericString:function(){return tx},isObject:function(){return e8},isObjectOrUndefined:function(){return e6},isOdd:function(){return t$},isPlainObject:function(){return e7},isPos:function(){return tF},isPosInfinity:function(){return tX},isPosZero:function(){return tG},isPowerOfTwo:function(){return t0},isSafeInteger:function(){return tN},isStrictEqual:function(){return eJ},isString:function(){return ta},isStringOrUndefined:function(){return ts},isTrue:function(){return ty},isTrueOrUndefined:function(){return td},isTypedObject:function(){return e9},isUndefined:function(){return e0},isZero:function(){return tZ},require:function(){return eZ},requireDefined:function(){return eG},requireElement:function(){return eH},setErrorClass:function(){return eY}});var nl={};nr(nl,{charCount:function(){return eB},chunkString:function(){return eL},insertAt:function(){return eD},isString:function(){return z},makeSentenceFromPascal:function(){return eF},removeAt:function(){return eX},repeatString:function(){return eq},replaceAt:function(){return eR},stringify:function(){return nv},toCharArray:function(){return eT}});var ns={};nr(ns,{deepEqual:function(){return nh},getCtorName:function(){return eU},hasProperties:function(){return ez},isObject:function(){return k}});var nc={};nr(nc,{doesNotThrow:function(){return eV},doesThrow:function(){return eM},isArray:function(){return N},isArrayOrUndefined:function(){return C},isBigInt:function(){return J},isBoolean:function(){return D},isBooleanOrUndefined:function(){return X},isDeepEqual:function(){return h},isDefined:function(){return p},isEmptyArray:function(){return P},isEmptyArrayOrUndefined:function(){return V},isEmptyObject:function(){return x},isEmptyString:function(){return U},isEmptyStringOrUndefined:function(){return L},isEnumValue:function(){return G},isEnumValueOrUndefined:function(){return H},isEven:function(){return eO},isFalse:function(){return Y},isFalseOrUndefined:function(){return K},isFinite:function(){return et},isFloat:function(){return er},isFunction:function(){return W},isFunctionOrUndefined:function(){return Z},isIncluded:function(){return eC},isIndex:function(){return eP},isInfinity:function(){return ep},isInteger:function(){return en},isIntegerBetween:function(){return ef},isIntegerBetweenExclusive:function(){return eh},isIntegerEq:function(){return ea},isIntegerGt:function(){return eo},isIntegerGte:function(){return el},isIntegerLt:function(){return es},isIntegerLte:function(){return ec},isIntegerOrUndefined:function(){return eu},isMultipleOf:function(){return e_},isNaNValue:function(){return ed},isNeg:function(){return ew},isNegInfinity:function(){return em},isNegZero:function(){return eA},isNonEmptyArray:function(){return M},isNonEmptyArrayOrUndefined:function(){return j},isNonEmptyString:function(){return T},isNonEmptyStringOrUndefined:function(){return R},isNonNeg:function(){return ex},isNonNull:function(){return b},isNonPos:function(){return ek},isNull:function(){return y},isNullish:function(){return d},isNumber:function(){return Q},isNumberBetween:function(){return ev},isNumberBetweenExclusive:function(){return ey},isNumberOrUndefined:function(){return ee},isNumericString:function(){return $},isObject:function(){return k},isObjectOrUndefined:function(){return A},isOdd:function(){return eI},isPlainObject:function(){return I},isPos:function(){return eg},isPosInfinity:function(){return eb},isPosZero:function(){return eS},isPowerOfTwo:function(){return eN},isSafeInteger:function(){return ei},isStrictEqual:function(){return s},isString:function(){return z},isStringOrUndefined:function(){return q},isTrue:function(){return B},isTrueOrUndefined:function(){return F},isTypedObject:function(){return O},isUndefined:function(){return v},isZero:function(){return eE},tryOr:function(){return ej}});var nf={};nr(nf,{forEachEnum:function(){return o},getEnumEntries:function(){return r},getEnumKey:function(){return n},getEnumKeys:function(){return e},getEnumValues:function(){return t}});function nh(e,t){if(e===t)return!0;if(e===null||t===null||(typeof e==="undefined"?"undefined":w(e))!="object"||(typeof t==="undefined"?"undefined":w(t))!="object")return!1;if(Array.isArray(e)&&Array.isArray(t))return e.length!==t.length?!1:e.every(function(e,r){return nh(e,t[r])});if(Array.isArray(e)!==Array.isArray(t))return!1;var r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;var i=true,u=false,a=undefined;try{for(var o=r[Symbol.iterator](),l;!(i=(l=o.next()).done);i=true){var s=l.value;if(!Object.prototype.hasOwnProperty.call(t,s)||!nh(e[s],t[s]))return!1}}catch(e){u=true;a=e}finally{try{if(!i&&o.return!=null){o.return()}}finally{if(u){throw a}}}return!0}function nv(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:5,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:new WeakSet;if(e===null)return"null";if(e===void 0)return"undefined";var n=typeof e==="undefined"?"undefined":w(e);switch(n){case"boolean":return e?"true":"false";case"number":return ed(e)?"NaN":et(e)?e.toString():e<0?"-Infinity":"Infinity";case"bigint":return"".concat(e,"n");case"string":return'"'.concat(e,'"');case"symbol":return e.description?"Symbol(".concat(e.description,")"):"Symbol()";case"function":return"[Function".concat(e.name?" ".concat(e.name):"","]")}if(r.has(e))return"[Circular]";if(t<=0)return"[Depth limit]";t--,r.add(e);var i=function(e){return nv(e,t,r)};if(N(e)){var u=e.map(function(e){return i(e)}).join(", ");return u.length===0?"[ ]":"[ ".concat(u," ]")}if(ArrayBuffer.isView(e)){if(f(e,DataView))return"DataView(".concat(e.byteLength,")");var a=Array.from(e).map(function(e){return i(e)}).join(", ");return"".concat(e.constructor.name,"[ ").concat(a," ]")}if(f(e,ArrayBuffer))return"ArrayBuffer(".concat(e.byteLength,")");if(f(e,Map)){var o=Array.from(e.entries()).map(function(e){var t=m(e,2),r=t[0],n=t[1];return"".concat(i(r)," => ").concat(i(n))}).join(", ");return o.length===0?"Map(".concat(e.size,"){ }"):"Map(".concat(e.size,"){ ").concat(o," }")}if(f(e,Set)){var l=Array.from(e.values()).map(function(e){return i(e)}).join(", ");return l.length===0?"Set(".concat(e.size,"){ }"):"Set(".concat(e.size,"){ ").concat(l," }")}if(f(e,WeakMap))return"WeakMap{ ? }";if(f(e,WeakSet))return"WeakSet{ ? }";if(f(e,Date))return'Date("'.concat(e.toISOString(),'")');if(f(e,RegExp))return e.toString();if(f(e,Error))return"".concat(e.name,'("').concat(e.message,'")');if(f(e,Promise))return"Promise{ ? }";if(f(e,URL))return'URL("'.concat(e.href,'")');if(f(e,URLSearchParams))return'URLSearchParams("'.concat(e.toString(),'")');if(e===Math)return"Math";if(e===JSON)return"JSON";if(e===Reflect)return"Reflect";if(e===Intl)return"Intl";if(typeof(e===null||e===void 0?void 0:e.toString)=="function"&&e.toString!==Object.prototype.toString)try{var s=e.toString();if(!/^\[object .+\]$/.test(s))return s}catch(e){}if(n==="object"){var c=eU(e),h=Object.entries(e).map(function(e){var t=m(e,2),r=t[0],n=t[1];return"".concat(i(r),": ").concat(i(n))});return h.length===0?"".concat(c,"{ }"):"".concat(c,"{ ").concat(h.join(", ")," }")}return String(e)}var ny=nv,nd=Error;var np={};nr(np,{accept:function(){return rt},decline:function(){return rr},erase:function(){return ro},eraseAll:function(){return rl},isConsentPending:function(){return re},read:function(){return ri},readBool:function(){return ra},readInt:function(){return ru},save:function(){return rn},setExpireDays:function(){return t9}});var nb="ConsentCookie";var nm,ng,nw=t7(nb);nm=nw==="accept"||nw==="decline"?nw:void 0;var nk={};nr(nk,{DPI:function(){return nS},FontSize:function(){return nO},HostAddress:function(){return nC},IsMobileDevice:function(){return nN},IsTouchDevice:function(){return n_},PxPerMm:function(){return nA},ScrollbarWidth:function(){return nI},mmToPx:function(){return rp},pxToMm:function(){return rd},toPx:function(){return rb}});var nx=/^(mm|cm|in|inch|px|em)$/,nE=/^([0-9\\.]+)(.*)$/,nS=rs(),nA=nS/25.4,nI=rc(),nO=rf(),n_=rh(),nN=rv(),nC=ry();var nP={};nr(nP,{Arr:function(){return nM},Dom:function(){return nV},Enum:function(){return nf},Math:function(){return nz},Obj:function(){return ns},Str:function(){return nl}});var nM={};nr(nM,{arrayContains:function(){return rI},chunckArray:function(){return rO},duplicate:function(){return rg},fillArray:function(){return rk},getRangeArray:function(){return rA},getSequenceArray:function(){return rE},isArray:function(){return N},mapRangeArray:function(){return rS},mapSequenceArray:function(){return rx},removeDuplicates:function(){return rw},toArray:function(){return rm}});var nV={};nr(nV,{addClass:function(){return rC},appendTo:function(){return rq},getButton:function(){return rX},getCanvas:function(){return rB},getCanvasTextWidth:function(){return rW},getDimension:function(){return rY},getHeight:function(){return rU},getOffset:function(){return rV},getPadding:function(){return rF},getWidth:function(){return rj},hasClass:function(){return rN},removeClass:function(){return rP},removeFromParent:function(){return rL},setHeight:function(){return rT},setOffset:function(){return rM},setRect:function(){return rD},setVisibility:function(){return rR},setWidth:function(){return rz},styleLayoutChanged:function(){return rK}});var nj;var nz={};nr(nz,{avg:function(){return r3},calcNormal:function(){return r1},clamp:function(){return r0},cmp:function(){return r4},interpolateCoord:function(){return rJ},interpolateY:function(){return rQ},isInteger:function(){return en},isNumber:function(){return Q},linearToDecibels:function(){return rZ},mod:function(){return rG},romanize:function(){return rH},sum:function(){return r2},toOrdinalNumber:function(){return r$}});var nU=function(e,t){return e===t},nT=function e(){u(this,e)};var nq=/*#__PURE__*/function(e){c(t,e);function t(){u(this,t);var e;e=i(this,t);nu(e,"data",[]);return e}l(t,[{key:"assertId",value:function e(e){return no.isIntegerBetween(e,0,this.length-1,"Stack index ".concat(e," out of range.")),e}},{key:"length",get:function e(){return this.data.length}},{key:"push",value:function e(e){return this.data.push(e),e}},{key:"pop",value:function e(){return this.assertId(this.length-1),this.data.pop()}},{key:"popOrUndef",value:function e(){return this.data.pop()}},{key:"popOr",value:function e(e){return this.isEmpty()?W(e)?e():e:this.data.pop()}},{key:"top",value:function e(){return this.data[this.assertId(this.length-1)]}},{key:"topOrUndef",value:function e(){return this.data[this.length-1]}},{key:"topOr",value:function e(e){return this.isEmpty()?W(e)?e():e:this.data[this.length-1]}},{key:"peek",value:function e(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;return this.data[this.assertId(this.data.length-1-e)]}},{key:"peekOrUndef",value:function e(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;return this.data[this.data.length-1-e]}},{key:"peekOr",value:function e(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,t=arguments.length>1?arguments[1]:void 0;var r=this.data.length-1-e,n=r<0?void 0:this.data[r];return n===void 0?W(t)?t():t:n}},{key:"values",value:function e(){var e;return E(this,function(t){switch(t.label){case 0:e=this.data.length-1;t.label=1;case 1:if(!(e>=0))return[3,4];return[4,this.data[e]];case 2:t.sent();t.label=3;case 3:e--;return[3,1];case 4:return[2]}})}},{key:Symbol.iterator,value:function e(){return E(this,function(e){switch(e.label){case 0:return[5,S(this.values())];case 1:e.sent();return[2]}})}},{key:"toArray",value:function e(){return g(this.data)}},{key:"isEmpty",value:function e(){return this.length===0}},{key:"clear",value:function e(){this.data.length=0}},{key:"toString",value:function e(){return"Stack(".concat(this.length,")").concat(nv(this.data))}}]);return t}(nT);var nL=/*#__PURE__*/function(e){c(t,e);function t(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++){r[n]=arguments[n]}u(this,t);var a;a=i(this,t);nu(a,"coords");if(r.length<2)throw new TypeError("Vec needs minumum two coords!");a.coords=r;return a}l(t,[{key:"dim",get:function e(){return this.coords.length}},{key:"length",get:function e(){var e;return(e=Math).hypot.apply(e,g(this.coords))}},{key:"magnitude",value:function e(){return this.length}},{key:"x",get:function e(){return this.coords[0]}},{key:"y",get:function e(){return this.coords[1]}},{key:"z",get:function e(){if(this.coords[2]===void 0)throw new TypeError("Vec z-coord not available!");return this.coords[2]}},{key:"add",value:function e(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++){r[n]=arguments[n]}var i=f(r[0],t)?r[0].coords:r;if(this.coords.length!==i.length)throw new TypeError("Coordinate length mismatch!");return a(t,g(this.coords.map(function(e,t){return e+i[t]})))}},{key:"sub",value:function e(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++){r[n]=arguments[n]}var i=f(r[0],t)?r[0].coords:r;if(this.coords.length!==i.length)throw new TypeError("Coordinate length mismatch!");return a(t,g(this.coords.map(function(e,t){return e-i[t]})))}},{key:"mul",value:function e(e){return a(t,g(this.coords.map(function(t){return t*e})))}},{key:"div",value:function e(e){return a(t,g(this.coords.map(function(t){return t/e})))}},{key:"dot",value:function e(e){if(this.coords.length!==e.coords.length)throw new TypeError("Coordinate length mismatch!");return this.coords.reduce(function(t,r,n){return t+r*e.coords[n]},0)}},{key:"distance",value:function e(e){var t;if(this.coords.length!==e.coords.length)throw new TypeError("Coordinate length mismatch!");return(t=Math).hypot.apply(t,g(this.coords.map(function(t,r){return t-e.coords[r]})))}},{key:"normalize",value:function e(){var e=this.length;if(e===0)throw new TypeError("Cannot normalize zero-length vector!");return this.div(e)}},{key:"toLength",value:function e(e){var t=this.length;return t===0?this:this.mul(e/t)}},{key:"clamp",value:function e(e,r,n){var i=this.length;if(i===0){if(e!==void 0){if(n&&n.coords.length!==this.coords.length)throw new TypeError("Coordinate length mismatch!");return(n&&n.length!==0?n.normalize():a(t,[1].concat(g(Array(this.coords.length-1).fill(0))))).mul(e)}return this}return r!==void 0&&i>r?this.normalize().mul(r):e!==void 0&&i<e?this.normalize().mul(e):this}},{key:"equals",value:function e(e){return this.coords.length===e.coords.length&&this.coords.every(function(t,r){return t===e.coords[r]})}},{key:"clone",value:function e(){return a(t,g(this.coords))}},{key:"toObject",value:function e(){return{x:this.x,y:this.y,z:this.z}}},{key:Symbol.iterator,value:function e(){return this.coords[Symbol.iterator]()}},{key:"toString",value:function e(){return"Vec(".concat(this.coords.join(", "),")")}}],[{key:"vec2",value:function e(e,r){return new t(e,r)}},{key:"vec3",value:function e(e,r,n){return new t(e,r,n)}},{key:"zero",value:function e(e){if(e<2)throw new TypeError("Vec.zero requires dimension >= 2");return a(t,g(Array(e).fill(0)))}},{key:"lerp",value:function e(e,t,r){if(e.coords.length!==t.coords.length)throw new TypeError("Coordinate length mismatch!");if(!et(r))throw new TypeError("Lerp t is not finite!");return e.add(t.sub(e).mul(r))}}]);return t}(nT);var nR=/*#__PURE__*/function(){function e(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++){r[n]=arguments[n]}u(this,e);nu(this,"x");nu(this,"y");nu(this,"width");nu(this,"height");if(r.length===0?this.x=this.y=this.width=this.height=0:r.length===2?(this.x=this.y=0,this.width=r[0],this.height=r[1]):(this.x=r[0],this.y=r[1],this.width=r[2],this.height=r[3]),this.width<0||this.height<0)throw new Error("Rect width and height must be non-negative.")}l(e,[{key:"set",value:function e(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++){t[r]=arguments[r]}if(t.length===0?this.x=this.y=this.width=this.height=0:t.length===2?(this.x=this.y=0,this.width=t[0],this.height=t[1]):(this.x=t[0],this.y=t[1],this.width=t[2],this.height=t[3]),this.width<0||this.height<0)throw new Error("Rect width and height must be non-negative.");return this}},{key:"left",get:function e(){return this.x}},{key:"top",get:function e(){return this.y}},{key:"right",get:function e(){return this.x+this.width}},{key:"bottom",get:function e(){return this.y+this.height}},{key:"centerX",get:function e(){return this.x+this.width/2}},{key:"centerY",get:function e(){return this.y+this.height/2}},{key:"center",get:function e(){return{x:this.centerX,y:this.centerY}}},{key:"area",get:function e(){return this.width*this.height}},{key:"isEmpty",get:function e(){return this.width<=0||this.height<=0}},{key:"containsPoint",value:function e(e,t){return e>=this.left&&e<=this.right&&t>=this.top&&t<=this.bottom}},{key:"containsRect",value:function e(e){return e.left>=this.left&&e.right<=this.right&&e.top>=this.top&&e.bottom<=this.bottom}},{key:"intersects",value:function e(e){return!(e.right<this.left||e.left>this.right||e.bottom<this.top||e.top>this.bottom)}},{key:"intersectionCopy",value:function t(t){var r=Math.max(this.left,t.left),n=Math.max(this.top,t.top),i=Math.min(this.right,t.right),u=Math.min(this.bottom,t.bottom);return i<=r||u<=n?new e:new e(r,n,i-r,u-n)}},{key:"unionCopy",value:function t(t){var r=Math.min(this.left,t.left),n=Math.min(this.top,t.top),i=Math.max(this.right,t.right),u=Math.max(this.bottom,t.bottom);return new e(r,n,i-r,u-n)}},{key:"insetCopy",value:function t(t,r){return new e(this.x+t,this.y+r,this.width-2*t,this.height-2*r)}},{key:"inflateCopy",value:function t(t,r){return new e(this.x-t,this.y-r,this.width+2*t,this.height+2*r)}},{key:"offsetInPlace",value:function e(e,t){return this.x+=e,this.y+=t,this}},{key:"offsetCopy",value:function t(t,r){return new e(this.x+t,this.y+r,this.width,this.height)}},{key:"scaleInPlace",value:function e(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:e;return this.x=this.centerX-this.width*e/2,this.width*=e,this.y=this.centerY-this.height*t/2,this.height*=t,this}},{key:"scaleCopy",value:function e(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:e;return this.clone().scaleInPlace(e,t)}},{key:"roundCopy",value:function t(){var t=Math.round(this.left),r=Math.round(this.top),n=Math.round(this.right),i=Math.round(this.bottom);return new e(t,r,n-t,i-r)}},{key:"floorCopy",value:function t(){var t=Math.floor(this.left),r=Math.floor(this.top),n=Math.floor(this.right),i=Math.floor(this.bottom);return new e(t,r,n-t,i-r)}},{key:"ceilCopy",value:function t(){var t=Math.ceil(this.left),r=Math.ceil(this.top),n=Math.ceil(this.right),i=Math.ceil(this.bottom);return new e(t,r,n-t,i-r)}},{key:"expandCopy",value:function t(t,r){var n=Math.min(this.left,t),i=Math.min(this.top,r),u=Math.max(this.right,t),a=Math.max(this.bottom,r);return new e(n,i,u-n,a-i)}},{key:"equals",value:function e(e){return this.x===e.x&&this.y===e.y&&this.width===e.width&&this.height===e.height}},{key:"clone",value:function t(){return new e(this.x,this.y,this.width,this.height)}},{key:"toString",value:function e(){return"Rect(x=".concat(this.x,", y=").concat(this.y,", w=").concat(this.width,", h=").concat(this.height,")")}},{key:"toAnchoredRect",value:function e(){return new nD(this.left,this.right,this.top,this.bottom)}}],[{key:"fromPoints",value:function t(t,r){var n=Math.min(t.x,r.x),i=Math.min(t.y,r.y),u=Math.abs(t.x-r.x),a=Math.abs(t.y-r.y);return new e(n,i,u,a)}},{key:"fromCenter",value:function t(t,r,n,i){return new e(t-n/2,r-i/2,n,i)}}]);return e}();var nD=/*#__PURE__*/function(){function e(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++){r[n]=arguments[n]}u(this,e);nu(this,"left");nu(this,"anchorX");nu(this,"right");nu(this,"top");nu(this,"anchorY");nu(this,"bottom");if(r.length===6)this.left=r[0],this.anchorX=r[1],this.right=r[2],this.top=r[3],this.anchorY=r[4],this.bottom=r[5];else if(r.length===4)this.left=r[0],this.right=r[1],this.anchorX=(this.left+this.right)/2,this.top=r[2],this.bottom=r[3],this.anchorY=(this.top+this.bottom)/2;else if(r.length===0)this.left=this.anchorX=this.right=0,this.top=this.anchorY=this.bottom=0;else throw new TypeError("Invalid AnchoredRect args: ".concat(r))}l(e,[{key:"set",value:function e(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++){t[r]=arguments[r]}if(t.length===6)this.left=t[0],this.anchorX=t[1],this.right=t[2],this.top=t[3],this.anchorY=t[4],this.bottom=t[5];else if(t.length===4)this.left=t[0],this.right=t[1],this.anchorX=(this.left+this.right)/2,this.top=t[2],this.bottom=t[3],this.anchorY=(this.top+this.bottom)/2;else if(t.length===0)this.left=this.anchorX=this.right=0,this.top=this.anchorY=this.bottom=0;else throw new TypeError("Invalid AnchoredRect args: ".concat(t));return this}},{key:"centerX",get:function e(){return this.left+this.width/2}},{key:"centerY",get:function e(){return this.top+this.height/2}},{key:"width",get:function e(){return this.right-this.left}},{key:"height",get:function e(){return this.bottom-this.top}},{key:"leftw",get:function e(){return this.anchorX-this.left}},{key:"rightw",get:function e(){return this.right-this.anchorX}},{key:"toph",get:function e(){return this.anchorY-this.top}},{key:"bottomh",get:function e(){return this.bottom-this.anchorY}},{key:"contains",value:function e(e,t){return e>=this.left&&e<=this.right&&t>=this.top&&t<=this.bottom}},{key:"equals",value:function t(t){return e.equals(this,t)}},{key:"equalsEdges",value:function t(t){return e.equalsEdges(this,t)}},{key:"clone",value:function t(){return new e(this.left,this.anchorX,this.right,this.top,this.anchorY,this.bottom)}},{key:"offsetInPlace",value:function e(e,t){return this.left+=e,this.anchorX+=e,this.right+=e,this.top+=t,this.anchorY+=t,this.bottom+=t,this}},{key:"offsetCopy",value:function e(e,t){return this.clone().offsetInPlace(e,t)}},{key:"expandInPlace",value:function e(e){return this.left=Math.min(this.left,e.left),this.right=Math.max(this.right,e.right),this.top=Math.min(this.top,e.top),this.bottom=Math.max(this.bottom,e.bottom),this}},{key:"expandCopy",value:function e(e){return this.clone().expandInPlace(e)}},{key:"clipInPlace",value:function e(e){return this.left=Math.max(this.left,e.left),this.right=Math.min(this.right,e.right),this.anchorX=r0(this.anchorX,this.left,this.right),this.top=Math.max(this.top,e.top),this.bottom=Math.min(this.bottom,e.bottom),this.anchorY=r0(this.anchorY,this.top,this.bottom),this}},{key:"clipCopy",value:function e(e){return this.clone().clipInPlace(e)}},{key:"scaleInPlace",value:function e(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:e;return this.left=this.anchorX-this.leftw*e,this.right=this.anchorX+this.rightw*e,this.top=this.anchorY-this.toph*t,this.bottom=this.anchorY+this.bottomh*t,this}},{key:"scaleCopy",value:function e(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:e;return this.clone().scaleInPlace(e,t)}},{key:"getRect",value:function e(){return this}},{key:"toRect",value:function e(){return new nR(this.left,this.right,this.width,this.height)}},{key:"toString",value:function e(){return"Rect(left=".concat(this.left,", anchorX=").concat(this.anchorX,", right=").concat(this.right,", top=").concat(this.top,", anchorY=").concat(this.anchorY,", bottom=").concat(this.bottom,")")}}],[{key:"create",value:function t(t,r,n,i){return new e(t,t+n,r,r+i)}},{key:"createCentered",value:function t(t,r,n,i){return new e(t-n/2,t,t+n/2,r-i/2,r,r+i/2)}},{key:"createSections",value:function t(t,r,n,i){return new e(-t,0,r,-n,0,i)}},{key:"overlap",value:function e(e,t){return e.right>t.left&&e.left<t.right&&e.bottom>t.top&&e.top<t.bottom}},{key:"overlapX",value:function e(e,t){return e.right>t.left&&e.left<t.right}},{key:"equals",value:function e(e,t){return e==null&&t==null?!0:e==null||t==null?!1:e===t||e.left===t.left&&e.anchorX===t.anchorX&&e.right===t.right&&e.top===t.top&&e.anchorY===t.anchorY&&e.bottom===t.bottom}},{key:"equalsEdges",value:function e(e,t){return e==null&&t==null?!0:e==null||t==null?!1:e===t||e.left===t.left&&e.right===t.right&&e.top===t.top&&e.bottom===t.bottom}}]);return e}();var nX=/*#__PURE__*/function(e){c(t,e);function t(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1/0;u(this,t);var n;n=i(this,t);nu(n,"cache");nu(n,"next");nu(n,"prev");nu(n,"head");nu(n,"tail");nu(n,"capacity");nu(n,"size");nu(n,"maxKeyLength");n.cache=Object.create(null),n.next=Object.create(null),n.prev=Object.create(null),n.head=null,n.tail=null,n.capacity=e,n.size=0,n.maxKeyLength=r;return n}l(t,[{key:"get",value:function e(e){if(!(e.length>this.maxKeyLength)&&this.cache[e]!==void 0)return this.touch(e),this.cache[e]}},{key:"set",value:function e(e,t){if(!(e.length>this.maxKeyLength)){if(this.cache[e]!==void 0){this.cache[e]=t,this.touch(e);return}this.size>=this.capacity&&this.evict(),this.cache[e]=t,this.addToTail(e),this.size++}}},{key:"touch",value:function e(e){this.tail!==e&&(this.removeKey(e),this.addToTail(e))}},{key:"evict",value:function e(){if(this.head!==null){var e=this.head;this.removeKey(e),delete this.cache[e],this.size--}}},{key:"removeKey",value:function e(e){var t=this.prev[e],r=this.next[e];t!==void 0?this.next[t]=r:this.head=r!==null&&r!==void 0?r:null,r!==void 0?this.prev[r]=t:this.tail=t!==null&&t!==void 0?t:null,delete this.prev[e],delete this.next[e]}},{key:"addToTail",value:function e(e){this.tail!==null?(this.next[this.tail]=e,this.prev[e]=this.tail):this.head=e,this.tail=e}},{key:"keys",value:function e(){var e;return E(this,function(t){switch(t.label){case 0:e=this.head;t.label=1;case 1:if(!(e!=null))return[3,4];return[4,e];case 2:t.sent();t.label=3;case 3:e=this.next[e];return[3,1];case 4:return[2]}})}},{key:"values",value:function e(){var e;return E(this,function(t){switch(t.label){case 0:e=this.head;t.label=1;case 1:if(!(e!=null))return[3,4];return[4,this.cache[e]];case 2:t.sent();t.label=3;case 3:e=this.next[e];return[3,1];case 4:return[2]}})}},{key:"entries",value:function e(){var e;return E(this,function(t){switch(t.label){case 0:e=this.head;t.label=1;case 1:if(!(e!=null))return[3,4];return[4,[e,this.cache[e]]];case 2:t.sent();t.label=3;case 3:e=this.next[e];return[3,1];case 4:return[2]}})}},{key:Symbol.iterator,value:function e(){return E(this,function(e){switch(e.label){case 0:return[5,S(this.entries())];case 1:e.sent();return[2]}})}},{key:"toString",value:function e(){var e=g(this.entries());return e.length===0?"LRUCache(0){ }":"LRUCache(".concat(e.length,"){ ").concat(e.map(function(e){return"".concat(nv(e[0]),": ").concat(nv(e[1]))}).join(", ")," }")}}]);return t}(nT);var nB=/*#__PURE__*/function(e){c(t,e);function t(e){u(this,t);var r;r=i(this,t);nu(r,"posVal");nu(r,"hasPos");nu(r,"valCount");var n=true,a=false,o=undefined;if(f(e,t))r.posVal=e.posVal.slice(),r.hasPos=e.hasPos.slice(),r.valCount=e.valCount;else if(r.posVal=[],r.hasPos=[],r.valCount=0,e)try{for(var l=e[Symbol.iterator](),s;!(n=(s=l.next()).done);n=true){var c=m(s.value,2),h=c[0],v=c[1];r.set(h,v)}}catch(e){a=true;o=e}finally{try{if(!n&&l.return!=null){l.return()}}finally{if(a){throw o}}}return r}l(t,[{key:"posLen",get:function e(){return this.hasPos.length}},{key:"size",get:function e(){return this.valCount}},{key:"length",get:function e(){return this.hasPos.length}},{key:"trimRight",value:function e(){var e=this.length;for(;e>0&&this.hasPos[e-1]!==!0;)e--;e<this.length&&(this.posVal.length=this.hasPos.length=e)}},{key:"isEmpty",value:function e(){return this.size===0}},{key:"has",value:function e(e){return t.validateIndex(e),this.hasPos[e]===!0}},{key:"set",value:function e(e,r){t.validateIndex(e),this.hasPos[e]!==!0&&this.valCount++,this.posVal[e]=r,this.hasPos[e]=!0}},{key:"get",value:function e(e){return t.validateIndex(e),this.hasPos[e]?this.posVal[e]:void 0}},{key:"getOrDefault",value:function e(e,t){var r;return(r=this.get(e))!==null&&r!==void 0?r:t}},{key:"getOrCreate",value:function e(e,t){if(!this.has(e)){var r=W(t)?t():t;return this.set(e,r),r}return this.get(e)}},{key:"delete",value:function e(e){return t.validateIndex(e),this.hasPos[e]?(this.posVal[e]=void 0,this.hasPos[e]=!1,this.valCount--,this.trimRight(),!0):!1}},{key:"clear",value:function e(){this.posVal=[],this.hasPos=[],this.valCount=0}},{key:"forEach",value:function e(e,t){var r=true,n=false,i=undefined;try{for(var u=this.entries()[Symbol.iterator](),a;!(r=(a=u.next()).done);r=true){var o=m(a.value,2),l=o[0],s=o[1];e.call(t,s,l,this)}}catch(e){n=true;i=e}finally{try{if(!r&&u.return!=null){u.return()}}finally{if(n){throw i}}}}},{key:"indices",value:function e(){var e,t;return E(this,function(r){switch(r.label){case 0:e=0;r.label=1;case 1:if(!(e<this.posLen))return[3,5];t=this.hasPos[e];if(!t)return[3,3];return[4,e];case 2:t=r.sent();r.label=3;case 3:t;r.label=4;case 4:e++;return[3,1];case 5:return[2]}})}},{key:"values",value:function e(){var e,t;return E(this,function(r){switch(r.label){case 0:e=0;r.label=1;case 1:if(!(e<this.posLen))return[3,5];t=this.hasPos[e];if(!t)return[3,3];return[4,this.posVal[e]];case 2:t=r.sent();r.label=3;case 3:t;r.label=4;case 4:e++;return[3,1];case 5:return[2]}})}},{key:"entries",value:function e(){var e,t;return E(this,function(r){switch(r.label){case 0:e=0;r.label=1;case 1:if(!(e<this.posLen))return[3,5];t=this.hasPos[e];if(!t)return[3,3];return[4,[e,this.posVal[e]]];case 2:t=r.sent();r.label=3;case 3:t;r.label=4;case 4:e++;return[3,1];case 5:return[2]}})}},{key:"indicesArray",value:function e(){return g(this.indices())}},{key:"valuesArray",value:function e(){return g(this.values())}},{key:"entriesArray",value:function e(){return g(this.entries())}},{key:"kvKeys",value:function e(){var e,t,r,n,i,u,a;return E(this,function(o){switch(o.label){case 0:e=true,t=false,r=undefined;o.label=1;case 1:o.trys.push([1,6,7,8]);n=this.indices()[Symbol.iterator]();o.label=2;case 2:if(!!(e=(i=n.next()).done))return[3,5];u=i.value;return[4,[u]];case 3:o.sent();o.label=4;case 4:e=true;return[3,2];case 5:return[3,8];case 6:a=o.sent();t=true;r=a;return[3,8];case 7:try{if(!e&&n.return!=null){n.return()}}finally{if(t){throw r}}return[7];case 8:return[2]}})}},{key:"kvValues",value:function e(){var e,t,r,n,i,u,a;return E(this,function(o){switch(o.label){case 0:e=true,t=false,r=undefined;o.label=1;case 1:o.trys.push([1,6,7,8]);n=this.values()[Symbol.iterator]();o.label=2;case 2:if(!!(e=(i=n.next()).done))return[3,5];u=i.value;return[4,u];case 3:o.sent();o.label=4;case 4:e=true;return[3,2];case 5:return[3,8];case 6:a=o.sent();t=true;r=a;return[3,8];case 7:try{if(!e&&n.return!=null){n.return()}}finally{if(t){throw r}}return[7];case 8:return[2]}})}},{key:"kvEntries",value:function e(){var e,t,r,n,i,u,a,o,l;return E(this,function(s){switch(s.label){case 0:e=true,t=false,r=undefined;s.label=1;case 1:s.trys.push([1,6,7,8]);n=this.entries()[Symbol.iterator]();s.label=2;case 2:if(!!(e=(i=n.next()).done))return[3,5];u=m(i.value,2),a=u[0],o=u[1];return[4,[[a],o]];case 3:s.sent();s.label=4;case 4:e=true;return[3,2];case 5:return[3,8];case 6:l=s.sent();t=true;r=l;return[3,8];case 7:try{if(!e&&n.return!=null){n.return()}}finally{if(t){throw r}}return[7];case 8:return[2]}})}},{key:Symbol.iterator,value:function e(){return E(this,function(e){switch(e.label){case 0:return[5,S(this.entries())];case 1:e.sent();return[2]}})}},{key:"clone",value:function e(){return new t(this)}},{key:"merge",value:function e(e,t){var r=true,n=false,i=undefined;try{for(var u=e.entries()[Symbol.iterator](),a;!(r=(a=u.next()).done);r=true){var o=m(a.value,2),l=o[0],s=o[1];this.has(l)&&t?this.set(l,t(this.get(l),s,l)):this.set(l,s)}}catch(e){n=true;i=e}finally{try{if(!r&&u.return!=null){u.return()}}finally{if(n){throw i}}}return this}},{key:"some",value:function e(e){var t=true,r=false,n=undefined;try{for(var i=this.entries()[Symbol.iterator](),u;!(t=(u=i.next()).done);t=true){var a=m(u.value,2),o=a[0],l=a[1];if(e(l,o))return!0}}catch(e){r=true;n=e}finally{try{if(!t&&i.return!=null){i.return()}}finally{if(r){throw n}}}return!1}},{key:"every",value:function e(e){var t=true,r=false,n=undefined;try{for(var i=this.entries()[Symbol.iterator](),u;!(t=(u=i.next()).done);t=true){var a=m(u.value,2),o=a[0],l=a[1];if(!e(l,o))return!1}}catch(e){r=true;n=e}finally{try{if(!t&&i.return!=null){i.return()}}finally{if(r){throw n}}}return!0}},{key:"filter",value:function e(e){var t=new this.constructor;var r=true,n=false,i=undefined;try{for(var u=this.entries()[Symbol.iterator](),a;!(r=(a=u.next()).done);r=true){var o=m(a.value,2),l=o[0],s=o[1];e(s,l,this)&&t.set(l,s)}}catch(e){n=true;i=e}finally{try{if(!r&&u.return!=null){u.return()}}finally{if(n){throw i}}}return t}},{key:"reduce",value:function e(e,t){var r=this.entries(),n=r.next();if(n.done){if(arguments.length<2)throw new TypeError("Reduce of empty IndexArray with no initial value!");return t}var i,u;arguments.length<2?(i=n.value[1],u=r.next()):(i=t,u=n);for(var a=u;!a.done;a=r.next()){var o=m(a.value,2),l=o[0],s=o[1];i=e(i,s,l)}return i}},{key:"mapToArray",value:function e(e){var t=[];var r=true,n=false,i=undefined;try{for(var u=this.entries()[Symbol.iterator](),a;!(r=(a=u.next()).done);r=true){var o=m(a.value,2),l=o[0],s=o[1];t.push(e(s,l))}}catch(e){n=true;i=e}finally{try{if(!r&&u.return!=null){u.return()}}finally{if(n){throw i}}}return t}},{key:"map",value:function e(e){var r=new t;var n=true,i=false,u=undefined;try{for(var a=this.entries()[Symbol.iterator](),o;!(n=(o=a.next()).done);n=true){var l=m(o.value,2),s=l[0],c=l[1];r.set(s,e(c,s))}}catch(e){i=true;u=e}finally{try{if(!n&&a.return!=null){a.return()}}finally{if(i){throw u}}}return r}},{key:"equals",value:function e(e,t){if(this.size!==e.size)return!1;t!==null&&t!==void 0?t:t=function(e,t){return e===t};var r=Math.max(this.posLen,e.posLen);for(var n=0;n<r;++n){var i=this.hasPos[n],u=e.hasPos[n];if(i!==u||i&&!t(this.posVal[n],e.posVal[n]))return!1}return!0}},{key:"toArray",value:function e(){return this.valuesArray()}},{key:"toString",value:function e(){var e=!0;for(var t=0;t<this.hasPos.length&&e;t++)this.hasPos[t]||(e=!1);if(e)return nv(this.posVal.slice(0,this.hasPos.length));var r=this.entriesArray().map(function(e){var t=m(e,2),r=t[0],n=t[1];return"".concat(nv(r),": ").concat(nv(n))}).join(", ");return r.length===0?"[ ]":"[ ".concat(r," ]")}}],[{key:"validateIndex",value:function e(e){if(!el(e,0))throw new Error("Invalid index ".concat(e," - must be an integer >= 0!"));return e}}]);return t}(nT);var nF=/*#__PURE__*/function(e){c(t,e);function t(e){u(this,t);var r;r=i(this,t);nu(r,"posVal");nu(r,"hasPos");nu(r,"negVal");nu(r,"hasNeg");nu(r,"valCount");var n=true,a=false,o=undefined;if(f(e,t))r.negVal=e.negVal.slice(),r.hasNeg=e.hasNeg.slice(),r.posVal=e.posVal.slice(),r.hasPos=e.hasPos.slice(),r.valCount=e.valCount;else if(r.negVal=[],r.hasNeg=[],r.posVal=[],r.hasPos=[],r.valCount=0,e)try{for(var l=e[Symbol.iterator](),s;!(n=(s=l.next()).done);n=true){var c=m(s.value,2),h=c[0],v=c[1];r.set(h,v)}}catch(e){a=true;o=e}finally{try{if(!n&&l.return!=null){l.return()}}finally{if(a){throw o}}}return r}l(t,[{key:"size",get:function e(){return this.valCount}},{key:"isEmpty",value:function e(){return this.size===0}},{key:"posLen",get:function e(){return this.hasPos.length}},{key:"negLen",get:function e(){return this.hasNeg.length}},{key:"has",value:function e(e){return t.validateIndex(e),e>=0?this.hasPos[e]===!0:this.hasNeg[t.toNegIndex(e)]===!0}},{key:"set",value:function e(e,r){if(t.validateIndex(e),e>=0)this.hasPos[e]!==!0&&this.valCount++,this.posVal[e]=r,this.hasPos[e]=!0;else{var n=t.toNegIndex(e);this.hasNeg[n]!==!0&&this.valCount++,this.negVal[n]=r,this.hasNeg[n]=!0}}},{key:"get",value:function e(e){if(t.validateIndex(e),e>=0)return this.hasPos[e]?this.posVal[e]:void 0;{var r=t.toNegIndex(e);return this.hasNeg[r]?this.negVal[r]:void 0}}},{key:"getOrDefault",value:function e(e,t){var r;return(r=this.get(e))!==null&&r!==void 0?r:t}},{key:"getOrCreate",value:function e(e,t){if(!this.has(e)){var r=W(t)?t():t;return this.set(e,r),r}return this.get(e)}},{key:"delete",value:function e(e){t.validateIndex(e);var r=e>=0,n=r?this.posVal:this.negVal,i=r?this.hasPos:this.hasNeg,u=r?e:t.toNegIndex(e);return i[u]?(n[u]=void 0,i[u]=!1,this.valCount--,!0):!1}},{key:"clear",value:function e(){this.negVal=[],this.hasNeg=[],this.posVal=[],this.hasPos=[],this.valCount=0}},{key:"forEach",value:function e(e,t){var r=true,n=false,i=undefined;try{for(var u=this.entries()[Symbol.iterator](),a;!(r=(a=u.next()).done);r=true){var o=m(a.value,2),l=o[0],s=o[1];e.call(t,s,l,this)}}catch(e){n=true;i=e}finally{try{if(!r&&u.return!=null){u.return()}}finally{if(n){throw i}}}}},{key:"indices",value:function e(){var e,r,n,i;return E(this,function(u){switch(u.label){case 0:e=this.negLen-1;u.label=1;case 1:if(!(e>=0))return[3,5];r=this.hasNeg[e];if(!r)return[3,3];return[4,t.toNegIndex(e)];case 2:r=u.sent();u.label=3;case 3:r;u.label=4;case 4:e--;return[3,1];case 5:n=0;u.label=6;case 6:if(!(n<this.posLen))return[3,10];i=this.hasPos[n];if(!i)return[3,8];return[4,n];case 7:i=u.sent();u.label=8;case 8:i;u.label=9;case 9:n++;return[3,6];case 10:return[2]}})}},{key:"values",value:function e(){var e,t,r,n;return E(this,function(i){switch(i.label){case 0:e=this.negLen-1;i.label=1;case 1:if(!(e>=0))return[3,5];t=this.hasNeg[e];if(!t)return[3,3];return[4,this.negVal[e]];case 2:t=i.sent();i.label=3;case 3:t;i.label=4;case 4:e--;return[3,1];case 5:r=0;i.label=6;case 6:if(!(r<this.posLen))return[3,10];n=this.hasPos[r];if(!n)return[3,8];return[4,this.posVal[r]];case 7:n=i.sent();i.label=8;case 8:n;i.label=9;case 9:r++;return[3,6];case 10:return[2]}})}},{key:"entries",value:function e(){var e,r,n,i;return E(this,function(u){switch(u.label){case 0:e=this.negLen-1;u.label=1;case 1:if(!(e>=0))return[3,5];r=this.hasNeg[e];if(!r)return[3,3];return[4,[t.toNegIndex(e),this.negVal[e]]];case 2:r=u.sent();u.label=3;case 3:r;u.label=4;case 4:e--;return[3,1];case 5:n=0;u.label=6;case 6:if(!(n<this.posLen))return[3,10];i=this.hasPos[n];if(!i)return[3,8];return[4,[n,this.posVal[n]]];case 7:i=u.sent();u.label=8;case 8:i;u.label=9;case 9:n++;return[3,6];case 10:return[2]}})}},{key:"indicesArray",value:function e(){return g(this.indices())}},{key:"valuesArray",value:function e(){return g(this.values())}},{key:"entriesArray",value:function e(){return g(this.entries())}},{key:"kvKeys",value:function e(){var e,t,r,n,i,u,a;return E(this,function(o){switch(o.label){case 0:e=true,t=false,r=undefined;o.label=1;case 1:o.trys.push([1,6,7,8]);n=this.indices()[Symbol.iterator]();o.label=2;case 2:if(!!(e=(i=n.next()).done))return[3,5];u=i.value;return[4,[u]];case 3:o.sent();o.label=4;case 4:e=true;return[3,2];case 5:return[3,8];case 6:a=o.sent();t=true;r=a;return[3,8];case 7:try{if(!e&&n.return!=null){n.return()}}finally{if(t){throw r}}return[7];case 8:return[2]}})}},{key:"kvValues",value:function e(){var e,t,r,n,i,u,a;return E(this,function(o){switch(o.label){case 0:e=true,t=false,r=undefined;o.label=1;case 1:o.trys.push([1,6,7,8]);n=this.values()[Symbol.iterator]();o.label=2;case 2:if(!!(e=(i=n.next()).done))return[3,5];u=i.value;return[4,u];case 3:o.sent();o.label=4;case 4:e=true;return[3,2];case 5:return[3,8];case 6:a=o.sent();t=true;r=a;return[3,8];case 7:try{if(!e&&n.return!=null){n.return()}}finally{if(t){throw r}}return[7];case 8:return[2]}})}},{key:"kvEntries",value:function e(){var e,t,r,n,i,u,a,o,l;return E(this,function(s){switch(s.label){case 0:e=true,t=false,r=undefined;s.label=1;case 1:s.trys.push([1,6,7,8]);n=this.entries()[Symbol.iterator]();s.label=2;case 2:if(!!(e=(i=n.next()).done))return[3,5];u=m(i.value,2),a=u[0],o=u[1];return[4,[[a],o]];case 3:s.sent();s.label=4;case 4:e=true;return[3,2];case 5:return[3,8];case 6:l=s.sent();t=true;r=l;return[3,8];case 7:try{if(!e&&n.return!=null){n.return()}}finally{if(t){throw r}}return[7];case 8:return[2]}})}},{key:Symbol.iterator,value:function e(){return E(this,function(e){switch(e.label){case 0:return[5,S(this.entries())];case 1:e.sent();return[2]}})}},{key:"clone",value:function e(){return new t(this)}},{key:"merge",value:function e(e,t){var r=true,n=false,i=undefined;try{for(var u=e.entries()[Symbol.iterator](),a;!(r=(a=u.next()).done);r=true){var o=m(a.value,2),l=o[0],s=o[1];this.has(l)&&t?this.set(l,t(this.get(l),s,l)):this.set(l,s)}}catch(e){n=true;i=e}finally{try{if(!r&&u.return!=null){u.return()}}finally{if(n){throw i}}}return this}},{key:"some",value:function e(e){var t=true,r=false,n=undefined;try{for(var i=this.entries()[Symbol.iterator](),u;!(t=(u=i.next()).done);t=true){var a=m(u.value,2),o=a[0],l=a[1];if(e(l,o))return!0}}catch(e){r=true;n=e}finally{try{if(!t&&i.return!=null){i.return()}}finally{if(r){throw n}}}return!1}},{key:"every",value:function e(e){var t=true,r=false,n=undefined;try{for(var i=this.entries()[Symbol.iterator](),u;!(t=(u=i.next()).done);t=true){var a=m(u.value,2),o=a[0],l=a[1];if(!e(l,o))return!1}}catch(e){r=true;n=e}finally{try{if(!t&&i.return!=null){i.return()}}finally{if(r){throw n}}}return!0}},{key:"filter",value:function e(e){var t=new this.constructor;var r=true,n=false,i=undefined;try{for(var u=this.entries()[Symbol.iterator](),a;!(r=(a=u.next()).done);r=true){var o=m(a.value,2),l=o[0],s=o[1];e(s,l,this)&&t.set(l,s)}}catch(e){n=true;i=e}finally{try{if(!r&&u.return!=null){u.return()}}finally{if(n){throw i}}}return t}},{key:"reduce",value:function e(e,t){var r=this.entries(),n=r.next();if(n.done){if(arguments.length<2)throw new TypeError("Reduce of empty SignedIndexArray with no initial value!");return t}var i,u;arguments.length<2?(i=n.value[1],u=r.next()):(i=t,u=n);for(var a=u;!a.done;a=r.next()){var o=m(a.value,2),l=o[0],s=o[1];i=e(i,s,l)}return i}},{key:"mapToArray",value:function e(e){var t=[];var r=true,n=false,i=undefined;try{for(var u=this.entries()[Symbol.iterator](),a;!(r=(a=u.next()).done);r=true){var o=m(a.value,2),l=o[0],s=o[1];t.push(e(s,l))}}catch(e){n=true;i=e}finally{try{if(!r&&u.return!=null){u.return()}}finally{if(n){throw i}}}return t}},{key:"map",value:function e(e){var r=new t;var n=true,i=false,u=undefined;try{for(var a=this.entries()[Symbol.iterator](),o;!(n=(o=a.next()).done);n=true){var l=m(o.value,2),s=l[0],c=l[1];r.set(s,e(c,s))}}catch(e){i=true;u=e}finally{try{if(!n&&a.return!=null){a.return()}}finally{if(i){throw u}}}return r}},{key:"equals",value:function e(e,t){if(this.size!==e.size)return!1;t!==null&&t!==void 0?t:t=function(e,t){return e===t};var r=Math.max(this.posLen,e.posLen);for(var n=0;n<r;++n){var i=this.hasPos[n],u=e.hasPos[n];if(i!==u||i&&!t(this.posVal[n],e.posVal[n]))return!1}var a=Math.max(this.negLen,e.negLen);for(var o=0;o<a;++o){var l=this.hasNeg[o],s=e.hasNeg[o];if(l!==s||l&&!t(this.negVal[o],e.negVal[o]))return!1}return!0}},{key:"toArray",value:function e(){return this.valuesArray()}},{key:"toString",value:function e(){var e=this.hasNeg.length===0;for(var t=0;t<this.hasPos.length&&e;t++)this.hasPos[t]||(e=!1);if(e)return nv(this.posVal.slice(0,this.hasPos.length));var r=this.entriesArray().map(function(e){var t=m(e,2),r=t[0],n=t[1];return"".concat(nv(r),": ").concat(nv(n))}).join(", ");return r.length===0?"[ ]":"[ ".concat(r," ]")}}],[{key:"toNegIndex",value:function e(e){return-e-1}},{key:"validateIndex",value:function e(e){if(!en(e))throw new Error("Invalid index ".concat(e," - must be an integer!"));return e}}]);return t}(nT);var nY=/*#__PURE__*/function(e){c(t,e);function t(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++){r[n]=arguments[n]}u(this,t);var a;a=i(this,t);nu(a,"defaultValue");nu(a,"data");a.defaultValue=r.pop(),typeof r[0]=="number"?a.data=Array(r[0]).fill(a.defaultValue):a.data=Array.from(r[0]).map(function(e){return e===void 0?a.defaultValue:e});return a}l(t,[{key:"size",get:function e(){return this.data.length}},{key:"length",get:function e(){return this.data.length}},{key:"assertId",value:function e(e){if(e<0||e>=this.data.length)throw new RangeError("DefaultArray: Index ".concat(e," out of range"));return e}},{key:"isEmpty",value:function e(){return this.size===0}},{key:"isDefault",value:function e(e){return this.data[this.assertId(e)]===this.defaultValue}},{key:"isSet",value:function e(e){return this.data[this.assertId(e)]!==this.defaultValue}},{key:"has",value:function e(e){return this.isSet(e)}},{key:"set",value:function e(e,t){return this.data[this.assertId(e)]=t}},{key:"get",value:function e(e){return this.data[this.assertId(e)]}},{key:"getOrDefault",value:function e(e,t){var r=this.get(e);return r===this.defaultValue?t:r}},{key:"getOrCreate",value:function e(e,t){if(!this.has(e)){var r=W(t)?t():t;return this.set(e,r),r}return this.get(e)}},{key:"delete",value:function e(e){return this.assertId(e),this.data[e]===this.defaultValue?!1:(this.data[e]=this.defaultValue,!0)}},{key:"clear",value:function e(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;e?this.data=[]:this.data.fill(this.defaultValue)}},{key:"forEach",value:function e(e,t){var r=true,n=false,i=undefined;try{for(var u=this.entries()[Symbol.iterator](),a;!(r=(a=u.next()).done);r=true){var o=m(a.value,2),l=o[0],s=o[1];e.call(t,s,l,this)}}catch(e){n=true;i=e}finally{try{if(!r&&u.return!=null){u.return()}}finally{if(n){throw i}}}}},{key:"indices",value:function e(){return E(this,function(e){switch(e.label){case 0:return[5,S(this.data.keys())];case 1:e.sent();return[2]}})}},{key:"values",value:function e(){return E(this,function(e){switch(e.label){case 0:return[5,S(this.data.values())];case 1:e.sent();return[2]}})}},{key:"entries",value:function e(){return E(this,function(e){switch(e.label){case 0:return[5,S(this.data.entries())];case 1:e.sent();return[2]}})}},{key:"indicesArray",value:function e(){return g(this.indices())}},{key:"valuesArray",value:function e(){return g(this.values())}},{key:"entriesArray",value:function e(){return g(this.entries())}},{key:"kvKeys",value:function e(){var e,t,r,n,i,u,a;return E(this,function(o){switch(o.label){case 0:e=true,t=false,r=undefined;o.label=1;case 1:o.trys.push([1,6,7,8]);n=this.indices()[Symbol.iterator]();o.label=2;case 2:if(!!(e=(i=n.next()).done))return[3,5];u=i.value;return[4,[u]];case 3:o.sent();o.label=4;case 4:e=true;return[3,2];case 5:return[3,8];case 6:a=o.sent();t=true;r=a;return[3,8];case 7:try{if(!e&&n.return!=null){n.return()}}finally{if(t){throw r}}return[7];case 8:return[2]}})}},{key:"kvValues",value:function e(){var e,t,r,n,i,u,a;return E(this,function(o){switch(o.label){case 0:e=true,t=false,r=undefined;o.label=1;case 1:o.trys.push([1,6,7,8]);n=this.values()[Symbol.iterator]();o.label=2;case 2:if(!!(e=(i=n.next()).done))return[3,5];u=i.value;return[4,u];case 3:o.sent();o.label=4;case 4:e=true;return[3,2];case 5:return[3,8];case 6:a=o.sent();t=true;r=a;return[3,8];case 7:try{if(!e&&n.return!=null){n.return()}}finally{if(t){throw r}}return[7];case 8:return[2]}})}},{key:"kvEntries",value:function e(){var e,t,r,n,i,u,a,o,l;return E(this,function(s){switch(s.label){case 0:e=true,t=false,r=undefined;s.label=1;case 1:s.trys.push([1,6,7,8]);n=this.entries()[Symbol.iterator]();s.label=2;case 2:if(!!(e=(i=n.next()).done))return[3,5];u=m(i.value,2),a=u[0],o=u[1];return[4,[[a],o]];case 3:s.sent();s.label=4;case 4:e=true;return[3,2];case 5:return[3,8];case 6:l=s.sent();t=true;r=l;return[3,8];case 7:try{if(!e&&n.return!=null){n.return()}}finally{if(t){throw r}}return[7];case 8:return[2]}})}},{key:Symbol.iterator,value:function e(){return E(this,function(e){switch(e.label){case 0:return[5,S(this.entries())];case 1:e.sent();return[2]}})}},{key:"clone",value:function e(){var e=this.constructor;return new e(this.values(),this.defaultValue)}},{key:"merge",value:function e(e,t){if(this.constructor!==e.constructor)throw new Error("Cannot merge DefaultArray: different classes (".concat(this.constructor.name," vs ").concat(e.constructor.name,")"));if(this.defaultValue!==e.defaultValue)throw new Error("Cannot merge DefaultArray: different defaultValue (".concat(this.defaultValue," vs ").concat(e.defaultValue,")"));var r=true,n=false,i=undefined;try{for(var u=e.entries()[Symbol.iterator](),a;!(r=(a=u.next()).done);r=true){var o=m(a.value,2),l=o[0],s=o[1];this.isDefault(l)?this.set(l,s):t?this.set(l,t(this.get(l),s,l)):this.set(l,s)}}catch(e){n=true;i=e}finally{try{if(!r&&u.return!=null){u.return()}}finally{if(n){throw i}}}return this}},{key:"some",value:function e(e){var t=true,r=false,n=undefined;try{for(var i=this.entries()[Symbol.iterator](),u;!(t=(u=i.next()).done);t=true){var a=m(u.value,2),o=a[0],l=a[1];if(e(l,o))return!0}}catch(e){r=true;n=e}finally{try{if(!t&&i.return!=null){i.return()}}finally{if(r){throw n}}}return!1}},{key:"every",value:function e(e){var t=true,r=false,n=undefined;try{for(var i=this.entries()[Symbol.iterator](),u;!(t=(u=i.next()).done);t=true){var a=m(u.value,2),o=a[0],l=a[1];if(!e(l,o))return!1}}catch(e){r=true;n=e}finally{try{if(!t&&i.return!=null){i.return()}}finally{if(r){throw n}}}return!0}},{key:"filter",value:function e(e){var t=new this.constructor(this.length,this.defaultValue);var r=true,n=false,i=undefined;try{for(var u=this.entries()[Symbol.iterator](),a;!(r=(a=u.next()).done);r=true){var o=m(a.value,2),l=o[0],s=o[1];e(s,l,this)&&t.set(l,s)}}catch(e){n=true;i=e}finally{try{if(!r&&u.return!=null){u.return()}}finally{if(n){throw i}}}return t}},{key:"reduce",value:function e(e,t){var r=this.entries(),n=r.next();if(n.done){if(arguments.length<2)throw new TypeError("Reduce of empty DefaultArray with no initial value!");return t}var i,u;arguments.length<2?(i=n.value[1],u=r.next()):(i=t,u=n);for(var a=u;!a.done;a=r.next()){var o=m(a.value,2),l=o[0],s=o[1];i=e(i,s,l)}return i}},{key:"mapToArray",value:function e(e){var t=[];var r=true,n=false,i=undefined;try{for(var u=this.entries()[Symbol.iterator](),a;!(r=(a=u.next()).done);r=true){var o=m(a.value,2),l=o[0],s=o[1];t.push(e(s,l))}}catch(e){n=true;i=e}finally{try{if(!r&&u.return!=null){u.return()}}finally{if(n){throw i}}}return t}},{key:"map",value:function e(e,r){var n=new t(this.data.length,r);for(var i=0;i<this.data.length;i++)n.data[i]=e(this.data[i],i);return n}},{key:"equals",value:function e(e,t){if(this.size!==e.size)return!1;t!==null&&t!==void 0?t:t=function(e,t){return e===t};for(var r=0;r<this.data.length;++r)if(!t(this.data[r],e.data[r]))return!1;return!0}},{key:"toArray",value:function e(){return this.valuesArray()}},{key:"toString",value:function e(){return nv(this.data)}}]);return t}(nT);var nK=/*#__PURE__*/function(e){c(t,e);function t(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++){r[n]=arguments[n]}u(this,t);var a;a=i(this,t);nu(a,"map");nu(a,"keyEquals");var o=r.at(-1);a.keyEquals=W(o)?r.pop():nU;var l=r[0];a.map=new Map(l);return a}l(t,[{key:"has",value:function e(e){if(this.keyEquals===nU||this.map.has(e))return this.map.has(e);var t=true,r=false,n=undefined;try{for(var i=this.map[Symbol.iterator](),u;!(t=(u=i.next()).done);t=true){var a=m(u.value,2),o=a[0],l=a[1];if(this.keyEquals(o,e))return!0}}catch(e){r=true;n=e}finally{try{if(!t&&i.return!=null){i.return()}}finally{if(r){throw n}}}return!1}},{key:"set",value:function e(e,t){if(this.keyEquals===nU||this.map.has(e))return this.map.set(e,t),t;var r=true,n=false,i=undefined;try{for(var u=this.map.keys()[Symbol.iterator](),a;!(r=(a=u.next()).done);r=true){var o=a.value;if(this.keyEquals(o,e))return this.map.set(o,t),t}}catch(e){n=true;i=e}finally{try{if(!r&&u.return!=null){u.return()}}finally{if(n){throw i}}}return this.map.set(e,t),t}},{key:"get",value:function e(e){if(this.keyEquals===nU||this.map.has(e))return this.map.get(e);var t=true,r=false,n=undefined;try{for(var i=this.map[Symbol.iterator](),u;!(t=(u=i.next()).done);t=true){var a=m(u.value,2),o=a[0],l=a[1];if(this.keyEquals(o,e))return l}}catch(e){r=true;n=e}finally{try{if(!t&&i.return!=null){i.return()}}finally{if(r){throw n}}}}},{key:"delete",value:function e(e){if(this.keyEquals===nU||this.map.has(e))return this.map.delete(e);var t=true,r=false,n=undefined;try{for(var i=this.map.keys()[Symbol.iterator](),u;!(t=(u=i.next()).done);t=true){var a=u.value;if(this.keyEquals(a,e))return this.map.delete(a)}}catch(e){r=true;n=e}finally{try{if(!t&&i.return!=null){i.return()}}finally{if(r){throw n}}}return this.map.delete(e)}},{key:"getOrDefault",value:function e(e,t){var r;return(r=this.get(e))!==null&&r!==void 0?r:t}},{key:"getOrCreate",value:function e(e,t){if(!this.has(e)){var r=W(t)?t():t;return this.set(e,r)}return this.get(e)}},{key:"clear",value:function e(){this.map.clear()}},{key:"size",get:function e(){return this.map.size}},{key:"isEmpty",value:function e(){return this.size===0}},{key:"forEach",value:function e(e,t){var r=this;this.map.forEach(function(n,i){return e.call(t,n,i,r)})}},{key:"keys",value:function e(){return E(this,function(e){switch(e.label){case 0:return[5,S(this.map.keys())];case 1:e.sent();return[2]}})}},{key:"values",value:function e(){return E(this,function(e){switch(e.label){case 0:return[5,S(this.map.values())];case 1:e.sent();return[2]}})}},{key:"entries",value:function e(){var e,t,r,n,i,u,a,o,l;return E(this,function(s){switch(s.label){case 0:e=true,t=false,r=undefined;s.label=1;case 1:s.trys.push([1,6,7,8]);n=this.map[Symbol.iterator]();s.label=2;case 2:if(!!(e=(i=n.next()).done))return[3,5];u=m(i.value,2),a=u[0],o=u[1];return[4,[a,o]];case 3:s.sent();s.label=4;case 4:e=true;return[3,2];case 5:return[3,8];case 6:l=s.sent();t=true;r=l;return[3,8];case 7:try{if(!e&&n.return!=null){n.return()}}finally{if(t){throw r}}return[7];case 8:return[2]}})}},{key:"keysArray",value:function e(){return g(this.keys())}},{key:"valuesArray",value:function e(){return g(this.values())}},{key:"entriesArray",value:function e(){return g(this.entries())}},{key:"kvKeys",value:function e(){var e,t,r,n,i,u,a;return E(this,function(o){switch(o.label){case 0:e=true,t=false,r=undefined;o.label=1;case 1:o.trys.push([1,6,7,8]);n=this.keys()[Symbol.iterator]();o.label=2;case 2:if(!!(e=(i=n.next()).done))return[3,5];u=i.value;return[4,[u]];case 3:o.sent();o.label=4;case 4:e=true;return[3,2];case 5:return[3,8];case 6:a=o.sent();t=true;r=a;return[3,8];case 7:try{if(!e&&n.return!=null){n.return()}}finally{if(t){throw r}}return[7];case 8:return[2]}})}},{key:"kvValues",value:function e(){var e,t,r,n,i,u,a;return E(this,function(o){switch(o.label){case 0:e=true,t=false,r=undefined;o.label=1;case 1:o.trys.push([1,6,7,8]);n=this.values()[Symbol.iterator]();o.label=2;case 2:if(!!(e=(i=n.next()).done))return[3,5];u=i.value;return[4,u];case 3:o.sent();o.label=4;case 4:e=true;return[3,2];case 5:return[3,8];case 6:a=o.sent();t=true;r=a;return[3,8];case 7:try{if(!e&&n.return!=null){n.return()}}finally{if(t){throw r}}return[7];case 8:return[2]}})}},{key:"kvEntries",value:function e(){var e,t,r,n,i,u,a,o,l;return E(this,function(s){switch(s.label){case 0:e=true,t=false,r=undefined;s.label=1;case 1:s.trys.push([1,6,7,8]);n=this.entries()[Symbol.iterator]();s.label=2;case 2:if(!!(e=(i=n.next()).done))return[3,5];u=m(i.value,2),a=u[0],o=u[1];return[4,[[a],o]];case 3:s.sent();s.label=4;case 4:e=true;return[3,2];case 5:return[3,8];case 6:l=s.sent();t=true;r=l;return[3,8];case 7:try{if(!e&&n.return!=null){n.return()}}finally{if(t){throw r}}return[7];case 8:return[2]}})}},{key:Symbol.iterator,value:function e(){return E(this,function(e){switch(e.label){case 0:return[5,S(this.entries())];case 1:e.sent();return[2]}})}},{key:"clone",value:function e(){return new t(this,this.keyEquals)}},{key:"merge",value:function e(e,t){var r=true,n=false,i=undefined;try{for(var u=e.entries()[Symbol.iterator](),a;!(r=(a=u.next()).done);r=true){var o=m(a.value,2),l=o[0],s=o[1];this.has(l)&&t?this.set(l,t(this.get(l),s,l)):this.set(l,s)}}catch(e){n=true;i=e}finally{try{if(!r&&u.return!=null){u.return()}}finally{if(n){throw i}}}return this}},{key:"some",value:function e(e){var t=true,r=false,n=undefined;try{for(var i=this.map[Symbol.iterator](),u;!(t=(u=i.next()).done);t=true){var a=m(u.value,2),o=a[0],l=a[1];if(e(l,o))return!0}}catch(e){r=true;n=e}finally{try{if(!t&&i.return!=null){i.return()}}finally{if(r){throw n}}}return!1}},{key:"every",value:function e(e){var t=true,r=false,n=undefined;try{for(var i=this.map[Symbol.iterator](),u;!(t=(u=i.next()).done);t=true){var a=m(u.value,2),o=a[0],l=a[1];if(!e(l,o))return!1}}catch(e){r=true;n=e}finally{try{if(!t&&i.return!=null){i.return()}}finally{if(r){throw n}}}return!0}},{key:"filter",value:function e(e){var t=new this.constructor;var r=true,n=false,i=undefined;try{for(var u=this.map[Symbol.iterator](),a;!(r=(a=u.next()).done);r=true){var o=m(a.value,2),l=o[0],s=o[1];e(s,l,this)&&t.set(l,s)}}catch(e){n=true;i=e}finally{try{if(!r&&u.return!=null){u.return()}}finally{if(n){throw i}}}return t}},{key:"reduce",value:function e(e,t){var r=this.entries(),n=r.next();if(n.done){if(arguments.length<2)throw new TypeError("Reduce of empty UniMap with no initial value!");return t}var i,u;arguments.length<2?(i=n.value[1],u=r.next()):(i=t,u=n);for(var a=u;!a.done;a=r.next()){var o=m(a.value,2),l=o[0],s=o[1];i=e(i,s,l)}return i}},{key:"mapEntries",value:function e(e){var t=[];var r=true,n=false,i=undefined;try{for(var u=this.map[Symbol.iterator](),a;!(r=(a=u.next()).done);r=true){var o=m(a.value,2),l=o[0],s=o[1];t.push(e(s,l))}}catch(e){n=true;i=e}finally{try{if(!r&&u.return!=null){u.return()}}finally{if(n){throw i}}}return t}},{key:"mapValues",value:function e(e){var r=new t;var n=true,i=false,u=undefined;try{for(var a=this.map[Symbol.iterator](),o;!(n=(o=a.next()).done);n=true){var l=m(o.value,2),s=l[0],c=l[1];r.set(s,e(c,s))}}catch(e){i=true;u=e}finally{try{if(!n&&a.return!=null){a.return()}}finally{if(i){throw u}}}return r}},{key:"toMap",value:function e(){return new Map(this.map)}},{key:"toString",value:function e(){var e=g(this.map).map(function(e){var t=m(e,2),r=t[0],n=t[1];return"".concat(nv(r)," => ").concat(nv(n))}).join(", ");return e.length===0?"Map(".concat(this.size,"){ }"):"Map(".concat(this.size,"){ ").concat(e," }")}}],[{key:"createDeep",value:function e(e){return e?new t(e,h):new t(h)}}]);return t}(nT);var nW=/*#__PURE__*/function(e){c(t,e);function t(e){u(this,t);var r;r=i(this,t);nu(r,"map1");nu(r,"key1Equals",nU);nu(r,"key2Equals",nU);var n=true,a=false,o=undefined,l=true,s=false,c=undefined;if(r.map1=new nK(r.key1Equals),f(e,t))try{for(var h=e.map1[Symbol.iterator](),v;!(n=(v=h.next()).done);n=true){var y=m(v.value,2),d=y[0],p=y[1];var b=r.map1.set(d,new nK(r.key2Equals));var g=true,w=false,k=undefined;try{for(var x=p[Symbol.iterator](),E;!(g=(E=x.next()).done);g=true){var S=m(E.value,2),A=S[0],I=S[1];b.set(A,I)}}catch(e){w=true;k=e}finally{try{if(!g&&x.return!=null){x.return()}}finally{if(w){throw k}}}}}catch(e){a=true;o=e}finally{try{if(!n&&h.return!=null){h.return()}}finally{if(a){throw o}}}else if(e)try{for(var O=e[Symbol.iterator](),_;!(l=(_=O.next()).done);l=true){var N=m(_.value,3),C=N[0],P=N[1],M=N[2];r.set(C,P,M)}}catch(e){s=true;c=e}finally{try{if(!l&&O.return!=null){O.return()}}finally{if(s){throw c}}}return r}l(t,[{key:"has",value:function e(e,t){var r;var n;return(n=(r=this.map1.get(e))===null||r===void 0?void 0:r.has(t))!==null&&n!==void 0?n:!1}},{key:"set",value:function e(e,t,r){var n=this;return this.map1.getOrCreate(e,function(){return new nK(n.key2Equals)}).set(t,r)}},{key:"get",value:function e(e,t){var r;return(r=this.map1.get(e))===null||r===void 0?void 0:r.get(t)}},{key:"getOrDefault",value:function e(e,t,r){var n;return(n=this.get(e,t))!==null&&n!==void 0?n:r}},{key:"getOrCreate",value:function e(e,t,r){if(!this.has(e,t)){var n=W(r)?r():r;return this.set(e,t,n),n}return this.get(e,t)}},{key:"delete",value:function e(e,t){if(t===void 0)return this.map1.delete(e);var r=this.map1.get(e);return r?r.delete(t):!1}},{key:"clear",value:function e(){this.map1.clear()}},{key:"size",get:function e(){var e=0;var t=true,r=false,n=undefined;try{for(var i=this.map1.values()[Symbol.iterator](),u;!(t=(u=i.next()).done);t=true){var a=u.value;e+=a.size}}catch(e){r=true;n=e}finally{try{if(!t&&i.return!=null){i.return()}}finally{if(r){throw n}}}return e}},{key:"isEmpty",value:function e(){return this.size===0}},{key:"forEach",value:function e(e,t){var r=this;this.map1.forEach(function(n,i){return n.forEach(function(n,u){return e.call(t,n,i,u,r)})})}},{key:"keys",value:function e(){var e,t,r,n,i,u,a,o,l,s,c,f,h,v,y,y;return E(this,function(d){switch(d.label){case 0:e=true,t=false,r=undefined,n=true,i=false,u=undefined;d.label=1;case 1:d.trys.push([1,12,13,14]);a=this.map1[Symbol.iterator]();d.label=2;case 2:if(!!(n=(o=a.next()).done))return[3,11];l=m(o.value,2),s=l[0],c=l[1];d.label=3;case 3:d.trys.push([3,8,9,10]);f=c.keys()[Symbol.iterator]();d.label=4;case 4:if(!!(e=(h=f.next()).done))return[3,7];v=h.value;return[4,[s,v]];case 5:d.sent();d.label=6;case 6:e=true;return[3,4];case 7:return[3,10];case 8:y=d.sent();t=true;r=y;return[3,10];case 9:try{if(!e&&f.return!=null){f.return()}}finally{if(t){throw r}}return[7];case 10:n=true;return[3,2];case 11:return[3,14];case 12:y=d.sent();i=true;u=y;return[3,14];case 13:try{if(!n&&a.return!=null){a.return()}}finally{if(i){throw u}}return[7];case 14:return[2]}})}},{key:"values",value:function e(){var e,t,r,n,i,u,a,o,l,s,c,f,h,h;return E(this,function(v){switch(v.label){case 0:e=true,t=false,r=undefined,n=true,i=false,u=undefined;v.label=1;case 1:v.trys.push([1,12,13,14]);a=this.map1.values()[Symbol.iterator]();v.label=2;case 2:if(!!(n=(o=a.next()).done))return[3,11];l=o.value;v.label=3;case 3:v.trys.push([3,8,9,10]);s=l.values()[Symbol.iterator]();v.label=4;case 4:if(!!(e=(c=s.next()).done))return[3,7];f=c.value;return[4,f];case 5:v.sent();v.label=6;case 6:e=true;return[3,4];case 7:return[3,10];case 8:h=v.sent();t=true;r=h;return[3,10];case 9:try{if(!e&&s.return!=null){s.return()}}finally{if(t){throw r}}return[7];case 10:n=true;return[3,2];case 11:return[3,14];case 12:h=v.sent();i=true;u=h;return[3,14];case 13:try{if(!n&&a.return!=null){a.return()}}finally{if(i){throw u}}return[7];case 14:return[2]}})}},{key:"entries",value:function e(){var e,t,r,n,i,u,a,o,l,s,c,f,h,v,y,d,p,p;return E(this,function(b){switch(b.label){case 0:e=true,t=false,r=undefined,n=true,i=false,u=undefined;b.label=1;case 1:b.trys.push([1,12,13,14]);a=this.map1[Symbol.iterator]();b.label=2;case 2:if(!!(n=(o=a.next()).done))return[3,11];l=m(o.value,2),s=l[0],c=l[1];b.label=3;case 3:b.trys.push([3,8,9,10]);f=c[Symbol.iterator]();b.label=4;case 4:if(!!(e=(h=f.next()).done))return[3,7];v=m(h.value,2),y=v[0],d=v[1];return[4,[s,y,d]];case 5:b.sent();b.label=6;case 6:e=true;return[3,4];case 7:return[3,10];case 8:p=b.sent();t=true;r=p;return[3,10];case 9:try{if(!e&&f.return!=null){f.return()}}finally{if(t){throw r}}return[7];case 10:n=true;return[3,2];case 11:return[3,14];case 12:p=b.sent();i=true;u=p;return[3,14];case 13:try{if(!n&&a.return!=null){a.return()}}finally{if(i){throw u}}return[7];case 14:return[2]}})}},{key:"keysArray",value:function e(){return g(this.keys())}},{key:"valuesArray",value:function e(){return g(this.values())}},{key:"entriesArray",value:function e(){return g(this.entries())}},{key:"kvKeys",value:function e(){var e,t,r,n,i,u,a,o,l;return E(this,function(s){switch(s.label){case 0:e=true,t=false,r=undefined;s.label=1;case 1:s.trys.push([1,6,7,8]);n=this.keys()[Symbol.iterator]();s.label=2;case 2:if(!!(e=(i=n.next()).done))return[3,5];u=m(i.value,2),a=u[0],o=u[1];return[4,[a,o]];case 3:s.sent();s.label=4;case 4:e=true;return[3,2];case 5:return[3,8];case 6:l=s.sent();t=true;r=l;return[3,8];case 7:try{if(!e&&n.return!=null){n.return()}}finally{if(t){throw r}}return[7];case 8:return[2]}})}},{key:"kvValues",value:function e(){var e,t,r,n,i,u,a;return E(this,function(o){switch(o.label){case 0:e=true,t=false,r=undefined;o.label=1;case 1:o.trys.push([1,6,7,8]);n=this.values()[Symbol.iterator]();o.label=2;case 2:if(!!(e=(i=n.next()).done))return[3,5];u=i.value;return[4,u];case 3:o.sent();o.label=4;case 4:e=true;return[3,2];case 5:return[3,8];case 6:a=o.sent();t=true;r=a;return[3,8];case 7:try{if(!e&&n.return!=null){n.return()}}finally{if(t){throw r}}return[7];case 8:return[2]}})}},{key:"kvEntries",value:function e(){var e,t,r,n,i,u,a,o,l,s;return E(this,function(c){switch(c.label){case 0:e=true,t=false,r=undefined;c.label=1;case 1:c.trys.push([1,6,7,8]);n=this.entries()[Symbol.iterator]();c.label=2;case 2:if(!!(e=(i=n.next()).done))return[3,5];u=m(i.value,3),a=u[0],o=u[1],l=u[2];return[4,[[a,o],l]];case 3:c.sent();c.label=4;case 4:e=true;return[3,2];case 5:return[3,8];case 6:s=c.sent();t=true;r=s;return[3,8];case 7:try{if(!e&&n.return!=null){n.return()}}finally{if(t){throw r}}return[7];case 8:return[2]}})}},{key:Symbol.iterator,value:function e(){return E(this,function(e){switch(e.label){case 0:return[5,S(this.entries())];case 1:e.sent();return[2]}})}},{key:"clone",value:function e(){return new t(this)}},{key:"merge",value:function e(e,t){var r=true,n=false,i=undefined;try{for(var u=e.entries()[Symbol.iterator](),a;!(r=(a=u.next()).done);r=true){var o=m(a.value,3),l=o[0],s=o[1],c=o[2];this.has(l,s)&&t?this.set(l,s,t(this.get(l,s),c,l,s)):this.set(l,s,c)}}catch(e){n=true;i=e}finally{try{if(!r&&u.return!=null){u.return()}}finally{if(n){throw i}}}return this}},{key:"some",value:function e(e){var t=true,r=false,n=undefined,i=true,u=false,a=undefined;try{for(var o=this.map1[Symbol.iterator](),l;!(i=(l=o.next()).done);i=true){var s=m(l.value,2),c=s[0],f=s[1];try{for(var h=f[Symbol.iterator](),v;!(t=(v=h.next()).done);t=true){var y=m(v.value,2),d=y[0],p=y[1];if(e(p,c,d))return!0}}catch(e){r=true;n=e}finally{try{if(!t&&h.return!=null){h.return()}}finally{if(r){throw n}}}}}catch(e){u=true;a=e}finally{try{if(!i&&o.return!=null){o.return()}}finally{if(u){throw a}}}return!1}},{key:"every",value:function e(e){var t=true,r=false,n=undefined,i=true,u=false,a=undefined;try{for(var o=this.map1[Symbol.iterator](),l;!(i=(l=o.next()).done);i=true){var s=m(l.value,2),c=s[0],f=s[1];try{for(var h=f[Symbol.iterator](),v;!(t=(v=h.next()).done);t=true){var y=m(v.value,2),d=y[0],p=y[1];if(!e(p,c,d))return!1}}catch(e){r=true;n=e}finally{try{if(!t&&h.return!=null){h.return()}}finally{if(r){throw n}}}}}catch(e){u=true;a=e}finally{try{if(!i&&o.return!=null){o.return()}}finally{if(u){throw a}}}return!0}},{key:"filter",value:function e(e){var t=new this.constructor;var r=true,n=false,i=undefined,u=true,a=false,o=undefined;try{for(var l=this.map1[Symbol.iterator](),s;!(u=(s=l.next()).done);u=true){var c=m(s.value,2),f=c[0],h=c[1];try{for(var v=h[Symbol.iterator](),y;!(r=(y=v.next()).done);r=true){var d=m(y.value,2),p=d[0],b=d[1];e(b,f,p,this)&&t.set(f,p,b)}}catch(e){n=true;i=e}finally{try{if(!r&&v.return!=null){v.return()}}finally{if(n){throw i}}}}}catch(e){a=true;o=e}finally{try{if(!u&&l.return!=null){l.return()}}finally{if(a){throw o}}}return t}},{key:"reduce",value:function e(e,t){var r=this.entries(),n=r.next();if(n.done){if(arguments.length<2)throw new TypeError("Reduce of empty BiMap with no initial value!");return t}var i,u;arguments.length<2?(i=n.value[2],u=r.next()):(i=t,u=n);for(var a=u;!a.done;a=r.next()){var o=m(a.value,3),l=o[0],s=o[1],c=o[2];i=e(i,c,l,s)}return i}},{key:"mapEntries",value:function e(e){var t=[];var r=true,n=false,i=undefined,u=true,a=false,o=undefined;try{for(var l=this.map1[Symbol.iterator](),s;!(u=(s=l.next()).done);u=true){var c=m(s.value,2),f=c[0],h=c[1];try{for(var v=h[Symbol.iterator](),y;!(r=(y=v.next()).done);r=true){var d=m(y.value,2),p=d[0],b=d[1];t.push(e(b,f,p))}}catch(e){n=true;i=e}finally{try{if(!r&&v.return!=null){v.return()}}finally{if(n){throw i}}}}}catch(e){a=true;o=e}finally{try{if(!u&&l.return!=null){l.return()}}finally{if(a){throw o}}}return t}},{key:"mapValues",value:function e(e){var r=new t;var n=true,i=false,u=undefined,a=true,o=false,l=undefined;try{for(var s=this.map1[Symbol.iterator](),c;!(a=(c=s.next()).done);a=true){var f=m(c.value,2),h=f[0],v=f[1];try{for(var y=v[Symbol.iterator](),d;!(n=(d=y.next()).done);n=true){var p=m(d.value,2),b=p[0],g=p[1];r.set(h,b,e(g,h,b))}}catch(e){i=true;u=e}finally{try{if(!n&&y.return!=null){y.return()}}finally{if(i){throw u}}}}}catch(e){o=true;l=e}finally{try{if(!a&&s.return!=null){s.return()}}finally{if(o){throw l}}}return r}},{key:"toMap",value:function e(){var e=new Map;var t=true,r=false,n=undefined,i=true,u=false,a=undefined;try{for(var o=this.map1[Symbol.iterator](),l;!(i=(l=o.next()).done);i=true){var s=m(l.value,2),c=s[0],f=s[1];try{for(var h=f[Symbol.iterator](),v;!(t=(v=h.next()).done);t=true){var y=m(v.value,2),d=y[0],p=y[1];e.set([c,d],p)}}catch(e){r=true;n=e}finally{try{if(!t&&h.return!=null){h.return()}}finally{if(r){throw n}}}}}catch(e){u=true;a=e}finally{try{if(!i&&o.return!=null){o.return()}}finally{if(u){throw a}}}return e}},{key:"toString",value:function e(){var e=[];var t=true,r=false,n=undefined;try{for(var i=this.map1[Symbol.iterator](),u;!(t=(u=i.next()).done);t=true){var a=m(u.value,2),o=a[0],l=a[1];var s=g(l).map(function(e){var t=m(e,2),r=t[0],n=t[1];return"".concat(nv(r)," => ").concat(nv(n))}).join(", ");e.push("".concat(nv(o)," => { ").concat(s," }"))}}catch(e){r=true;n=e}finally{try{if(!t&&i.return!=null){i.return()}}finally{if(r){throw n}}}return e.length===0?"Map(".concat(this.size,"){ }"):"Map(".concat(this.size,"){ ").concat(e," }")}}]);return t}(nT);var nZ=/*#__PURE__*/function(e){c(t,e);function t(e){u(this,t);var r;r=i(this,t);nu(r,"map1");nu(r,"key1Equals",nU);nu(r,"key2Equals",nU);nu(r,"key3Equals",nU);var n=true,a=false,o=undefined,l=true,s=false,c=undefined;if(r.map1=new nK(r.key1Equals),f(e,t))try{for(var h=e.map1[Symbol.iterator](),v;!(n=(v=h.next()).done);n=true){var y=m(v.value,2),d=y[0],p=y[1];var b=r.map1.set(d,new nK(r.key2Equals));var g=true,w=false,k=undefined;try{for(var x=p[Symbol.iterator](),E;!(g=(E=x.next()).done);g=true){var S=m(E.value,2),A=S[0],I=S[1];b.set(A,new nK(I,r.key3Equals))}}catch(e){w=true;k=e}finally{try{if(!g&&x.return!=null){x.return()}}finally{if(w){throw k}}}}}catch(e){a=true;o=e}finally{try{if(!n&&h.return!=null){h.return()}}finally{if(a){throw o}}}else if(e)try{for(var O=e[Symbol.iterator](),_;!(l=(_=O.next()).done);l=true){var N=m(_.value,4),C=N[0],P=N[1],M=N[2],V=N[3];r.set(C,P,M,V)}}catch(e){s=true;c=e}finally{try{if(!l&&O.return!=null){O.return()}}finally{if(s){throw c}}}return r}l(t,[{key:"has",value:function e(e,t,r){var n,i;var u;return(u=(i=this.map1.get(e))===null||i===void 0?void 0:(n=i.get(t))===null||n===void 0?void 0:n.has(r))!==null&&u!==void 0?u:!1}},{key:"set",value:function e(e,t,r,n){var i=this;return this.map1.getOrCreate(e,function(){return new nK(i.key2Equals)}).getOrCreate(t,function(){return new nK(i.key3Equals)}).set(r,n),n}},{key:"get",value:function e(e,t,r){var n,i;return(i=this.map1.get(e))===null||i===void 0?void 0:(n=i.get(t))===null||n===void 0?void 0:n.get(r)}},{key:"getOrDefault",value:function e(e,t,r,n){var i;return(i=this.get(e,t,r))!==null&&i!==void 0?i:n}},{key:"getOrCreate",value:function e(e,t,r,n){if(!this.has(e,t,r)){var i=W(n)?n():n;return this.set(e,t,r,i),i}return this.get(e,t,r)}},{key:"delete",value:function e(e,t,r){if(r===void 0){if(t===void 0)return this.map1.delete(e);var n=this.map1.get(e);return n?n.delete(t):!1}else{var i;if(t===void 0)return this.map1.delete(e);var u=(i=this.map1.get(e))===null||i===void 0?void 0:i.get(t);return u?u.delete(r):!1}}},{key:"clear",value:function e(){this.map1.clear()}},{key:"size",get:function e(){var e=0;var t=true,r=false,n=undefined,i=true,u=false,a=undefined;try{for(var o=this.map1.values()[Symbol.iterator](),l;!(i=(l=o.next()).done);i=true){var s=l.value;try{for(var c=s.values()[Symbol.iterator](),f;!(t=(f=c.next()).done);t=true){var h=f.value;e+=h.size}}catch(e){r=true;n=e}finally{try{if(!t&&c.return!=null){c.return()}}finally{if(r){throw n}}}}}catch(e){u=true;a=e}finally{try{if(!i&&o.return!=null){o.return()}}finally{if(u){throw a}}}return e}},{key:"isEmpty",value:function e(){return this.size===0}},{key:"forEach",value:function e(e,t){var r=this;this.map1.forEach(function(n,i){return n.forEach(function(n,u){return n.forEach(function(n,a){return e.call(t,n,i,u,a,r)})})})}},{key:"keys",value:function e(){var e,t,r,n,i,u,a,o,l,s,c,f,h,v,y,d,p,b,g,w,k,x,S,S,S;return E(this,function(E){switch(E.label){case 0:e=true,t=false,r=undefined,n=true,i=false,u=undefined,a=true,o=false,l=undefined;E.label=1;case 1:E.trys.push([1,18,19,20]);s=this.map1[Symbol.iterator]();E.label=2;case 2:if(!!(a=(c=s.next()).done))return[3,17];f=m(c.value,2),h=f[0],v=f[1];E.label=3;case 3:E.trys.push([3,14,15,16]);y=v[Symbol.iterator]();E.label=4;case 4:if(!!(n=(d=y.next()).done))return[3,13];p=m(d.value,2),b=p[0],g=p[1];E.label=5;case 5:E.trys.push([5,10,11,12]);w=g.keys()[Symbol.iterator]();E.label=6;case 6:if(!!(e=(k=w.next()).done))return[3,9];x=k.value;return[4,[h,b,x]];case 7:E.sent();E.label=8;case 8:e=true;return[3,6];case 9:return[3,12];case 10:S=E.sent();t=true;r=S;return[3,12];case 11:try{if(!e&&w.return!=null){w.return()}}finally{if(t){throw r}}return[7];case 12:n=true;return[3,4];case 13:return[3,16];case 14:S=E.sent();i=true;u=S;return[3,16];case 15:try{if(!n&&y.return!=null){y.return()}}finally{if(i){throw u}}return[7];case 16:a=true;return[3,2];case 17:return[3,20];case 18:S=E.sent();o=true;l=S;return[3,20];case 19:try{if(!a&&s.return!=null){s.return()}}finally{if(o){throw l}}return[7];case 20:return[2]}})}},{key:"values",value:function e(){var e,t,r,n,i,u,a,o,l,s,c,f,h,v,y,d,p,b,m,m,m;return E(this,function(g){switch(g.label){case 0:e=true,t=false,r=undefined,n=true,i=false,u=undefined,a=true,o=false,l=undefined;g.label=1;case 1:g.trys.push([1,18,19,20]);s=this.map1.values()[Symbol.iterator]();g.label=2;case 2:if(!!(a=(c=s.next()).done))return[3,17];f=c.value;g.label=3;case 3:g.trys.push([3,14,15,16]);h=f.values()[Symbol.iterator]();g.label=4;case 4:if(!!(n=(v=h.next()).done))return[3,13];y=v.value;g.label=5;case 5:g.trys.push([5,10,11,12]);d=y.values()[Symbol.iterator]();g.label=6;case 6:if(!!(e=(p=d.next()).done))return[3,9];b=p.value;return[4,b];case 7:g.sent();g.label=8;case 8:e=true;return[3,6];case 9:return[3,12];case 10:m=g.sent();t=true;r=m;return[3,12];case 11:try{if(!e&&d.return!=null){d.return()}}finally{if(t){throw r}}return[7];case 12:n=true;return[3,4];case 13:return[3,16];case 14:m=g.sent();i=true;u=m;return[3,16];case 15:try{if(!n&&h.return!=null){h.return()}}finally{if(i){throw u}}return[7];case 16:a=true;return[3,2];case 17:return[3,20];case 18:m=g.sent();o=true;l=m;return[3,20];case 19:try{if(!a&&s.return!=null){s.return()}}finally{if(o){throw l}}return[7];case 20:return[2]}})}},{key:"entries",value:function e(){var e,t,r,n,i,u,a,o,l,s,c,f,h,v,y,d,p,b,g,w,k,x,S,A,I,I,I;return E(this,function(E){switch(E.label){case 0:e=true,t=false,r=undefined,n=true,i=false,u=undefined,a=true,o=false,l=undefined;E.label=1;case 1:E.trys.push([1,18,19,20]);s=this.map1[Symbol.iterator]();E.label=2;case 2:if(!!(a=(c=s.next()).done))return[3,17];f=m(c.value,2),h=f[0],v=f[1];E.label=3;case 3:E.trys.push([3,14,15,16]);y=v[Symbol.iterator]();E.label=4;case 4:if(!!(n=(d=y.next()).done))return[3,13];p=m(d.value,2),b=p[0],g=p[1];E.label=5;case 5:E.trys.push([5,10,11,12]);w=g[Symbol.iterator]();E.label=6;case 6:if(!!(e=(k=w.next()).done))return[3,9];x=m(k.value,2),S=x[0],A=x[1];return[4,[h,b,S,A]];case 7:E.sent();E.label=8;case 8:e=true;return[3,6];case 9:return[3,12];case 10:I=E.sent();t=true;r=I;return[3,12];case 11:try{if(!e&&w.return!=null){w.return()}}finally{if(t){throw r}}return[7];case 12:n=true;return[3,4];case 13:return[3,16];case 14:I=E.sent();i=true;u=I;return[3,16];case 15:try{if(!n&&y.return!=null){y.return()}}finally{if(i){throw u}}return[7];case 16:a=true;return[3,2];case 17:return[3,20];case 18:I=E.sent();o=true;l=I;return[3,20];case 19:try{if(!a&&s.return!=null){s.return()}}finally{if(o){throw l}}return[7];case 20:return[2]}})}},{key:"keysArray",value:function e(){return g(this.keys())}},{key:"valuesArray",value:function e(){return g(this.values())}},{key:"entriesArray",value:function e(){return g(this.entries())}},{key:"kvKeys",value:function e(){var e,t,r,n,i,u,a,o,l,s;return E(this,function(c){switch(c.label){case 0:e=true,t=false,r=undefined;c.label=1;case 1:c.trys.push([1,6,7,8]);n=this.keys()[Symbol.iterator]();c.label=2;case 2:if(!!(e=(i=n.next()).done))return[3,5];u=m(i.value,3),a=u[0],o=u[1],l=u[2];return[4,[a,o,l]];case 3:c.sent();c.label=4;case 4:e=true;return[3,2];case 5:return[3,8];case 6:s=c.sent();t=true;r=s;return[3,8];case 7:try{if(!e&&n.return!=null){n.return()}}finally{if(t){throw r}}return[7];case 8:return[2]}})}},{key:"kvValues",value:function e(){var e,t,r,n,i,u,a;return E(this,function(o){switch(o.label){case 0:e=true,t=false,r=undefined;o.label=1;case 1:o.trys.push([1,6,7,8]);n=this.values()[Symbol.iterator]();o.label=2;case 2:if(!!(e=(i=n.next()).done))return[3,5];u=i.value;return[4,u];case 3:o.sent();o.label=4;case 4:e=true;return[3,2];case 5:return[3,8];case 6:a=o.sent();t=true;r=a;return[3,8];case 7:try{if(!e&&n.return!=null){n.return()}}finally{if(t){throw r}}return[7];case 8:return[2]}})}},{key:"kvEntries",value:function e(){var e,t,r,n,i,u,a,o,l,s,c;return E(this,function(f){switch(f.label){case 0:e=true,t=false,r=undefined;f.label=1;case 1:f.trys.push([1,6,7,8]);n=this.entries()[Symbol.iterator]();f.label=2;case 2:if(!!(e=(i=n.next()).done))return[3,5];u=m(i.value,4),a=u[0],o=u[1],l=u[2],s=u[3];return[4,[[a,o,l],s]];case 3:f.sent();f.label=4;case 4:e=true;return[3,2];case 5:return[3,8];case 6:c=f.sent();t=true;r=c;return[3,8];case 7:try{if(!e&&n.return!=null){n.return()}}finally{if(t){throw r}}return[7];case 8:return[2]}})}},{key:Symbol.iterator,value:function e(){return E(this,function(e){switch(e.label){case 0:return[5,S(this.entries())];case 1:e.sent();return[2]}})}},{key:"clone",value:function e(){return new t(this)}},{key:"merge",value:function e(e,t){var r=true,n=false,i=undefined;try{for(var u=e.entries()[Symbol.iterator](),a;!(r=(a=u.next()).done);r=true){var o=m(a.value,4),l=o[0],s=o[1],c=o[2],f=o[3];this.has(l,s,c)&&t?this.set(l,s,c,t(this.get(l,s,c),f,l,s,c)):this.set(l,s,c,f)}}catch(e){n=true;i=e}finally{try{if(!r&&u.return!=null){u.return()}}finally{if(n){throw i}}}return this}},{key:"some",value:function e(e){var t=true,r=false,n=undefined,i=true,u=false,a=undefined,o=true,l=false,s=undefined;try{for(var c=this.map1[Symbol.iterator](),f;!(o=(f=c.next()).done);o=true){var h=m(f.value,2),v=h[0],y=h[1];try{for(var d=y[Symbol.iterator](),p;!(i=(p=d.next()).done);i=true){var b=m(p.value,2),g=b[0],w=b[1];try{for(var k=w[Symbol.iterator](),x;!(t=(x=k.next()).done);t=true){var E=m(x.value,2),S=E[0],A=E[1];if(e(A,v,g,S))return!0}}catch(e){r=true;n=e}finally{try{if(!t&&k.return!=null){k.return()}}finally{if(r){throw n}}}}}catch(e){u=true;a=e}finally{try{if(!i&&d.return!=null){d.return()}}finally{if(u){throw a}}}}}catch(e){l=true;s=e}finally{try{if(!o&&c.return!=null){c.return()}}finally{if(l){throw s}}}return!1}},{key:"every",value:function e(e){var t=true,r=false,n=undefined,i=true,u=false,a=undefined,o=true,l=false,s=undefined;try{for(var c=this.map1[Symbol.iterator](),f;!(o=(f=c.next()).done);o=true){var h=m(f.value,2),v=h[0],y=h[1];try{for(var d=y[Symbol.iterator](),p;!(i=(p=d.next()).done);i=true){var b=m(p.value,2),g=b[0],w=b[1];try{for(var k=w[Symbol.iterator](),x;!(t=(x=k.next()).done);t=true){var E=m(x.value,2),S=E[0],A=E[1];if(!e(A,v,g,S))return!1}}catch(e){r=true;n=e}finally{try{if(!t&&k.return!=null){k.return()}}finally{if(r){throw n}}}}}catch(e){u=true;a=e}finally{try{if(!i&&d.return!=null){d.return()}}finally{if(u){throw a}}}}}catch(e){l=true;s=e}finally{try{if(!o&&c.return!=null){c.return()}}finally{if(l){throw s}}}return!0}},{key:"filter",value:function e(e){var t=new this.constructor;var r=true,n=false,i=undefined,u=true,a=false,o=undefined,l=true,s=false,c=undefined;try{for(var f=this.map1[Symbol.iterator](),h;!(l=(h=f.next()).done);l=true){var v=m(h.value,2),y=v[0],d=v[1];try{for(var p=d[Symbol.iterator](),b;!(u=(b=p.next()).done);u=true){var g=m(b.value,2),w=g[0],k=g[1];try{for(var x=k[Symbol.iterator](),E;!(r=(E=x.next()).done);r=true){var S=m(E.value,2),A=S[0],I=S[1];e(I,y,w,A,this)&&t.set(y,w,A,I)}}catch(e){n=true;i=e}finally{try{if(!r&&x.return!=null){x.return()}}finally{if(n){throw i}}}}}catch(e){a=true;o=e}finally{try{if(!u&&p.return!=null){p.return()}}finally{if(a){throw o}}}}}catch(e){s=true;c=e}finally{try{if(!l&&f.return!=null){f.return()}}finally{if(s){throw c}}}return t}},{key:"reduce",value:function e(e,t){var r=this.entries(),n=r.next();if(n.done){if(arguments.length<2)throw new TypeError("Reduce of empty TriMap with no initial value!");return t}var i,u;arguments.length<2?(i=n.value[3],u=r.next()):(i=t,u=n);for(var a=u;!a.done;a=r.next()){var o=m(a.value,4),l=o[0],s=o[1],c=o[2],f=o[3];i=e(i,f,l,s,c)}return i}},{key:"mapEntries",value:function e(e){var t=[];var r=true,n=false,i=undefined,u=true,a=false,o=undefined,l=true,s=false,c=undefined;try{for(var f=this.map1[Symbol.iterator](),h;!(l=(h=f.next()).done);l=true){var v=m(h.value,2),y=v[0],d=v[1];try{for(var p=d[Symbol.iterator](),b;!(u=(b=p.next()).done);u=true){var g=m(b.value,2),w=g[0],k=g[1];try{for(var x=k[Symbol.iterator](),E;!(r=(E=x.next()).done);r=true){var S=m(E.value,2),A=S[0],I=S[1];t.push(e(I,y,w,A))}}catch(e){n=true;i=e}finally{try{if(!r&&x.return!=null){x.return()}}finally{if(n){throw i}}}}}catch(e){a=true;o=e}finally{try{if(!u&&p.return!=null){p.return()}}finally{if(a){throw o}}}}}catch(e){s=true;c=e}finally{try{if(!l&&f.return!=null){f.return()}}finally{if(s){throw c}}}return t}},{key:"mapValues",value:function e(e){var r=new t;var n=true,i=false,u=undefined,a=true,o=false,l=undefined,s=true,c=false,f=undefined;try{for(var h=this.map1[Symbol.iterator](),v;!(s=(v=h.next()).done);s=true){var y=m(v.value,2),d=y[0],p=y[1];try{for(var b=p[Symbol.iterator](),g;!(a=(g=b.next()).done);a=true){var w=m(g.value,2),k=w[0],x=w[1];try{for(var E=x[Symbol.iterator](),S;!(n=(S=E.next()).done);n=true){var A=m(S.value,2),I=A[0],O=A[1];r.set(d,k,I,e(O,d,k,I))}}catch(e){i=true;u=e}finally{try{if(!n&&E.return!=null){E.return()}}finally{if(i){throw u}}}}}catch(e){o=true;l=e}finally{try{if(!a&&b.return!=null){b.return()}}finally{if(o){throw l}}}}}catch(e){c=true;f=e}finally{try{if(!s&&h.return!=null){h.return()}}finally{if(c){throw f}}}return r}},{key:"toMap",value:function e(){var e=new Map;var t=true,r=false,n=undefined,i=true,u=false,a=undefined,o=true,l=false,s=undefined;try{for(var c=this.map1[Symbol.iterator](),f;!(o=(f=c.next()).done);o=true){var h=m(f.value,2),v=h[0],y=h[1];try{for(var d=y[Symbol.iterator](),p;!(i=(p=d.next()).done);i=true){var b=m(p.value,2),g=b[0],w=b[1];try{for(var k=w[Symbol.iterator](),x;!(t=(x=k.next()).done);t=true){var E=m(x.value,2),S=E[0],A=E[1];e.set([v,g,S],A)}}catch(e){r=true;n=e}finally{try{if(!t&&k.return!=null){k.return()}}finally{if(r){throw n}}}}}catch(e){u=true;a=e}finally{try{if(!i&&d.return!=null){d.return()}}finally{if(u){throw a}}}}}catch(e){l=true;s=e}finally{try{if(!o&&c.return!=null){c.return()}}finally{if(l){throw s}}}return e}},{key:"toString",value:function e(){var e=[];var t=true,r=false,n=undefined,i=true,u=false,a=undefined;try{for(var o=this.map1[Symbol.iterator](),l;!(i=(l=o.next()).done);i=true){var s=m(l.value,2),c=s[0],f=s[1];try{for(var h=f[Symbol.iterator](),v;!(t=(v=h.next()).done);t=true){var y=m(v.value,2),d=y[0],p=y[1];var b=g(p).map(function(e){var t=m(e,2),r=t[0],n=t[1];return"".concat(nv(r)," => ").concat(nv(n))}).join(", ");e.push("".concat(nv(c)," => ").concat(nv(d)," => { ").concat(b," }"))}}catch(e){r=true;n=e}finally{try{if(!t&&h.return!=null){h.return()}}finally{if(r){throw n}}}}}catch(e){u=true;a=e}finally{try{if(!i&&o.return!=null){o.return()}}finally{if(u){throw a}}}return e.length===0?"Map(".concat(this.size,"){ }"):"Map(".concat(this.size,"){ ").concat(e.join(", ")," }")}}]);return t}(nT);var nG=/*#__PURE__*/function(e){c(t,e);function t(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++){r[n]=arguments[n]}u(this,t);var a;a=i(this,t);nu(a,"data");nu(a,"equals");var o=r.at(-1);a.equals=W(o)?r.pop():nU;var l=r[0];a.data=new Set(l);return a}l(t,[{key:"has",value:function e(e){var t=this;return this.equals===nU?this.data.has(e):this.some(function(r){return t.equals(r,e)})}},{key:"add",value:function e(e){return this.has(e)||this.data.add(e),e}},{key:"set",value:function e(e,t){if(!this.equals(e,t))throw new TypeError("ValueSet.set() requires key === value.");this.add(t)}},{key:"get",value:function e(e){return this.has(e)?e:void 0}},{key:"getOrDefault",value:function e(e,t){var r;return(r=this.get(e))!==null&&r!==void 0?r:t}},{key:"getOrCreate",value:function e(e,t){if(!this.has(e)){var r=W(t)?t():t;return this.set(e,r),r}return this.get(e)}},{key:"delete",value:function e(e){if(this.equals===nU||this.data.has(e))return this.data.delete(e);var t=true,r=false,n=undefined;try{for(var i=this.values()[Symbol.iterator](),u;!(t=(u=i.next()).done);t=true){var a=u.value;if(this.equals(a,e))return this.data.delete(a),!0}}catch(e){r=true;n=e}finally{try{if(!t&&i.return!=null){i.return()}}finally{if(r){throw n}}}return!1}},{key:"clear",value:function e(){this.data.clear()}},{key:"size",get:function e(){return this.data.size}},{key:"isEmpty",value:function e(){return this.size===0}},{key:"forEach",value:function e(e,t){var r=this;this.data.forEach(function(n){return e.call(t,n,r)})}},{key:"keys",value:function e(){return E(this,function(e){switch(e.label){case 0:return[5,S(this.data.keys())];case 1:e.sent();return[2]}})}},{key:"values",value:function e(){return E(this,function(e){switch(e.label){case 0:return[5,S(this.data.values())];case 1:e.sent();return[2]}})}},{key:"entries",value:function e(){return E(this,function(e){switch(e.label){case 0:return[5,S(this.data.entries())];case 1:e.sent();return[2]}})}},{key:"kvKeys",value:function e(){var e,t,r,n,i,u,a;return E(this,function(o){switch(o.label){case 0:e=true,t=false,r=undefined;o.label=1;case 1:o.trys.push([1,6,7,8]);n=this.keys()[Symbol.iterator]();o.label=2;case 2:if(!!(e=(i=n.next()).done))return[3,5];u=i.value;return[4,[u]];case 3:o.sent();o.label=4;case 4:e=true;return[3,2];case 5:return[3,8];case 6:a=o.sent();t=true;r=a;return[3,8];case 7:try{if(!e&&n.return!=null){n.return()}}finally{if(t){throw r}}return[7];case 8:return[2]}})}},{key:"kvValues",value:function e(){var e,t,r,n,i,u,a;return E(this,function(o){switch(o.label){case 0:e=true,t=false,r=undefined;o.label=1;case 1:o.trys.push([1,6,7,8]);n=this.values()[Symbol.iterator]();o.label=2;case 2:if(!!(e=(i=n.next()).done))return[3,5];u=i.value;return[4,u];case 3:o.sent();o.label=4;case 4:e=true;return[3,2];case 5:return[3,8];case 6:a=o.sent();t=true;r=a;return[3,8];case 7:try{if(!e&&n.return!=null){n.return()}}finally{if(t){throw r}}return[7];case 8:return[2]}})}},{key:"kvEntries",value:function e(){var e,t,r,n,i,u,a,o,l;return E(this,function(s){switch(s.label){case 0:e=true,t=false,r=undefined;s.label=1;case 1:s.trys.push([1,6,7,8]);n=this.entries()[Symbol.iterator]();s.label=2;case 2:if(!!(e=(i=n.next()).done))return[3,5];u=m(i.value,2),a=u[0],o=u[1];return[4,[[a],o]];case 3:s.sent();s.label=4;case 4:e=true;return[3,2];case 5:return[3,8];case 6:l=s.sent();t=true;r=l;return[3,8];case 7:try{if(!e&&n.return!=null){n.return()}}finally{if(t){throw r}}return[7];case 8:return[2]}})}},{key:Symbol.iterator,value:function e(){return E(this,function(e){switch(e.label){case 0:return[5,S(this.values())];case 1:e.sent();return[2]}})}},{key:"clone",value:function e(){var e=new t;var r=true,n=false,i=undefined;try{for(var u=this.values()[Symbol.iterator](),a;!(r=(a=u.next()).done);r=true){var o=a.value;e.add(o)}}catch(e){n=true;i=e}finally{try{if(!r&&u.return!=null){u.return()}}finally{if(n){throw i}}}return e}},{key:"merge",value:function e(e){var t=true,r=false,n=undefined;try{for(var i=e.values()[Symbol.iterator](),u;!(t=(u=i.next()).done);t=true){var a=u.value;this.add(a)}}catch(e){r=true;n=e}finally{try{if(!t&&i.return!=null){i.return()}}finally{if(r){throw n}}}return this}},{key:"some",value:function e(e){var t=true,r=false,n=undefined;try{for(var i=this.data[Symbol.iterator](),u;!(t=(u=i.next()).done);t=true){var a=u.value;if(e(a))return!0}}catch(e){r=true;n=e}finally{try{if(!t&&i.return!=null){i.return()}}finally{if(r){throw n}}}return!1}},{key:"every",value:function e(e){var t=true,r=false,n=undefined;try{for(var i=this.data[Symbol.iterator](),u;!(t=(u=i.next()).done);t=true){var a=u.value;if(!e(a))return!1}}catch(e){r=true;n=e}finally{try{if(!t&&i.return!=null){i.return()}}finally{if(r){throw n}}}return!0}},{key:"filter",value:function e(e){var r=new t;var n=true,i=false,u=undefined;try{for(var a=this.data[Symbol.iterator](),o;!(n=(o=a.next()).done);n=true){var l=o.value;e(l,this)&&r.add(l)}}catch(e){i=true;u=e}finally{try{if(!n&&a.return!=null){a.return()}}finally{if(i){throw u}}}return r}},{key:"reduce",value:function e(e,t){var r=this.values(),n=r.next();if(n.done){if(arguments.length<2)throw new TypeError("Reduce of empty ValueSet with no initial value!");return t}var i,u;arguments.length<2?(i=n.value,u=r.next()):(i=t,u=n);for(var a=u;!a.done;a=r.next()){var o=a.value;i=e(i,o)}return i}},{key:"mapValues",value:function e(e){var r=new t;var n=true,i=false,u=undefined;try{for(var a=this.data[Symbol.iterator](),o;!(n=(o=a.next()).done);n=true){var l=o.value;r.add(e(l))}}catch(e){i=true;u=e}finally{try{if(!n&&a.return!=null){a.return()}}finally{if(i){throw u}}}return r}},{key:"mapToArray",value:function e(e){var t=[];var r=true,n=false,i=undefined;try{for(var u=this.values()[Symbol.iterator](),a;!(r=(a=u.next()).done);r=true){var o=a.value;t.push(e(o))}}catch(e){n=true;i=e}finally{try{if(!r&&u.return!=null){u.return()}}finally{if(n){throw i}}}return t}},{key:"map",value:function e(e){var r=new t;var n=true,i=false,u=undefined;try{for(var a=this.values()[Symbol.iterator](),o;!(n=(o=a.next()).done);n=true){var l=o.value;r.add(e(l))}}catch(e){i=true;u=e}finally{try{if(!n&&a.return!=null){a.return()}}finally{if(i){throw u}}}return r}},{key:"toSet",value:function e(){return new Set(this.data)}},{key:"toArray",value:function e(){return g(this.values())}},{key:"toString",value:function e(){return nv(this.data)}}],[{key:"createDeep",value:function e(e){return e?new t(e,h):new t(h)}}]);return t}(nT);var nH=/*#__PURE__*/function(e){c(t,e);function t(e){u(this,t);var r;r=i(this,t);r.base=e;return r}l(t,[{key:"isEmpty",value:function e(){return this.base.isEmpty()}},{key:"clear",value:function e(){var e,t;(e=(t=this.base).clear)===null||e===void 0?void 0:e.call(t)}},{key:"add",value:function e(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++){t[r]=arguments[r]}var n,i;var u=t.slice(0,-1),a=t[t.length-1],o=(n=this.base).get.apply(n,g(u));return(i=this.base).set.apply(i,g(u).concat([o?g(o).concat([a]):[a]])),a}},{key:"remove",value:function e(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++){t[r]=arguments[r]}var n,i;var u=t.slice(0,-1),a=t[t.length-1],o=(n=this.base).get.apply(n,g(u));if(!o)return!1;var l=o.indexOf(a);return l===-1?!1:(o.splice(l,1),o.length===0&&(i=this.base).delete.apply(i,g(u)),!0)}},{key:"getAll",value:function e(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++){t[r]=arguments[r]}var n;var i;return(i=(n=this.base).get.apply(n,g(t)))!==null&&i!==void 0?i:[]}},{key:"iterAll",value:function e(){var e,t,r;var n=arguments;return E(this,function(i){switch(i.label){case 0:for(e=n.length,t=new Array(e),r=0;r<e;r++){t[r]=n[r]}return[5,S(this.getAll.apply(this,g(t)))];case 1:i.sent();return[2]}})}},{key:"values",value:function e(){var e,t,r,n,i,u,a;return E(this,function(o){switch(o.label){case 0:e=true,t=false,r=undefined;o.label=1;case 1:o.trys.push([1,6,7,8]);n=this.keys()[Symbol.iterator]();o.label=2;case 2:if(!!(e=(i=n.next()).done))return[3,5];u=i.value;return[5,S(this.getAll.apply(this,g(u)))];case 3:o.sent();o.label=4;case 4:e=true;return[3,2];case 5:return[3,8];case 6:a=o.sent();t=true;r=a;return[3,8];case 7:try{if(!e&&n.return!=null){n.return()}}finally{if(t){throw r}}return[7];case 8:return[2]}})}},{key:"keys",value:function e(){var e,t,r,n,i,u,a;return E(this,function(o){switch(o.label){case 0:e=true,t=false,r=undefined;o.label=1;case 1:o.trys.push([1,6,7,8]);n=this.base.kvKeys()[Symbol.iterator]();o.label=2;case 2:if(!!(e=(i=n.next()).done))return[3,5];u=i.value;return[4,u];case 3:o.sent();o.label=4;case 4:e=true;return[3,2];case 5:return[3,8];case 6:a=o.sent();t=true;r=a;return[3,8];case 7:try{if(!e&&n.return!=null){n.return()}}finally{if(t){throw r}}return[7];case 8:return[2]}})}},{key:"entries",value:function e(){var e,t,r,n,i,u,a,o,l;return E(this,function(s){switch(s.label){case 0:e=true,t=false,r=undefined;s.label=1;case 1:s.trys.push([1,7,8,9]);n=this.keys()[Symbol.iterator]();s.label=2;case 2:if(!!(e=(i=n.next()).done))return[3,6];u=i.value;a=this.getAll.apply(this,g(u));o=a.length>0;if(!o)return[3,4];return[4,[u,a]];case 3:o=s.sent();s.label=4;case 4:o;s.label=5;case 5:e=true;return[3,2];case 6:return[3,9];case 7:l=s.sent();t=true;r=l;return[3,9];case 8:try{if(!e&&n.return!=null){n.return()}}finally{if(t){throw r}}return[7];case 9:return[2]}})}},{key:Symbol.iterator,value:function e(){return this.entries()}},{key:"toString",value:function e(){var e=[];var t=true,r=false,n=undefined;try{for(var i=this.keys()[Symbol.iterator](),u;!(t=(u=i.next()).done);t=true){var a=u.value;var o=this.getAll.apply(this,g(a)),l=Array.isArray(a)?nv(a):"[ ]",s=Array.isArray(o)?nv(o):"[ ]";e.push("".concat(l," => ").concat(s))}}catch(e){r=true;n=e}finally{try{if(!t&&i.return!=null){i.return()}}finally{if(r){throw n}}}return e.length===0?"MultiContainer{ }":"MultiContainer{ ".concat(e.join(", ")," }")}}]);return t}(nT);var n$=function e(t){u(this,e);this.value=t;nu(this,"next",null);nu(this,"prev",null)},nJ=/*#__PURE__*/function(e){c(t,e);function t(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++){r[n]=arguments[n]}u(this,t);var a;a=i(this,t);nu(a,"_head",null);nu(a,"_tail",null);nu(a,"_size",0);nu(a,"equals");var o=r.at(-1);a.equals=W(o)?r.pop():nU;var l=r[0];var s=true,c=false,f=undefined;if(l)try{for(var h=l[Symbol.iterator](),v;!(s=(v=h.next()).done);s=true){var y=v.value;a.push(y)}}catch(e){c=true;f=e}finally{try{if(!s&&h.return!=null){h.return()}}finally{if(c){throw f}}}return a}l(t,[{key:"length",get:function e(){return this._size}},{key:"first",get:function e(){var e;return(e=this._head)===null||e===void 0?void 0:e.value}},{key:"last",get:function e(){var e;return(e=this._tail)===null||e===void 0?void 0:e.value}},{key:"push",value:function e(e){var t=new n$(e);this._tail?(t.prev=this._tail,this._tail.next=t,this._tail=t):this._head=this._tail=t,this._size++}},{key:"pop",value:function e(){if(!this._tail)return;var e=this._tail.value;return this._tail=this._tail.prev,this._tail?this._tail.next=null:this._head=null,this._size--,e}},{key:"unshift",value:function e(e){var t=new n$(e);this._head?(t.next=this._head,this._head.prev=t,this._head=t):this._head=this._tail=t,this._size++}},{key:"shift",value:function e(){if(!this._head)return;var e=this._head.value;return this._head=this._head.next,this._head?this._head.prev=null:this._tail=null,this._size--,e}},{key:"has",value:function e(e){for(var t=this._head;t;t=t.next)if(this.equals(t.value,e))return!0;return!1}},{key:"get",value:function e(e){var t;return(t=this.nodeAt(e))===null||t===void 0?void 0:t.value}},{key:"set",value:function e(e,t){var r=this.nodeAt(e);return r?(r.value=t,!0):!1}},{key:"insertAt",value:function e(e,t){if(e<0||e>this._size)return!1;if(e===0)return this.unshift(t),!0;if(e===this._size)return this.push(t),!0;var r=this.nodeAt(e);if(!r)return!1;var n=r.prev,i=new n$(t);return i.next=r,i.prev=n,n&&(n.next=i),r.prev=i,this._size++,!0}},{key:"removeAt",value:function e(e){var t=this.nodeAt(e);if(t)return t.prev?t.prev.next=t.next:this._head=t.next,t.next?t.next.prev=t.prev:this._tail=t.prev,this._size--,t.value}},{key:"remove",value:function e(e){for(var t=this._head;t;t=t.next)if(this.equals(t.value,e))return t.prev?t.prev.next=t.next:this._head=t.next,t.next?t.next.prev=t.prev:this._tail=t.prev,this._size--,!0;return!1}},{key:"toArray",value:function e(){var e=[];var t=true,r=false,n=undefined;try{for(var i=this[Symbol.iterator](),u;!(t=(u=i.next()).done);t=true){var a=u.value;e.push(a)}}catch(e){r=true;n=e}finally{try{if(!t&&i.return!=null){i.return()}}finally{if(r){throw n}}}return e}},{key:"fromArray",value:function e(e){this.clear();var t=true,r=false,n=undefined;try{for(var i=e[Symbol.iterator](),u;!(t=(u=i.next()).done);t=true){var a=u.value;this.push(a)}}catch(e){r=true;n=e}finally{try{if(!t&&i.return!=null){i.return()}}finally{if(r){throw n}}}}},{key:"clear",value:function e(){this._head=this._tail=null,this._size=0}},{key:Symbol.iterator,value:function e(){return E(this,function(e){switch(e.label){case 0:return[5,S(this.values())];case 1:e.sent();return[2]}})}},{key:"keys",value:function e(){var e;return E(this,function(t){switch(t.label){case 0:e=0;t.label=1;case 1:if(!(e<this._size))return[3,4];return[4,e];case 2:t.sent();t.label=3;case 3:e++;return[3,1];case 4:return[2]}})}},{key:"values",value:function e(){var e;return E(this,function(t){switch(t.label){case 0:e=this._head;t.label=1;case 1:if(!e)return[3,4];return[4,e.value];case 2:t.sent(),e=e.next;t.label=3;case 3:return[3,1];case 4:return[2]}})}},{key:"entries",value:function e(){var e,t;return E(this,function(r){switch(r.label){case 0:e=this._head,t=0;r.label=1;case 1:if(!e)return[3,4];return[4,[t++,e.value]];case 2:r.sent(),e=e.next;r.label=3;case 3:return[3,1];case 4:return[2]}})}},{key:"toString",value:function e(){return this._size===0?"LinkedList(0)[ ]":"LinkedList(".concat(this._size,")[ ").concat(this.toArray().join(", ")," ]")}},{key:"nodeAt",value:function e(e){if(e<0||e>=this._size)return null;var t;if(e<this._size/2){t=this._head;for(var r=0;r<e;r++)t=t.next}else{t=this._tail;for(var n=this._size-1;n>e;n--)t=t.prev}return t}},{key:"clone",value:function e(){return new t(this)}}],[{key:"createDeep",value:function e(e){return e?new t(e,h):new t(h)}}]);return t}(nT);return ni(na)}();
|