@blackglory/observe 0.1.7 → 0.2.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.
Files changed (67) hide show
  1. package/README.md +2 -2
  2. package/lib/index.d.ts +4 -0
  3. package/lib/index.js +5 -0
  4. package/lib/index.js.map +1 -0
  5. package/lib/observe-addtion-of-descendant-nodes.js +7 -0
  6. package/lib/observe-addtion-of-descendant-nodes.js.map +1 -0
  7. package/lib/observe-removal-of-descendant-nodes.js +7 -0
  8. package/lib/observe-removal-of-descendant-nodes.js.map +1 -0
  9. package/lib/{es2015/observe-state-changes.js → observe-state-changes.js} +6 -10
  10. package/lib/observe-state-changes.js.map +1 -0
  11. package/lib/observe-url-changes.d.ts +2 -0
  12. package/lib/observe-url-changes.js +7 -0
  13. package/lib/observe-url-changes.js.map +1 -0
  14. package/lib/utils/from-mutation-observer.js +9 -0
  15. package/lib/utils/from-mutation-observer.js.map +1 -0
  16. package/package.json +31 -43
  17. package/dist/es2015/index.min.mjs +0 -16
  18. package/dist/es2015/index.min.mjs.map +0 -1
  19. package/dist/es2015/index.mjs +0 -5364
  20. package/dist/es2015/index.mjs.map +0 -1
  21. package/dist/es2015/index.umd.js +0 -5377
  22. package/dist/es2015/index.umd.js.map +0 -1
  23. package/dist/es2015/index.umd.min.js +0 -16
  24. package/dist/es2015/index.umd.min.js.map +0 -1
  25. package/dist/es2018/index.min.mjs +0 -16
  26. package/dist/es2018/index.min.mjs.map +0 -1
  27. package/dist/es2018/index.mjs +0 -5364
  28. package/dist/es2018/index.mjs.map +0 -1
  29. package/dist/es2018/index.umd.js +0 -5377
  30. package/dist/es2018/index.umd.js.map +0 -1
  31. package/dist/es2018/index.umd.min.js +0 -16
  32. package/dist/es2018/index.umd.min.js.map +0 -1
  33. package/lib/es2015/index.d.ts +0 -4
  34. package/lib/es2015/index.js +0 -21
  35. package/lib/es2015/index.js.map +0 -1
  36. package/lib/es2015/observe-addtion-of-descendant-nodes.js +0 -11
  37. package/lib/es2015/observe-addtion-of-descendant-nodes.js.map +0 -1
  38. package/lib/es2015/observe-removal-of-descendant-nodes.js +0 -11
  39. package/lib/es2015/observe-removal-of-descendant-nodes.js.map +0 -1
  40. package/lib/es2015/observe-state-changes.js.map +0 -1
  41. package/lib/es2015/observe-url-changes.d.ts +0 -2
  42. package/lib/es2015/observe-url-changes.js +0 -11
  43. package/lib/es2015/observe-url-changes.js.map +0 -1
  44. package/lib/es2015/utils/from-mutation-observer.js +0 -13
  45. package/lib/es2015/utils/from-mutation-observer.js.map +0 -1
  46. package/lib/es2018/index.d.ts +0 -4
  47. package/lib/es2018/index.js +0 -21
  48. package/lib/es2018/index.js.map +0 -1
  49. package/lib/es2018/observe-addtion-of-descendant-nodes.d.ts +0 -2
  50. package/lib/es2018/observe-addtion-of-descendant-nodes.js +0 -11
  51. package/lib/es2018/observe-addtion-of-descendant-nodes.js.map +0 -1
  52. package/lib/es2018/observe-removal-of-descendant-nodes.d.ts +0 -2
  53. package/lib/es2018/observe-removal-of-descendant-nodes.js +0 -11
  54. package/lib/es2018/observe-removal-of-descendant-nodes.js.map +0 -1
  55. package/lib/es2018/observe-state-changes.d.ts +0 -2
  56. package/lib/es2018/observe-state-changes.js +0 -48
  57. package/lib/es2018/observe-state-changes.js.map +0 -1
  58. package/lib/es2018/observe-url-changes.d.ts +0 -2
  59. package/lib/es2018/observe-url-changes.js +0 -11
  60. package/lib/es2018/observe-url-changes.js.map +0 -1
  61. package/lib/es2018/utils/from-mutation-observer.d.ts +0 -2
  62. package/lib/es2018/utils/from-mutation-observer.js +0 -13
  63. package/lib/es2018/utils/from-mutation-observer.js.map +0 -1
  64. /package/lib/{es2015/observe-addtion-of-descendant-nodes.d.ts → observe-addtion-of-descendant-nodes.d.ts} +0 -0
  65. /package/lib/{es2015/observe-removal-of-descendant-nodes.d.ts → observe-removal-of-descendant-nodes.d.ts} +0 -0
  66. /package/lib/{es2015/observe-state-changes.d.ts → observe-state-changes.d.ts} +0 -0
  67. /package/lib/{es2015/utils → utils}/from-mutation-observer.d.ts +0 -0
package/README.md CHANGED
@@ -9,9 +9,9 @@ yarn add @blackglory/observe
9
9
  ```
10
10
 
11
11
  ## API
12
- ### observeUrlChanges
12
+ ### observeURLChanges
13
13
  ```ts
14
- function observeUrlChanges(): Observable<void>
14
+ function observeURLChanges(): Observable<void>
15
15
  ```
16
16
 
17
17
  ### observeStateChanges
package/lib/index.d.ts ADDED
@@ -0,0 +1,4 @@
1
+ export * from './observe-addtion-of-descendant-nodes.js';
2
+ export * from './observe-removal-of-descendant-nodes.js';
3
+ export * from './observe-state-changes.js';
4
+ export * from './observe-url-changes.js';
package/lib/index.js ADDED
@@ -0,0 +1,5 @@
1
+ export * from './observe-addtion-of-descendant-nodes.js';
2
+ export * from './observe-removal-of-descendant-nodes.js';
3
+ export * from './observe-state-changes.js';
4
+ export * from './observe-url-changes.js';
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,0CAA0C,CAAA;AACxD,cAAc,0CAA0C,CAAA;AACxD,cAAc,4BAA4B,CAAA;AAC1C,cAAc,0BAA0B,CAAA"}
@@ -0,0 +1,7 @@
1
+ import { fromMutationObserver } from "./utils/from-mutation-observer.js";
2
+ import { filter, map } from 'rxjs/operators';
3
+ import * as Iter from 'iterable-operator';
4
+ export function observeAdditionOfDescendantNodes(node) {
5
+ return fromMutationObserver(node, { childList: true, subtree: true }).pipe(map(records => Iter.toArray(Iter.flatten(Iter.map(records, x => x.addedNodes)))), filter(addedNodes => addedNodes.length > 0));
6
+ }
7
+ //# sourceMappingURL=observe-addtion-of-descendant-nodes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"observe-addtion-of-descendant-nodes.js","sourceRoot":"","sources":["../src/observe-addtion-of-descendant-nodes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,0CAAwC;AACvE,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,gBAAgB,CAAA;AAE5C,OAAO,KAAK,IAAI,MAAM,mBAAmB,CAAA;AAEzC,MAAM,UAAU,gCAAgC,CAAC,IAAU;IACzD,OAAO,oBAAoB,CACzB,IAAI,EACJ,EAAE,SAAS,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,CACnC,CAAC,IAAI,CACJ,GAAG,CAAC,OAAO,CAAC,EAAE,CAAC,IAAI,CAAC,OAAO,CACzB,IAAI,CAAC,OAAO,CACV,IAAI,CAAC,GAAG,CAAC,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,CACrC,CACF,CAAC,EACF,MAAM,CAAC,UAAU,CAAC,EAAE,CAAC,UAAU,CAAC,MAAM,GAAG,CAAC,CAAC,CAC5C,CAAA;AACH,CAAC"}
@@ -0,0 +1,7 @@
1
+ import { fromMutationObserver } from "./utils/from-mutation-observer.js";
2
+ import { filter, map } from 'rxjs/operators';
3
+ import * as Iter from 'iterable-operator';
4
+ export function observeRemovalOfDescendantNodes(node) {
5
+ return fromMutationObserver(node, { childList: true, subtree: true }).pipe(map(records => Iter.toArray(Iter.flatten(Iter.map(records, x => x.removedNodes)))), filter(removedNodes => removedNodes.length > 0));
6
+ }
7
+ //# sourceMappingURL=observe-removal-of-descendant-nodes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"observe-removal-of-descendant-nodes.js","sourceRoot":"","sources":["../src/observe-removal-of-descendant-nodes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,0CAAwC;AACvE,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,gBAAgB,CAAA;AAE5C,OAAO,KAAK,IAAI,MAAM,mBAAmB,CAAA;AAEzC,MAAM,UAAU,+BAA+B,CAAC,IAAU;IACxD,OAAO,oBAAoB,CACzB,IAAI,EACJ,EAAE,SAAS,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,CACnC,CAAC,IAAI,CACJ,GAAG,CAAC,OAAO,CAAC,EAAE,CAAC,IAAI,CAAC,OAAO,CACzB,IAAI,CAAC,OAAO,CACV,IAAI,CAAC,GAAG,CAAC,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,YAAY,CAAC,CACvC,CACF,CAAC,EACF,MAAM,CAAC,YAAY,CAAC,EAAE,CAAC,YAAY,CAAC,MAAM,GAAG,CAAC,CAAC,CAChD,CAAA;AACH,CAAC"}
@@ -1,18 +1,14 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.observeStateChanges = void 0;
4
- const rxjs_1 = require("rxjs");
5
- const operators_1 = require("rxjs/operators");
1
+ import { Observable, fromEvent, merge } from 'rxjs';
2
+ import { map } from 'rxjs/operators';
6
3
  const pushStateHooks = new Set();
7
4
  const replaceStateHooks = new Set();
8
5
  let pushStateHookRegistered = false;
9
6
  let replaceStateHookRegistered = false;
10
- function observeStateChanges() {
11
- return (0, rxjs_1.merge)(observePushState(), observeReplaceState(), (0, rxjs_1.fromEvent)(window, 'popstate')).pipe((0, operators_1.map)(_ => undefined));
7
+ export function observeStateChanges() {
8
+ return merge(observePushState(), observeReplaceState(), fromEvent(window, 'popstate')).pipe(map(_ => undefined));
12
9
  }
13
- exports.observeStateChanges = observeStateChanges;
14
10
  function observePushState() {
15
- return new rxjs_1.Observable(observer => {
11
+ return new Observable(observer => {
16
12
  if (!pushStateHookRegistered) {
17
13
  registerPushStateHook();
18
14
  }
@@ -21,7 +17,7 @@ function observePushState() {
21
17
  });
22
18
  }
23
19
  function observeReplaceState() {
24
- return new rxjs_1.Observable(observer => {
20
+ return new Observable(observer => {
25
21
  if (!replaceStateHookRegistered) {
26
22
  registerReplaceStateHook();
27
23
  }
@@ -0,0 +1 @@
1
+ {"version":3,"file":"observe-state-changes.js","sourceRoot":"","sources":["../src/observe-state-changes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAc,SAAS,EAAE,KAAK,EAAE,MAAM,MAAM,CAAA;AAC/D,OAAO,EAAE,GAAG,EAAE,MAAM,gBAAgB,CAAA;AAEpC,MAAM,cAAc,GAAG,IAAI,GAAG,EAAoB,CAAA;AAClD,MAAM,iBAAiB,GAAG,IAAI,GAAG,EAAoB,CAAA;AACrD,IAAI,uBAAuB,GAAG,KAAK,CAAA;AACnC,IAAI,0BAA0B,GAAG,KAAK,CAAA;AAEtC,MAAM,UAAU,mBAAmB;IACjC,OAAO,KAAK,CACV,gBAAgB,EAAE,EAClB,mBAAmB,EAAE,EACrB,SAAS,CAAC,MAAM,EAAE,UAAU,CAAC,CAC9B,CAAC,IAAI,CACJ,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,SAAS,CAAC,CACpB,CAAA;AACH,CAAC;AAED,SAAS,gBAAgB;IACvB,OAAO,IAAI,UAAU,CAAC,QAAQ,CAAC,EAAE;QAC/B,IAAI,CAAC,uBAAuB,EAAE;YAC5B,qBAAqB,EAAE,CAAA;SACxB;QACD,cAAc,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAA;QAC5B,OAAO,GAAG,EAAE,CAAC,cAAc,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAA;IAC9C,CAAC,CAAC,CAAA;AACJ,CAAC;AAED,SAAS,mBAAmB;IAC1B,OAAO,IAAI,UAAU,CAAC,QAAQ,CAAC,EAAE;QAC/B,IAAI,CAAC,0BAA0B,EAAE;YAC/B,wBAAwB,EAAE,CAAA;SAC3B;QACD,iBAAiB,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAA;QAC/B,OAAO,GAAG,EAAE,CAAC,iBAAiB,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAA;IACjD,CAAC,CAAC,CAAA;AACJ,CAAC;AAED,SAAS,qBAAqB;IAC5B,MAAM,SAAS,GAAG,OAAO,CAAC,SAAS,CAAA;IACnC,OAAO,CAAC,SAAS,GAAG,UAAU,GAAG,IAAI;QACnC,OAAO,CAAC,KAAK,CAAC,SAAS,EAAE,IAAI,EAAE,IAAI,CAAC,CAAA;QACpC,cAAc,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAA;IACrD,CAAC,CAAA;IACD,uBAAuB,GAAG,IAAI,CAAA;AAChC,CAAC;AAED,SAAS,wBAAwB;IAC/B,MAAM,YAAY,GAAG,OAAO,CAAC,YAAY,CAAA;IACzC,OAAO,CAAC,YAAY,GAAG,UAAU,GAAG,IAAI;QACtC,OAAO,CAAC,KAAK,CAAC,YAAY,EAAE,IAAI,EAAE,IAAI,CAAC,CAAA;QACvC,iBAAiB,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAA;IACxD,CAAC,CAAA;IACD,0BAA0B,GAAG,IAAI,CAAA;AACnC,CAAC"}
@@ -0,0 +1,2 @@
1
+ import { Observable } from 'rxjs';
2
+ export declare function observeURLChanges(): Observable<void>;
@@ -0,0 +1,7 @@
1
+ import { animationFrames } from 'rxjs';
2
+ import { filter, tap, map } from 'rxjs/operators';
3
+ export function observeURLChanges() {
4
+ let url = document.URL;
5
+ return animationFrames().pipe(filter(() => url !== document.URL), tap(() => url = document.URL), map(() => undefined));
6
+ }
7
+ //# sourceMappingURL=observe-url-changes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"observe-url-changes.js","sourceRoot":"","sources":["../src/observe-url-changes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,eAAe,EAAE,MAAM,MAAM,CAAA;AAClD,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM,gBAAgB,CAAA;AAEjD,MAAM,UAAU,iBAAiB;IAC/B,IAAI,GAAG,GAAG,QAAQ,CAAC,GAAG,CAAA;IACtB,OAAO,eAAe,EAAE,CAAC,IAAI,CAC3B,MAAM,CAAC,GAAG,EAAE,CAAC,GAAG,KAAK,QAAQ,CAAC,GAAG,CAAC,EAClC,GAAG,CAAC,GAAG,EAAE,CAAC,GAAG,GAAG,QAAQ,CAAC,GAAG,CAAC,EAC7B,GAAG,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC,CACrB,CAAA;AACH,CAAC"}
@@ -0,0 +1,9 @@
1
+ import { Observable } from 'rxjs';
2
+ export function fromMutationObserver(...args) {
3
+ return new Observable(subscriber => {
4
+ const observer = new MutationObserver(mutationList => subscriber.next(mutationList));
5
+ observer.observe(...args);
6
+ return () => observer.disconnect();
7
+ });
8
+ }
9
+ //# sourceMappingURL=from-mutation-observer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"from-mutation-observer.js","sourceRoot":"","sources":["../../src/utils/from-mutation-observer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,MAAM,CAAA;AAEjC,MAAM,UAAU,oBAAoB,CAClC,GAAG,IAA6C;IAEhD,OAAO,IAAI,UAAU,CAAC,UAAU,CAAC,EAAE;QACjC,MAAM,QAAQ,GAAG,IAAI,gBAAgB,CACnC,YAAY,CAAC,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,YAAY,CAAC,CAC9C,CAAA;QACD,QAAQ,CAAC,OAAO,CAAC,GAAG,IAAI,CAAC,CAAA;QACzB,OAAO,GAAG,EAAE,CAAC,QAAQ,CAAC,UAAU,EAAE,CAAA;IACpC,CAAC,CAAC,CAAA;AACJ,CAAC"}
package/package.json CHANGED
@@ -1,73 +1,61 @@
1
1
  {
2
2
  "name": "@blackglory/observe",
3
- "version": "0.1.7",
3
+ "version": "0.2.0",
4
4
  "description": "A module for observing things happening.",
5
5
  "keywords": [
6
6
  "DOM"
7
7
  ],
8
8
  "files": [
9
- "lib",
10
- "dist"
9
+ "lib"
11
10
  ],
12
- "main": "lib/es2018/index.js",
13
- "types": "lib/es2018/index.d.ts",
11
+ "type": "module",
12
+ "main": "lib/index.js",
13
+ "types": "lib/index.d.ts",
14
14
  "sideEffects": false,
15
+ "engines": {
16
+ "node": ">=16"
17
+ },
15
18
  "repository": "git@github.com:BlackGlory/observe.git",
16
19
  "author": "BlackGlory <woshenmedoubuzhidao@blackglory.me>",
17
20
  "license": "MIT",
18
21
  "scripts": {
22
+ "prepare": "ts-patch install -s",
19
23
  "lint": "eslint --ext .js,.jsx,.ts,.tsx --quiet src __tests__",
20
- "test": "jest --config jest.config.js",
21
- "test:coverage": "jest --coverage --config jest.config.js",
22
- "prepublishOnly": "run-s clean build bundle",
23
- "clean": "run-p clean:*",
24
- "clean:build": "rimraf lib",
25
- "clean:bundle": "rimraf dist",
26
- "build": "run-p build:*",
27
- "build:es2015": "run-s build:es2015:*",
28
- "build:es2015:compile": "tsc --project tsconfig.build.json --module commonjs --target es2015 --outDir lib/es2015",
29
- "build:es2015:patch": "tscpaths -p tsconfig.build.json -s ./src -o ./lib/es2015",
30
- "build:es2018": "run-s build:es2018:*",
31
- "build:es2018:compile": "tsc --project tsconfig.build.json --module commonjs --target es2018 --outDir lib/es2018",
32
- "build:es2018:patch": "tscpaths -p tsconfig.build.json -s ./src -o ./lib/es2018",
33
- "bundle": "rollup --config rollup.config.js",
24
+ "test": "vitest --run",
25
+ "prepublishOnly": "run-s prepare clean build",
26
+ "clean": "rimraf lib",
27
+ "build": "tsc --project tsconfig.build.json",
34
28
  "release": "standard-version"
35
29
  },
36
30
  "husky": {
37
31
  "hooks": {
38
- "pre-commit": "run-s lint build test",
32
+ "pre-commit": "run-s prepare lint build test",
39
33
  "commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
40
34
  }
41
35
  },
42
36
  "devDependencies": {
43
- "@blackglory/jest-matchers": "^0.2.1",
44
- "@blackglory/wait-for": "^0.5.1",
45
- "@commitlint/cli": "^17.2.0",
46
- "@commitlint/config-conventional": "^17.2.0",
47
- "@rollup/plugin-commonjs": "^22.0.2",
48
- "@rollup/plugin-json": "^4.1.0",
49
- "@rollup/plugin-node-resolve": "^13.3.0",
50
- "@rollup/plugin-replace": "^4.0.0",
51
- "@rollup/plugin-typescript": "^8.3.4",
52
- "@types/jest": "^27.4.0",
53
- "@typescript-eslint/eslint-plugin": "^5.42.0",
54
- "@typescript-eslint/parser": "^5.42.0",
55
- "eslint": "^8.26.0",
37
+ "@blackglory/wait-for": "^0.7.1",
38
+ "@commitlint/cli": "^17.4.4",
39
+ "@commitlint/config-conventional": "^17.4.4",
40
+ "@typescript-eslint/eslint-plugin": "^5.55.0",
41
+ "@typescript-eslint/parser": "^5.55.0",
42
+ "cross-env": "^7.0.3",
43
+ "eslint": "^8.36.0",
56
44
  "husky": "^4.3.6",
57
- "jest": "^27.4.7",
45
+ "jsdom": "^21.1.1",
58
46
  "npm-run-all": "^4.1.5",
59
47
  "rimraf": "^3.0.2",
60
- "rollup": "^2.77.2",
61
- "rollup-plugin-analyzer": "^4.0.0",
62
- "rollup-plugin-terser": "^7.0.2",
63
48
  "standard-version": "^9.5.0",
64
- "ts-jest": "^27.1.2",
65
- "tscpaths": "^0.0.9",
66
- "tslib": "^2.4.0",
67
- "typescript": "^4.7.4"
49
+ "ts-patch": "^2.1.0",
50
+ "tslib": "^2.5.0",
51
+ "typescript": "4.8",
52
+ "typescript-transform-paths": "^3.4.6",
53
+ "vite": "^4.2.0",
54
+ "vite-tsconfig-paths": "^4.0.7",
55
+ "vitest": "^0.29.3"
68
56
  },
69
57
  "dependencies": {
70
- "iterable-operator": "^2.1.0",
71
- "rxjs": "^7.5.6"
58
+ "iterable-operator": "^4.0.3",
59
+ "rxjs": "^7.8.0"
72
60
  }
73
61
  }
@@ -1,16 +0,0 @@
1
- /*! *****************************************************************************
2
- Copyright (c) Microsoft Corporation.
3
-
4
- Permission to use, copy, modify, and/or distribute this software for any
5
- purpose with or without fee is hereby granted.
6
-
7
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
8
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
9
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
10
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
11
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
12
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
13
- PERFORMANCE OF THIS SOFTWARE.
14
- ***************************************************************************** */
15
- var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};function n(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}function e(t,n,e,r){return new(e||(e=Promise))((function(o,i){function u(t){try{s(r.next(t))}catch(t){i(t)}}function c(t){try{s(r.throw(t))}catch(t){i(t)}}function s(t){var n;t.done?o(t.value):(n=t.value,n instanceof e?n:new e((function(t){t(n)}))).then(u,c)}s((r=r.apply(t,n||[])).next())}))}function r(t,n){var e,r,o,i,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(i){return function(c){return function(i){if(e)throw new TypeError("Generator is already executing.");for(;u;)try{if(e=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return u.label++,{value:i[1],done:!1};case 5:u.label++,r=i[1],i=[0];continue;case 7:i=u.ops.pop(),u.trys.pop();continue;default:if(!(o=u.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){u=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){u.label=i[1];break}if(6===i[0]&&u.label<o[1]){u.label=o[1],o=i;break}if(o&&u.label<o[2]){u.label=o[2],u.ops.push(i);break}o[2]&&u.ops.pop(),u.trys.pop();continue}i=n.call(t,u)}catch(t){i=[6,t],r=0}finally{e=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,c])}}}function o(t){var n="function"==typeof Symbol&&Symbol.iterator,e=n&&t[n],r=0;if(e)return e.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(n?"Object is not iterable.":"Symbol.iterator is not defined.")}function i(t,n){var e="function"==typeof Symbol&&t[Symbol.iterator];if(!e)return t;var r,o,i=e.call(t),u=[];try{for(;(void 0===n||n-- >0)&&!(r=i.next()).done;)u.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(e=i.return)&&e.call(i)}finally{if(o)throw o.error}}return u}function u(t,n,e){if(e||2===arguments.length)for(var r,o=0,i=n.length;o<i;o++)!r&&o in n||(r||(r=Array.prototype.slice.call(n,0,o)),r[o]=n[o]);return t.concat(r||Array.prototype.slice.call(n))}function c(t){return this instanceof c?(this.v=t,this):new c(t)}function s(t,n,e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,o=e.apply(t,n||[]),i=[];return r={},u("next"),u("throw"),u("return"),r[Symbol.asyncIterator]=function(){return this},r;function u(t){o[t]&&(r[t]=function(n){return new Promise((function(e,r){i.push([t,n,e,r])>1||s(t,n)}))})}function s(t,n){try{(e=o[t](n)).value instanceof c?Promise.resolve(e.value.v).then(a,l):f(i[0][2],e)}catch(t){f(i[0][3],t)}var e}function a(t){s("next",t)}function l(t){s("throw",t)}function f(t,n){t(n),i.shift(),i.length&&s(i[0][0],i[0][1])}}function a(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n,e=t[Symbol.asyncIterator];return e?e.call(t):(t=o(t),n={},r("next"),r("throw"),r("return"),n[Symbol.asyncIterator]=function(){return this},n);function r(e){n[e]=t[e]&&function(n){return new Promise((function(r,o){(function(t,n,e,r){Promise.resolve(r).then((function(n){t({value:n,done:e})}),n)})(r,o,(n=t[e](n)).done,n.value)}))}}}function l(t){return"function"==typeof t}function f(t){var n=t((function(t){Error.call(t),t.stack=(new Error).stack}));return n.prototype=Object.create(Error.prototype),n.prototype.constructor=n,n}var d=f((function(t){return function(n){t(this),this.message=n?n.length+" errors occurred during unsubscription:\n"+n.map((function(t,n){return n+1+") "+t.toString()})).join("\n "):"",this.name="UnsubscriptionError",this.errors=n}}));function y(t,n){if(t){var e=t.indexOf(n);0<=e&&t.splice(e,1)}}var v=function(){function t(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}var n;return t.prototype.unsubscribe=function(){var t,n,e,r,c;if(!this.closed){this.closed=!0;var s=this._parentage;if(s)if(this._parentage=null,Array.isArray(s))try{for(var a=o(s),f=a.next();!f.done;f=a.next()){f.value.remove(this)}}catch(n){t={error:n}}finally{try{f&&!f.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}else s.remove(this);var y=this.initialTeardown;if(l(y))try{y()}catch(t){c=t instanceof d?t.errors:[t]}var v=this._finalizers;if(v){this._finalizers=null;try{for(var h=o(v),p=h.next();!p.done;p=h.next()){var m=p.value;try{b(m)}catch(t){c=null!=c?c:[],t instanceof d?c=u(u([],i(c)),i(t.errors)):c.push(t)}}}catch(t){e={error:t}}finally{try{p&&!p.done&&(r=h.return)&&r.call(h)}finally{if(e)throw e.error}}}if(c)throw new d(c)}},t.prototype.add=function(n){var e;if(n&&n!==this)if(this.closed)b(n);else{if(n instanceof t){if(n.closed||n._hasParent(this))return;n._addParent(this)}(this._finalizers=null!==(e=this._finalizers)&&void 0!==e?e:[]).push(n)}},t.prototype._hasParent=function(t){var n=this._parentage;return n===t||Array.isArray(n)&&n.includes(t)},t.prototype._addParent=function(t){var n=this._parentage;this._parentage=Array.isArray(n)?(n.push(t),n):n?[n,t]:t},t.prototype._removeParent=function(t){var n=this._parentage;n===t?this._parentage=null:Array.isArray(n)&&y(n,t)},t.prototype.remove=function(n){var e=this._finalizers;e&&y(e,n),n instanceof t&&n._removeParent(this)},t.EMPTY=((n=new t).closed=!0,n),t}(),h=v.EMPTY;function p(t){return t instanceof v||t&&"closed"in t&&l(t.remove)&&l(t.add)&&l(t.unsubscribe)}function b(t){l(t)?t():t.unsubscribe()}var m={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},w=function(t,n){for(var e=[],r=2;r<arguments.length;r++)e[r-2]=arguments[r];return setTimeout.apply(void 0,u([t,n],i(e)))};function g(t){w((function(){throw t}))}function _(){}function A(t){t()}var x=function(t){function e(n){var e=t.call(this)||this;return e.isStopped=!1,n?(e.destination=n,p(n)&&n.add(e)):e.destination=T,e}return n(e,t),e.create=function(t,n,e){return new E(t,n,e)},e.prototype.next=function(t){this.isStopped||this._next(t)},e.prototype.error=function(t){this.isStopped||(this.isStopped=!0,this._error(t))},e.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this),this.destination=null)},e.prototype._next=function(t){this.destination.next(t)},e.prototype._error=function(t){try{this.destination.error(t)}finally{this.unsubscribe()}},e.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},e}(v),S=Function.prototype.bind;function I(t,n){return S.call(t,n)}var O=function(){function t(t){this.partialObserver=t}return t.prototype.next=function(t){var n=this.partialObserver;if(n.next)try{n.next(t)}catch(t){j(t)}},t.prototype.error=function(t){var n=this.partialObserver;if(n.error)try{n.error(t)}catch(t){j(t)}else j(t)},t.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(t){j(t)}},t}(),E=function(t){function e(n,e,r){var o,i,u=t.call(this)||this;l(n)||!n?o={next:null!=n?n:void 0,error:null!=e?e:void 0,complete:null!=r?r:void 0}:u&&m.useDeprecatedNextContext?((i=Object.create(n)).unsubscribe=function(){return u.unsubscribe()},o={next:n.next&&I(n.next,i),error:n.error&&I(n.error,i),complete:n.complete&&I(n.complete,i)}):o=n;return u.destination=new O(o),u}return n(e,t),e}(x);function j(t){g(t)}var T={closed:!0,next:_,error:function(t){throw t},complete:_},P="function"==typeof Symbol&&Symbol.observable||"@@observable";function N(t){return t}function k(t){return 0===t.length?N:1===t.length?t[0]:function(n){return t.reduce((function(t,n){return n(t)}),n)}}var B=function(){function t(t){t&&(this._subscribe=t)}return t.prototype.lift=function(n){var e=new t;return e.source=this,e.operator=n,e},t.prototype.subscribe=function(t,n,e){var r,o=this,i=(r=t)&&r instanceof x||function(t){return t&&l(t.next)&&l(t.error)&&l(t.complete)}(r)&&p(r)?t:new E(t,n,e);return A((function(){var t=o,n=t.operator,e=t.source;i.add(n?n.call(i,e):e?o._subscribe(i):o._trySubscribe(i))})),i},t.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(n){t.error(n)}},t.prototype.forEach=function(t,n){var e=this;return new(n=q(n))((function(n,r){var o=new E({next:function(n){try{t(n)}catch(t){r(t),o.unsubscribe()}},error:r,complete:n});e.subscribe(o)}))},t.prototype._subscribe=function(t){var n;return null===(n=this.source)||void 0===n?void 0:n.subscribe(t)},t.prototype[P]=function(){return this},t.prototype.pipe=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return k(t)(this)},t.prototype.toPromise=function(t){var n=this;return new(t=q(t))((function(t,e){var r;n.subscribe((function(t){return r=t}),(function(t){return e(t)}),(function(){return t(r)}))}))},t.create=function(n){return new t(n)},t}();function q(t){var n;return null!==(n=null!=t?t:m.Promise)&&void 0!==n?n:Promise}function F(t){return l(null==t?void 0:t.lift)}function C(t){return function(n){if(F(n))return n.lift((function(n){try{return t(n,this)}catch(t){this.error(t)}}));throw new TypeError("Unable to lift unknown Observable type")}}function M(t,n,e,r,o){return new R(t,n,e,r,o)}var R=function(t){function e(n,e,r,o,i,u){var c=t.call(this,n)||this;return c.onFinalize=i,c.shouldUnsubscribe=u,c._next=e?function(t){try{e(t)}catch(t){n.error(t)}}:t.prototype._next,c._error=o?function(t){try{o(t)}catch(t){n.error(t)}finally{this.unsubscribe()}}:t.prototype._error,c._complete=r?function(){try{r()}catch(t){n.error(t)}finally{this.unsubscribe()}}:t.prototype._complete,c}return n(e,t),e.prototype.unsubscribe=function(){var n;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var e=this.closed;t.prototype.unsubscribe.call(this),!e&&(null===(n=this.onFinalize)||void 0===n||n.call(this))}},e}(x);!function(t){function e(n,e){var r=t.call(this)||this;return r.source=n,r.subjectFactory=e,r._subject=null,r._refCount=0,r._connection=null,F(n)&&(r.lift=n.lift),r}n(e,t),e.prototype._subscribe=function(t){return this.getSubject().subscribe(t)},e.prototype.getSubject=function(){var t=this._subject;return t&&!t.isStopped||(this._subject=this.subjectFactory()),this._subject},e.prototype._teardown=function(){this._refCount=0;var t=this._connection;this._subject=this._connection=null,null==t||t.unsubscribe()},e.prototype.connect=function(){var t=this,n=this._connection;if(!n){n=this._connection=new v;var e=this.getSubject();n.add(this.source.subscribe(M(e,void 0,(function(){t._teardown(),e.complete()}),(function(n){t._teardown(),e.error(n)}),(function(){return t._teardown()})))),n.closed&&(this._connection=null,n=v.EMPTY)}return n},e.prototype.refCount=function(){return C((function(t,n){var e=null;t._refCount++;var r=M(n,void 0,void 0,void 0,(function(){if(!t||t._refCount<=0||0<--t._refCount)e=null;else{var r=t._connection,o=e;e=null,!r||o&&r!==o||r.unsubscribe(),n.unsubscribe()}}));t.subscribe(r),r.closed||(e=t.connect())}))(this)}}(B);var U={now:function(){return(U.delegate||performance).now()},delegate:void 0},z={schedule:function(t){var n=requestAnimationFrame,e=cancelAnimationFrame,r=n((function(n){e=void 0,t(n)}));return new v((function(){return null==e?void 0:e(r)}))},requestAnimationFrame:function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var e=z.delegate;return((null==e?void 0:e.requestAnimationFrame)||requestAnimationFrame).apply(void 0,u([],i(t)))},cancelAnimationFrame:function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return cancelAnimationFrame.apply(void 0,u([],i(t)))},delegate:void 0};function D(t){var n=z.schedule;return new B((function(e){var r=new v,o=t||U,i=o.now(),u=function(c){var s=o.now();e.next({timestamp:t?s:c,elapsed:s-i}),e.closed||r.add(n(u))};return r.add(n(u)),r}))}var L=D(),J=f((function(t){return function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}})),V=function(t){function e(){var n=t.call(this)||this;return n.closed=!1,n.currentObservers=null,n.observers=[],n.isStopped=!1,n.hasError=!1,n.thrownError=null,n}return n(e,t),e.prototype.lift=function(t){var n=new W(this,this);return n.operator=t,n},e.prototype._throwIfClosed=function(){if(this.closed)throw new J},e.prototype.next=function(t){var n=this;A((function(){var e,r;if(n._throwIfClosed(),!n.isStopped){n.currentObservers||(n.currentObservers=Array.from(n.observers));try{for(var i=o(n.currentObservers),u=i.next();!u.done;u=i.next()){u.value.next(t)}}catch(t){e={error:t}}finally{try{u&&!u.done&&(r=i.return)&&r.call(i)}finally{if(e)throw e.error}}}}))},e.prototype.error=function(t){var n=this;A((function(){if(n._throwIfClosed(),!n.isStopped){n.hasError=n.isStopped=!0,n.thrownError=t;for(var e=n.observers;e.length;)e.shift().error(t)}}))},e.prototype.complete=function(){var t=this;A((function(){if(t._throwIfClosed(),!t.isStopped){t.isStopped=!0;for(var n=t.observers;n.length;)n.shift().complete()}}))},e.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(e.prototype,"observed",{get:function(){var t;return(null===(t=this.observers)||void 0===t?void 0:t.length)>0},enumerable:!1,configurable:!0}),e.prototype._trySubscribe=function(n){return this._throwIfClosed(),t.prototype._trySubscribe.call(this,n)},e.prototype._subscribe=function(t){return this._throwIfClosed(),this._checkFinalizedStatuses(t),this._innerSubscribe(t)},e.prototype._innerSubscribe=function(t){var n=this,e=this,r=e.hasError,o=e.isStopped,i=e.observers;return r||o?h:(this.currentObservers=null,i.push(t),new v((function(){n.currentObservers=null,y(i,t)})))},e.prototype._checkFinalizedStatuses=function(t){var n=this,e=n.hasError,r=n.thrownError,o=n.isStopped;e?t.error(r):o&&t.complete()},e.prototype.asObservable=function(){var t=new B;return t.source=this,t},e.create=function(t,n){return new W(t,n)},e}(B),W=function(t){function e(n,e){var r=t.call(this)||this;return r.destination=n,r.source=e,r}return n(e,t),e.prototype.next=function(t){var n,e;null===(e=null===(n=this.destination)||void 0===n?void 0:n.next)||void 0===e||e.call(n,t)},e.prototype.error=function(t){var n,e;null===(e=null===(n=this.destination)||void 0===n?void 0:n.error)||void 0===e||e.call(n,t)},e.prototype.complete=function(){var t,n;null===(n=null===(t=this.destination)||void 0===t?void 0:t.complete)||void 0===n||n.call(t)},e.prototype._subscribe=function(t){var n,e;return null!==(e=null===(n=this.source)||void 0===n?void 0:n.subscribe(t))&&void 0!==e?e:h},e}(V);!function(t){function e(n){var e=t.call(this)||this;return e._value=n,e}n(e,t),Object.defineProperty(e.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),e.prototype._subscribe=function(n){var e=t.prototype._subscribe.call(this,n);return!e.closed&&n.next(this._value),e},e.prototype.getValue=function(){var t=this,n=t.hasError,e=t.thrownError,r=t._value;if(n)throw e;return this._throwIfClosed(),r},e.prototype.next=function(n){t.prototype.next.call(this,this._value=n)}}(V);var Y={now:function(){return(Y.delegate||Date).now()},delegate:void 0};!function(t){function e(n,e,r){void 0===n&&(n=1/0),void 0===e&&(e=1/0),void 0===r&&(r=Y);var o=t.call(this)||this;return o._bufferSize=n,o._windowTime=e,o._timestampProvider=r,o._buffer=[],o._infiniteTimeWindow=!0,o._infiniteTimeWindow=e===1/0,o._bufferSize=Math.max(1,n),o._windowTime=Math.max(1,e),o}n(e,t),e.prototype.next=function(n){var e=this,r=e.isStopped,o=e._buffer,i=e._infiniteTimeWindow,u=e._timestampProvider,c=e._windowTime;r||(o.push(n),!i&&o.push(u.now()+c)),this._trimBuffer(),t.prototype.next.call(this,n)},e.prototype._subscribe=function(t){this._throwIfClosed(),this._trimBuffer();for(var n=this._innerSubscribe(t),e=this._infiniteTimeWindow,r=this._buffer.slice(),o=0;o<r.length&&!t.closed;o+=e?1:2)t.next(r[o]);return this._checkFinalizedStatuses(t),n},e.prototype._trimBuffer=function(){var t=this,n=t._bufferSize,e=t._timestampProvider,r=t._buffer,o=t._infiniteTimeWindow,i=(o?1:2)*n;if(n<1/0&&i<r.length&&r.splice(0,r.length-i),!o){for(var u=e.now(),c=0,s=1;s<r.length&&r[s]<=u;s+=2)c=s;c&&r.splice(0,c+1)}}}(V),function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n._value=null,n._hasValue=!1,n._isComplete=!1,n}n(e,t),e.prototype._checkFinalizedStatuses=function(t){var n=this,e=n.hasError,r=n._hasValue,o=n._value,i=n.thrownError,u=n.isStopped,c=n._isComplete;e?t.error(i):(u||c)&&(r&&t.next(o),t.complete())},e.prototype.next=function(t){this.isStopped||(this._value=t,this._hasValue=!0)},e.prototype.complete=function(){var n=this,e=n._hasValue,r=n._value;n._isComplete||(this._isComplete=!0,e&&t.prototype.next.call(this,r),t.prototype.complete.call(this))}}(V);var G,H=function(t){function e(n,e){return t.call(this)||this}return n(e,t),e.prototype.schedule=function(t,n){return this},e}(v),X=function(t,n){for(var e=[],r=2;r<arguments.length;r++)e[r-2]=arguments[r];return setInterval.apply(void 0,u([t,n],i(e)))},K=function(t){return clearInterval(t)},Q=function(t){function e(n,e){var r=t.call(this,n,e)||this;return r.scheduler=n,r.work=e,r.pending=!1,r}return n(e,t),e.prototype.schedule=function(t,n){if(void 0===n&&(n=0),this.closed)return this;this.state=t;var e=this.id,r=this.scheduler;return null!=e&&(this.id=this.recycleAsyncId(r,e,n)),this.pending=!0,this.delay=n,this.id=this.id||this.requestAsyncId(r,this.id,n),this},e.prototype.requestAsyncId=function(t,n,e){return void 0===e&&(e=0),X(t.flush.bind(t,this),e)},e.prototype.recycleAsyncId=function(t,n,e){if(void 0===e&&(e=0),null!=e&&this.delay===e&&!1===this.pending)return n;K(n)},e.prototype.execute=function(t,n){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var e=this._execute(t,n);if(e)return e;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},e.prototype._execute=function(t,n){var e,r=!1;try{this.work(t)}catch(t){r=!0,e=t||new Error("Scheduled action threw falsy error")}if(r)return this.unsubscribe(),e},e.prototype.unsubscribe=function(){if(!this.closed){var n=this.id,e=this.scheduler,r=e.actions;this.work=this.state=this.scheduler=null,this.pending=!1,y(r,this),null!=n&&(this.id=this.recycleAsyncId(e,n,null)),this.delay=null,t.prototype.unsubscribe.call(this)}},e}(H),Z=1,$={};function tt(t){return t in $&&(delete $[t],!0)}var nt=function(t){var n=Z++;return $[n]=!0,G||(G=Promise.resolve()),G.then((function(){return tt(n)&&t()})),n},et=function(t){tt(t)},rt={setImmediate:function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var e=rt.delegate;return((null==e?void 0:e.setImmediate)||nt).apply(void 0,u([],i(t)))},clearImmediate:function(t){return et(t)},delegate:void 0},ot=function(t){function e(n,e){var r=t.call(this,n,e)||this;return r.scheduler=n,r.work=e,r}return n(e,t),e.prototype.requestAsyncId=function(n,e,r){return void 0===r&&(r=0),null!==r&&r>0?t.prototype.requestAsyncId.call(this,n,e,r):(n.actions.push(this),n._scheduled||(n._scheduled=rt.setImmediate(n.flush.bind(n,void 0))))},e.prototype.recycleAsyncId=function(n,e,r){if(void 0===r&&(r=0),null!=r&&r>0||null==r&&this.delay>0)return t.prototype.recycleAsyncId.call(this,n,e,r);n.actions.some((function(t){return t.id===e}))||(rt.clearImmediate(e),n._scheduled=void 0)},e}(Q),it=function(){function t(n,e){void 0===e&&(e=t.now),this.schedulerActionCtor=n,this.now=e}return t.prototype.schedule=function(t,n,e){return void 0===n&&(n=0),new this.schedulerActionCtor(this,t).schedule(e,n)},t.now=Y.now,t}(),ut=function(t){function e(n,e){void 0===e&&(e=it.now);var r=t.call(this,n,e)||this;return r.actions=[],r._active=!1,r._scheduled=void 0,r}return n(e,t),e.prototype.flush=function(t){var n=this.actions;if(this._active)n.push(t);else{var e;this._active=!0;do{if(e=t.execute(t.state,t.delay))break}while(t=n.shift());if(this._active=!1,e){for(;t=n.shift();)t.unsubscribe();throw e}}},e}(it);new(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.flush=function(t){this._active=!0;var n=this._scheduled;this._scheduled=void 0;var e,r=this.actions;t=t||r.shift();do{if(e=t.execute(t.state,t.delay))break}while((t=r[0])&&t.id===n&&r.shift());if(this._active=!1,e){for(;(t=r[0])&&t.id===n&&r.shift();)t.unsubscribe();throw e}},e}(ut))(ot),new ut(Q);var ct=function(t){function e(n,e){var r=t.call(this,n,e)||this;return r.scheduler=n,r.work=e,r}return n(e,t),e.prototype.schedule=function(n,e){return void 0===e&&(e=0),e>0?t.prototype.schedule.call(this,n,e):(this.delay=e,this.state=n,this.scheduler.flush(this),this)},e.prototype.execute=function(n,e){return e>0||this.closed?t.prototype.execute.call(this,n,e):this._execute(n,e)},e.prototype.requestAsyncId=function(n,e,r){return void 0===r&&(r=0),null!=r&&r>0||null==r&&this.delay>0?t.prototype.requestAsyncId.call(this,n,e,r):n.flush(this)},e}(Q);new(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e}(ut))(ct);var st=function(t){function e(n,e){var r=t.call(this,n,e)||this;return r.scheduler=n,r.work=e,r}return n(e,t),e.prototype.requestAsyncId=function(n,e,r){return void 0===r&&(r=0),null!==r&&r>0?t.prototype.requestAsyncId.call(this,n,e,r):(n.actions.push(this),n._scheduled||(n._scheduled=z.requestAnimationFrame((function(){return n.flush(void 0)}))))},e.prototype.recycleAsyncId=function(n,e,r){if(void 0===r&&(r=0),null!=r&&r>0||null==r&&this.delay>0)return t.prototype.recycleAsyncId.call(this,n,e,r);n.actions.some((function(t){return t.id===e}))||(z.cancelAnimationFrame(e),n._scheduled=void 0)},e}(Q);new(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.flush=function(t){this._active=!0;var n=this._scheduled;this._scheduled=void 0;var e,r=this.actions;t=t||r.shift();do{if(e=t.execute(t.state,t.delay))break}while((t=r[0])&&t.id===n&&r.shift());if(this._active=!1,e){for(;(t=r[0])&&t.id===n&&r.shift();)t.unsubscribe();throw e}},e}(ut))(st),function(t){function e(n,e){void 0===n&&(n=at),void 0===e&&(e=1/0);var r=t.call(this,n,(function(){return r.frame}))||this;return r.maxFrames=e,r.frame=0,r.index=-1,r}n(e,t),e.prototype.flush=function(){for(var t,n,e=this.actions,r=this.maxFrames;(n=e[0])&&n.delay<=r&&(e.shift(),this.frame=n.delay,!(t=n.execute(n.state,n.delay))););if(t){for(;n=e.shift();)n.unsubscribe();throw t}},e.frameTimeFactor=10}(ut);var at=function(t){function e(n,e,r){void 0===r&&(r=n.index+=1);var o=t.call(this,n,e)||this;return o.scheduler=n,o.work=e,o.index=r,o.active=!0,o.index=n.index=r,o}return n(e,t),e.prototype.schedule=function(n,r){if(void 0===r&&(r=0),Number.isFinite(r)){if(!this.id)return t.prototype.schedule.call(this,n,r);this.active=!1;var o=new e(this.scheduler,this.work);return this.add(o),o.schedule(n,r)}return v.EMPTY},e.prototype.requestAsyncId=function(t,n,r){void 0===r&&(r=0),this.delay=t.frame+r;var o=t.actions;return o.push(this),o.sort(e.sortActions),!0},e.prototype.recycleAsyncId=function(t,n,e){},e.prototype._execute=function(n,e){if(!0===this.active)return t.prototype._execute.call(this,n,e)},e.sortActions=function(t,n){return t.delay===n.delay?t.index===n.index?0:t.index>n.index?1:-1:t.delay>n.delay?1:-1},e}(Q),lt=new B((function(t){return t.complete()}));function ft(t){return t[t.length-1]}function dt(t){return(n=ft(t))&&l(n.schedule)?t.pop():void 0;var n}function yt(t,n){return"number"==typeof ft(t)?t.pop():n}var vt=function(t){return t&&"number"==typeof t.length&&"function"!=typeof t};function ht(t){return l(null==t?void 0:t.then)}function pt(t){return l(t[P])}function bt(t){return Symbol.asyncIterator&&l(null==t?void 0:t[Symbol.asyncIterator])}function mt(t){return new TypeError("You provided "+(null!==t&&"object"==typeof t?"an invalid object":"'"+t+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}var wt,gt="function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator";function _t(t){return l(null==t?void 0:t[gt])}function At(t){return s(this,arguments,(function(){var n,e,o;return r(this,(function(r){switch(r.label){case 0:n=t.getReader(),r.label=1;case 1:r.trys.push([1,,9,10]),r.label=2;case 2:return[4,c(n.read())];case 3:return e=r.sent(),o=e.value,e.done?[4,c(void 0)]:[3,5];case 4:return[2,r.sent()];case 5:return[4,c(o)];case 6:return[4,r.sent()];case 7:return r.sent(),[3,2];case 8:return[3,10];case 9:return n.releaseLock(),[7];case 10:return[2]}}))}))}function xt(t){return l(null==t?void 0:t.getReader)}function St(t){if(t instanceof B)return t;if(null!=t){if(pt(t))return n=t,new B((function(t){var e=n[P]();if(l(e.subscribe))return e.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")}));if(vt(t))return function(t){return new B((function(n){for(var e=0;e<t.length&&!n.closed;e++)n.next(t[e]);n.complete()}))}(t);if(ht(t))return function(t){return new B((function(n){t.then((function(t){n.closed||(n.next(t),n.complete())}),(function(t){return n.error(t)})).then(null,g)}))}(t);if(bt(t))return It(t);if(_t(t))return function(t){return new B((function(n){var e,r;try{for(var i=o(t),u=i.next();!u.done;u=i.next()){var c=u.value;if(n.next(c),n.closed)return}}catch(t){e={error:t}}finally{try{u&&!u.done&&(r=i.return)&&r.call(i)}finally{if(e)throw e.error}}n.complete()}))}(t);if(xt(t))return It(At(t))}var n;throw mt(t)}function It(t){return new B((function(n){(function(t,n){var o,i,u,c;return e(this,void 0,void 0,(function(){var e,s;return r(this,(function(r){switch(r.label){case 0:r.trys.push([0,5,6,11]),o=a(t),r.label=1;case 1:return[4,o.next()];case 2:if((i=r.sent()).done)return[3,4];if(e=i.value,n.next(e),n.closed)return[2];r.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return s=r.sent(),u={error:s},[3,11];case 6:return r.trys.push([6,,9,10]),i&&!i.done&&(c=o.return)?[4,c.call(o)]:[3,8];case 7:r.sent(),r.label=8;case 8:return[3,10];case 9:if(u)throw u.error;return[7];case 10:return[7];case 11:return n.complete(),[2]}}))}))})(t,n).catch((function(t){return n.error(t)}))}))}function Ot(t,n,e,r,o){void 0===r&&(r=0),void 0===o&&(o=!1);var i=n.schedule((function(){e(),o?t.add(this.schedule(null,r)):this.unsubscribe()}),r);if(t.add(i),!o)return i}function Et(t,n){return void 0===n&&(n=0),C((function(e,r){e.subscribe(M(r,(function(e){return Ot(r,t,(function(){return r.next(e)}),n)}),(function(){return Ot(r,t,(function(){return r.complete()}),n)}),(function(e){return Ot(r,t,(function(){return r.error(e)}),n)})))}))}function jt(t,n){return void 0===n&&(n=0),C((function(e,r){r.add(t.schedule((function(){return e.subscribe(r)}),n))}))}function Tt(t,n){if(!t)throw new Error("Iterable cannot be null");return new B((function(e){Ot(e,n,(function(){var r=t[Symbol.asyncIterator]();Ot(e,n,(function(){r.next().then((function(t){t.done?e.complete():e.next(t.value)}))}),0,!0)}))}))}function Pt(t,n){if(null!=t){if(pt(t))return function(t,n){return St(t).pipe(jt(n),Et(n))}(t,n);if(vt(t))return function(t,n){return new B((function(e){var r=0;return n.schedule((function(){r===t.length?e.complete():(e.next(t[r++]),e.closed||this.schedule())}))}))}(t,n);if(ht(t))return function(t,n){return St(t).pipe(jt(n),Et(n))}(t,n);if(bt(t))return Tt(t,n);if(_t(t))return function(t,n){return new B((function(e){var r;return Ot(e,n,(function(){r=t[gt](),Ot(e,n,(function(){var t,n,o;try{n=(t=r.next()).value,o=t.done}catch(t){return void e.error(t)}o?e.complete():e.next(n)}),0,!0)})),function(){return l(null==r?void 0:r.return)&&r.return()}}))}(t,n);if(xt(t))return function(t,n){return Tt(At(t),n)}(t,n)}throw mt(t)}function Nt(t,n){return n?Pt(t,n):St(t)}function kt(t,n){return C((function(e,r){var o=0;e.subscribe(M(r,(function(e){r.next(t.call(n,e,o++))})))}))}!function(t){t.NEXT="N",t.ERROR="E",t.COMPLETE="C"}(wt||(wt={})),f((function(t){return function(){t(this),this.name="EmptyError",this.message="no elements in sequence"}})),f((function(t){return function(){t(this),this.name="ArgumentOutOfRangeError",this.message="argument out of range"}})),f((function(t){return function(n){t(this),this.name="NotFoundError",this.message=n}})),f((function(t){return function(n){t(this),this.name="SequenceError",this.message=n}})),f((function(t){return function(n){void 0===n&&(n=null),t(this),this.message="Timeout has occurred",this.name="TimeoutError",this.info=n}}));var Bt=Array.isArray;function qt(t){return kt((function(n){return function(t,n){return Bt(n)?t.apply(void 0,u([],i(n))):t(n)}(t,n)}))}function Ft(t,n,e){return void 0===e&&(e=1/0),l(n)?Ft((function(e,r){return kt((function(t,o){return n(e,t,r,o)}))(St(t(e,r)))}),e):("number"==typeof n&&(e=n),C((function(n,r){return function(t,n,e,r,o,i,u,c){var s=[],a=0,l=0,f=!1,d=function(){!f||s.length||a||n.complete()},y=function(t){return a<r?v(t):s.push(t)},v=function(t){i&&n.next(t),a++;var c=!1;St(e(t,l++)).subscribe(M(n,(function(t){null==o||o(t),i?y(t):n.next(t)}),(function(){c=!0}),void 0,(function(){if(c)try{a--;for(var t=function(){var t=s.shift();u?Ot(n,u,(function(){return v(t)})):v(t)};s.length&&a<r;)t();d()}catch(t){n.error(t)}})))};return t.subscribe(M(n,y,(function(){f=!0,d()}))),function(){null==c||c()}}(n,r,t,e)})))}function Ct(t){return void 0===t&&(t=1/0),Ft(N,t)}var Mt=["addListener","removeListener"],Rt=["addEventListener","removeEventListener"],Ut=["on","off"];function zt(t,n,e,r){if(l(e)&&(r=e,e=void 0),r)return zt(t,n,e).pipe(qt(r));var o=i(function(t){return l(t.addEventListener)&&l(t.removeEventListener)}(t)?Rt.map((function(r){return function(o){return t[r](n,o,e)}})):function(t){return l(t.addListener)&&l(t.removeListener)}(t)?Mt.map(Dt(t,n)):function(t){return l(t.on)&&l(t.off)}(t)?Ut.map(Dt(t,n)):[],2),u=o[0],c=o[1];if(!u&&vt(t))return Ft((function(t){return zt(t,n,e)}))(St(t));if(!u)throw new TypeError("Invalid event target");return new B((function(t){var n=function(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];return t.next(1<n.length?n:n[0])};return u(n),function(){return c(n)}}))}function Dt(t,n){return function(e){return function(r){return t[e](n,r)}}}function Lt(t,n){return C((function(e,r){var o=0;e.subscribe(M(r,(function(e){return t.call(n,e,o++)&&r.next(e)})))}))}function Jt(...t){return new B((n=>{const e=new MutationObserver((t=>n.next(t)));return e.observe(...t),()=>e.disconnect()}))}new B(_);var Vt="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},Wt={},Yt={},Gt={},Ht={},Xt={};Xt.go=void 0,Xt.go=function(t){return t()};var Kt={};Kt.goMicrotask=void 0,Kt.goMicrotask=function(t){return new Promise(((n,e)=>{queueMicrotask((async()=>{try{n(await t())}catch(t){e(t)}}))}))};var Qt={},Zt={},$t={},tn={},nn={};nn.random=void 0,nn.random=function(t,n){return Math.random()*(n-t)+t};var en={};en.randomInt=void 0,en.randomInt=function(t,n){return t=Math.ceil(t),n=Math.floor(n),Math.floor(Math.random()*(n-t))+t};var rn,on,un,cn={};cn.randomIntInclusive=void 0,cn.randomIntInclusive=function(t,n){return t=Math.ceil(t),n=Math.floor(n),Math.floor(Math.random()*(n-t+1))+t},rn=tn,on=Vt&&Vt.__createBinding||(Object.create?function(t,n,e,r){void 0===r&&(r=e),Object.defineProperty(t,r,{enumerable:!0,get:function(){return n[e]}})}:function(t,n,e,r){void 0===r&&(r=e),t[r]=n[e]}),(un=Vt&&Vt.__exportStar||function(t,n){for(var e in t)"default"===e||Object.prototype.hasOwnProperty.call(n,e)||on(n,t,e)})(nn,rn),un(en,rn),un(cn,rn),$t.calculateExponentialBackoffTimeout=void 0;const sn=tn;$t.calculateExponentialBackoffTimeout=function({baseTimeout:t,retries:n,maxTimeout:e=1/0,factor:r=2,jitter:o=!0}){const i=Math.min(r**n*t,e);return o?(0,sn.randomIntInclusive)(0,i):i};var an={};an.setTimeout=void 0,an.setTimeout=function(t,n){const e=globalThis.setTimeout(n,t);return()=>clearTimeout(e)};var ln={setSchedule:void 0};const fn=an;ln.setSchedule=function(t,n){const e=t-Date.now();return(0,fn.setTimeout)(e,n)};var dn={};dn.setInterval=void 0,dn.setInterval=function(t,n){const e=globalThis.setInterval(n,t);return()=>clearInterval(e)};var yn={setImmediate:void 0};const vn=an;yn.setImmediate=function(t){if(globalThis.setImmediate){const n=globalThis.setImmediate(t);return()=>clearImmediate(n)}return(0,vn.setTimeout)(0,t)};var hn={setTimeoutLoop:void 0};const pn=an;hn.setTimeoutLoop=function(t,n){let e=!1,r=(0,pn.setTimeout)(t,(async function o(){await n(),e||(r=(0,pn.setTimeout)(t,o))}));return()=>{e=!0,r()}};var bn={setDynamicTimeoutLoop:void 0};const mn=an;bn.setDynamicTimeoutLoop=function(t,n){let e=!1,r=(0,mn.setTimeout)(t,(async function o(){const i=Date.now();await n();const u=Date.now()-i;e||(r=(0,mn.setTimeout)(Math.max(t-u,0),o))}));return()=>{e=!0,r()}},function(t){var n=Vt&&Vt.__createBinding||(Object.create?function(t,n,e,r){void 0===r&&(r=e),Object.defineProperty(t,r,{enumerable:!0,get:function(){return n[e]}})}:function(t,n,e,r){void 0===r&&(r=e),t[r]=n[e]}),e=Vt&&Vt.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};e($t,t),e(an,t),e(ln,t),e(dn,t),e(yn,t),e(hn,t),e(bn,t)}(Zt),Qt.goMacrotask=void 0;const wn=Zt;Qt.goMacrotask=function(t){return new Promise(((n,e)=>{(0,wn.setImmediate)((async()=>{try{n(await t())}catch(t){e(t)}}))}))},function(t){var n=Vt&&Vt.__createBinding||(Object.create?function(t,n,e,r){void 0===r&&(r=e);var o=Object.getOwnPropertyDescriptor(n,e);o&&!("get"in o?!n.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return n[e]}}),Object.defineProperty(t,r,o)}:function(t,n,e,r){void 0===r&&(r=e),t[r]=n[e]}),e=Vt&&Vt.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};e(Xt,t),e(Kt,t),e(Qt,t)}(Ht);var gn={},_n={},An={},xn={},Sn={};function In(t){return Array.isArray(t)}Sn.isntEmptyArray=Sn.isEmptyArray=Sn.isntArray=Sn.isArray=void 0,Sn.isArray=In,Sn.isntArray=function(t){return!In(t)},Sn.isEmptyArray=function(t){return 0===t.length},Sn.isntEmptyArray=function(t){return 0!==t.length};var On={},En={};function jn(t){return null===t}En.isntNull=En.isNull=void 0,En.isNull=jn,En.isntNull=function(t){return!jn(t)};var Tn={};function Pn(t){return void 0===t}Tn.isntUndefined=Tn.isUndefined=void 0,Tn.isUndefined=Pn,Tn.isntUndefined=function(t){return!Pn(t)};var Nn={};function kn(t){return"function"==typeof t}Nn.isntFunction=Nn.isFunction=void 0,Nn.isFunction=kn,Nn.isntFunction=function(t){return!kn(t)},On.isntAsyncIterable=On.isAsyncIterable=void 0;const Bn=En,qn=Tn,Fn=Nn;function Cn(t){return(0,Bn.isntNull)(t)&&(0,qn.isntUndefined)(t)&&(0,Fn.isFunction)(t[Symbol.asyncIterator])}On.isAsyncIterable=Cn,On.isntAsyncIterable=function(t){return!Cn(t)};var Mn={};function Rn(t){return"bigint"==typeof t}Mn.isntBigInt=Mn.isBigInt=void 0,Mn.isBigInt=Rn,Mn.isntBigInt=function(t){return!Rn(t)};var Un={};function zn(t){return"boolean"==typeof t}Un.isntBoolean=Un.isBoolean=void 0,Un.isBoolean=zn,Un.isntBoolean=function(t){return!zn(t)};var Dn={},Ln={};function Jn(t){return"string"==typeof t}Ln.isntString=Ln.isString=void 0,Ln.isString=Jn,Ln.isntString=function(t){return!Jn(t)},Dn.isntChar=Dn.isChar=void 0;const Vn=Ln;function Wn(t){return(0,Vn.isString)(t)&&1===t.length}Dn.isChar=Wn,Dn.isntChar=function(t){return!Wn(t)};var Yn={};function Gn(t){return t instanceof Date}Yn.isntDate=Yn.isDate=void 0,Yn.isDate=Gn,Yn.isntDate=function(t){return!Gn(t)};var Hn={};Hn.inEnum=void 0,Hn.inEnum=function(t,n){return Object.values(n).includes(t)};var Xn={};function Kn(t){return t instanceof Error}Xn.isntError=Xn.isError=void 0,Xn.isError=Kn,Xn.isntError=function(t){return!Kn(t)};var Qn={};function Zn(t){return!t}Qn.isntFalsy=Qn.isFalsy=void 0,Qn.isFalsy=Zn,Qn.isntFalsy=function(t){return!Zn(t)};var $n={};$n.isntIterable=$n.isIterable=void 0;const te=En,ne=Tn,ee=Nn;function re(t){return(0,te.isntNull)(t)&&(0,ne.isntUndefined)(t)&&(0,ee.isFunction)(t[Symbol.iterator])}$n.isIterable=re,$n.isntIterable=function(t){return!re(t)};var oe={},ie={};function ue(t){return"number"==typeof t}function ce(t){return Number.isNaN(t)}ie.isntNaN=ie.isNaN=ie.isNegativeInfinity=ie.isPositiveInfinity=ie.isFinite=ie.isntNumber=ie.isNumber=void 0,ie.isNumber=ue,ie.isntNumber=function(t){return!ue(t)},ie.isFinite=function(t){return Number.isFinite(t)},ie.isPositiveInfinity=function(t){return t===1/0},ie.isNegativeInfinity=function(t){return t===-1/0},ie.isNaN=ce,ie.isntNaN=function(t){return!ce(t)};var se={},ae="object"==typeof Vt&&Vt&&Vt.Object===Object&&Vt,le="object"==typeof self&&self&&self.Object===Object&&self,fe=(ae||le||Function("return this")()).Symbol,de=fe,ye=Object.prototype,ve=ye.hasOwnProperty,he=ye.toString,pe=de?de.toStringTag:void 0;var be=function(t){var n=ve.call(t,pe),e=t[pe];try{t[pe]=void 0;var r=!0}catch(t){}var o=he.call(t);return r&&(n?t[pe]=e:delete t[pe]),o},me=Object.prototype.toString;var we=be,ge=function(t){return me.call(t)},_e=fe?fe.toStringTag:void 0;var Ae=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":_e&&_e in Object(t)?we(t):ge(t)};var xe=function(t,n){return function(e){return t(n(e))}}(Object.getPrototypeOf,Object);var Se=Ae,Ie=xe,Oe=function(t){return null!=t&&"object"==typeof t},Ee=Function.prototype,je=Object.prototype,Te=Ee.toString,Pe=je.hasOwnProperty,Ne=Te.call(Object);var ke=function(t){if(!Oe(t)||"[object Object]"!=Se(t))return!1;var n=Ie(t);if(null===n)return!0;var e=Pe.call(n,"constructor")&&n.constructor;return"function"==typeof e&&e instanceof e&&Te.call(e)==Ne},Be=Vt&&Vt.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};se.isntEmptyObject=se.isEmptyObject=se.isntPlainObject=se.isPlainObject=se.isntObject=se.isObject=void 0;const qe=Be(ke);function Fe(t){return null!==t&&"object"==typeof t}function Ce(t){return(0,qe.default)(t)}se.isObject=Fe,se.isntObject=function(t){return!Fe(t)},se.isPlainObject=Ce,se.isntPlainObject=function(t){return!Ce(t)},se.isEmptyObject=function(t){return 0===Object.keys(t).length},se.isntEmptyObject=function(t){return 0!==Object.keys(t).length},oe.isntJsonable=oe.isJsonable=oe.isntJson=oe.isJson=void 0;const Me=En,Re=Un,Ue=Ln,ze=ie,De=Sn,Le=se;function Je(t){return(0,Me.isNull)(t)||(0,Re.isBoolean)(t)||(0,Ue.isString)(t)||(0,ze.isNumber)(t)||(0,De.isArray)(t)&&t.every(Je)||(0,Le.isPlainObject)(t)&&Object.values(t).every(Je)}oe.isJson=Je,oe.isntJson=function(t){return!Je(t)},oe.isJsonable=function(t){try{return JSON.stringify(t),!0}catch(t){return!1}},oe.isntJsonable=function t(n){return!t()};var Ve={};Ve.isntNullish=Ve.isNullish=void 0;const We=En,Ye=Tn;function Ge(t){return(0,We.isNull)(t)||(0,Ye.isUndefined)(t)}Ve.isNullish=Ge,Ve.isntNullish=function(t){return!Ge(t)};var He={};He.isPromiseLike=He.isntPromiseLike=He.isntPromise=He.isPromise=void 0;const Xe=se,Ke=Nn;function Qe(t){return t instanceof Promise}function Ze(t){return(0,Xe.isObject)(t)&&(0,Ke.isFunction)(t.then)}He.isPromise=Qe,He.isntPromise=function(t){return!Qe(t)},He.isntPromiseLike=function(t){return!Ze(t)},He.isPromiseLike=Ze;var $e={};$e.isAbsoluteURL=void 0,$e.isAbsoluteURL=function(t){try{return new URL(t),!0}catch(t){return!1}};var tr={};function nr(t){return t instanceof RegExp}tr.isntRegExp=tr.isRegExp=void 0,tr.isRegExp=nr,tr.isntRegExp=function(t){return!nr(t)};var er={};function rr(t){return"symbol"==typeof t}er.isntSymbol=er.isSymbol=void 0,er.isSymbol=rr,er.isntSymbol=function(t){return!rr(t)},function(t){var n=Vt&&Vt.__createBinding||(Object.create?function(t,n,e,r){void 0===r&&(r=e);var o=Object.getOwnPropertyDescriptor(n,e);o&&!("get"in o?!n.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return n[e]}}),Object.defineProperty(t,r,o)}:function(t,n,e,r){void 0===r&&(r=e),t[r]=n[e]}),e=Vt&&Vt.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};e(Sn,t),e(On,t),e(Mn,t),e(Un,t),e(Dn,t),e(Yn,t),e(Hn,t),e(Xn,t),e(Qn,t),e(Nn,t),e($n,t),e(oe,t),e(En,t),e(Ve,t),e(ie,t),e(se,t),e(He,t),e(Ln,t),e(Tn,t),e($e,t),e(tr,t),e(er,t)}(xn);var or={};or.traverseErrorPrototypeChain=void 0,or.traverseErrorPrototypeChain=function*(t){let n=t;for(;(n=Object.getPrototypeOf(n))&&(yield n,n!==Error.prototype););},An.getErrorNames=void 0;const ir=xn,ur=or;An.getErrorNames=function*(t){var n;if((0,ir.isError)(t))for(const e of(0,ur.traverseErrorPrototypeChain)(t))(null===(n=e.constructor)||void 0===n?void 0:n.name)&&(yield e.constructor.name);else yield t.name,yield*t.ancestors};var cr={isSerializableError:void 0};const sr=xn;var ar;function lr(){if(ar)return _n;ar=1,_n.CustomError=void 0;const t=nu(),n=An,e=xn,r=cr;class o extends Error{get name(){var e,r;return null!==(r=null!==(e=(0,t.first)((0,n.getErrorNames)(this)))&&void 0!==e?e:o.name)&&void 0!==r?r:"CustomError"}static[Symbol.hasInstance](o){var i;if((0,e.isError)(o)||(0,r.isSerializableError)(o)){const e=[null!==(i=this.prototype.constructor.name)&&void 0!==i?i:this.name,...(0,n.getErrorNames)(this.prototype)].reverse(),r=(0,t.toArray)((0,n.getErrorNames)(o)).reverse();return e.every(((t,n)=>t===r[n]))}return!1}}return _n.CustomError=o,_n}cr.isSerializableError=function(t){return(0,sr.isObject)(t)&&(0,sr.isString)(t.name)&&(0,sr.isString)(t.message)&&((0,sr.isString)(t.stack)||(0,sr.isNull)(t.stack))&&(0,sr.isArray)(t.ancestors)&&t.ancestors.every(sr.isString)};var fr,dr={};function yr(){if(fr)return dr;fr=1,dr.AssertionError=void 0;const t=lr();class n extends t.CustomError{}return dr.AssertionError=n,dr}var vr,hr={};var pr={},br={},mr={};mr.pass=void 0,mr.pass=function(){},function(t){var n=Vt&&Vt.__createBinding||(Object.create?function(t,n,e,r){void 0===r&&(r=e),Object.defineProperty(t,r,{enumerable:!0,get:function(){return n[e]}})}:function(t,n,e,r){void 0===r&&(r=e),t[r]=n[e]});(Vt&&Vt.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)})(mr,t)}(br),pr.hydrate=void 0;const wr=br;function gr(t,n){const e=function(){(0,wr.pass)()};return(e.prototype=Object.create(t.prototype)).constructor=e,Object.defineProperty(e,"name",{value:n}),e}pr.hydrate=function(t){var n;const e=[t.name,...t.ancestors].slice(0,-1).reverse();let r=Error;for(const t of e)r=gr(r,t);const o=new r;return o.name=t.name,o.message=t.message,o.stack=null!==(n=t.stack)&&void 0!==n?n:void 0,o};var _r,Ar,xr,Sr={};function Ir(){return Ar||(Ar=1,function(t){var n=Vt&&Vt.__createBinding||(Object.create?function(t,n,e,r){void 0===r&&(r=e);var o=Object.getOwnPropertyDescriptor(n,e);o&&!("get"in o?!n.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return n[e]}}),Object.defineProperty(t,r,o)}:function(t,n,e,r){void 0===r&&(r=e),t[r]=n[e]}),e=Vt&&Vt.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};e(lr(),t),e(yr(),t),e(cr,t),e(function(){if(vr)return hr;vr=1,hr.normalize=void 0;const t=An,n=nu();return hr.normalize=function(e){var r;const[o,...i]=(0,n.toArray)((0,t.getErrorNames)(e));return{name:o,ancestors:i,message:e.message,stack:null!==(r=e.stack)&&void 0!==r?r:null}},hr}(),t),e(pr,t),e(function(){if(_r)return Sr;_r=1,Sr.assert=void 0;const t=yr();return Sr.assert=function(n,e){if(!n)throw new t.AssertionError(e)},Sr}(),t),e(An,t),e(or,t)}(gn)),gn}var Or={chunkByAsync:void 0};const Er=xn;Or.chunkByAsync=function(t,n){return(0,Er.isAsyncIterable)(t)?async function*(t,n){let e=[],r=0;for await(const o of t)e.push(o),await n(o,r)&&(yield e,e=[]),r++;e.length&&(yield e)}(t,n):async function*(t,n){let e=[],r=0;for(const o of t)e.push(o),await n(o,r)&&(yield e,e=[]),r++;e.length&&(yield e)}(t,n)};var jr={};jr.chunkBy=void 0,jr.chunkBy=function*(t,n){let e=[],r=0;for(const o of t)e.push(o),n(o,r)&&(yield e,e=[]),r++;e.length&&(yield e)};var Tr,Pr={};var Nr={concatAsync:void 0};const kr=xn,Br=Ht;Nr.concatAsync=function(t,...n){return(0,Br.go)((async function*(){for(const e of[t,...n])if((0,kr.isAsyncIterable)(e))for await(const t of e)yield t;else for(const t of e)yield t}))};var qr={concat:void 0};const Fr=Ht;qr.concat=function(t,...n){return(0,Fr.go)((function*(){for(const e of[t,...n])yield*e}))};var Cr={},Mr={filterAsync:void 0};const Rr=xn;Mr.filterAsync=function(t,n){return(0,Rr.isAsyncIterable)(t)?async function*(t,n){let e=0;for await(const r of t)await n(r,e)&&(yield r),e++}(t,n):async function*(t,n){let e=0;for(const r of t)await n(r,e)&&(yield r),e++}(t,n)};var Ur={};Ur.toSetAsync=void 0,Ur.toSetAsync=async function(t){const n=new Set;for await(const e of t)n.add(await e);return n},Cr.differenceAsync=void 0;const zr=Mr,Dr=Ur;Cr.differenceAsync=async function*(t,n){const e=await(0,Dr.toSetAsync)(n);yield*(0,zr.filterAsync)(t,(async t=>!e.has(await t)))};var Lr={},Jr={};Jr.filter=void 0,Jr.filter=function*(t,n){let e=0;for(const r of t)n(r,e)&&(yield r),e++};var Vr={};Vr.toSet=void 0,Vr.toSet=function(t){return new Set(t)},Lr.difference=void 0;const Wr=Jr,Yr=Vr;Lr.difference=function(t,n){const e=(0,Yr.toSet)(n);return(0,Wr.filter)(t,(t=>!e.has(t)))};var Gr,Hr={},Xr={};Xr.copyIterable=Xr.copyAsyncIterable=void 0,Xr.copyAsyncIterable=async function*(t){for await(const n of t)yield n},Xr.copyIterable=function*(t){for(const n of t)yield n};var Kr,Qr={},Zr={};Zr.toArrayAsync=void 0,Zr.toArrayAsync=async function(t){const n=[];for await(const e of t)n.push(e);return n};var $r,to={};var no={dropUntilAsync:void 0};const eo=xn;no.dropUntilAsync=function(t,n){return(0,eo.isAsyncIterable)(t)?async function*(t,n){var e;const r=t[Symbol.asyncIterator]();let o;try{let t,i=0;for(;!(({value:t,done:o}=await r.next()),o||await n(t,i++)););for(;!o;)yield t,({value:t,done:o}=await r.next())}finally{o||await(null===(e=r.return)||void 0===e?void 0:e.call(r))}}(t,n):async function*(t,n){var e;const r=t[Symbol.iterator]();let o;try{let t,i=0;for(;!(({value:t,done:o}=r.next()),o||await n(t,i++)););for(;!o;)yield t,({value:t,done:o}=r.next())}finally{o||null===(e=r.return)||void 0===e||e.call(r)}}(t,n)};var ro={};ro.dropUntil=void 0,ro.dropUntil=function*(t,n){var e;const r=t[Symbol.iterator]();let o;try{let t,i=0;for(;!(({value:t,done:o}=r.next()),o||n(t,i++)););for(;!o;)yield t,({value:t,done:o}=r.next())}finally{o||null===(e=r.return)||void 0===e||e.call(r)}};var oo,io={};var uo={},co={},so={flattenByAsync:void 0};const ao=xn;async function*lo(t,n,e){for(const r of t)fo(r)&&await n(r,e)?yield*lo(r,n,e+1):yield r}function fo(t){return(0,ao.isIterable)(t)&&(0,ao.isntChar)(t)}var yo,vo;function ho(){if(yo)return co;yo=1,co.flattenDeepAsync=void 0;const t=so,n=Ir();return co.flattenDeepAsync=function(e,r=1/0){return(0,n.assert)(r===1/0||Number.isInteger(r),"The parameter depth must be an integer"),(0,n.assert)(r>=0,"The parameter depth must be greater than or equal to 0"),(0,t.flattenByAsync)(e,((t,n)=>n<=r))},co}so.flattenByAsync=function(t,n){return(0,ao.isAsyncIterable)(t)?async function*(t,n){const e=1;for await(const r of t)fo(r)&&await n(r,e)?yield*lo(r,n,e+1):yield r}(t,n):function(t,n){return lo(t,n,1)}(t,n)};var po={flattenBy:void 0};const bo=xn;function*mo(t,n,e){for(const o of t)(0,bo.isIterable)(r=o)&&(0,bo.isntChar)(r)&&n(o,e)?yield*mo(o,n,e+1):yield o;var r}po.flattenBy=function(t,n){return mo(t,n,1)};var wo,go={};function _o(){if(wo)return go;wo=1,go.flattenDeep=void 0;const t=po,n=Ir();return go.flattenDeep=function(e,r=1/0){return(0,n.assert)(r===1/0||Number.isInteger(r),"The parameter depth must be an integer"),(0,n.assert)(r>=0,"The parameter depth must be greater than or equal to 0"),(0,t.flattenBy)(e,((t,n)=>n<=r))},go}var Ao,xo={};var So={intersectionAsync:void 0};const Io=Mr,Oo=Ur;So.intersectionAsync=async function*(t,n){const e=await(0,Oo.toSetAsync)(n);yield*(0,Io.filterAsync)(t,(async t=>e.has(await t)))};var Eo={intersection:void 0};const jo=Jr,To=Vr;Eo.intersection=function(t,n){const e=(0,To.toSet)(n);return(0,jo.filter)(t,(t=>e.has(t)))};var Po={mapAsync:void 0};const No=xn;Po.mapAsync=function(t,n){return(0,No.isAsyncIterable)(t)?async function*(t,n){let e=0;for await(const r of t)yield await n(r,e),e++}(t,n):async function*(t,n){let e=0;for(const r of t)yield await n(r,e),e++}(t,n)};var ko={};ko.map=void 0,ko.map=function*(t,n){let e=0;for(const r of t)yield n(r,e),e++};var Bo,qo={};function Fo(){if(Bo)return qo;Bo=1,qo.repeatAsync=void 0;const t=Ht,n=Ir();return qo.repeatAsync=function(e,r){return(0,n.assert)(r===1/0||Number.isInteger(r),"The parameter times must be an integer"),(0,n.assert)(r>=0,"The parameter times must be greater than or equal to 0"),r===1/0&&function(){if("production"===process.env.NODE_ENV)return;console.warn("When iterable has no elements and times is Infinity, repeat() will be in dead loop")}(),(0,t.go)((async function*(){const t=[];if(r>0){for await(const n of e)yield n,t.push(n);r--}for(;r>0;)yield*t,r--}))},qo}var Co,Mo={};function Ro(){if(Co)return Mo;Co=1,Mo.repeat=void 0;const t=Ht,n=Ir();return Mo.repeat=function(e,r){return(0,n.assert)(r===1/0||Number.isInteger(r),"The parameter times must be an integer"),(0,n.assert)(r>=0,"The parameter times must be greater than or equal to 0"),r===1/0&&function(){if("production"===process.env.NODE_ENV)return;console.warn("When iterable has no elements and times is Infinity, repeat() will be in dead loop")}(),(0,t.go)((function*(){const t=[];if(r>0){for(const n of e)yield n,t.push(n);r--}for(;r>0;)yield*t,r--}))},Mo}var Uo,zo={};var Do,Lo={};var Jo={};Jo.splitAsync=void 0,Jo.splitAsync=async function*(t,n){let e=[];for await(const r of t)r===n?(yield e,e=[]):e.push(r);yield e};var Vo={splitByAsync:void 0};const Wo=xn;Vo.splitByAsync=function(t,n){return(0,Wo.isAsyncIterable)(t)?async function*(t,n){let e=[],r=0;for await(const o of t)await n(o,r)?(yield e,e=[]):e.push(o),r++;yield e}(t,n):async function*(t,n){let e=[],r=0;for(const o of t)await n(o,r)?(yield e,e=[]):e.push(o),r++;yield e}(t,n)};var Yo={};Yo.splitBy=void 0,Yo.splitBy=function*(t,n){let e=[],r=0;for(const o of t)n(o,r)?(yield e,e=[]):e.push(o),r++;yield e};var Go={};Go.split=void 0,Go.split=function*(t,n){let e=[];for(const r of t)r===n?(yield e,e=[]):e.push(r);yield e};var Ho,Xo={};var Ko,Qo={};var Zo,$o={};var ti={takeUntilAsync:void 0};const ni=xn;ti.takeUntilAsync=function(t,n){return(0,ni.isAsyncIterable)(t)?async function*(t,n){let e=0;for await(const r of t){if(await n(r,e))break;yield r,e++}}(t,n):async function*(t,n){let e=0;for(const r of t){if(await n(r,e))break;yield r,e++}}(t,n)};var ei={};ei.takeUntil=void 0,ei.takeUntil=function*(t,n){let e=0;for(const r of t){if(n(r,e))break;yield r,e++}};var ri,oi={};var ii={tapAsync:void 0};const ui=xn;ii.tapAsync=function(t,n){return(0,ui.isAsyncIterable)(t)?async function*(t,n){let e=0;for await(const r of t)await n(r,e),yield r,e++}(t,n):async function*(t,n){let e=0;for(const r of t)await n(r,e),yield r,e++}(t,n)};var ci={};ci.tap=void 0,ci.tap=function*(t,n){let e=0;for(const r of t)n(r,e),yield r,e++};var si={};si.toAsyncIterable=void 0,si.toAsyncIterable=async function*(t){for(const n of t)yield await n};var ai={};ai.transformAsync=void 0,ai.transformAsync=async function*(t,n){yield*n(t)};var li={};li.transform=void 0,li.transform=function*(t,n){yield*n(t)};var fi={};fi.uniqAsync=void 0,fi.uniqAsync=async function*(t){const n=new Set;for await(const e of t)n.has(e)||(yield e,n.add(e))};var di={uniqByAsync:void 0};const yi=xn;di.uniqByAsync=function(t,n){return(0,yi.isAsyncIterable)(t)?async function*(t,n){const e=new Set;let r=0;for await(const o of t){const t=await n(o,r);e.has(t)||(yield o,e.add(t)),r++}}(t,n):async function*(t,n){const e=new Set;let r=0;for(const o of t){const t=await n(o,r);e.has(t)||(yield o,e.add(t)),r++}}(t,n)};var vi={};vi.uniqBy=void 0,vi.uniqBy=function*(t,n){const e=new Set;let r=0;for(const o of t){const t=n(o,r);e.has(t)||(yield o,e.add(t)),r++}};var hi={};hi.uniq=void 0,hi.uniq=function*(t){const n=new Set;for(const e of t)n.has(e)||(yield e,n.add(e))};var pi={zipAsync:void 0};const bi=xn;var mi;!function(t){t[t.Sync=0]="Sync",t[t.Async=1]="Async"}(mi||(mi={})),pi.zipAsync=function(t,...n){return async function*(...t){var n,e,r,o;const i=t.length,u=t.map((t=>(0,bi.isAsyncIterable)(t)?[mi.Async,t[Symbol.asyncIterator]()]:[mi.Sync,t[Symbol.iterator]()])),c=u.map((()=>!1));try{for(;;){const t=new Array(i);for(let n=0;n<i;n++){const[e,r]=u[n];let o;if(o=e===mi.Async?await r.next():r.next(),o.done)return void(c[n]=!0);t[n]=await o.value}yield t}}finally{const t=u.filter(((t,n)=>!c[n]));for(const[i,u]of t)i===mi.Async?await(null===(e=(n=u).return)||void 0===e?void 0:e.call(n)):null===(o=(r=u).return)||void 0===o||o.call(r)}}(t,...n)};var wi,gi={};function _i(){return wi||(wi=1,function(t){var n=Vt&&Vt.__createBinding||(Object.create?function(t,n,e,r){void 0===r&&(r=e);var o=Object.getOwnPropertyDescriptor(n,e);o&&!("get"in o?!n.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return n[e]}}),Object.defineProperty(t,r,o)}:function(t,n,e,r){void 0===r&&(r=e),t[r]=n[e]}),e=Vt&&Vt.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};e(function(){if(xr)return Gt;xr=1,Gt.chunkAsync=void 0;const t=Ht,n=Ir();return Gt.chunkAsync=function(e,r){return(0,n.assert)(Number.isInteger(r),"The parameter size must be an integer"),(0,n.assert)(r>0,"The parameter size must be greater than 0"),(0,t.go)((async function*(){let t=[];for await(const n of e)t.push(n),t.length>=r&&(yield t,t=[]);t.length&&(yield t)}))},Gt}(),t),e(Or,t),e(jr,t),e(function(){if(Tr)return Pr;Tr=1,Pr.chunk=void 0;const t=Ht,n=Ir();return Pr.chunk=function(e,r){return(0,n.assert)(Number.isInteger(r),"The parameter size must be an integer"),(0,n.assert)(r>0,"The parameter size must be greater than 0"),(0,t.go)((function*(){let t=[];for(const n of e)t.push(n),t.length>=r&&(yield t,t=[]);t.length&&(yield t)}))},Pr}(),t),e(Nr,t),e(qr,t),e(Cr,t),e(Lr,t),e(function(){if(Gr)return Hr;Gr=1,Hr.dropAsync=void 0;const t=Ht,n=Xr,e=Ir();return Hr.dropAsync=function(r,o){return(0,e.assert)(Number.isInteger(o),"The parameter count must be an integer"),(0,e.assert)(o>=0,"The parameter count must be greater than or equal to 0"),0===o?(0,n.copyAsyncIterable)(r):(0,t.go)((async function*(){var t;const n=r[Symbol.asyncIterator]();let e;try{let r;for(;({value:r,done:e}=await n.next()),!(e||o<=0);)o--;for(;!e;)yield r,({value:r,done:e}=await n.next())}finally{e||await(null===(t=n.return)||void 0===t?void 0:t.call(n))}}))},Hr}(),t),e(function(){if(Kr)return Qr;Kr=1,Qr.dropRightAsync=void 0;const t=Ht,n=Xr,e=Ir(),r=Zr;return Qr.dropRightAsync=function(o,i){return(0,e.assert)(Number.isInteger(i),"The parameter count must be an integer"),(0,e.assert)(i>=0,"The parameter count must be greater than or equal to 0"),0===i?(0,n.copyAsyncIterable)(o):(0,t.go)((async function*(){const t=(await(0,r.toArrayAsync)(o)).slice(0,-i);for(const n of t)yield n}))},Qr}(),t),e(function(){if($r)return to;$r=1,to.dropRight=void 0;const t=Ht,n=Xr,e=Ir();return to.dropRight=function(r,o){return(0,e.assert)(Number.isInteger(o),"The parameter count must be an integer"),(0,e.assert)(o>=0,"The parameter count must be greater than or equal to 0"),0===o?(0,n.copyIterable)(r):(0,t.go)((function*(){const t=Array.from(r);yield*t.slice(0,-o)}))},to}(),t),e(no,t),e(ro,t),e(function(){if(oo)return io;oo=1,io.drop=void 0;const t=Ht,n=Xr,e=Ir();return io.drop=function(r,o){return(0,e.assert)(Number.isInteger(o),"The parameter count must be an integer"),(0,e.assert)(o>=0,"The parameter count must be greater than or equal to 0"),0===o?(0,n.copyIterable)(r):(0,t.go)((function*(){var t;const n=r[Symbol.iterator]();let e;try{let r;for(;({value:r,done:e}=n.next()),!(e||o<=0);)o--;for(;!e;)yield r,({value:r,done:e}=n.next())}finally{e||null===(t=n.return)||void 0===t||t.call(n)}}))},io}(),t),e(Mr,t),e(Jr,t),e(function(){if(vo)return uo;vo=1,uo.flattenAsync=void 0;const t=ho();return uo.flattenAsync=function(n){return(0,t.flattenDeepAsync)(n,1)},uo}(),t),e(so,t),e(po,t),e(ho(),t),e(_o(),t),e(function(){if(Ao)return xo;Ao=1,xo.flatten=void 0;const t=_o();return xo.flatten=function(n){return(0,t.flattenDeep)(n,1)},xo}(),t),e(So,t),e(Eo,t),e(Po,t),e(ko,t),e(Fo(),t),e(Ro(),t),e(function(){if(Uo)return zo;Uo=1,zo.sliceAsync=void 0;const t=Ht,n=Ir();return zo.sliceAsync=function(e,r,o=1/0){return(0,n.assert)(Number.isInteger(r),"The parameter start must be an integer"),(0,n.assert)(r>=0,"The parameter start must be greater than or equal to 0"),(0,n.assert)(Number.isInteger(o),"The parameter end must be an integer"),(0,n.assert)(o>=r,"The parameter end must be greater than or equal to start"),(0,t.go)((async function*(){let t=0;for await(const n of e){if(t>=o)break;t>=r&&(yield n),t++}}))},zo}(),t),e(function(){if(Do)return Lo;Do=1,Lo.slice=void 0;const t=Ht,n=Ir();return Lo.slice=function(e,r,o=1/0){return(0,n.assert)(Number.isInteger(r),"The parameter start must be an integer"),(0,n.assert)(r>=0,"The parameter start must be greater than or equal to 0"),(0,n.assert)(Number.isInteger(o),"The parameter end must be an integer"),(0,n.assert)(o>=r,"The parameter end must be greater than or equal to start"),(0,t.go)((function*(){let t=0;for(const n of e){if(t>=o)break;t>=r&&(yield n),t++}}))},Lo}(),t),e(Jo,t),e(Vo,t),e(Yo,t),e(Go,t),e(function(){if(Ho)return Xo;Ho=1,Xo.takeAsync=void 0;const t=Ht,n=Ir();return Xo.takeAsync=function(e,r){return(0,n.assert)(Number.isInteger(r),"The parameter count must be an integer"),(0,n.assert)(r>=0,"The parameter count must be greater than or equal to 0"),(0,t.go)((async function*(){if(0!==r)for await(const t of e)if(yield t,0==--r)break}))},Xo}(),t),e(function(){if(Ko)return Qo;Ko=1,Qo.takeRightAsync=void 0;const t=Ht,n=Ir();return Qo.takeRightAsync=function(e,r){return(0,n.assert)(Number.isInteger(r),"The parameter count must be an integer"),(0,n.assert)(r>=0,"The parameter count must be greater than or equal to 0"),(0,t.go)((async function*(){var t;const n=e[Symbol.asyncIterator]();let o;try{const e=[];let i;for(;({value:i,done:o}=await n.next()),!o;)e.push(i),e.length>r&&e.shift();yield*e}finally{o||await(null===(t=n.return)||void 0===t?void 0:t.call(n))}}))},Qo}(),t),e(function(){if(Zo)return $o;Zo=1,$o.takeRight=void 0;const t=Ht,n=Ir();return $o.takeRight=function(e,r){return(0,n.assert)(Number.isInteger(r),"The parameter count must be an integer"),(0,n.assert)(r>=0,"The parameter count must be greater than or equal to 0"),(0,t.go)((function*(){var t;const n=e[Symbol.iterator]();let o;try{const e=[];let i;for(;({value:i,done:o}=n.next()),!o;)e.push(i),e.length>r&&e.shift();yield*e}finally{o||null===(t=n.return)||void 0===t||t.call(n)}}))},$o}(),t),e(ti,t),e(ei,t),e(function(){if(ri)return oi;ri=1,oi.take=void 0;const t=Ht,n=Ir();return oi.take=function(e,r){return(0,n.assert)(Number.isInteger(r),"The parameter count must be an integer"),(0,n.assert)(r>=0,"The parameter count must be greater than or equal to 0"),(0,t.go)((function*(){if(0!==r)for(const t of e)if(yield t,0==--r)break}))},oi}(),t),e(ii,t),e(ci,t),e(si,t),e(ai,t),e(li,t),e(fi,t),e(di,t),e(vi,t),e(hi,t),e(pi,t),e(gi,t)}(Yt)),Yt}gi.zip=void 0,gi.zip=function(t,...n){return function*(...t){const n=t.length,e=t.map((t=>t[Symbol.iterator]())),r=e.map((()=>!1));try{for(;;){const t=new Array(n);for(let o=0;o<n;o++){const{value:n,done:i}=e[o].next();if(i)return void(r[o]=!0);t[o]=n}yield t}}finally{e.filter(((t,n)=>!r[n])).forEach((t=>{var n;return null===(n=t.return)||void 0===n?void 0:n.call(t)}))}}(t,...n)};var Ai={},xi={};xi.consume=void 0,xi.consume=function(t,n){return n(t)};var Si={};Si.consumeAsync=void 0,Si.consumeAsync=async function(t,n){return await n(t)};var Ii={eachAsync:void 0};const Oi=xn;Ii.eachAsync=function(t,n){return(0,Oi.isAsyncIterable)(t)?async function(t,n){let e=0;for await(const r of t)await n(r,e),e++}(t,n):async function(t,n){let e=0;for(const r of t)await n(r,e),e++}(t,n)};var Ei={};Ei.each=void 0,Ei.each=function(t,n){let e=0;for(const r of t)n(r,e),e++};var ji={everyAsync:void 0};const Ti=xn;ji.everyAsync=function(t,n){return(0,Ti.isAsyncIterable)(t)?async function(t,n){let e=0;for await(const r of t){if(!await n(r,e))return!1;e++}return!0}(t,n):async function(t,n){let e=0;for(const r of t){if(!await n(r,e))return!1;e++}return!0}(t,n)};var Pi={};Pi.every=void 0,Pi.every=function(t,n){let e=0;for(const r of t){if(!n(r,e))return!1;e++}return!0};var Ni={findAsync:void 0};const ki=xn;Ni.findAsync=function(t,n){return(0,ki.isAsyncIterable)(t)?async function(t,n){let e=0;for await(const r of t){if(await n(r,e))return r;e++}return}(t,n):async function(t,n){let e=0;for(const r of t){if(await n(r,e))return r;e++}return}(t,n)};var Bi={};Bi.find=void 0,Bi.find=function(t,n){let e=0;for(const r of t){if(n(r,e))return r;e++}};var qi={};qi.firstAsync=void 0,qi.firstAsync=async function(t){for await(const n of t)return n};var Fi={};Fi.first=void 0,Fi.first=function(t){for(const n of t)return n};var Ci={};Ci.includesAsync=void 0,Ci.includesAsync=async function(t,n){for await(const e of t)if(e===n)return!0;return!1};var Mi={};Mi.includes=void 0,Mi.includes=function(t,n){for(const e of t)if(e===n)return!0;return!1};var Ri={reduceAsync:void 0};const Ui=xn;Ri.reduceAsync=function(t,n,e){return(0,Ui.isUndefined)(e)?function(t,n){return(0,Ui.isAsyncIterable)(t)?e(t):r(t);async function e(t){var e;const r=t[Symbol.asyncIterator]();let o;try{let t,u=await i(r),c=1;for(;({value:t,done:o}=await r.next()),!o;)u=await n(u,t,c++);return u}finally{o||await(null===(e=r.return)||void 0===e?void 0:e.call(r))}async function i(t){const n=await t.next();if(n.done)throw o=!0,new Error("Reduce of empty iterable with no initial value");return n.value}}async function r(t){var e;const r=t[Symbol.iterator]();let o;try{let t,u=i(r),c=1;for(;({value:t,done:o}=r.next()),!o;)u=await n(u,t,c++);return u}finally{o||null===(e=r.return)||void 0===e||e.call(r)}function i(t){const n=t.next();if(n.done)throw o=!0,new Error("Reduce of empty iterable with no initial value");return n.value}}}(t,n):function(t,n,e){return(0,Ui.isAsyncIterable)(t)?o(t):r(t);async function r(t){let r=e,o=0;for(const e of t)r=await n(r,e,o++);return r}async function o(t){let r=e,o=0;for await(const e of t)r=await n(r,e,o++);return r}}(t,n,e)};var zi={reduce:void 0};const Di=xn;zi.reduce=function(t,n,e){return(0,Di.isUndefined)(e)?function(t,n){var e;const r=t[Symbol.iterator]();let o;try{let t,u=i(r),c=1;for(;({value:t,done:o}=r.next()),!o;)u=n(u,t,c++);return u}finally{o||null===(e=r.return)||void 0===e||e.call(r)}function i(t){const n=t.next();if(n.done)throw o=!0,new Error("Reduce of empty iterable with no initial value");return n.value}}(t,n):function(t,n,e){let r=e,o=0;for(const e of t)r=n(r,e,o++);return r}(t,n,e)};var Li={someAsync:void 0};const Ji=xn;Li.someAsync=function(t,n){return(0,Ji.isAsyncIterable)(t)?async function(t,n){let e=0;for await(const r of t){if(await n(r,e))return!0;e++}return!1}(t,n):async function(t,n){let e=0;for(const r of t){if(await n(r,e))return!0;e++}return!1}(t,n)};var Vi={};Vi.some=void 0,Vi.some=function(t,n){let e=0;for(const r of t){if(n(r,e))return!0;e++}return!1};var Wi={};Wi.lastAsync=void 0,Wi.lastAsync=async function(t){var n;const e=t[Symbol.asyncIterator]();let r;try{let t,o;for(;({value:t,done:r}=await e.next()),!r;)o=t;return o}finally{r||await(null===(n=e.return)||void 0===n?void 0:n.call(e))}};var Yi={};Yi.last=void 0,Yi.last=function(t){var n;const e=t[Symbol.iterator]();let r;try{let t,o;for(;({value:t,done:r}=e.next()),!r;)o=t;return o}finally{r||null===(n=e.return)||void 0===n||n.call(e)}};var Gi={};Gi.toArray=void 0,Gi.toArray=function(t){return Array.from(t)};var Hi={};Hi.count=void 0,Hi.count=function(t){let n=0;for(const e of t)n++;return n};var Xi={};Xi.countAsync=void 0,Xi.countAsync=async function(t){let n=0;for await(const e of t)n++;return n};var Ki={groupBy:void 0};const Qi=Ei;Ki.groupBy=function(t,n){const e=new Map;return(0,Qi.each)(t,((t,r)=>{const o=n(t,r);e.has(o)||e.set(o,[]),e.get(o).push(t)})),e};var Zi={groupByAsync:void 0};const $i=Ii;var tu;function nu(){return tu||(tu=1,function(t){var n=Vt&&Vt.__createBinding||(Object.create?function(t,n,e,r){void 0===r&&(r=e);var o=Object.getOwnPropertyDescriptor(n,e);o&&!("get"in o?!n.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return n[e]}}),Object.defineProperty(t,r,o)}:function(t,n,e,r){void 0===r&&(r=e),t[r]=n[e]}),e=Vt&&Vt.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};e(_i(),t),e(Ai,t)}(Wt)),Wt}Zi.groupByAsync=async function(t,n){const e=new Map;return await(0,$i.eachAsync)(t,(async(t,r)=>{const o=await n(t,r);e.has(o)||e.set(o,[]),e.get(o).push(t)})),e},function(t){var n=Vt&&Vt.__createBinding||(Object.create?function(t,n,e,r){void 0===r&&(r=e);var o=Object.getOwnPropertyDescriptor(n,e);o&&!("get"in o?!n.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return n[e]}}),Object.defineProperty(t,r,o)}:function(t,n,e,r){void 0===r&&(r=e),t[r]=n[e]}),e=Vt&&Vt.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};e(xi,t),e(Si,t),e(Ii,t),e(Ei,t),e(ji,t),e(Pi,t),e(Ni,t),e(Bi,t),e(qi,t),e(Fi,t),e(Ci,t),e(Mi,t),e(Ri,t),e(zi,t),e(Li,t),e(Vi,t),e(Wi,t),e(Yi,t),e(Zr,t),e(Gi,t),e(Ur,t),e(Vr,t),e(Hi,t),e(Xi,t),e(Ki,t),e(Zi,t)}(Ai);var eu=nu();function ru(t){return Jt(t,{childList:!0,subtree:!0}).pipe(kt((t=>eu.toArray(eu.flatten(eu.map(t,(t=>t.addedNodes)))))),Lt((t=>t.length>0)))}function ou(t){return Jt(t,{childList:!0,subtree:!0}).pipe(kt((t=>eu.toArray(eu.flatten(eu.map(t,(t=>t.removedNodes)))))),Lt((t=>t.length>0)))}const iu=new Set,uu=new Set;let cu=!1,su=!1;function au(){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var e=dt(t),r=yt(t,1/0),o=t;return o.length?1===o.length?St(o[0]):Ct(r)(Nt(o,e)):lt}(new B((t=>(cu||function(){const t=history.pushState;history.pushState=function(...n){Reflect.apply(t,this,n),iu.forEach((t=>t.next()))},cu=!0}(),iu.add(t),()=>iu.delete(t)))),new B((t=>(su||function(){const t=history.replaceState;history.replaceState=function(...n){Reflect.apply(t,this,n),uu.forEach((t=>t.next()))},su=!0}(),uu.add(t),()=>uu.delete(t)))),zt(window,"popstate")).pipe(kt((t=>{})))}function lu(){let t=document.URL;return(n?D(n):L).pipe(Lt((()=>t!==document.URL)),function(t,n,e){var r=l(t)||n||e?{next:t,error:n,complete:e}:t;return r?C((function(t,n){var e;null===(e=r.subscribe)||void 0===e||e.call(r);var o=!0;t.subscribe(M(n,(function(t){var e;null===(e=r.next)||void 0===e||e.call(r,t),n.next(t)}),(function(){var t;o=!1,null===(t=r.complete)||void 0===t||t.call(r),n.complete()}),(function(t){var e;o=!1,null===(e=r.error)||void 0===e||e.call(r,t),n.error(t)}),(function(){var t,n;o&&(null===(t=r.unsubscribe)||void 0===t||t.call(r)),null===(n=r.finalize)||void 0===n||n.call(r)})))})):N}((()=>t=document.URL)),kt((()=>{})));var n}export{ru as observeAdditionOfDescendantNodes,ou as observeRemovalOfDescendantNodes,au as observeStateChanges,lu as observeUrlChanges};
16
- //# sourceMappingURL=index.min.mjs.map