@chzky/reqwest 0.0.1 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (207) hide show
  1. package/README.md +314 -0
  2. package/esm/_dnt.polyfills.d.ts +11 -0
  3. package/esm/_dnt.polyfills.d.ts.map +1 -10
  4. package/esm/_dnt.polyfills.js +24 -66
  5. package/esm/_dnt.shims.d.ts +1 -13
  6. package/esm/_dnt.shims.d.ts.map +1 -1
  7. package/esm/_dnt.shims.js +57 -1
  8. package/esm/lib/mod.d.ts +1 -1
  9. package/esm/lib/mod.d.ts.map +1 -1
  10. package/esm/lib/mod.js +1 -1
  11. package/esm/lib/reqwest/class.d.ts +116 -78
  12. package/esm/lib/reqwest/class.d.ts.map +1 -1
  13. package/esm/lib/reqwest/class.js +175 -1
  14. package/esm/lib/reqwest/core.d.ts +5 -0
  15. package/esm/lib/reqwest/core.d.ts.map +1 -1
  16. package/esm/lib/reqwest/core.js +154 -244
  17. package/esm/lib/reqwest/factor.d.ts +2 -2
  18. package/esm/lib/reqwest/factor.d.ts.map +1 -1
  19. package/esm/lib/reqwest/factor.js +32 -1
  20. package/esm/lib/reqwest/interface.d.ts +166 -42
  21. package/esm/lib/reqwest/interface.d.ts.map +1 -1
  22. package/esm/lib/reqwest/interface.js +1 -1
  23. package/esm/lib/reqwest/mod.d.ts +1 -1
  24. package/esm/lib/reqwest/mod.d.ts.map +1 -1
  25. package/esm/lib/reqwest/mod.js +2 -2
  26. package/esm/lib/{helper → utils}/mod.d.ts +1 -0
  27. package/esm/lib/utils/mod.d.ts.map +1 -0
  28. package/esm/lib/{helper → utils}/mod.js +1 -0
  29. package/esm/lib/utils/other/mod.d.ts +2 -0
  30. package/esm/lib/utils/other/mod.d.ts.map +1 -0
  31. package/esm/lib/utils/other/mod.js +1 -0
  32. package/esm/lib/utils/other/sseParse.d.ts +34 -0
  33. package/esm/lib/utils/other/sseParse.d.ts.map +1 -0
  34. package/esm/lib/utils/other/sseParse.js +42 -0
  35. package/{script/lib/helper → esm/lib/utils}/request/RESTful.d.ts +43 -11
  36. package/esm/lib/utils/request/RESTful.d.ts.map +1 -0
  37. package/esm/lib/utils/request/RESTful.js +129 -0
  38. package/esm/lib/utils/request/baseConf.d.ts +22 -0
  39. package/esm/lib/utils/request/baseConf.d.ts.map +1 -0
  40. package/esm/lib/utils/request/baseConf.js +37 -0
  41. package/esm/lib/utils/request/factors.d.ts +30 -0
  42. package/esm/lib/utils/request/factors.d.ts.map +1 -0
  43. package/esm/lib/utils/request/factors.js +39 -0
  44. package/esm/lib/{helper → utils}/request/input.d.ts +4 -3
  45. package/esm/lib/utils/request/input.d.ts.map +1 -0
  46. package/esm/lib/utils/request/input.js +24 -0
  47. package/esm/lib/utils/request/mod.d.ts +7 -0
  48. package/esm/lib/utils/request/mod.d.ts.map +1 -0
  49. package/esm/lib/utils/request/mod.js +6 -0
  50. package/esm/lib/utils/request/process.d.ts +16 -0
  51. package/esm/lib/utils/request/process.d.ts.map +1 -0
  52. package/esm/lib/utils/request/process.js +37 -0
  53. package/esm/lib/utils/request/wait.d.ts +10 -0
  54. package/esm/lib/utils/request/wait.d.ts.map +1 -0
  55. package/esm/lib/utils/request/wait.js +14 -0
  56. package/esm/lib/utils/response/blobToUrl.d.ts +10 -0
  57. package/esm/lib/utils/response/blobToUrl.d.ts.map +1 -0
  58. package/esm/lib/utils/response/blobToUrl.js +21 -0
  59. package/esm/lib/utils/response/mod.d.ts +5 -0
  60. package/esm/lib/utils/response/mod.d.ts.map +1 -0
  61. package/esm/lib/utils/response/mod.js +4 -0
  62. package/esm/lib/utils/response/openLink.d.ts +7 -0
  63. package/esm/lib/utils/response/openLink.d.ts.map +1 -0
  64. package/esm/lib/utils/response/openLink.js +20 -0
  65. package/esm/lib/utils/response/output.d.ts +16 -0
  66. package/esm/lib/utils/response/output.d.ts.map +1 -0
  67. package/esm/lib/utils/response/output.js +24 -0
  68. package/esm/lib/utils/response/pick.d.ts +23 -0
  69. package/esm/lib/utils/response/pick.d.ts.map +1 -0
  70. package/esm/lib/utils/response/pick.js +25 -0
  71. package/esm/lib/utils/use/mod.d.ts.map +1 -0
  72. package/esm/lib/utils/use/mod.js +2 -0
  73. package/esm/lib/utils/use/useCancel.d.ts +33 -0
  74. package/esm/lib/utils/use/useCancel.d.ts.map +1 -0
  75. package/esm/lib/utils/use/useCancel.js +41 -0
  76. package/esm/lib/utils/use/useLoading.d.ts +34 -0
  77. package/esm/lib/utils/use/useLoading.d.ts.map +1 -0
  78. package/esm/lib/utils/use/useLoading.js +57 -0
  79. package/package.json +4 -11
  80. package/script/_dnt.polyfills.d.ts +11 -0
  81. package/script/_dnt.polyfills.d.ts.map +1 -1
  82. package/script/_dnt.polyfills.js +15 -0
  83. package/script/_dnt.shims.d.ts +1 -13
  84. package/script/_dnt.shims.d.ts.map +1 -1
  85. package/script/_dnt.shims.js +2 -21
  86. package/script/lib/mod.d.ts +1 -1
  87. package/script/lib/mod.d.ts.map +1 -1
  88. package/script/lib/mod.js +1 -1
  89. package/script/lib/reqwest/class.d.ts +116 -78
  90. package/script/lib/reqwest/class.d.ts.map +1 -1
  91. package/script/lib/reqwest/class.js +135 -25
  92. package/script/lib/reqwest/core.d.ts +5 -0
  93. package/script/lib/reqwest/core.d.ts.map +1 -1
  94. package/script/lib/reqwest/core.js +119 -23
  95. package/script/lib/reqwest/factor.d.ts +2 -2
  96. package/script/lib/reqwest/factor.d.ts.map +1 -1
  97. package/script/lib/reqwest/factor.js +2 -2
  98. package/script/lib/reqwest/interface.d.ts +160 -11
  99. package/script/lib/reqwest/interface.d.ts.map +1 -1
  100. package/script/lib/reqwest/mod.d.ts +1 -1
  101. package/script/lib/reqwest/mod.d.ts.map +1 -1
  102. package/script/lib/{helper → utils}/mod.d.ts +1 -0
  103. package/script/lib/utils/mod.d.ts.map +1 -0
  104. package/script/lib/{helper → utils}/mod.js +1 -0
  105. package/script/lib/utils/other/mod.d.ts +2 -0
  106. package/script/lib/utils/other/mod.d.ts.map +1 -0
  107. package/script/lib/{helper/response → utils/other}/mod.js +1 -2
  108. package/script/lib/utils/other/sseParse.d.ts +34 -0
  109. package/script/lib/utils/other/sseParse.d.ts.map +1 -0
  110. package/script/lib/utils/other/sseParse.js +45 -0
  111. package/{esm/lib/helper → script/lib/utils}/request/RESTful.d.ts +43 -11
  112. package/script/lib/utils/request/RESTful.d.ts.map +1 -0
  113. package/script/lib/utils/request/RESTful.js +140 -0
  114. package/script/lib/utils/request/baseConf.d.ts +22 -0
  115. package/script/lib/utils/request/baseConf.d.ts.map +1 -0
  116. package/script/lib/utils/request/baseConf.js +42 -0
  117. package/script/lib/utils/request/factors.d.ts +30 -0
  118. package/script/lib/utils/request/factors.d.ts.map +1 -0
  119. package/script/lib/utils/request/factors.js +42 -0
  120. package/script/lib/{helper → utils}/request/input.d.ts +4 -3
  121. package/script/lib/utils/request/input.d.ts.map +1 -0
  122. package/script/lib/{helper → utils}/request/input.js +10 -10
  123. package/script/lib/utils/request/mod.d.ts +7 -0
  124. package/script/lib/utils/request/mod.d.ts.map +1 -0
  125. package/script/lib/utils/request/mod.js +22 -0
  126. package/script/lib/utils/request/process.d.ts +16 -0
  127. package/script/lib/utils/request/process.d.ts.map +1 -0
  128. package/script/lib/utils/request/process.js +41 -0
  129. package/script/lib/utils/request/wait.d.ts +10 -0
  130. package/script/lib/utils/request/wait.d.ts.map +1 -0
  131. package/script/lib/utils/request/wait.js +17 -0
  132. package/script/lib/utils/response/blobToUrl.d.ts +10 -0
  133. package/script/lib/utils/response/blobToUrl.d.ts.map +1 -0
  134. package/script/lib/utils/response/blobToUrl.js +24 -0
  135. package/script/lib/utils/response/mod.d.ts +5 -0
  136. package/script/lib/utils/response/mod.d.ts.map +1 -0
  137. package/script/lib/{helper/request → utils/response}/mod.js +4 -3
  138. package/script/lib/utils/response/openLink.d.ts +7 -0
  139. package/script/lib/utils/response/openLink.d.ts.map +1 -0
  140. package/script/lib/{helper/use/useLoading.js → utils/response/openLink.js} +17 -22
  141. package/script/lib/utils/response/output.d.ts +16 -0
  142. package/script/lib/utils/response/output.d.ts.map +1 -0
  143. package/script/lib/utils/response/output.js +28 -0
  144. package/script/lib/utils/response/pick.d.ts +23 -0
  145. package/script/lib/utils/response/pick.d.ts.map +1 -0
  146. package/script/lib/utils/response/pick.js +28 -0
  147. package/script/lib/utils/use/mod.d.ts.map +1 -0
  148. package/script/lib/{helper → utils}/use/mod.js +2 -2
  149. package/script/lib/utils/use/useCancel.d.ts +33 -0
  150. package/script/lib/utils/use/useCancel.d.ts.map +1 -0
  151. package/script/lib/utils/use/useCancel.js +44 -0
  152. package/script/lib/utils/use/useLoading.d.ts +34 -0
  153. package/script/lib/utils/use/useLoading.d.ts.map +1 -0
  154. package/script/lib/utils/use/useLoading.js +60 -0
  155. package/esm/lib/helper/mod.d.ts.map +0 -1
  156. package/esm/lib/helper/request/RESTful.d.ts.map +0 -1
  157. package/esm/lib/helper/request/RESTful.js +0 -1
  158. package/esm/lib/helper/request/baseConf.d.ts +0 -15
  159. package/esm/lib/helper/request/baseConf.d.ts.map +0 -1
  160. package/esm/lib/helper/request/baseConf.js +0 -1
  161. package/esm/lib/helper/request/input.d.ts.map +0 -1
  162. package/esm/lib/helper/request/input.js +0 -1
  163. package/esm/lib/helper/request/mod.d.ts +0 -4
  164. package/esm/lib/helper/request/mod.d.ts.map +0 -1
  165. package/esm/lib/helper/request/mod.js +0 -3
  166. package/esm/lib/helper/response/mod.d.ts +0 -3
  167. package/esm/lib/helper/response/mod.d.ts.map +0 -1
  168. package/esm/lib/helper/response/mod.js +0 -2
  169. package/esm/lib/helper/response/output.d.ts +0 -5
  170. package/esm/lib/helper/response/output.d.ts.map +0 -1
  171. package/esm/lib/helper/response/output.js +0 -1
  172. package/esm/lib/helper/response/pick.d.ts +0 -7
  173. package/esm/lib/helper/response/pick.d.ts.map +0 -1
  174. package/esm/lib/helper/response/pick.js +0 -1
  175. package/esm/lib/helper/use/mod.d.ts.map +0 -1
  176. package/esm/lib/helper/use/mod.js +0 -2
  177. package/esm/lib/helper/use/useCancel.d.ts +0 -4
  178. package/esm/lib/helper/use/useCancel.d.ts.map +0 -1
  179. package/esm/lib/helper/use/useCancel.js +0 -1
  180. package/esm/lib/helper/use/useLoading.d.ts +0 -15
  181. package/esm/lib/helper/use/useLoading.d.ts.map +0 -1
  182. package/esm/lib/helper/use/useLoading.js +0 -1
  183. package/script/lib/helper/mod.d.ts.map +0 -1
  184. package/script/lib/helper/request/RESTful.d.ts.map +0 -1
  185. package/script/lib/helper/request/RESTful.js +0 -86
  186. package/script/lib/helper/request/baseConf.d.ts +0 -15
  187. package/script/lib/helper/request/baseConf.d.ts.map +0 -1
  188. package/script/lib/helper/request/baseConf.js +0 -27
  189. package/script/lib/helper/request/input.d.ts.map +0 -1
  190. package/script/lib/helper/request/mod.d.ts +0 -4
  191. package/script/lib/helper/request/mod.d.ts.map +0 -1
  192. package/script/lib/helper/response/mod.d.ts +0 -3
  193. package/script/lib/helper/response/mod.d.ts.map +0 -1
  194. package/script/lib/helper/response/output.d.ts +0 -5
  195. package/script/lib/helper/response/output.d.ts.map +0 -1
  196. package/script/lib/helper/response/output.js +0 -15
  197. package/script/lib/helper/response/pick.d.ts +0 -7
  198. package/script/lib/helper/response/pick.d.ts.map +0 -1
  199. package/script/lib/helper/response/pick.js +0 -12
  200. package/script/lib/helper/use/mod.d.ts.map +0 -1
  201. package/script/lib/helper/use/useCancel.d.ts +0 -4
  202. package/script/lib/helper/use/useCancel.d.ts.map +0 -1
  203. package/script/lib/helper/use/useCancel.js +0 -15
  204. package/script/lib/helper/use/useLoading.d.ts +0 -15
  205. package/script/lib/helper/use/useLoading.d.ts.map +0 -1
  206. /package/esm/lib/{helper → utils}/use/mod.d.ts +0 -0
  207. /package/script/lib/{helper → utils}/use/mod.d.ts +0 -0
@@ -0,0 +1,37 @@
1
+ import { Ok } from '@chzky/core';
2
+ /** ## `header` : 修改请求头数据
3
+ @param head `AxiosRequestHeaders` - 请求头数据
4
+ @type `Interceptor` - `Request`
5
+ @category `Request`
6
+ */
7
+ export function header(head) {
8
+ return conf => {
9
+ for (const key in head) {
10
+ if (Object.hasOwn(head, key))
11
+ conf.headers.set(String(key), head[key]);
12
+ }
13
+ return Ok();
14
+ };
15
+ }
16
+ /** ## `response_type` : 修改响应数据类型
17
+ @param type `ResponseType` - 响应数据类型
18
+ @type `Interceptor` - `Request`
19
+ @category `Request`
20
+ */
21
+ export function response_type(type) {
22
+ return conf => {
23
+ conf.responseType = type;
24
+ return Ok();
25
+ };
26
+ }
27
+ /** ## `timeout` : 修改请求超时时间
28
+ @param time `PositiveInteger<N>` - 请求超时时间
29
+ @type `Interceptor` - `Request`
30
+ @category `Request`
31
+ */
32
+ export function timeout(time) {
33
+ return conf => {
34
+ conf.timeout = time;
35
+ return Ok();
36
+ };
37
+ }
@@ -0,0 +1,30 @@
1
+ import type { Fn, JsonXObject, zod } from '@chzky/core';
2
+ import type { RequestInterceptor } from '../../../mod.js';
3
+ import { CheckingError } from '@chzky/core';
4
+ type Methods = 'get' | 'post' | 'put' | 'delete' | 'form';
5
+ /** ## `restful_request` : `url配置` + `类型校验` + `数据输入`
6
+ + 对于`get`请求 , data传数据到`query`上
7
+ + 对于`post`|`put`|`delete`|`form`请求 , data传数据到`body`上
8
+ @example Usage
9
+ ```ts
10
+ // GET请求 - 验证
11
+ const get_user = restful_request('get', '/api/users', z.object({ id: z.number() }))
12
+ get_user({ id: 1 }) // params: { id: 1 }
13
+
14
+ // POST请求 - 验证
15
+ const create_user = restful_request('post', '/api/users', z.object({ name: z.string() }))
16
+ create_user({ name: 'john' }) // body: { name: 'john' }
17
+
18
+ // PUT请求 - 无验证
19
+ const update_user = restful_request('put', '/api/users')
20
+ update_user({ name: 'john' }) // body: { name: 'john' }
21
+
22
+ // 表单请求 - 无验证
23
+ const upload = restful_request('form', '/api/upload')
24
+ upload(new FormData()) // body: FormData
25
+ ```
26
+ @cataegory Reqwest - Helper
27
+ */
28
+ export declare function restful_request<T extends JsonXObject & Record<string | number, string | Blob> = never>(method: Methods, url: string, validate?: zod.Schema<T>): Fn<T, RequestInterceptor<T extends never ? never : CheckingError>>;
29
+ export {};
30
+ //# sourceMappingURL=factors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"factors.d.ts","sourceRoot":"","sources":["../../../../src/lib/utils/request/factors.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,WAAW,EAAE,GAAG,EAAE,MAAM,aAAa,CAAA;AACvD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAA;AAEzD,OAAO,EAAE,aAAa,EAAS,MAAM,aAAa,CAAA;AAGlD,KAAK,OAAO,GAAG,KAAK,GAAG,MAAM,GAAG,KAAK,GAAG,QAAQ,GAAG,MAAM,CAAA;AAGzD;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,eAAe,CAC9B,CAAC,SAAS,WAAW,GAAG,MAAM,CAAC,MAAM,GAAG,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC,GAAG,KAAK,EAEtE,MAAM,EAAE,OAAO,EACf,GAAG,EAAE,MAAM,EACX,QAAQ,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,GACtB,EAAE,CAAC,CAAC,EAAE,kBAAkB,CAAC,CAAC,SAAS,KAAK,GAAG,KAAK,GAAG,aAAa,CAAC,CAAC,CAYpE"}
@@ -0,0 +1,39 @@
1
+ import { CheckingError, match } from '@chzky/core';
2
+ import { del, form, get, input_validate, merge_request, post, put } from '../../../mod.js';
3
+ const ERROR_MSG = `param checktype must be 'data' or 'params`;
4
+ /** ## `restful_request` : `url配置` + `类型校验` + `数据输入`
5
+ + 对于`get`请求 , data传数据到`query`上
6
+ + 对于`post`|`put`|`delete`|`form`请求 , data传数据到`body`上
7
+ @example Usage
8
+ ```ts
9
+ // GET请求 - 验证
10
+ const get_user = restful_request('get', '/api/users', z.object({ id: z.number() }))
11
+ get_user({ id: 1 }) // params: { id: 1 }
12
+
13
+ // POST请求 - 验证
14
+ const create_user = restful_request('post', '/api/users', z.object({ name: z.string() }))
15
+ create_user({ name: 'john' }) // body: { name: 'john' }
16
+
17
+ // PUT请求 - 无验证
18
+ const update_user = restful_request('put', '/api/users')
19
+ update_user({ name: 'john' }) // body: { name: 'john' }
20
+
21
+ // 表单请求 - 无验证
22
+ const upload = restful_request('form', '/api/upload')
23
+ upload(new FormData()) // body: FormData
24
+ ```
25
+ @cataegory Reqwest - Helper
26
+ */
27
+ export function restful_request(method, url, validate) {
28
+ return ((data) => {
29
+ const METHOD = match(method)
30
+ .case('delete', del)
31
+ .case('get', get)
32
+ .case('post', post)
33
+ .case('put', put)
34
+ .case('form', form)
35
+ .done()
36
+ .expect(CheckingError.new(ERROR_MSG));
37
+ return validate ? merge_request(METHOD(url, data), input_validate(validate)) : METHOD(url, data);
38
+ });
39
+ }
@@ -1,11 +1,12 @@
1
- import { CheckingError, type zod } from '@chzky/fp';
1
+ import type { zod } from '@chzky/core';
2
2
  import type { RequestInterceptor } from '../../../mod.js';
3
- /** ## `input` : 使用`zod`对输入的data数据进行校验
3
+ import { CheckingError } from '@chzky/core';
4
+ /** ## `input_validate` : 使用`zod`对输入的data数据进行解析校验(使用`zod.parse`)
4
5
  + 该方法会返回一个`RequestInterceptor`拦截器,如果校验失败会返回`CheckingError`
5
6
  @param schema `zod.Schema<unknown>` - 校验规则
6
7
  @param [checktype] `'data' | 'params'` - 校验类型,如果是`get`请求则默认为`params`,其他类型的请求默认为`data`,
7
8
  @type `Interceptor` - `Request`
8
9
  @category `Request`
9
10
  */
10
- export declare function input(schema: zod.Schema<unknown>, checktype?: 'data' | 'params'): RequestInterceptor<CheckingError>;
11
+ export declare function input_validate(schema: zod.Schema<unknown>, checktype?: 'data' | 'params'): RequestInterceptor<CheckingError>;
11
12
  //# sourceMappingURL=input.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../../../../src/lib/utils/request/input.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,aAAa,CAAA;AACtC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAA;AAEzD,OAAO,EAAE,aAAa,EAAM,MAAM,aAAa,CAAA;AAI/C;;;;;;EAME;AACF,wBAAgB,cAAc,CAC7B,MAAM,EAAE,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,EAC3B,SAAS,CAAC,EAAE,MAAM,GAAG,QAAQ,GAC3B,kBAAkB,CAAC,aAAa,CAAC,CAYnC"}
@@ -0,0 +1,24 @@
1
+ import { CheckingError, Ok } from '@chzky/core';
2
+ const ERROR_MSG = `param checktype must be 'data' or 'params'`;
3
+ /** ## `input_validate` : 使用`zod`对输入的data数据进行解析校验(使用`zod.parse`)
4
+ + 该方法会返回一个`RequestInterceptor`拦截器,如果校验失败会返回`CheckingError`
5
+ @param schema `zod.Schema<unknown>` - 校验规则
6
+ @param [checktype] `'data' | 'params'` - 校验类型,如果是`get`请求则默认为`params`,其他类型的请求默认为`data`,
7
+ @type `Interceptor` - `Request`
8
+ @category `Request`
9
+ */
10
+ export function input_validate(schema, checktype) {
11
+ return conf => {
12
+ conf.timeout;
13
+ const ct = checktype || conf.method === 'get' ? 'params' : 'data';
14
+ if (ct !== 'data' && ct !== 'params')
15
+ return CheckingError.err(ERROR_MSG);
16
+ try {
17
+ schema.parse(ct === 'data' ? conf.data : conf.params);
18
+ return Ok();
19
+ }
20
+ catch (e) {
21
+ return CheckingError.err(e);
22
+ }
23
+ };
24
+ }
@@ -0,0 +1,7 @@
1
+ export * from './baseConf.js';
2
+ export * from './factors.js';
3
+ export * from './input.js';
4
+ export * from './process.js';
5
+ export * from './RESTful.js';
6
+ export * from './wait.js';
7
+ //# sourceMappingURL=mod.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../../../../src/lib/utils/request/mod.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAA;AAC7B,cAAc,cAAc,CAAA;AAC5B,cAAc,YAAY,CAAA;AAC1B,cAAc,cAAc,CAAA;AAC5B,cAAc,cAAc,CAAA;AAC5B,cAAc,WAAW,CAAA"}
@@ -0,0 +1,6 @@
1
+ export * from './baseConf.js'; /* 提供基础配置 */
2
+ export * from './factors.js'; /* 请求集合 */
3
+ export * from './input.js'; /* 请求参数校验 */
4
+ export * from './process.js'; /* 进度 */
5
+ export * from './RESTful.js'; /* 提供restful配置 */
6
+ export * from './wait.js'; /* 请求等待 */
@@ -0,0 +1,16 @@
1
+ import { RequestInterceptor } from '../../../mod.js';
2
+ /** ## `upload_process` : 上传进度查询(浏览器专属)
3
+ + 进度只保留两位小数,即`xx.yy%`
4
+ + 存在两种情况,进度不可计算时,返回`-1%`
5
+ + `event.lengthComputable`为`false` (长度不可计算)
6
+ + `event.total`为`0`(数据的总大小不可知)
7
+ */
8
+ export default function upload_process(progress: (percent: number) => void): RequestInterceptor<never>;
9
+ /** ## `download_process` : 下载进度查询(浏览器专属)
10
+ + 进度只保留两位小数,即`xx.yy%`
11
+ + 存在两种情况,进度不可计算时,返回`-1%`
12
+ + `event.lengthComputable`为`false` (长度不可计算)
13
+ + `event.total`为`0`(数据的总大小不可知)
14
+ */
15
+ export declare function download_process(progress: (percent: number) => void): RequestInterceptor<never>;
16
+ //# sourceMappingURL=process.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"process.d.ts","sourceRoot":"","sources":["../../../../src/lib/utils/request/process.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAA;AAEpD;;;;;EAKE;AACF,MAAM,CAAC,OAAO,UAAU,cAAc,CACrC,QAAQ,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,GACjC,kBAAkB,CAAC,KAAK,CAAC,CAS3B;AAED;;;;;EAKE;AACF,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,GAAG,kBAAkB,CAAC,KAAK,CAAC,CAU/F"}
@@ -0,0 +1,37 @@
1
+ import { Ok } from '@chzky/core';
2
+ /** ## `upload_process` : 上传进度查询(浏览器专属)
3
+ + 进度只保留两位小数,即`xx.yy%`
4
+ + 存在两种情况,进度不可计算时,返回`-1%`
5
+ + `event.lengthComputable`为`false` (长度不可计算)
6
+ + `event.total`为`0`(数据的总大小不可知)
7
+ */
8
+ export default function upload_process(progress) {
9
+ return conf => {
10
+ conf.onUploadProgress = event => {
11
+ if (event.lengthComputable && event.total) {
12
+ progress(Number.parseFloat(((event.loaded * 100) / event.total).toFixed(2)));
13
+ }
14
+ else
15
+ progress(-1);
16
+ };
17
+ return Ok();
18
+ };
19
+ }
20
+ /** ## `download_process` : 下载进度查询(浏览器专属)
21
+ + 进度只保留两位小数,即`xx.yy%`
22
+ + 存在两种情况,进度不可计算时,返回`-1%`
23
+ + `event.lengthComputable`为`false` (长度不可计算)
24
+ + `event.total`为`0`(数据的总大小不可知)
25
+ */
26
+ export function download_process(progress) {
27
+ return conf => {
28
+ conf.onDownloadProgress = event => {
29
+ if (event.lengthComputable && event.total) {
30
+ progress(Number.parseFloat(((event.loaded * 100) / event.total).toFixed(2)));
31
+ }
32
+ else
33
+ progress(-1);
34
+ };
35
+ return Ok();
36
+ };
37
+ }
@@ -0,0 +1,10 @@
1
+ import type { PositiveInteger } from '@chzky/core';
2
+ import type { RequestInterceptor } from '../../../mod.js';
3
+ /** ## `wait` : 等待指定时间后继续执行请求
4
+ * @param time `PositiveInteger<N>` - The time to wait in milliseconds (must be a positive integer)
5
+ * @type `RequestInterceptor` - `Request`
6
+ * @category `Request`
7
+ * @returns A Promise that resolves after the specified time delay
8
+ */
9
+ export declare function wait<N extends number>(time: PositiveInteger<N>): RequestInterceptor<never>;
10
+ //# sourceMappingURL=wait.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"wait.d.ts","sourceRoot":"","sources":["../../../../src/lib/utils/request/wait.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAClD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAA;AAIzD;;;;;GAKG;AACH,wBAAgB,IAAI,CAAC,CAAC,SAAS,MAAM,EAAE,IAAI,EAAE,eAAe,CAAC,CAAC,CAAC,GAAG,kBAAkB,CAAC,KAAK,CAAC,CAO1F"}
@@ -0,0 +1,14 @@
1
+ import { Ok } from '@chzky/core';
2
+ /** ## `wait` : 等待指定时间后继续执行请求
3
+ * @param time `PositiveInteger<N>` - The time to wait in milliseconds (must be a positive integer)
4
+ * @type `RequestInterceptor` - `Request`
5
+ * @category `Request`
6
+ * @returns A Promise that resolves after the specified time delay
7
+ */
8
+ export function wait(time) {
9
+ return () => new Promise(res => {
10
+ setTimeout(() => {
11
+ res(Ok());
12
+ }, time);
13
+ });
14
+ }
@@ -0,0 +1,10 @@
1
+ import type { ResponseInterceptor } from '../../../mod.js';
2
+ /** ## blob2url : `blob`转化成`url`,赋值在`src`字段上
3
+ + 一般用于
4
+ 1. 图片显示
5
+ 2. 显示PDF
6
+ @returns [`revoke`:用于取消对`ObjectURL`对象的引用, `interceptor`:拦截器]
7
+ @category ResponseInterceptor
8
+ */
9
+ export declare function blob2url(): [() => void, ResponseInterceptor<Blob, string, never>];
10
+ //# sourceMappingURL=blobToUrl.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"blobToUrl.d.ts","sourceRoot":"","sources":["../../../../src/lib/utils/response/blobToUrl.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAA;AAI1D;;;;;;EAME;AACF,wBAAgB,QAAQ,IAAI,CAAC,MAAM,IAAI,EAAE,mBAAmB,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC,CAWjF"}
@@ -0,0 +1,21 @@
1
+ import { Ok } from '@chzky/core';
2
+ /** ## blob2url : `blob`转化成`url`,赋值在`src`字段上
3
+ + 一般用于
4
+ 1. 图片显示
5
+ 2. 显示PDF
6
+ @returns [`revoke`:用于取消对`ObjectURL`对象的引用, `interceptor`:拦截器]
7
+ @category ResponseInterceptor
8
+ */
9
+ export function blob2url() {
10
+ let object_url;
11
+ return [
12
+ () => {
13
+ if (object_url)
14
+ URL.revokeObjectURL(object_url);
15
+ },
16
+ blob => {
17
+ object_url = URL.createObjectURL(blob);
18
+ return Ok(object_url);
19
+ },
20
+ ];
21
+ }
@@ -0,0 +1,5 @@
1
+ export * from './blobToUrl.js';
2
+ export * from './openLink.js';
3
+ export * from './output.js';
4
+ export * from './pick.js';
5
+ //# sourceMappingURL=mod.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../../../../src/lib/utils/response/mod.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAA;AAC9B,cAAc,eAAe,CAAA;AAC7B,cAAc,aAAa,CAAA;AAC3B,cAAc,WAAW,CAAA"}
@@ -0,0 +1,4 @@
1
+ export * from './blobToUrl.js'; /* blob赋值src */
2
+ export * from './openLink.js'; /* blob下载 */
3
+ export * from './output.js'; /* 输出校验|输出map */
4
+ export * from './pick.js'; /* 字段提取 */
@@ -0,0 +1,7 @@
1
+ import type { ResponseInterceptor } from '../../../mod.js';
2
+ /** ### `open_link` : 将获取到的blob文件直接进行下载
3
+ @tips : 只能在浏览器环境下使用,在非浏览器环境下会直接返回blob
4
+ @category ResponseInterceptor
5
+ */
6
+ export declare function open_link(name: string): ResponseInterceptor<Blob, Blob, never>;
7
+ //# sourceMappingURL=openLink.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"openLink.d.ts","sourceRoot":"","sources":["../../../../src/lib/utils/response/openLink.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAA;AAI1D;;;EAGE;AACF,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,mBAAmB,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,CAAC,CAY9E"}
@@ -0,0 +1,20 @@
1
+ import * as dntShim from "../../../_dnt.shims.js";
2
+ import { Ok } from '@chzky/core';
3
+ /** ### `open_link` : 将获取到的blob文件直接进行下载
4
+ @tips : 只能在浏览器环境下使用,在非浏览器环境下会直接返回blob
5
+ @category ResponseInterceptor
6
+ */
7
+ export function open_link(name) {
8
+ return blob => {
9
+ var _a;
10
+ if (typeof dntShim.dntGlobalThis === 'undefined' || !((_a = dntShim.dntGlobalThis) === null || _a === void 0 ? void 0 : _a.document))
11
+ return Ok(blob);
12
+ // biome-ignore lint/suspicious/noExplicitAny: <>
13
+ const a = dntShim.dntGlobalThis.document.createElement('a');
14
+ a.href = URL.createObjectURL(blob);
15
+ a.download = name;
16
+ a.click();
17
+ a.remove();
18
+ return Ok(blob);
19
+ };
20
+ }
@@ -0,0 +1,16 @@
1
+ import type { Fn, Result, zod } from '@chzky/core';
2
+ import type { ResponseInterceptor } from '../../../mod.js';
3
+ import { CheckingError } from '@chzky/core';
4
+ /** ### `output_validate` : 对输出类型进行类型校验
5
+ + 会自动将放回类型进行校验(使用`zod.parse`),如果校验失败,则返回 `CheckingError`
6
+ @category `Request`
7
+ @category ResponseInterceptor
8
+ */
9
+ export declare function output_validate<T>(schema: zod.Schema<T>): ResponseInterceptor<unknown, zod.infer<typeof schema>, CheckingError>;
10
+ /** ## `response_map` : 对返回类型进行`map`操作
11
+ + 用于`AxiosResponse`的业务场景映射
12
+ + 用于返回数据映射
13
+ @category ResponseInterceptor
14
+ */
15
+ export declare function response_map<T, R, E>(fn: Fn<T, Result<R, E>>): ResponseInterceptor<T, R, E>;
16
+ //# sourceMappingURL=output.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"output.d.ts","sourceRoot":"","sources":["../../../../src/lib/utils/response/output.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,aAAa,CAAA;AAClD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAA;AAE1D,OAAO,EAAE,aAAa,EAAM,MAAM,aAAa,CAAA;AAE/C;;;;EAIE;AACF,wBAAgB,eAAe,CAAC,CAAC,EAChC,MAAM,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,GACnB,mBAAmB,CAAC,OAAO,EAAE,GAAG,CAAC,KAAK,CAAC,OAAO,MAAM,CAAC,EAAE,aAAa,CAAC,CAQvE;AAED;;;;EAIE;AACF,wBAAgB,YAAY,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,mBAAmB,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAE3F"}
@@ -0,0 +1,24 @@
1
+ import { CheckingError, Ok } from '@chzky/core';
2
+ /** ### `output_validate` : 对输出类型进行类型校验
3
+ + 会自动将放回类型进行校验(使用`zod.parse`),如果校验失败,则返回 `CheckingError`
4
+ @category `Request`
5
+ @category ResponseInterceptor
6
+ */
7
+ export function output_validate(schema) {
8
+ return response => {
9
+ try {
10
+ return Ok(schema.parse(response));
11
+ }
12
+ catch (e) {
13
+ return CheckingError.err(e);
14
+ }
15
+ };
16
+ }
17
+ /** ## `response_map` : 对返回类型进行`map`操作
18
+ + 用于`AxiosResponse`的业务场景映射
19
+ + 用于返回数据映射
20
+ @category ResponseInterceptor
21
+ */
22
+ export function response_map(fn) {
23
+ return response => fn(response);
24
+ }
@@ -0,0 +1,23 @@
1
+ import type { ResponseInterceptor } from '../../../mod.js';
2
+ import type { AxiosResponse } from 'axios';
3
+ type AxiosResponseKey = 'data' | 'status' | 'statusText' | 'headers' | 'config' | 'request';
4
+ /** ### `pick` : 提取`Axios`请求返回字段
5
+ + 默认返回`data`字段
6
+ 一般来说axios返回的数据是一个AxiosResponse对象,而我们只需要其中的data字段作为业务数据需要的字段
7
+ @example Usage
8
+ ```ts
9
+ const mock_reqwest = Reqwest.new().conf({ baseURL: 'https://jsonplaceholder.typicode.com/todos/' })
10
+
11
+ const result = await mock_reqwest
12
+ .request(get('/1'))
13
+ .response(pick<{ userId: number; id: number; title: string; completed: boolean }>('data'))
14
+ .dispatch()
15
+
16
+ assert.not(result.unwrap().completed)
17
+
18
+ ```
19
+ @category ResponseInterceptor
20
+ */
21
+ export declare function pick<T = never>(key: AxiosResponseKey): ResponseInterceptor<AxiosResponse, T extends never ? AxiosResponse[typeof key] : T, never>;
22
+ export {};
23
+ //# sourceMappingURL=pick.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pick.d.ts","sourceRoot":"","sources":["../../../../src/lib/utils/response/pick.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAA;AAC1D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAA;AAI1C,KAAK,gBAAgB,GAAG,MAAM,GAAG,QAAQ,GAAG,YAAY,GAAG,SAAS,GAAG,QAAQ,GAAG,SAAS,CAAA;AAE3F;;;;;;;;;;;;;;;;EAgBE;AACF,wBAAgB,IAAI,CAAC,CAAC,GAAG,KAAK,EAC7B,GAAG,EAAE,gBAAgB,GACnB,mBAAmB,CAAC,aAAa,EAAE,CAAC,SAAS,KAAK,GAAG,aAAa,CAAC,OAAO,GAAG,CAAC,GAAG,CAAC,EAAE,KAAK,CAAC,CAK5F"}
@@ -0,0 +1,25 @@
1
+ import { Ok } from '@chzky/core';
2
+ /** ### `pick` : 提取`Axios`请求返回字段
3
+ + 默认返回`data`字段
4
+ 一般来说axios返回的数据是一个AxiosResponse对象,而我们只需要其中的data字段作为业务数据需要的字段
5
+ @example Usage
6
+ ```ts
7
+ const mock_reqwest = Reqwest.new().conf({ baseURL: 'https://jsonplaceholder.typicode.com/todos/' })
8
+
9
+ const result = await mock_reqwest
10
+ .request(get('/1'))
11
+ .response(pick<{ userId: number; id: number; title: string; completed: boolean }>('data'))
12
+ .dispatch()
13
+
14
+ assert.not(result.unwrap().completed)
15
+
16
+ ```
17
+ @category ResponseInterceptor
18
+ */
19
+ export function pick(key) {
20
+ return response => {
21
+ if (key in response && Object.hasOwn(response, key))
22
+ return Ok(response[key]);
23
+ throw new Error(`Key '${key}' does not exist on AxiosResponse`);
24
+ };
25
+ }
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../../../../src/lib/utils/use/mod.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAA;AAC9B,cAAc,iBAAiB,CAAA"}
@@ -0,0 +1,2 @@
1
+ export * from './useCancel.js'; /* 取消控制 */
2
+ export * from './useLoading.js'; /* loading控制 */
@@ -0,0 +1,33 @@
1
+ import type { RequestInterceptor } from '../../../mod.js';
2
+ import { AbortedError, PromiseOr, Result } from '@chzky/core';
3
+ type CancelInterceptor = [
4
+ AbortController,
5
+ {
6
+ request: RequestInterceptor<AbortedError>;
7
+ response: <O>(response: O) => PromiseOr<Result<O, AbortedError>>;
8
+ }
9
+ ];
10
+ /** ### `cancel` : 允许取消操作
11
+ + 在请求时取消,会直接取消请求
12
+ + 在响应时取消,会直接丢弃响应值
13
+ @example Usage
14
+ ```ts
15
+ const [abort_controler, interceptor] = cancel()
16
+
17
+ const reqwest = mock_reqwest.clone().request(wait(2000), get('/1')).use(interceptor)
18
+
19
+ const mock_cause = 'mock abort'
20
+ abort_controler.abort(mock_cause)
21
+
22
+ const result = await reqwest.dispatch()
23
+
24
+ const error = result.unwrap_err()
25
+ assert(error.instance_of(AbortedError))
26
+ assert.equal(error.cause, mock_cause)
27
+ ```
28
+ @returns [ `abort_controler` - 控制取消的`AbortController` , `interceptor` - 拦截器 ]
29
+ @category ReqwestInterceptor
30
+ */
31
+ export declare function cancel(control?: AbortController): CancelInterceptor;
32
+ export {};
33
+ //# sourceMappingURL=useCancel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useCancel.d.ts","sourceRoot":"","sources":["../../../../src/lib/utils/use/useCancel.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAA;AAEzD,OAAO,EAAE,YAAY,EAAM,SAAS,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AAEjE,KAAK,iBAAiB,GAAG;IACxB,eAAe;IACf;QACC,OAAO,EAAE,kBAAkB,CAAC,YAAY,CAAC,CAAA;QACzC,QAAQ,EAAE,CAAC,CAAC,EAAE,QAAQ,EAAE,CAAC,KAAK,SAAS,CAAC,MAAM,CAAC,CAAC,EAAE,YAAY,CAAC,CAAC,CAAA;KAChE;CACD,CAAA;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,MAAM,CAAC,OAAO,CAAC,EAAE,eAAe,GAAG,iBAAiB,CAgBnE"}
@@ -0,0 +1,41 @@
1
+ import { AbortedError, Ok } from '@chzky/core';
2
+ /** ### `cancel` : 允许取消操作
3
+ + 在请求时取消,会直接取消请求
4
+ + 在响应时取消,会直接丢弃响应值
5
+ @example Usage
6
+ ```ts
7
+ const [abort_controler, interceptor] = cancel()
8
+
9
+ const reqwest = mock_reqwest.clone().request(wait(2000), get('/1')).use(interceptor)
10
+
11
+ const mock_cause = 'mock abort'
12
+ abort_controler.abort(mock_cause)
13
+
14
+ const result = await reqwest.dispatch()
15
+
16
+ const error = result.unwrap_err()
17
+ assert(error.instance_of(AbortedError))
18
+ assert.equal(error.cause, mock_cause)
19
+ ```
20
+ @returns [ `abort_controler` - 控制取消的`AbortController` , `interceptor` - 拦截器 ]
21
+ @category ReqwestInterceptor
22
+ */
23
+ export function cancel(control) {
24
+ const abort_control = control || new AbortController();
25
+ const signal = abort_control.signal;
26
+ return [
27
+ abort_control,
28
+ {
29
+ request: () => {
30
+ if (signal.aborted)
31
+ return AbortedError.err(signal.reason);
32
+ return Ok();
33
+ },
34
+ response: (response) => {
35
+ if (signal.aborted)
36
+ return AbortedError.err(signal.reason);
37
+ return Ok(response);
38
+ },
39
+ },
40
+ ];
41
+ }
@@ -0,0 +1,34 @@
1
+ import { ReqwestInterceptor } from '../../../mod.js';
2
+ import { Ref } from 'vue-demi';
3
+ type LoadingConfig = {
4
+ /** 最大等待时间,超时之后loding状态会变为false,默认值是`Axios.timeout`
5
+ 如果设置为`0`,即永不超时,需要手动取消或等待请求完成
6
+ */
7
+ maximum?: number;
8
+ /** 超时回调 */
9
+ maximun_handler?: () => void;
10
+ };
11
+ type LoadingControlReturn = [AbortController, ReqwestInterceptor<unknown, never>];
12
+ /** ## `loading_control` : loading控制器
13
+ 使用` Ref<boolean, boolean>` 来控制loading状态 ,当reqwest开始执行的时候启动loading.当reqwest结束的时候关闭loading
14
+ + 如果请求时间超过`maximum`时间,loading状态会变为false,并执行`maximun_handler`回调
15
+ @example Usage
16
+ ```ts
17
+ const loading = ref(false)
18
+ const [_cnacel_controler, interceptor] = loading_control(loading, { maximum: 2000 })
19
+
20
+ let change_count = 0
21
+ watch(loading, nval => {
22
+ if (change_count === 0) assert(nval) //先变true(开始执行)
23
+ if (change_count === 1) assert(!nval) //后变false(执行结束)
24
+ change_count++
25
+ })
26
+
27
+ await mock_reqwest.clone().use(interceptor).dispatch()
28
+ ```
29
+ @returns [ `controller` - 控制取消的`AbortController` , `interceptor` - 拦截器 ]
30
+ @category ReqwestInterceptor
31
+ */
32
+ export declare function loading_control(ref: Ref<boolean, boolean>, conf?: LoadingConfig): LoadingControlReturn;
33
+ export {};
34
+ //# sourceMappingURL=useLoading.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useLoading.d.ts","sourceRoot":"","sources":["../../../../src/lib/utils/use/useLoading.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAA;AAEpD,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAA;AAE9B,KAAK,aAAa,GAAG;IACpB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,WAAW;IACX,eAAe,CAAC,EAAE,MAAM,IAAI,CAAA;CAC5B,CAAA;AAED,KAAK,oBAAoB,GAAG,CAAC,eAAe,EAAE,kBAAkB,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC,CAAA;AAEjF;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,eAAe,CAC9B,GAAG,EAAE,GAAG,CAAC,OAAO,EAAE,OAAO,CAAC,EAC1B,IAAI,CAAC,EAAE,aAAa,GAClB,oBAAoB,CAqCtB"}