@yume-chan/adb-daemon-webusb 0.0.21 → 0.0.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.json +30 -0
- package/CHANGELOG.md +17 -1
- package/README.md +46 -130
- package/esm/device.d.ts +5 -2
- package/esm/device.d.ts.map +1 -1
- package/esm/device.js +86 -51
- package/esm/device.js.map +1 -1
- package/esm/manager.d.ts +7 -1
- package/esm/manager.d.ts.map +1 -1
- package/esm/manager.js +9 -8
- package/esm/manager.js.map +1 -1
- package/esm/utils.d.ts +1 -0
- package/esm/utils.d.ts.map +1 -1
- package/esm/utils.js +9 -0
- package/esm/utils.js.map +1 -1
- package/package.json +9 -9
- package/src/device.ts +114 -69
- package/src/manager.ts +25 -8
- package/src/utils.ts +12 -0
- package/tsconfig.build.tsbuildinfo +1 -1
package/CHANGELOG.json
CHANGED
|
@@ -1,6 +1,36 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yume-chan/adb-daemon-webusb",
|
|
3
3
|
"entries": [
|
|
4
|
+
{
|
|
5
|
+
"version": "0.0.23",
|
|
6
|
+
"tag": "@yume-chan/adb-daemon-webusb_v0.0.23",
|
|
7
|
+
"date": "Thu, 21 Mar 2024 03:15:10 GMT",
|
|
8
|
+
"comments": {
|
|
9
|
+
"none": [
|
|
10
|
+
{
|
|
11
|
+
"comment": "Fix `AdbDaemonWebUsbDeviceManager.getDevices` doesn't match auto-generated serial number against `filters.serialNumber` (if the device doesn't have a serial number)"
|
|
12
|
+
}
|
|
13
|
+
]
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"version": "0.0.22",
|
|
18
|
+
"tag": "@yume-chan/adb-daemon-webusb_v0.0.22",
|
|
19
|
+
"date": "Wed, 13 Dec 2023 05:57:27 GMT",
|
|
20
|
+
"comments": {
|
|
21
|
+
"none": [
|
|
22
|
+
{
|
|
23
|
+
"comment": "Check incoming packet size to prevent Chrome from crashing"
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"comment": "Add `exclusionFilters` option to `AdbDaemonWebUsbDeviceManager#requestDevice` method"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"comment": "`AdbDaemonWebUsbDevice` will generate a fake serial number from vid and pid if the device serial number is empty"
|
|
30
|
+
}
|
|
31
|
+
]
|
|
32
|
+
}
|
|
33
|
+
},
|
|
4
34
|
{
|
|
5
35
|
"version": "0.0.21",
|
|
6
36
|
"tag": "@yume-chan/adb-daemon-webusb_v0.0.21",
|
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,22 @@
|
|
|
1
1
|
# Change Log - @yume-chan/adb-daemon-webusb
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Thu, 21 Mar 2024 03:15:10 GMT and should not be manually modified.
|
|
4
|
+
|
|
5
|
+
## 0.0.23
|
|
6
|
+
Thu, 21 Mar 2024 03:15:10 GMT
|
|
7
|
+
|
|
8
|
+
### Updates
|
|
9
|
+
|
|
10
|
+
- Fix `AdbDaemonWebUsbDeviceManager.getDevices` doesn't match auto-generated serial number against `filters.serialNumber` (if the device doesn't have a serial number)
|
|
11
|
+
|
|
12
|
+
## 0.0.22
|
|
13
|
+
Wed, 13 Dec 2023 05:57:27 GMT
|
|
14
|
+
|
|
15
|
+
### Updates
|
|
16
|
+
|
|
17
|
+
- Check incoming packet size to prevent Chrome from crashing
|
|
18
|
+
- Add `exclusionFilters` option to `AdbDaemonWebUsbDeviceManager#requestDevice` method
|
|
19
|
+
- `AdbDaemonWebUsbDevice` will generate a fake serial number from vid and pid if the device serial number is empty
|
|
4
20
|
|
|
5
21
|
## 0.0.21
|
|
6
22
|
Fri, 25 Aug 2023 14:05:18 GMT
|
package/README.md
CHANGED
|
@@ -1,130 +1,46 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
Create a new instance of `AdbDaemonWebUsbDevice` using a specified `USBDevice` instance.
|
|
49
|
-
|
|
50
|
-
`USBDevice` and `USB` types are from WebUSB API.
|
|
51
|
-
|
|
52
|
-
The `filters` parameter specifies the `classCode`, `subclassCode` and `protocolCode` to use when searching for ADB interface. The default value is `[{ classCode: 0xff, subclassCode: 0x42, protocolCode: 0x1 }]`, defined by Google.
|
|
53
|
-
|
|
54
|
-
### `raw`
|
|
55
|
-
|
|
56
|
-
```ts
|
|
57
|
-
public get raw(): USBDevice;
|
|
58
|
-
```
|
|
59
|
-
|
|
60
|
-
Gets the raw `USBDevice` from the device. Allow sending/receiving USB packets to other interfaces/endpoints. For example can be used with `@yume-chan/aoa` package.
|
|
61
|
-
|
|
62
|
-
### `connect`
|
|
63
|
-
|
|
64
|
-
```ts
|
|
65
|
-
public async connect(): Promise<
|
|
66
|
-
ReadableWritablePair<AdbPacketData, Consumable<AdbPacketInit>>
|
|
67
|
-
>
|
|
68
|
-
```
|
|
69
|
-
|
|
70
|
-
Claim the device and create a pair of `AdbPacket` streams to the ADB interface.
|
|
71
|
-
|
|
72
|
-
## `AdbDaemonWebUsbDeviceManager`
|
|
73
|
-
|
|
74
|
-
A helper class that wraps the WebUSB API.
|
|
75
|
-
|
|
76
|
-
### `BROWSER`
|
|
77
|
-
|
|
78
|
-
```ts
|
|
79
|
-
public static readonly BROWSER: AdbDaemonWebUsbDeviceManager | undefined;
|
|
80
|
-
```
|
|
81
|
-
|
|
82
|
-
Gets the instance of `AdbDaemonWebUsbDeviceManager` using browser WebUSB implementation.
|
|
83
|
-
|
|
84
|
-
May be `undefined` if the browser does not support WebUSB.
|
|
85
|
-
|
|
86
|
-
### constructor
|
|
87
|
-
|
|
88
|
-
```ts
|
|
89
|
-
public constructor(usbManager: USB);
|
|
90
|
-
```
|
|
91
|
-
|
|
92
|
-
Create a new instance of `AdbDaemonWebUsbDeviceManager` using the specified WebUSB API implementation.
|
|
93
|
-
|
|
94
|
-
### `requestDevice`
|
|
95
|
-
|
|
96
|
-
```ts
|
|
97
|
-
public async requestDevice(
|
|
98
|
-
filters: AdbDeviceFilter[] = [ADB_DEFAULT_DEVICE_FILTER]
|
|
99
|
-
): Promise<AdbDaemonWebUsbDevice | undefined>
|
|
100
|
-
```
|
|
101
|
-
|
|
102
|
-
Request access to a connected device.
|
|
103
|
-
This is a convince method for `usb.requestDevice()`.
|
|
104
|
-
|
|
105
|
-
The `filters` parameter must have `classCode`, `subclassCode` and `protocolCode` fields for selecting the ADB interface. It can also have `vendorId`, `productId` or `serialNumber` fields to limit the displayed device list.
|
|
106
|
-
|
|
107
|
-
Returns an `AdbDaemonWebUsbDevice` instance, or `undefined` if the user cancelled the picker.
|
|
108
|
-
|
|
109
|
-
### `getDevices`
|
|
110
|
-
|
|
111
|
-
```ts
|
|
112
|
-
public async getDevices(
|
|
113
|
-
filters: AdbDeviceFilter[] = [ADB_DEFAULT_DEVICE_FILTER]
|
|
114
|
-
): Promise<AdbDaemonWebUsbDevice[]>
|
|
115
|
-
```
|
|
116
|
-
|
|
117
|
-
Get all connected and authenticated devices.
|
|
118
|
-
|
|
119
|
-
This is a convince method for `usb.getDevices()`.
|
|
120
|
-
|
|
121
|
-
## Note on secure context
|
|
122
|
-
|
|
123
|
-
WebUSB requires a [secure context](https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts) (HTTPS).
|
|
124
|
-
|
|
125
|
-
`localhost` is considered secure, so local development works. But to access a self-hosted server running on another machine, either add a certificate, or add the domain name to the allowlist on each client machine:
|
|
126
|
-
|
|
127
|
-
1. Open `chrome://flags/#unsafely-treat-insecure-origin-as-secure`
|
|
128
|
-
2. Add the protocol and domain part of your url (e.g. `http://192.168.0.100:9000`) to the input box
|
|
129
|
-
3. Choose `Enable` from the dropdown menu
|
|
130
|
-
4. Restart browser
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img alt="Tango" src="https://raw.githubusercontent.com/yume-chan/ya-webadb/main/.github/logo.svg" width="200">
|
|
3
|
+
</p>
|
|
4
|
+
|
|
5
|
+
<h1 align="center">@yume-chan/adb-daemon-webusb</h1>
|
|
6
|
+
|
|
7
|
+
<p align="center">
|
|
8
|
+
Adb daemon transport connection for `@yume-chan/adb` using WebUSB API.
|
|
9
|
+
</p>
|
|
10
|
+
|
|
11
|
+
<p align="center">
|
|
12
|
+
<a href="https://github.com/yume-chan/ya-webadb/blob/main/LICENSE">
|
|
13
|
+
<img alt="MIT License" src="https://img.shields.io/github/license/yume-chan/ya-webadb">
|
|
14
|
+
</a>
|
|
15
|
+
<a href="https://github.com/yume-chan/ya-webadb/releases">
|
|
16
|
+
<img alt="GitHub release" src="https://img.shields.io/github/v/release/yume-chan/ya-webadb?logo=github">
|
|
17
|
+
</a>
|
|
18
|
+
<a href="https://www.npmjs.com/package/@yume-chan/adb">
|
|
19
|
+
<img alt="npm" src="https://img.shields.io/npm/dm/%40yume-chan/adb?logo=npm">
|
|
20
|
+
</a>
|
|
21
|
+
<a href="https://discord.gg/26k3ttC2PN">
|
|
22
|
+
<img alt="Discord" src="https://img.shields.io/discord/1120215514732564502?logo=discord&logoColor=%23ffffff&label=Discord">
|
|
23
|
+
</a>
|
|
24
|
+
</p>
|
|
25
|
+
|
|
26
|
+
This package is part of [Tango ADB](https://github.com/yume-chan/ya-webadb). Generally you need multiple packages to build a complete ADB client that can run on Web browsers and Node.js. Read the documentation for more information.
|
|
27
|
+
|
|
28
|
+
## Documentation
|
|
29
|
+
|
|
30
|
+
Check the latest documentation at https://tango-adb.github.io/docs/
|
|
31
|
+
|
|
32
|
+
## Sponsors
|
|
33
|
+
|
|
34
|
+
[Become a backer](https://opencollective.com/ya-webadb) and get your image on our README on Github with a link to your site.
|
|
35
|
+
|
|
36
|
+
<a href="https://opencollective.com/ya-webadb/backer/0/website?requireActive=false" target="_blank"><img src="https://opencollective.com/ya-webadb/backer/0/avatar.svg?requireActive=false"></a>
|
|
37
|
+
<a href="https://opencollective.com/ya-webadb/backer/1/website?requireActive=false" target="_blank"><img src="https://opencollective.com/ya-webadb/backer/1/avatar.svg?requireActive=false"></a>
|
|
38
|
+
<a href="https://opencollective.com/ya-webadb/backer/2/website?requireActive=false" target="_blank"><img src="https://opencollective.com/ya-webadb/backer/2/avatar.svg?requireActive=false"></a>
|
|
39
|
+
<a href="https://opencollective.com/ya-webadb/backer/3/website?requireActive=false" target="_blank"><img src="https://opencollective.com/ya-webadb/backer/3/avatar.svg?requireActive=false"></a>
|
|
40
|
+
<a href="https://opencollective.com/ya-webadb/backer/4/website?requireActive=false" target="_blank"><img src="https://opencollective.com/ya-webadb/backer/4/avatar.svg?requireActive=false"></a>
|
|
41
|
+
<a href="https://opencollective.com/ya-webadb/backer/5/website?requireActive=false" target="_blank"><img src="https://opencollective.com/ya-webadb/backer/5/avatar.svg?requireActive=false"></a>
|
|
42
|
+
<a href="https://opencollective.com/ya-webadb/backer/6/website?requireActive=false" target="_blank"><img src="https://opencollective.com/ya-webadb/backer/6/avatar.svg?requireActive=false"></a>
|
|
43
|
+
<a href="https://opencollective.com/ya-webadb/backer/7/website?requireActive=false" target="_blank"><img src="https://opencollective.com/ya-webadb/backer/7/avatar.svg?requireActive=false"></a>
|
|
44
|
+
<a href="https://opencollective.com/ya-webadb/backer/8/website?requireActive=false" target="_blank"><img src="https://opencollective.com/ya-webadb/backer/8/avatar.svg?requireActive=false"></a>
|
|
45
|
+
<a href="https://opencollective.com/ya-webadb/backer/9/website?requireActive=false" target="_blank"><img src="https://opencollective.com/ya-webadb/backer/9/avatar.svg?requireActive=false"></a>
|
|
46
|
+
<a href="https://opencollective.com/ya-webadb/backer/10/website?requireActive=false" target="_blank"><img src="https://opencollective.com/ya-webadb/backer/10/avatar.svg?requireActive=false"></a>
|
package/esm/device.d.ts
CHANGED
|
@@ -13,6 +13,9 @@ export declare const ADB_DEFAULT_DEVICE_FILTER: {
|
|
|
13
13
|
};
|
|
14
14
|
export declare class AdbDaemonWebUsbConnection implements ReadableWritablePair<AdbPacketData, Consumable<AdbPacketInit>> {
|
|
15
15
|
#private;
|
|
16
|
+
get device(): AdbDaemonWebUsbDevice;
|
|
17
|
+
get inEndpoint(): USBEndpoint;
|
|
18
|
+
get outEndpoint(): USBEndpoint;
|
|
16
19
|
get readable(): ReadableStream<AdbPacketData>;
|
|
17
20
|
get writable(): WritableStream<Consumable<{
|
|
18
21
|
command: number;
|
|
@@ -22,7 +25,7 @@ export declare class AdbDaemonWebUsbConnection implements ReadableWritablePair<A
|
|
|
22
25
|
magic: number;
|
|
23
26
|
payload: Uint8Array;
|
|
24
27
|
}>>;
|
|
25
|
-
constructor(device:
|
|
28
|
+
constructor(device: AdbDaemonWebUsbDevice, inEndpoint: USBEndpoint, outEndpoint: USBEndpoint, usbManager: USB);
|
|
26
29
|
}
|
|
27
30
|
export declare class AdbDaemonWebUsbDevice implements AdbDaemonDevice {
|
|
28
31
|
#private;
|
|
@@ -40,6 +43,6 @@ export declare class AdbDaemonWebUsbDevice implements AdbDaemonDevice {
|
|
|
40
43
|
* Claim the device and create a pair of `AdbPacket` streams to the ADB interface.
|
|
41
44
|
* @returns The pair of `AdbPacket` streams.
|
|
42
45
|
*/
|
|
43
|
-
connect(): Promise<
|
|
46
|
+
connect(): Promise<AdbDaemonWebUsbConnection>;
|
|
44
47
|
}
|
|
45
48
|
//# sourceMappingURL=device.d.ts.map
|
package/esm/device.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"device.d.ts","sourceRoot":"","sources":["../src/device.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,EACR,eAAe,EACf,aAAa,EACb,aAAa,EAChB,MAAM,gBAAgB,CAAC;AAMxB,OAAO,KAAK,EACR,UAAU,EACV,oBAAoB,EACpB,cAAc,EACjB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAGH,cAAc,EAEjB,MAAM,yBAAyB,CAAC;AAIjC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"device.d.ts","sourceRoot":"","sources":["../src/device.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,EACR,eAAe,EACf,aAAa,EACb,aAAa,EAChB,MAAM,gBAAgB,CAAC;AAMxB,OAAO,KAAK,EACR,UAAU,EACV,oBAAoB,EACpB,cAAc,EACjB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAGH,cAAc,EAEjB,MAAM,yBAAyB,CAAC;AAIjC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAOlD;;GAEG;AACH,eAAO,MAAM,yBAAyB;;;;CAIF,CAAC;AAgErC,qBAAa,yBACT,YAAW,oBAAoB,CAAC,aAAa,EAAE,UAAU,CAAC,aAAa,CAAC,CAAC;;IAGzE,IAAI,MAAM,0BAET;IAGD,IAAI,UAAU,gBAEb;IAGD,IAAI,WAAW,gBAEd;IAGD,IAAI,QAAQ,kCAEX;IAGD,IAAI,QAAQ;;;;;;;QAEX;gBAGG,MAAM,EAAE,qBAAqB,EAC7B,UAAU,EAAE,WAAW,EACvB,WAAW,EAAE,WAAW,EACxB,UAAU,EAAE,GAAG;CAsJtB;AAED,qBAAa,qBAAsB,YAAW,eAAe;;IAKzD,IAAI,GAAG,cAEN;IAGD,IAAI,MAAM,IAAI,MAAM,CAEnB;IAED,IAAI,IAAI,IAAI,MAAM,CAEjB;IAED;;;;;OAKG;gBAEC,MAAM,EAAE,SAAS,EACjB,OAAO,+BAAiD,EACxD,UAAU,EAAE,GAAG;IA8CnB;;;OAGG;IACG,OAAO,IAAI,OAAO,CAAC,yBAAyB,CAAC;CAStD"}
|
package/esm/device.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { AdbPacketHeader, AdbPacketSerializeStream, unreachable, } from "@yume-chan/adb";
|
|
2
2
|
import { ConsumableWritableStream, DuplexStreamFactory, ReadableStream, pipeFrom, } from "@yume-chan/stream-extra";
|
|
3
3
|
import { EMPTY_UINT8_ARRAY } from "@yume-chan/struct";
|
|
4
|
-
import { findUsbAlternateInterface, isErrorName } from "./utils.js";
|
|
4
|
+
import { findUsbAlternateInterface, getSerialNumber, isErrorName, } from "./utils.js";
|
|
5
5
|
/**
|
|
6
6
|
* The default filter for ADB devices, as defined by Google.
|
|
7
7
|
*/
|
|
@@ -62,6 +62,18 @@ class Uint8ArrayExactReadable {
|
|
|
62
62
|
}
|
|
63
63
|
}
|
|
64
64
|
export class AdbDaemonWebUsbConnection {
|
|
65
|
+
#device;
|
|
66
|
+
get device() {
|
|
67
|
+
return this.#device;
|
|
68
|
+
}
|
|
69
|
+
#inEndpoint;
|
|
70
|
+
get inEndpoint() {
|
|
71
|
+
return this.#inEndpoint;
|
|
72
|
+
}
|
|
73
|
+
#outEndpoint;
|
|
74
|
+
get outEndpoint() {
|
|
75
|
+
return this.#outEndpoint;
|
|
76
|
+
}
|
|
65
77
|
#readable;
|
|
66
78
|
get readable() {
|
|
67
79
|
return this.#readable;
|
|
@@ -71,12 +83,15 @@ export class AdbDaemonWebUsbConnection {
|
|
|
71
83
|
return this.#writable;
|
|
72
84
|
}
|
|
73
85
|
constructor(device, inEndpoint, outEndpoint, usbManager) {
|
|
86
|
+
this.#device = device;
|
|
87
|
+
this.#inEndpoint = inEndpoint;
|
|
88
|
+
this.#outEndpoint = outEndpoint;
|
|
74
89
|
let closed = false;
|
|
75
90
|
const duplex = new DuplexStreamFactory({
|
|
76
91
|
close: async () => {
|
|
77
92
|
try {
|
|
78
93
|
closed = true;
|
|
79
|
-
await device.close();
|
|
94
|
+
await device.raw.close();
|
|
80
95
|
}
|
|
81
96
|
catch {
|
|
82
97
|
/* device may have already disconnected */
|
|
@@ -88,67 +103,34 @@ export class AdbDaemonWebUsbConnection {
|
|
|
88
103
|
},
|
|
89
104
|
});
|
|
90
105
|
function handleUsbDisconnect(e) {
|
|
91
|
-
if (e.device === device) {
|
|
106
|
+
if (e.device === device.raw) {
|
|
92
107
|
duplex.dispose().catch(unreachable);
|
|
93
108
|
}
|
|
94
109
|
}
|
|
95
110
|
usbManager.addEventListener("disconnect", handleUsbDisconnect);
|
|
96
111
|
this.#readable = duplex.wrapReadable(new ReadableStream({
|
|
97
|
-
async
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
// otherwise it will return `babble` status without any data.
|
|
101
|
-
// ADB daemon sends each packet in two parts, the 24-byte header and the payload.
|
|
102
|
-
const result = await device.transferIn(inEndpoint.endpointNumber, 24);
|
|
103
|
-
// TODO: webusb: handle `babble` by discarding the data and receive again
|
|
104
|
-
// Per spec, the `result.data` always covers the whole `buffer`.
|
|
105
|
-
const buffer = new Uint8Array(result.data.buffer);
|
|
106
|
-
const stream = new Uint8ArrayExactReadable(buffer);
|
|
107
|
-
// Add `payload` field to its type, it's assigned below.
|
|
108
|
-
const packet = AdbPacketHeader.deserialize(stream);
|
|
109
|
-
if (packet.payloadLength !== 0) {
|
|
110
|
-
const result = await device.transferIn(inEndpoint.endpointNumber, packet.payloadLength);
|
|
111
|
-
packet.payload = new Uint8Array(result.data.buffer);
|
|
112
|
-
}
|
|
113
|
-
else {
|
|
114
|
-
packet.payload = EMPTY_UINT8_ARRAY;
|
|
115
|
-
}
|
|
112
|
+
pull: async (controller) => {
|
|
113
|
+
const packet = await this.#transferIn();
|
|
114
|
+
if (packet) {
|
|
116
115
|
controller.enqueue(packet);
|
|
117
116
|
}
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
// even before the `disconnect` event is fired.
|
|
121
|
-
// We need to wait a little bit and check if the device is still connected.
|
|
122
|
-
// https://github.com/WICG/webusb/issues/219
|
|
123
|
-
if (isErrorName(e, "NetworkError")) {
|
|
124
|
-
await new Promise((resolve) => {
|
|
125
|
-
setTimeout(() => {
|
|
126
|
-
resolve();
|
|
127
|
-
}, 100);
|
|
128
|
-
});
|
|
129
|
-
if (closed) {
|
|
130
|
-
controller.close();
|
|
131
|
-
}
|
|
132
|
-
else {
|
|
133
|
-
throw e;
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
throw e;
|
|
117
|
+
else {
|
|
118
|
+
controller.close();
|
|
137
119
|
}
|
|
138
120
|
},
|
|
139
|
-
}));
|
|
121
|
+
}, { highWaterMark: 0 }));
|
|
140
122
|
const zeroMask = outEndpoint.packetSize - 1;
|
|
141
123
|
this.#writable = pipeFrom(duplex.createWritable(new ConsumableWritableStream({
|
|
142
124
|
write: async (chunk) => {
|
|
143
125
|
try {
|
|
144
|
-
await device.transferOut(outEndpoint.endpointNumber, chunk);
|
|
126
|
+
await device.raw.transferOut(outEndpoint.endpointNumber, chunk);
|
|
145
127
|
// In USB protocol, a not-full packet indicates the end of a transfer.
|
|
146
128
|
// If the payload size is a multiple of the packet size,
|
|
147
129
|
// we need to send an empty packet to indicate the end,
|
|
148
130
|
// so the OS will send it to the device immediately.
|
|
149
131
|
if (zeroMask &&
|
|
150
132
|
(chunk.byteLength & zeroMask) === 0) {
|
|
151
|
-
await device.transferOut(outEndpoint.endpointNumber, EMPTY_UINT8_ARRAY);
|
|
133
|
+
await device.raw.transferOut(outEndpoint.endpointNumber, EMPTY_UINT8_ARRAY);
|
|
152
134
|
}
|
|
153
135
|
}
|
|
154
136
|
catch (e) {
|
|
@@ -160,6 +142,53 @@ export class AdbDaemonWebUsbConnection {
|
|
|
160
142
|
},
|
|
161
143
|
})), new AdbPacketSerializeStream());
|
|
162
144
|
}
|
|
145
|
+
async #transferIn() {
|
|
146
|
+
try {
|
|
147
|
+
while (true) {
|
|
148
|
+
// ADB daemon sends each packet in two parts, the 24-byte header and the payload.
|
|
149
|
+
const result = await this.#device.raw.transferIn(this.#inEndpoint.endpointNumber, this.#inEndpoint.packetSize);
|
|
150
|
+
if (result.data.byteLength !== 24) {
|
|
151
|
+
continue;
|
|
152
|
+
}
|
|
153
|
+
// Per spec, the `result.data` always covers the whole `buffer`.
|
|
154
|
+
const buffer = new Uint8Array(result.data.buffer);
|
|
155
|
+
const stream = new Uint8ArrayExactReadable(buffer);
|
|
156
|
+
// Add `payload` field to its type, it's assigned below.
|
|
157
|
+
const packet = AdbPacketHeader.deserialize(stream);
|
|
158
|
+
if (packet.magic !== (packet.command ^ 0xffffffff)) {
|
|
159
|
+
continue;
|
|
160
|
+
}
|
|
161
|
+
if (packet.payloadLength !== 0) {
|
|
162
|
+
const result = await this.#device.raw.transferIn(this.#inEndpoint.endpointNumber, packet.payloadLength);
|
|
163
|
+
packet.payload = new Uint8Array(result.data.buffer);
|
|
164
|
+
}
|
|
165
|
+
else {
|
|
166
|
+
packet.payload = EMPTY_UINT8_ARRAY;
|
|
167
|
+
}
|
|
168
|
+
return packet;
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
catch (e) {
|
|
172
|
+
// On Windows, disconnecting the device will cause `NetworkError` to be thrown,
|
|
173
|
+
// even before the `disconnect` event is fired.
|
|
174
|
+
// We need to wait a little bit and check if the device is still connected.
|
|
175
|
+
// https://github.com/WICG/webusb/issues/219
|
|
176
|
+
if (isErrorName(e, "NetworkError")) {
|
|
177
|
+
await new Promise((resolve) => {
|
|
178
|
+
setTimeout(() => {
|
|
179
|
+
resolve();
|
|
180
|
+
}, 100);
|
|
181
|
+
});
|
|
182
|
+
if (closed) {
|
|
183
|
+
return undefined;
|
|
184
|
+
}
|
|
185
|
+
else {
|
|
186
|
+
throw e;
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
throw e;
|
|
190
|
+
}
|
|
191
|
+
}
|
|
163
192
|
}
|
|
164
193
|
export class AdbDaemonWebUsbDevice {
|
|
165
194
|
#filters;
|
|
@@ -168,8 +197,9 @@ export class AdbDaemonWebUsbDevice {
|
|
|
168
197
|
get raw() {
|
|
169
198
|
return this.#raw;
|
|
170
199
|
}
|
|
200
|
+
#serial;
|
|
171
201
|
get serial() {
|
|
172
|
-
return this.#
|
|
202
|
+
return this.#serial;
|
|
173
203
|
}
|
|
174
204
|
get name() {
|
|
175
205
|
return this.#raw.productName;
|
|
@@ -182,14 +212,11 @@ export class AdbDaemonWebUsbDevice {
|
|
|
182
212
|
*/
|
|
183
213
|
constructor(device, filters = [ADB_DEFAULT_DEVICE_FILTER], usbManager) {
|
|
184
214
|
this.#raw = device;
|
|
215
|
+
this.#serial = getSerialNumber(device);
|
|
185
216
|
this.#filters = filters;
|
|
186
217
|
this.#usbManager = usbManager;
|
|
187
218
|
}
|
|
188
|
-
|
|
189
|
-
* Claim the device and create a pair of `AdbPacket` streams to the ADB interface.
|
|
190
|
-
* @returns The pair of `AdbPacket` streams.
|
|
191
|
-
*/
|
|
192
|
-
async connect() {
|
|
219
|
+
async #claimInterface() {
|
|
193
220
|
if (!this.#raw.opened) {
|
|
194
221
|
await this.#raw.open();
|
|
195
222
|
}
|
|
@@ -207,7 +234,15 @@ export class AdbDaemonWebUsbDevice {
|
|
|
207
234
|
await this.#raw.selectAlternateInterface(interface_.interfaceNumber, alternate.alternateSetting);
|
|
208
235
|
}
|
|
209
236
|
const { inEndpoint, outEndpoint } = findUsbEndpoints(alternate.endpoints);
|
|
210
|
-
return
|
|
237
|
+
return [inEndpoint, outEndpoint];
|
|
238
|
+
}
|
|
239
|
+
/**
|
|
240
|
+
* Claim the device and create a pair of `AdbPacket` streams to the ADB interface.
|
|
241
|
+
* @returns The pair of `AdbPacket` streams.
|
|
242
|
+
*/
|
|
243
|
+
async connect() {
|
|
244
|
+
const [inEndpoint, outEndpoint] = await this.#claimInterface();
|
|
245
|
+
return new AdbDaemonWebUsbConnection(this, inEndpoint, outEndpoint, this.#usbManager);
|
|
211
246
|
}
|
|
212
247
|
}
|
|
213
248
|
//# sourceMappingURL=device.js.map
|
package/esm/device.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"device.js","sourceRoot":"","sources":["../src/device.ts"],"names":[],"mappings":"AAKA,OAAO,EACH,eAAe,EACf,wBAAwB,EACxB,WAAW,GACd,MAAM,gBAAgB,CAAC;AAMxB,OAAO,EACH,wBAAwB,EACxB,mBAAmB,EACnB,cAAc,EACd,QAAQ,GACX,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAGtD,OAAO,
|
|
1
|
+
{"version":3,"file":"device.js","sourceRoot":"","sources":["../src/device.ts"],"names":[],"mappings":"AAKA,OAAO,EACH,eAAe,EACf,wBAAwB,EACxB,WAAW,GACd,MAAM,gBAAgB,CAAC;AAMxB,OAAO,EACH,wBAAwB,EACxB,mBAAmB,EACnB,cAAc,EACd,QAAQ,GACX,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAGtD,OAAO,EACH,yBAAyB,EACzB,eAAe,EACf,WAAW,GACd,MAAM,YAAY,CAAC;AAEpB;;GAEG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG;IACrC,SAAS,EAAE,IAAI;IACf,YAAY,EAAE,IAAI;IAClB,YAAY,EAAE,CAAC;CACiB,CAAC;AAErC;;;;GAIG;AACH,SAAS,gBAAgB,CAAC,SAAwB;IAC9C,IAAI,SAAS,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACzB,MAAM,IAAI,KAAK,CAAC,oBAAoB,CAAC,CAAC;IAC1C,CAAC;IAED,IAAI,UAAmC,CAAC;IACxC,IAAI,WAAo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,CAAC,QAAQ,CAAC,CAAC;QAExD,IACI,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE,kBAAkB;YAC3C,aAAa,CAAC,kBAAkB,EAClC,CAAC;YACC,6DAA6D;YAC7D,8FAA8F;YAC9F,MAAM,IAAI,CAAC,IAAI,CAAC,mBAAmB,CAC/B,aAAa,CAAC,kBAAkB,CACnC,CAAC;QACN,CAAC;QAED,IAAI,CAAC,UAAU,CAAC,OAAO,EAAE,CAAC;YACtB,MAAM,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC,UAAU,CAAC,eAAe,CAAC,CAAC;QAC/D,CAAC;QAED,IACI,UAAU,CAAC,SAAS,CAAC,gBAAgB,KAAK,SAAS,CAAC,gBAAgB,EACtE,CAAC;YACC,MAAM,IAAI,CAAC,IAAI,CAAC,wBAAwB,CACpC,UAAU,CAAC,eAAe,EAC1B,SAAS,CAAC,gBAAgB,CAC7B,CAAC;QACN,CAAC;QAED,MAAM,EAAE,UAAU,EAAE,WAAW,EAAE,GAAG,gBAAgB,CAChD,SAAS,CAAC,SAAS,CACtB,CAAC;QACF,OAAO,CAAC,UAAU,EAAE,WAAW,CAAC,CAAC;IACrC,CAAC;IAED;;;OAGG;IACH,KAAK,CAAC,OAAO;QACT,MAAM,CAAC,UAAU,EAAE,WAAW,CAAC,GAAG,MAAM,IAAI,CAAC,eAAe,EAAE,CAAC;QAC/D,OAAO,IAAI,yBAAyB,CAChC,IAAI,EACJ,UAAU,EACV,WAAW,EACX,IAAI,CAAC,WAAW,CACnB,CAAC;IACN,CAAC;CACJ"}
|
package/esm/manager.d.ts
CHANGED
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
/// <reference types="w3c-web-usb" />
|
|
2
2
|
import { AdbDaemonWebUsbDevice } from "./device.js";
|
|
3
3
|
import type { AdbDeviceFilter } from "./utils.js";
|
|
4
|
+
export declare namespace AdbDaemonWebUsbDeviceManager {
|
|
5
|
+
interface RequestDeviceOptions {
|
|
6
|
+
filters?: AdbDeviceFilter[] | undefined;
|
|
7
|
+
exclusionFilters?: USBDeviceFilter[] | undefined;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
4
10
|
export declare class AdbDaemonWebUsbDeviceManager {
|
|
5
11
|
#private;
|
|
6
12
|
/**
|
|
@@ -27,7 +33,7 @@ export declare class AdbDaemonWebUsbDeviceManager {
|
|
|
27
33
|
* @returns An {@link AdbDaemonWebUsbDevice} instance if the user selected a device,
|
|
28
34
|
* or `undefined` if the user cancelled the device picker.
|
|
29
35
|
*/
|
|
30
|
-
requestDevice(
|
|
36
|
+
requestDevice(options?: AdbDaemonWebUsbDeviceManager.RequestDeviceOptions): Promise<AdbDaemonWebUsbDevice | undefined>;
|
|
31
37
|
/**
|
|
32
38
|
* Get all connected and authenticated devices.
|
|
33
39
|
* This is a convince method for `usb.getDevices()`.
|
package/esm/manager.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"manager.d.ts","sourceRoot":"","sources":["../src/manager.ts"],"names":[],"mappings":";AAAA,OAAO,EAA6B,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAC/E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"manager.d.ts","sourceRoot":"","sources":["../src/manager.ts"],"names":[],"mappings":";AAAA,OAAO,EAA6B,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAC/E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAOlD,yBAAiB,4BAA4B,CAAC;IAC1C,UAAiB,oBAAoB;QACjC,OAAO,CAAC,EAAE,eAAe,EAAE,GAAG,SAAS,CAAC;QACxC,gBAAgB,CAAC,EAAE,eAAe,EAAE,GAAG,SAAS,CAAC;KACpD;CACJ;AAED,qBAAa,4BAA4B;;IACrC;;;;OAIG;IACH,MAAM,CAAC,QAAQ,CAAC,OAAO,2CAIH;IAIpB;;;OAGG;gBACS,UAAU,EAAE,GAAG;IAI3B;;;;;;;;;;;;OAYG;IACG,aAAa,CACf,OAAO,GAAE,4BAA4B,CAAC,oBAAyB,GAChE,OAAO,CAAC,qBAAqB,GAAG,SAAS,CAAC;IA0B7C;;;;;;;;;;;OAWG;IACG,UAAU,CACZ,OAAO,GAAE,eAAe,EAAgC,GACzD,OAAO,CAAC,qBAAqB,EAAE,CAAC;CA8CtC"}
|
package/esm/manager.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ADB_DEFAULT_DEVICE_FILTER, AdbDaemonWebUsbDevice } from "./device.js";
|
|
2
|
-
import { findUsbAlternateInterface, isErrorName } from "./utils.js";
|
|
2
|
+
import { findUsbAlternateInterface, getSerialNumber, isErrorName, } from "./utils.js";
|
|
3
3
|
export class AdbDaemonWebUsbDeviceManager {
|
|
4
4
|
/**
|
|
5
5
|
* Gets the instance of {@link AdbDaemonWebUsbDeviceManager} using browser WebUSB implementation.
|
|
@@ -31,15 +31,16 @@ export class AdbDaemonWebUsbDeviceManager {
|
|
|
31
31
|
* @returns An {@link AdbDaemonWebUsbDevice} instance if the user selected a device,
|
|
32
32
|
* or `undefined` if the user cancelled the device picker.
|
|
33
33
|
*/
|
|
34
|
-
async requestDevice(
|
|
35
|
-
if (filters
|
|
34
|
+
async requestDevice(options = {}) {
|
|
35
|
+
if (!options.filters) {
|
|
36
|
+
options.filters = [ADB_DEFAULT_DEVICE_FILTER];
|
|
37
|
+
}
|
|
38
|
+
else if (options.filters.length === 0) {
|
|
36
39
|
throw new TypeError("filters must not be empty");
|
|
37
40
|
}
|
|
38
41
|
try {
|
|
39
|
-
const device = await this.#usbManager.requestDevice(
|
|
40
|
-
|
|
41
|
-
});
|
|
42
|
-
return new AdbDaemonWebUsbDevice(device, filters, this.#usbManager);
|
|
42
|
+
const device = await this.#usbManager.requestDevice(options);
|
|
43
|
+
return new AdbDaemonWebUsbDevice(device, options.filters, this.#usbManager);
|
|
43
44
|
}
|
|
44
45
|
catch (e) {
|
|
45
46
|
// No device selected
|
|
@@ -78,7 +79,7 @@ export class AdbDaemonWebUsbDeviceManager {
|
|
|
78
79
|
continue;
|
|
79
80
|
}
|
|
80
81
|
if ("serialNumber" in filter &&
|
|
81
|
-
device
|
|
82
|
+
getSerialNumber(device) !== filter.serialNumber) {
|
|
82
83
|
continue;
|
|
83
84
|
}
|
|
84
85
|
try {
|
package/esm/manager.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"manager.js","sourceRoot":"","sources":["../src/manager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAE/E,OAAO,
|
|
1
|
+
{"version":3,"file":"manager.js","sourceRoot":"","sources":["../src/manager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAE/E,OAAO,EACH,yBAAyB,EACzB,eAAe,EACf,WAAW,GACd,MAAM,YAAY,CAAC;AASpB,MAAM,OAAO,4BAA4B;IACrC;;;;OAIG;IACH,MAAM,CAAU,OAAO,GACnB,OAAO,UAAU,CAAC,SAAS,KAAK,WAAW;QAC3C,CAAC,CAAC,UAAU,CAAC,SAAS,CAAC,GAAG;QACtB,CAAC,CAAC,IAAI,4BAA4B,CAAC,UAAU,CAAC,SAAS,CAAC,GAAG,CAAC;QAC5D,CAAC,CAAC,SAAS,CAAC;IAEpB,WAAW,CAAM;IAEjB;;;OAGG;IACH,YAAY,UAAe;QACvB,IAAI,CAAC,WAAW,GAAG,UAAU,CAAC;IAClC,CAAC;IAED;;;;;;;;;;;;OAYG;IACH,KAAK,CAAC,aAAa,CACf,UAA6D,EAAE;QAE/D,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC;YACnB,OAAO,CAAC,OAAO,GAAG,CAAC,yBAAyB,CAAC,CAAC;QAClD,CAAC;aAAM,IAAI,OAAO,CAAC,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;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AE,OAAO,CAAC,CAAC;oBAC3C,OAAO,IAAI,CAAC;gBAChB,CAAC;gBAAC,MAAM,CAAC;oBACL,SAAS;gBACb,CAAC;YACL,CAAC;YACD,OAAO,KAAK,CAAC;QACjB,CAAC,CAAC;aACD,GAAG,CACA,CAAC,MAAM,EAAE,EAAE,CACP,IAAI,qBAAqB,CACrB,MAAM,EACN,OAAO,EACP,IAAI,CAAC,WAAW,CACnB,CACR,CAAC;IACV,CAAC"}
|
package/esm/utils.d.ts
CHANGED
package/esm/utils.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":";AAAA,wBAAgB,WAAW,CAAC,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAO7D;AAED;;;GAGG;AACH,MAAM,MAAM,eAAe,GAAG,eAAe,GACzC,QAAQ,CACJ,IAAI,CAAC,eAAe,EAAE,WAAW,GAAG,cAAc,GAAG,cAAc,CAAC,CACvE,CAAC;AAcN,wBAAgB,yBAAyB,CACrC,MAAM,EAAE,SAAS,EACjB,OAAO,EAAE,eAAe,EAAE;;;;EAa7B"}
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":";AAAA,wBAAgB,WAAW,CAAC,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAO7D;AAED;;;GAGG;AACH,MAAM,MAAM,eAAe,GAAG,eAAe,GACzC,QAAQ,CACJ,IAAI,CAAC,eAAe,EAAE,WAAW,GAAG,cAAc,GAAG,cAAc,CAAC,CACvE,CAAC;AAcN,wBAAgB,yBAAyB,CACrC,MAAM,EAAE,SAAS,EACjB,OAAO,EAAE,eAAe,EAAE;;;;EAa7B;AAMD,wBAAgB,eAAe,CAAC,MAAM,EAAE,SAAS,UAMhD"}
|
package/esm/utils.js
CHANGED
|
@@ -21,4 +21,13 @@ export function findUsbAlternateInterface(device, filters) {
|
|
|
21
21
|
}
|
|
22
22
|
throw new Error("No matched alternate interface found");
|
|
23
23
|
}
|
|
24
|
+
function padNumber(value) {
|
|
25
|
+
return value.toString(16).padStart(4, "0");
|
|
26
|
+
}
|
|
27
|
+
export function getSerialNumber(device) {
|
|
28
|
+
if (device.serialNumber) {
|
|
29
|
+
return device.serialNumber;
|
|
30
|
+
}
|
|
31
|
+
return padNumber(device.vendorId) + "x" + padNumber(device.productId);
|
|
32
|
+
}
|
|
24
33
|
//# sourceMappingURL=utils.js.map
|
package/esm/utils.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,WAAW,CAAC,CAAU,EAAE,IAAY;IAChD,+CAA+C;IAC/C,wBAAwB;IACxB,kDAAkD;IAClD,OAAO,CACH,OAAO,CAAC,KAAK,QAAQ,IAAI,CAAC,KAAK,IAAI,IAAI,MAAM,IAAI,CAAC,IAAI,CAAC,CAAC,IAAI,KAAK,IAAI,CACxE,CAAC;AACN,CAAC;AAWD,SAAS,sBAAsB,CAC3B,SAAgC,EAChC,OAA0B;IAE1B,OAAO,OAAO,CAAC,IAAI,CACf,CAAC,MAAM,EAAE,EAAE,CACP,SAAS,CAAC,cAAc,KAAK,MAAM,CAAC,SAAS;QAC7C,SAAS,CAAC,iBAAiB,KAAK,MAAM,CAAC,YAAY;QACnD,SAAS,CAAC,iBAAiB,KAAK,MAAM,CAAC,YAAY,CAC1D,CAAC;AACN,CAAC;AAED,MAAM,UAAU,yBAAyB,CACrC,MAAiB,EACjB,OAA0B;IAE1B,KAAK,MAAM,aAAa,IAAI,MAAM,CAAC,cAAc,EAAE;
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,WAAW,CAAC,CAAU,EAAE,IAAY;IAChD,+C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AM,CAAC,QAAQ,CAAC,GAAG,GAAG,GAAG,SAAS,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;AAC1E,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yume-chan/adb-daemon-webusb",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.23",
|
|
4
4
|
"description": "Adb daemon transport connection for `@yume-chan/adb` using WebUSB API.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"webusb",
|
|
@@ -25,18 +25,18 @@
|
|
|
25
25
|
"main": "esm/index.js",
|
|
26
26
|
"types": "esm/index.d.ts",
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@types/w3c-web-usb": "^1.0.
|
|
29
|
-
"@yume-chan/adb": "^0.0.
|
|
30
|
-
"@yume-chan/stream-extra": "^0.0.
|
|
31
|
-
"@yume-chan/struct": "^0.0.
|
|
32
|
-
"tslib": "^2.6.
|
|
28
|
+
"@types/w3c-web-usb": "^1.0.10",
|
|
29
|
+
"@yume-chan/adb": "^0.0.23",
|
|
30
|
+
"@yume-chan/stream-extra": "^0.0.23",
|
|
31
|
+
"@yume-chan/struct": "^0.0.23",
|
|
32
|
+
"tslib": "^2.6.2"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"@yume-chan/eslint-config": "^1.0.0",
|
|
36
36
|
"@yume-chan/tsconfig": "^1.0.0",
|
|
37
|
-
"eslint": "^8.
|
|
38
|
-
"prettier": "^3.
|
|
39
|
-
"typescript": "^5.
|
|
37
|
+
"eslint": "^8.57.0",
|
|
38
|
+
"prettier": "^3.2.5",
|
|
39
|
+
"typescript": "^5.4.2"
|
|
40
40
|
},
|
|
41
41
|
"scripts": {
|
|
42
42
|
"build": "tsc -b tsconfig.build.json",
|
package/src/device.ts
CHANGED
|
@@ -23,7 +23,11 @@ import type { ExactReadable } from "@yume-chan/struct";
|
|
|
23
23
|
import { EMPTY_UINT8_ARRAY } from "@yume-chan/struct";
|
|
24
24
|
|
|
25
25
|
import type { AdbDeviceFilter } from "./utils.js";
|
|
26
|
-
import {
|
|
26
|
+
import {
|
|
27
|
+
findUsbAlternateInterface,
|
|
28
|
+
getSerialNumber,
|
|
29
|
+
isErrorName,
|
|
30
|
+
} from "./utils.js";
|
|
27
31
|
|
|
28
32
|
/**
|
|
29
33
|
* The default filter for ADB devices, as defined by Google.
|
|
@@ -99,6 +103,21 @@ class Uint8ArrayExactReadable implements ExactReadable {
|
|
|
99
103
|
export class AdbDaemonWebUsbConnection
|
|
100
104
|
implements ReadableWritablePair<AdbPacketData, Consumable<AdbPacketInit>>
|
|
101
105
|
{
|
|
106
|
+
#device: AdbDaemonWebUsbDevice;
|
|
107
|
+
get device() {
|
|
108
|
+
return this.#device;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
#inEndpoint: USBEndpoint;
|
|
112
|
+
get inEndpoint() {
|
|
113
|
+
return this.#inEndpoint;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
#outEndpoint: USBEndpoint;
|
|
117
|
+
get outEndpoint() {
|
|
118
|
+
return this.#outEndpoint;
|
|
119
|
+
}
|
|
120
|
+
|
|
102
121
|
#readable: ReadableStream<AdbPacketData>;
|
|
103
122
|
get readable() {
|
|
104
123
|
return this.#readable;
|
|
@@ -110,11 +129,15 @@ export class AdbDaemonWebUsbConnection
|
|
|
110
129
|
}
|
|
111
130
|
|
|
112
131
|
constructor(
|
|
113
|
-
device:
|
|
132
|
+
device: AdbDaemonWebUsbDevice,
|
|
114
133
|
inEndpoint: USBEndpoint,
|
|
115
134
|
outEndpoint: USBEndpoint,
|
|
116
135
|
usbManager: USB,
|
|
117
136
|
) {
|
|
137
|
+
this.#device = device;
|
|
138
|
+
this.#inEndpoint = inEndpoint;
|
|
139
|
+
this.#outEndpoint = outEndpoint;
|
|
140
|
+
|
|
118
141
|
let closed = false;
|
|
119
142
|
|
|
120
143
|
const duplex = new DuplexStreamFactory<
|
|
@@ -124,7 +147,7 @@ export class AdbDaemonWebUsbConnection
|
|
|
124
147
|
close: async () => {
|
|
125
148
|
try {
|
|
126
149
|
closed = true;
|
|
127
|
-
await device.close();
|
|
150
|
+
await device.raw.close();
|
|
128
151
|
} catch {
|
|
129
152
|
/* device may have already disconnected */
|
|
130
153
|
}
|
|
@@ -139,7 +162,7 @@ export class AdbDaemonWebUsbConnection
|
|
|
139
162
|
});
|
|
140
163
|
|
|
141
164
|
function handleUsbDisconnect(e: USBConnectionEvent) {
|
|
142
|
-
if (e.device === device) {
|
|
165
|
+
if (e.device === device.raw) {
|
|
143
166
|
duplex.dispose().catch(unreachable);
|
|
144
167
|
}
|
|
145
168
|
}
|
|
@@ -147,63 +170,19 @@ export class AdbDaemonWebUsbConnection
|
|
|
147
170
|
usbManager.addEventListener("disconnect", handleUsbDisconnect);
|
|
148
171
|
|
|
149
172
|
this.#readable = duplex.wrapReadable(
|
|
150
|
-
new ReadableStream<AdbPacketData>(
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
const result = await device.transferIn(
|
|
157
|
-
inEndpoint.endpointNumber,
|
|
158
|
-
24,
|
|
159
|
-
);
|
|
160
|
-
|
|
161
|
-
// TODO: webusb: handle `babble` by discarding the data and receive again
|
|
162
|
-
|
|
163
|
-
// Per spec, the `result.data` always covers the whole `buffer`.
|
|
164
|
-
const buffer = new Uint8Array(result.data!.buffer);
|
|
165
|
-
const stream = new Uint8ArrayExactReadable(buffer);
|
|
166
|
-
|
|
167
|
-
// Add `payload` field to its type, it's assigned below.
|
|
168
|
-
const packet = AdbPacketHeader.deserialize(
|
|
169
|
-
stream,
|
|
170
|
-
) as AdbPacketHeader & { payload: Uint8Array };
|
|
171
|
-
if (packet.payloadLength !== 0) {
|
|
172
|
-
const result = await device.transferIn(
|
|
173
|
-
inEndpoint.endpointNumber,
|
|
174
|
-
packet.payloadLength,
|
|
175
|
-
);
|
|
176
|
-
packet.payload = new Uint8Array(
|
|
177
|
-
result.data!.buffer,
|
|
178
|
-
);
|
|
173
|
+
new ReadableStream<AdbPacketData>(
|
|
174
|
+
{
|
|
175
|
+
pull: async (controller) => {
|
|
176
|
+
const packet = await this.#transferIn();
|
|
177
|
+
if (packet) {
|
|
178
|
+
controller.enqueue(packet);
|
|
179
179
|
} else {
|
|
180
|
-
|
|
180
|
+
controller.close();
|
|
181
181
|
}
|
|
182
|
-
|
|
183
|
-
controller.enqueue(packet);
|
|
184
|
-
} catch (e) {
|
|
185
|
-
// On Windows, disconnecting the device will cause `NetworkError` to be thrown,
|
|
186
|
-
// even before the `disconnect` event is fired.
|
|
187
|
-
// We need to wait a little bit and check if the device is still connected.
|
|
188
|
-
// https://github.com/WICG/webusb/issues/219
|
|
189
|
-
if (isErrorName(e, "NetworkError")) {
|
|
190
|
-
await new Promise<void>((resolve) => {
|
|
191
|
-
setTimeout(() => {
|
|
192
|
-
resolve();
|
|
193
|
-
}, 100);
|
|
194
|
-
});
|
|
195
|
-
|
|
196
|
-
if (closed) {
|
|
197
|
-
controller.close();
|
|
198
|
-
} else {
|
|
199
|
-
throw e;
|
|
200
|
-
}
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
throw e;
|
|
204
|
-
}
|
|
182
|
+
},
|
|
205
183
|
},
|
|
206
|
-
|
|
184
|
+
{ highWaterMark: 0 },
|
|
185
|
+
),
|
|
207
186
|
);
|
|
208
187
|
|
|
209
188
|
const zeroMask = outEndpoint.packetSize - 1;
|
|
@@ -212,7 +191,7 @@ export class AdbDaemonWebUsbConnection
|
|
|
212
191
|
new ConsumableWritableStream({
|
|
213
192
|
write: async (chunk) => {
|
|
214
193
|
try {
|
|
215
|
-
await device.transferOut(
|
|
194
|
+
await device.raw.transferOut(
|
|
216
195
|
outEndpoint.endpointNumber,
|
|
217
196
|
chunk,
|
|
218
197
|
);
|
|
@@ -225,7 +204,7 @@ export class AdbDaemonWebUsbConnection
|
|
|
225
204
|
zeroMask &&
|
|
226
205
|
(chunk.byteLength & zeroMask) === 0
|
|
227
206
|
) {
|
|
228
|
-
await device.transferOut(
|
|
207
|
+
await device.raw.transferOut(
|
|
229
208
|
outEndpoint.endpointNumber,
|
|
230
209
|
EMPTY_UINT8_ARRAY,
|
|
231
210
|
);
|
|
@@ -242,6 +221,67 @@ export class AdbDaemonWebUsbConnection
|
|
|
242
221
|
new AdbPacketSerializeStream(),
|
|
243
222
|
);
|
|
244
223
|
}
|
|
224
|
+
|
|
225
|
+
async #transferIn(): Promise<AdbPacketData | undefined> {
|
|
226
|
+
try {
|
|
227
|
+
while (true) {
|
|
228
|
+
// ADB daemon sends each packet in two parts, the 24-byte header and the payload.
|
|
229
|
+
const result = await this.#device.raw.transferIn(
|
|
230
|
+
this.#inEndpoint.endpointNumber,
|
|
231
|
+
this.#inEndpoint.packetSize,
|
|
232
|
+
);
|
|
233
|
+
|
|
234
|
+
if (result.data!.byteLength !== 24) {
|
|
235
|
+
continue;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
// Per spec, the `result.data` always covers the whole `buffer`.
|
|
239
|
+
const buffer = new Uint8Array(result.data!.buffer);
|
|
240
|
+
const stream = new Uint8ArrayExactReadable(buffer);
|
|
241
|
+
|
|
242
|
+
// Add `payload` field to its type, it's assigned below.
|
|
243
|
+
const packet = AdbPacketHeader.deserialize(
|
|
244
|
+
stream,
|
|
245
|
+
) as AdbPacketHeader & { payload: Uint8Array };
|
|
246
|
+
|
|
247
|
+
if (packet.magic !== (packet.command ^ 0xffffffff)) {
|
|
248
|
+
continue;
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
if (packet.payloadLength !== 0) {
|
|
252
|
+
const result = await this.#device.raw.transferIn(
|
|
253
|
+
this.#inEndpoint.endpointNumber,
|
|
254
|
+
packet.payloadLength,
|
|
255
|
+
);
|
|
256
|
+
packet.payload = new Uint8Array(result.data!.buffer);
|
|
257
|
+
} else {
|
|
258
|
+
packet.payload = EMPTY_UINT8_ARRAY;
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
return packet;
|
|
262
|
+
}
|
|
263
|
+
} catch (e) {
|
|
264
|
+
// On Windows, disconnecting the device will cause `NetworkError` to be thrown,
|
|
265
|
+
// even before the `disconnect` event is fired.
|
|
266
|
+
// We need to wait a little bit and check if the device is still connected.
|
|
267
|
+
// https://github.com/WICG/webusb/issues/219
|
|
268
|
+
if (isErrorName(e, "NetworkError")) {
|
|
269
|
+
await new Promise<void>((resolve) => {
|
|
270
|
+
setTimeout(() => {
|
|
271
|
+
resolve();
|
|
272
|
+
}, 100);
|
|
273
|
+
});
|
|
274
|
+
|
|
275
|
+
if (closed) {
|
|
276
|
+
return undefined;
|
|
277
|
+
} else {
|
|
278
|
+
throw e;
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
throw e;
|
|
283
|
+
}
|
|
284
|
+
}
|
|
245
285
|
}
|
|
246
286
|
|
|
247
287
|
export class AdbDaemonWebUsbDevice implements AdbDaemonDevice {
|
|
@@ -253,8 +293,9 @@ export class AdbDaemonWebUsbDevice implements AdbDaemonDevice {
|
|
|
253
293
|
return this.#raw;
|
|
254
294
|
}
|
|
255
295
|
|
|
296
|
+
#serial: string;
|
|
256
297
|
get serial(): string {
|
|
257
|
-
return this.#
|
|
298
|
+
return this.#serial;
|
|
258
299
|
}
|
|
259
300
|
|
|
260
301
|
get name(): string {
|
|
@@ -273,17 +314,12 @@ export class AdbDaemonWebUsbDevice implements AdbDaemonDevice {
|
|
|
273
314
|
usbManager: USB,
|
|
274
315
|
) {
|
|
275
316
|
this.#raw = device;
|
|
317
|
+
this.#serial = getSerialNumber(device);
|
|
276
318
|
this.#filters = filters;
|
|
277
319
|
this.#usbManager = usbManager;
|
|
278
320
|
}
|
|
279
321
|
|
|
280
|
-
|
|
281
|
-
* Claim the device and create a pair of `AdbPacket` streams to the ADB interface.
|
|
282
|
-
* @returns The pair of `AdbPacket` streams.
|
|
283
|
-
*/
|
|
284
|
-
async connect(): Promise<
|
|
285
|
-
ReadableWritablePair<AdbPacketData, Consumable<AdbPacketInit>>
|
|
286
|
-
> {
|
|
322
|
+
async #claimInterface(): Promise<[USBEndpoint, USBEndpoint]> {
|
|
287
323
|
if (!this.#raw.opened) {
|
|
288
324
|
await this.#raw.open();
|
|
289
325
|
}
|
|
@@ -318,8 +354,17 @@ export class AdbDaemonWebUsbDevice implements AdbDaemonDevice {
|
|
|
318
354
|
const { inEndpoint, outEndpoint } = findUsbEndpoints(
|
|
319
355
|
alternate.endpoints,
|
|
320
356
|
);
|
|
357
|
+
return [inEndpoint, outEndpoint];
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
/**
|
|
361
|
+
* Claim the device and create a pair of `AdbPacket` streams to the ADB interface.
|
|
362
|
+
* @returns The pair of `AdbPacket` streams.
|
|
363
|
+
*/
|
|
364
|
+
async connect(): Promise<AdbDaemonWebUsbConnection> {
|
|
365
|
+
const [inEndpoint, outEndpoint] = await this.#claimInterface();
|
|
321
366
|
return new AdbDaemonWebUsbConnection(
|
|
322
|
-
this
|
|
367
|
+
this,
|
|
323
368
|
inEndpoint,
|
|
324
369
|
outEndpoint,
|
|
325
370
|
this.#usbManager,
|
package/src/manager.ts
CHANGED
|
@@ -1,6 +1,17 @@
|
|
|
1
1
|
import { ADB_DEFAULT_DEVICE_FILTER, AdbDaemonWebUsbDevice } from "./device.js";
|
|
2
2
|
import type { AdbDeviceFilter } from "./utils.js";
|
|
3
|
-
import {
|
|
3
|
+
import {
|
|
4
|
+
findUsbAlternateInterface,
|
|
5
|
+
getSerialNumber,
|
|
6
|
+
isErrorName,
|
|
7
|
+
} from "./utils.js";
|
|
8
|
+
|
|
9
|
+
export namespace AdbDaemonWebUsbDeviceManager {
|
|
10
|
+
export interface RequestDeviceOptions {
|
|
11
|
+
filters?: AdbDeviceFilter[] | undefined;
|
|
12
|
+
exclusionFilters?: USBDeviceFilter[] | undefined;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
4
15
|
|
|
5
16
|
export class AdbDaemonWebUsbDeviceManager {
|
|
6
17
|
/**
|
|
@@ -38,17 +49,23 @@ export class AdbDaemonWebUsbDeviceManager {
|
|
|
38
49
|
* or `undefined` if the user cancelled the device picker.
|
|
39
50
|
*/
|
|
40
51
|
async requestDevice(
|
|
41
|
-
|
|
52
|
+
options: AdbDaemonWebUsbDeviceManager.RequestDeviceOptions = {},
|
|
42
53
|
): Promise<AdbDaemonWebUsbDevice | undefined> {
|
|
43
|
-
if (filters
|
|
54
|
+
if (!options.filters) {
|
|
55
|
+
options.filters = [ADB_DEFAULT_DEVICE_FILTER];
|
|
56
|
+
} else if (options.filters.length === 0) {
|
|
44
57
|
throw new TypeError("filters must not be empty");
|
|
45
58
|
}
|
|
46
59
|
|
|
47
60
|
try {
|
|
48
|
-
const device = await this.#usbManager.requestDevice(
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
return new AdbDaemonWebUsbDevice(
|
|
61
|
+
const device = await this.#usbManager.requestDevice(
|
|
62
|
+
options as USBDeviceRequestOptions,
|
|
63
|
+
);
|
|
64
|
+
return new AdbDaemonWebUsbDevice(
|
|
65
|
+
device,
|
|
66
|
+
options.filters,
|
|
67
|
+
this.#usbManager,
|
|
68
|
+
);
|
|
52
69
|
} catch (e) {
|
|
53
70
|
// No device selected
|
|
54
71
|
if (isErrorName(e, "NotFoundError")) {
|
|
@@ -96,7 +113,7 @@ export class AdbDaemonWebUsbDeviceManager {
|
|
|
96
113
|
}
|
|
97
114
|
if (
|
|
98
115
|
"serialNumber" in filter &&
|
|
99
|
-
device
|
|
116
|
+
getSerialNumber(device) !== filter.serialNumber
|
|
100
117
|
) {
|
|
101
118
|
continue;
|
|
102
119
|
}
|
package/src/utils.ts
CHANGED
|
@@ -44,3 +44,15 @@ export function findUsbAlternateInterface(
|
|
|
44
44
|
|
|
45
45
|
throw new Error("No matched alternate interface found");
|
|
46
46
|
}
|
|
47
|
+
|
|
48
|
+
function padNumber(value: number) {
|
|
49
|
+
return value.toString(16).padStart(4, "0");
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export function getSerialNumber(device: USBDevice) {
|
|
53
|
+
if (device.serialNumber) {
|
|
54
|
+
return device.serialNumber;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
return padNumber(device.vendorId) + "x" + padNumber(device.productId);
|
|
58
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"program":{"fileNames":["../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es5.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2015.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2016.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2017.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2018.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2019.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2020.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2021.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2022.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2023.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.esnext.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.dom.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2015.core.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2015.collection.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2015.generator.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2015.promise.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2017.object.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2017.string.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2017.intl.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2018.intl.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2018.promise.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2019.array.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2019.object.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2019.string.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2019.intl.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2020.date.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2020.promise.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2020.string.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2020.intl.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2020.number.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2021.promise.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2021.string.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2021.intl.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2022.array.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2022.error.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2022.intl.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2022.object.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2022.sharedmemory.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2022.string.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2022.regexp.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2023.array.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.esnext.intl.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.decorators.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.decorators.legacy.d.ts","../../common/temp/node_modules/.pnpm/tslib@2.6.0/node_modules/tslib/tslib.d.ts","../../common/temp/node_modules/.pnpm/tslib@2.6.0/node_modules/tslib/modules/index.d.ts","../struct/esm/basic/options.d.ts","../struct/esm/basic/struct-value.d.ts","../struct/esm/basic/field-value.d.ts","../struct/esm/utils.d.ts","../struct/esm/basic/stream.d.ts","../struct/esm/basic/definition.d.ts","../struct/esm/basic/index.d.ts","../struct/esm/types/bigint.d.ts","../struct/esm/types/buffer/base.d.ts","../struct/esm/types/buffer/fixed-length.d.ts","../struct/esm/types/buffer/variable-length.d.ts","../struct/esm/types/buffer/index.d.ts","../struct/esm/types/number.d.ts","../struct/esm/types/index.d.ts","../struct/esm/struct.d.ts","../struct/esm/sync-promise.d.ts","../struct/esm/index.d.ts","../../common/temp/node_modules/.pnpm/web-streams-polyfill@4.0.0-beta.3/node_modules/web-streams-polyfill/types/ponyfill.d.ts","../stream-extra/esm/stream.d.ts","../stream-extra/esm/buffered.d.ts","../stream-extra/esm/buffered-transform.d.ts","../stream-extra/esm/concat.d.ts","../stream-extra/esm/consumable.d.ts","../stream-extra/esm/decode-utf8.d.ts","../stream-extra/esm/distribution.d.ts","../stream-extra/esm/wrap-readable.d.ts","../stream-extra/esm/duplex.d.ts","../stream-extra/esm/inspect.d.ts","../stream-extra/esm/pipe-from.d.ts","../stream-extra/esm/push-readable.d.ts","../stream-extra/esm/split-string.d.ts","../stream-extra/esm/struct-deserialize.d.ts","../stream-extra/esm/struct-serialize.d.ts","../stream-extra/esm/wrap-writable.d.ts","../stream-extra/esm/index.d.ts","../adb/esm/features.d.ts","../adb/esm/banner.d.ts","../event/esm/disposable.d.ts","../event/esm/event.d.ts","../event/esm/event-emitter.d.ts","../event/esm/utils.d.ts","../event/esm/index.d.ts","../adb/esm/commands/base.d.ts","../adb/esm/commands/framebuffer.d.ts","../adb/esm/commands/power.d.ts","../adb/esm/commands/reverse.d.ts","../adb/esm/commands/subprocess/protocols/types.d.ts","../adb/esm/commands/subprocess/protocols/none.d.ts","../adb/esm/commands/subprocess/protocols/shell.d.ts","../adb/esm/commands/subprocess/protocols/index.d.ts","../adb/esm/commands/subprocess/command.d.ts","../adb/esm/commands/subprocess/utils.d.ts","../adb/esm/commands/subprocess/index.d.ts","../adb/esm/commands/sync/response.d.ts","../adb/esm/utils/auto-reset-event.d.ts","../adb/esm/utils/base64.d.ts","../adb/esm/utils/conditional-variable.d.ts","../adb/esm/utils/hex.d.ts","../adb/esm/utils/no-op.d.ts","../adb/esm/utils/index.d.ts","../adb/esm/commands/sync/socket.d.ts","../adb/esm/commands/sync/stat.d.ts","../adb/esm/commands/sync/list.d.ts","../adb/esm/commands/sync/pull.d.ts","../adb/esm/commands/sync/request.d.ts","../adb/esm/commands/sync/push.d.ts","../adb/esm/commands/sync/sync.d.ts","../adb/esm/commands/sync/index.d.ts","../adb/esm/commands/tcpip.d.ts","../adb/esm/commands/index.d.ts","../adb/esm/adb.d.ts","../adb/esm/daemon/packet.d.ts","../adb/esm/daemon/auth.d.ts","../adb/esm/daemon/crypto.d.ts","../adb/esm/daemon/device.d.ts","../adb/esm/daemon/dispatcher.d.ts","../adb/esm/daemon/socket.d.ts","../adb/esm/daemon/transport.d.ts","../adb/esm/daemon/index.d.ts","../adb/esm/server/transport.d.ts","../adb/esm/server/client.d.ts","../adb/esm/server/index.d.ts","../adb/esm/index.d.ts","./src/utils.ts","./src/device.ts","./src/manager.ts","./src/watcher.ts","./src/index.ts","../../common/temp/node_modules/.pnpm/@types+w3c-web-usb@1.0.6/node_modules/@types/w3c-web-usb/index.d.ts"],"fileInfos":[{"version":"f59215c5f1d886b05395ee7aca73e0ac69ddfad2843aa88530e797879d511bad","affectsGlobalScope":true,"impliedFormat":1},{"version":"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","impliedFormat":1},{"version":"dc48272d7c333ccf58034c0026162576b7d50ea0e69c3b9292f803fc20720fd5","impliedFormat":1},{"version":"27147504487dc1159369da4f4da8a26406364624fa9bc3db632f7d94a5bae2c3","impliedFormat":1},{"version":"5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","impliedFormat":1},{"version":"68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","impliedFormat":1},{"version":"5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4","impliedFormat":1},{"version":"feecb1be483ed332fad555aff858affd90a48ab19ba7272ee084704eb7167569","impliedFormat":1},{"version":"5514e54f17d6d74ecefedc73c504eadffdeda79c7ea205cf9febead32d45c4bc","impliedFormat":1},{"version":"f4e736d6c8d69ae5b3ab0ddfcaa3dc365c3e76909d6660af5b4e979b3934ac20","impliedFormat":1},{"version":"eeeb3aca31fbadef8b82502484499dfd1757204799a6f5b33116201c810676ec","impliedFormat":1},{"version":"3dda5344576193a4ae48b8d03f105c86f20b2f2aff0a1d1fd7935f5d68649654","affectsGlobalScope":true,"impliedFormat":1},{"version":"9d9885c728913c1d16e0d2831b40341d6ad9a0ceecaabc55209b306ad9c736a5","affectsGlobalScope":true,"impliedFormat":1},{"version":"17bea081b9c0541f39dd1ae9bc8c78bdd561879a682e60e2f25f688c0ecab248","affectsGlobalScope":true,"impliedFormat":1},{"version":"4443e68b35f3332f753eacc66a04ac1d2053b8b035a0e0ac1d455392b5e243b3","affectsGlobalScope":true,"impliedFormat":1},{"version":"ab22100fdd0d24cfc2cc59d0a00fc8cf449830d9c4030dc54390a46bd562e929","affectsGlobalScope":true,"impliedFormat":1},{"version":"f7bd636ae3a4623c503359ada74510c4005df5b36de7f23e1db8a5c543fd176b","affectsGlobalScope":true,"impliedFormat":1},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true,"impliedFormat":1},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true,"impliedFormat":1},{"version":"0c20f4d2358eb679e4ae8a4432bdd96c857a2960fd6800b21ec4008ec59d60ea","affectsGlobalScope":true,"impliedFormat":1},{"version":"36ae84ccc0633f7c0787bc6108386c8b773e95d3b052d9464a99cd9b8795fbec","affectsGlobalScope":true,"impliedFormat":1},{"version":"82d0d8e269b9eeac02c3bd1c9e884e85d483fcb2cd168bccd6bc54df663da031","affectsGlobalScope":true,"impliedFormat":1},{"version":"b8deab98702588840be73d67f02412a2d45a417a3c097b2e96f7f3a42ac483d1","affectsGlobalScope":true,"impliedFormat":1},{"version":"4738f2420687fd85629c9efb470793bb753709c2379e5f85bc1815d875ceadcd","affectsGlobalScope":true,"impliedFormat":1},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true,"impliedFormat":1},{"version":"376d554d042fb409cb55b5cbaf0b2b4b7e669619493c5d18d5fa8bd67273f82a","affectsGlobalScope":true,"impliedFormat":1},{"version":"9fc46429fbe091ac5ad2608c657201eb68b6f1b8341bd6d670047d32ed0a88fa","affectsGlobalScope":true,"impliedFormat":1},{"version":"61c37c1de663cf4171e1192466e52c7a382afa58da01b1dc75058f032ddf0839","affectsGlobalScope":true,"impliedFormat":1},{"version":"c4138a3dd7cd6cf1f363ca0f905554e8d81b45844feea17786cdf1626cb8ea06","affectsGlobalScope":true,"impliedFormat":1},{"version":"6ff3e2452b055d8f0ec026511c6582b55d935675af67cdb67dd1dc671e8065df","affectsGlobalScope":true,"impliedFormat":1},{"version":"03de17b810f426a2f47396b0b99b53a82c1b60e9cba7a7edda47f9bb077882f4","affectsGlobalScope":true,"impliedFormat":1},{"version":"8184c6ddf48f0c98429326b428478ecc6143c27f79b79e85740f17e6feb090f1","affectsGlobalScope":true,"impliedFormat":1},{"version":"261c4d2cf86ac5a89ad3fb3fafed74cbb6f2f7c1d139b0540933df567d64a6ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"6af1425e9973f4924fca986636ac19a0cf9909a7e0d9d3009c349e6244e957b6","affectsGlobalScope":true,"impliedFormat":1},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true,"impliedFormat":1},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true,"impliedFormat":1},{"version":"15a630d6817718a2ddd7088c4f83e4673fde19fa992d2eae2cf51132a302a5d3","affectsGlobalScope":true,"impliedFormat":1},{"version":"f06948deb2a51aae25184561c9640fb66afeddb34531a9212d011792b1d19e0a","affectsGlobalScope":true,"impliedFormat":1},{"version":"01e0ee7e1f661acedb08b51f8a9b7d7f959e9cdb6441360f06522cc3aea1bf2e","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac17a97f816d53d9dd79b0d235e1c0ed54a8cc6a0677e9a3d61efb480b2a3e4e","affectsGlobalScope":true,"impliedFormat":1},{"version":"bf14a426dbbf1022d11bd08d6b8e709a2e9d246f0c6c1032f3b2edb9a902adbe","affectsGlobalScope":true,"impliedFormat":1},{"version":"ec0104fee478075cb5171e5f4e3f23add8e02d845ae0165bfa3f1099241fa2aa","affectsGlobalScope":true,"impliedFormat":1},{"version":"2b72d528b2e2fe3c57889ca7baef5e13a56c957b946906d03767c642f386bbc3","affectsGlobalScope":true,"impliedFormat":1},{"version":"9cc66b0513ad41cb5f5372cca86ef83a0d37d1c1017580b7dace3ea5661836df","affectsGlobalScope":true,"impliedFormat":1},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true,"impliedFormat":1},{"version":"709efdae0cb5df5f49376cde61daacc95cdd44ae4671da13a540da5088bf3f30","affectsGlobalScope":true,"impliedFormat":1},{"version":"995c005ab91a498455ea8dfb63aa9f83fa2ea793c3d8aa344be4a1678d06d399","affectsGlobalScope":true,"impliedFormat":1},{"version":"61ed9b6d07af959e745fb11f9593ecd743b279418cc8a99448ea3cd5f3b3eb22","affectsGlobalScope":true,"impliedFormat":1},{"version":"038a2f66a34ee7a9c2fbc3584c8ab43dff2995f8c68e3f566f4c300d2175e31e","affectsGlobalScope":true,"impliedFormat":1},{"version":"4fa6ed14e98aa80b91f61b9805c653ee82af3502dc21c9da5268d3857772ca05","affectsGlobalScope":true,"impliedFormat":1},{"version":"f5c92f2c27b06c1a41b88f6db8299205aee52c2a2943f7ed29bd585977f254e8","affectsGlobalScope":true,"impliedFormat":1},{"version":"930b0e15811f84e203d3c23508674d5ded88266df4b10abee7b31b2ac77632d2","affectsGlobalScope":true,"impliedFormat":1},{"version":"8444af78980e3b20b49324f4a16ba35024fef3ee069a0eb67616ea6ca821c47a","affectsGlobalScope":true,"impliedFormat":1},{"version":"b9ea5778ff8b50d7c04c9890170db34c26a5358cccba36844fe319f50a43a61a","affectsGlobalScope":true,"impliedFormat":1},{"version":"3287d9d085fbd618c3971944b65b4be57859f5415f495b33a6adc994edd2f004","affectsGlobalScope":true,"impliedFormat":1},{"version":"50d53ccd31f6667aff66e3d62adf948879a3a16f05d89882d1188084ee415bbc","affectsGlobalScope":true,"impliedFormat":1},{"version":"25de46552b782d43cb7284df22fe2a265de387cf0248b747a7a1b647d81861f6","affectsGlobalScope":true,"impliedFormat":1},{"version":"307c8b7ebbd7f23a92b73a4c6c0a697beca05b06b036c23a34553e5fe65e4fdc","affectsGlobalScope":true,"impliedFormat":1},{"version":"189c0703923150aa30673fa3de411346d727cc44a11c75d05d7cf9ef095daa22","affectsGlobalScope":true,"impliedFormat":1},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true,"impliedFormat":1},{"version":"7a1971efcba559ea9002ada4c4e3c925004fb67a755300d53b5edf9399354900","impliedFormat":1},{"version":"31973b272be35eab5ecf20a38ea54bec84cdc0317117590cb813c72fe0ef75b3","impliedFormat":99},{"version":"7ceac7d7800ef7065908464aba0a009e9a03ff95f177a44f999687bdf10d039f","impliedFormat":99},{"version":"6043ab81faab77b975cb2a8457cc28c3b6f90a766cbbd27914da686bc41c83a0","impliedFormat":99},{"version":"613051be0c04c0fadf883f5ec01dcb0a4639ac92d9e2c12a222680c91b374595","impliedFormat":99},{"version":"a740a1e2d889fc4344fbb49a7f8b02ee664850be5cdcf029ace8ceb4316623db","impliedFormat":99},{"version":"ffe3c0472cf0ad60edbf5037319135c645bd92e7acbf403d72101df3598258e0","impliedFormat":99},{"version":"64ebe41006e87ea8b5e9b3acf048018b5226c4b08c6575526a76f6801143bf90","impliedFormat":99},{"version":"5af3b8b1a9063e033fc1e32a3e95956f5f5e22548d5ccca628b1ab87e42087d1","impliedFormat":99},{"version":"2414e378fb9e46fe36d8a0f4fb7af126441078299c03a46096713b03a5f6571d","impliedFormat":99},{"version":"1ed47fe653ec1bbcbd8ed241873938642755f2917f9e9a2e78daef11519f0745","impliedFormat":99},{"version":"4e74287ad61c1544e88339e78a4da19cb79c729be8799b8cd190353368532e30","impliedFormat":99},{"version":"21a136c72551be7c24d797d4fa1401d35ee62325bec7442a6869cea50a50ad7a","impliedFormat":99},{"version":"5ea1325a998e722fffc89ff8c2d00eaf35e491f3fada16fb56c6360f63d16d79","impliedFormat":99},{"version":"2f50c2700b3397c9961c1e14b903d0ff1120e064755603740cecdcdf3b05d20f","impliedFormat":99},{"version":"e24d67437856c921a9a40f7fbac38ac576439e6616eb698fb769279ecbc7802a","impliedFormat":99},{"version":"cff4f19e514fccc06aafecb44d2c6b10516d604d2972da407fa38d344872389e","impliedFormat":99},{"version":"15cc3dd9a039f8ba1628d1e27cdf4b45582fc387a4241ebb65eff1786b89f522","impliedFormat":99},{"version":"01056fd3092681e2f1c0cb0e1fec91ac081b5bb758551494fca1c1d27f06c2b4","affectsGlobalScope":true,"impliedFormat":99},{"version":"19c2d8da51e4944a19e0ca377df3fd9d249dd8f9cab9544632fb8d10a72808f7","impliedFormat":1},{"version":"a387648b45b3d02c838a213809bf7aa3a3c6e009b0cfedbbb98e7863219fd0b4","impliedFormat":99},{"version":"d189c9a6203dd8c814cbabb78ee77ec7f806a8c4f92c4029e8c84cf4d3b69013","impliedFormat":99},{"version":"7e9aecc83330a5c15b10f8995dfce2e1004f9bbdd0c4a9df18e8483facd76703","impliedFormat":99},{"version":"f2afaf5947dd98685a6b7996b57d7fedd13a04ca95820e6d8e1db0e6ec6d24ae","impliedFormat":99},{"version":"280386331ba739ec12261d42474f90f2d98214f9ac87ecad4be0585507acd937","impliedFormat":99},{"version":"316d7bdfb430fa119cbd460e01ffbf726321a5e54575c22b70e8ff56241d849a","impliedFormat":99},{"version":"d5a938d49803873c6de2daa0e81fa87ab44eee5259df765345932a28ecfb64fc","impliedFormat":99},{"version":"6642b7e23799bfb100805fbde097790a6484bd375c2c75dc18da086639f8b7e5","impliedFormat":99},{"version":"f4be8f5f1fbf13b24da4b2141e124c000750454d5168544c27352631e4edccd9","impliedFormat":99},{"version":"4ebc57d20caf062019a2b8c9ce1e54602a411022eb4f7fa325888b9bcf63693a","impliedFormat":99},{"version":"662cafdf363d512eff0d6c525c711684dba726ac5f4d09f473110a05c8ecd8e5","impliedFormat":99},{"version":"86c62ba4f3279d13647e2901b8819c9b32f4eb9645d50d02b4d60e5521f693db","impliedFormat":99},{"version":"98678d6ac29dfa3f80452de2a87f464dee4908476f817d6f5e0677802ad43f7b","impliedFormat":99},{"version":"057f28f1e4c53bfdc397099ee4bf873ef32f26a938a135881b19bf10f968a805","impliedFormat":99},{"version":"d00e790b0d3738482ddb18bb446210b41019520dd32438570d6bc533f7b95239","impliedFormat":99},{"version":"c4e45ef293b9b228aad0d51acb0ef0397dad22a3454b3f6f751b6de1ac9e11e0","impliedFormat":99},{"version":"4665f7e4f0fa5900321d33f85d167ad7653b758ea654e5b6cd63481c6592f7df","impliedFormat":99},{"version":"020962899646e5e2efc7100d1a0c443be16800cef6f2cada68c20fe8de585d43","impliedFormat":99},{"version":"48b65aae077c0a25bef9982871b488aebd4161768ee8bb88b9cc0d4736e15644","impliedFormat":99},{"version":"207ecf493b69ddca525bbbd8f1d120d99d00be1448ae8c0e690526f24dc182ca","impliedFormat":99},{"version":"af6ac8a19dbd05c34feff97d0eae81194fd0be1358bd2366478e9a574492d332","impliedFormat":99},{"version":"a21c587d34edbe9808b8f4fac207d190f802687b477ef55ee0f494d79a427f31","impliedFormat":99},{"version":"f00b8fc0c970cfd54d4df6047aae216bce4d7a2ceb6610655541a678ac54c57a","impliedFormat":99},{"version":"11fd6a023d60896a902933f64a2c8363102e5276838dbe29aa02a24c2e69fbd1","impliedFormat":99},{"version":"d5664fad55c16b09f4fbda92412a3c0d99c5e143434a5a82dc0f86d0823014ae","impliedFormat":99},{"version":"893c62f5b340f9462a6cd3ce6f40f7f97ecca7c82f6f36c03bbb81128ac14d04","impliedFormat":99},{"version":"18d3ba92c8cd5b0dc0413aa76efde4892c1095c865a6590560f4e30679a31afb","impliedFormat":99},{"version":"22a65c300fb8989d8c282e949c1219ba70ec4a7542136629d75072b0c191539f","impliedFormat":99},{"version":"8b686124fd8d7102d8c2293311e0b9b2d48ddae7d88fe0688841b3f440eaef55","impliedFormat":99},{"version":"3662463ad80a475e0e31f0d909c04036e9dc5e4b63141396db38795f6ec20edb","impliedFormat":99},{"version":"eb5828be18865d34ea3049afc3679267661a290b9858e2cd2866387c70b981ef","impliedFormat":99},{"version":"721313e1405531faa6e144e78ad3561023150692fbbcc23a4db9c2bda7e2b292","impliedFormat":99},{"version":"aa47cec7289f9c0181d51f2d867f4d5b230715b2433eea83d40e9865b8576de3","impliedFormat":99},{"version":"3651947da5192aa0655f8a24ca016b3fb0a65bf24950cf52176d8972c7c32785","impliedFormat":99},{"version":"98da7969aa8079a6625791fdb0806f2cb125ae398bccd84e8cb8a76c454aac93","impliedFormat":99},{"version":"57f322a340ec262ca5781c1b58497188bef8e646aa59a2c6ccc82df5d94c3a48","impliedFormat":99},{"version":"40471ac4c2b6056bdc7ee09f1f279345d8fcc40b8b326eac38cff2df37ece97a","impliedFormat":99},{"version":"c82303f9ddeb0df5c2853ba02e9f1603ad0f01200225e6ee4cb2da53757243c0","impliedFormat":99},{"version":"8923bb9bac8a80132bbf1510facaa96198df1de6df035b77b5a81b681c5fba70","impliedFormat":99},{"version":"390d45fe0b15286282624b4646ac3267a601bf47154e2809cc9c12762d13223b","impliedFormat":99},{"version":"6bfed074c652e8043dfc926842ebc05f81db6c0c45b521e4bedc9dd8998df736","impliedFormat":99},{"version":"9fca5e617704571d97a09c9d6bafd115ecfdf54e9b719b263bd77cc7820e1e7a","impliedFormat":99},{"version":"70b75c9c14d3ceebb09a8be5b7bb06240e276253e6c2269ad9f178240aa75f87","impliedFormat":99},{"version":"8fc0d6a1e97a1fcd37ebdb72241e4608652a69e1a963ca662d1429750cf04f73","impliedFormat":99},{"version":"8f70945f7ea3ad857863b6035d2ac1fdf1b6793c6a2ca74ce89508f82be4dc29","impliedFormat":99},{"version":"85e159ffc1676583a00e26cdae8f40fa3139e32c89aa7ecbc725e120a8db1418","impliedFormat":99},{"version":"ea4d0669fa41158a8ae4dfbcb9f690f3177edd29c83a4cf01b74a4db24c5dcc8","impliedFormat":99},{"version":"3a908670fbb5fa07652421362e908b98e3abb854dc07b036dcdf800b919901b4","impliedFormat":99},{"version":"15903e848be32baf0039e02e7a4bb64c9169d75f3ae4dd9785b0e7aea8f83ba7","impliedFormat":99},{"version":"eb90fe18be0b3b5b759ff8f055e9ccb19c6a4287c9061c7a4bb9805968e46498","impliedFormat":99},{"version":"d73ce6a51a42271a54f27cd4bbc0a1aa9897882a83f35c3ce1a611578305bc11","impliedFormat":99},{"version":"055d5c58abf9c069d88cd9f62a426008adc38258390ceba978fa527fffa54441","impliedFormat":99},{"version":"68c6f49fb343f5d2f50514d6768fbe45d80906cde2ea9b11270640f7f7ae3a87","impliedFormat":99},{"version":"78ab431a811184547b55f5f0af6f2d2859f5e638b2665bccb5efee2f2d947325","impliedFormat":99},{"version":"c5a0d25aae8e65ee55e8bf5e1210e38d902a3eec76d6ef6c7c613a7541f940d1","impliedFormat":99},{"version":"8ec40582c992093bdc404d6d4d21459d31cc4cbd761f738979ba31f2d054cedd","impliedFormat":99},{"version":"2943c4190d96fc3a3ec84acbd89b8467572facc49459a9727cbd48acb5581c0e","impliedFormat":99},{"version":"6bf6be42974564ca2602f155f9e6156114ac920512ffcdfdc91cdda27f816596","impliedFormat":99},{"version":"9f66fed7e4054627742901d37ed23b83e283fa4b032c4d132670cf284b8e9165","impliedFormat":99},{"version":"c1271601cf6c43a80fdd5b0b12672b62bb7215909da98e62de501ce69930870f","impliedFormat":99},{"version":"6651e0e8d0a95ccab2cd3b24df4ea6c33da06499f588938f8758d2d3e822090a","impliedFormat":99},{"version":"2dfefff9f09ec7460c4ca86b1c5e5d2cfa0fe9a2a1613916b74a6a4949ea26cc","impliedFormat":99},{"version":"74cd613e6eae8d673e2198d877583ddff7879d52ba5a94b3dc35d8da0800f199","impliedFormat":99},{"version":"25cbd0baaecc32efabbed23767498e3cd2ebfc8f7a222866efe1e580f08f526b","impliedFormat":99},{"version":"af7d6189331b10c030322f3dc7e600466126bad616f098bda0fce116c7dd09c2","impliedFormat":99},{"version":"8841544c8b1b552a2eb005ce51ec03c3b76e55a020199e029e683d645b994af4","signature":"5880148b7628f44eac1f32b905815872261d19b639f8ba45772ef263983d962d","impliedFormat":99},{"version":"9704b9f5248e293ba3212d17487acd2d611635a3e082f4203e6703742434d4f1","signature":"590e4cf12b4184de031367f406075363c76603d9ae8798849d878fd3d82962e9","impliedFormat":99},{"version":"afc70a075f4960a08439ab8b80e5117f0743523e1c9d6e66edfc1a93547c20aa","signature":"8911f91f6513ffecff496fbaafdfb61c6afed546365aab1c03ca1a11e7509c15","impliedFormat":99},{"version":"240e3cb9d759a7cbd03f14aa9f626e47a2e90b7a4d7b6a4b5acce4e73e8a2f62","signature":"9f24774a679b2729667c3334929403af981ecb7fd03a6ec33a56eadfe2c658c8","impliedFormat":99},{"version":"4e6e61be5afdc113e504c2b51e235fe7e1b809bcd8c174aff02e5d3e602fc680","impliedFormat":99},{"version":"dc409f321fd996ae183ff5da8ddd2d6d8a9b234b340e3300fad92bfd8390f48c","affectsGlobalScope":true,"impliedFormat":1}],"root":[[146,150]],"options":{"composite":true,"declaration":true,"declarationDir":"./esm","declarationMap":true,"esModuleInterop":true,"exactOptionalPropertyTypes":true,"importHelpers":true,"module":199,"noFallthroughCasesInSwitch":true,"noImplicitAny":true,"noImplicitOverride":true,"noImplicitReturns":true,"noImplicitThis":true,"noUncheckedIndexedAccess":true,"noUnusedLocals":true,"outDir":"./esm","rootDir":"./src","skipLibCheck":true,"sourceMap":true,"strict":true,"stripInternal":true,"target":99},"fileIdsList":[[61],[62,79,97,145,146],[62,146,147,148,149],[62,146,147],[62],[79,97,98,99,132],[98],[104,133],[79,133],[105,106,107,108,115,130,131],[105],[97,104,133],[105,112],[112,113,114],[109,110,111],[97,109,133],[79,97,109,133],[79,97,133],[116,123,124,125,126,127,128,129],[79,116,123,124],[79,97,116,123],[79,97,123,124,127],[79],[79,97,122,133],[79,116,123],[97,104,116,123,124,125,133],[79,104,134],[79,97,134],[97,133,134],[134,135,136,137,138,139,140],[79,97],[97,104,133,138],[79,97,99,133,134,135],[98,99,122,132,133,141,144],[79,97,98,133,142],[142,143],[79,99,133,143],[104],[79,117,118,119,120,121],[100,101],[100],[100,101,102,103],[101],[79,81,82],[79,81],[81],[85],[79,81,88],[81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96],[80,81],[80],[79,83],[63,64,65,67],[63,64,68],[63,64,65,67,68],[66],[65],[66,69,76,77,78],[66,69,76],[69],[71],[71,72,73],[66,69,71],[70,74,75],[97,145,146],[146,147]],"referencedMap":[[62,1],[147,2],[150,3],[148,4],[146,5],[149,5],[133,6],[99,7],[105,8],[106,9],[132,10],[107,11],[108,12],[113,13],[115,14],[112,15],[110,16],[111,17],[109,18],[130,19],[125,20],[126,21],[128,22],[127,23],[116,23],[123,24],[124,25],[129,26],[131,11],[135,27],[137,28],[138,29],[141,30],[134,31],[139,32],[140,33],[145,34],[143,35],[144,36],[142,37],[117,38],[119,38],[122,39],[102,40],[101,41],[104,42],[103,43],[83,44],[82,45],[84,46],[85,46],[86,46],[87,47],[89,48],[97,49],[90,46],[91,50],[92,46],[93,46],[81,51],[94,52],[95,45],[88,45],[96,45],[68,53],[65,54],[69,55],[67,56],[64,57],[79,58],[77,59],[70,60],[71,60],[72,61],[74,62],[73,63],[76,64],[75,60]],"exportedModulesMap":[[62,1],[147,65],[150,3],[148,66],[133,6],[99,7],[105,8],[106,9],[132,10],[107,11],[108,12],[113,13],[115,14],[112,15],[110,16],[111,17],[109,18],[130,19],[125,20],[126,21],[128,22],[127,23],[116,23],[123,24],[124,25],[129,26],[131,11],[135,27],[137,28],[138,29],[141,30],[134,31],[139,32],[140,33],[145,34],[143,35],[144,36],[142,37],[117,38],[119,38],[122,39],[102,40],[101,41],[104,42],[103,43],[83,44],[82,45],[84,46],[85,46],[86,46],[87,47],[89,48],[97,49],[90,46],[91,50],[92,46],[93,46],[81,51],[94,52],[95,45],[88,45],[96,45],[68,53],[65,54],[69,55],[67,56],[64,57],[79,58],[77,59],[70,60],[71,60],[72,61],[74,62],[73,63],[76,64],[75,60]],"semanticDiagnosticsPerFile":[151,62,61,59,60,12,14,13,2,15,16,17,18,19,20,21,22,3,4,26,23,24,25,27,28,29,5,30,31,32,33,6,37,34,35,36,38,7,39,44,45,40,41,42,43,8,49,46,47,48,50,9,51,52,53,56,54,55,57,10,1,11,58,80,147,150,148,146,149,133,99,105,106,132,107,108,113,115,112,110,111,109,114,130,125,126,128,127,116,123,124,129,131,135,136,137,138,141,134,139,140,98,145,143,144,142,117,118,119,120,122,121,100,102,101,104,103,83,82,84,85,86,87,89,97,90,91,92,93,81,94,95,88,96,68,65,69,63,67,64,79,77,78,70,71,72,74,73,76,75,66],"latestChangedDtsFile":"./esm/index.d.ts"},"version":"5.1.6"}
|
|
1
|
+
{"program":{"fileNames":["../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es5.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2015.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2016.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2017.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2018.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2019.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2020.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2021.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2022.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2023.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.esnext.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.dom.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2015.core.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2015.collection.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2015.generator.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2015.promise.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2016.intl.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2017.date.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2017.object.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2017.string.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2017.intl.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2018.intl.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2018.promise.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2019.array.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2019.object.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2019.string.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2019.intl.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2020.date.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2020.promise.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2020.string.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2020.intl.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2020.number.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2021.promise.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2021.string.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2021.intl.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2022.array.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2022.error.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2022.intl.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2022.object.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2022.sharedmemory.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2022.string.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2022.regexp.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2023.array.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.es2023.collection.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.esnext.collection.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.esnext.intl.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.esnext.disposable.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.esnext.promise.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.esnext.decorators.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.esnext.object.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.decorators.d.ts","../../common/temp/node_modules/.pnpm/typescript@5.4.2/node_modules/typescript/lib/lib.decorators.legacy.d.ts","../../common/temp/node_modules/.pnpm/tslib@2.6.2/node_modules/tslib/tslib.d.ts","../../common/temp/node_modules/.pnpm/tslib@2.6.2/node_modules/tslib/modules/index.d.ts","../struct/esm/basic/options.d.ts","../struct/esm/basic/struct-value.d.ts","../struct/esm/basic/field-value.d.ts","../struct/esm/utils.d.ts","../struct/esm/basic/stream.d.ts","../struct/esm/basic/definition.d.ts","../struct/esm/basic/index.d.ts","../struct/esm/types/bigint.d.ts","../struct/esm/types/buffer/base.d.ts","../struct/esm/types/buffer/fixed-length.d.ts","../struct/esm/types/buffer/variable-length.d.ts","../struct/esm/types/buffer/index.d.ts","../struct/esm/types/number.d.ts","../struct/esm/types/index.d.ts","../struct/esm/struct.d.ts","../struct/esm/sync-promise.d.ts","../struct/esm/index.d.ts","../stream-extra/esm/types.d.ts","../stream-extra/esm/stream.d.ts","../stream-extra/esm/buffered.d.ts","../stream-extra/esm/buffered-transform.d.ts","../stream-extra/esm/concat.d.ts","../stream-extra/esm/consumable.d.ts","../stream-extra/esm/decode-utf8.d.ts","../stream-extra/esm/distribution.d.ts","../stream-extra/esm/wrap-readable.d.ts","../stream-extra/esm/duplex.d.ts","../stream-extra/esm/inspect.d.ts","../stream-extra/esm/pipe-from.d.ts","../stream-extra/esm/push-readable.d.ts","../stream-extra/esm/split-string.d.ts","../stream-extra/esm/struct-deserialize.d.ts","../stream-extra/esm/struct-serialize.d.ts","../stream-extra/esm/wrap-writable.d.ts","../stream-extra/esm/index.d.ts","../adb/esm/features.d.ts","../adb/esm/banner.d.ts","../event/esm/disposable.d.ts","../event/esm/event.d.ts","../event/esm/event-emitter.d.ts","../event/esm/utils.d.ts","../event/esm/index.d.ts","../adb/esm/commands/base.d.ts","../adb/esm/commands/framebuffer.d.ts","../adb/esm/commands/power.d.ts","../adb/esm/commands/reverse.d.ts","../adb/esm/commands/subprocess/protocols/types.d.ts","../adb/esm/commands/subprocess/protocols/none.d.ts","../adb/esm/commands/subprocess/protocols/shell.d.ts","../adb/esm/commands/subprocess/protocols/index.d.ts","../adb/esm/commands/subprocess/command.d.ts","../adb/esm/commands/subprocess/utils.d.ts","../adb/esm/commands/subprocess/index.d.ts","../adb/esm/commands/sync/response.d.ts","../adb/esm/utils/auto-reset-event.d.ts","../adb/esm/utils/base64.d.ts","../adb/esm/utils/conditional-variable.d.ts","../adb/esm/utils/hex.d.ts","../adb/esm/utils/no-op.d.ts","../adb/esm/utils/index.d.ts","../adb/esm/commands/sync/socket.d.ts","../adb/esm/commands/sync/stat.d.ts","../adb/esm/commands/sync/list.d.ts","../adb/esm/commands/sync/pull.d.ts","../adb/esm/commands/sync/request.d.ts","../adb/esm/commands/sync/push.d.ts","../adb/esm/commands/sync/sync.d.ts","../adb/esm/commands/sync/index.d.ts","../adb/esm/commands/tcpip.d.ts","../adb/esm/commands/index.d.ts","../adb/esm/adb.d.ts","../adb/esm/daemon/packet.d.ts","../adb/esm/daemon/auth.d.ts","../adb/esm/daemon/crypto.d.ts","../adb/esm/daemon/device.d.ts","../adb/esm/daemon/dispatcher.d.ts","../adb/esm/daemon/socket.d.ts","../adb/esm/daemon/transport.d.ts","../adb/esm/daemon/index.d.ts","../adb/esm/server/transport.d.ts","../adb/esm/server/client.d.ts","../adb/esm/server/index.d.ts","../adb/esm/index.d.ts","./src/utils.ts","./src/device.ts","./src/manager.ts","./src/watcher.ts","./src/index.ts","../../common/temp/node_modules/.pnpm/@types+w3c-web-usb@1.0.10/node_modules/@types/w3c-web-usb/index.d.ts"],"fileInfos":[{"version":"824cb491a40f7e8fdeb56f1df5edf91b23f3e3ee6b4cde84d4a99be32338faee","affectsGlobalScope":true,"impliedFormat":1},{"version":"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","impliedFormat":1},{"version":"3facaf05f0c5fc569c5649dd359892c98a85557e3e0c847964caeb67076f4d75","impliedFormat":1},{"version":"9a68c0c07ae2fa71b44384a839b7b8d81662a236d4b9ac30916718f7510b1b2d","impliedFormat":1},{"version":"5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","impliedFormat":1},{"version":"68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","impliedFormat":1},{"version":"5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4","impliedFormat":1},{"version":"feecb1be483ed332fad555aff858affd90a48ab19ba7272ee084704eb7167569","impliedFormat":1},{"version":"5514e54f17d6d74ecefedc73c504eadffdeda79c7ea205cf9febead32d45c4bc","impliedFormat":1},{"version":"1c0cdb8dc619bc549c3e5020643e7cf7ae7940058e8c7e5aefa5871b6d86f44b","impliedFormat":1},{"version":"886e50ef125efb7878f744e86908884c0133e7a6d9d80013f421b0cd8fb2af94","impliedFormat":1},{"version":"87d693a4920d794a73384b3c779cadcb8548ac6945aa7a925832fe2418c9527a","affectsGlobalScope":true,"impliedFormat":1},{"version":"138fb588d26538783b78d1e3b2c2cc12d55840b97bf5e08bca7f7a174fbe2f17","affectsGlobalScope":true,"impliedFormat":1},{"version":"dc2df20b1bcdc8c2d34af4926e2c3ab15ffe1160a63e58b7e09833f616efff44","affectsGlobalScope":true,"impliedFormat":1},{"version":"4443e68b35f3332f753eacc66a04ac1d2053b8b035a0e0ac1d455392b5e243b3","affectsGlobalScope":true,"impliedFormat":1},{"version":"bc47685641087c015972a3f072480889f0d6c65515f12bd85222f49a98952ed7","affectsGlobalScope":true,"impliedFormat":1},{"version":"0dc1e7ceda9b8b9b455c3a2d67b0412feab00bd2f66656cd8850e8831b08b537","affectsGlobalScope":true,"impliedFormat":1},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true,"impliedFormat":1},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ff2a353abf8a80ee399af572debb8faab2d33ad38c4b4474cff7f26e7653b8d","affectsGlobalScope":true,"impliedFormat":1},{"version":"93495ff27b8746f55d19fcbcdbaccc99fd95f19d057aed1bd2c0cafe1335fbf0","affectsGlobalScope":true,"impliedFormat":1},{"version":"6fc23bb8c3965964be8c597310a2878b53a0306edb71d4b5a4dfe760186bcc01","affectsGlobalScope":true,"impliedFormat":1},{"version":"ea011c76963fb15ef1cdd7ce6a6808b46322c527de2077b6cfdf23ae6f5f9ec7","affectsGlobalScope":true,"impliedFormat":1},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true,"impliedFormat":1},{"version":"bb42a7797d996412ecdc5b2787720de477103a0b2e53058569069a0e2bae6c7e","affectsGlobalScope":true,"impliedFormat":1},{"version":"4738f2420687fd85629c9efb470793bb753709c2379e5f85bc1815d875ceadcd","affectsGlobalScope":true,"impliedFormat":1},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true,"impliedFormat":1},{"version":"4de680d5bb41c17f7f68e0419412ca23c98d5749dcaaea1896172f06435891fc","affectsGlobalScope":true,"impliedFormat":1},{"version":"9fc46429fbe091ac5ad2608c657201eb68b6f1b8341bd6d670047d32ed0a88fa","affectsGlobalScope":true,"impliedFormat":1},{"version":"61c37c1de663cf4171e1192466e52c7a382afa58da01b1dc75058f032ddf0839","affectsGlobalScope":true,"impliedFormat":1},{"version":"b541a838a13f9234aba650a825393ffc2292dc0fc87681a5d81ef0c96d281e7a","affectsGlobalScope":true,"impliedFormat":1},{"version":"b20fe0eca9a4e405f1a5ae24a2b3290b37cf7f21eba6cbe4fc3fab979237d4f3","affectsGlobalScope":true,"impliedFormat":1},{"version":"811ec78f7fefcabbda4bfa93b3eb67d9ae166ef95f9bff989d964061cbf81a0c","affectsGlobalScope":true,"impliedFormat":1},{"version":"717937616a17072082152a2ef351cb51f98802fb4b2fdabd32399843875974ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"d7e7d9b7b50e5f22c915b525acc5a49a7a6584cf8f62d0569e557c5cfc4b2ac2","affectsGlobalScope":true,"impliedFormat":1},{"version":"71c37f4c9543f31dfced6c7840e068c5a5aacb7b89111a4364b1d5276b852557","affectsGlobalScope":true,"impliedFormat":1},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true,"impliedFormat":1},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true,"impliedFormat":1},{"version":"49ed889be54031e1044af0ad2c603d627b8bda8b50c1a68435fe85583901d072","affectsGlobalScope":true,"impliedFormat":1},{"version":"e93d098658ce4f0c8a0779e6cab91d0259efb88a318137f686ad76f8410ca270","affectsGlobalScope":true,"impliedFormat":1},{"version":"063600664504610fe3e99b717a1223f8b1900087fab0b4cad1496a114744f8df","affectsGlobalScope":true,"impliedFormat":1},{"version":"934019d7e3c81950f9a8426d093458b65d5aff2c7c1511233c0fd5b941e608ab","affectsGlobalScope":true,"impliedFormat":1},{"version":"bf14a426dbbf1022d11bd08d6b8e709a2e9d246f0c6c1032f3b2edb9a902adbe","affectsGlobalScope":true,"impliedFormat":1},{"version":"5e07ed3809d48205d5b985642a59f2eba47c402374a7cf8006b686f79efadcbd","affectsGlobalScope":true,"impliedFormat":1},{"version":"2b72d528b2e2fe3c57889ca7baef5e13a56c957b946906d03767c642f386bbc3","affectsGlobalScope":true,"impliedFormat":1},{"version":"8073890e29d2f46fdbc19b8d6d2eb9ea58db9a2052f8640af20baff9afbc8640","affectsGlobalScope":true,"impliedFormat":1},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true,"impliedFormat":1},{"version":"af3dd424cf267428f30ccfc376f47a2c0114546b55c44d8c0f1d57d841e28d74","affectsGlobalScope":true,"impliedFormat":1},{"version":"995c005ab91a498455ea8dfb63aa9f83fa2ea793c3d8aa344be4a1678d06d399","affectsGlobalScope":true,"impliedFormat":1},{"version":"51e547984877a62227042850456de71a5c45e7fe86b7c975c6e68896c86fa23b","affectsGlobalScope":true,"impliedFormat":1},{"version":"956d27abdea9652e8368ce029bb1e0b9174e9678a273529f426df4b3d90abd60","affectsGlobalScope":true,"impliedFormat":1},{"version":"4fa6ed14e98aa80b91f61b9805c653ee82af3502dc21c9da5268d3857772ca05","affectsGlobalScope":true,"impliedFormat":1},{"version":"e6633e05da3ff36e6da2ec170d0d03ccf33de50ca4dc6f5aeecb572cedd162fb","affectsGlobalScope":true,"impliedFormat":1},{"version":"d8670852241d4c6e03f2b89d67497a4bbefe29ecaa5a444e2c11a9b05e6fccc6","affectsGlobalScope":true,"impliedFormat":1},{"version":"8444af78980e3b20b49324f4a16ba35024fef3ee069a0eb67616ea6ca821c47a","affectsGlobalScope":true,"impliedFormat":1},{"version":"caccc56c72713969e1cfe5c3d44e5bab151544d9d2b373d7dbe5a1e4166652be","affectsGlobalScope":true,"impliedFormat":1},{"version":"3287d9d085fbd618c3971944b65b4be57859f5415f495b33a6adc994edd2f004","affectsGlobalScope":true,"impliedFormat":1},{"version":"50d53ccd31f6667aff66e3d62adf948879a3a16f05d89882d1188084ee415bbc","affectsGlobalScope":true,"impliedFormat":1},{"version":"08a58483392df5fcc1db57d782e87734f77ae9eab42516028acbfe46f29a3ef7","affectsGlobalScope":true,"impliedFormat":1},{"version":"436aaf437562f276ec2ddbee2f2cdedac7664c1e4c1d2c36839ddd582eeb3d0a","affectsGlobalScope":true,"impliedFormat":1},{"version":"b1cb28af0c891c8c96b2d6b7be76bd394fddcfdb4709a20ba05a7c1605eea0f9","affectsGlobalScope":true,"impliedFormat":1},{"version":"13f6e6380c78e15e140243dc4be2fa546c287c6d61f4729bc2dd7cf449605471","affectsGlobalScope":true,"impliedFormat":1},{"version":"15b98a533864d324e5f57cd3cfc0579b231df58c1c0f6063ea0fcb13c3c74ff9","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac77cb3e8c6d3565793eb90a8373ee8033146315a3dbead3bde8db5eaf5e5ec6","affectsGlobalScope":true,"impliedFormat":1},{"version":"d4b1d2c51d058fc21ec2629fff7a76249dec2e36e12960ea056e3ef89174080f","affectsGlobalScope":true,"impliedFormat":1},{"version":"2fef54945a13095fdb9b84f705f2b5994597640c46afeb2ce78352fab4cb3279","affectsGlobalScope":true,"impliedFormat":1},{"version":"33358442698bb565130f52ba79bfd3d4d484ac85fe33f3cb1759c54d18201393","affectsGlobalScope":true,"impliedFormat":1},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true,"impliedFormat":1},{"version":"7a1971efcba559ea9002ada4c4e3c925004fb67a755300d53b5edf9399354900","impliedFormat":1},{"version":"31973b272be35eab5ecf20a38ea54bec84cdc0317117590cb813c72fe0ef75b3","impliedFormat":99},{"version":"7ceac7d7800ef7065908464aba0a009e9a03ff95f177a44f999687bdf10d039f","impliedFormat":99},{"version":"6043ab81faab77b975cb2a8457cc28c3b6f90a766cbbd27914da686bc41c83a0","impliedFormat":99},{"version":"613051be0c04c0fadf883f5ec01dcb0a4639ac92d9e2c12a222680c91b374595","impliedFormat":99},{"version":"a740a1e2d889fc4344fbb49a7f8b02ee664850be5cdcf029ace8ceb4316623db","impliedFormat":99},{"version":"ffe3c0472cf0ad60edbf5037319135c645bd92e7acbf403d72101df3598258e0","impliedFormat":99},{"version":"64ebe41006e87ea8b5e9b3acf048018b5226c4b08c6575526a76f6801143bf90","impliedFormat":99},{"version":"5af3b8b1a9063e033fc1e32a3e95956f5f5e22548d5ccca628b1ab87e42087d1","impliedFormat":99},{"version":"2414e378fb9e46fe36d8a0f4fb7af126441078299c03a46096713b03a5f6571d","impliedFormat":99},{"version":"1ed47fe653ec1bbcbd8ed241873938642755f2917f9e9a2e78daef11519f0745","impliedFormat":99},{"version":"4e74287ad61c1544e88339e78a4da19cb79c729be8799b8cd190353368532e30","impliedFormat":99},{"version":"21a136c72551be7c24d797d4fa1401d35ee62325bec7442a6869cea50a50ad7a","impliedFormat":99},{"version":"5ea1325a998e722fffc89ff8c2d00eaf35e491f3fada16fb56c6360f63d16d79","impliedFormat":99},{"version":"2f50c2700b3397c9961c1e14b903d0ff1120e064755603740cecdcdf3b05d20f","impliedFormat":99},{"version":"e24d67437856c921a9a40f7fbac38ac576439e6616eb698fb769279ecbc7802a","impliedFormat":99},{"version":"cff4f19e514fccc06aafecb44d2c6b10516d604d2972da407fa38d344872389e","impliedFormat":99},{"version":"15cc3dd9a039f8ba1628d1e27cdf4b45582fc387a4241ebb65eff1786b89f522","impliedFormat":99},{"version":"01056fd3092681e2f1c0cb0e1fec91ac081b5bb758551494fca1c1d27f06c2b4","affectsGlobalScope":true,"impliedFormat":99},{"version":"13f965dea037ca58f3b0a5bd7541d1b3e2c71286759478c2aadba2a9647e5b0a","impliedFormat":99},{"version":"45771e2ee1ae0e12008b5090224a0a47d7c4af0a3b248deba572ab19232b1621","impliedFormat":99},{"version":"d189c9a6203dd8c814cbabb78ee77ec7f806a8c4f92c4029e8c84cf4d3b69013","impliedFormat":99},{"version":"7e9aecc83330a5c15b10f8995dfce2e1004f9bbdd0c4a9df18e8483facd76703","impliedFormat":99},{"version":"f2afaf5947dd98685a6b7996b57d7fedd13a04ca95820e6d8e1db0e6ec6d24ae","impliedFormat":99},{"version":"bbda3357c726ff3765eedddba81ee347295d3cdf4bc413e83e4d2f2d040e190f","impliedFormat":99},{"version":"316d7bdfb430fa119cbd460e01ffbf726321a5e54575c22b70e8ff56241d849a","impliedFormat":99},{"version":"d5a938d49803873c6de2daa0e81fa87ab44eee5259df765345932a28ecfb64fc","impliedFormat":99},{"version":"17044e5e7e129f8374daa67588cfb05367a511523f62d55ac215f86ed31b7bd5","impliedFormat":99},{"version":"2089a59a5359a6e33ab03808a1f2eb66169a8854d31c165e5586a0c9e83a008c","impliedFormat":99},{"version":"4ebc57d20caf062019a2b8c9ce1e54602a411022eb4f7fa325888b9bcf63693a","impliedFormat":99},{"version":"52279f70738da349b60a09be1294e3295c7e37189c10deb083ed6b5eb1c86744","impliedFormat":99},{"version":"bc5687c148ac8c68aa2e732086df6691e8658c7d39ea6a3e4f2d29cc7c28945b","impliedFormat":99},{"version":"98678d6ac29dfa3f80452de2a87f464dee4908476f817d6f5e0677802ad43f7b","impliedFormat":99},{"version":"057f28f1e4c53bfdc397099ee4bf873ef32f26a938a135881b19bf10f968a805","impliedFormat":99},{"version":"d00e790b0d3738482ddb18bb446210b41019520dd32438570d6bc533f7b95239","impliedFormat":99},{"version":"f36862ddf4c1d6dc6c2638baa6fa84ba196b0642b765e6af0163a4d688b6676d","impliedFormat":99},{"version":"4665f7e4f0fa5900321d33f85d167ad7653b758ea654e5b6cd63481c6592f7df","impliedFormat":99},{"version":"bee00cb700692ea3f9c1b08e2c8377b71f76c4d9f35f8a403ccde46104d02913","impliedFormat":99},{"version":"48b65aae077c0a25bef9982871b488aebd4161768ee8bb88b9cc0d4736e15644","impliedFormat":99},{"version":"207ecf493b69ddca525bbbd8f1d120d99d00be1448ae8c0e690526f24dc182ca","impliedFormat":99},{"version":"af6ac8a19dbd05c34feff97d0eae81194fd0be1358bd2366478e9a574492d332","impliedFormat":99},{"version":"a21c587d34edbe9808b8f4fac207d190f802687b477ef55ee0f494d79a427f31","impliedFormat":99},{"version":"f00b8fc0c970cfd54d4df6047aae216bce4d7a2ceb6610655541a678ac54c57a","impliedFormat":99},{"version":"11fd6a023d60896a902933f64a2c8363102e5276838dbe29aa02a24c2e69fbd1","impliedFormat":99},{"version":"d5664fad55c16b09f4fbda92412a3c0d99c5e143434a5a82dc0f86d0823014ae","impliedFormat":99},{"version":"70bbf11b35b311b2d94d5138807a91cfc88cd18f9502cc1ae5267ee86372d332","impliedFormat":99},{"version":"18d3ba92c8cd5b0dc0413aa76efde4892c1095c865a6590560f4e30679a31afb","impliedFormat":99},{"version":"22a65c300fb8989d8c282e949c1219ba70ec4a7542136629d75072b0c191539f","impliedFormat":99},{"version":"8b686124fd8d7102d8c2293311e0b9b2d48ddae7d88fe0688841b3f440eaef55","impliedFormat":99},{"version":"696709a2807769e22f224fe84b733f72b92630204e0b3a20bff5221bfc33958a","impliedFormat":99},{"version":"eb5828be18865d34ea3049afc3679267661a290b9858e2cd2866387c70b981ef","impliedFormat":99},{"version":"721313e1405531faa6e144e78ad3561023150692fbbcc23a4db9c2bda7e2b292","impliedFormat":99},{"version":"aa47cec7289f9c0181d51f2d867f4d5b230715b2433eea83d40e9865b8576de3","impliedFormat":99},{"version":"3651947da5192aa0655f8a24ca016b3fb0a65bf24950cf52176d8972c7c32785","impliedFormat":99},{"version":"98da7969aa8079a6625791fdb0806f2cb125ae398bccd84e8cb8a76c454aac93","impliedFormat":99},{"version":"6e1c1e2aaf2401e99526e3a13ab0ffbbb3e5c750818e9523d3dbdebdc08d44a0","impliedFormat":99},{"version":"40471ac4c2b6056bdc7ee09f1f279345d8fcc40b8b326eac38cff2df37ece97a","impliedFormat":99},{"version":"c82303f9ddeb0df5c2853ba02e9f1603ad0f01200225e6ee4cb2da53757243c0","impliedFormat":99},{"version":"8923bb9bac8a80132bbf1510facaa96198df1de6df035b77b5a81b681c5fba70","impliedFormat":99},{"version":"390d45fe0b15286282624b4646ac3267a601bf47154e2809cc9c12762d13223b","impliedFormat":99},{"version":"6bfed074c652e8043dfc926842ebc05f81db6c0c45b521e4bedc9dd8998df736","impliedFormat":99},{"version":"9fca5e617704571d97a09c9d6bafd115ecfdf54e9b719b263bd77cc7820e1e7a","impliedFormat":99},{"version":"a2f710ea19a08754794cca761103c00ff63b2c5582d6bbc4013433fc8ab7f462","impliedFormat":99},{"version":"8fc0d6a1e97a1fcd37ebdb72241e4608652a69e1a963ca662d1429750cf04f73","impliedFormat":99},{"version":"2ac08fb750bfed854a18462fce4f770c448ad90f1ac1121b26c47a67a8a04c86","impliedFormat":99},{"version":"85e159ffc1676583a00e26cdae8f40fa3139e32c89aa7ecbc725e120a8db1418","impliedFormat":99},{"version":"ea4d0669fa41158a8ae4dfbcb9f690f3177edd29c83a4cf01b74a4db24c5dcc8","impliedFormat":99},{"version":"3a908670fbb5fa07652421362e908b98e3abb854dc07b036dcdf800b919901b4","impliedFormat":99},{"version":"15903e848be32baf0039e02e7a4bb64c9169d75f3ae4dd9785b0e7aea8f83ba7","impliedFormat":99},{"version":"eb90fe18be0b3b5b759ff8f055e9ccb19c6a4287c9061c7a4bb9805968e46498","impliedFormat":99},{"version":"79f74173f4dc4cefaa15f49e4c4b97efb4194e91077a5415be617fbf7e695199","impliedFormat":99},{"version":"055d5c58abf9c069d88cd9f62a426008adc38258390ceba978fa527fffa54441","impliedFormat":99},{"version":"0f61fabd7d7a8220b90b929a39560791a35e60c951ba573b7a39fbf8d6183df1","impliedFormat":99},{"version":"5e8cce9cf2a6f924a8b49614d16d1c033b734ff1b1f4da9e7c16cf4d366b5754","impliedFormat":99},{"version":"c5a0d25aae8e65ee55e8bf5e1210e38d902a3eec76d6ef6c7c613a7541f940d1","impliedFormat":99},{"version":"8ec40582c992093bdc404d6d4d21459d31cc4cbd761f738979ba31f2d054cedd","impliedFormat":99},{"version":"2943c4190d96fc3a3ec84acbd89b8467572facc49459a9727cbd48acb5581c0e","impliedFormat":99},{"version":"b97dbd6b7a76719767f2cdf95ca7813d3be5d59279e0f5b569c8360298ba78a1","impliedFormat":99},{"version":"1f97e106389108292651ad0c29460ee8a52f98a047eb16721e6e2a7d3b72d545","impliedFormat":99},{"version":"b4042ac33293dce1395766af3ea4fd359f074534474870685a81023d1d797fa8","impliedFormat":99},{"version":"6651e0e8d0a95ccab2cd3b24df4ea6c33da06499f588938f8758d2d3e822090a","impliedFormat":99},{"version":"efd2ee2db9571aaabc3c3e7b6b074986146b9bb0c3489afb0f605c7461e5c897","impliedFormat":99},{"version":"76bf50b11001956f4076ec9b9b4ec9076647a5df16958247ae17277e2ffcfa10","impliedFormat":99},{"version":"25cbd0baaecc32efabbed23767498e3cd2ebfc8f7a222866efe1e580f08f526b","impliedFormat":99},{"version":"af7d6189331b10c030322f3dc7e600466126bad616f098bda0fce116c7dd09c2","impliedFormat":99},{"version":"3fb75eed94ea3f8a50af6efbe973907bc9476ecbc5e8f97d1513aa8f4fb717f5","signature":"623fe256149a6ba5b88c8e0b6f9b725f54fe293f1bc33c1b497791c2688d1f6a","impliedFormat":99},{"version":"cdb4ff0b15157cd6822b9384e911cc9cb26bf3115719d6d53799f1b770fc147e","signature":"6046cd3eef566bbfb012cdc96895292093352969f5d6533551edfbd06554e75d","impliedFormat":99},{"version":"1f5cba596b33d48cb772f2b92b71b0702a07054ff26e0dbc110ac2e04258e88b","signature":"c471e69cf7249615f0fa0f8c5cd782245744aa5a5eef8a43ec6977ffe43b1433","impliedFormat":99},{"version":"240e3cb9d759a7cbd03f14aa9f626e47a2e90b7a4d7b6a4b5acce4e73e8a2f62","signature":"9f24774a679b2729667c3334929403af981ecb7fd03a6ec33a56eadfe2c658c8","impliedFormat":99},{"version":"4e6e61be5afdc113e504c2b51e235fe7e1b809bcd8c174aff02e5d3e602fc680","impliedFormat":99},{"version":"4a2986d38ffa0d5b6a3fa349c6c039c2691212777ad84114c7897d6b782ad6c9","affectsGlobalScope":true,"impliedFormat":1}],"root":[[154,158]],"options":{"composite":true,"declaration":true,"declarationDir":"./esm","declarationMap":true,"esModuleInterop":true,"exactOptionalPropertyTypes":true,"importHelpers":true,"module":199,"noFallthroughCasesInSwitch":true,"noImplicitAny":true,"noImplicitOverride":true,"noImplicitReturns":true,"noImplicitThis":true,"noUncheckedIndexedAccess":true,"noUnusedLocals":true,"outDir":"./esm","rootDir":"./src","skipLibCheck":true,"sourceMap":true,"strict":true,"stripInternal":true,"target":99},"fileIdsList":[[69],[70,87,105,153,154],[70,154,155,156,157],[70,154,155],[70],[87,105,106,107,140],[106],[112,141],[87,141],[113,114,115,116,123,138,139],[113],[105,112,141],[113,120],[120,121,122],[117,118,119],[105,117,141],[87,105,117,141],[87,105,141],[124,131,132,133,134,135,136,137],[87,124,131,132],[87,105,124,131],[87,105,131,132,135],[87],[87,105,130,141],[87,124,131],[105,112,124,131,132,133,141],[87,112,142],[87,105,142],[105,141,142],[142,143,144,145,146,147,148],[87,105],[105,112,141,146],[87,105,106,107,141,142,143],[106,107,130,140,141,149,152],[87,105,106,141,150],[150,151],[87,106,107,141,151],[112],[87,125,126,127,128,129],[108,109],[108],[108,109,110,111],[109],[87,89,90],[87,89],[89],[93],[87,89,96],[89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104],[88,89],[88],[87,91],[71,72,73,75],[71,72,76],[71,72,73,75,76],[74],[73],[74,77,84,85,86],[74,77,84],[77],[79],[79,80,81],[74,77,79],[78,82,83],[105,153,154],[154,155]],"referencedMap":[[70,1],[155,2],[158,3],[156,4],[154,5],[157,5],[141,6],[107,7],[113,8],[114,9],[140,10],[115,11],[116,12],[121,13],[123,14],[120,15],[118,16],[119,17],[117,18],[138,19],[133,20],[134,21],[136,22],[135,23],[124,23],[131,24],[132,25],[137,26],[139,11],[143,27],[145,28],[146,29],[149,30],[142,31],[147,32],[148,33],[153,34],[151,35],[152,36],[150,37],[125,38],[127,38],[130,39],[110,40],[109,41],[112,42],[111,43],[91,44],[90,45],[92,46],[93,46],[94,46],[95,47],[97,48],[105,49],[98,46],[99,50],[100,46],[101,46],[89,51],[102,52],[103,45],[96,45],[104,45],[76,53],[73,54],[77,55],[75,56],[72,57],[87,58],[85,59],[78,60],[79,60],[80,61],[82,62],[81,63],[84,64],[83,60]],"exportedModulesMap":[[70,1],[155,65],[158,3],[156,66],[141,6],[107,7],[113,8],[114,9],[140,10],[115,11],[116,12],[121,13],[123,14],[120,15],[118,16],[119,17],[117,18],[138,19],[133,20],[134,21],[136,22],[135,23],[124,23],[131,24],[132,25],[137,26],[139,11],[143,27],[145,28],[146,29],[149,30],[142,31],[147,32],[148,33],[153,34],[151,35],[152,36],[150,37],[125,38],[127,38],[130,39],[110,40],[109,41],[112,42],[111,43],[91,44],[90,45],[92,46],[93,46],[94,46],[95,47],[97,48],[105,49],[98,46],[99,50],[100,46],[101,46],[89,51],[102,52],[103,45],[96,45],[104,45],[76,53],[73,54],[77,55],[75,56],[72,57],[87,58],[85,59],[78,60],[79,60],[80,61],[82,62],[81,63],[84,64],[83,60]],"semanticDiagnosticsPerFile":[159,70,69,67,68,12,14,13,2,15,16,17,18,19,20,21,22,3,23,4,24,28,25,26,27,29,30,31,5,32,33,34,35,6,39,36,37,38,40,7,41,46,47,42,43,44,45,8,51,48,49,50,52,9,53,54,55,58,56,57,59,60,10,1,61,11,65,63,62,66,64,155,158,156,154,157,141,107,113,114,140,115,116,121,123,120,118,119,117,122,138,133,134,136,135,124,131,132,137,139,143,144,145,146,149,142,147,148,106,153,151,152,150,125,126,127,128,130,129,108,110,109,112,111,91,90,92,93,94,95,97,105,98,99,100,101,89,102,103,88,96,104,76,73,77,71,75,72,87,85,86,78,79,80,82,81,84,83,74],"latestChangedDtsFile":"./esm/index.d.ts"},"version":"5.4.2"}
|