@teammy/server 0.1.3 → 0.1.5

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 (446) hide show
  1. package/dist/main.js +705 -33
  2. package/dist/web/assets/Assistant-B3h2yQF3.css +1 -0
  3. package/dist/web/assets/Assistant-Dm_p8EZl.js +1 -0
  4. package/dist/web/assets/{Dashboard-CKFP7yNR.js → Dashboard-fwW9NxcC.js} +1 -1
  5. package/dist/web/assets/{Files-yA3LmJcB.js → Files-D-KCDWmO.js} +1 -1
  6. package/dist/web/assets/{Markdown-DD5hV21X.js → Markdown-oZagG-wy.js} +1 -1
  7. package/dist/web/assets/{Sessions-6CSHCq6e.js → Sessions-BQhGiLvz.js} +1 -1
  8. package/dist/web/assets/{WorkspaceTree-CeHWFFYr.js → WorkspaceTree-B9733pV3.js} +1 -1
  9. package/dist/web/assets/{file-links-Qi15HqFr.js → file-links-CD346_jf.js} +1 -1
  10. package/dist/web/assets/{index-B-MqU_88.css → index-Be5hGscJ.css} +1 -1
  11. package/dist/web/assets/index-BiiPuwDi.js +66 -0
  12. package/dist/web/index.html +2 -2
  13. package/node_modules/@wecom/aibot-node-sdk/README.md +786 -0
  14. package/node_modules/@wecom/aibot-node-sdk/dist/api.d.ts +17 -0
  15. package/node_modules/@wecom/aibot-node-sdk/dist/client.d.ts +217 -0
  16. package/node_modules/@wecom/aibot-node-sdk/dist/crypto.d.ts +12 -0
  17. package/node_modules/@wecom/aibot-node-sdk/dist/index.cjs.js +1563 -0
  18. package/node_modules/@wecom/aibot-node-sdk/dist/index.cjs.js.map +1 -0
  19. package/node_modules/@wecom/aibot-node-sdk/dist/index.d.ts +1324 -0
  20. package/node_modules/@wecom/aibot-node-sdk/dist/index.esm.js +1544 -0
  21. package/node_modules/@wecom/aibot-node-sdk/dist/index.esm.js.map +1 -0
  22. package/node_modules/@wecom/aibot-node-sdk/dist/logger.d.ts +14 -0
  23. package/node_modules/@wecom/aibot-node-sdk/dist/message-handler.d.ts +29 -0
  24. package/node_modules/@wecom/aibot-node-sdk/dist/types/api.d.ts +466 -0
  25. package/node_modules/@wecom/aibot-node-sdk/dist/types/common.d.ts +30 -0
  26. package/node_modules/@wecom/aibot-node-sdk/dist/types/config.d.ts +34 -0
  27. package/node_modules/@wecom/aibot-node-sdk/dist/types/event.d.ts +109 -0
  28. package/node_modules/@wecom/aibot-node-sdk/dist/types/index.d.ts +10 -0
  29. package/node_modules/@wecom/aibot-node-sdk/dist/types/message.d.ts +158 -0
  30. package/node_modules/@wecom/aibot-node-sdk/dist/utils.d.ts +19 -0
  31. package/node_modules/@wecom/aibot-node-sdk/dist/wecom-crypto/index.d.ts +46 -0
  32. package/node_modules/@wecom/aibot-node-sdk/dist/ws.d.ts +161 -0
  33. package/node_modules/@wecom/aibot-node-sdk/package.json +43 -0
  34. package/node_modules/asynckit/LICENSE +21 -0
  35. package/node_modules/asynckit/README.md +233 -0
  36. package/node_modules/asynckit/bench.js +76 -0
  37. package/node_modules/asynckit/index.js +6 -0
  38. package/node_modules/asynckit/lib/abort.js +29 -0
  39. package/node_modules/asynckit/lib/async.js +34 -0
  40. package/node_modules/asynckit/lib/defer.js +26 -0
  41. package/node_modules/asynckit/lib/iterate.js +75 -0
  42. package/node_modules/asynckit/lib/readable_asynckit.js +91 -0
  43. package/node_modules/asynckit/lib/readable_parallel.js +25 -0
  44. package/node_modules/asynckit/lib/readable_serial.js +25 -0
  45. package/node_modules/asynckit/lib/readable_serial_ordered.js +29 -0
  46. package/node_modules/asynckit/lib/state.js +37 -0
  47. package/node_modules/asynckit/lib/streamify.js +141 -0
  48. package/node_modules/asynckit/lib/terminator.js +29 -0
  49. package/node_modules/asynckit/package.json +63 -0
  50. package/node_modules/asynckit/parallel.js +43 -0
  51. package/node_modules/asynckit/serial.js +17 -0
  52. package/node_modules/asynckit/serialOrdered.js +75 -0
  53. package/node_modules/asynckit/stream.js +21 -0
  54. package/node_modules/axios/CHANGELOG.md +1934 -0
  55. package/node_modules/axios/LICENSE +7 -0
  56. package/node_modules/axios/MIGRATION_GUIDE.md +877 -0
  57. package/node_modules/axios/README.md +2786 -0
  58. package/node_modules/axios/dist/axios.js +6460 -0
  59. package/node_modules/axios/dist/axios.min.js +5 -0
  60. package/node_modules/axios/dist/axios.min.js.map +1 -0
  61. package/node_modules/axios/dist/browser/axios.cjs +6509 -0
  62. package/node_modules/axios/dist/esm/axios.js +6530 -0
  63. package/node_modules/axios/dist/esm/axios.min.js +3 -0
  64. package/node_modules/axios/dist/esm/axios.min.js.map +1 -0
  65. package/node_modules/axios/dist/node/axios.cjs +7491 -0
  66. package/node_modules/axios/index.d.cts +785 -0
  67. package/node_modules/axios/index.d.ts +804 -0
  68. package/node_modules/axios/index.js +45 -0
  69. package/node_modules/axios/lib/adapters/README.md +36 -0
  70. package/node_modules/axios/lib/adapters/adapters.js +132 -0
  71. package/node_modules/axios/lib/adapters/fetch.js +749 -0
  72. package/node_modules/axios/lib/adapters/http.js +1609 -0
  73. package/node_modules/axios/lib/adapters/xhr.js +384 -0
  74. package/node_modules/axios/lib/axios.js +89 -0
  75. package/node_modules/axios/lib/cancel/CancelToken.js +135 -0
  76. package/node_modules/axios/lib/cancel/CanceledError.js +22 -0
  77. package/node_modules/axios/lib/cancel/isCancel.js +5 -0
  78. package/node_modules/axios/lib/core/Axios.js +361 -0
  79. package/node_modules/axios/lib/core/AxiosError.js +278 -0
  80. package/node_modules/axios/lib/core/AxiosHeaders.js +487 -0
  81. package/node_modules/axios/lib/core/InterceptorManager.js +182 -0
  82. package/node_modules/axios/lib/core/README.md +8 -0
  83. package/node_modules/axios/lib/core/assertParamsAcyclic.js +49 -0
  84. package/node_modules/axios/lib/core/buildFullPath.js +76 -0
  85. package/node_modules/axios/lib/core/createMultipartBody.js +37 -0
  86. package/node_modules/axios/lib/core/dispatchRequest.js +115 -0
  87. package/node_modules/axios/lib/core/mergeConfig.js +237 -0
  88. package/node_modules/axios/lib/core/methodList.js +17 -0
  89. package/node_modules/axios/lib/core/setFormDataHeaders.js +27 -0
  90. package/node_modules/axios/lib/core/settle.js +27 -0
  91. package/node_modules/axios/lib/core/transformData.js +28 -0
  92. package/node_modules/axios/lib/defaults/index.js +178 -0
  93. package/node_modules/axios/lib/defaults/transitional.js +11 -0
  94. package/node_modules/axios/lib/env/README.md +3 -0
  95. package/node_modules/axios/lib/env/classes/FormData.js +2 -0
  96. package/node_modules/axios/lib/env/data.js +1 -0
  97. package/node_modules/axios/lib/helpers/AxiosTransformStream.js +165 -0
  98. package/node_modules/axios/lib/helpers/AxiosURLSearchParams.js +59 -0
  99. package/node_modules/axios/lib/helpers/Http2Sessions.js +122 -0
  100. package/node_modules/axios/lib/helpers/HttpStatusCode.js +88 -0
  101. package/node_modules/axios/lib/helpers/README.md +7 -0
  102. package/node_modules/axios/lib/helpers/ZlibHeaderTransformStream.js +29 -0
  103. package/node_modules/axios/lib/helpers/bind.js +14 -0
  104. package/node_modules/axios/lib/helpers/buildURL.js +69 -0
  105. package/node_modules/axios/lib/helpers/callbackify.js +18 -0
  106. package/node_modules/axios/lib/helpers/combineURLs.js +23 -0
  107. package/node_modules/axios/lib/helpers/composeSignals.js +71 -0
  108. package/node_modules/axios/lib/helpers/cookies.js +88 -0
  109. package/node_modules/axios/lib/helpers/deprecatedMethod.js +31 -0
  110. package/node_modules/axios/lib/helpers/estimateDataURLDecodedBytes.js +193 -0
  111. package/node_modules/axios/lib/helpers/formDataToBlob.js +113 -0
  112. package/node_modules/axios/lib/helpers/formDataToJSON.js +149 -0
  113. package/node_modules/axios/lib/helpers/formDataToStream.js +119 -0
  114. package/node_modules/axios/lib/helpers/fromDataURI.js +75 -0
  115. package/node_modules/axios/lib/helpers/isAbsoluteURL.js +19 -0
  116. package/node_modules/axios/lib/helpers/isAxiosError.js +14 -0
  117. package/node_modules/axios/lib/helpers/isURLSameOrigin.js +11 -0
  118. package/node_modules/axios/lib/helpers/normalizeURLForProtocolCheck.js +24 -0
  119. package/node_modules/axios/lib/helpers/null.js +2 -0
  120. package/node_modules/axios/lib/helpers/parseHeaders.js +72 -0
  121. package/node_modules/axios/lib/helpers/parseProtocol.js +6 -0
  122. package/node_modules/axios/lib/helpers/progressEventReducer.js +54 -0
  123. package/node_modules/axios/lib/helpers/readBlob.js +15 -0
  124. package/node_modules/axios/lib/helpers/resolveConfig.js +120 -0
  125. package/node_modules/axios/lib/helpers/sanitizeHeaderValue.js +60 -0
  126. package/node_modules/axios/lib/helpers/shouldBypassProxy.js +520 -0
  127. package/node_modules/axios/lib/helpers/speedometer.js +55 -0
  128. package/node_modules/axios/lib/helpers/spread.js +28 -0
  129. package/node_modules/axios/lib/helpers/throttle.js +45 -0
  130. package/node_modules/axios/lib/helpers/toFormData.js +279 -0
  131. package/node_modules/axios/lib/helpers/toURLEncodedForm.js +19 -0
  132. package/node_modules/axios/lib/helpers/trackStream.js +89 -0
  133. package/node_modules/axios/lib/helpers/validator.js +112 -0
  134. package/node_modules/axios/lib/platform/browser/classes/Blob.js +3 -0
  135. package/node_modules/axios/lib/platform/browser/classes/FormData.js +3 -0
  136. package/node_modules/axios/lib/platform/browser/classes/URLSearchParams.js +4 -0
  137. package/node_modules/axios/lib/platform/browser/index.js +13 -0
  138. package/node_modules/axios/lib/platform/common/utils.js +52 -0
  139. package/node_modules/axios/lib/platform/index.js +7 -0
  140. package/node_modules/axios/lib/platform/node/classes/Buffer.js +11 -0
  141. package/node_modules/axios/lib/platform/node/classes/FormData.js +3 -0
  142. package/node_modules/axios/lib/platform/node/classes/URLSearchParams.js +4 -0
  143. package/node_modules/axios/lib/platform/node/index.js +37 -0
  144. package/node_modules/axios/lib/utils.js +1201 -0
  145. package/node_modules/axios/node_modules/agent-base/README.md +145 -0
  146. package/node_modules/axios/node_modules/agent-base/dist/src/index.d.ts +78 -0
  147. package/node_modules/axios/node_modules/agent-base/dist/src/index.js +203 -0
  148. package/node_modules/axios/node_modules/agent-base/dist/src/index.js.map +1 -0
  149. package/node_modules/axios/node_modules/agent-base/dist/src/promisify.d.ts +4 -0
  150. package/node_modules/axios/node_modules/agent-base/dist/src/promisify.js +18 -0
  151. package/node_modules/axios/node_modules/agent-base/dist/src/promisify.js.map +1 -0
  152. package/node_modules/axios/node_modules/agent-base/package.json +64 -0
  153. package/node_modules/axios/node_modules/agent-base/src/index.ts +345 -0
  154. package/node_modules/axios/node_modules/agent-base/src/promisify.ts +33 -0
  155. package/node_modules/axios/node_modules/https-proxy-agent/README.md +137 -0
  156. package/node_modules/axios/node_modules/https-proxy-agent/dist/agent.d.ts +30 -0
  157. package/node_modules/axios/node_modules/https-proxy-agent/dist/agent.js +177 -0
  158. package/node_modules/axios/node_modules/https-proxy-agent/dist/agent.js.map +1 -0
  159. package/node_modules/axios/node_modules/https-proxy-agent/dist/index.d.ts +23 -0
  160. package/node_modules/axios/node_modules/https-proxy-agent/dist/index.js +14 -0
  161. package/node_modules/axios/node_modules/https-proxy-agent/dist/index.js.map +1 -0
  162. package/node_modules/axios/node_modules/https-proxy-agent/dist/parse-proxy-response.d.ts +7 -0
  163. package/node_modules/axios/node_modules/https-proxy-agent/dist/parse-proxy-response.js +66 -0
  164. package/node_modules/axios/node_modules/https-proxy-agent/dist/parse-proxy-response.js.map +1 -0
  165. package/node_modules/axios/node_modules/https-proxy-agent/package.json +56 -0
  166. package/node_modules/axios/package.json +202 -0
  167. package/node_modules/call-bind-apply-helpers/.eslintrc +17 -0
  168. package/node_modules/call-bind-apply-helpers/.github/FUNDING.yml +12 -0
  169. package/node_modules/call-bind-apply-helpers/.nycrc +9 -0
  170. package/node_modules/call-bind-apply-helpers/CHANGELOG.md +30 -0
  171. package/node_modules/call-bind-apply-helpers/LICENSE +21 -0
  172. package/node_modules/call-bind-apply-helpers/README.md +62 -0
  173. package/node_modules/call-bind-apply-helpers/actualApply.d.ts +1 -0
  174. package/node_modules/call-bind-apply-helpers/actualApply.js +10 -0
  175. package/node_modules/call-bind-apply-helpers/applyBind.d.ts +19 -0
  176. package/node_modules/call-bind-apply-helpers/applyBind.js +10 -0
  177. package/node_modules/call-bind-apply-helpers/functionApply.d.ts +1 -0
  178. package/node_modules/call-bind-apply-helpers/functionApply.js +4 -0
  179. package/node_modules/call-bind-apply-helpers/functionCall.d.ts +1 -0
  180. package/node_modules/call-bind-apply-helpers/functionCall.js +4 -0
  181. package/node_modules/call-bind-apply-helpers/index.d.ts +64 -0
  182. package/node_modules/call-bind-apply-helpers/index.js +15 -0
  183. package/node_modules/call-bind-apply-helpers/package.json +85 -0
  184. package/node_modules/call-bind-apply-helpers/reflectApply.d.ts +3 -0
  185. package/node_modules/call-bind-apply-helpers/reflectApply.js +4 -0
  186. package/node_modules/call-bind-apply-helpers/test/index.js +63 -0
  187. package/node_modules/call-bind-apply-helpers/tsconfig.json +9 -0
  188. package/node_modules/combined-stream/License +19 -0
  189. package/node_modules/combined-stream/Readme.md +138 -0
  190. package/node_modules/combined-stream/lib/combined_stream.js +208 -0
  191. package/node_modules/combined-stream/package.json +25 -0
  192. package/node_modules/delayed-stream/.npmignore +1 -0
  193. package/node_modules/delayed-stream/License +19 -0
  194. package/node_modules/delayed-stream/Makefile +7 -0
  195. package/node_modules/delayed-stream/Readme.md +141 -0
  196. package/node_modules/delayed-stream/lib/delayed_stream.js +107 -0
  197. package/node_modules/delayed-stream/package.json +27 -0
  198. package/node_modules/dunder-proto/.eslintrc +5 -0
  199. package/node_modules/dunder-proto/.github/FUNDING.yml +12 -0
  200. package/node_modules/dunder-proto/.nycrc +13 -0
  201. package/node_modules/dunder-proto/CHANGELOG.md +24 -0
  202. package/node_modules/dunder-proto/LICENSE +21 -0
  203. package/node_modules/dunder-proto/README.md +54 -0
  204. package/node_modules/dunder-proto/get.d.ts +5 -0
  205. package/node_modules/dunder-proto/get.js +30 -0
  206. package/node_modules/dunder-proto/package.json +76 -0
  207. package/node_modules/dunder-proto/set.d.ts +5 -0
  208. package/node_modules/dunder-proto/set.js +35 -0
  209. package/node_modules/dunder-proto/test/get.js +34 -0
  210. package/node_modules/dunder-proto/test/index.js +4 -0
  211. package/node_modules/dunder-proto/test/set.js +50 -0
  212. package/node_modules/dunder-proto/tsconfig.json +9 -0
  213. package/node_modules/es-define-property/.eslintrc +13 -0
  214. package/node_modules/es-define-property/.github/FUNDING.yml +12 -0
  215. package/node_modules/es-define-property/.nycrc +9 -0
  216. package/node_modules/es-define-property/CHANGELOG.md +29 -0
  217. package/node_modules/es-define-property/LICENSE +21 -0
  218. package/node_modules/es-define-property/README.md +49 -0
  219. package/node_modules/es-define-property/index.d.ts +3 -0
  220. package/node_modules/es-define-property/index.js +14 -0
  221. package/node_modules/es-define-property/package.json +81 -0
  222. package/node_modules/es-define-property/test/index.js +56 -0
  223. package/node_modules/es-define-property/tsconfig.json +10 -0
  224. package/node_modules/es-errors/.eslintrc +5 -0
  225. package/node_modules/es-errors/.github/FUNDING.yml +12 -0
  226. package/node_modules/es-errors/CHANGELOG.md +40 -0
  227. package/node_modules/es-errors/LICENSE +21 -0
  228. package/node_modules/es-errors/README.md +55 -0
  229. package/node_modules/es-errors/eval.d.ts +3 -0
  230. package/node_modules/es-errors/eval.js +4 -0
  231. package/node_modules/es-errors/index.d.ts +3 -0
  232. package/node_modules/es-errors/index.js +4 -0
  233. package/node_modules/es-errors/package.json +80 -0
  234. package/node_modules/es-errors/range.d.ts +3 -0
  235. package/node_modules/es-errors/range.js +4 -0
  236. package/node_modules/es-errors/ref.d.ts +3 -0
  237. package/node_modules/es-errors/ref.js +4 -0
  238. package/node_modules/es-errors/syntax.d.ts +3 -0
  239. package/node_modules/es-errors/syntax.js +4 -0
  240. package/node_modules/es-errors/test/index.js +19 -0
  241. package/node_modules/es-errors/tsconfig.json +49 -0
  242. package/node_modules/es-errors/type.d.ts +3 -0
  243. package/node_modules/es-errors/type.js +4 -0
  244. package/node_modules/es-errors/uri.d.ts +3 -0
  245. package/node_modules/es-errors/uri.js +4 -0
  246. package/node_modules/es-object-atoms/.eslintrc +16 -0
  247. package/node_modules/es-object-atoms/.github/FUNDING.yml +12 -0
  248. package/node_modules/es-object-atoms/CHANGELOG.md +44 -0
  249. package/node_modules/es-object-atoms/LICENSE +21 -0
  250. package/node_modules/es-object-atoms/README.md +63 -0
  251. package/node_modules/es-object-atoms/RequireObjectCoercible.d.ts +3 -0
  252. package/node_modules/es-object-atoms/RequireObjectCoercible.js +11 -0
  253. package/node_modules/es-object-atoms/ToObject.d.ts +7 -0
  254. package/node_modules/es-object-atoms/ToObject.js +10 -0
  255. package/node_modules/es-object-atoms/index.d.ts +3 -0
  256. package/node_modules/es-object-atoms/index.js +4 -0
  257. package/node_modules/es-object-atoms/isObject.d.ts +3 -0
  258. package/node_modules/es-object-atoms/isObject.js +6 -0
  259. package/node_modules/es-object-atoms/package.json +79 -0
  260. package/node_modules/es-object-atoms/test/index.js +38 -0
  261. package/node_modules/es-object-atoms/tsconfig.json +7 -0
  262. package/node_modules/es-set-tostringtag/.eslintrc +13 -0
  263. package/node_modules/es-set-tostringtag/.nycrc +9 -0
  264. package/node_modules/es-set-tostringtag/CHANGELOG.md +67 -0
  265. package/node_modules/es-set-tostringtag/LICENSE +21 -0
  266. package/node_modules/es-set-tostringtag/README.md +53 -0
  267. package/node_modules/es-set-tostringtag/index.d.ts +10 -0
  268. package/node_modules/es-set-tostringtag/index.js +35 -0
  269. package/node_modules/es-set-tostringtag/package.json +78 -0
  270. package/node_modules/es-set-tostringtag/test/index.js +85 -0
  271. package/node_modules/es-set-tostringtag/tsconfig.json +9 -0
  272. package/node_modules/eventemitter3/LICENSE +21 -0
  273. package/node_modules/eventemitter3/README.md +85 -0
  274. package/node_modules/eventemitter3/dist/eventemitter3.esm.js +355 -0
  275. package/node_modules/eventemitter3/dist/eventemitter3.esm.min.js +1 -0
  276. package/node_modules/eventemitter3/dist/eventemitter3.esm.min.js.map +1 -0
  277. package/node_modules/eventemitter3/dist/eventemitter3.umd.js +363 -0
  278. package/node_modules/eventemitter3/dist/eventemitter3.umd.min.js +1 -0
  279. package/node_modules/eventemitter3/dist/eventemitter3.umd.min.js.map +1 -0
  280. package/node_modules/eventemitter3/index.d.ts +135 -0
  281. package/node_modules/eventemitter3/index.js +336 -0
  282. package/node_modules/eventemitter3/index.mjs +4 -0
  283. package/node_modules/eventemitter3/package.json +62 -0
  284. package/node_modules/follow-redirects/LICENSE +18 -0
  285. package/node_modules/follow-redirects/README.md +183 -0
  286. package/node_modules/follow-redirects/debug.js +15 -0
  287. package/node_modules/follow-redirects/http.js +1 -0
  288. package/node_modules/follow-redirects/https.js +1 -0
  289. package/node_modules/follow-redirects/index.js +714 -0
  290. package/node_modules/follow-redirects/package.json +58 -0
  291. package/node_modules/form-data/CHANGELOG.md +686 -0
  292. package/node_modules/form-data/License +19 -0
  293. package/node_modules/form-data/README.md +355 -0
  294. package/node_modules/form-data/index.d.ts +62 -0
  295. package/node_modules/form-data/lib/browser.js +4 -0
  296. package/node_modules/form-data/lib/form_data.js +506 -0
  297. package/node_modules/form-data/lib/populate.js +10 -0
  298. package/node_modules/form-data/package.json +82 -0
  299. package/node_modules/function-bind/.eslintrc +21 -0
  300. package/node_modules/function-bind/.github/FUNDING.yml +12 -0
  301. package/node_modules/function-bind/.github/SECURITY.md +3 -0
  302. package/node_modules/function-bind/.nycrc +13 -0
  303. package/node_modules/function-bind/CHANGELOG.md +136 -0
  304. package/node_modules/function-bind/LICENSE +20 -0
  305. package/node_modules/function-bind/README.md +46 -0
  306. package/node_modules/function-bind/implementation.js +84 -0
  307. package/node_modules/function-bind/index.js +5 -0
  308. package/node_modules/function-bind/package.json +87 -0
  309. package/node_modules/function-bind/test/.eslintrc +9 -0
  310. package/node_modules/function-bind/test/index.js +252 -0
  311. package/node_modules/get-intrinsic/.eslintrc +42 -0
  312. package/node_modules/get-intrinsic/.github/FUNDING.yml +12 -0
  313. package/node_modules/get-intrinsic/.nycrc +9 -0
  314. package/node_modules/get-intrinsic/CHANGELOG.md +186 -0
  315. package/node_modules/get-intrinsic/LICENSE +21 -0
  316. package/node_modules/get-intrinsic/README.md +71 -0
  317. package/node_modules/get-intrinsic/index.js +378 -0
  318. package/node_modules/get-intrinsic/package.json +97 -0
  319. package/node_modules/get-intrinsic/test/GetIntrinsic.js +274 -0
  320. package/node_modules/get-proto/.eslintrc +10 -0
  321. package/node_modules/get-proto/.github/FUNDING.yml +12 -0
  322. package/node_modules/get-proto/.nycrc +9 -0
  323. package/node_modules/get-proto/CHANGELOG.md +21 -0
  324. package/node_modules/get-proto/LICENSE +21 -0
  325. package/node_modules/get-proto/Object.getPrototypeOf.d.ts +5 -0
  326. package/node_modules/get-proto/Object.getPrototypeOf.js +6 -0
  327. package/node_modules/get-proto/README.md +50 -0
  328. package/node_modules/get-proto/Reflect.getPrototypeOf.d.ts +3 -0
  329. package/node_modules/get-proto/Reflect.getPrototypeOf.js +4 -0
  330. package/node_modules/get-proto/index.d.ts +5 -0
  331. package/node_modules/get-proto/index.js +27 -0
  332. package/node_modules/get-proto/package.json +81 -0
  333. package/node_modules/get-proto/test/index.js +68 -0
  334. package/node_modules/get-proto/tsconfig.json +9 -0
  335. package/node_modules/gopd/.eslintrc +16 -0
  336. package/node_modules/gopd/.github/FUNDING.yml +12 -0
  337. package/node_modules/gopd/CHANGELOG.md +45 -0
  338. package/node_modules/gopd/LICENSE +21 -0
  339. package/node_modules/gopd/README.md +40 -0
  340. package/node_modules/gopd/gOPD.d.ts +1 -0
  341. package/node_modules/gopd/gOPD.js +4 -0
  342. package/node_modules/gopd/index.d.ts +5 -0
  343. package/node_modules/gopd/index.js +15 -0
  344. package/node_modules/gopd/package.json +77 -0
  345. package/node_modules/gopd/test/index.js +36 -0
  346. package/node_modules/gopd/tsconfig.json +9 -0
  347. package/node_modules/has-symbols/.eslintrc +11 -0
  348. package/node_modules/has-symbols/.github/FUNDING.yml +12 -0
  349. package/node_modules/has-symbols/.nycrc +9 -0
  350. package/node_modules/has-symbols/CHANGELOG.md +91 -0
  351. package/node_modules/has-symbols/LICENSE +21 -0
  352. package/node_modules/has-symbols/README.md +46 -0
  353. package/node_modules/has-symbols/index.d.ts +3 -0
  354. package/node_modules/has-symbols/index.js +14 -0
  355. package/node_modules/has-symbols/package.json +111 -0
  356. package/node_modules/has-symbols/shams.d.ts +3 -0
  357. package/node_modules/has-symbols/shams.js +45 -0
  358. package/node_modules/has-symbols/test/index.js +22 -0
  359. package/node_modules/has-symbols/test/shams/core-js.js +29 -0
  360. package/node_modules/has-symbols/test/shams/get-own-property-symbols.js +29 -0
  361. package/node_modules/has-symbols/test/tests.js +58 -0
  362. package/node_modules/has-symbols/tsconfig.json +10 -0
  363. package/node_modules/has-tostringtag/.eslintrc +5 -0
  364. package/node_modules/has-tostringtag/.github/FUNDING.yml +12 -0
  365. package/node_modules/has-tostringtag/.nycrc +13 -0
  366. package/node_modules/has-tostringtag/CHANGELOG.md +42 -0
  367. package/node_modules/has-tostringtag/LICENSE +21 -0
  368. package/node_modules/has-tostringtag/README.md +46 -0
  369. package/node_modules/has-tostringtag/index.d.ts +3 -0
  370. package/node_modules/has-tostringtag/index.js +8 -0
  371. package/node_modules/has-tostringtag/package.json +108 -0
  372. package/node_modules/has-tostringtag/shams.d.ts +3 -0
  373. package/node_modules/has-tostringtag/shams.js +8 -0
  374. package/node_modules/has-tostringtag/test/index.js +21 -0
  375. package/node_modules/has-tostringtag/test/shams/core-js.js +31 -0
  376. package/node_modules/has-tostringtag/test/shams/get-own-property-symbols.js +30 -0
  377. package/node_modules/has-tostringtag/test/tests.js +15 -0
  378. package/node_modules/has-tostringtag/tsconfig.json +49 -0
  379. package/node_modules/hasown/.github/FUNDING.yml +12 -0
  380. package/node_modules/hasown/.nycrc +13 -0
  381. package/node_modules/hasown/CHANGELOG.md +58 -0
  382. package/node_modules/hasown/LICENSE +21 -0
  383. package/node_modules/hasown/README.md +40 -0
  384. package/node_modules/hasown/eslint.config.mjs +6 -0
  385. package/node_modules/hasown/index.d.ts +3 -0
  386. package/node_modules/hasown/index.js +8 -0
  387. package/node_modules/hasown/package.json +91 -0
  388. package/node_modules/hasown/tsconfig.json +6 -0
  389. package/node_modules/math-intrinsics/.eslintrc +16 -0
  390. package/node_modules/math-intrinsics/.github/FUNDING.yml +12 -0
  391. package/node_modules/math-intrinsics/CHANGELOG.md +24 -0
  392. package/node_modules/math-intrinsics/LICENSE +21 -0
  393. package/node_modules/math-intrinsics/README.md +50 -0
  394. package/node_modules/math-intrinsics/abs.d.ts +1 -0
  395. package/node_modules/math-intrinsics/abs.js +4 -0
  396. package/node_modules/math-intrinsics/constants/maxArrayLength.d.ts +3 -0
  397. package/node_modules/math-intrinsics/constants/maxArrayLength.js +4 -0
  398. package/node_modules/math-intrinsics/constants/maxSafeInteger.d.ts +3 -0
  399. package/node_modules/math-intrinsics/constants/maxSafeInteger.js +5 -0
  400. package/node_modules/math-intrinsics/constants/maxValue.d.ts +3 -0
  401. package/node_modules/math-intrinsics/constants/maxValue.js +5 -0
  402. package/node_modules/math-intrinsics/floor.d.ts +1 -0
  403. package/node_modules/math-intrinsics/floor.js +4 -0
  404. package/node_modules/math-intrinsics/isFinite.d.ts +3 -0
  405. package/node_modules/math-intrinsics/isFinite.js +12 -0
  406. package/node_modules/math-intrinsics/isInteger.d.ts +3 -0
  407. package/node_modules/math-intrinsics/isInteger.js +16 -0
  408. package/node_modules/math-intrinsics/isNaN.d.ts +1 -0
  409. package/node_modules/math-intrinsics/isNaN.js +6 -0
  410. package/node_modules/math-intrinsics/isNegativeZero.d.ts +3 -0
  411. package/node_modules/math-intrinsics/isNegativeZero.js +6 -0
  412. package/node_modules/math-intrinsics/max.d.ts +1 -0
  413. package/node_modules/math-intrinsics/max.js +4 -0
  414. package/node_modules/math-intrinsics/min.d.ts +1 -0
  415. package/node_modules/math-intrinsics/min.js +4 -0
  416. package/node_modules/math-intrinsics/mod.d.ts +3 -0
  417. package/node_modules/math-intrinsics/mod.js +9 -0
  418. package/node_modules/math-intrinsics/package.json +86 -0
  419. package/node_modules/math-intrinsics/pow.d.ts +1 -0
  420. package/node_modules/math-intrinsics/pow.js +4 -0
  421. package/node_modules/math-intrinsics/round.d.ts +1 -0
  422. package/node_modules/math-intrinsics/round.js +4 -0
  423. package/node_modules/math-intrinsics/sign.d.ts +3 -0
  424. package/node_modules/math-intrinsics/sign.js +11 -0
  425. package/node_modules/math-intrinsics/test/index.js +192 -0
  426. package/node_modules/math-intrinsics/tsconfig.json +3 -0
  427. package/node_modules/mime-db/HISTORY.md +507 -0
  428. package/node_modules/mime-db/LICENSE +23 -0
  429. package/node_modules/mime-db/README.md +100 -0
  430. package/node_modules/mime-db/db.json +8519 -0
  431. package/node_modules/mime-db/index.js +12 -0
  432. package/node_modules/mime-db/package.json +60 -0
  433. package/node_modules/mime-types/HISTORY.md +397 -0
  434. package/node_modules/mime-types/LICENSE +23 -0
  435. package/node_modules/mime-types/README.md +113 -0
  436. package/node_modules/mime-types/index.js +188 -0
  437. package/node_modules/mime-types/package.json +44 -0
  438. package/node_modules/proxy-from-env/LICENSE +20 -0
  439. package/node_modules/proxy-from-env/README.md +163 -0
  440. package/node_modules/proxy-from-env/index.cjs +105 -0
  441. package/node_modules/proxy-from-env/index.js +103 -0
  442. package/node_modules/proxy-from-env/package.json +43 -0
  443. package/package.json +2 -1
  444. package/dist/web/assets/Assistant-CpCuE2gu.css +0 -1
  445. package/dist/web/assets/Assistant-D5WOntPC.js +0 -1
  446. package/dist/web/assets/index-DC8a4uzu.js +0 -66
@@ -0,0 +1,69 @@
1
+ 'use strict';
2
+
3
+ import utils from '../utils.js';
4
+ import AxiosURLSearchParams from './AxiosURLSearchParams.js';
5
+
6
+ /**
7
+ * It replaces URL-encoded forms of `:`, `$`, `,`, and spaces with
8
+ * their plain counterparts (`:`, `$`, `,`, `+`).
9
+ *
10
+ * @param {string} val The value to be encoded.
11
+ *
12
+ * @returns {string} The encoded value.
13
+ */
14
+ export function encode(val) {
15
+ return encodeURIComponent(val)
16
+ .replace(/%3A/gi, ':')
17
+ .replace(/%24/g, '$')
18
+ .replace(/%2C/gi, ',')
19
+ .replace(/%20/g, '+');
20
+ }
21
+
22
+ /**
23
+ * Build a URL by appending params to the end
24
+ *
25
+ * @param {string} url The base of the url (e.g., http://www.google.com)
26
+ * @param {object} [params] The params to be appended
27
+ * @param {?(object|Function)} options
28
+ *
29
+ * @returns {string} The formatted url
30
+ */
31
+ export default function buildURL(url, params, options) {
32
+ if (!params) {
33
+ return url;
34
+ }
35
+ url = url || '';
36
+
37
+ const _options = utils.isFunction(options)
38
+ ? {
39
+ serialize: options,
40
+ }
41
+ : options;
42
+
43
+ // Read serializer options pollution-safely: own properties and methods on a
44
+ // class/template prototype are honored, but values injected onto a polluted
45
+ // Object.prototype are ignored.
46
+ const _encode = utils.getSafeProp(_options, 'encode') || encode;
47
+ const serializeFn = utils.getSafeProp(_options, 'serialize');
48
+
49
+ let serializedParams;
50
+
51
+ if (serializeFn) {
52
+ serializedParams = serializeFn(params, _options);
53
+ } else {
54
+ serializedParams = utils.isURLSearchParams(params)
55
+ ? params.toString()
56
+ : new AxiosURLSearchParams(params, _options).toString(_encode);
57
+ }
58
+
59
+ if (serializedParams) {
60
+ const hashmarkIndex = url.indexOf('#');
61
+
62
+ if (hashmarkIndex !== -1) {
63
+ url = url.slice(0, hashmarkIndex);
64
+ }
65
+ url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;
66
+ }
67
+
68
+ return url;
69
+ }
@@ -0,0 +1,18 @@
1
+ import utils from '../utils.js';
2
+
3
+ const callbackify = (fn, reducer) => {
4
+ return utils.isAsyncFn(fn)
5
+ ? function (...args) {
6
+ const cb = args.pop();
7
+ fn.apply(this, args).then((value) => {
8
+ try {
9
+ reducer ? cb(null, ...reducer(value)) : cb(null, value);
10
+ } catch (err) {
11
+ cb(err);
12
+ }
13
+ }, cb);
14
+ }
15
+ : fn;
16
+ };
17
+
18
+ export default callbackify;
@@ -0,0 +1,23 @@
1
+ 'use strict';
2
+
3
+ /**
4
+ * Creates a new URL by combining the specified URLs
5
+ *
6
+ * @param {string} baseURL The base URL
7
+ * @param {string} relativeURL The relative URL
8
+ *
9
+ * @returns {string} The combined URL
10
+ */
11
+ export default function combineURLs(baseURL, relativeURL) {
12
+ if (!relativeURL) {
13
+ return baseURL;
14
+ }
15
+
16
+ let end = baseURL.length;
17
+
18
+ while (end > 0 && baseURL.charCodeAt(end - 1) === 47) {
19
+ end--;
20
+ }
21
+
22
+ return baseURL.slice(0, end) + '/' + relativeURL.replace(/^\/+/, '');
23
+ }
@@ -0,0 +1,71 @@
1
+ import CanceledError from '../cancel/CanceledError.js';
2
+ import AxiosError from '../core/AxiosError.js';
3
+ import utils from '../utils.js';
4
+
5
+ const composeSignals = (signals, timeout) => {
6
+ signals = signals ? signals.filter(Boolean) : [];
7
+
8
+ if (!timeout && !signals.length) {
9
+ return;
10
+ }
11
+
12
+ const controller = new AbortController();
13
+
14
+ let aborted = false;
15
+
16
+ const onabort = function (reason) {
17
+ if (!aborted) {
18
+ aborted = true;
19
+ unsubscribe();
20
+ const err = reason instanceof Error ? reason : this.reason;
21
+ controller.abort(
22
+ err instanceof AxiosError
23
+ ? err
24
+ : new CanceledError(err instanceof Error ? err.message : err)
25
+ );
26
+ }
27
+ };
28
+
29
+ let timer =
30
+ timeout &&
31
+ setTimeout(() => {
32
+ timer = null;
33
+ onabort(new AxiosError(`timeout of ${timeout}ms exceeded`, AxiosError.ETIMEDOUT));
34
+ }, timeout);
35
+
36
+ const unsubscribe = () => {
37
+ if (!signals) {
38
+ return;
39
+ }
40
+ timer && clearTimeout(timer);
41
+ timer = null;
42
+ signals.forEach((signal) => {
43
+ const unsubscribeSignal = utils.getSafeProp(signal, 'unsubscribe');
44
+ utils.isFunction(unsubscribeSignal)
45
+ ? unsubscribeSignal.call(signal, onabort)
46
+ : signal.removeEventListener('abort', onabort);
47
+ });
48
+ signals = null;
49
+ };
50
+
51
+ signals.forEach((signal) => {
52
+ if (aborted) {
53
+ return;
54
+ }
55
+
56
+ if (signal.aborted) {
57
+ onabort.call(signal);
58
+ return;
59
+ }
60
+
61
+ signal.addEventListener('abort', onabort, { once: true });
62
+ });
63
+
64
+ const { signal } = controller;
65
+
66
+ signal.unsubscribe = () => utils.asap(unsubscribe);
67
+
68
+ return signal;
69
+ };
70
+
71
+ export default composeSignals;
@@ -0,0 +1,88 @@
1
+ import utils from '../utils.js';
2
+ import platform from '../platform/index.js';
3
+
4
+ const decodeCookieValue = (value) => {
5
+ try {
6
+ return decodeURIComponent(value);
7
+ } catch (e) {
8
+ return value;
9
+ }
10
+ };
11
+
12
+ export default platform.hasStandardBrowserEnv
13
+ ? // Standard browser envs support document.cookie
14
+ {
15
+ write(name, value, expires, path, domain, secure, sameSite) {
16
+ if (typeof document === 'undefined') return;
17
+
18
+ const cookie = [`${name}=${encodeURIComponent(value)}`];
19
+
20
+ if (utils.isNumber(expires)) {
21
+ cookie.push(`expires=${new Date(expires).toUTCString()}`);
22
+ }
23
+ if (utils.isString(path)) {
24
+ cookie.push(`path=${path}`);
25
+ }
26
+ if (utils.isString(domain)) {
27
+ cookie.push(`domain=${domain}`);
28
+ }
29
+ if (secure === true) {
30
+ cookie.push('secure');
31
+ }
32
+ if (utils.isString(sameSite)) {
33
+ cookie.push(`SameSite=${sameSite}`);
34
+ }
35
+
36
+ document.cookie = cookie.join('; ');
37
+ },
38
+
39
+ read(name) {
40
+ if (typeof document === 'undefined') return null;
41
+ const cookieString = document.cookie;
42
+ if (!cookieString) return null;
43
+ // Match name=value by splitting on the semicolon separator instead of building a
44
+ // RegExp from `name` — interpolating an unescaped string into a RegExp would let
45
+ // metacharacters (e.g. `.+?` in an attacker-influenced cookie name) cause ReDoS or
46
+ // match the wrong cookie. Browsers may serialize cookie pairs as either ";" or
47
+ // "; ", so ignore optional whitespace before each cookie name.
48
+ const cookies = cookieString.split(';');
49
+ for (let i = 0; i < cookies.length; i++) {
50
+ const cookie = cookies[i].replace(/^\s+/, '');
51
+ const eq = cookie.indexOf('=');
52
+ if (eq !== -1 && cookie.slice(0, eq) === name) {
53
+ return decodeCookieValue(cookie.slice(eq + 1));
54
+ }
55
+ }
56
+ return null;
57
+ },
58
+
59
+ async readAsync(name) {
60
+ try {
61
+ const store = typeof window !== 'undefined' && window.cookieStore;
62
+ if (store && utils.isFunction(store.get)) {
63
+ const cookie = await store.get(name);
64
+ // Both APIs expose stored bytes; preserve Axios's existing URI decoding.
65
+ return cookie ? decodeCookieValue(cookie.value) : null;
66
+ }
67
+ } catch (e) {
68
+ // Restricted or unavailable storage retains the synchronous fallback.
69
+ }
70
+
71
+ return this.read(name);
72
+ },
73
+
74
+ remove(name) {
75
+ this.write(name, '', Date.now() - 86400000, '/');
76
+ },
77
+ }
78
+ : // Non-standard browser env (web workers, react-native) lack needed support.
79
+ {
80
+ write() {},
81
+ read() {
82
+ return null;
83
+ },
84
+ async readAsync() {
85
+ return null;
86
+ },
87
+ remove() {},
88
+ };
@@ -0,0 +1,31 @@
1
+ 'use strict';
2
+
3
+ /*eslint no-console:0*/
4
+
5
+ /**
6
+ * Supply a warning to the developer that a method they are using
7
+ * has been deprecated.
8
+ *
9
+ * @param {string} method The name of the deprecated method
10
+ * @param {string} [instead] The alternate method to use if applicable
11
+ * @param {string} [docs] The documentation URL to get further details
12
+ *
13
+ * @returns {void}
14
+ */
15
+ export default function deprecatedMethod(method, instead, docs) {
16
+ try {
17
+ console.warn(
18
+ 'DEPRECATED method `' +
19
+ method +
20
+ '`.' +
21
+ (instead ? ' Use `' + instead + '` instead.' : '') +
22
+ ' This method will be removed in a future release.'
23
+ );
24
+
25
+ if (docs) {
26
+ console.warn('For more information about usage see ' + docs);
27
+ }
28
+ } catch (e) {
29
+ /* Ignore */
30
+ }
31
+ }
@@ -0,0 +1,193 @@
1
+ /**
2
+ * Estimate data: URL byte lengths *without* allocating large buffers.
3
+ * - Fetch percent-decodes a base64 body before decoding it.
4
+ * - Node's Buffer.from(body, 'base64') sizes its backing allocation from the
5
+ * percent-decoded body, including ignored characters and content after padding.
6
+ * - Non-base64 data is percent-decoded and then encoded as UTF-8.
7
+ */
8
+ const isHexDigit = (charCode) =>
9
+ (charCode >= 48 && charCode <= 57) ||
10
+ (charCode >= 65 && charCode <= 70) ||
11
+ (charCode >= 97 && charCode <= 102);
12
+
13
+ const isPercentEncodedByte = (str, i, len) =>
14
+ i + 2 < len && isHexDigit(str.charCodeAt(i + 1)) && isHexDigit(str.charCodeAt(i + 2));
15
+
16
+ const hexValue = (charCode) => (charCode <= 57 ? charCode - 48 : (charCode & 0xdf) - 55);
17
+
18
+ const isBase64Char = (charCode) =>
19
+ (charCode >= 65 && charCode <= 90) || // A-Z
20
+ (charCode >= 97 && charCode <= 122) || // a-z
21
+ (charCode >= 48 && charCode <= 57) || // 0-9
22
+ charCode === 43 || // +
23
+ charCode === 47 || // /
24
+ charCode === 45 || // - (base64url)
25
+ charCode === 95; // _ (base64url)
26
+
27
+ const isBase64Whitespace = (charCode) =>
28
+ charCode === 9 || charCode === 10 || charCode === 12 || charCode === 13 || charCode === 32;
29
+
30
+ const base64Bytes = (significant) => {
31
+ const groups = Math.floor(significant / 4);
32
+ const remainder = significant % 4;
33
+ return groups * 3 + (remainder === 2 ? 1 : remainder === 3 ? 2 : 0);
34
+ };
35
+
36
+ // Buffer.byteLength(body, 'base64') uses the raw string length as an allocation
37
+ // upper bound even when Buffer.from later ignores characters or stops at '='.
38
+ const estimateBase64BufferAllocation = (body) => {
39
+ const len = body.length;
40
+ let padding = 0;
41
+
42
+ if (len > 0 && body.charCodeAt(len - 1) === 61 /* '=' */) {
43
+ padding++;
44
+
45
+ if (len > 1 && body.charCodeAt(len - 2) === 61 /* '=' */) {
46
+ padding++;
47
+ }
48
+ }
49
+
50
+ return Math.floor(((len - padding) * 3) / 4);
51
+ };
52
+
53
+ const estimatePercentDecodedBase64BufferAllocation = (body) => {
54
+ // Ordinary Base64 needs only its length and trailing padding.
55
+ if (body.indexOf('%') === -1) {
56
+ return estimateBase64BufferAllocation(body);
57
+ }
58
+
59
+ let length = 0;
60
+ let previous = 0;
61
+ let last = 0;
62
+
63
+ for (let i = 0, len = body.length; i < len; i++) {
64
+ let code = body.charCodeAt(i);
65
+ if (code === 37 /* '%' */ && isPercentEncodedByte(body, i, len)) {
66
+ code = hexValue(body.charCodeAt(i + 1)) * 16 + hexValue(body.charCodeAt(i + 2));
67
+ i += 2;
68
+ }
69
+ length++;
70
+ previous = last;
71
+ last = code;
72
+ }
73
+
74
+ const padding = last === 61 ? (previous === 61 ? 2 : 1) : 0;
75
+ return Math.floor(((length - padding) * 3) / 4);
76
+ };
77
+
78
+ const estimatePercentDecodedBase64Bytes = (body) => {
79
+ const len = body.length;
80
+ let significant = 0;
81
+ let padding = 0;
82
+ let invalid = false;
83
+
84
+ for (let i = 0; i < len; i++) {
85
+ let code = body.charCodeAt(i);
86
+
87
+ if (code === 37 /* '%' */ && isPercentEncodedByte(body, i, len)) {
88
+ code = hexValue(body.charCodeAt(i + 1)) * 16 + hexValue(body.charCodeAt(i + 2));
89
+ i += 2;
90
+ }
91
+
92
+ if (isBase64Whitespace(code)) {
93
+ continue;
94
+ }
95
+
96
+ if (code === 61 /* '=' */) {
97
+ padding++;
98
+ continue;
99
+ }
100
+
101
+ if (!isBase64Char(code) || padding > 0) {
102
+ invalid = true;
103
+ continue;
104
+ }
105
+
106
+ significant++;
107
+ }
108
+
109
+ // Fetch rejects malformed forgiving-base64 input. Returning the raw-size
110
+ // allocation bound keeps that invalid input from becoming a pre-check bypass.
111
+ if (
112
+ invalid ||
113
+ padding > 2 ||
114
+ (padding > 0 && (significant + padding) % 4 !== 0) ||
115
+ significant % 4 === 1
116
+ ) {
117
+ return estimateBase64BufferAllocation(body);
118
+ }
119
+
120
+ return base64Bytes(significant);
121
+ };
122
+
123
+ const estimateDataURLBytes = (url, estimateBase64, base64Pattern) => {
124
+ if (!url || typeof url !== 'string') return 0;
125
+ if (!/^data:/i.test(url)) return 0;
126
+
127
+ const comma = url.indexOf(',');
128
+ if (comma < 0) return 0;
129
+
130
+ const meta = url.slice(5, comma);
131
+ const body = url.slice(comma + 1);
132
+ const isBase64 = base64Pattern.test(meta);
133
+
134
+ if (isBase64) {
135
+ return estimateBase64(body);
136
+ }
137
+
138
+ // Compute UTF-8 byte length directly from UTF-16 code units without allocating
139
+ // a byte buffer (TextEncoder.encode would defeat the DoS guard on large bodies).
140
+ // Valid %XX triplets count as one decoded byte; this matches the bytes that
141
+ // decodeURIComponent(body) would produce before Buffer re-encodes the string.
142
+ let bytes = 0;
143
+ for (let i = 0, len = body.length; i < len; i++) {
144
+ const c = body.charCodeAt(i);
145
+ if (c === 37 /* '%' */ && isPercentEncodedByte(body, i, len)) {
146
+ bytes += 1;
147
+ i += 2;
148
+ } else if (c < 0x80) {
149
+ bytes += 1;
150
+ } else if (c < 0x800) {
151
+ bytes += 2;
152
+ } else if (c >= 0xd800 && c <= 0xdbff && i + 1 < len) {
153
+ const next = body.charCodeAt(i + 1);
154
+ if (next >= 0xdc00 && next <= 0xdfff) {
155
+ bytes += 4;
156
+ i++;
157
+ } else {
158
+ bytes += 3;
159
+ }
160
+ } else {
161
+ bytes += 3;
162
+ }
163
+ }
164
+ return bytes;
165
+ };
166
+
167
+ /**
168
+ * Estimate the percent-decoded payload size used by Fetch data: URLs.
169
+ *
170
+ * @param {string} url
171
+ * @returns {number}
172
+ */
173
+ export default function estimateDataURLDecodedBytes(url) {
174
+ // Fetch removes URL fragments before processing a data: URL.
175
+ const fragmentIndex = typeof url === 'string' ? url.indexOf('#') : -1;
176
+
177
+ return estimateDataURLBytes(
178
+ fragmentIndex === -1 ? url : url.slice(0, fragmentIndex),
179
+ estimatePercentDecodedBase64Bytes,
180
+ /; *base64[\t\n\f\r ]*$/i
181
+ );
182
+ }
183
+
184
+ /**
185
+ * Estimate the Buffer backing allocation used after Node's percent-decoding step.
186
+ *
187
+ * @param {string} url
188
+ * @returns {number}
189
+ */
190
+ export function estimateDataURLBufferAllocation(url) {
191
+ // Match fromDataURI's case-insensitive protocol and encoding suffix.
192
+ return estimateDataURLBytes(url, estimatePercentDecodedBase64BufferAllocation, /;base64$/i);
193
+ }
@@ -0,0 +1,113 @@
1
+ import utils from '../utils.js';
2
+
3
+ const CRLF = '\r\n';
4
+ const normalizeLines = (value) => String(value).replace(/\r\n|\r|\n/g, CRLF);
5
+ const escapeName = (value) =>
6
+ String(value).replace(/[\r\n"]/g, (char) =>
7
+ char === '\r' ? '%0D' : char === '\n' ? '%0A' : '%22'
8
+ );
9
+
10
+ // Count UTF-8 bytes without allocating an encoded copy of a field. FormData
11
+ // string values normalize line endings; Blob/File contents remain unchanged.
12
+ const stringBytes = (value, normalize) => {
13
+ let length = 0;
14
+ for (let i = 0; i < value.length; i++) {
15
+ const code = value.charCodeAt(i);
16
+ if (normalize && (code === 13 || code === 10)) {
17
+ if (code === 13 && value.charCodeAt(i + 1) === 10) i++;
18
+ length += 2;
19
+ } else if (code < 0x80) {
20
+ length++;
21
+ } else if (code < 0x800) {
22
+ length += 2;
23
+ } else if (
24
+ code >= 0xd800 &&
25
+ code <= 0xdbff &&
26
+ value.charCodeAt(i + 1) >= 0xdc00 &&
27
+ value.charCodeAt(i + 1) <= 0xdfff
28
+ ) {
29
+ length += 4;
30
+ i++;
31
+ } else {
32
+ length += 3;
33
+ }
34
+ }
35
+ return length;
36
+ };
37
+
38
+ // Describe serialization failures independently of any request library.
39
+ export class FormDataError extends TypeError {
40
+ constructor(message, reason) {
41
+ super(message);
42
+ this.name = 'FormDataError';
43
+ this.reason = reason;
44
+ }
45
+ }
46
+
47
+ // The caller supplies the boundary, Blob implementation, and limit error.
48
+ export default function formDataToBlob(form, Blob, limit, limitError, boundary) {
49
+ if (!utils.isFunction(Blob)) {
50
+ throw new FormDataError('Blob is not supported', 'blob');
51
+ }
52
+
53
+ if (
54
+ !utils.isString(boundary) ||
55
+ !/^[A-Za-z0-9'()+_,./:=? -]{1,70}$/.test(boundary) ||
56
+ / $/.test(boundary)
57
+ ) {
58
+ throw new FormDataError('Invalid multipart boundary', 'boundary');
59
+ }
60
+ const footer = '--' + boundary + '--' + CRLF;
61
+ let length = footer.length;
62
+ const parts = [];
63
+ const checkLength = (extra) => {
64
+ if (length + extra > limit) throw limitError();
65
+ };
66
+ checkLength(0);
67
+
68
+ for (const [name, value] of form) {
69
+ const isString = utils.isString(value);
70
+ const valueLength = isString ? stringBytes(value, true) : value.size;
71
+ if (!Number.isFinite(valueLength) || valueLength < 0) {
72
+ throw new FormDataError('Unsupported FormData part size', 'part');
73
+ }
74
+ // Reject large values and names before building normalized header strings.
75
+ checkLength(
76
+ valueLength +
77
+ stringBytes(name, true) +
78
+ (!isString && value.name ? stringBytes(value.name, false) : 0) +
79
+ (!isString && value.type ? stringBytes(value.type, false) : 0)
80
+ );
81
+
82
+ let header =
83
+ '--' +
84
+ boundary +
85
+ CRLF +
86
+ 'Content-Disposition: form-data; name="' +
87
+ escapeName(normalizeLines(name)) +
88
+ '"';
89
+ if (!isString) {
90
+ header +=
91
+ '; filename="' +
92
+ escapeName(utils.isString(value.name) ? value.name : 'blob') +
93
+ '"' +
94
+ CRLF +
95
+ 'Content-Type: ' +
96
+ String(value.type || 'application/octet-stream').replace(/[\r\n]/g, '');
97
+ }
98
+ header += CRLF + CRLF;
99
+ const partLength = stringBytes(header, false) + valueLength + CRLF.length;
100
+ checkLength(partLength);
101
+ length += partLength;
102
+ parts.push({ header, value, isString });
103
+ }
104
+
105
+ // Native Blob composition retains existing Blob/File data. No file is read
106
+ // and no complete multipart ArrayBuffer is created to determine its length.
107
+ const blobParts = [];
108
+ for (const part of parts) {
109
+ blobParts.push(part.header, part.isString ? normalizeLines(part.value) : part.value, CRLF);
110
+ }
111
+ blobParts.push(footer);
112
+ return new Blob(blobParts, { type: 'multipart/form-data; boundary=' + boundary });
113
+ }