@joist/di 3.2.1 → 3.4.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/README.md CHANGED
@@ -4,13 +4,24 @@ Dependency Injection in ~800 bytes.
4
4
 
5
5
  Allows you to inject services into other class instances (including custom elements and node).
6
6
 
7
- #### Installation:
7
+ ## Table of Contents
8
+
9
+ - [Installation](#installation)
10
+ - [Example Usage](#example)
11
+ - [Factories](#factories)
12
+ - [Static Tokens](#static-tokens)
13
+ - [Testing](#testing)
14
+ - [Parent/Child Relationship](#parentchild-relationship)
15
+ - [Custom Elements](#custom-elements)
16
+ - [Environment](#environment)
17
+
18
+ ## Installation:
8
19
 
9
20
  ```BASH
10
21
  npm i @joist/di
11
22
  ```
12
23
 
13
- #### Example:
24
+ ## Example:
14
25
 
15
26
  Classes that are decoratored with `@injectable` can use the `inject()` function to inject a class instance.
16
27
 
@@ -74,13 +85,13 @@ const car2 = factory2.get(Car);
74
85
  console.log(car2.accelerate(), car2.tires().size);
75
86
  ```
76
87
 
77
- #### Factories
88
+ ## Factories
78
89
 
79
90
  In addition to defining providers with classes you can also use factory functions.
80
91
 
81
92
  ```ts
82
- abstract class Logger {
83
- abstract log(...args: any[]): void;
93
+ class Logger {
94
+ log(..._: any[]): void {}
84
95
  }
85
96
 
86
97
  const app = new Injector([
@@ -93,7 +104,110 @@ const app = new Injector([
93
104
  ]);
94
105
  ```
95
106
 
96
- #### Custom Elements:
107
+ ## Static Tokens
108
+
109
+ In most cases a token is any constructable class. There are cases where you might want to return other data types that aren't objects.
110
+
111
+ ```ts
112
+ // token that resolves to a string
113
+ const URL_TOKEN = new StaticToken<string>('app_url');
114
+
115
+ const app = new Injector([
116
+ {
117
+ provide: URL_TOKEN,
118
+ factory: () => '/my-app-url/'
119
+ }
120
+ ]);
121
+ ```
122
+
123
+ ### Default values
124
+
125
+ A static token can be provided a default factory function to use on creation.
126
+
127
+ ```ts
128
+ const URL_TOKEN = new StaticToken<string>('app_url', () => '/default-url/');
129
+ ```
130
+
131
+ ### Async values
132
+
133
+ Static tokens can also leverage promises for cases when you need to async create your service instances.
134
+
135
+ ```ts
136
+ const URL_TOKEN = new StaticToken<string>('app_url', () => Promise.resolve('/default-url/'));
137
+
138
+ const app = new Injector();
139
+
140
+ const url = await app.get(URL_TOKEN);
141
+ ```
142
+
143
+ ## Testing
144
+
145
+ Dependency injection can make testing easy without requiring test framework level mock.
146
+
147
+ ```TS
148
+ import { Injector, injectable, inject } from '@joist/di';
149
+
150
+ @injectable
151
+ class HttpService {
152
+ fetch(url: string, init?: RequestInit) {
153
+ return fetch(url, init);
154
+ }
155
+ }
156
+
157
+ class ApiService {
158
+ #http = inject(HttpService);
159
+
160
+ getData() {
161
+ return this.#http()
162
+ .fetch('/api/v1/users')
163
+ .then((res) => res.json());
164
+ }
165
+ }
166
+
167
+ // unit test
168
+ const testApp = new Injector([
169
+ {
170
+ provide: HttpService,
171
+ use: class extends HttpService {
172
+ async fetch() {
173
+ // return whatever response we like
174
+ return Response.json({ fname: 'Danny', lname: 'Blue' });
175
+ }
176
+ },
177
+ },
178
+ ]);
179
+
180
+ // our test instance will be using our mock when making http requests
181
+ const api = testApp.get(ApiService);
182
+ ```
183
+
184
+ ## Parent/Child relationship
185
+
186
+ Injectors can be defined with a parent element. The top most parent will (by default) be where services are constructed and cached. Only if manually defined providers are found earlier in the chain will services be constructed lower. The injector resolution algorithm behaves as following.
187
+
188
+ 1. Do I have a cached instance locally?
189
+ 2. Do I have a local provider definition for the token?
190
+ 3. Do I have a parent? Check parent for 1 and 2
191
+ 4. All clear, go ahead and construct and cache the requested service
192
+
193
+ ```mermaid
194
+ graph TD
195
+ RootInjector --> InjectorA;
196
+ InjectorA -->InjectorB;
197
+ InjectorA --> InjectorC;
198
+ InjectorA --> InjectorD;
199
+ InjectorD --> InjectorE;
200
+ ```
201
+
202
+ In the above tree, if InjectorE requests a service, it will navigate up to the RootInjector and cache.
203
+ If InjectorB then requests the same token, it will recieve the same cached instance from RootInjector.
204
+
205
+ On the other hand if a provider is defined at InjectorD, then the service will be constructed and cached there.
206
+ InjectorB would given a NEW instances created from RootInjector.
207
+ This is because InjectorB does not fall under InjectorD.
208
+ This behavior allows for services to be "scoped" within a certain branch of the tree. This is what allows for the scoped custom element behavior defined in the next section.
209
+
210
+ ## Custom Elements:
97
211
 
98
212
  Joist is built to work with custom elements. Since the document is a tree we can search up that tree for providers.
99
213
 
@@ -145,7 +259,7 @@ customElements.define('my-element', MyElement);
145
259
  </color-ctx>
146
260
  ```
147
261
 
148
- #### Environment
262
+ ## Environment
149
263
 
150
264
  When using @joist/di with custom elements a default root injector is created dubbed 'environment'. This is the injector that all other injectors will eventually stop at.
151
265
  If you need to define something in this environment you can do so with the `defineEnvironment` method.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@joist/di",
3
- "version": "3.2.1",
3
+ "version": "3.4.0",
4
4
  "type": "module",
5
5
  "main": "./target/lib.js",
6
6
  "module": "./target/lib.js",
package/src/lib/inject.ts CHANGED
@@ -1,11 +1,10 @@
1
- import { ProviderToken } from './provider.js';
2
- import { Injectable } from './injector.js';
1
+ import { ConstructableToken } from './provider.js';
3
2
  import { INJECTABLES } from './injectable.js';
4
3
 
5
4
  export type Injected<T> = () => T;
6
5
 
7
- export function inject<This extends Injectable, T extends object>(
8
- token: ProviderToken<T>
6
+ export function inject<This extends object, T extends object>(
7
+ token: ConstructableToken<T>
9
8
  ): Injected<T> {
10
9
  return function (this: This) {
11
10
  const injector = INJECTABLES.get(this);
@@ -1,10 +1,10 @@
1
- import { ProviderToken } from './provider.js';
1
+ import { ConstructableToken } from './provider.js';
2
2
  import { Injector } from './injector.js';
3
3
  import { environment } from './environment.js';
4
4
 
5
5
  export const INJECTABLES = new WeakMap<object, Injector>();
6
6
 
7
- export function injectable<T extends ProviderToken<any>>(Base: T, _?: unknown) {
7
+ export function injectable<T extends ConstructableToken<any>>(Base: T, _?: unknown) {
8
8
  return class InjectableNode extends Base {
9
9
  constructor(..._: any[]) {
10
10
  super();
@@ -3,6 +3,7 @@ import { expect } from '@open-wc/testing';
3
3
  import { Injector } from './injector.js';
4
4
  import { inject } from './inject.js';
5
5
  import { injectable } from './injectable.js';
6
+ import { Provider, StaticToken } from './provider.js';
6
7
 
7
8
  describe('Injector', () => {
8
9
  it('should create a new instance of a single provider', () => {
@@ -145,4 +146,39 @@ describe('Injector', () => {
145
146
 
146
147
  injector.get(Service);
147
148
  });
149
+
150
+ it('should create an instance from a StaticToken factory', () => {
151
+ const token = new StaticToken('test', () => 'Hello World');
152
+ const injector = new Injector();
153
+
154
+ const res = injector.get(token);
155
+
156
+ expect(res).to.equal('Hello World');
157
+ });
158
+
159
+ it('should create an instance from an async StaticToken factory', async () => {
160
+ const token = new StaticToken('test', () => Promise.resolve('Hello World'));
161
+ const injector = new Injector();
162
+
163
+ const res = await injector.get(token);
164
+
165
+ expect(res).to.equal('Hello World');
166
+ });
167
+
168
+ it('should allow static token to be overridden', () => {
169
+ const token = new StaticToken<string>('test');
170
+
171
+ const provider: Provider<string> = {
172
+ provide: token,
173
+ factory() {
174
+ return 'Hello World';
175
+ }
176
+ };
177
+
178
+ const injector = new Injector([provider]);
179
+
180
+ const res = injector.get(token);
181
+
182
+ expect(res).to.equal('Hello World');
183
+ });
148
184
  });
@@ -1,10 +1,5 @@
1
1
  import { INJECTABLES } from './injectable.js';
2
- import { ProviderToken, Provider } from './provider.js';
3
-
4
- // defines available properties that will be on a class instance that can use the inject function
5
- export type Injectable = object & {
6
- onInject?(): void;
7
- };
2
+ import { InjectionToken, Provider, StaticToken } from './provider.js';
8
3
 
9
4
  /**
10
5
  * Injectors create and store instances of services.
@@ -24,20 +19,19 @@ export type Injectable = object & {
24
19
  * If Inject B then requests the same token, it will recieve the same cached instance from RootInjector.
25
20
  */
26
21
  export class Injector {
27
- // ke track of isntances. One Token can have one instance
28
- #instances = new WeakMap<ProviderToken<any>, any>();
22
+ // keep track of instances. One Token can have one instance
23
+ #instances = new WeakMap<InjectionToken<any>, any>();
29
24
 
30
- parent: Injector | undefined = undefined;
25
+ parent;
26
+ providers;
31
27
 
32
- constructor(
33
- public providers: Provider<any>[] = [],
34
- parent?: Injector
35
- ) {
36
- this.setParent(parent);
28
+ constructor(providers: Provider<unknown>[] = [], parent?: Injector) {
29
+ this.parent = parent;
30
+ this.providers = providers;
37
31
  }
38
32
 
39
33
  // resolves and retuns and instance of the requested service
40
- get<T extends Injectable>(token: ProviderToken<T>): T {
34
+ get<T>(token: InjectionToken<T>): T {
41
35
  // check for a local instance
42
36
  if (this.#instances.has(token)) {
43
37
  return this.#instances.get(token)!;
@@ -67,6 +61,14 @@ export class Injector {
67
61
  return this.parent.get(token);
68
62
  }
69
63
 
64
+ if (token instanceof StaticToken) {
65
+ if (!token.factory) {
66
+ throw new Error(`Provider not found for ${token}`);
67
+ }
68
+
69
+ return this.#createAndCache(token, token.factory);
70
+ }
71
+
70
72
  return this.#createAndCache(token, () => new token());
71
73
  }
72
74
 
@@ -78,38 +80,40 @@ export class Injector {
78
80
  this.#instances = new WeakMap();
79
81
  }
80
82
 
81
- #createAndCache<T extends Injectable>(
82
- token: ProviderToken<T>,
83
- factory: (injector: Injector) => T
84
- ): T {
83
+ #createAndCache<T>(token: InjectionToken<T>, factory: (injector: Injector) => T): T {
85
84
  const instance = factory(this);
86
85
 
87
86
  this.#instances.set(token, instance);
88
87
 
89
- const injector = INJECTABLES.get(instance);
90
-
91
- if (injector) {
92
- /**
93
- * set the this injector instance as a parent.
94
- * this means that each calling injector will be the parent of what it creates.
95
- * this allows the created service to navigate up it's chain to find a root
96
- */
97
- injector.setParent(this);
98
-
99
- /**
100
- * the on inject lifecycle hook should be called after the parent is defined.
101
- * this ensures that services are initialized when the chain is settled
102
- * this is required since the parent is set after the instance is constructed
103
- */
104
- if (instance.onInject) {
105
- instance.onInject();
88
+ /**
89
+ * Only values that are objects are able to have associated injectors
90
+ */
91
+ if (typeof instance === 'object' && instance !== null) {
92
+ const injector = INJECTABLES.get(instance);
93
+
94
+ if (injector) {
95
+ /**
96
+ * set the this injector instance as a parent.
97
+ * this means that each calling injector will be the parent of what it creates.
98
+ * this allows the created service to navigate up it's chain to find a root
99
+ */
100
+ injector.setParent(this);
101
+
102
+ /**
103
+ * the on inject lifecycle hook should be called after the parent is defined.
104
+ * this ensures that services are initialized when the chain is settled
105
+ * this is required since the parent is set after the instance is constructed
106
+ */
107
+ if ('onInject' in instance && typeof instance.onInject === 'function') {
108
+ instance.onInject();
109
+ }
106
110
  }
107
111
  }
108
112
 
109
113
  return instance;
110
114
  }
111
115
 
112
- #findProvider(token: ProviderToken<any>): Provider<any> | undefined {
116
+ #findProvider(token: InjectionToken<any>): Provider<any> | undefined {
113
117
  if (!this.providers) {
114
118
  return undefined;
115
119
  }
@@ -1,13 +1,25 @@
1
1
  import { Injector } from './injector.js';
2
2
 
3
- export type ProviderToken<T> = {
3
+ export class StaticToken<T> {
4
+ name;
5
+ factory;
6
+
7
+ constructor(name: string, factory?: () => T) {
8
+ this.name = name;
9
+ this.factory = factory;
10
+ }
11
+ }
12
+
13
+ export interface ConstructableToken<T> {
4
14
  providers?: Provider<any>[];
5
15
 
6
16
  new (...args: any[]): T;
7
- };
17
+ }
18
+
19
+ export type InjectionToken<T> = ConstructableToken<T> | StaticToken<T>;
8
20
 
9
21
  export interface Provider<T> {
10
- provide: ProviderToken<T>;
11
- use?: ProviderToken<T>;
22
+ provide: InjectionToken<T>;
23
+ use?: ConstructableToken<T>;
12
24
  factory?(injector: Injector): T;
13
25
  }
package/src/lib.ts CHANGED
@@ -1,5 +1,5 @@
1
- export { Injector, Injectable } from './lib/injector.js';
2
- export { Provider, ProviderToken } from './lib/provider.js';
1
+ export { Injector } from './lib/injector.js';
2
+ export { Provider, ConstructableToken, StaticToken } from './lib/provider.js';
3
3
  export { injectable } from './lib/injectable.js';
4
4
  export { inject, Injected } from './lib/inject.js';
5
5
  export { defineEnvironment, clearEnvironment } from './lib/environment.js';
@@ -1,4 +1,3 @@
1
- import { ProviderToken } from './provider.js';
2
- import { Injectable } from './injector.js';
1
+ import { ConstructableToken } from './provider.js';
3
2
  export type Injected<T> = () => T;
4
- export declare function inject<This extends Injectable, T extends object>(token: ProviderToken<T>): Injected<T>;
3
+ export declare function inject<This extends object, T extends object>(token: ConstructableToken<T>): Injected<T>;
@@ -1 +1 @@
1
- {"version":3,"file":"inject.js","sourceRoot":"","sources":["../../src/lib/inject.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAI9C,MAAM,UAAU,MAAM,CACpB,KAAuB;IAEvB,OAAO;QACL,MAAM,QAAQ,GAAG,WAAW,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QAEvC,IAAI,QAAQ,KAAK,SAAS,EAAE,CAAC;YAC3B,MAAM,IAAI,GAAG,MAAM,CAAC,cAAc,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC;YAE1D,MAAM,IAAI,KAAK,CACb,GAAG,IAAI,6JAA6J,CACrK,CAAC;QACJ,CAAC;QAED,OAAO,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IAC7B,CAAC,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"inject.js","sourceRoot":"","sources":["../../src/lib/inject.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAI9C,MAAM,UAAU,MAAM,CACpB,KAA4B;IAE5B,OAAO;QACL,MAAM,QAAQ,GAAG,WAAW,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QAEvC,IAAI,QAAQ,KAAK,SAAS,EAAE,CAAC;YAC3B,MAAM,IAAI,GAAG,MAAM,CAAC,cAAc,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC;YAE1D,MAAM,IAAI,KAAK,CACb,GAAG,IAAI,6JAA6J,CACrK,CAAC;QACJ,CAAC;QAED,OAAO,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IAC7B,CAAC,CAAC;AACJ,CAAC"}
@@ -1,12 +1,12 @@
1
- import { ProviderToken } from './provider.js';
1
+ import { ConstructableToken } from './provider.js';
2
2
  import { Injector } from './injector.js';
3
3
  export declare const INJECTABLES: WeakMap<object, Injector>;
4
- export declare function injectable<T extends ProviderToken<any>>(Base: T, _?: unknown): {
4
+ export declare function injectable<T extends ConstructableToken<any>>(Base: T, _?: unknown): {
5
5
  new (..._: any[]): {
6
6
  [x: string]: any;
7
7
  onInject(): void;
8
8
  connectedCallback(): void;
9
9
  disconnectedCallback(): void;
10
10
  };
11
- providers?: import("./provider.js").Provider<any>[] | undefined;
11
+ providers?: import("./provider.js").Provider<any>[];
12
12
  } & T;
@@ -1 +1 @@
1
- {"version":3,"file":"injectable.js","sourceRoot":"","sources":["../../src/lib/injectable.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE/C,MAAM,CAAC,MAAM,WAAW,GAAG,IAAI,OAAO,EAAoB,CAAC;AAE3D,MAAM,UAAU,UAAU,CAA+B,IAAO,EAAE,CAAW;IAC3E,OAAO,MAAM,cAAe,SAAQ,IAAI;QACtC,YAAY,GAAG,CAAQ;YACrB,KAAK,EAAE,CAAC;YAER,MAAM,QAAQ,GAAG,IAAI,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;YAE9C,WAAW,CAAC,GAAG,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;YAEhC,IAAI,CAAC;gBACH,IAAI,IAAI,YAAY,WAAW,EAAE,CAAC;oBAChC,IAAI,CAAC,gBAAgB,CAAC,YAAY,EAAE,CAAC,CAAC,EAAE,EAAE;wBACxC,MAAM,cAAc,GAAG,gBAAgB,CAAC,CAAC,CAAC,CAAC;wBAE3C,IAAI,cAAc,KAAK,IAAI,EAAE,CAAC;4BAC5B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AAC;QACH,CAAC;QAED,iBAAiB;YACf,IAAI,CAAC;gBACH,IAAI,IAAI,YAAY,WAAW,EAAE,CAAC;oBAChC,IAAI,CAAC,aAAa,CAAC,IAAI,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC;oBAE5C,IAAI,KAAK,CAAC,iBAAiB,EAAE,CAAC;wBAC5B,KAAK,CAAC,iBAAiB,EAAE,CAAC;oBAC5B,CAAC;gBACH,CAAC;YACH,CAAC;YAAC,MAAM,CAAC,CAAA,CAAC;QACZ,CAAC;QAED,oBAAoB;YAClB,MAAM,QAAQ,GAAG,WAAW,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;YAEvC,IAAI,QAAQ,EAAE,CAAC;gBACb,QAAQ,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC;YAChC,CAAC;YAED,IAAI,KAAK,CAAC,oBAAoB,EAAE,CAAC;gBAC/B,KAAK,CAAC,oBAAoB,EAAE,CAAC;YAC/B,CAAC;QACH,CAAC;KACF,CAAC;AACJ,CAAC;AAED,SAAS,gBAAgB,CAAC,CAAQ;IAChC,MAAM,IAAI,GAAG,CAAC,CAAC,YAAY,EAAE,CAAC;IAI9B,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QACrC,MAAM,IAAI,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;QAErB,MAAM,QAAQ,GAAG,WAAW,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QAEvC,IAAI,QAAQ,EAAE,CAAC;YACb,OAAO,QAAQ,CAAC;QAClB,CAAC;IACH,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC"}
@@ -1,12 +1,10 @@
1
- import { ProviderToken, Provider } from './provider.js';
2
- export type Injectable = object & {
3
- onInject?(): void;
4
- };
1
+ import { InjectionToken, Provider } from './provider.js';
5
2
  export declare class Injector {
6
3
  #private;
7
- providers: Provider<any>[];
8
- constructor(providers?: Provider<any>[], parent?: Injector);
9
- get<T extends Injectable>(token: ProviderToken<T>): T;
4
+ parent: Injector | undefined;
5
+ providers: Provider<unknown>[];
6
+ constructor(providers?: Provider<unknown>[], parent?: Injector);
7
+ get<T>(token: InjectionToken<T>): T;
10
8
  setParent(parent: Injector | undefined): void;
11
9
  clear(): void;
12
10
  }
@@ -1,11 +1,12 @@
1
1
  import { INJECTABLES } from './injectable.js';
2
+ import { StaticToken } from './provider.js';
2
3
  export class Injector {
3
- providers;
4
4
  #instances = new WeakMap();
5
- #parent = undefined;
5
+ parent;
6
+ providers;
6
7
  constructor(providers = [], parent) {
8
+ this.parent = parent;
7
9
  this.providers = providers;
8
- this.setParent(parent);
9
10
  }
10
11
  get(token) {
11
12
  if (this.#instances.has(token)) {
@@ -25,13 +26,19 @@ export class Injector {
25
26
  throw new Error(`Provider for ${token.name} found but is missing either 'use' or 'factory'`);
26
27
  }
27
28
  }
28
- if (this.#parent) {
29
- return this.#parent.get(token);
29
+ if (this.parent) {
30
+ return this.parent.get(token);
31
+ }
32
+ if (token instanceof StaticToken) {
33
+ if (!token.factory) {
34
+ throw new Error(`Provider not found for ${token}`);
35
+ }
36
+ return this.#createAndCache(token, token.factory);
30
37
  }
31
38
  return this.#createAndCache(token, () => new token());
32
39
  }
33
40
  setParent(parent) {
34
- this.#parent = parent;
41
+ this.parent = parent;
35
42
  }
36
43
  clear() {
37
44
  this.#instances = new WeakMap();
@@ -39,11 +46,13 @@ export class Injector {
39
46
  #createAndCache(token, factory) {
40
47
  const instance = factory(this);
41
48
  this.#instances.set(token, instance);
42
- const injector = INJECTABLES.get(instance);
43
- if (injector) {
44
- injector.setParent(this);
45
- if (instance.onInject) {
46
- instance.onInject();
49
+ if (typeof instance === 'object' && instance !== null) {
50
+ const injector = INJECTABLES.get(instance);
51
+ if (injector) {
52
+ injector.setParent(this);
53
+ if ('onInject' in instance && typeof instance.onInject === 'function') {
54
+ instance.onInject();
55
+ }
47
56
  }
48
57
  }
49
58
  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C;QACnB,CAAC;QAED,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;YAC/C,IAAI,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,OAAO,KAAK,KAAK,EAAE,CAAC;gBACxC,OAAO,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;YAC3B,CAAC;QACH,CAAC;QAED,OAAO,SAAS,CAAC;IACnB,CAAC;CACF"}
@@ -3,6 +3,7 @@ import { expect } from '@open-wc/testing';
3
3
  import { Injector } from './injector.js';
4
4
  import { inject } from './inject.js';
5
5
  import { injectable } from './injectable.js';
6
+ import { StaticToken } from './provider.js';
6
7
  describe('Injector', () => {
7
8
  it('should create a new instance of a single provider', () => {
8
9
  class A {
@@ -202,5 +203,29 @@ describe('Injector', () => {
202
203
  ]);
203
204
  injector.get(Service);
204
205
  });
206
+ it('should create an instance from a StaticToken factory', () => {
207
+ const token = new StaticToken('test', () => 'Hello World');
208
+ const injector = new Injector();
209
+ const res = injector.get(token);
210
+ expect(res).to.equal('Hello World');
211
+ });
212
+ it('should create an instance from an async StaticToken factory', async () => {
213
+ const token = new StaticToken('test', () => Promise.resolve('Hello World'));
214
+ const injector = new Injector();
215
+ const res = await injector.get(token);
216
+ expect(res).to.equal('Hello World');
217
+ });
218
+ it('should allow static token to be overridden', () => {
219
+ const token = new StaticToken('test');
220
+ const provider = {
221
+ provide: token,
222
+ factory() {
223
+ return 'Hello World';
224
+ }
225
+ };
226
+ const injector = new Injector([provider]);
227
+ const res = injector.get(token);
228
+ expect(res).to.equal('Hello World');
229
+ });
205
230
  });
206
231
  //# sourceMappingURL=injector.test.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"injector.test.js","sourceRoot":"","sources":["../../src/lib/injector.test.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAE1C,OAAO,E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from './injector.js';
2
- export type ProviderToken<T> = {
2
+ export declare class StaticToken<T> {
3
+ name: string;
4
+ factory: (() => T) | undefined;
5
+ constructor(name: string, factory?: () => T);
6
+ }
7
+ export interface ConstructableToken<T> {
3
8
  providers?: Provider<any>[];
4
9
  new (...args: any[]): T;
5
- };
10
+ }
11
+ export type InjectionToken<T> = ConstructableToken<T> | StaticToken<T>;
6
12
  export interface Provider<T> {
7
- provide: ProviderToken<T>;
8
- use?: ProviderToken<T>;
13
+ provide: InjectionToken<T>;
14
+ use?: ConstructableToken<T>;
9
15
  factory?(injector: Injector): T;
10
16
  }
@@ -1,2 +1,9 @@
1
- export {};
1
+ export class StaticToken {
2
+ name;
3
+ factory;
4
+ constructor(name, factory) {
5
+ this.name = name;
6
+ this.factory = factory;
7
+ }
8
+ }
2
9
  //# sourceMappingURL=provider.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"provider.js","sourceRoot":"","sources":["../../src/lib/provider.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"provider.js","sourceRoot":"","sources":["../../src/lib/provider.ts"],"names":[],"mappings":"AAEA,MAAM,OAAO,WAAW;IACtB,IAAI,CAAC;IACL,OAAO,CAAC;IAER,YAAY,IAAY,EAAE,OAAiB;QACzC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;CACF"}
package/target/lib.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- export { Injector, Injectable } from './lib/injector.js';
2
- export { Provider, ProviderToken } from './lib/provider.js';
1
+ export { Injector } from './lib/injector.js';
2
+ export { Provider, ConstructableToken, StaticToken } from './lib/provider.js';
3
3
  export { injectable } from './lib/injectable.js';
4
4
  export { inject, Injected } from './lib/inject.js';
5
5
  export { defineEnvironment, clearEnvironment } from './lib/environment.js';
package/target/lib.js CHANGED
@@ -1,4 +1,5 @@
1
1
  export { Injector } from './lib/injector.js';
2
+ export { StaticToken } from './lib/provider.js';
2
3
  export { injectable } from './lib/injectable.js';
3
4
  export { inject } from './lib/inject.js';
4
5
  export { defineEnvironment, clearEnvironment } from './lib/environment.js';
package/target/lib.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"lib.js","sourceRoot":"","sources":["../src/lib.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAc,MAAM,mBAAmB,CAAC;AAEzD,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,MAAM,EAAY,MAAM,iBAAiB,CAAC;AACnD,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC"}
1
+ {"version":3,"file":"lib.js","sourceRoot":"","sources":["../src/lib.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAgC,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAC9E,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,MAAM,EAAY,MAAM,iBAAiB,CAAC;AACnD,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC"}
@@ -1 +0,0 @@
1
- {"program":{"fileNames":["../../../node_modules/typescript/lib/lib.es5.d.ts","../../../node_modules/typescript/lib/lib.es2015.d.ts","../../../node_modules/typescript/lib/lib.es2016.d.ts","../../../node_modules/typescript/lib/lib.es2017.d.ts","../../../node_modules/typescript/lib/lib.es2018.d.ts","../../../node_modules/typescript/lib/lib.es2019.d.ts","../../../node_modules/typescript/lib/lib.es2020.d.ts","../../../node_modules/typescript/lib/lib.es2021.d.ts","../../../node_modules/typescript/lib/lib.es2022.d.ts","../../../node_modules/typescript/lib/lib.dom.d.ts","../../../node_modules/typescript/lib/lib.dom.iterable.d.ts","../../../node_modules/typescript/lib/lib.webworker.importscripts.d.ts","../../../node_modules/typescript/lib/lib.scripthost.d.ts","../../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../node_modules/typescript/lib/lib.es2019.array.d.ts","../../../node_modules/typescript/lib/lib.es2019.object.d.ts","../../../node_modules/typescript/lib/lib.es2019.string.d.ts","../../../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../node_modules/typescript/lib/lib.es2019.intl.d.ts","../../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../node_modules/typescript/lib/lib.es2020.date.d.ts","../../../node_modules/typescript/lib/lib.es2020.promise.d.ts","../../../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../../node_modules/typescript/lib/lib.es2020.string.d.ts","../../../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../../node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../node_modules/typescript/lib/lib.es2020.number.d.ts","../../../node_modules/typescript/lib/lib.es2021.promise.d.ts","../../../node_modules/typescript/lib/lib.es2021.string.d.ts","../../../node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../../node_modules/typescript/lib/lib.es2021.intl.d.ts","../../../node_modules/typescript/lib/lib.es2022.array.d.ts","../../../node_modules/typescript/lib/lib.es2022.error.d.ts","../../../node_modules/typescript/lib/lib.es2022.intl.d.ts","../../../node_modules/typescript/lib/lib.es2022.object.d.ts","../../../node_modules/typescript/lib/lib.es2022.sharedmemory.d.ts","../../../node_modules/typescript/lib/lib.es2022.string.d.ts","../../../node_modules/typescript/lib/lib.es2022.regexp.d.ts","../../../node_modules/typescript/lib/lib.esnext.intl.d.ts","../../../node_modules/typescript/lib/lib.decorators.d.ts","../../../node_modules/typescript/lib/lib.decorators.legacy.d.ts","../../../node_modules/typescript/lib/lib.es2022.full.d.ts","../../../node_modules/tslib/tslib.d.ts","../src/lib/provider.ts","../src/lib/injector.ts","../src/lib/environment.ts","../src/lib/injectable.ts","../src/lib.ts","../../../node_modules/@types/chai/index.d.ts","../../../node_modules/@open-wc/semantic-dom-diff/get-diffable-html.d.ts","../../../node_modules/@open-wc/semantic-dom-diff/chai-dom-diff-plugin.d.ts","../../../node_modules/@open-wc/semantic-dom-diff/chai-dom-diff.d.ts","../../../node_modules/@open-wc/semantic-dom-diff/index.d.ts","../../../node_modules/chai-a11y-axe/chai-a11y-axe-plugin.d.ts","../../../node_modules/chai-a11y-axe/src/accessible.d.ts","../../../node_modules/chai-a11y-axe/index.d.ts","../../../node_modules/@types/chai-dom/index.d.ts","../../../node_modules/@sinonjs/fake-timers/types/fake-timers-src.d.ts","../../../node_modules/@types/sinon/index.d.ts","../../../node_modules/@types/sinon-chai/index.d.ts","../../../node_modules/@open-wc/testing/register-chai-plugins.d.ts","../../../node_modules/@open-wc/testing-helpers/types/src/elementUpdated.d.ts","../../../node_modules/@types/trusted-types/lib/index.d.ts","../../../node_modules/@types/trusted-types/index.d.ts","../../../node_modules/lit-html/directive.d.ts","../../../node_modules/lit-html/lit-html.d.ts","../../../node_modules/lit-html/static.d.ts","../../../node_modules/@lit/reactive-element/css-tag.d.ts","../../../node_modules/@lit/reactive-element/reactive-controller.d.ts","../../../node_modules/@lit/reactive-element/reactive-element.d.ts","../../../node_modules/lit-element/lit-element.d.ts","../../../node_modules/lit-html/is-server.d.ts","../../../node_modules/lit/index.d.ts","../../../node_modules/@open-wc/testing-helpers/types/src/renderable.d.ts","../../../node_modules/@open-wc/dedupe-mixin/index.d.ts","../../../node_modules/@open-wc/scoped-elements/types/src/types.d.ts","../../../node_modules/@open-wc/scoped-elements/types/src/ScopedElementsMixin.d.ts","../../../node_modules/@open-wc/scoped-elements/types/index.d.ts","../../../node_modules/@open-wc/testing-helpers/types/src/fixture-no-side-effect.d.ts","../../../node_modules/@open-wc/testing-helpers/types/src/fixture.d.ts","../../../node_modules/@open-wc/testing-helpers/types/src/fixtureWrapper.d.ts","../../../node_modules/@open-wc/testing-helpers/types/src/helpers.d.ts","../../../node_modules/@open-wc/testing-helpers/types/src/scopedElementsWrapper.d.ts","../../../node_modules/@open-wc/testing-helpers/types/src/litFixture.d.ts","../../../node_modules/@open-wc/testing-helpers/types/src/stringFixture.d.ts","../../../node_modules/@open-wc/testing-helpers/types/index.d.ts","../../../node_modules/@open-wc/testing/index.d.ts","../src/lib/environment.test.ts","../src/lib/injectable.test.ts","../src/lib/injector.test.ts","../typings.d.ts","../../../node_modules/@types/node/assert.d.ts","../../../node_modules/@types/node/assert/strict.d.ts","../../../node_modules/@types/node/globals.d.ts","../../../node_modules/@types/node/async_hooks.d.ts","../../../node_modules/@types/node/buffer.d.ts","../../../node_modules/@types/node/child_process.d.ts","../../../node_modules/@types/node/cluster.d.ts","../../../node_modules/@types/node/console.d.ts","../../../node_modules/@types/node/constants.d.ts","../../../node_modules/@types/node/crypto.d.ts","../../../node_modules/@types/node/dgram.d.ts","../../../node_modules/@types/node/diagnostics_channel.d.ts","../../../node_modules/@types/node/dns.d.ts","../../../node_modules/@types/node/dns/promises.d.ts","../../../node_modules/@types/node/domain.d.ts","../../../node_modules/@types/node/dom-events.d.ts","../../../node_modules/@types/node/events.d.ts","../../../node_modules/@types/node/fs.d.ts","../../../node_modules/@types/node/fs/promises.d.ts","../../../node_modules/@types/node/http.d.ts","../../../node_modules/@types/node/http2.d.ts","../../../node_modules/@types/node/https.d.ts","../../../node_modules/@types/node/inspector.d.ts","../../../node_modules/@types/node/module.d.ts","../../../node_modules/@types/node/net.d.ts","../../../node_modules/@types/node/os.d.ts","../../../node_modules/@types/node/path.d.ts","../../../node_modules/@types/node/perf_hooks.d.ts","../../../node_modules/@types/node/process.d.ts","../../../node_modules/@types/node/punycode.d.ts","../../../node_modules/@types/node/querystring.d.ts","../../../node_modules/@types/node/readline.d.ts","../../../node_modules/@types/node/readline/promises.d.ts","../../../node_modules/@types/node/repl.d.ts","../../../node_modules/@types/node/stream.d.ts","../../../node_modules/@types/node/stream/promises.d.ts","../../../node_modules/@types/node/stream/consumers.d.ts","../../../node_modules/@types/node/stream/web.d.ts","../../../node_modules/@types/node/string_decoder.d.ts","../../../node_modules/@types/node/test.d.ts","../../../node_modules/@types/node/timers.d.ts","../../../node_modules/@types/node/timers/promises.d.ts","../../../node_modules/@types/node/tls.d.ts","../../../node_modules/@types/node/trace_events.d.ts","../../../node_modules/@types/node/tty.d.ts","../../../node_modules/@types/node/url.d.ts","../../../node_modules/@types/node/util.d.ts","../../../node_modules/@types/node/v8.d.ts","../../../node_modules/@types/node/vm.d.ts","../../../node_modules/@types/node/wasi.d.ts","../../../node_modules/@types/node/worker_threads.d.ts","../../../node_modules/@types/node/zlib.d.ts","../../../node_modules/@types/node/globals.global.d.ts","../../../node_modules/@types/node/index.d.ts","../../../node_modules/@types/accepts/index.d.ts","../../../node_modules/@types/babel__code-frame/index.d.ts","../../../node_modules/@types/connect/index.d.ts","../../../node_modules/@types/body-parser/index.d.ts","../../../node_modules/@types/qs/index.d.ts","../../../node_modules/@types/co-body/index.d.ts","../../../node_modules/@types/command-line-args/index.d.ts","../../../node_modules/@types/content-disposition/index.d.ts","../../../node_modules/@types/convert-source-map/index.d.ts","../../../node_modules/@types/keygrip/index.d.ts","../../../node_modules/@types/range-parser/index.d.ts","../../../node_modules/@types/express-serve-static-core/index.d.ts","../../../node_modules/@types/mime/index.d.ts","../../../node_modules/@types/serve-static/index.d.ts","../../../node_modules/@types/express/index.d.ts","../../../node_modules/@types/cookies/index.d.ts","../../../node_modules/@types/debounce/index.d.ts","../../../node_modules/@types/estree/index.d.ts","../../../node_modules/@types/http-assert/index.d.ts","../../../node_modules/@types/http-errors/index.d.ts","../../../node_modules/@types/istanbul-lib-coverage/index.d.ts","../../../node_modules/@types/istanbul-lib-report/index.d.ts","../../../node_modules/@types/istanbul-reports/index.d.ts","../../../node_modules/@types/koa-compose/index.d.ts","../../../node_modules/@types/koa/index.d.ts","../../../node_modules/@types/mocha/index.d.ts","../../../node_modules/@types/parse5/lib/tree-adapters/default.d.ts","../../../node_modules/@types/parse5/index.d.ts","../../../node_modules/@types/resolve/index.d.ts","../../../node_modules/@types/ws/index.d.ts","../../../node_modules/@types/yauzl/index.d.ts"],"fileInfos":[{"version":"6a6b471e7e43e15ef6f8fe617a22ce4ecb0e34efa6c3dfcfe7cebd392bcca9d2","affectsGlobalScope":true},"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","dc48272d7c333ccf58034c0026162576b7d50ea0e69c3b9292f803fc20720fd5","27147504487dc1159369da4f4da8a26406364624fa9bc3db632f7d94a5bae2c3","5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4","feecb1be483ed332fad555aff858affd90a48ab19ba7272ee084704eb7167569","5514e54f17d6d74ecefedc73c504eadffdeda79c7ea205cf9febead32d45c4bc",{"version":"fcd3ecc9f764f06f4d5c467677f4f117f6abf49dee6716283aa204ff1162498b","affectsGlobalScope":true},{"version":"9a60b92bca4c1257db03b349d58e63e4868cfc0d1c8d0ba60c2dbc63f4e6c9f6","affectsGlobalScope":true},{"version":"c5c5565225fce2ede835725a92a28ece149f83542aa4866cfb10290bff7b8996","affectsGlobalScope":true},{"version":"7d2dbc2a0250400af0809b0ad5f84686e84c73526de931f84560e483eb16b03c","affectsGlobalScope":true},{"version":"f296963760430fb65b4e5d91f0ed770a91c6e77455bacf8fa23a1501654ede0e","affectsGlobalScope":true},{"version":"5114a95689b63f96b957e00216bc04baf9e1a1782aa4d8ee7e5e9acbf768e301","affectsGlobalScope":true},{"version":"4443e68b35f3332f753eacc66a04ac1d2053b8b035a0e0ac1d455392b5e243b3","affectsGlobalScope":true},{"version":"ab22100fdd0d24cfc2cc59d0a00fc8cf449830d9c4030dc54390a46bd562e929","affectsGlobalScope":true},{"version":"f7bd636ae3a4623c503359ada74510c4005df5b36de7f23e1db8a5c543fd176b","affectsGlobalScope":true},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true},{"version":"0c20f4d2358eb679e4ae8a4432bdd96c857a2960fd6800b21ec4008ec59d60ea","affectsGlobalScope":true},{"version":"36ae84ccc0633f7c0787bc6108386c8b773e95d3b052d9464a99cd9b8795fbec","affectsGlobalScope":true},{"version":"82d0d8e269b9eeac02c3bd1c9e884e85d483fcb2cd168bccd6bc54df663da031","affectsGlobalScope":true},{"version":"b8deab98702588840be73d67f02412a2d45a417a3c097b2e96f7f3a42ac483d1","affectsGlobalScope":true},{"version":"4738f2420687fd85629c9efb470793bb753709c2379e5f85bc1815d875ceadcd","affectsGlobalScope":true},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true},{"version":"376d554d042fb409cb55b5cbaf0b2b4b7e669619493c5d18d5fa8bd67273f82a","affectsGlobalScope":true},{"version":"9fc46429fbe091ac5ad2608c657201eb68b6f1b8341bd6d670047d32ed0a88fa","affectsGlobalScope":true},{"version":"61c37c1de663cf4171e1192466e52c7a382afa58da01b1dc75058f032ddf0839","affectsGlobalScope":true},{"version":"c4138a3dd7cd6cf1f363ca0f905554e8d81b45844feea17786cdf1626cb8ea06","affectsGlobalScope":true},{"version":"6ff3e2452b055d8f0ec026511c6582b55d935675af67cdb67dd1dc671e8065df","affectsGlobalScope":true},{"version":"03de17b810f426a2f47396b0b99b53a82c1b60e9cba7a7edda47f9bb077882f4","affectsGlobalScope":true},{"version":"8184c6ddf48f0c98429326b428478ecc6143c27f79b79e85740f17e6feb090f1","affectsGlobalScope":true},{"version":"261c4d2cf86ac5a89ad3fb3fafed74cbb6f2f7c1d139b0540933df567d64a6ca","affectsGlobalScope":true},{"version":"6af1425e9973f4924fca986636ac19a0cf9909a7e0d9d3009c349e6244e957b6","affectsGlobalScope":true},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true},{"version":"15a630d6817718a2ddd7088c4f83e4673fde19fa992d2eae2cf51132a302a5d3","affectsGlobalScope":true},{"version":"b7e9f95a7387e3f66be0ed6db43600c49cec33a3900437ce2fd350d9b7cb16f2","affectsGlobalScope":true},{"version":"01e0ee7e1f661acedb08b51f8a9b7d7f959e9cdb6441360f06522cc3aea1bf2e","affectsGlobalScope":true},{"version":"ac17a97f816d53d9dd79b0d235e1c0ed54a8cc6a0677e9a3d61efb480b2a3e4e","affectsGlobalScope":true},{"version":"bf14a426dbbf1022d11bd08d6b8e709a2e9d246f0c6c1032f3b2edb9a902adbe","affectsGlobalScope":true},{"version":"ec0104fee478075cb5171e5f4e3f23add8e02d845ae0165bfa3f1099241fa2aa","affectsGlobalScope":true},{"version":"2b72d528b2e2fe3c57889ca7baef5e13a56c957b946906d03767c642f386bbc3","affectsGlobalScope":true},{"version":"9cc66b0513ad41cb5f5372cca86ef83a0d37d1c1017580b7dace3ea5661836df","affectsGlobalScope":true},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true},{"version":"709efdae0cb5df5f49376cde61daacc95cdd44ae4671da13a540da5088bf3f30","affectsGlobalScope":true},{"version":"995c005ab91a498455ea8dfb63aa9f83fa2ea793c3d8aa344be4a1678d06d399","affectsGlobalScope":true},{"version":"61ed9b6d07af959e745fb11f9593ecd743b279418cc8a99448ea3cd5f3b3eb22","affectsGlobalScope":true},{"version":"038a2f66a34ee7a9c2fbc3584c8ab43dff2995f8c68e3f566f4c300d2175e31e","affectsGlobalScope":true},{"version":"4fa6ed14e98aa80b91f61b9805c653ee82af3502dc21c9da5268d3857772ca05","affectsGlobalScope":true},{"version":"f5c92f2c27b06c1a41b88f6db8299205aee52c2a2943f7ed29bd585977f254e8","affectsGlobalScope":true},{"version":"b7feb7967c6c6003e11f49efa8f5de989484e0a6ba2e5a6c41b55f8b8bd85dba","affectsGlobalScope":true},{"version":"8444af78980e3b20b49324f4a16ba35024fef3ee069a0eb67616ea6ca821c47a","affectsGlobalScope":true},{"version":"b9ea5778ff8b50d7c04c9890170db34c26a5358cccba36844fe319f50a43a61a","affectsGlobalScope":true},{"version":"3287d9d085fbd618c3971944b65b4be57859f5415f495b33a6adc994edd2f004","affectsGlobalScope":true},{"version":"50d53ccd31f6667aff66e3d62adf948879a3a16f05d89882d1188084ee415bbc","affectsGlobalScope":true},{"version":"307c8b7ebbd7f23a92b73a4c6c0a697beca05b06b036c23a34553e5fe65e4fdc","affectsGlobalScope":true},{"version":"189c0703923150aa30673fa3de411346d727cc44a11c75d05d7cf9ef095daa22","affectsGlobalScope":true},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true},"1df2366de6650547b3dc1d7c4147355c0f6b4729c964e3839636fa418982d131","f1c9fe42b65437a61104e601eb298c5c859fb522b483f1bdb700eed67a16f980",{"version":"6dc1263aa5c18b17c95214a7cefce004f0477c82c24429b38a216c714063385c","signature":"b4614f8f260483399e24b7d1f2f271cf03a3d452b907774cc00a8d36210e0c21"},{"version":"83b57e03c8a26fbdae50f8b0ea779f35ee040ca9d99a4253430e267fcc769678","signature":"01cda5d9cc5e5488c2361950d091929065d0f09d0ed7100d3259d13963910751"},{"version":"b435fd56b9ae1223043094b0b2ed3c2ce738c5db807752b6d01ee1be0600f5c2","signature":"778172c20e843724317d2c18da4b8f465069a97b9ddeae374ceafe391de48387"},{"version":"a02c85a290c4985308fce93aaa2b88b896eeb12c6ba79e51b741ea8dc3f5e620","signature":"fd56568da29972fb6ad487af814c75f6492acc628e743509fca09a733296aa15"},"009bc62f4269bfac6cf04778b8d8a2693c5ecfd088a746f5db2fc66dc6fd75b2",{"version":"3a15910b7f45dfc393f010ee8f913580b08d65752800fc48147ea13445acd5f7","affectsGlobalScope":true},"72bee526b949b9932edba50997ff3b9cdede7b314d790d5f0d94f3d2944930ea",{"version":"75cd6dce1c5f87511772c891de86d0c9e6829e6273dea9f92a5bec9d0479d1e7","affectsGlobalScope":true},{"version":"cd711db43a952f15464b571ac11b7a440332cd52342bc92c4bf908c70688f57f","affectsGlobalScope":true},"9d8709c916778cb34830708ed47b78e9a46d1fb2eb73a682b14eee990bed4aa6",{"version":"5d90911f942229eb9049feab241739a5ced76f137948f8f42a615e5f01d4e7ea","affectsGlobalScope":true},"999a90d30a3183dcee987d0a5a7c586aba5bacbf6ce087ba8635124082ccfeea","8a5878edd52f4a720560b4c6e6247e9ddc3df6118ad9cf2f9927903b03d5f440",{"version":"4cdd1b520504f86d680470dc91baa79d625fa20e1f9dc1f99eba242eae9fada4","affectsGlobalScope":true},"6b40029289530423f407a22755c85b81740f9acfd88d2b53564f8c1657c26660","50a5b297e6c91df4f6068d98467a5e7ba4eeb888b9376757734dd4b1dfcdacd4",{"version":"b644a9e5433c651fb751aeb6e06f24dfa5604950d948622dcd2980b782bb1f50","affectsGlobalScope":true},"65b91a3725399231d3469529b5e27b85bf2aa98013e607f308e5fe260b47eeff","04e3793f33c71ceae20a4719698c068b72c98cf925b3c5f8a33096c00ed44258","2fcd2d22b1f30555e785105597cd8f57ed50300e213c4f1bbca6ae149f782c38",{"version":"3c150a2e1758724811db3bdc5c773421819343b1627714e09f29b1f40a5dfb26","affectsGlobalScope":true},"7000ec8572390d035ba5ef993953957150d0c38ffb31b56653c97dd78cb6e1aa","5a4af5e4727864a08625d5c892d7cba8916d205c7f0c68e15eda5d6579968497","bbc354c6a2740b087f1139e88e90309de480c5390362e2f0d32a145d8d7cf539","e59262ddaae67dec2d226f8a5d05cf6c4dc353c0d9b1e4980a61d7fcf9a2b051","5e30131b6a5587fe666926ad1d9807e733c0a597ed12d682669fcaa331aea576","d27ead0e913b4225279e8beb10450ecaf54af5ed145a6ecbbed18bb130815006","4ddf3962990379d1ea59b369a5516c7533b7944010d6998e0e9b1ab35d5af1f0","1bcd560deed90a43c51b08aa18f7f55229f2e30974ab5ed1b7bb5721be379013","dc08fe04e50bc24d1baded4f33e942222bbdd5d77d6341a93cfe6e4e4586a3be","605e0f5adf8993110c06c775e2a59b7774d1e7a99fc9657140380bab005063bc","88cda4269c54f0803834fd62b2fac61af8bff7a085693f7ca9df85c1f19dee8a",{"version":"d40075d9f1c08b4a8d8e468076f5258900e99895e7259c40f3923b7044bbed6c","affectsGlobalScope":true},"47a20e497d83cd84ad0aa5363200003f08f850fa819339044e03399941eef063","ade0d37a4c1d1abede2abf2591b7cc6347892ea53d4a39bf44a25fb6f707822f","eefa12914a21dafe4352e79866599498b73b3bd232d19854932f58ef36303fb0","d7840fd94e6dfb5b0d9df5a20fe1e79c8dd72b1efdb74d2ef04c31e3588c6b5b","fa6d684e15fe6e99c7208a51b45c04f8e0147f1c8587871aac48fff55b7b1f24","26a3d4bf5351a0034f4203d42946ef5308b22919ba2f26a3ecb976a17c714d83","735eca4958f164c1121f08f9de89352e6f75a56c1533ceefeae075c085799618","d5b69429138b2fb26076427c630064a71c12959263ec3d92cbec54baf89354e1","793fca6322a14fa8fa6bc6a4fc694fd7bcc88922c4f9abcd48bf6908f8bf939b","0b2b7cb8164fcc6f4a71c1bf47c2cd4828c867f0ec19d178bb20954348de9a30","e5fefd2fe7d4d459dadbc1384a3643fb7598e5f41ea97a411c0155447d9f71e5",{"version":"d23ae90a3f21462f9850e040ac3214b25655c02c521e8f1906ed78cd342947ff","signature":"8e609bb71c20b858c77f0e9f90bb1319db8477b13f9f965f1a1e18524bf50881"},{"version":"95d7e79d194045bb2fd05b806458d06a851bbbd0c42dc2424e8154ea70254426","signature":"8e609bb71c20b858c77f0e9f90bb1319db8477b13f9f965f1a1e18524bf50881"},{"version":"286d36b01d4bcbcf297148fc8f85084a400ba2d2b437dd57a0e1b6c1e331985c","signature":"8e609bb71c20b858c77f0e9f90bb1319db8477b13f9f965f1a1e18524bf50881"},{"version":"741351edfd1ed1d70e96cf4219b75797459201efe6f21802f13f2a5598d74859","affectsGlobalScope":true},"66a6e7b6e32eea099615d627028ed0d681679e31237df03e68e1b912e3e61da0","a69c09dbea52352f479d3e7ac949fde3d17b195abe90b045d619f747b38d6d1a",{"version":"f749812878fecfa53cfc13b36e5d35086fb6377983a9df44175da83ccc23af1f","affectsGlobalScope":true},"fd536fe411f46ae62c4729e342a3494adbdd54335e41039c238170c9781da9ff",{"version":"772ff00e189d93488d1ca6f0f4dfba77bd090a99ed31e19a14bc16fad4078e48","affectsGlobalScope":true},"d9b1fa0da9fbff85402c3ee794bcfe6d7cfef2fa053761b7d83989cdb7f9b26d","ac0c7cb0a4c1bec60be2c0460b3bda1e674eaf2c98312d7b6f16a0bb58718e2d",{"version":"7e2181a6fc140b4525d5a45c204477c37fa78a635558e88552c68f76a4325403","affectsGlobalScope":true},"82408ed3e959ddc60d3e9904481b5a8dc16469928257af22a3f7d1a3bc7fd8c4","6a6bfa45d3ed96dea1ad653444fb26ddaa9245d2e2d6ddaab050cb9a2c0936d7","276b547eeb8eeeee9a446a3bfa6e07d1c0199269bdcf33813abab1281394a9cb","c999f7816955f75b447823e3e4085f699600e2a4a3327907df9af65b0a9c0df6","958df89fdcf5555cdfd57a14037e05505048dd29c59e8009bea279b65523b241","ffa8324a4c0611f9a50262fb36f097eeabe0fa0d71755aa67156da13cde1b932","9b814e0806922056145bedb096f11b73bdce70cc871f3ccfc4ce00b2cba75718",{"version":"6b526a5ec4a401ca7c26cfe6a48e641d8f30af76673bad3b06a1b4504594a960","affectsGlobalScope":true},{"version":"be3d24f3fd8c85fedd91485b207d180f14ac2602805b52f6a33462ada14c27b0","affectsGlobalScope":true},"e58cfbe7db26c2077027662ef6c87a3cf9d721717e77ecaa98c4d8d7911b3299","2ad6a251b6ef19fd1f8498f83bb7b265033bd52287e1f6569d09544f18806713","bfa08f2c30c475aef1c9451855ba6b2acfdc64f61950a38fae75806d66fb85c2","159807eb55a9439f9a675bd493788190a6203b5f36c315f8c3acbfcb875c7072","fe31b2b31ac5453fc7b8eef32b62017e55b214ceb884f0b177f442af92e84682","dd72576c8ea64d55af46a386068503d3cfcecce84ed7e1cbd4ff4081ba67fafc",{"version":"125af9d85cb9d5e508353f10a8d52f01652d2d48b2cea54789a33e5b4d289c1c","affectsGlobalScope":true},"70a7e8a7880d55396285e4b85ff5bdf3af3083176abe07f944967836f2a43188","3570df7c6f3a976109f55b596a2d88c2f87e0574cd1502272594ee5c4e56d0ef","850e95721334c2aa7697b08782f443ec4286274e5024169d4443933544f359d7",{"version":"74e6cd21f7b5e29fab05060ea24e2b90aa254f16f3f62ccd7055bdb8fc7b2ff5","affectsGlobalScope":true},{"version":"5761c90b0cabdd6bd1f5fb1c3bf942088fdd39e18ed35dbe39b0c34bc733bf13","affectsGlobalScope":true},"1eb6c5569d41e6021832d0a8a71f45fecbc13d03ad7d306da485999148b64955","c05ef0ecf06540ad3039515c10d3b27f9380639ced40f4093fd073e1b5ff21d9","c774096c5935712de41c763e3c08a04b7a788a85fb07a0c2df23fb5ace3bc610","2b847f2aba41dcd69677684d5d300c08aea4e306c305fd39bf548cef19f03cfe","f4c0cbc93eb51fd61e07a86111739770dd524f6297bd83266ff004aec553e085","9a134dbb29f0af914d90b23f609b39019d66ed53db7d492ab6b04c67114559da","1b952304137851e45bc009785de89ada562d9376177c97e37702e39e60c2f1ff","785e5be57d4f20f290a20e7b0c6263f6c57fd6e51283050756cef07d6d651c68","44b8b584a338b190a59f4f6929d072431950c7bd92ec2694821c11bce180c8a5","7b3781fbdfddbee8dba55ccee5aa74a7c8d6701ade11d49ab7d8cb1fcefe669e","c4aab2ec3a249f2a4caa9cbdb099752a80daf999b79d85aa3504cdfd6e559476",{"version":"2cff47e15621f3055af1df1547426f833c9d0a571750c4f0659836f45c50fe0a","affectsGlobalScope":true},"ad08154d9602429522cac965a715fde27d421d69b24756c5d291877dda75353e","c764a6cf523d13f2304a23216cd1084e28c041eebabd8aa9b2a9d99866c668c0","1272a5c2bd05961adc473e905332b7a422b00485c10b41c752f7fcf6835e3436","30ef92bf8135ce36ba1231fe41715276f2a40be72a478ddeb862bc16672e8680",{"version":"4ace0a30a70fe5963442d75ea6e69f525671ae76f6e57ab7556c44839b4237e8","affectsGlobalScope":true},{"version":"a6f03dbf03c001fb3ac1c9bea6dde049dfff27ef8886cc4a886374aacf2e997d","affectsGlobalScope":true},"66bfb3de947abf4b117ee849c245425dbe494d6903e28f9ded566e91c9d05d77","c28d4f58131b93d60e087b86148d4e0c9d9b5c49c23ff1a9d1a9594fdedd5d08","c6b5d7f259544c91024ecf2b17138574a3f6ff2476468fafd7f957d2b68d6d98",{"version":"1ec27c4b695590464113276d174f873e260e468ef226b7dc18f9193875fa559d","affectsGlobalScope":true},"33da4ee2ab9fdd9ef8b3fc526d871ce02ae8c825283f5695e7cad507c087b97c",{"version":"ab9b9a36e5284fd8d3bf2f7d5fcbc60052f25f27e4d20954782099282c60d23e","affectsGlobalScope":true},"71709584ed5ed7d236dc225441ec4634ffc6c718853e04b9c27b9ea121459044","6738101ae8e56cd3879ab3f99630ada7d78097fc9fd334df7e766216778ca219","b95f751a58d283cb5e32f2655361f6e2a27f0368f69edc463a3472aae21d1303","6d829824ead8999f87b6df21200df3c6150391b894b4e80662caa462bd48d073","afc559c1b93df37c25aef6b3dfa2d64325b0e112e887ee18bf7e6f4ec383fc90","ba601641fac98c229ccd4a303f747de376d761babb33229bb7153bed9356c9cc","495da6628b9474e31d0636d66c54448bb8d84dbce902e8f70539ef6a525a2d7b","629766229f541d92210f30a92b6038568ec165fab14b7ee53bdf13667da37ca3","204dbe6c72467fb14bbe8f06510b11fb541b6ce29580c6e10ebd3bdb2eb0c1f9","c1ea344dc311b2c539ed1e3b4e17e9f4853dc7f348366b51f1d8a09a40fb223f","ce013414484233b24f42c0fcfca48a60bb66ab4e13c82953662305e8f1ee4925","16d51f964ec125ad2024cf03f0af444b3bc3ec3614d9345cc54d09bab45c9a4c",{"version":"101eb8b4e972b9326f39591e2e40e967e3331e8d960f81248daeb266ea1affec","affectsGlobalScope":true},"84e3bbd6f80983d468260fdbfeeb431cc81f7ea98d284d836e4d168e36875e86","0b85cb069d0e427ba946e5eb2d86ef65ffd19867042810516d16919f6c1a5aec","15c88bfd1b8dc7231ff828ae8df5d955bae5ebca4cf2bcb417af5821e52299ae","eb96a2321f717bccc3e49e104e299152984b927ea4546b559ae631c06565819c","68c559681a043ca6d622debcce75c4d82446fec08e06bf1066f71d6c325f224e","bee89e1eb6425eb49894f3f25e4562dc2564e84e5aa7610b7e13d8ecddf8f5db","e98185f4249720ace1921d59c1ff4612fa5c633a183fc9bf28e2e7b8e3c7fd51","6168414aa12d33d0fcfac4f9870aa81ce27e136db6faf182001a5f3792e1d720","de18acda71730bac52f4b256ce7511bb56cc21f6f114c59c46782eff2f632857","7eb06594824ada538b1d8b48c3925a83e7db792f47a081a62cf3e5c4e23cf0ee","f5638f7c2f12a9a1a57b5c41b3c1ea7db3876c003bab68e6a57afd6bcc169af0","5006668996956580886022c05108e32c742823e1b5652aff7914917233731518","0c52f5366c9146ad79b546e70162c659972a2798522806e8283f3137feab3965",{"version":"677646e2620795c98a539fb12fb531f10331c217cef1492132b2518f894fa92d","affectsGlobalScope":true},"fc37aca06f6b8b296c42412a2e75ab53d30cd1fa8a340a3bb328a723fd678377","5f2c582b9ef260cb9559a64221b38606378c1fabe17694592cdfe5975a6d7efa","8baa5d0febc68db886c40bf341e5c90dc215a90cd64552e47e8184be6b7e3358","bc81aff061c53a7140270555f4b22da4ecfe8601e8027cf5aa175fbdc7927c31","65dfa4bc49ccd1355789abb6ae215b302a5b050fdee9651124fe7e826f33113c"],"root":[[63,67],[107,110]],"options":{"declaration":true,"esModuleInterop":true,"importHelpers":true,"module":99,"noFallthroughCasesInSwitch":true,"noImplicitReturns":true,"noUnusedLocals":true,"noUnusedParameters":true,"outDir":"./","sourceMap":true,"strict":true,"target":9},"fileIdsList":[[157],[87,88,157],[96,157],[89,94,95,157],[89,94,157],[68,69,157],[70,157],[69,71,157],[81,86,99,100,101,103,104,157],[93,97,157],[98,157],[94,157],[93,98,102,157],[92,157],[93,157],[68,80,105,157],[72,75,76,79,157],[130,157,164],[130,157,164,167],[68,157],[130,157,164,169],[130,157,164,167,174,179],[127,130,157,164,169,175],[157,168,169,176,178],[157,185],[157,186],[157,189],[127,130,131,135,141,156,157,164,165,172,174,180,183,184,188],[111,157],[114,157],[115,120,148,157],[116,127,128,135,145,156,157],[116,117,127,135,157],[118,157],[119,120,128,136,157],[120,145,153,157],[121,123,127,135,157],[122,157],[123,124,157],[127,157],[125,127,157],[127,128,129,145,156,157],[127,128,129,142,145,148,157],[157,161],[123,127,130,135,145,156,157],[127,128,130,131,135,145,153,156,157],[130,132,145,153,156,157],[111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163],[127,133,157],[134,156,157],[123,127,135,145,157],[136,157],[137,157],[114,138,157],[139,155,157,161],[140,157],[141,157],[127,142,143,157],[142,144,157,159],[115,127,145,146,147,148,157],[115,145,147,157],[145,146,157],[148,157],[149,157],[145,157],[127,151,152,157],[151,152,157],[120,135,145,153,157],[154,157],[135,155,157],[115,130,141,156,157],[120,157],[145,157,158],[157,159],[157,160],[115,120,127,129,138,145,156,157,159,161],[145,157,162],[157,191],[157,192],[130,157,164,177],[68,78,157],[77,157],[82,157],[127,130,132,135,145,153,156,157,162,164],[127,145,157,164],[74,157],[73,157],[85,89,157],[85,157],[83,84,157],[85,89,90,91,157],[62,63,64,65,66,157],[62,64,65,66,106,157],[62,64,157],[62,64,66,106,157],[62,63,64,65,157],[62,64,106,157],[62,63,157],[62,157],[64],[63,64],[63]],"referencedMap":[[87,1],[88,1],[89,2],[94,1],[97,3],[96,4],[95,5],[70,6],[71,7],[69,1],[72,8],[105,9],[81,1],[98,10],[99,11],[100,1],[101,12],[103,13],[93,14],[102,15],[104,11],[106,16],[80,17],[77,1],[165,18],[166,1],[168,19],[76,20],[68,1],[170,21],[171,1],[167,18],[172,1],[173,1],[180,22],[181,1],[182,1],[176,23],[179,24],[183,1],[184,1],[185,1],[186,25],[187,26],[174,1],[188,27],[189,28],[177,1],[190,1],[111,29],[112,29],[114,30],[115,31],[116,32],[117,33],[118,34],[119,35],[120,36],[121,37],[122,38],[123,39],[124,39],[126,40],[125,41],[127,40],[128,42],[129,43],[113,44],[163,1],[130,45],[131,46],[132,47],[164,48],[133,49],[134,50],[135,51],[136,52],[137,53],[138,54],[139,55],[140,56],[141,57],[142,58],[143,58],[144,59],[145,60],[147,61],[146,62],[148,63],[149,64],[150,65],[151,66],[152,67],[153,68],[154,69],[155,70],[156,71],[157,72],[158,73],[159,74],[160,75],[161,76],[162,77],[192,78],[191,79],[169,1],[175,1],[193,1],[178,80],[79,81],[78,82],[83,83],[82,1],[194,84],[195,85],[73,20],[75,86],[74,87],[90,88],[84,89],[91,1],[85,90],[86,89],[92,91],[62,1],[59,1],[60,1],[10,1],[11,1],[15,1],[14,1],[2,1],[16,1],[17,1],[18,1],[19,1],[20,1],[21,1],[22,1],[23,1],[3,1],[4,1],[27,1],[24,1],[25,1],[26,1],[28,1],[29,1],[30,1],[5,1],[31,1],[32,1],[33,1],[34,1],[6,1],[38,1],[35,1],[36,1],[37,1],[39,1],[7,1],[40,1],[45,1],[46,1],[41,1],[42,1],[43,1],[44,1],[8,1],[50,1],[47,1],[48,1],[49,1],[51,1],[9,1],[52,1],[61,1],[53,1],[54,1],[57,1],[55,1],[56,1],[1,1],[58,1],[13,1],[12,1],[67,92],[107,93],[65,94],[108,95],[66,96],[109,97],[64,98],[63,99],[110,1]],"exportedModulesMap":[[87,1],[88,1],[89,2],[94,1],[97,3],[96,4],[95,5],[70,6],[71,7],[69,1],[72,8],[105,9],[81,1],[98,10],[99,11],[100,1],[101,12],[103,13],[93,14],[102,15],[104,11],[106,16],[80,17],[77,1],[165,18],[166,1],[168,19],[76,20],[68,1],[170,21],[171,1],[167,18],[172,1],[173,1],[180,22],[181,1],[182,1],[176,23],[179,24],[183,1],[184,1],[185,1],[186,25],[187,26],[174,1],[188,27],[189,28],[177,1],[190,1],[111,29],[112,29],[114,30],[115,31],[116,32],[117,33],[118,34],[119,35],[120,36],[121,37],[122,38],[123,39],[124,39],[126,40],[125,41],[127,40],[128,42],[129,43],[113,44],[163,1],[130,45],[131,46],[132,47],[164,48],[133,49],[134,50],[135,51],[136,52],[137,53],[138,54],[139,55],[140,56],[141,57],[142,58],[143,58],[144,59],[145,60],[147,61],[146,62],[148,63],[149,64],[150,65],[151,66],[152,67],[153,68],[154,69],[155,70],[156,71],[157,72],[158,73],[159,74],[160,75],[161,76],[162,77],[192,78],[191,79],[169,1],[175,1],[193,1],[178,80],[79,81],[78,82],[83,83],[82,1],[194,84],[195,85],[73,20],[75,86],[74,87],[90,88],[84,89],[91,1],[85,90],[86,89],[92,91],[62,1],[59,1],[60,1],[10,1],[11,1],[15,1],[14,1],[2,1],[16,1],[17,1],[18,1],[19,1],[20,1],[21,1],[22,1],[23,1],[3,1],[4,1],[27,1],[24,1],[25,1],[26,1],[28,1],[29,1],[30,1],[5,1],[31,1],[32,1],[33,1],[34,1],[6,1],[38,1],[35,1],[36,1],[37,1],[39,1],[7,1],[40,1],[45,1],[46,1],[41,1],[42,1],[43,1],[44,1],[8,1],[50,1],[47,1],[48,1],[49,1],[51,1],[9,1],[52,1],[61,1],[53,1],[54,1],[57,1],[55,1],[56,1],[1,1],[58,1],[13,1],[12,1],[67,92],[65,100],[66,101],[64,102],[110,1]],"semanticDiagnosticsPerFile":[87,88,89,94,97,96,95,70,71,69,72,105,81,98,99,100,101,103,93,102,104,106,80,77,165,166,168,76,68,170,171,167,172,173,180,181,182,176,179,183,184,185,186,187,174,188,189,177,190,111,112,114,115,116,117,118,119,120,121,122,123,124,126,125,127,128,129,113,163,130,131,132,164,133,134,135,136,137,138,139,140,141,142,143,144,145,147,146,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,192,191,169,175,193,178,79,78,83,82,194,195,73,75,74,90,84,91,85,86,92,62,59,60,10,11,15,14,2,16,17,18,19,20,21,22,23,3,4,27,24,25,26,28,29,30,5,31,32,33,34,6,38,35,36,37,39,7,40,45,46,41,42,43,44,8,50,47,48,49,51,9,52,61,53,54,57,55,56,1,58,13,12,67,107,65,108,66,109,64,63,110]},"version":"5.0.4"}