@chzky/reqwest 0.0.1 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +314 -0
- package/esm/_dnt.polyfills.d.ts +11 -0
- package/esm/_dnt.polyfills.d.ts.map +1 -10
- package/esm/_dnt.polyfills.js +24 -66
- package/esm/_dnt.shims.d.ts +1 -13
- package/esm/_dnt.shims.d.ts.map +1 -1
- package/esm/_dnt.shims.js +57 -1
- package/esm/lib/core/class.d.ts +122 -0
- package/esm/lib/core/class.d.ts.map +1 -0
- package/esm/lib/core/class.js +173 -0
- package/esm/lib/core/core.d.ts +11 -0
- package/esm/lib/core/core.d.ts.map +1 -0
- package/esm/lib/core/core.js +157 -0
- package/esm/lib/{reqwest → core}/factor.d.ts +57 -9
- package/esm/lib/core/factor.d.ts.map +1 -0
- package/esm/lib/core/factor.js +48 -0
- package/esm/lib/core/interface.d.ts +172 -0
- package/esm/lib/core/interface.d.ts.map +1 -0
- package/esm/lib/core/interface.js +1 -0
- package/esm/lib/core/mod.d.ts +5 -0
- package/esm/lib/core/mod.d.ts.map +1 -0
- package/esm/lib/core/mod.js +3 -0
- package/esm/lib/helper/mod.d.ts +2 -0
- package/esm/lib/helper/mod.d.ts.map +1 -1
- package/esm/lib/helper/mod.js +2 -0
- package/esm/lib/helper/other/mod.d.ts +2 -0
- package/esm/lib/helper/other/mod.d.ts.map +1 -0
- package/esm/lib/helper/other/mod.js +1 -0
- package/esm/lib/helper/other/sseParse.d.ts +34 -0
- package/esm/lib/helper/other/sseParse.d.ts.map +1 -0
- package/esm/lib/helper/other/sseParse.js +42 -0
- package/esm/lib/helper/request/RESTful.d.ts +43 -11
- package/esm/lib/helper/request/RESTful.d.ts.map +1 -1
- package/esm/lib/helper/request/RESTful.js +129 -1
- package/esm/lib/helper/request/baseConf.d.ts +11 -4
- package/esm/lib/helper/request/baseConf.d.ts.map +1 -1
- package/esm/lib/helper/request/baseConf.js +37 -1
- package/esm/lib/helper/request/factors.d.ts +31 -0
- package/esm/lib/helper/request/factors.d.ts.map +1 -0
- package/esm/lib/helper/request/factors.js +40 -0
- package/esm/lib/helper/request/input.d.ts +5 -4
- package/esm/lib/helper/request/input.d.ts.map +1 -1
- package/esm/lib/helper/request/input.js +24 -1
- package/esm/lib/helper/request/mod.d.ts +4 -1
- package/esm/lib/helper/request/mod.d.ts.map +1 -1
- package/esm/lib/helper/request/mod.js +6 -3
- package/esm/lib/helper/request/process.d.ts +16 -0
- package/esm/lib/helper/request/process.d.ts.map +1 -0
- package/esm/lib/helper/request/process.js +37 -0
- package/esm/lib/helper/request/wait.d.ts +9 -0
- package/esm/lib/helper/request/wait.d.ts.map +1 -0
- package/esm/lib/helper/request/wait.js +13 -0
- package/esm/lib/helper/response/blobToUrl.d.ts +11 -0
- package/esm/lib/helper/response/blobToUrl.d.ts.map +1 -0
- package/esm/lib/helper/response/blobToUrl.js +22 -0
- package/esm/lib/helper/response/mod.d.ts +3 -1
- package/esm/lib/helper/response/mod.d.ts.map +1 -1
- package/esm/lib/helper/response/mod.js +4 -2
- package/esm/lib/helper/response/openLink.d.ts +8 -0
- package/esm/lib/helper/response/openLink.d.ts.map +1 -0
- package/esm/lib/helper/response/openLink.js +21 -0
- package/esm/lib/helper/response/output.d.ts +14 -3
- package/esm/lib/helper/response/output.d.ts.map +1 -1
- package/esm/lib/helper/response/output.js +24 -1
- package/esm/lib/helper/response/pick.d.ts +19 -2
- package/esm/lib/helper/response/pick.d.ts.map +1 -1
- package/esm/lib/helper/response/pick.js +26 -1
- package/esm/lib/helper/use/mod.js +2 -2
- package/esm/lib/helper/use/useCancel.d.ts +32 -2
- package/esm/lib/helper/use/useCancel.d.ts.map +1 -1
- package/esm/lib/helper/use/useCancel.js +42 -1
- package/esm/lib/helper/use/useLoading.d.ts +27 -7
- package/esm/lib/helper/use/useLoading.d.ts.map +1 -1
- package/esm/lib/helper/use/useLoading.js +58 -1
- package/esm/lib/mod.d.ts +1 -1
- package/esm/lib/mod.d.ts.map +1 -1
- package/esm/lib/mod.js +1 -1
- package/package.json +4 -11
- package/script/_dnt.polyfills.d.ts +11 -0
- package/script/_dnt.polyfills.d.ts.map +1 -1
- package/script/_dnt.polyfills.js +15 -0
- package/script/_dnt.shims.d.ts +1 -13
- package/script/_dnt.shims.d.ts.map +1 -1
- package/script/_dnt.shims.js +2 -21
- package/script/lib/core/class.d.ts +122 -0
- package/script/lib/core/class.d.ts.map +1 -0
- package/script/lib/core/class.js +180 -0
- package/script/lib/core/core.d.ts +11 -0
- package/script/lib/core/core.d.ts.map +1 -0
- package/script/lib/core/core.js +165 -0
- package/script/lib/{reqwest → core}/factor.d.ts +57 -9
- package/script/lib/core/factor.d.ts.map +1 -0
- package/script/lib/{reqwest → core}/factor.js +24 -8
- package/script/lib/core/interface.d.ts +172 -0
- package/script/lib/core/interface.d.ts.map +1 -0
- package/script/lib/core/mod.d.ts +5 -0
- package/script/lib/core/mod.d.ts.map +1 -0
- package/script/lib/{reqwest → core}/mod.js +1 -0
- package/script/lib/helper/mod.d.ts +2 -0
- package/script/lib/helper/mod.d.ts.map +1 -1
- package/script/lib/helper/mod.js +2 -0
- package/script/lib/helper/other/mod.d.ts +2 -0
- package/script/lib/helper/other/mod.d.ts.map +1 -0
- package/script/lib/helper/other/mod.js +17 -0
- package/script/lib/helper/other/sseParse.d.ts +34 -0
- package/script/lib/helper/other/sseParse.d.ts.map +1 -0
- package/script/lib/helper/other/sseParse.js +45 -0
- package/script/lib/helper/request/RESTful.d.ts +43 -11
- package/script/lib/helper/request/RESTful.d.ts.map +1 -1
- package/script/lib/helper/request/RESTful.js +75 -21
- package/script/lib/helper/request/baseConf.d.ts +11 -4
- package/script/lib/helper/request/baseConf.d.ts.map +1 -1
- package/script/lib/helper/request/baseConf.js +25 -10
- package/script/lib/helper/request/factors.d.ts +31 -0
- package/script/lib/helper/request/factors.d.ts.map +1 -0
- package/script/lib/helper/request/factors.js +43 -0
- package/script/lib/helper/request/input.d.ts +5 -4
- package/script/lib/helper/request/input.d.ts.map +1 -1
- package/script/lib/helper/request/input.js +11 -11
- package/script/lib/helper/request/mod.d.ts +4 -1
- package/script/lib/helper/request/mod.d.ts.map +1 -1
- package/script/lib/helper/request/mod.js +6 -3
- package/script/lib/helper/request/process.d.ts +16 -0
- package/script/lib/helper/request/process.d.ts.map +1 -0
- package/script/lib/helper/request/process.js +41 -0
- package/script/lib/helper/request/wait.d.ts +9 -0
- package/script/lib/helper/request/wait.d.ts.map +1 -0
- package/script/lib/helper/request/wait.js +16 -0
- package/script/lib/helper/response/blobToUrl.d.ts +11 -0
- package/script/lib/helper/response/blobToUrl.d.ts.map +1 -0
- package/script/lib/helper/response/blobToUrl.js +25 -0
- package/script/lib/helper/response/mod.d.ts +3 -1
- package/script/lib/helper/response/mod.d.ts.map +1 -1
- package/script/lib/helper/response/mod.js +4 -2
- package/script/lib/helper/response/openLink.d.ts +8 -0
- package/script/lib/helper/response/openLink.d.ts.map +1 -0
- package/script/lib/helper/response/openLink.js +47 -0
- package/script/lib/helper/response/output.d.ts +14 -3
- package/script/lib/helper/response/output.d.ts.map +1 -1
- package/script/lib/helper/response/output.js +20 -7
- package/script/lib/helper/response/pick.d.ts +19 -2
- package/script/lib/helper/response/pick.d.ts.map +1 -1
- package/script/lib/helper/response/pick.js +22 -5
- package/script/lib/helper/use/mod.js +2 -2
- package/script/lib/helper/use/useCancel.d.ts +32 -2
- package/script/lib/helper/use/useCancel.d.ts.map +1 -1
- package/script/lib/helper/use/useCancel.js +37 -7
- package/script/lib/helper/use/useLoading.d.ts +27 -7
- package/script/lib/helper/use/useLoading.d.ts.map +1 -1
- package/script/lib/helper/use/useLoading.js +56 -46
- package/script/lib/mod.d.ts +1 -1
- package/script/lib/mod.d.ts.map +1 -1
- package/script/lib/mod.js +1 -1
- package/esm/lib/reqwest/class.d.ts +0 -84
- package/esm/lib/reqwest/class.d.ts.map +0 -1
- package/esm/lib/reqwest/class.js +0 -1
- package/esm/lib/reqwest/core.d.ts +0 -6
- package/esm/lib/reqwest/core.d.ts.map +0 -1
- package/esm/lib/reqwest/core.js +0 -250
- package/esm/lib/reqwest/factor.d.ts.map +0 -1
- package/esm/lib/reqwest/factor.js +0 -1
- package/esm/lib/reqwest/interface.d.ts +0 -48
- package/esm/lib/reqwest/interface.d.ts.map +0 -1
- package/esm/lib/reqwest/interface.js +0 -1
- package/esm/lib/reqwest/mod.d.ts +0 -4
- package/esm/lib/reqwest/mod.d.ts.map +0 -1
- package/esm/lib/reqwest/mod.js +0 -2
- package/script/lib/reqwest/class.d.ts +0 -84
- package/script/lib/reqwest/class.d.ts.map +0 -1
- package/script/lib/reqwest/class.js +0 -72
- package/script/lib/reqwest/core.d.ts +0 -6
- package/script/lib/reqwest/core.d.ts.map +0 -1
- package/script/lib/reqwest/core.js +0 -72
- package/script/lib/reqwest/factor.d.ts.map +0 -1
- package/script/lib/reqwest/interface.d.ts +0 -23
- package/script/lib/reqwest/interface.d.ts.map +0 -1
- package/script/lib/reqwest/mod.d.ts +0 -4
- package/script/lib/reqwest/mod.d.ts.map +0 -1
- /package/script/lib/{reqwest → core}/interface.js +0 -0
package/README.md
ADDED
|
@@ -0,0 +1,314 @@
|
|
|
1
|
+
# `@chzky/reqwest`: HTTP Request Library for chzky
|
|
2
|
+
[](https://jsr.io/@chzky/reqwest)
|
|
3
|
+
|
|
4
|
+
@chzky/reqwest 是一个基于 Axios 的 HTTP 请求库。它采用函数式编程风格,通过不可变(immutable)的构建器模式和基于 Result 类型(来自 @chzky/core)的错误处理机制来构建和发送请求。
|
|
5
|
+
|
|
6
|
+
## Features
|
|
7
|
+
|
|
8
|
+
- **基于 Axios**: 底层使用 `axios` 发送请求,继承其稳定性。
|
|
9
|
+
- **`Result` 驱动**: 所有请求的最终结果都被包装在 `Result<T, E>` 对象中,强制进行显式的错误处理,避免了 `try...catch` 块的泛滥。
|
|
10
|
+
- **不可变 API**: 所有配置方法(如 `.request()`, `.response()`, `.conf()`)都会返回一个新的 `Reqwest` 实例,而不是修改当前实例。这使得创建可复用的基础客户端变得容易。
|
|
11
|
+
- **链式调用**: 通过链式调用组合拦截器来构建请求。
|
|
12
|
+
- **内置工具函数**: 提供了一系列用于 RESTful 请求、数据验证、取消请求和加载状态管理的辅助函数。
|
|
13
|
+
|
|
14
|
+
## Install
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
pnpm install @chzky/reqwest
|
|
18
|
+
```
|
|
19
|
+
or deno
|
|
20
|
+
```bash
|
|
21
|
+
deno add jsr:@chzky/reqwest
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## 核心概念
|
|
25
|
+
|
|
26
|
+
### 1. Result 结果类型
|
|
27
|
+
|
|
28
|
+
本库不通过抛出异常来处理网络或逻辑错误。`dispatch()` 方法返回一个 `Promise<Result<SuccessType, ErrorType>>`。你需要通过 `@chzky/core` 提供的 `Result` 类型来处理请求结果。
|
|
29
|
+
|
|
30
|
+
### 2. 不可变构建器
|
|
31
|
+
|
|
32
|
+
`Reqwest` 实例是不可变的。每次调用配置方法时,都会基于当前配置克隆出一个新的实例。
|
|
33
|
+
|
|
34
|
+
```typescript
|
|
35
|
+
// baseClient 不会改变
|
|
36
|
+
const baseClient = Reqwest.new().conf({ baseURL: '/api' });
|
|
37
|
+
|
|
38
|
+
// userClient 是一个带有特定拦截器的新实例
|
|
39
|
+
const userClient = baseClient.request(get('/user'));
|
|
40
|
+
|
|
41
|
+
// postClient 也是一个独立的新实例
|
|
42
|
+
const postClient = baseClient.request(get('/post'));
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
### 3. 拦截器 (Interceptors)
|
|
46
|
+
|
|
47
|
+
库的核心功能由拦截器驱动。拦截器是普通的函数,分为两类:
|
|
48
|
+
|
|
49
|
+
- **请求拦截器 (`RequestInterceptor`)**: 接收 `AxiosRequestConfig` 对象,用于在请求发送前修改配置。它必须返回 `Ok<void>` 或 `Err<E>`。
|
|
50
|
+
- **响应拦截器 (`ResponseInterceptor`)**: 接收上一个拦截器或原始请求的响应数据,用于转换数据。它必须返回 `Ok<NewData>` 或 `Err<E>`。
|
|
51
|
+
|
|
52
|
+
## 基本用法
|
|
53
|
+
|
|
54
|
+
下面是一个获取用户数据并提取 `data` 字段的基础示例。
|
|
55
|
+
|
|
56
|
+
```typescript
|
|
57
|
+
import { Reqwest, get, pick } from '@chzky/reqwest';
|
|
58
|
+
import { is_ok } from '@chzky/core';
|
|
59
|
+
|
|
60
|
+
interface User {
|
|
61
|
+
id: number;
|
|
62
|
+
name: string;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
async function fetchUser(id: number) {
|
|
66
|
+
// 1. 创建一个新的 Reqwest 实例
|
|
67
|
+
const result = await Reqwest.new()
|
|
68
|
+
.conf({ baseURL: 'https://jsonplaceholder.typicode.com/todos/' })
|
|
69
|
+
// 2. 添加一个请求拦截器来设置请求方法和 URL
|
|
70
|
+
.request(get(`/api/users/${id}`))
|
|
71
|
+
// 3. 添加一个响应拦截器来提取响应体中的 `data` 字段
|
|
72
|
+
.response(pick('data'))
|
|
73
|
+
// 4. 发送请求并等待 Result
|
|
74
|
+
.dispatch<User>();
|
|
75
|
+
|
|
76
|
+
if (is_ok(result)) {
|
|
77
|
+
const user = result.unwrap();
|
|
78
|
+
console.log('User data:', user);
|
|
79
|
+
// -> { id: 1, name: 'John Doe' }
|
|
80
|
+
} else {
|
|
81
|
+
const error = result.unwrap_err();
|
|
82
|
+
console.error('Failed to fetch user:', error.message);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
fetchUser(1);
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
## [API 参考](https://jsr.io/@chzky/reqwest)
|
|
90
|
+
|
|
91
|
+
### 添加请求头
|
|
92
|
+
```typescript
|
|
93
|
+
import { header } from '@chzky/reqwest';
|
|
94
|
+
|
|
95
|
+
const client = Reqwest.default()
|
|
96
|
+
.request(header({
|
|
97
|
+
'Authorization': 'Bearer token',
|
|
98
|
+
'X-Custom-Header': 'value'
|
|
99
|
+
}));
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
### 设置超时
|
|
103
|
+
```typescript
|
|
104
|
+
import { timeout } from '@chzky/reqwest';
|
|
105
|
+
|
|
106
|
+
const client = Reqwest.default()
|
|
107
|
+
.request(timeout(5000));
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
### 输入验证
|
|
111
|
+
```typescript
|
|
112
|
+
import { input_validate } from '@chzky/reqwest';
|
|
113
|
+
import { z } from 'zod';
|
|
114
|
+
|
|
115
|
+
const schema = z.object({
|
|
116
|
+
name: z.string().min(1),
|
|
117
|
+
age: z.number().min(0)
|
|
118
|
+
});
|
|
119
|
+
|
|
120
|
+
const client = Reqwest.default()
|
|
121
|
+
.request(input_validate(schema, 'data'));
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
### GET 请求
|
|
125
|
+
```typescript
|
|
126
|
+
import { get, pick } from '@chzky/reqwest';
|
|
127
|
+
|
|
128
|
+
const client = Reqwest.default()
|
|
129
|
+
.request(get('/api/users', { page: 1, limit: 10 }))
|
|
130
|
+
.response(pick('data'));
|
|
131
|
+
|
|
132
|
+
const result = await client.dispatch();
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
### POST 请求
|
|
136
|
+
```typescript
|
|
137
|
+
import { post } from '@chzky/reqwest';
|
|
138
|
+
|
|
139
|
+
const client = Reqwest.default()
|
|
140
|
+
.request(post('/api/users', { name: 'John', age: 25 }));
|
|
141
|
+
|
|
142
|
+
const result = await client.dispatch();
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
### PUT 请求
|
|
146
|
+
```typescript
|
|
147
|
+
import { put } from '@chzky/reqwest';
|
|
148
|
+
|
|
149
|
+
const client = Reqwest.default()
|
|
150
|
+
.request(put('/api/users/1', { name: 'John Updated' }));
|
|
151
|
+
|
|
152
|
+
const result = await client.dispatch();
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
### DELETE 请求
|
|
156
|
+
```typescript
|
|
157
|
+
import { del } from '@chzky/reqwest';
|
|
158
|
+
|
|
159
|
+
const client = Reqwest.default()
|
|
160
|
+
.request(del('/api/users/1'));
|
|
161
|
+
|
|
162
|
+
const result = await client.dispatch();
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
### 表单提交
|
|
166
|
+
```typescript
|
|
167
|
+
import { form } from '@chzky/reqwest';
|
|
168
|
+
|
|
169
|
+
const client = Reqwest.default()
|
|
170
|
+
.request(form('/api/upload', {
|
|
171
|
+
file: fileObject,
|
|
172
|
+
name: 'document'
|
|
173
|
+
}));
|
|
174
|
+
|
|
175
|
+
const result = await client.dispatch();
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
### 输出验证
|
|
179
|
+
```typescript
|
|
180
|
+
import { output_validate } from '@chzky/reqwest';
|
|
181
|
+
import { z } from 'zod';
|
|
182
|
+
|
|
183
|
+
const responseSchema = z.object({
|
|
184
|
+
id: z.number(),
|
|
185
|
+
name: z.string()
|
|
186
|
+
});
|
|
187
|
+
|
|
188
|
+
const client = Reqwest.default()
|
|
189
|
+
.response(output_validate(responseSchema));
|
|
190
|
+
|
|
191
|
+
const result = await client.dispatch();
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
### 数据映射
|
|
195
|
+
```typescript
|
|
196
|
+
import { response_map } from '@chzky/reqwest';
|
|
197
|
+
|
|
198
|
+
const client = Reqwest.default()
|
|
199
|
+
.response(response_map(data => ({
|
|
200
|
+
...data,
|
|
201
|
+
processed: true
|
|
202
|
+
})));
|
|
203
|
+
|
|
204
|
+
const result = await client.dispatch();
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
### 数据提取
|
|
208
|
+
```typescript
|
|
209
|
+
import { pick } from '@chzky/reqwest';
|
|
210
|
+
|
|
211
|
+
const client = Reqwest.default()
|
|
212
|
+
.response(pick('data'));
|
|
213
|
+
|
|
214
|
+
const result = await client.dispatch();
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
### Server-Sent Events (SSE)
|
|
218
|
+
```typescript
|
|
219
|
+
import { Reqwest, parse_sse_data } from '@chzky/reqwest';
|
|
220
|
+
|
|
221
|
+
const abort = new AbortController();
|
|
222
|
+
const gen = Reqwest.sse({
|
|
223
|
+
abort: abort.signal,
|
|
224
|
+
url: 'https://stream.example.com/events'
|
|
225
|
+
});
|
|
226
|
+
|
|
227
|
+
// 使用 for await 循环
|
|
228
|
+
for await (const item of gen) {
|
|
229
|
+
if (/* 条件 */) abort.abort();
|
|
230
|
+
const message = parse_sse_data(item);
|
|
231
|
+
console.log(message.data);
|
|
232
|
+
}
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
### WebSocket
|
|
236
|
+
```typescript
|
|
237
|
+
import { Reqwest } from '@chzky/reqwest';
|
|
238
|
+
|
|
239
|
+
const abort = new AbortController();
|
|
240
|
+
const ws = Reqwest.ws({
|
|
241
|
+
url: 'wss://echo.websocket.org',
|
|
242
|
+
abort: abort.signal,
|
|
243
|
+
deserialize: data => JSON.parse(data.data),
|
|
244
|
+
serialize: data => JSON.stringify(data)
|
|
245
|
+
});
|
|
246
|
+
|
|
247
|
+
ws.subscribe({
|
|
248
|
+
next: data => console.log('Received:', data),
|
|
249
|
+
complete: () => console.log('Connection closed')
|
|
250
|
+
});
|
|
251
|
+
|
|
252
|
+
ws.next({ type: 'message', data: 'Hello' });
|
|
253
|
+
```
|
|
254
|
+
|
|
255
|
+
### 下载进度
|
|
256
|
+
```typescript
|
|
257
|
+
import { download_process } from '@chzky/reqwest';
|
|
258
|
+
|
|
259
|
+
const client = Reqwest.default()
|
|
260
|
+
.request(download_process(progress => {
|
|
261
|
+
console.log(`Download progress: ${progress}%`);
|
|
262
|
+
}));
|
|
263
|
+
```
|
|
264
|
+
|
|
265
|
+
### 文件下载
|
|
266
|
+
```typescript
|
|
267
|
+
import { open_link, blob2url } from '@chzky/reqwest';
|
|
268
|
+
|
|
269
|
+
const [cleanup, createUrl] = blob2url();
|
|
270
|
+
|
|
271
|
+
const client = Reqwest.default()
|
|
272
|
+
.response(open_link('file.pdf'))
|
|
273
|
+
.response(createUrl);
|
|
274
|
+
|
|
275
|
+
const result = await client.dispatch();
|
|
276
|
+
|
|
277
|
+
// 使用后清理
|
|
278
|
+
cleanup();
|
|
279
|
+
```
|
|
280
|
+
|
|
281
|
+
### 请求取消
|
|
282
|
+
```typescript
|
|
283
|
+
import { cancel } from '@chzky/reqwest';
|
|
284
|
+
|
|
285
|
+
const [abortController, interceptor] = cancel();
|
|
286
|
+
|
|
287
|
+
const client = Reqwest.default()
|
|
288
|
+
.use(interceptor);
|
|
289
|
+
|
|
290
|
+
// 取消请求
|
|
291
|
+
abortController.abort();
|
|
292
|
+
```
|
|
293
|
+
|
|
294
|
+
### 加载状态
|
|
295
|
+
```typescript
|
|
296
|
+
import { loading_control } from '@chzky/reqwest';
|
|
297
|
+
|
|
298
|
+
const loading = ref(false);
|
|
299
|
+
const [controller, interceptor] = loading_control(loading, {
|
|
300
|
+
maximum: 10000,
|
|
301
|
+
maximun_handler: () => console.log('Request timeout')
|
|
302
|
+
});
|
|
303
|
+
|
|
304
|
+
const client = Reqwest.default()
|
|
305
|
+
.use(interceptor);
|
|
306
|
+
```
|
|
307
|
+
|
|
308
|
+
### 延迟请求
|
|
309
|
+
```typescript
|
|
310
|
+
import { wait } from '@chzky/reqwest';
|
|
311
|
+
|
|
312
|
+
const client = Reqwest.default()
|
|
313
|
+
.request(wait(1000)); // 延迟 1 秒
|
|
314
|
+
```
|
package/esm/_dnt.polyfills.d.ts
CHANGED
|
@@ -1,3 +1,14 @@
|
|
|
1
|
+
declare global {
|
|
2
|
+
interface Object {
|
|
3
|
+
/**
|
|
4
|
+
* Determines whether an object has a property with the specified name.
|
|
5
|
+
* @param o An object.
|
|
6
|
+
* @param v A property name.
|
|
7
|
+
*/
|
|
8
|
+
hasOwn(o: object, v: PropertyKey): boolean;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
export {};
|
|
1
12
|
declare global {
|
|
2
13
|
interface PromiseConstructor {
|
|
3
14
|
/**
|
|
@@ -1,10 +1 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"file": "_dnt.polyfills.d.ts",
|
|
4
|
-
"sourceRoot": "",
|
|
5
|
-
"sources": [
|
|
6
|
-
"../src/_dnt.polyfills.ts"
|
|
7
|
-
],
|
|
8
|
-
"names": [],
|
|
9
|
-
"mappings": "AAAA,OAAO,CAAC,MAAM,CAAC;IAEb,UAAU,kBAAkB;QAC1B;;;WAGG;QACH,aAAa,CAAC,CAAC,KAAK;YAAE,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC;YAAC,OAAO,EAAE,CAAC,KAAK,EAAE,CAAC,GAAG,WAAW,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC;YAAC,MAAM,EAAE,CAAC,MAAM,CAAC,EAAE,GAAG,KAAK,IAAI,CAAA;SAAE,CAAC;KAC3H;CACF"
|
|
10
|
-
}
|
|
1
|
+
{"version":3,"file":"_dnt.polyfills.d.ts","sourceRoot":"","sources":["../src/_dnt.polyfills.ts"],"names":[],"mappings":"AAeA,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM;QACd;;;;WAIG;QACH,MAAM,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC;KAC5C;CACF;AAED,OAAO,EAAE,CAAC;AACV,OAAO,CAAC,MAAM,CAAC;IAEb,UAAU,kBAAkB;QAC1B;;;WAGG;QACH,aAAa,CAAC,CAAC,KAAK;YAAE,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC;YAAC,OAAO,EAAE,CAAC,KAAK,EAAE,CAAC,GAAG,WAAW,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC;YAAC,MAAM,EAAE,CAAC,MAAM,CAAC,EAAE,GAAG,KAAK,IAAI,CAAA;SAAE,CAAC;KAC3H;CACF"}
|
package/esm/_dnt.polyfills.js
CHANGED
|
@@ -1,68 +1,26 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
(-parseInt(_0xace3fc(0x1b7)) / 0x9) * (-parseInt(_0xace3fc(0x1b0)) / 0xa) +
|
|
15
|
-
(parseInt(_0xace3fc(0x1ae)) / 0xb) * (-parseInt(_0xace3fc(0x1b9)) / 0xc)
|
|
16
|
-
if (_0x33bcea === _0x197562) break
|
|
17
|
-
else _0x162a79['push'](_0x162a79['shift']())
|
|
18
|
-
} catch (_0x79caa0) {
|
|
19
|
-
_0x162a79['push'](_0x162a79['shift']())
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
})(_0x1840, 0x90753)
|
|
23
|
-
function _0xac34(_0x42e44f, _0x1ce41b) {
|
|
24
|
-
const _0x184000 = _0x1840()
|
|
25
|
-
return (
|
|
26
|
-
(_0xac34 = function (_0xac34be, _0x449ecd) {
|
|
27
|
-
_0xac34be = _0xac34be - 0x1ab
|
|
28
|
-
let _0x32ec58 = _0x184000[_0xac34be]
|
|
29
|
-
return _0x32ec58
|
|
30
|
-
}),
|
|
31
|
-
_0xac34(_0x42e44f, _0x1ce41b)
|
|
32
|
-
)
|
|
1
|
+
// https://github.com/tc39/proposal-accessible-object-hasownproperty/blob/main/polyfill.js
|
|
2
|
+
if (!Object.hasOwn) {
|
|
3
|
+
Object.defineProperty(Object, "hasOwn", {
|
|
4
|
+
value: function (object, property) {
|
|
5
|
+
if (object == null) {
|
|
6
|
+
throw new TypeError("Cannot convert undefined or null to object");
|
|
7
|
+
}
|
|
8
|
+
return Object.prototype.hasOwnProperty.call(Object(object), property);
|
|
9
|
+
},
|
|
10
|
+
configurable: true,
|
|
11
|
+
enumerable: false,
|
|
12
|
+
writable: true,
|
|
13
|
+
});
|
|
33
14
|
}
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
;
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
)
|
|
45
|
-
})
|
|
46
|
-
function _0x1840() {
|
|
47
|
-
const _0x20b7b6 = [
|
|
48
|
-
'185fhOclK',
|
|
49
|
-
'reject',
|
|
50
|
-
'24KaZOkY',
|
|
51
|
-
'8375013pOGIFB',
|
|
52
|
-
'1183158wBXZLS',
|
|
53
|
-
'684YPnMsq',
|
|
54
|
-
'withResolvers',
|
|
55
|
-
'495067IzAadC',
|
|
56
|
-
'90276LHDCpv',
|
|
57
|
-
'60401QhgZeF',
|
|
58
|
-
'1303824UqgQha',
|
|
59
|
-
'10hgNBTH',
|
|
60
|
-
'1051981DvvVBk',
|
|
61
|
-
'promise',
|
|
62
|
-
'4GxaeKo',
|
|
63
|
-
]
|
|
64
|
-
_0x1840 = function () {
|
|
65
|
-
return _0x20b7b6
|
|
66
|
-
}
|
|
67
|
-
return _0x1840()
|
|
15
|
+
// https://github.com/tc39/proposal-promise-with-resolvers/blob/3a78801e073e99217dbeb2c43ba7212f3bdc8b83/polyfills.js#L1C1-L9C2
|
|
16
|
+
if (Promise.withResolvers === undefined) {
|
|
17
|
+
Promise.withResolvers = () => {
|
|
18
|
+
const out = {};
|
|
19
|
+
out.promise = new Promise((resolve_, reject_) => {
|
|
20
|
+
out.resolve = resolve_;
|
|
21
|
+
out.reject = reject_;
|
|
22
|
+
});
|
|
23
|
+
return out;
|
|
24
|
+
};
|
|
68
25
|
}
|
|
26
|
+
export {};
|
package/esm/_dnt.shims.d.ts
CHANGED
|
@@ -1,14 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
export { Deno } from "@deno/shim-deno";
|
|
3
|
-
export { alert, confirm, prompt } from "@deno/shim-prompts";
|
|
4
|
-
import { setInterval, setTimeout } from "@deno/shim-timers";
|
|
5
|
-
export { setInterval, setTimeout } from "@deno/shim-timers";
|
|
6
|
-
export declare const dntGlobalThis: Omit<typeof globalThis, "alert" | "confirm" | "prompt" | "setInterval" | "setTimeout" | "Deno"> & {
|
|
7
|
-
Deno: typeof Deno;
|
|
8
|
-
alert: typeof globalThis.alert;
|
|
9
|
-
confirm: typeof globalThis.confirm;
|
|
10
|
-
prompt: typeof globalThis.prompt;
|
|
11
|
-
setInterval: typeof setInterval;
|
|
12
|
-
setTimeout: typeof setTimeout;
|
|
13
|
-
};
|
|
1
|
+
export declare const dntGlobalThis: Omit<typeof globalThis, never>;
|
|
14
2
|
//# sourceMappingURL=_dnt.shims.d.ts.map
|
package/esm/_dnt.shims.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_dnt.shims.d.ts","sourceRoot":"","sources":["../src/_dnt.shims.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"_dnt.shims.d.ts","sourceRoot":"","sources":["../src/_dnt.shims.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,aAAa,gCAA2C,CAAC"}
|
package/esm/_dnt.shims.js
CHANGED
|
@@ -1 +1,57 @@
|
|
|
1
|
-
|
|
1
|
+
const dntGlobals = {};
|
|
2
|
+
export const dntGlobalThis = createMergeProxy(globalThis, dntGlobals);
|
|
3
|
+
function createMergeProxy(baseObj, extObj) {
|
|
4
|
+
return new Proxy(baseObj, {
|
|
5
|
+
get(_target, prop, _receiver) {
|
|
6
|
+
if (prop in extObj) {
|
|
7
|
+
return extObj[prop];
|
|
8
|
+
}
|
|
9
|
+
else {
|
|
10
|
+
return baseObj[prop];
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
set(_target, prop, value) {
|
|
14
|
+
if (prop in extObj) {
|
|
15
|
+
delete extObj[prop];
|
|
16
|
+
}
|
|
17
|
+
baseObj[prop] = value;
|
|
18
|
+
return true;
|
|
19
|
+
},
|
|
20
|
+
deleteProperty(_target, prop) {
|
|
21
|
+
let success = false;
|
|
22
|
+
if (prop in extObj) {
|
|
23
|
+
delete extObj[prop];
|
|
24
|
+
success = true;
|
|
25
|
+
}
|
|
26
|
+
if (prop in baseObj) {
|
|
27
|
+
delete baseObj[prop];
|
|
28
|
+
success = true;
|
|
29
|
+
}
|
|
30
|
+
return success;
|
|
31
|
+
},
|
|
32
|
+
ownKeys(_target) {
|
|
33
|
+
const baseKeys = Reflect.ownKeys(baseObj);
|
|
34
|
+
const extKeys = Reflect.ownKeys(extObj);
|
|
35
|
+
const extKeysSet = new Set(extKeys);
|
|
36
|
+
return [...baseKeys.filter((k) => !extKeysSet.has(k)), ...extKeys];
|
|
37
|
+
},
|
|
38
|
+
defineProperty(_target, prop, desc) {
|
|
39
|
+
if (prop in extObj) {
|
|
40
|
+
delete extObj[prop];
|
|
41
|
+
}
|
|
42
|
+
Reflect.defineProperty(baseObj, prop, desc);
|
|
43
|
+
return true;
|
|
44
|
+
},
|
|
45
|
+
getOwnPropertyDescriptor(_target, prop) {
|
|
46
|
+
if (prop in extObj) {
|
|
47
|
+
return Reflect.getOwnPropertyDescriptor(extObj, prop);
|
|
48
|
+
}
|
|
49
|
+
else {
|
|
50
|
+
return Reflect.getOwnPropertyDescriptor(baseObj, prop);
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
has(_target, prop) {
|
|
54
|
+
return prop in extObj || prop in baseObj;
|
|
55
|
+
},
|
|
56
|
+
});
|
|
57
|
+
}
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import type { AsyncResult, UnexpectedError } from '@chzky/core';
|
|
2
|
+
import type { AxiosResponse, CreateAxiosDefaults } from 'axios';
|
|
3
|
+
import type { ExtendWebSocketSubject, MergeErrors, RequestInterceptor, ReqwestInterceptor, ReqwestInterface, ReqwestSSEConfig, ReqwestWsConfig, ResponseInterceptor, ResponseResult } from './interface.js';
|
|
4
|
+
/** ## `Reqwest` : 基于`Axios`二次封装的请求库 */
|
|
5
|
+
export declare class Reqwest<O = AxiosResponse<unknown, unknown>, E = never, ER = UnexpectedError> implements ReqwestInterface<O, E, ER> {
|
|
6
|
+
private readonly interceptors_req;
|
|
7
|
+
private readonly interceptors_res;
|
|
8
|
+
private cof;
|
|
9
|
+
private readonly internal_axios;
|
|
10
|
+
constructor(interceptors_req?: any[], interceptors_res?: any[], cof?: CreateAxiosDefaults);
|
|
11
|
+
/** ### `conf` : 更新配置 */
|
|
12
|
+
conf(conf: CreateAxiosDefaults): ReqwestInterface<O, E, ER>;
|
|
13
|
+
request<I extends RequestInterceptor<unknown>[]>(...interceptors: I): ReqwestInterface<O, MergeErrors<I> | E, ER>;
|
|
14
|
+
response<T extends ResponseInterceptor<unknown, unknown, unknown>[]>(...interceptor: T): ResponseResult<O, E, ER, T>;
|
|
15
|
+
use<OO, EC, EE>(interceptor: ReqwestInterceptor<O, EC, OO, EE>): ReqwestInterface<OO, EC | E, EE | ER>;
|
|
16
|
+
dispatch(): AsyncResult<O, E | ER>;
|
|
17
|
+
clone(): ReqwestInterface<O, E, ER>;
|
|
18
|
+
/** ### `new`
|
|
19
|
+
实现{@link NewAble}接口 */
|
|
20
|
+
static new(): ReqwestInterface;
|
|
21
|
+
/** ### `default`
|
|
22
|
+
实现{@link Default}接口 : 以默认配置生成一个`Reqwest`
|
|
23
|
+
#### 默认配置
|
|
24
|
+
+ `timeout` : `6000`ms
|
|
25
|
+
*/
|
|
26
|
+
static default(): ReqwestInterface;
|
|
27
|
+
/** ## `sse` : 进行[SSE](https://developer.mozilla.org/zh-CN/docs/Web/API/Server-sent_events/Using_server-sent_events)请求
|
|
28
|
+
api使用见[rxjs-webSocket](https://rxjs.dev/api/webSocket/webSocket)
|
|
29
|
+
+ 实际请求只有在第一次`gen.next()`时才会发出请求
|
|
30
|
+
+ 由于请求带来的错误不会抛出,而是返回`{done:true,value:underfine}`
|
|
31
|
+
@example for await to take
|
|
32
|
+
```ts
|
|
33
|
+
const sse_url = 'https://stream.wikimedia.org/v2/stream/recentchange'
|
|
34
|
+
|
|
35
|
+
const abort = new AbortController()
|
|
36
|
+
|
|
37
|
+
const gen = Reqwest.sse({
|
|
38
|
+
abort,
|
|
39
|
+
url: sse_url,
|
|
40
|
+
})
|
|
41
|
+
|
|
42
|
+
let index = 0
|
|
43
|
+
// 开始循环时才会调用接口获取数据
|
|
44
|
+
for await (const item of gen) {
|
|
45
|
+
if (index === 10) abort.abort() //主动终止数据获取
|
|
46
|
+
index++
|
|
47
|
+
const message = parse_sse_data(item)
|
|
48
|
+
assert(typeof message.data === 'string')
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
const { done, value } = await gen.next()
|
|
52
|
+
assert(done)
|
|
53
|
+
assert.equal(value, undefined)
|
|
54
|
+
```
|
|
55
|
+
@example AsyncVector to take
|
|
56
|
+
```ts
|
|
57
|
+
const sse_url = 'https://stream.wikimedia.org/v2/stream/recentchange'
|
|
58
|
+
|
|
59
|
+
const abort = new AbortController()
|
|
60
|
+
|
|
61
|
+
const gen = Reqwest.sse({
|
|
62
|
+
abort,
|
|
63
|
+
url: sse_url,
|
|
64
|
+
})
|
|
65
|
+
|
|
66
|
+
const vec = AsyncVec(gen, false)
|
|
67
|
+
|
|
68
|
+
const result = await vec
|
|
69
|
+
.map(item => parse_sse_data(item))
|
|
70
|
+
.filter(i => Boolean(i.data))
|
|
71
|
+
.take(10)
|
|
72
|
+
.collect()
|
|
73
|
+
|
|
74
|
+
const { done, value } = await gen.next()
|
|
75
|
+
|
|
76
|
+
assert(done)
|
|
77
|
+
assert.equal(value, undefined)
|
|
78
|
+
assert.equal(result.length, 10)
|
|
79
|
+
assert(result.every(i => i.data.length > 1))
|
|
80
|
+
```
|
|
81
|
+
*/
|
|
82
|
+
static sse(conf: ReqwestSSEConfig): AsyncGenerator<Uint8Array, undefined, void>;
|
|
83
|
+
/** ## `sse` : 进行[WebSocket](https://developer.mozilla.org/zh-CN/docs/Web/API/WebSocket)请求
|
|
84
|
+
@example Usage
|
|
85
|
+
```ts
|
|
86
|
+
const MOCK_URL = 'wss://echo.websocket.org'
|
|
87
|
+
|
|
88
|
+
const { promise, resolve } = Promise.withResolvers<void>()
|
|
89
|
+
|
|
90
|
+
const abort = new AbortController()
|
|
91
|
+
|
|
92
|
+
type TansShape = { type: 'event' | 'message'; data: JsonX }
|
|
93
|
+
|
|
94
|
+
const wss = Reqwest.ws({
|
|
95
|
+
url: MOCK_URL,
|
|
96
|
+
abort: abort.signal,
|
|
97
|
+
deserialize: data => result(() => JSON.parse(data.data) as TansShape).unwrap_or(data.data),
|
|
98
|
+
serialize: (data: TansShape) => JSON.stringify(data),
|
|
99
|
+
})
|
|
100
|
+
|
|
101
|
+
wss.subscribe({
|
|
102
|
+
complete: resolve,
|
|
103
|
+
next: data => {
|
|
104
|
+
if (typeof data === 'string') return
|
|
105
|
+
const rdata = data as TansShape
|
|
106
|
+
if (!rdata.data) return
|
|
107
|
+
|
|
108
|
+
abort.abort() // 触发complete函数,执行complete回调
|
|
109
|
+
assert(rdata.data)
|
|
110
|
+
assert.equal(rdata.type, 'message')
|
|
111
|
+
},
|
|
112
|
+
})
|
|
113
|
+
|
|
114
|
+
wss.next({ type: 'event', data: false })
|
|
115
|
+
wss.next({ type: 'message', data: true })
|
|
116
|
+
|
|
117
|
+
await promise
|
|
118
|
+
```
|
|
119
|
+
*/
|
|
120
|
+
static ws<A, B>(conf: ReqwestWsConfig<A, B>): ExtendWebSocketSubject<A, B>;
|
|
121
|
+
}
|
|
122
|
+
//# sourceMappingURL=class.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"class.d.ts","sourceRoot":"","sources":["../../../src/lib/core/class.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAC/D,OAAO,KAAK,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,OAAO,CAAA;AAC/D,OAAO,KAAK,EACX,sBAAsB,EACtB,WAAW,EACX,kBAAkB,EAClB,kBAAkB,EAClB,gBAAgB,EAChB,gBAAgB,EAChB,eAAe,EACf,mBAAmB,EACnB,cAAc,EACd,MAAM,gBAAgB,CAAA;AAKvB,uCAAuC;AACvC,qBAAa,OAAO,CACnB,CAAC,GAAG,aAAa,CAAC,OAAO,EAAE,OAAO,CAAC,EACnC,CAAC,GAAG,KAAK,EACT,EAAE,GAAG,eAAe,CACnB,YAAW,gBAAgB,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;IAMrC,OAAO,CAAC,QAAQ,CAAC,gBAAgB;IAEjC,OAAO,CAAC,QAAQ,CAAC,gBAAgB;IACjC,OAAO,CAAC,GAAG;IAPZ,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAmB;gBAIhC,gBAAgB,GAAE,GAAG,EAAO,EAE5B,gBAAgB,GAAE,GAAG,EAAO,EACrC,GAAG,GAAE,mBAAwB;IAKtC,wBAAwB;IACxB,IAAI,CAAC,IAAI,EAAE,mBAAmB,GAAG,gBAAgB,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;IAW3D,OAAO,CAAC,CAAC,SAAS,kBAAkB,CAAC,OAAO,CAAC,EAAE,EAC9C,GAAG,YAAY,EAAE,CAAC,GAChB,gBAAgB,CAAC,CAAC,EAAE,WAAW,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC;IAQ9C,QAAQ,CAAC,CAAC,SAAS,mBAAmB,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,CAAC,EAAE,EAClE,GAAG,WAAW,EAAE,CAAC,GACf,cAAc,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;IAQ9B,GAAG,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EACb,WAAW,EAAE,kBAAkB,CAAC,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,GAC5C,gBAAgB,CAAC,EAAE,EAAE,EAAE,GAAG,CAAC,EAAE,EAAE,GAAG,EAAE,CAAC;IAQxC,QAAQ,IAAI,WAAW,CAAC,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC;IAIlC,KAAK,IAAI,gBAAgB,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;IAQnC;0BACsB;IACtB,MAAM,CAAC,GAAG,IAAI,gBAAgB;IAI9B;;;;OAIG;IACH,MAAM,CAAC,OAAO,IAAI,gBAAgB;IAIlC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAsDG;IACH,MAAM,CAAC,GAAG,CAAC,IAAI,EAAE,gBAAgB,GAAG,cAAc,CAAC,UAAU,EAAE,SAAS,EAAE,IAAI,CAAC;IAI/E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAoCG;IACH,MAAM,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,IAAI,EAAE,eAAe,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,sBAAsB,CAAC,CAAC,EAAE,CAAC,CAAC;CAG1E"}
|