@scriptc/cli-darwin-x64 0.0.0 → 0.2.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.
Files changed (963) hide show
  1. package/dist/LICENSE +202 -0
  2. package/dist/THIRD_PARTY_NOTICES +4 -0
  3. package/dist/bin/scriptc +0 -0
  4. package/dist/bin/scriptc.json +21 -0
  5. package/dist/lib/declarations/scriptc-node-fallback.d.ts +3857 -0
  6. package/dist/lib/declarations/scriptc-overrides.d.ts +92 -0
  7. package/dist/lib/declarations/scriptc.d.ts +98 -0
  8. package/dist/lib/llvm/LICENSE +1 -0
  9. package/dist/lib/llvm/SCRIPTC_LICENSE +1 -0
  10. package/dist/lib/llvm/THIRD_PARTY_NOTICES +1 -0
  11. package/dist/lib/llvm/bin/scriptc-llvm-codegen +0 -0
  12. package/dist/lib/llvm/package.json +35 -0
  13. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_array.o +0 -0
  14. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_assert.o +0 -0
  15. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_async.o +0 -0
  16. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_async_dyn.o +0 -0
  17. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_bigint.o +0 -0
  18. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_bigint_assert.o +0 -0
  19. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_bytes.o +0 -0
  20. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_bytes_io.o +0 -0
  21. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_child.o +0 -0
  22. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_closure.o +0 -0
  23. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_console.o +0 -0
  24. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_console_native.o +0 -0
  25. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_copying.o +0 -0
  26. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_crypto_async.o +0 -0
  27. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_cycle.o +0 -0
  28. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_dc.o +0 -0
  29. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_dgram.o +0 -0
  30. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_dyn_handle.o +0 -0
  31. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_dyn_invoke.o +0 -0
  32. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_error.o +0 -0
  33. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_events.o +0 -0
  34. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_events_emitter.o +0 -0
  35. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_exception.o +0 -0
  36. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_fetch.o +0 -0
  37. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_ffi.o +0 -0
  38. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_ffi_queue.o +0 -0
  39. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_file_handle.o +0 -0
  40. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_grapheme.o +0 -0
  41. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_http.o +0 -0
  42. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_http2.o +0 -0
  43. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_inspect.o +0 -0
  44. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_json.o +0 -0
  45. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_lib.o +0 -0
  46. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_loop_epoll.o +0 -0
  47. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_loop_kqueue.o +0 -0
  48. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_loop_wsapoll.o +0 -0
  49. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_map.o +0 -0
  50. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_net.o +0 -0
  51. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_node_builtin.o +0 -0
  52. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_number.o +0 -0
  53. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_object.o +0 -0
  54. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_path.o +0 -0
  55. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_qs.o +0 -0
  56. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_readline.o +0 -0
  57. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_regex.o +0 -0
  58. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_stream.o +0 -0
  59. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_string.o +0 -0
  60. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_symbol.o +0 -0
  61. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_test.o +0 -0
  62. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_tls.o +0 -0
  63. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_tls_ca.o +0 -0
  64. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_union.o +0 -0
  65. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_url.o +0 -0
  66. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_url_params.o +0 -0
  67. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_util.o +0 -0
  68. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_watch.o +0 -0
  69. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_zlib.o +0 -0
  70. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_array.o +0 -0
  71. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_assert.o +0 -0
  72. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_async.o +0 -0
  73. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_async_dyn.o +0 -0
  74. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_bigint.o +0 -0
  75. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_bigint_assert.o +0 -0
  76. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_bytes.o +0 -0
  77. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_bytes_io.o +0 -0
  78. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_child.o +0 -0
  79. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_closure.o +0 -0
  80. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_console.o +0 -0
  81. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_console_native.o +0 -0
  82. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_copying.o +0 -0
  83. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_crypto_async.o +0 -0
  84. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_cycle.o +0 -0
  85. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_dc.o +0 -0
  86. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_dgram.o +0 -0
  87. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_dyn_handle.o +0 -0
  88. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_dyn_invoke.o +0 -0
  89. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_error.o +0 -0
  90. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_events.o +0 -0
  91. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_events_emitter.o +0 -0
  92. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_exception.o +0 -0
  93. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_fetch.o +0 -0
  94. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_ffi.o +0 -0
  95. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_ffi_queue.o +0 -0
  96. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_file_handle.o +0 -0
  97. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_grapheme.o +0 -0
  98. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_http.o +0 -0
  99. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_http2.o +0 -0
  100. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_inspect.o +0 -0
  101. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_inspect_island.o +0 -0
  102. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_island.o +0 -0
  103. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_json.o +0 -0
  104. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_lib.o +0 -0
  105. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_loop_epoll.o +0 -0
  106. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_loop_kqueue.o +0 -0
  107. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_loop_wsapoll.o +0 -0
  108. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_map.o +0 -0
  109. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_net.o +0 -0
  110. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_net_island.o +0 -0
  111. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_node_builtin.o +0 -0
  112. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_number.o +0 -0
  113. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_object.o +0 -0
  114. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_path.o +0 -0
  115. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_qs.o +0 -0
  116. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_readline.o +0 -0
  117. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_regex.o +0 -0
  118. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_stream.o +0 -0
  119. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_string.o +0 -0
  120. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_symbol.o +0 -0
  121. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_test.o +0 -0
  122. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_tls.o +0 -0
  123. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_tls_ca.o +0 -0
  124. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_union.o +0 -0
  125. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_url.o +0 -0
  126. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_url_params.o +0 -0
  127. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_util.o +0 -0
  128. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_watch.o +0 -0
  129. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_web.o +0 -0
  130. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_zlib.o +0 -0
  131. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_zlib_island.o +0 -0
  132. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic-text-decoder-legacy/scr_bytes.o +0 -0
  133. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/text-decoder-legacy/scr_bytes.o +0 -0
  134. package/dist/lib/runtime-darwin-x64/artifacts/library-dev/runtime/default/scr_array.o +0 -0
  135. package/dist/lib/runtime-darwin-x64/artifacts/library-dev/runtime/default/scr_assert.o +0 -0
  136. package/dist/lib/runtime-darwin-x64/artifacts/library-dev/runtime/default/scr_bigint.o +0 -0
  137. package/dist/lib/runtime-darwin-x64/artifacts/library-dev/runtime/default/scr_bigint_assert.o +0 -0
  138. package/dist/lib/runtime-darwin-x64/artifacts/library-dev/runtime/default/scr_bytes.o +0 -0
  139. package/dist/lib/runtime-darwin-x64/artifacts/library-dev/runtime/default/scr_bytes_io.o +0 -0
  140. package/dist/lib/runtime-darwin-x64/artifacts/library-dev/runtime/default/scr_closure.o +0 -0
  141. package/dist/lib/runtime-darwin-x64/artifacts/library-dev/runtime/default/scr_console.o +0 -0
  142. package/dist/lib/runtime-darwin-x64/artifacts/library-dev/runtime/default/scr_console_native.o +0 -0
  143. package/dist/lib/runtime-darwin-x64/artifacts/library-dev/runtime/default/scr_copying.o +0 -0
  144. package/dist/lib/runtime-darwin-x64/artifacts/library-dev/runtime/default/scr_cycle.o +0 -0
  145. package/dist/lib/runtime-darwin-x64/artifacts/library-dev/runtime/default/scr_dyn_handle.o +0 -0
  146. package/dist/lib/runtime-darwin-x64/artifacts/library-dev/runtime/default/scr_dyn_invoke.o +0 -0
  147. package/dist/lib/runtime-darwin-x64/artifacts/library-dev/runtime/default/scr_error.o +0 -0
  148. package/dist/lib/runtime-darwin-x64/artifacts/library-dev/runtime/default/scr_events_emitter.o +0 -0
  149. package/dist/lib/runtime-darwin-x64/artifacts/library-dev/runtime/default/scr_exception.o +0 -0
  150. package/dist/lib/runtime-darwin-x64/artifacts/library-dev/runtime/default/scr_grapheme.o +0 -0
  151. package/dist/lib/runtime-darwin-x64/artifacts/library-dev/runtime/default/scr_inspect.o +0 -0
  152. package/dist/lib/runtime-darwin-x64/artifacts/library-dev/runtime/default/scr_json.o +0 -0
  153. package/dist/lib/runtime-darwin-x64/artifacts/library-dev/runtime/default/scr_lib.o +0 -0
  154. package/dist/lib/runtime-darwin-x64/artifacts/library-dev/runtime/default/scr_library.o +0 -0
  155. package/dist/lib/runtime-darwin-x64/artifacts/library-dev/runtime/default/scr_map.o +0 -0
  156. package/dist/lib/runtime-darwin-x64/artifacts/library-dev/runtime/default/scr_node_builtin.o +0 -0
  157. package/dist/lib/runtime-darwin-x64/artifacts/library-dev/runtime/default/scr_number.o +0 -0
  158. package/dist/lib/runtime-darwin-x64/artifacts/library-dev/runtime/default/scr_object.o +0 -0
  159. package/dist/lib/runtime-darwin-x64/artifacts/library-dev/runtime/default/scr_path.o +0 -0
  160. package/dist/lib/runtime-darwin-x64/artifacts/library-dev/runtime/default/scr_regex.o +0 -0
  161. package/dist/lib/runtime-darwin-x64/artifacts/library-dev/runtime/default/scr_string.o +0 -0
  162. package/dist/lib/runtime-darwin-x64/artifacts/library-dev/runtime/default/scr_symbol.o +0 -0
  163. package/dist/lib/runtime-darwin-x64/artifacts/library-dev/runtime/default/scr_union.o +0 -0
  164. package/dist/lib/runtime-darwin-x64/artifacts/library-dev/runtime/default/scr_url.o +0 -0
  165. package/dist/lib/runtime-darwin-x64/artifacts/library-dev/runtime/default/scr_url_params.o +0 -0
  166. package/dist/lib/runtime-darwin-x64/artifacts/library-dev/runtime/default/scr_zlib.o +0 -0
  167. package/dist/lib/runtime-darwin-x64/artifacts/library-dev/runtime/text-decoder-legacy/scr_bytes.o +0 -0
  168. package/dist/lib/runtime-darwin-x64/artifacts/library-release/runtime/default/scr_array.o +0 -0
  169. package/dist/lib/runtime-darwin-x64/artifacts/library-release/runtime/default/scr_assert.o +0 -0
  170. package/dist/lib/runtime-darwin-x64/artifacts/library-release/runtime/default/scr_bigint.o +0 -0
  171. package/dist/lib/runtime-darwin-x64/artifacts/library-release/runtime/default/scr_bigint_assert.o +0 -0
  172. package/dist/lib/runtime-darwin-x64/artifacts/library-release/runtime/default/scr_bytes.o +0 -0
  173. package/dist/lib/runtime-darwin-x64/artifacts/library-release/runtime/default/scr_bytes_io.o +0 -0
  174. package/dist/lib/runtime-darwin-x64/artifacts/library-release/runtime/default/scr_closure.o +0 -0
  175. package/dist/lib/runtime-darwin-x64/artifacts/library-release/runtime/default/scr_console.o +0 -0
  176. package/dist/lib/runtime-darwin-x64/artifacts/library-release/runtime/default/scr_console_native.o +0 -0
  177. package/dist/lib/runtime-darwin-x64/artifacts/library-release/runtime/default/scr_copying.o +0 -0
  178. package/dist/lib/runtime-darwin-x64/artifacts/library-release/runtime/default/scr_cycle.o +0 -0
  179. package/dist/lib/runtime-darwin-x64/artifacts/library-release/runtime/default/scr_dyn_handle.o +0 -0
  180. package/dist/lib/runtime-darwin-x64/artifacts/library-release/runtime/default/scr_dyn_invoke.o +0 -0
  181. package/dist/lib/runtime-darwin-x64/artifacts/library-release/runtime/default/scr_error.o +0 -0
  182. package/dist/lib/runtime-darwin-x64/artifacts/library-release/runtime/default/scr_events_emitter.o +0 -0
  183. package/dist/lib/runtime-darwin-x64/artifacts/library-release/runtime/default/scr_exception.o +0 -0
  184. package/dist/lib/runtime-darwin-x64/artifacts/library-release/runtime/default/scr_grapheme.o +0 -0
  185. package/dist/lib/runtime-darwin-x64/artifacts/library-release/runtime/default/scr_inspect.o +0 -0
  186. package/dist/lib/runtime-darwin-x64/artifacts/library-release/runtime/default/scr_json.o +0 -0
  187. package/dist/lib/runtime-darwin-x64/artifacts/library-release/runtime/default/scr_lib.o +0 -0
  188. package/dist/lib/runtime-darwin-x64/artifacts/library-release/runtime/default/scr_library.o +0 -0
  189. package/dist/lib/runtime-darwin-x64/artifacts/library-release/runtime/default/scr_map.o +0 -0
  190. package/dist/lib/runtime-darwin-x64/artifacts/library-release/runtime/default/scr_node_builtin.o +0 -0
  191. package/dist/lib/runtime-darwin-x64/artifacts/library-release/runtime/default/scr_number.o +0 -0
  192. package/dist/lib/runtime-darwin-x64/artifacts/library-release/runtime/default/scr_object.o +0 -0
  193. package/dist/lib/runtime-darwin-x64/artifacts/library-release/runtime/default/scr_path.o +0 -0
  194. package/dist/lib/runtime-darwin-x64/artifacts/library-release/runtime/default/scr_regex.o +0 -0
  195. package/dist/lib/runtime-darwin-x64/artifacts/library-release/runtime/default/scr_string.o +0 -0
  196. package/dist/lib/runtime-darwin-x64/artifacts/library-release/runtime/default/scr_symbol.o +0 -0
  197. package/dist/lib/runtime-darwin-x64/artifacts/library-release/runtime/default/scr_union.o +0 -0
  198. package/dist/lib/runtime-darwin-x64/artifacts/library-release/runtime/default/scr_url.o +0 -0
  199. package/dist/lib/runtime-darwin-x64/artifacts/library-release/runtime/default/scr_url_params.o +0 -0
  200. package/dist/lib/runtime-darwin-x64/artifacts/library-release/runtime/default/scr_zlib.o +0 -0
  201. package/dist/lib/runtime-darwin-x64/artifacts/library-release/runtime/text-decoder-legacy/scr_bytes.o +0 -0
  202. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-dev/runtime/default/scr_array.o +0 -0
  203. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-dev/runtime/default/scr_assert.o +0 -0
  204. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-dev/runtime/default/scr_bigint.o +0 -0
  205. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-dev/runtime/default/scr_bigint_assert.o +0 -0
  206. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-dev/runtime/default/scr_bytes.o +0 -0
  207. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-dev/runtime/default/scr_bytes_io.o +0 -0
  208. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-dev/runtime/default/scr_closure.o +0 -0
  209. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-dev/runtime/default/scr_console.o +0 -0
  210. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-dev/runtime/default/scr_console_native.o +0 -0
  211. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-dev/runtime/default/scr_copying.o +0 -0
  212. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-dev/runtime/default/scr_cycle.o +0 -0
  213. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-dev/runtime/default/scr_dyn_handle.o +0 -0
  214. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-dev/runtime/default/scr_dyn_invoke.o +0 -0
  215. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-dev/runtime/default/scr_error.o +0 -0
  216. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-dev/runtime/default/scr_events_emitter.o +0 -0
  217. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-dev/runtime/default/scr_exception.o +0 -0
  218. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-dev/runtime/default/scr_grapheme.o +0 -0
  219. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-dev/runtime/default/scr_inspect.o +0 -0
  220. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-dev/runtime/default/scr_json.o +0 -0
  221. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-dev/runtime/default/scr_lib.o +0 -0
  222. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-dev/runtime/default/scr_library.o +0 -0
  223. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-dev/runtime/default/scr_map.o +0 -0
  224. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-dev/runtime/default/scr_node_builtin.o +0 -0
  225. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-dev/runtime/default/scr_number.o +0 -0
  226. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-dev/runtime/default/scr_object.o +0 -0
  227. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-dev/runtime/default/scr_path.o +0 -0
  228. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-dev/runtime/default/scr_regex.o +0 -0
  229. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-dev/runtime/default/scr_string.o +0 -0
  230. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-dev/runtime/default/scr_symbol.o +0 -0
  231. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-dev/runtime/default/scr_union.o +0 -0
  232. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-dev/runtime/default/scr_url.o +0 -0
  233. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-dev/runtime/default/scr_url_params.o +0 -0
  234. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-dev/runtime/default/scr_zlib.o +0 -0
  235. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-dev/runtime/text-decoder-legacy/scr_bytes.o +0 -0
  236. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-release/runtime/default/scr_array.o +0 -0
  237. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-release/runtime/default/scr_assert.o +0 -0
  238. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-release/runtime/default/scr_bigint.o +0 -0
  239. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-release/runtime/default/scr_bigint_assert.o +0 -0
  240. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-release/runtime/default/scr_bytes.o +0 -0
  241. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-release/runtime/default/scr_bytes_io.o +0 -0
  242. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-release/runtime/default/scr_closure.o +0 -0
  243. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-release/runtime/default/scr_console.o +0 -0
  244. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-release/runtime/default/scr_console_native.o +0 -0
  245. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-release/runtime/default/scr_copying.o +0 -0
  246. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-release/runtime/default/scr_cycle.o +0 -0
  247. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-release/runtime/default/scr_dyn_handle.o +0 -0
  248. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-release/runtime/default/scr_dyn_invoke.o +0 -0
  249. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-release/runtime/default/scr_error.o +0 -0
  250. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-release/runtime/default/scr_events_emitter.o +0 -0
  251. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-release/runtime/default/scr_exception.o +0 -0
  252. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-release/runtime/default/scr_grapheme.o +0 -0
  253. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-release/runtime/default/scr_inspect.o +0 -0
  254. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-release/runtime/default/scr_json.o +0 -0
  255. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-release/runtime/default/scr_lib.o +0 -0
  256. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-release/runtime/default/scr_library.o +0 -0
  257. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-release/runtime/default/scr_map.o +0 -0
  258. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-release/runtime/default/scr_node_builtin.o +0 -0
  259. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-release/runtime/default/scr_number.o +0 -0
  260. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-release/runtime/default/scr_object.o +0 -0
  261. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-release/runtime/default/scr_path.o +0 -0
  262. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-release/runtime/default/scr_regex.o +0 -0
  263. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-release/runtime/default/scr_string.o +0 -0
  264. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-release/runtime/default/scr_symbol.o +0 -0
  265. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-release/runtime/default/scr_union.o +0 -0
  266. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-release/runtime/default/scr_url.o +0 -0
  267. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-release/runtime/default/scr_url_params.o +0 -0
  268. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-release/runtime/default/scr_zlib.o +0 -0
  269. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-release/runtime/text-decoder-legacy/scr_bytes.o +0 -0
  270. package/dist/lib/runtime-darwin-x64/artifacts/licenses/mbedtls.txt +553 -0
  271. package/dist/lib/runtime-darwin-x64/artifacts/licenses/quickjs-ng.txt +24 -0
  272. package/dist/lib/runtime-darwin-x64/artifacts/licenses/ryu.txt +23 -0
  273. package/dist/lib/runtime-darwin-x64/artifacts/licenses/scriptc-runtime.txt +202 -0
  274. package/dist/lib/runtime-darwin-x64/artifacts/licenses/unicode.txt +39 -0
  275. package/dist/lib/runtime-darwin-x64/artifacts/licenses/v8-number-radix.txt +61 -0
  276. package/dist/lib/runtime-darwin-x64/artifacts/licenses/zlib.txt +22 -0
  277. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_array.o +0 -0
  278. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_assert.o +0 -0
  279. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_async.o +0 -0
  280. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_async_dyn.o +0 -0
  281. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_bigint.o +0 -0
  282. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_bigint_assert.o +0 -0
  283. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_bytes.o +0 -0
  284. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_bytes_io.o +0 -0
  285. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_child.o +0 -0
  286. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_closure.o +0 -0
  287. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_console.o +0 -0
  288. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_console_native.o +0 -0
  289. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_copying.o +0 -0
  290. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_crypto_async.o +0 -0
  291. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_cycle.o +0 -0
  292. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_dc.o +0 -0
  293. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_dgram.o +0 -0
  294. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_dyn_handle.o +0 -0
  295. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_dyn_invoke.o +0 -0
  296. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_error.o +0 -0
  297. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_events.o +0 -0
  298. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_events_emitter.o +0 -0
  299. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_exception.o +0 -0
  300. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_fetch.o +0 -0
  301. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_ffi.o +0 -0
  302. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_ffi_queue.o +0 -0
  303. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_file_handle.o +0 -0
  304. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_grapheme.o +0 -0
  305. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_http.o +0 -0
  306. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_http2.o +0 -0
  307. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_inspect.o +0 -0
  308. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_json.o +0 -0
  309. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_lib.o +0 -0
  310. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_loop_epoll.o +0 -0
  311. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_loop_kqueue.o +0 -0
  312. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_loop_wsapoll.o +0 -0
  313. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_map.o +0 -0
  314. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_net.o +0 -0
  315. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_node_builtin.o +0 -0
  316. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_number.o +0 -0
  317. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_object.o +0 -0
  318. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_path.o +0 -0
  319. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_qs.o +0 -0
  320. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_readline.o +0 -0
  321. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_regex.o +0 -0
  322. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_stream.o +0 -0
  323. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_string.o +0 -0
  324. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_symbol.o +0 -0
  325. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_test.o +0 -0
  326. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_tls.o +0 -0
  327. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_tls_ca.o +0 -0
  328. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_union.o +0 -0
  329. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_url.o +0 -0
  330. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_url_params.o +0 -0
  331. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_util.o +0 -0
  332. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_watch.o +0 -0
  333. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_zlib.o +0 -0
  334. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_array.o +0 -0
  335. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_assert.o +0 -0
  336. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_async.o +0 -0
  337. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_async_dyn.o +0 -0
  338. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_bigint.o +0 -0
  339. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_bigint_assert.o +0 -0
  340. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_bytes.o +0 -0
  341. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_bytes_io.o +0 -0
  342. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_child.o +0 -0
  343. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_closure.o +0 -0
  344. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_console.o +0 -0
  345. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_console_native.o +0 -0
  346. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_copying.o +0 -0
  347. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_crypto_async.o +0 -0
  348. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_cycle.o +0 -0
  349. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_dc.o +0 -0
  350. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_dgram.o +0 -0
  351. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_dyn_handle.o +0 -0
  352. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_dyn_invoke.o +0 -0
  353. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_error.o +0 -0
  354. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_events.o +0 -0
  355. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_events_emitter.o +0 -0
  356. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_exception.o +0 -0
  357. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_fetch.o +0 -0
  358. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_ffi.o +0 -0
  359. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_ffi_queue.o +0 -0
  360. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_file_handle.o +0 -0
  361. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_grapheme.o +0 -0
  362. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_http.o +0 -0
  363. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_http2.o +0 -0
  364. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_inspect.o +0 -0
  365. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_inspect_island.o +0 -0
  366. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_island.o +0 -0
  367. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_json.o +0 -0
  368. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_lib.o +0 -0
  369. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_loop_epoll.o +0 -0
  370. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_loop_kqueue.o +0 -0
  371. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_loop_wsapoll.o +0 -0
  372. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_map.o +0 -0
  373. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_net.o +0 -0
  374. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_net_island.o +0 -0
  375. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_node_builtin.o +0 -0
  376. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_number.o +0 -0
  377. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_object.o +0 -0
  378. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_path.o +0 -0
  379. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_qs.o +0 -0
  380. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_readline.o +0 -0
  381. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_regex.o +0 -0
  382. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_stream.o +0 -0
  383. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_string.o +0 -0
  384. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_symbol.o +0 -0
  385. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_test.o +0 -0
  386. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_tls.o +0 -0
  387. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_tls_ca.o +0 -0
  388. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_union.o +0 -0
  389. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_url.o +0 -0
  390. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_url_params.o +0 -0
  391. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_util.o +0 -0
  392. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_watch.o +0 -0
  393. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_web.o +0 -0
  394. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_zlib.o +0 -0
  395. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_zlib_island.o +0 -0
  396. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic-text-decoder-legacy/scr_bytes.o +0 -0
  397. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/text-decoder-legacy/scr_bytes.o +0 -0
  398. package/dist/lib/runtime-darwin-x64/artifacts/vendor/libregexp/libscriptc-libregexp.a +0 -0
  399. package/dist/lib/runtime-darwin-x64/artifacts/vendor/mbedtls/libscriptc-mbedtls.a +0 -0
  400. package/dist/lib/runtime-darwin-x64/artifacts/vendor/quickjs/libscriptc-quickjs.a +0 -0
  401. package/dist/lib/runtime-darwin-x64/artifacts/vendor/zlib/libscriptc-zlib.a +0 -0
  402. package/dist/lib/runtime-darwin-x64/package.json +24 -0
  403. package/dist/lib/runtime-darwin-x64/runtime-pack.json +5762 -0
  404. package/dist/lib/runtime-sources/LICENSE +202 -0
  405. package/dist/lib/runtime-sources/package.json +22 -0
  406. package/dist/lib/runtime-sources/src/scr_array.c +1460 -0
  407. package/dist/lib/runtime-sources/src/scr_assert.c +1538 -0
  408. package/dist/lib/runtime-sources/src/scr_async.c +3945 -0
  409. package/dist/lib/runtime-sources/src/scr_async.test.c +134 -0
  410. package/dist/lib/runtime-sources/src/scr_async.test.ts +34 -0
  411. package/dist/lib/runtime-sources/src/scr_async_dyn.c +877 -0
  412. package/dist/lib/runtime-sources/src/scr_bigint.c +898 -0
  413. package/dist/lib/runtime-sources/src/scr_bigint_assert.c +22 -0
  414. package/dist/lib/runtime-sources/src/scr_bytes.c +2682 -0
  415. package/dist/lib/runtime-sources/src/scr_bytes_io.c +1324 -0
  416. package/dist/lib/runtime-sources/src/scr_child.c +6335 -0
  417. package/dist/lib/runtime-sources/src/scr_closure.c +213 -0
  418. package/dist/lib/runtime-sources/src/scr_console.c +259 -0
  419. package/dist/lib/runtime-sources/src/scr_console_native.c +95 -0
  420. package/dist/lib/runtime-sources/src/scr_copying.c +146 -0
  421. package/dist/lib/runtime-sources/src/scr_crypto_async.c +24 -0
  422. package/dist/lib/runtime-sources/src/scr_cycle.c +565 -0
  423. package/dist/lib/runtime-sources/src/scr_dc.c +814 -0
  424. package/dist/lib/runtime-sources/src/scr_dgram.c +1182 -0
  425. package/dist/lib/runtime-sources/src/scr_dyn_handle.c +96 -0
  426. package/dist/lib/runtime-sources/src/scr_dyn_invoke.c +1759 -0
  427. package/dist/lib/runtime-sources/src/scr_error.c +419 -0
  428. package/dist/lib/runtime-sources/src/scr_events.c +1222 -0
  429. package/dist/lib/runtime-sources/src/scr_events_emitter.c +842 -0
  430. package/dist/lib/runtime-sources/src/scr_exception.c +484 -0
  431. package/dist/lib/runtime-sources/src/scr_fetch.c +7479 -0
  432. package/dist/lib/runtime-sources/src/scr_fetch_curl.c +666 -0
  433. package/dist/lib/runtime-sources/src/scr_ffi.c +143 -0
  434. package/dist/lib/runtime-sources/src/scr_ffi_queue.c +379 -0
  435. package/dist/lib/runtime-sources/src/scr_file_handle.c +562 -0
  436. package/dist/lib/runtime-sources/src/scr_grapheme.c +203 -0
  437. package/dist/lib/runtime-sources/src/scr_grapheme_data.h +842 -0
  438. package/dist/lib/runtime-sources/src/scr_http.c +5811 -0
  439. package/dist/lib/runtime-sources/src/scr_http2.c +3243 -0
  440. package/dist/lib/runtime-sources/src/scr_inspect.c +923 -0
  441. package/dist/lib/runtime-sources/src/scr_inspect_island.c +51 -0
  442. package/dist/lib/runtime-sources/src/scr_island.c +10012 -0
  443. package/dist/lib/runtime-sources/src/scr_island_manifest.h +153 -0
  444. package/dist/lib/runtime-sources/src/scr_json.c +8986 -0
  445. package/dist/lib/runtime-sources/src/scr_json.test.c +182 -0
  446. package/dist/lib/runtime-sources/src/scr_json.test.ts +33 -0
  447. package/dist/lib/runtime-sources/src/scr_lib.c +6304 -0
  448. package/dist/lib/runtime-sources/src/scr_library.c +444 -0
  449. package/dist/lib/runtime-sources/src/scr_loop_epoll.c +241 -0
  450. package/dist/lib/runtime-sources/src/scr_loop_kqueue.c +121 -0
  451. package/dist/lib/runtime-sources/src/scr_loop_wsapoll.c +208 -0
  452. package/dist/lib/runtime-sources/src/scr_map.c +752 -0
  453. package/dist/lib/runtime-sources/src/scr_musl.c +438 -0
  454. package/dist/lib/runtime-sources/src/scr_net.c +3708 -0
  455. package/dist/lib/runtime-sources/src/scr_net_island.c +458 -0
  456. package/dist/lib/runtime-sources/src/scr_node_builtin.c +291 -0
  457. package/dist/lib/runtime-sources/src/scr_number.c +192 -0
  458. package/dist/lib/runtime-sources/src/scr_object.c +91 -0
  459. package/dist/lib/runtime-sources/src/scr_path.c +1281 -0
  460. package/dist/lib/runtime-sources/src/scr_platform.h +119 -0
  461. package/dist/lib/runtime-sources/src/scr_qs.c +496 -0
  462. package/dist/lib/runtime-sources/src/scr_readline.c +288 -0
  463. package/dist/lib/runtime-sources/src/scr_regex.c +1313 -0
  464. package/dist/lib/runtime-sources/src/scr_runtime.h +7364 -0
  465. package/dist/lib/runtime-sources/src/scr_stream.c +3346 -0
  466. package/dist/lib/runtime-sources/src/scr_string.c +1864 -0
  467. package/dist/lib/runtime-sources/src/scr_symbol.c +239 -0
  468. package/dist/lib/runtime-sources/src/scr_test.c +662 -0
  469. package/dist/lib/runtime-sources/src/scr_text_decoder_data.h +7389 -0
  470. package/dist/lib/runtime-sources/src/scr_text_decoder_labels.h +225 -0
  471. package/dist/lib/runtime-sources/src/scr_tls.c +1806 -0
  472. package/dist/lib/runtime-sources/src/scr_tls_ca.c +433 -0
  473. package/dist/lib/runtime-sources/src/scr_union.c +105 -0
  474. package/dist/lib/runtime-sources/src/scr_url.c +1400 -0
  475. package/dist/lib/runtime-sources/src/scr_url_internal.h +29 -0
  476. package/dist/lib/runtime-sources/src/scr_url_params.c +526 -0
  477. package/dist/lib/runtime-sources/src/scr_util.c +984 -0
  478. package/dist/lib/runtime-sources/src/scr_watch.c +568 -0
  479. package/dist/lib/runtime-sources/src/scr_web.c +1854 -0
  480. package/dist/lib/runtime-sources/src/scr_win.c +231 -0
  481. package/dist/lib/runtime-sources/src/scr_win_stats.h +23 -0
  482. package/dist/lib/runtime-sources/src/scr_zlib.c +358 -0
  483. package/dist/lib/runtime-sources/src/scr_zlib_island.c +15 -0
  484. package/dist/lib/runtime-sources/vendor/README.md +60 -0
  485. package/dist/lib/runtime-sources/vendor/curl/COPYRIGHT +534 -0
  486. package/dist/lib/runtime-sources/vendor/curl/include/curl/curl.h +3214 -0
  487. package/dist/lib/runtime-sources/vendor/curl/include/curl/curlver.h +79 -0
  488. package/dist/lib/runtime-sources/vendor/curl/include/curl/easy.h +125 -0
  489. package/dist/lib/runtime-sources/vendor/curl/include/curl/header.h +74 -0
  490. package/dist/lib/runtime-sources/vendor/curl/include/curl/mprintf.h +52 -0
  491. package/dist/lib/runtime-sources/vendor/curl/include/curl/multi.h +460 -0
  492. package/dist/lib/runtime-sources/vendor/curl/include/curl/options.h +70 -0
  493. package/dist/lib/runtime-sources/vendor/curl/include/curl/stdcheaders.h +35 -0
  494. package/dist/lib/runtime-sources/vendor/curl/include/curl/system.h +508 -0
  495. package/dist/lib/runtime-sources/vendor/curl/include/curl/typecheck-gcc.h +716 -0
  496. package/dist/lib/runtime-sources/vendor/curl/include/curl/urlapi.h +149 -0
  497. package/dist/lib/runtime-sources/vendor/curl/include/curl/websockets.h +84 -0
  498. package/dist/lib/runtime-sources/vendor/mbedtls/LICENSE +553 -0
  499. package/dist/lib/runtime-sources/vendor/mbedtls/include/CMakeLists.txt +22 -0
  500. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/aes.h +631 -0
  501. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/aria.h +343 -0
  502. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/asn1.h +642 -0
  503. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/asn1write.h +390 -0
  504. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/base64.h +82 -0
  505. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/bignum.h +1088 -0
  506. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/block_cipher.h +76 -0
  507. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/build_info.h +194 -0
  508. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/camellia.h +305 -0
  509. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/ccm.h +526 -0
  510. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/chacha20.h +209 -0
  511. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/chachapoly.h +351 -0
  512. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/check_config.h +1149 -0
  513. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/cipher.h +1250 -0
  514. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/cmac.h +246 -0
  515. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/compat-2.x.h +46 -0
  516. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/config_adjust_legacy_crypto.h +578 -0
  517. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/config_adjust_legacy_from_psa.h +873 -0
  518. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/config_adjust_psa_from_legacy.h +359 -0
  519. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/config_adjust_psa_superset_legacy.h +145 -0
  520. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/config_adjust_ssl.h +91 -0
  521. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/config_adjust_x509.h +35 -0
  522. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/config_psa.h +61 -0
  523. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/constant_time.h +36 -0
  524. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/ctr_drbg.h +596 -0
  525. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/debug.h +156 -0
  526. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/des.h +385 -0
  527. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/dhm.h +972 -0
  528. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/ecdh.h +455 -0
  529. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/ecdsa.h +674 -0
  530. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/ecjpake.h +298 -0
  531. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/ecp.h +1517 -0
  532. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/entropy.h +274 -0
  533. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/error.h +201 -0
  534. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/gcm.h +387 -0
  535. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/hkdf.h +124 -0
  536. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/hmac_drbg.h +434 -0
  537. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/lms.h +440 -0
  538. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/mbedtls_config.h +4446 -0
  539. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/md.h +526 -0
  540. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/md5.h +190 -0
  541. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/memory_buffer_alloc.h +142 -0
  542. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/net_sockets.h +299 -0
  543. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/nist_kw.h +166 -0
  544. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/oid.h +727 -0
  545. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/pem.h +160 -0
  546. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/pk.h +1303 -0
  547. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/pkcs12.h +186 -0
  548. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/pkcs5.h +198 -0
  549. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/pkcs7.h +252 -0
  550. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/platform.h +516 -0
  551. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/platform_time.h +79 -0
  552. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/platform_util.h +247 -0
  553. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/poly1305.h +168 -0
  554. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/private_access.h +20 -0
  555. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/psa_util.h +207 -0
  556. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/ripemd160.h +136 -0
  557. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/rsa.h +1170 -0
  558. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/sha1.h +219 -0
  559. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/sha256.h +200 -0
  560. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/sha3.h +172 -0
  561. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/sha512.h +208 -0
  562. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/ssl.h +5887 -0
  563. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/ssl_cache.h +187 -0
  564. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/ssl_ciphersuites.h +482 -0
  565. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/ssl_cookie.h +106 -0
  566. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/ssl_ticket.h +199 -0
  567. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/threading.h +167 -0
  568. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/timing.h +94 -0
  569. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/version.h +78 -0
  570. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/x509.h +500 -0
  571. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/x509_crl.h +184 -0
  572. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/x509_crt.h +1208 -0
  573. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/x509_csr.h +382 -0
  574. package/dist/lib/runtime-sources/vendor/mbedtls/include/psa/build_info.h +20 -0
  575. package/dist/lib/runtime-sources/vendor/mbedtls/include/psa/crypto.h +4998 -0
  576. package/dist/lib/runtime-sources/vendor/mbedtls/include/psa/crypto_adjust_auto_enabled.h +31 -0
  577. package/dist/lib/runtime-sources/vendor/mbedtls/include/psa/crypto_adjust_config_dependencies.h +51 -0
  578. package/dist/lib/runtime-sources/vendor/mbedtls/include/psa/crypto_adjust_config_key_pair_types.h +101 -0
  579. package/dist/lib/runtime-sources/vendor/mbedtls/include/psa/crypto_adjust_config_synonyms.h +49 -0
  580. package/dist/lib/runtime-sources/vendor/mbedtls/include/psa/crypto_builtin_composites.h +214 -0
  581. package/dist/lib/runtime-sources/vendor/mbedtls/include/psa/crypto_builtin_key_derivation.h +118 -0
  582. package/dist/lib/runtime-sources/vendor/mbedtls/include/psa/crypto_builtin_primitives.h +114 -0
  583. package/dist/lib/runtime-sources/vendor/mbedtls/include/psa/crypto_compat.h +230 -0
  584. package/dist/lib/runtime-sources/vendor/mbedtls/include/psa/crypto_config.h +145 -0
  585. package/dist/lib/runtime-sources/vendor/mbedtls/include/psa/crypto_driver_common.h +44 -0
  586. package/dist/lib/runtime-sources/vendor/mbedtls/include/psa/crypto_driver_contexts_composites.h +151 -0
  587. package/dist/lib/runtime-sources/vendor/mbedtls/include/psa/crypto_driver_contexts_key_derivation.h +52 -0
  588. package/dist/lib/runtime-sources/vendor/mbedtls/include/psa/crypto_driver_contexts_primitives.h +105 -0
  589. package/dist/lib/runtime-sources/vendor/mbedtls/include/psa/crypto_extra.h +2145 -0
  590. package/dist/lib/runtime-sources/vendor/mbedtls/include/psa/crypto_legacy.h +88 -0
  591. package/dist/lib/runtime-sources/vendor/mbedtls/include/psa/crypto_platform.h +102 -0
  592. package/dist/lib/runtime-sources/vendor/mbedtls/include/psa/crypto_se_driver.h +1383 -0
  593. package/dist/lib/runtime-sources/vendor/mbedtls/include/psa/crypto_sizes.h +1319 -0
  594. package/dist/lib/runtime-sources/vendor/mbedtls/include/psa/crypto_struct.h +527 -0
  595. package/dist/lib/runtime-sources/vendor/mbedtls/include/psa/crypto_types.h +508 -0
  596. package/dist/lib/runtime-sources/vendor/mbedtls/include/psa/crypto_values.h +2782 -0
  597. package/dist/lib/runtime-sources/vendor/mbedtls/library/aes.c +2294 -0
  598. package/dist/lib/runtime-sources/vendor/mbedtls/library/aesce.c +624 -0
  599. package/dist/lib/runtime-sources/vendor/mbedtls/library/aesce.h +136 -0
  600. package/dist/lib/runtime-sources/vendor/mbedtls/library/aesni.c +846 -0
  601. package/dist/lib/runtime-sources/vendor/mbedtls/library/aesni.h +162 -0
  602. package/dist/lib/runtime-sources/vendor/mbedtls/library/alignment.h +704 -0
  603. package/dist/lib/runtime-sources/vendor/mbedtls/library/aria.c +969 -0
  604. package/dist/lib/runtime-sources/vendor/mbedtls/library/asn1parse.c +468 -0
  605. package/dist/lib/runtime-sources/vendor/mbedtls/library/asn1write.c +440 -0
  606. package/dist/lib/runtime-sources/vendor/mbedtls/library/base64.c +322 -0
  607. package/dist/lib/runtime-sources/vendor/mbedtls/library/base64_internal.h +45 -0
  608. package/dist/lib/runtime-sources/vendor/mbedtls/library/bignum.c +2583 -0
  609. package/dist/lib/runtime-sources/vendor/mbedtls/library/bignum_core.c +1240 -0
  610. package/dist/lib/runtime-sources/vendor/mbedtls/library/bignum_core.h +872 -0
  611. package/dist/lib/runtime-sources/vendor/mbedtls/library/bignum_core_invasive.h +38 -0
  612. package/dist/lib/runtime-sources/vendor/mbedtls/library/bignum_internal.h +122 -0
  613. package/dist/lib/runtime-sources/vendor/mbedtls/library/bignum_mod.c +394 -0
  614. package/dist/lib/runtime-sources/vendor/mbedtls/library/bignum_mod.h +452 -0
  615. package/dist/lib/runtime-sources/vendor/mbedtls/library/bignum_mod_raw.c +276 -0
  616. package/dist/lib/runtime-sources/vendor/mbedtls/library/bignum_mod_raw.h +416 -0
  617. package/dist/lib/runtime-sources/vendor/mbedtls/library/bignum_mod_raw_invasive.h +34 -0
  618. package/dist/lib/runtime-sources/vendor/mbedtls/library/block_cipher.c +207 -0
  619. package/dist/lib/runtime-sources/vendor/mbedtls/library/block_cipher_internal.h +99 -0
  620. package/dist/lib/runtime-sources/vendor/mbedtls/library/bn_mul.h +1094 -0
  621. package/dist/lib/runtime-sources/vendor/mbedtls/library/camellia.c +1058 -0
  622. package/dist/lib/runtime-sources/vendor/mbedtls/library/ccm.c +777 -0
  623. package/dist/lib/runtime-sources/vendor/mbedtls/library/chacha20.c +563 -0
  624. package/dist/lib/runtime-sources/vendor/mbedtls/library/chacha20_internal.h +23 -0
  625. package/dist/lib/runtime-sources/vendor/mbedtls/library/chachapoly.c +487 -0
  626. package/dist/lib/runtime-sources/vendor/mbedtls/library/check_crypto_config.h +136 -0
  627. package/dist/lib/runtime-sources/vendor/mbedtls/library/cipher.c +1712 -0
  628. package/dist/lib/runtime-sources/vendor/mbedtls/library/cipher_invasive.h +28 -0
  629. package/dist/lib/runtime-sources/vendor/mbedtls/library/cipher_wrap.c +2482 -0
  630. package/dist/lib/runtime-sources/vendor/mbedtls/library/cipher_wrap.h +178 -0
  631. package/dist/lib/runtime-sources/vendor/mbedtls/library/cmac.c +1067 -0
  632. package/dist/lib/runtime-sources/vendor/mbedtls/library/common.h +487 -0
  633. package/dist/lib/runtime-sources/vendor/mbedtls/library/constant_time.c +247 -0
  634. package/dist/lib/runtime-sources/vendor/mbedtls/library/constant_time_impl.h +541 -0
  635. package/dist/lib/runtime-sources/vendor/mbedtls/library/constant_time_internal.h +579 -0
  636. package/dist/lib/runtime-sources/vendor/mbedtls/library/ctr.h +35 -0
  637. package/dist/lib/runtime-sources/vendor/mbedtls/library/ctr_drbg.c +1016 -0
  638. package/dist/lib/runtime-sources/vendor/mbedtls/library/debug.c +475 -0
  639. package/dist/lib/runtime-sources/vendor/mbedtls/library/debug_internal.h +185 -0
  640. package/dist/lib/runtime-sources/vendor/mbedtls/library/des.c +1042 -0
  641. package/dist/lib/runtime-sources/vendor/mbedtls/library/dhm.c +700 -0
  642. package/dist/lib/runtime-sources/vendor/mbedtls/library/ecdh.c +696 -0
  643. package/dist/lib/runtime-sources/vendor/mbedtls/library/ecdsa.c +858 -0
  644. package/dist/lib/runtime-sources/vendor/mbedtls/library/ecjpake.c +1216 -0
  645. package/dist/lib/runtime-sources/vendor/mbedtls/library/ecp.c +3674 -0
  646. package/dist/lib/runtime-sources/vendor/mbedtls/library/ecp_curves.c +6125 -0
  647. package/dist/lib/runtime-sources/vendor/mbedtls/library/ecp_curves_new.c +9 -0
  648. package/dist/lib/runtime-sources/vendor/mbedtls/library/ecp_internal_alt.h +287 -0
  649. package/dist/lib/runtime-sources/vendor/mbedtls/library/ecp_invasive.h +305 -0
  650. package/dist/lib/runtime-sources/vendor/mbedtls/library/entropy.c +680 -0
  651. package/dist/lib/runtime-sources/vendor/mbedtls/library/entropy_poll.c +233 -0
  652. package/dist/lib/runtime-sources/vendor/mbedtls/library/entropy_poll.h +64 -0
  653. package/dist/lib/runtime-sources/vendor/mbedtls/library/error.c +878 -0
  654. package/dist/lib/runtime-sources/vendor/mbedtls/library/gcm.c +1330 -0
  655. package/dist/lib/runtime-sources/vendor/mbedtls/library/hkdf.c +161 -0
  656. package/dist/lib/runtime-sources/vendor/mbedtls/library/hmac_drbg.c +633 -0
  657. package/dist/lib/runtime-sources/vendor/mbedtls/library/lmots.c +789 -0
  658. package/dist/lib/runtime-sources/vendor/mbedtls/library/lmots.h +288 -0
  659. package/dist/lib/runtime-sources/vendor/mbedtls/library/lms.c +778 -0
  660. package/dist/lib/runtime-sources/vendor/mbedtls/library/md.c +1108 -0
  661. package/dist/lib/runtime-sources/vendor/mbedtls/library/md5.c +426 -0
  662. package/dist/lib/runtime-sources/vendor/mbedtls/library/md_psa.h +26 -0
  663. package/dist/lib/runtime-sources/vendor/mbedtls/library/md_wrap.h +46 -0
  664. package/dist/lib/runtime-sources/vendor/mbedtls/library/memory_buffer_alloc.c +751 -0
  665. package/dist/lib/runtime-sources/vendor/mbedtls/library/mps_common.h +181 -0
  666. package/dist/lib/runtime-sources/vendor/mbedtls/library/mps_error.h +89 -0
  667. package/dist/lib/runtime-sources/vendor/mbedtls/library/mps_reader.c +538 -0
  668. package/dist/lib/runtime-sources/vendor/mbedtls/library/mps_reader.h +366 -0
  669. package/dist/lib/runtime-sources/vendor/mbedtls/library/mps_trace.c +112 -0
  670. package/dist/lib/runtime-sources/vendor/mbedtls/library/mps_trace.h +154 -0
  671. package/dist/lib/runtime-sources/vendor/mbedtls/library/net_sockets.c +694 -0
  672. package/dist/lib/runtime-sources/vendor/mbedtls/library/nist_kw.c +729 -0
  673. package/dist/lib/runtime-sources/vendor/mbedtls/library/oid.c +1166 -0
  674. package/dist/lib/runtime-sources/vendor/mbedtls/library/padlock.c +157 -0
  675. package/dist/lib/runtime-sources/vendor/mbedtls/library/padlock.h +111 -0
  676. package/dist/lib/runtime-sources/vendor/mbedtls/library/pem.c +554 -0
  677. package/dist/lib/runtime-sources/vendor/mbedtls/library/pk.c +1602 -0
  678. package/dist/lib/runtime-sources/vendor/mbedtls/library/pk_ecc.c +261 -0
  679. package/dist/lib/runtime-sources/vendor/mbedtls/library/pk_internal.h +241 -0
  680. package/dist/lib/runtime-sources/vendor/mbedtls/library/pk_wrap.c +1618 -0
  681. package/dist/lib/runtime-sources/vendor/mbedtls/library/pk_wrap.h +138 -0
  682. package/dist/lib/runtime-sources/vendor/mbedtls/library/pkcs12.c +437 -0
  683. package/dist/lib/runtime-sources/vendor/mbedtls/library/pkcs5.c +500 -0
  684. package/dist/lib/runtime-sources/vendor/mbedtls/library/pkcs7.c +787 -0
  685. package/dist/lib/runtime-sources/vendor/mbedtls/library/pkparse.c +1392 -0
  686. package/dist/lib/runtime-sources/vendor/mbedtls/library/pkwrite.c +631 -0
  687. package/dist/lib/runtime-sources/vendor/mbedtls/library/pkwrite.h +121 -0
  688. package/dist/lib/runtime-sources/vendor/mbedtls/library/platform.c +402 -0
  689. package/dist/lib/runtime-sources/vendor/mbedtls/library/platform_util.c +258 -0
  690. package/dist/lib/runtime-sources/vendor/mbedtls/library/poly1305.c +492 -0
  691. package/dist/lib/runtime-sources/vendor/mbedtls/library/psa_crypto.c +9532 -0
  692. package/dist/lib/runtime-sources/vendor/mbedtls/library/psa_crypto_aead.c +646 -0
  693. package/dist/lib/runtime-sources/vendor/mbedtls/library/psa_crypto_aead.h +499 -0
  694. package/dist/lib/runtime-sources/vendor/mbedtls/library/psa_crypto_cipher.c +747 -0
  695. package/dist/lib/runtime-sources/vendor/mbedtls/library/psa_crypto_cipher.h +316 -0
  696. package/dist/lib/runtime-sources/vendor/mbedtls/library/psa_crypto_client.c +22 -0
  697. package/dist/lib/runtime-sources/vendor/mbedtls/library/psa_crypto_core.h +983 -0
  698. package/dist/lib/runtime-sources/vendor/mbedtls/library/psa_crypto_core_common.h +52 -0
  699. package/dist/lib/runtime-sources/vendor/mbedtls/library/psa_crypto_driver_wrappers.h +2896 -0
  700. package/dist/lib/runtime-sources/vendor/mbedtls/library/psa_crypto_driver_wrappers_no_static.c +256 -0
  701. package/dist/lib/runtime-sources/vendor/mbedtls/library/psa_crypto_driver_wrappers_no_static.h +31 -0
  702. package/dist/lib/runtime-sources/vendor/mbedtls/library/psa_crypto_ecp.c +594 -0
  703. package/dist/lib/runtime-sources/vendor/mbedtls/library/psa_crypto_ecp.h +267 -0
  704. package/dist/lib/runtime-sources/vendor/mbedtls/library/psa_crypto_ffdh.c +361 -0
  705. package/dist/lib/runtime-sources/vendor/mbedtls/library/psa_crypto_ffdh.h +131 -0
  706. package/dist/lib/runtime-sources/vendor/mbedtls/library/psa_crypto_hash.c +470 -0
  707. package/dist/lib/runtime-sources/vendor/mbedtls/library/psa_crypto_hash.h +211 -0
  708. package/dist/lib/runtime-sources/vendor/mbedtls/library/psa_crypto_invasive.h +92 -0
  709. package/dist/lib/runtime-sources/vendor/mbedtls/library/psa_crypto_its.h +131 -0
  710. package/dist/lib/runtime-sources/vendor/mbedtls/library/psa_crypto_mac.c +505 -0
  711. package/dist/lib/runtime-sources/vendor/mbedtls/library/psa_crypto_mac.h +264 -0
  712. package/dist/lib/runtime-sources/vendor/mbedtls/library/psa_crypto_pake.c +571 -0
  713. package/dist/lib/runtime-sources/vendor/mbedtls/library/psa_crypto_pake.h +159 -0
  714. package/dist/lib/runtime-sources/vendor/mbedtls/library/psa_crypto_random.c +181 -0
  715. package/dist/lib/runtime-sources/vendor/mbedtls/library/psa_crypto_random.h +72 -0
  716. package/dist/lib/runtime-sources/vendor/mbedtls/library/psa_crypto_random_impl.h +200 -0
  717. package/dist/lib/runtime-sources/vendor/mbedtls/library/psa_crypto_rsa.c +714 -0
  718. package/dist/lib/runtime-sources/vendor/mbedtls/library/psa_crypto_rsa.h +321 -0
  719. package/dist/lib/runtime-sources/vendor/mbedtls/library/psa_crypto_se.c +373 -0
  720. package/dist/lib/runtime-sources/vendor/mbedtls/library/psa_crypto_se.h +192 -0
  721. package/dist/lib/runtime-sources/vendor/mbedtls/library/psa_crypto_slot_management.c +1137 -0
  722. package/dist/lib/runtime-sources/vendor/mbedtls/library/psa_crypto_slot_management.h +344 -0
  723. package/dist/lib/runtime-sources/vendor/mbedtls/library/psa_crypto_storage.c +481 -0
  724. package/dist/lib/runtime-sources/vendor/mbedtls/library/psa_crypto_storage.h +392 -0
  725. package/dist/lib/runtime-sources/vendor/mbedtls/library/psa_its_file.c +254 -0
  726. package/dist/lib/runtime-sources/vendor/mbedtls/library/psa_util.c +614 -0
  727. package/dist/lib/runtime-sources/vendor/mbedtls/library/psa_util_internal.h +100 -0
  728. package/dist/lib/runtime-sources/vendor/mbedtls/library/ripemd160.c +490 -0
  729. package/dist/lib/runtime-sources/vendor/mbedtls/library/rsa.c +3121 -0
  730. package/dist/lib/runtime-sources/vendor/mbedtls/library/rsa_alt_helpers.c +455 -0
  731. package/dist/lib/runtime-sources/vendor/mbedtls/library/rsa_alt_helpers.h +209 -0
  732. package/dist/lib/runtime-sources/vendor/mbedtls/library/rsa_internal.h +188 -0
  733. package/dist/lib/runtime-sources/vendor/mbedtls/library/sha1.c +480 -0
  734. package/dist/lib/runtime-sources/vendor/mbedtls/library/sha256.c +983 -0
  735. package/dist/lib/runtime-sources/vendor/mbedtls/library/sha3.c +721 -0
  736. package/dist/lib/runtime-sources/vendor/mbedtls/library/sha512.c +1115 -0
  737. package/dist/lib/runtime-sources/vendor/mbedtls/library/ssl_cache.c +410 -0
  738. package/dist/lib/runtime-sources/vendor/mbedtls/library/ssl_ciphersuites.c +2050 -0
  739. package/dist/lib/runtime-sources/vendor/mbedtls/library/ssl_ciphersuites_internal.h +154 -0
  740. package/dist/lib/runtime-sources/vendor/mbedtls/library/ssl_client.c +1023 -0
  741. package/dist/lib/runtime-sources/vendor/mbedtls/library/ssl_client.h +22 -0
  742. package/dist/lib/runtime-sources/vendor/mbedtls/library/ssl_cookie.c +384 -0
  743. package/dist/lib/runtime-sources/vendor/mbedtls/library/ssl_debug_helpers.h +85 -0
  744. package/dist/lib/runtime-sources/vendor/mbedtls/library/ssl_debug_helpers_generated.c +251 -0
  745. package/dist/lib/runtime-sources/vendor/mbedtls/library/ssl_misc.h +3198 -0
  746. package/dist/lib/runtime-sources/vendor/mbedtls/library/ssl_msg.c +6619 -0
  747. package/dist/lib/runtime-sources/vendor/mbedtls/library/ssl_ticket.c +556 -0
  748. package/dist/lib/runtime-sources/vendor/mbedtls/library/ssl_tls.c +10234 -0
  749. package/dist/lib/runtime-sources/vendor/mbedtls/library/ssl_tls12_client.c +3688 -0
  750. package/dist/lib/runtime-sources/vendor/mbedtls/library/ssl_tls12_server.c +4311 -0
  751. package/dist/lib/runtime-sources/vendor/mbedtls/library/ssl_tls13_client.c +3208 -0
  752. package/dist/lib/runtime-sources/vendor/mbedtls/library/ssl_tls13_generic.c +1793 -0
  753. package/dist/lib/runtime-sources/vendor/mbedtls/library/ssl_tls13_invasive.h +23 -0
  754. package/dist/lib/runtime-sources/vendor/mbedtls/library/ssl_tls13_keys.c +1918 -0
  755. package/dist/lib/runtime-sources/vendor/mbedtls/library/ssl_tls13_keys.h +668 -0
  756. package/dist/lib/runtime-sources/vendor/mbedtls/library/ssl_tls13_server.c +3624 -0
  757. package/dist/lib/runtime-sources/vendor/mbedtls/library/threading.c +193 -0
  758. package/dist/lib/runtime-sources/vendor/mbedtls/library/threading_internal.h +28 -0
  759. package/dist/lib/runtime-sources/vendor/mbedtls/library/timing.c +152 -0
  760. package/dist/lib/runtime-sources/vendor/mbedtls/library/version.c +32 -0
  761. package/dist/lib/runtime-sources/vendor/mbedtls/library/version_features.c +856 -0
  762. package/dist/lib/runtime-sources/vendor/mbedtls/library/x509.c +1776 -0
  763. package/dist/lib/runtime-sources/vendor/mbedtls/library/x509_create.c +570 -0
  764. package/dist/lib/runtime-sources/vendor/mbedtls/library/x509_crl.c +708 -0
  765. package/dist/lib/runtime-sources/vendor/mbedtls/library/x509_crt.c +3311 -0
  766. package/dist/lib/runtime-sources/vendor/mbedtls/library/x509_csr.c +648 -0
  767. package/dist/lib/runtime-sources/vendor/mbedtls/library/x509_internal.h +101 -0
  768. package/dist/lib/runtime-sources/vendor/mbedtls/library/x509write.c +174 -0
  769. package/dist/lib/runtime-sources/vendor/mbedtls/library/x509write_crt.c +688 -0
  770. package/dist/lib/runtime-sources/vendor/mbedtls/library/x509write_csr.c +336 -0
  771. package/dist/lib/runtime-sources/vendor/quickjs-ng/CMakeLists.txt +566 -0
  772. package/dist/lib/runtime-sources/vendor/quickjs-ng/LICENSE +24 -0
  773. package/dist/lib/runtime-sources/vendor/quickjs-ng/README.md +24 -0
  774. package/dist/lib/runtime-sources/vendor/quickjs-ng/api-test.c +1195 -0
  775. package/dist/lib/runtime-sources/vendor/quickjs-ng/builtin-array-fromasync.h +119 -0
  776. package/dist/lib/runtime-sources/vendor/quickjs-ng/builtin-iterator-zip-keyed.h +332 -0
  777. package/dist/lib/runtime-sources/vendor/quickjs-ng/builtin-iterator-zip.h +337 -0
  778. package/dist/lib/runtime-sources/vendor/quickjs-ng/cutils.h +1998 -0
  779. package/dist/lib/runtime-sources/vendor/quickjs-ng/dtoa.c +1619 -0
  780. package/dist/lib/runtime-sources/vendor/quickjs-ng/dtoa.h +87 -0
  781. package/dist/lib/runtime-sources/vendor/quickjs-ng/gen/function_source.c +81 -0
  782. package/dist/lib/runtime-sources/vendor/quickjs-ng/gen/hello.c +53 -0
  783. package/dist/lib/runtime-sources/vendor/quickjs-ng/gen/hello_module.c +106 -0
  784. package/dist/lib/runtime-sources/vendor/quickjs-ng/gen/repl.c +3036 -0
  785. package/dist/lib/runtime-sources/vendor/quickjs-ng/gen/standalone.c +323 -0
  786. package/dist/lib/runtime-sources/vendor/quickjs-ng/gen/test_fib.c +81 -0
  787. package/dist/lib/runtime-sources/vendor/quickjs-ng/libregexp-opcode.h +73 -0
  788. package/dist/lib/runtime-sources/vendor/quickjs-ng/libregexp.c +3474 -0
  789. package/dist/lib/runtime-sources/vendor/quickjs-ng/libregexp.h +101 -0
  790. package/dist/lib/runtime-sources/vendor/quickjs-ng/libunicode-table.h +5173 -0
  791. package/dist/lib/runtime-sources/vendor/quickjs-ng/libunicode.c +2069 -0
  792. package/dist/lib/runtime-sources/vendor/quickjs-ng/libunicode.h +172 -0
  793. package/dist/lib/runtime-sources/vendor/quickjs-ng/list.h +107 -0
  794. package/dist/lib/runtime-sources/vendor/quickjs-ng/lre-test.c +52 -0
  795. package/dist/lib/runtime-sources/vendor/quickjs-ng/qjs.c +762 -0
  796. package/dist/lib/runtime-sources/vendor/quickjs-ng/qjsc.c +673 -0
  797. package/dist/lib/runtime-sources/vendor/quickjs-ng/quickjs-atom.h +280 -0
  798. package/dist/lib/runtime-sources/vendor/quickjs-ng/quickjs-c-atomics.h +54 -0
  799. package/dist/lib/runtime-sources/vendor/quickjs-ng/quickjs-libc.c +5037 -0
  800. package/dist/lib/runtime-sources/vendor/quickjs-ng/quickjs-libc.h +87 -0
  801. package/dist/lib/runtime-sources/vendor/quickjs-ng/quickjs-opcode.h +377 -0
  802. package/dist/lib/runtime-sources/vendor/quickjs-ng/quickjs.c +64041 -0
  803. package/dist/lib/runtime-sources/vendor/quickjs-ng/quickjs.h +1447 -0
  804. package/dist/lib/runtime-sources/vendor/quickjs-ng/run-test262.c +2374 -0
  805. package/dist/lib/runtime-sources/vendor/quickjs-ng/unicode_gen.c +3121 -0
  806. package/dist/lib/runtime-sources/vendor/quickjs-ng/unicode_gen_def.h +310 -0
  807. package/dist/lib/runtime-sources/vendor/ryu/LICENSE-Boost +23 -0
  808. package/dist/lib/runtime-sources/vendor/ryu/common.h +114 -0
  809. package/dist/lib/runtime-sources/vendor/ryu/d2s.c +509 -0
  810. package/dist/lib/runtime-sources/vendor/ryu/d2s_full_table.h +367 -0
  811. package/dist/lib/runtime-sources/vendor/ryu/d2s_intrinsics.h +357 -0
  812. package/dist/lib/runtime-sources/vendor/ryu/d2s_small_table.h +186 -0
  813. package/dist/lib/runtime-sources/vendor/ryu/digit_table.h +35 -0
  814. package/dist/lib/runtime-sources/vendor/ryu/ryu.h +46 -0
  815. package/dist/lib/runtime-sources/vendor/unicode/LICENSE +39 -0
  816. package/dist/lib/runtime-sources/vendor/v8-number-radix/LICENSE +61 -0
  817. package/dist/lib/runtime-sources/vendor/zlib/LICENSE +22 -0
  818. package/dist/lib/runtime-sources/vendor/zlib/adler32.c +164 -0
  819. package/dist/lib/runtime-sources/vendor/zlib/compress.c +75 -0
  820. package/dist/lib/runtime-sources/vendor/zlib/crc32.c +1049 -0
  821. package/dist/lib/runtime-sources/vendor/zlib/crc32.h +9446 -0
  822. package/dist/lib/runtime-sources/vendor/zlib/deflate.c +2139 -0
  823. package/dist/lib/runtime-sources/vendor/zlib/deflate.h +377 -0
  824. package/dist/lib/runtime-sources/vendor/zlib/gzclose.c +23 -0
  825. package/dist/lib/runtime-sources/vendor/zlib/gzguts.h +214 -0
  826. package/dist/lib/runtime-sources/vendor/zlib/gzlib.c +582 -0
  827. package/dist/lib/runtime-sources/vendor/zlib/gzread.c +602 -0
  828. package/dist/lib/runtime-sources/vendor/zlib/gzwrite.c +631 -0
  829. package/dist/lib/runtime-sources/vendor/zlib/infback.c +628 -0
  830. package/dist/lib/runtime-sources/vendor/zlib/inffast.c +320 -0
  831. package/dist/lib/runtime-sources/vendor/zlib/inffast.h +11 -0
  832. package/dist/lib/runtime-sources/vendor/zlib/inffixed.h +94 -0
  833. package/dist/lib/runtime-sources/vendor/zlib/inflate.c +1526 -0
  834. package/dist/lib/runtime-sources/vendor/zlib/inflate.h +126 -0
  835. package/dist/lib/runtime-sources/vendor/zlib/inftrees.c +299 -0
  836. package/dist/lib/runtime-sources/vendor/zlib/inftrees.h +62 -0
  837. package/dist/lib/runtime-sources/vendor/zlib/trees.c +1117 -0
  838. package/dist/lib/runtime-sources/vendor/zlib/trees.h +128 -0
  839. package/dist/lib/runtime-sources/vendor/zlib/uncompr.c +85 -0
  840. package/dist/lib/runtime-sources/vendor/zlib/zconf.h +543 -0
  841. package/dist/lib/runtime-sources/vendor/zlib/zlib.h +1938 -0
  842. package/dist/lib/runtime-sources/vendor/zlib/zutil.c +299 -0
  843. package/dist/lib/runtime-sources/vendor/zlib/zutil.h +254 -0
  844. package/dist/lib/scriptc-comptime +0 -0
  845. package/dist/lib/typescript/LICENSE +55 -0
  846. package/dist/lib/typescript/NOTICE.txt +436 -0
  847. package/dist/lib/typescript/lib/lib.d.ts +20 -0
  848. package/dist/lib/typescript/lib/lib.decorators.d.ts +382 -0
  849. package/dist/lib/typescript/lib/lib.decorators.legacy.d.ts +20 -0
  850. package/dist/lib/typescript/lib/lib.dom.asynciterable.d.ts +18 -0
  851. package/dist/lib/typescript/lib/lib.dom.d.ts +45125 -0
  852. package/dist/lib/typescript/lib/lib.dom.iterable.d.ts +18 -0
  853. package/dist/lib/typescript/lib/lib.es2015.collection.d.ts +159 -0
  854. package/dist/lib/typescript/lib/lib.es2015.core.d.ts +595 -0
  855. package/dist/lib/typescript/lib/lib.es2015.d.ts +26 -0
  856. package/dist/lib/typescript/lib/lib.es2015.generator.d.ts +75 -0
  857. package/dist/lib/typescript/lib/lib.es2015.iterable.d.ts +603 -0
  858. package/dist/lib/typescript/lib/lib.es2015.promise.d.ts +79 -0
  859. package/dist/lib/typescript/lib/lib.es2015.proxy.d.ts +126 -0
  860. package/dist/lib/typescript/lib/lib.es2015.reflect.d.ts +142 -0
  861. package/dist/lib/typescript/lib/lib.es2015.symbol.d.ts +44 -0
  862. package/dist/lib/typescript/lib/lib.es2015.symbol.wellknown.d.ts +324 -0
  863. package/dist/lib/typescript/lib/lib.es2016.array.include.d.ts +114 -0
  864. package/dist/lib/typescript/lib/lib.es2016.d.ts +19 -0
  865. package/dist/lib/typescript/lib/lib.es2016.full.d.ts +21 -0
  866. package/dist/lib/typescript/lib/lib.es2016.intl.d.ts +29 -0
  867. package/dist/lib/typescript/lib/lib.es2017.arraybuffer.d.ts +19 -0
  868. package/dist/lib/typescript/lib/lib.es2017.d.ts +24 -0
  869. package/dist/lib/typescript/lib/lib.es2017.date.d.ts +29 -0
  870. package/dist/lib/typescript/lib/lib.es2017.full.d.ts +21 -0
  871. package/dist/lib/typescript/lib/lib.es2017.intl.d.ts +42 -0
  872. package/dist/lib/typescript/lib/lib.es2017.object.d.ts +47 -0
  873. package/dist/lib/typescript/lib/lib.es2017.sharedmemory.d.ts +133 -0
  874. package/dist/lib/typescript/lib/lib.es2017.string.d.ts +47 -0
  875. package/dist/lib/typescript/lib/lib.es2017.typedarrays.d.ts +51 -0
  876. package/dist/lib/typescript/lib/lib.es2018.asyncgenerator.d.ts +75 -0
  877. package/dist/lib/typescript/lib/lib.es2018.asynciterable.d.ts +51 -0
  878. package/dist/lib/typescript/lib/lib.es2018.d.ts +22 -0
  879. package/dist/lib/typescript/lib/lib.es2018.full.d.ts +22 -0
  880. package/dist/lib/typescript/lib/lib.es2018.intl.d.ts +81 -0
  881. package/dist/lib/typescript/lib/lib.es2018.promise.d.ts +28 -0
  882. package/dist/lib/typescript/lib/lib.es2018.regexp.d.ts +35 -0
  883. package/dist/lib/typescript/lib/lib.es2019.array.d.ts +77 -0
  884. package/dist/lib/typescript/lib/lib.es2019.d.ts +22 -0
  885. package/dist/lib/typescript/lib/lib.es2019.full.d.ts +22 -0
  886. package/dist/lib/typescript/lib/lib.es2019.intl.d.ts +21 -0
  887. package/dist/lib/typescript/lib/lib.es2019.object.d.ts +31 -0
  888. package/dist/lib/typescript/lib/lib.es2019.string.d.ts +35 -0
  889. package/dist/lib/typescript/lib/lib.es2019.symbol.d.ts +22 -0
  890. package/dist/lib/typescript/lib/lib.es2020.bigint.d.ts +763 -0
  891. package/dist/lib/typescript/lib/lib.es2020.d.ts +25 -0
  892. package/dist/lib/typescript/lib/lib.es2020.date.d.ts +40 -0
  893. package/dist/lib/typescript/lib/lib.es2020.full.d.ts +22 -0
  894. package/dist/lib/typescript/lib/lib.es2020.intl.d.ts +472 -0
  895. package/dist/lib/typescript/lib/lib.es2020.number.d.ts +26 -0
  896. package/dist/lib/typescript/lib/lib.es2020.promise.d.ts +45 -0
  897. package/dist/lib/typescript/lib/lib.es2020.sharedmemory.d.ts +97 -0
  898. package/dist/lib/typescript/lib/lib.es2020.string.d.ts +42 -0
  899. package/dist/lib/typescript/lib/lib.es2020.symbol.wellknown.d.ts +39 -0
  900. package/dist/lib/typescript/lib/lib.es2021.d.ts +21 -0
  901. package/dist/lib/typescript/lib/lib.es2021.full.d.ts +22 -0
  902. package/dist/lib/typescript/lib/lib.es2021.intl.d.ts +164 -0
  903. package/dist/lib/typescript/lib/lib.es2021.promise.d.ts +46 -0
  904. package/dist/lib/typescript/lib/lib.es2021.string.d.ts +31 -0
  905. package/dist/lib/typescript/lib/lib.es2021.weakref.d.ts +76 -0
  906. package/dist/lib/typescript/lib/lib.es2022.array.d.ts +119 -0
  907. package/dist/lib/typescript/lib/lib.es2022.d.ts +23 -0
  908. package/dist/lib/typescript/lib/lib.es2022.error.d.ts +73 -0
  909. package/dist/lib/typescript/lib/lib.es2022.full.d.ts +22 -0
  910. package/dist/lib/typescript/lib/lib.es2022.intl.d.ts +143 -0
  911. package/dist/lib/typescript/lib/lib.es2022.object.d.ts +24 -0
  912. package/dist/lib/typescript/lib/lib.es2022.regexp.d.ts +37 -0
  913. package/dist/lib/typescript/lib/lib.es2022.string.d.ts +23 -0
  914. package/dist/lib/typescript/lib/lib.es2023.array.d.ts +922 -0
  915. package/dist/lib/typescript/lib/lib.es2023.collection.d.ts +19 -0
  916. package/dist/lib/typescript/lib/lib.es2023.d.ts +20 -0
  917. package/dist/lib/typescript/lib/lib.es2023.full.d.ts +22 -0
  918. package/dist/lib/typescript/lib/lib.es2023.intl.d.ts +62 -0
  919. package/dist/lib/typescript/lib/lib.es2024.arraybuffer.d.ts +63 -0
  920. package/dist/lib/typescript/lib/lib.es2024.collection.d.ts +27 -0
  921. package/dist/lib/typescript/lib/lib.es2024.d.ts +24 -0
  922. package/dist/lib/typescript/lib/lib.es2024.full.d.ts +22 -0
  923. package/dist/lib/typescript/lib/lib.es2024.object.d.ts +27 -0
  924. package/dist/lib/typescript/lib/lib.es2024.promise.d.ts +33 -0
  925. package/dist/lib/typescript/lib/lib.es2024.regexp.d.ts +23 -0
  926. package/dist/lib/typescript/lib/lib.es2024.sharedmemory.d.ts +66 -0
  927. package/dist/lib/typescript/lib/lib.es2024.string.d.ts +27 -0
  928. package/dist/lib/typescript/lib/lib.es2025.collection.d.ts +94 -0
  929. package/dist/lib/typescript/lib/lib.es2025.d.ts +23 -0
  930. package/dist/lib/typescript/lib/lib.es2025.float16.d.ts +443 -0
  931. package/dist/lib/typescript/lib/lib.es2025.full.d.ts +22 -0
  932. package/dist/lib/typescript/lib/lib.es2025.intl.d.ts +200 -0
  933. package/dist/lib/typescript/lib/lib.es2025.iterator.d.ts +146 -0
  934. package/dist/lib/typescript/lib/lib.es2025.promise.d.ts +32 -0
  935. package/dist/lib/typescript/lib/lib.es2025.regexp.d.ts +30 -0
  936. package/dist/lib/typescript/lib/lib.es5.d.ts +4599 -0
  937. package/dist/lib/typescript/lib/lib.es6.d.ts +21 -0
  938. package/dist/lib/typescript/lib/lib.esnext.array.d.ts +33 -0
  939. package/dist/lib/typescript/lib/lib.esnext.collection.d.ts +47 -0
  940. package/dist/lib/typescript/lib/lib.esnext.d.ts +27 -0
  941. package/dist/lib/typescript/lib/lib.esnext.date.d.ts +21 -0
  942. package/dist/lib/typescript/lib/lib.esnext.decorators.d.ts +26 -0
  943. package/dist/lib/typescript/lib/lib.esnext.disposable.d.ts +191 -0
  944. package/dist/lib/typescript/lib/lib.esnext.error.d.ts +22 -0
  945. package/dist/lib/typescript/lib/lib.esnext.full.d.ts +22 -0
  946. package/dist/lib/typescript/lib/lib.esnext.intl.d.ts +107 -0
  947. package/dist/lib/typescript/lib/lib.esnext.sharedmemory.d.ts +23 -0
  948. package/dist/lib/typescript/lib/lib.esnext.temporal.d.ts +485 -0
  949. package/dist/lib/typescript/lib/lib.esnext.typedarrays.d.ts +90 -0
  950. package/dist/lib/typescript/lib/lib.scripthost.d.ts +320 -0
  951. package/dist/lib/typescript/lib/lib.webworker.asynciterable.d.ts +18 -0
  952. package/dist/lib/typescript/lib/lib.webworker.d.ts +15606 -0
  953. package/dist/lib/typescript/lib/lib.webworker.importscripts.d.ts +21 -0
  954. package/dist/lib/typescript/lib/lib.webworker.iterable.d.ts +18 -0
  955. package/dist/lib/typescript/lib/tsc +0 -0
  956. package/dist/lib/typescript/package.json +45 -0
  957. package/dist/lib/wasi/cli/wasi-paths.js +41 -0
  958. package/dist/lib/wasi/cli/wasi-runner.js +28 -0
  959. package/dist/lib/wasi/package.json +1 -0
  960. package/dist/lib/wasi/wasi-paths.js +25 -0
  961. package/package.json +22 -6
  962. package/README.md +0 -3
  963. package/index.js +0 -2
@@ -0,0 +1,1400 @@
1
+ /* The WHATWG URL slice (scr_runtime.h has the API contract): an immutable,
2
+ * refcounted URL value parsed once at construction, plus the file-URL
3
+ * bridge pair (fileURLToPath / pathToFileURL).
4
+ *
5
+ * The parser covers the WHATWG algorithm's common ground exactly — pinned
6
+ * against Node by the differential corpus:
7
+ * - scheme lowercasing; "Invalid URL" TypeError on schemeless input
8
+ * - special schemes (http/https/ws/wss/ftp/file): authority parsing with
9
+ * host lowercasing, default-port removal (leading zeros stripped),
10
+ * canonical bracketed IPv6 literals,
11
+ * backslash-as-slash, and any run of leading slashes tolerated
12
+ * (http:foo.com works); file: takes an authority only after exactly
13
+ * "//" (file:/x and file:x are host-less absolute paths, like Node)
14
+ * - dot-segment removal with %2e equivalence (case-insensitive), empty
15
+ * segments preserved (http://h//a stays //a)
16
+ * - percent-ENCODING of the WHATWG path/query/fragment/userinfo sets
17
+ * (space, quotes, angle brackets, braces, non-ASCII UTF-8 bytes, ...);
18
+ * existing %-sequences pass through verbatim (no decode, no case
19
+ * normalization — like Node)
20
+ * - non-special schemes: "//" parses an authority (host case preserved),
21
+ * a single "/" roots a normalized path, anything else is an OPAQUE
22
+ * path kept verbatim (data:text/plain,hi there)
23
+ *
24
+ * DOCUMENTED DIVERGENCES (SEMANTICS.md): non-ASCII and %-escaped hosts are
25
+ * rejected with "Invalid URL" (no IDNA/punycode), and opaque paths skip
26
+ * the spec's C0-encode pass (kept verbatim).
27
+ *
28
+ * Failures THROW catchable TypeErrors through the exception cell with
29
+ * Node's messages; callers are compiler-emitted pending checks. */
30
+ #include "scr_runtime.h"
31
+ #include "scr_url_internal.h"
32
+
33
+ #include <stdio.h>
34
+ #include <stdlib.h>
35
+ #include <string.h>
36
+ #include <unistd.h>
37
+ #ifdef _WIN32
38
+ #include <winsock2.h>
39
+ #include <ws2tcpip.h>
40
+ #else
41
+ #include <arpa/inet.h>
42
+ #endif
43
+
44
+ ScrUrl *scr_url_retain(ScrUrl *u) {
45
+ if (u->rc != SIZE_MAX) u->rc++;
46
+ return u;
47
+ }
48
+
49
+ void scr_url_release(ScrUrl *u) {
50
+ if (!u || u->rc == SIZE_MAX) return;
51
+ if (--u->rc == 0) {
52
+ scr_str_release(u->scheme);
53
+ scr_str_release(u->userinfo);
54
+ scr_str_release(u->host);
55
+ scr_str_release(u->port);
56
+ scr_str_release(u->path);
57
+ scr_str_release(u->query);
58
+ scr_str_release(u->fragment);
59
+ free(u);
60
+ }
61
+ }
62
+
63
+ void *scr_url_retain_v(void *p) { return scr_url_retain(p); }
64
+ void scr_url_release_v(void *p) { scr_url_release(p); }
65
+
66
+ /* ── a tiny growable byte buffer (mirrors scr_path.c's) ──────────────── */
67
+
68
+ typedef struct {
69
+ char *data;
70
+ size_t len;
71
+ size_t cap;
72
+ } UrlBuf;
73
+
74
+ static void ub_init(UrlBuf *b) {
75
+ b->cap = 64;
76
+ b->len = 0;
77
+ b->data = malloc(b->cap);
78
+ if (!b->data) {
79
+ scr_trap("scriptc: out of memory\n");
80
+ }
81
+ }
82
+
83
+ static void ub_append(UrlBuf *b, const char *bytes, size_t n) {
84
+ if (b->len + n > b->cap) {
85
+ while (b->len + n > b->cap) b->cap *= 2;
86
+ char *grown = realloc(b->data, b->cap);
87
+ if (!grown) {
88
+ scr_trap("scriptc: out of memory\n");
89
+ }
90
+ b->data = grown;
91
+ }
92
+ memcpy(b->data + b->len, bytes, n);
93
+ b->len += n;
94
+ }
95
+
96
+ static void ub_push(UrlBuf *b, char c) { ub_append(b, &c, 1); }
97
+
98
+ static ScrStr *ub_take(UrlBuf *b) {
99
+ ScrStr *s = scr_str_new(b->data, b->len);
100
+ free(b->data);
101
+ return s;
102
+ }
103
+
104
+ /* WHATWG's IPv6 serializer: lowercase hexadecimal with the first longest
105
+ * run of two-or-more zero pieces compressed. inet_pton supplies the parser,
106
+ * while serializing the eight pieces here also avoids the platform-specific
107
+ * dotted-decimal spelling inet_ntop uses for IPv4-mapped addresses. */
108
+ static bool ub_append_ipv6(UrlBuf *out, const char *raw, size_t len) {
109
+ char *text = malloc(len + 1);
110
+ if (!text) scr_trap("scriptc: out of memory\n");
111
+ memcpy(text, raw, len);
112
+ text[len] = '\0';
113
+ struct in6_addr address;
114
+ bool valid = inet_pton(AF_INET6, text, &address) == 1;
115
+ free(text);
116
+ if (!valid) return false;
117
+
118
+ const unsigned char *bytes = (const unsigned char *)&address;
119
+ uint16_t pieces[8];
120
+ for (size_t i = 0; i < 8; i++) {
121
+ pieces[i] = (uint16_t)(((uint16_t)bytes[i * 2] << 8) |
122
+ bytes[i * 2 + 1]);
123
+ }
124
+ size_t best_start = 0;
125
+ size_t best_len = 0;
126
+ for (size_t i = 0; i < 8;) {
127
+ if (pieces[i] != 0) {
128
+ i++;
129
+ continue;
130
+ }
131
+ size_t start = i;
132
+ while (i < 8 && pieces[i] == 0) i++;
133
+ size_t run = i - start;
134
+ if (run > best_len) {
135
+ best_start = start;
136
+ best_len = run;
137
+ }
138
+ }
139
+ if (best_len < 2) best_len = 0;
140
+
141
+ ub_push(out, '[');
142
+ bool first = true;
143
+ size_t compressed_end = best_start + best_len;
144
+ for (size_t i = 0; i < 8;) {
145
+ if (best_len > 0 && i == best_start) {
146
+ ub_append(out, "::", 2);
147
+ first = false;
148
+ i = compressed_end;
149
+ continue;
150
+ }
151
+ if (!first && (best_len == 0 || i != compressed_end)) ub_push(out, ':');
152
+ char hex[5];
153
+ int hex_len = snprintf(hex, sizeof hex, "%x", pieces[i]);
154
+ if (hex_len <= 0 || (size_t)hex_len >= sizeof hex) return false;
155
+ ub_append(out, hex, (size_t)hex_len);
156
+ first = false;
157
+ i++;
158
+ }
159
+ ub_push(out, ']');
160
+ return true;
161
+ }
162
+
163
+ /* ── percent-encode sets (WHATWG) ────────────────────────────────────── */
164
+
165
+ static bool enc_always(unsigned char c) {
166
+ return c < 0x20 || c == 0x7f || c >= 0x80; /* C0, DEL, non-ASCII */
167
+ }
168
+
169
+ static bool enc_fragment(unsigned char c) {
170
+ return enc_always(c) || c == ' ' || c == '"' || c == '<' || c == '>' || c == '`';
171
+ }
172
+
173
+ static bool enc_query(unsigned char c, bool special) {
174
+ return enc_always(c) || c == ' ' || c == '"' || c == '#' || c == '<' || c == '>' ||
175
+ (special && c == '\'');
176
+ }
177
+
178
+ static bool enc_path(unsigned char c) {
179
+ return enc_query(c, false) || c == '?' || c == '`' || c == '{' || c == '}';
180
+ }
181
+
182
+ static bool enc_userinfo(unsigned char c) {
183
+ return enc_path(c) || c == '/' || c == ':' || c == ';' || c == '=' || c == '@' ||
184
+ c == '[' || c == '\\' || c == ']' || c == '^' || c == '|';
185
+ }
186
+
187
+ static void ub_push_encoded(UrlBuf *b, unsigned char c, bool (*needs)(unsigned char)) {
188
+ if (needs(c)) {
189
+ char hex[4];
190
+ snprintf(hex, sizeof hex, "%%%02X", c);
191
+ ub_append(b, hex, 3);
192
+ } else {
193
+ ub_push(b, (char)c);
194
+ }
195
+ }
196
+
197
+ /* ── parsing ─────────────────────────────────────────────────────────── */
198
+
199
+ static void scr_url_throw_invalid(void) {
200
+ scr_throw_error_msg(SCR_ERR_TYPE, "Invalid URL", 11);
201
+ }
202
+
203
+ static bool is_special_scheme(const char *s, size_t len) {
204
+ static const char *specials[] = {"http", "https", "ws", "wss", "ftp", "file"};
205
+ for (size_t i = 0; i < 6; i++) {
206
+ if (strlen(specials[i]) == len && memcmp(specials[i], s, len) == 0) return true;
207
+ }
208
+ return false;
209
+ }
210
+
211
+ /* The scheme's default port as text, or NULL. */
212
+ static const char *default_port(const char *scheme, size_t len) {
213
+ if ((len == 4 && memcmp(scheme, "http", 4) == 0) || (len == 2 && memcmp(scheme, "ws", 2) == 0)) {
214
+ return "80";
215
+ }
216
+ if ((len == 5 && memcmp(scheme, "https", 5) == 0) || (len == 3 && memcmp(scheme, "wss", 3) == 0)) {
217
+ return "443";
218
+ }
219
+ if (len == 3 && memcmp(scheme, "ftp", 3) == 0) return "21";
220
+ return NULL;
221
+ }
222
+
223
+ static bool seg_is_dot(const char *s, size_t len) {
224
+ if (len == 1 && s[0] == '.') return true;
225
+ return len == 3 && s[0] == '%' && s[1] == '2' && (s[2] == 'e' || s[2] == 'E');
226
+ }
227
+
228
+ static bool seg_is_dotdot(const char *s, size_t len) {
229
+ if (len == 2) return seg_is_dot(s, 1) && seg_is_dot(s + 1, 1);
230
+ if (len == 4) {
231
+ return (seg_is_dot(s, 1) && seg_is_dot(s + 1, 3)) || (seg_is_dot(s, 3) && seg_is_dot(s + 3, 1));
232
+ }
233
+ return len == 6 && seg_is_dot(s, 3) && seg_is_dot(s + 3, 3);
234
+ }
235
+
236
+ /* Rooted-path parse with WHATWG dot-segment handling: `raw` is everything
237
+ * after the authority (or after the scheme's slashes), '?'/'#' excluded.
238
+ * Backslashes act as slashes iff `special`. Output starts with '/' for
239
+ * every non-empty result; empty stays empty (git://host has path ""). */
240
+ static bool url_drive_letter(const char *raw, size_t len) {
241
+ return len == 2 && ((raw[0] >= 'a' && raw[0] <= 'z') ||
242
+ (raw[0] >= 'A' && raw[0] <= 'Z')) &&
243
+ (raw[1] == ':' || raw[1] == '|');
244
+ }
245
+
246
+ static ScrStr *parse_rooted_path_mode(const char *raw, size_t len, bool special, bool file) {
247
+ if (len == 0) return scr_str_new("", 0); /* no path at all (git://host) */
248
+ /* Collected segment list: one output buffer + an index of segment start
249
+ * offsets (popping a ".." truncates to the previous start). */
250
+ UrlBuf out;
251
+ ub_init(&out);
252
+ size_t seg_starts_cap = 8, seg_count = 0;
253
+ size_t *seg_starts = malloc(seg_starts_cap * sizeof(size_t));
254
+ if (!seg_starts) {
255
+ scr_trap("scriptc: out of memory\n");
256
+ }
257
+ size_t i = 0;
258
+ /* One leading separator opens the first segment (rooted). */
259
+ if (i < len && (raw[i] == '/' || (special && raw[i] == '\\'))) i++;
260
+ size_t seg_begin = i;
261
+ for (;; i++) {
262
+ bool at_end = i >= len;
263
+ bool is_sep = !at_end && (raw[i] == '/' || (special && raw[i] == '\\'));
264
+ if (!at_end && !is_sep) continue;
265
+ const char *seg = raw + seg_begin;
266
+ size_t seg_len = i - seg_begin;
267
+ if (seg_is_dotdot(seg, seg_len)) {
268
+ if (seg_count > 0 && !(file && seg_count == 1 && url_drive_letter(out.data, out.len))) {
269
+ seg_count--;
270
+ out.len = seg_starts[seg_count];
271
+ }
272
+ if (at_end) {
273
+ /* Terminal "..": the popped directory's slot stays as an empty
274
+ * segment ("/a/.." → "/"). */
275
+ if (seg_count == seg_starts_cap) {
276
+ seg_starts_cap *= 2;
277
+ seg_starts = realloc(seg_starts, seg_starts_cap * sizeof(size_t));
278
+ if (!seg_starts) scr_trap("scriptc: out of memory\n");
279
+ }
280
+ seg_starts[seg_count++] = out.len;
281
+ }
282
+ } else if (seg_is_dot(seg, seg_len)) {
283
+ if (at_end) {
284
+ if (seg_count == seg_starts_cap) {
285
+ seg_starts_cap *= 2;
286
+ seg_starts = realloc(seg_starts, seg_starts_cap * sizeof(size_t));
287
+ if (!seg_starts) scr_trap("scriptc: out of memory\n");
288
+ }
289
+ seg_starts[seg_count++] = out.len;
290
+ }
291
+ } else {
292
+ if (seg_count == seg_starts_cap) {
293
+ seg_starts_cap *= 2;
294
+ seg_starts = realloc(seg_starts, seg_starts_cap * sizeof(size_t));
295
+ if (!seg_starts) {
296
+ scr_trap("scriptc: out of memory\n");
297
+ }
298
+ }
299
+ seg_starts[seg_count++] = out.len;
300
+ for (size_t j = 0; j < seg_len; j++) {
301
+ const char c = file && seg_count == 1 && url_drive_letter(seg, seg_len) && j == 1 ? ':' : seg[j];
302
+ ub_push_encoded(&out, (unsigned char)c, enc_path);
303
+ }
304
+ }
305
+ if (at_end) break;
306
+ seg_begin = i + 1;
307
+ }
308
+ /* Serialize: "/" + segment for each. */
309
+ UrlBuf ser;
310
+ ub_init(&ser);
311
+ for (size_t s = 0; s < seg_count; s++) {
312
+ size_t end = s + 1 < seg_count ? seg_starts[s + 1] : out.len;
313
+ ub_push(&ser, '/');
314
+ ub_append(&ser, out.data + seg_starts[s], end - seg_starts[s]);
315
+ }
316
+ free(out.data);
317
+ free(seg_starts);
318
+ return ub_take(&ser);
319
+ }
320
+
321
+ static ScrStr *parse_rooted_path(const char *raw, size_t len, bool special) {
322
+ return parse_rooted_path_mode(raw, len, special, false);
323
+ }
324
+
325
+ /* Parses `authority` (between the slashes and the path/query/fragment):
326
+ * [userinfo@]host[:port]. Returns false (throws) on invalid input. */
327
+ static bool parse_authority(const char *raw, size_t len, bool special, bool is_file,
328
+ const char *scheme, size_t scheme_len,
329
+ ScrStr **userinfo, ScrStr **host, ScrStr **port) {
330
+ /* Userinfo: up to the LAST '@'. */
331
+ long at = -1;
332
+ for (size_t i = 0; i < len; i++) {
333
+ if (raw[i] == '@') at = (long)i;
334
+ }
335
+ UrlBuf ub;
336
+ ub_init(&ub);
337
+ if (at >= 0) {
338
+ /* The FIRST ':' separates user from password and stays verbatim;
339
+ * every other byte encodes with the userinfo set. */
340
+ bool seen_colon = false;
341
+ for (long i = 0; i < at; i++) {
342
+ if (raw[i] == ':' && !seen_colon) {
343
+ seen_colon = true;
344
+ ub_push(&ub, ':');
345
+ } else {
346
+ ub_push_encoded(&ub, (unsigned char)raw[i], enc_userinfo);
347
+ }
348
+ }
349
+ }
350
+ *userinfo = ub_take(&ub);
351
+ /* An empty password is omitted from the serialized credentials. When
352
+ * both username and password are empty, the authority has no userinfo. */
353
+ if ((*userinfo)->len > 0 && (*userinfo)->data[(*userinfo)->len - 1] == ':') {
354
+ ScrStr *canonical = scr_str_new((*userinfo)->data, (*userinfo)->len - 1);
355
+ scr_str_release(*userinfo);
356
+ *userinfo = canonical;
357
+ }
358
+ const char *hp = at >= 0 ? raw + at + 1 : raw;
359
+ size_t hp_len = at >= 0 ? len - (size_t)at - 1 : len;
360
+ /* host[:port], with IPv6 literals bracketed per WHATWG. */
361
+ long colon = -1;
362
+ size_t host_len = hp_len;
363
+ bool ipv6 = hp_len > 0 && hp[0] == '[';
364
+ size_t ipv6_end = 0;
365
+ if (ipv6) {
366
+ while (ipv6_end < hp_len && hp[ipv6_end] != ']') ipv6_end++;
367
+ if (ipv6_end == hp_len || ipv6_end == 1) return false;
368
+ host_len = ipv6_end + 1;
369
+ if (host_len < hp_len) {
370
+ if (hp[host_len] != ':') return false;
371
+ colon = (long)host_len;
372
+ }
373
+ } else {
374
+ for (size_t i = 0; i < hp_len; i++) {
375
+ if (hp[i] == ':') colon = (long)i;
376
+ }
377
+ host_len = colon >= 0 ? (size_t)colon : hp_len;
378
+ }
379
+ /* Validate + lowercase (special) the host. Divergence: non-ASCII and
380
+ * %-escapes (IDNA territory) are rejected outright. */
381
+ UrlBuf hb;
382
+ ub_init(&hb);
383
+ if (ipv6) {
384
+ if (!ub_append_ipv6(&hb, hp + 1, ipv6_end - 1)) {
385
+ free(hb.data);
386
+ return false;
387
+ }
388
+ } else {
389
+ for (size_t i = 0; i < host_len; i++) {
390
+ unsigned char c = (unsigned char)hp[i];
391
+ if (c >= 0x80 || c == '%' || c == ':' || c == '[' || c == ']' ||
392
+ c <= 0x20 || c == '#' || c == '/' || c == '<' || c == '>' ||
393
+ c == '?' || c == '@' || c == '\\' || c == '^' || c == '|') {
394
+ free(hb.data);
395
+ return false;
396
+ }
397
+ if (special && c >= 'A' && c <= 'Z') {
398
+ c = (unsigned char)(c - 'A' + 'a');
399
+ }
400
+ ub_push(&hb, (char)c);
401
+ }
402
+ }
403
+ /* file: "localhost" normalizes to "" at parse time (Node). */
404
+ if (is_file && hb.len == 9 && memcmp(hb.data, "localhost", 9) == 0) hb.len = 0;
405
+ if (hb.len == 0 && special && !is_file) {
406
+ free(hb.data);
407
+ return false; /* http:// — special non-file needs a host */
408
+ }
409
+ *host = ub_take(&hb);
410
+ /* Port: digits only, leading zeros stripped, defaults dropped. */
411
+ UrlBuf pb;
412
+ ub_init(&pb);
413
+ if (colon >= 0) {
414
+ const char *ps = hp + colon + 1;
415
+ size_t ps_len = hp_len - (size_t)colon - 1;
416
+ size_t start = 0;
417
+ while (start < ps_len - (ps_len > 0 ? 1 : 0) && ps[start] == '0') start++;
418
+ long value = 0;
419
+ bool any = false;
420
+ for (size_t i = 0; i < ps_len; i++) {
421
+ if (ps[i] < '0' || ps[i] > '9') {
422
+ free(pb.data);
423
+ return false;
424
+ }
425
+ }
426
+ for (size_t i = start; i < ps_len; i++) {
427
+ value = value * 10 + (ps[i] - '0');
428
+ any = true;
429
+ if (value > 65535) {
430
+ free(pb.data);
431
+ return false;
432
+ }
433
+ }
434
+ if (any && value != 0) {
435
+ char digits[8];
436
+ int dlen = snprintf(digits, sizeof digits, "%ld", value);
437
+ const char *dflt = default_port(scheme, scheme_len);
438
+ if (!(dflt && strlen(dflt) == (size_t)dlen && memcmp(dflt, digits, (size_t)dlen) == 0)) {
439
+ ub_append(&pb, digits, (size_t)dlen);
440
+ }
441
+ } else if (any) {
442
+ /* Port 0 is a real (non-default) port. */
443
+ ub_push(&pb, '0');
444
+ }
445
+ }
446
+ *port = ub_take(&pb);
447
+ return true;
448
+ }
449
+
450
+ /* The full constructor-path parser. Returns NULL after throwing. */
451
+ ScrUrl *scr_url_new(ScrStr *input) {
452
+ /* WHATWG pre-processing: trim leading/trailing C0-or-space, strip every
453
+ * TAB/LF/CR. */
454
+ size_t raw_len = input->len;
455
+ const char *raw = input->data;
456
+ size_t b = 0, e = raw_len;
457
+ while (b < e && (unsigned char)raw[b] <= 0x20) b++;
458
+ while (e > b && (unsigned char)raw[e - 1] <= 0x20) e--;
459
+ char *buf = malloc(e - b + 1);
460
+ if (!buf) {
461
+ scr_trap("scriptc: out of memory\n");
462
+ }
463
+ size_t len = 0;
464
+ for (size_t i = b; i < e; i++) {
465
+ char c = raw[i];
466
+ if (c == '\t' || c == '\n' || c == '\r') continue;
467
+ buf[len++] = c;
468
+ }
469
+
470
+ /* Scheme: [A-Za-z][A-Za-z0-9+\-.]* ":" — lowercased. */
471
+ size_t sl = 0;
472
+ if (len > 0 && ((buf[0] >= 'a' && buf[0] <= 'z') || (buf[0] >= 'A' && buf[0] <= 'Z'))) {
473
+ sl = 1;
474
+ while (sl < len &&
475
+ ((buf[sl] >= 'a' && buf[sl] <= 'z') || (buf[sl] >= 'A' && buf[sl] <= 'Z') ||
476
+ (buf[sl] >= '0' && buf[sl] <= '9') || buf[sl] == '+' || buf[sl] == '-' ||
477
+ buf[sl] == '.')) {
478
+ sl++;
479
+ }
480
+ }
481
+ if (sl == 0 || sl >= len || buf[sl] != ':') {
482
+ free(buf);
483
+ scr_url_throw_invalid();
484
+ return NULL;
485
+ }
486
+ for (size_t i = 0; i < sl; i++) {
487
+ if (buf[i] >= 'A' && buf[i] <= 'Z') buf[i] = (char)(buf[i] - 'A' + 'a');
488
+ }
489
+ const char *scheme = buf;
490
+ bool special = is_special_scheme(scheme, sl);
491
+ bool is_file = sl == 4 && memcmp(scheme, "file", 4) == 0;
492
+
493
+ const char *rest = buf + sl + 1;
494
+ size_t rest_len = len - sl - 1;
495
+
496
+ /* Split off fragment, then query (they never contain '#'/'?' rules we
497
+ * need beyond this). */
498
+ size_t hash = rest_len;
499
+ for (size_t i = 0; i < rest_len; i++) {
500
+ if (rest[i] == '#') {
501
+ hash = i;
502
+ break;
503
+ }
504
+ }
505
+ size_t qmark = hash;
506
+ for (size_t i = 0; i < hash; i++) {
507
+ if (rest[i] == '?') {
508
+ qmark = i;
509
+ break;
510
+ }
511
+ }
512
+ const char *body = rest;
513
+ size_t body_len = qmark;
514
+
515
+ ScrStr *userinfo = NULL, *host = NULL, *port = NULL, *path = NULL;
516
+ bool has_authority = false;
517
+
518
+ if (special) {
519
+ size_t slashes = 0;
520
+ while (slashes < body_len && (body[slashes] == '/' || body[slashes] == '\\')) slashes++;
521
+ bool file_authority = is_file && slashes == 2;
522
+ bool nonfile = !is_file;
523
+ if (file_authority || nonfile) {
524
+ /* Authority: after the slashes (file: exactly two), up to the next
525
+ * separator. */
526
+ size_t astart = is_file ? 2 : slashes;
527
+ size_t aend = astart;
528
+ while (aend < body_len && body[aend] != '/' && body[aend] != '\\') aend++;
529
+ size_t path_start = aend;
530
+ if (is_file && url_drive_letter(body + astart, aend - astart)) {
531
+ userinfo = scr_str_new("", 0);
532
+ host = scr_str_new("", 0);
533
+ port = scr_str_new("", 0);
534
+ path_start = astart - 1;
535
+ } else if (!parse_authority(body + astart, aend - astart, special, is_file, scheme, sl,
536
+ &userinfo, &host, &port)) {
537
+ scr_str_release(userinfo);
538
+ scr_str_release(host);
539
+ scr_str_release(port);
540
+ free(buf);
541
+ scr_url_throw_invalid();
542
+ return NULL;
543
+ }
544
+ has_authority = true;
545
+ path = parse_rooted_path_mode(body + path_start, body_len - path_start, special, is_file);
546
+ if (path->len == 0) {
547
+ scr_str_release(path);
548
+ path = scr_str_new("/", 1); /* special URLs never have empty paths */
549
+ }
550
+ } else {
551
+ /* file: with 0, 1, or 3+ slashes — host-less absolute path. */
552
+ userinfo = scr_str_new("", 0);
553
+ host = scr_str_new("", 0);
554
+ port = scr_str_new("", 0);
555
+ has_authority = true; /* file: always serializes with "//" */
556
+ size_t skip = slashes > 2 ? 2 : slashes; /* keep surplus slashes as path */
557
+ const char *p = body + skip;
558
+ size_t plen = body_len - skip;
559
+ /* Root the path: parse_rooted_path treats one leading sep as the
560
+ * root; prepend one if absent so "tmp" parses as "/tmp". */
561
+ if (plen > 0 && (p[0] == '/' || p[0] == '\\')) {
562
+ path = parse_rooted_path_mode(p, plen, special, true);
563
+ } else {
564
+ UrlBuf rb;
565
+ ub_init(&rb);
566
+ ub_push(&rb, '/');
567
+ ub_append(&rb, p, plen);
568
+ ScrStr *tmp = ub_take(&rb);
569
+ path = parse_rooted_path_mode(tmp->data, tmp->len, special, true);
570
+ scr_str_release(tmp);
571
+ }
572
+ if (path->len == 0) {
573
+ scr_str_release(path);
574
+ path = scr_str_new("/", 1);
575
+ }
576
+ }
577
+ } else if (body_len >= 2 && body[0] == '/' && body[1] == '/') {
578
+ /* Non-special authority (git://host/...): host case preserved. */
579
+ size_t aend = 2;
580
+ while (aend < body_len && body[aend] != '/') aend++;
581
+ if (!parse_authority(body + 2, aend - 2, false, false, scheme, sl, &userinfo, &host, &port)) {
582
+ scr_str_release(userinfo);
583
+ scr_str_release(host);
584
+ scr_str_release(port);
585
+ free(buf);
586
+ scr_url_throw_invalid();
587
+ return NULL;
588
+ }
589
+ has_authority = true;
590
+ path = parse_rooted_path(body + aend, body_len - aend, false);
591
+ } else if (body_len >= 1 && body[0] == '/') {
592
+ /* Rooted path, no authority (foo:/bar/../x → foo:/x). */
593
+ userinfo = scr_str_new("", 0);
594
+ host = scr_str_new("", 0);
595
+ port = scr_str_new("", 0);
596
+ path = parse_rooted_path(body, body_len, false);
597
+ } else {
598
+ /* Opaque path — kept verbatim (divergence: the spec C0-encodes). */
599
+ userinfo = scr_str_new("", 0);
600
+ host = scr_str_new("", 0);
601
+ port = scr_str_new("", 0);
602
+ path = scr_str_new(body, body_len);
603
+ }
604
+
605
+ /* Query and fragment, encoded and stored WITH their sigils. */
606
+ UrlBuf qb;
607
+ ub_init(&qb);
608
+ if (qmark < hash) {
609
+ ub_push(&qb, '?');
610
+ for (size_t i = qmark + 1; i < hash; i++) {
611
+ unsigned char c = (unsigned char)rest[i];
612
+ if (enc_query(c, special)) {
613
+ char hex[4];
614
+ snprintf(hex, sizeof hex, "%%%02X", c);
615
+ ub_append(&qb, hex, 3);
616
+ } else {
617
+ ub_push(&qb, (char)c);
618
+ }
619
+ }
620
+ }
621
+ ScrStr *query = ub_take(&qb);
622
+ UrlBuf fb;
623
+ ub_init(&fb);
624
+ if (hash < rest_len) {
625
+ ub_push(&fb, '#');
626
+ for (size_t i = hash + 1; i < rest_len; i++) {
627
+ ub_push_encoded(&fb, (unsigned char)rest[i], enc_fragment);
628
+ }
629
+ }
630
+ ScrStr *fragment = ub_take(&fb);
631
+
632
+ ScrStr *scheme_str = scr_str_new(scheme, sl);
633
+ free(buf);
634
+
635
+ ScrUrl *u = malloc(sizeof(ScrUrl));
636
+ if (!u) {
637
+ scr_trap("scriptc: out of memory\n");
638
+ }
639
+ u->rc = 1;
640
+ u->scheme = scheme_str;
641
+ u->userinfo = userinfo;
642
+ u->host = host;
643
+ u->port = port;
644
+ u->path = path;
645
+ u->query = query;
646
+ u->fragment = fragment;
647
+ u->has_authority = has_authority;
648
+ u->sp_cache = NULL;
649
+ return u;
650
+ }
651
+
652
+ /* Resolve a relative reference using the parsed base's component boundaries.
653
+ * Reuse the absolute parser for encoding, dot segments, authority validation,
654
+ * and canonicalization. The base is parsed even for an absolute input: an
655
+ * invalid supplied base is a constructor error in Node. */
656
+ ScrUrl *scr_url_new_base(ScrStr *input, ScrStr *base_input) {
657
+ ScrUrl *base = scr_url_new(base_input);
658
+ if (!base) return NULL;
659
+ size_t begin = 0, end = input->len;
660
+ while (begin < end && (unsigned char)input->data[begin] <= 0x20) begin++;
661
+ while (end > begin && (unsigned char)input->data[end - 1] <= 0x20) end--;
662
+ UrlBuf cleaned;
663
+ ub_init(&cleaned);
664
+ for (size_t i = begin; i < end; i++) {
665
+ char c = input->data[i];
666
+ if (c != '\t' && c != '\n' && c != '\r') ub_push(&cleaned, c);
667
+ }
668
+ const char *raw = cleaned.data;
669
+ size_t len = cleaned.len;
670
+ size_t scheme_len = 0;
671
+ if (len && ((raw[0] >= 'a' && raw[0] <= 'z') || (raw[0] >= 'A' && raw[0] <= 'Z'))) {
672
+ size_t i = 1;
673
+ while (i < len && ((raw[i] >= 'a' && raw[i] <= 'z') ||
674
+ (raw[i] >= 'A' && raw[i] <= 'Z') || (raw[i] >= '0' && raw[i] <= '9') ||
675
+ raw[i] == '+' || raw[i] == '-' || raw[i] == '.')) i++;
676
+ if (i < len && raw[i] == ':') scheme_len = i;
677
+ }
678
+ bool special = is_special_scheme(base->scheme->data, base->scheme->len);
679
+ bool file = base->scheme->len == 4 && memcmp(base->scheme->data, "file", 4) == 0;
680
+ bool same_scheme = scheme_len == base->scheme->len;
681
+ for (size_t i = 0; same_scheme && i < scheme_len; i++) {
682
+ char c = raw[i];
683
+ if (c >= 'A' && c <= 'Z') c = (char)(c - 'A' + 'a');
684
+ if (c != base->scheme->data[i]) same_scheme = false;
685
+ }
686
+ ScrUrl *result = NULL;
687
+ if (scheme_len && (!same_scheme || !special)) {
688
+ result = scr_url_new(input);
689
+ goto done;
690
+ }
691
+ if (scheme_len) {
692
+ raw += scheme_len + 1;
693
+ len -= scheme_len + 1;
694
+ }
695
+ bool slash = len && (raw[0] == '/' || (special && raw[0] == '\\'));
696
+ bool authority = slash && len > 1 && (raw[1] == '/' || (special && raw[1] == '\\'));
697
+ bool opaque = !base->has_authority && (!base->path->len || base->path->data[0] != '/');
698
+ if (opaque && (!len || raw[0] != '#')) {
699
+ scr_url_throw_invalid();
700
+ goto done;
701
+ }
702
+ UrlBuf absolute;
703
+ ub_init(&absolute);
704
+ ub_append(&absolute, base->scheme->data, base->scheme->len);
705
+ ub_push(&absolute, ':');
706
+ if (authority) {
707
+ ub_append(&absolute, raw, len);
708
+ } else {
709
+ size_t path_len = 0;
710
+ while (path_len < len && raw[path_len] != '?' && raw[path_len] != '#') path_len++;
711
+ bool drive = file && path_len >= 2 && url_drive_letter(raw, 2) &&
712
+ (path_len == 2 || raw[2] == '/' || raw[2] == '\\');
713
+ if (base->has_authority) {
714
+ ub_append(&absolute, "//", 2);
715
+ if (!drive) {
716
+ if (base->userinfo->len) {
717
+ ub_append(&absolute, base->userinfo->data, base->userinfo->len);
718
+ ub_push(&absolute, '@');
719
+ }
720
+ ub_append(&absolute, base->host->data, base->host->len);
721
+ if (base->port->len) {
722
+ ub_push(&absolute, ':');
723
+ ub_append(&absolute, base->port->data, base->port->len);
724
+ }
725
+ }
726
+ }
727
+ if (!path_len) {
728
+ ub_append(&absolute, base->path->data, base->path->len);
729
+ if (!len || raw[0] == '#') ub_append(&absolute, base->query->data, base->query->len);
730
+ } else if (drive) {
731
+ ub_push(&absolute, '/');
732
+ } else if (slash) {
733
+ // A rooted file reference retains its base drive unless it supplies
734
+ // a replacement drive. Dot segments must never pop that drive root.
735
+ bool replacement_drive = path_len >= 3 && url_drive_letter(raw + 1, 2) &&
736
+ (path_len == 3 || raw[3] == '/' || raw[3] == '\\');
737
+ if (file && !replacement_drive && base->path->len >= 3 &&
738
+ url_drive_letter(base->path->data + 1, 2)) {
739
+ ub_append(&absolute, base->path->data, 3);
740
+ }
741
+ } else {
742
+ size_t directory = base->path->len;
743
+ while (directory && base->path->data[directory - 1] != '/') directory--;
744
+ if (directory) ub_append(&absolute, base->path->data, directory);
745
+ else ub_push(&absolute, '/');
746
+ }
747
+ ub_append(&absolute, raw, len);
748
+ }
749
+ ScrStr *resolved = ub_take(&absolute);
750
+ result = scr_url_new(resolved);
751
+ scr_str_release(resolved);
752
+ done:
753
+ free(cleaned.data);
754
+ scr_url_release(base);
755
+ return result;
756
+ }
757
+
758
+ ScrStr *scr_url_protocol(ScrUrl *u) {
759
+ UrlBuf b;
760
+ ub_init(&b);
761
+ ub_append(&b, u->scheme->data, u->scheme->len);
762
+ ub_push(&b, ':');
763
+ return ub_take(&b);
764
+ }
765
+
766
+ ScrStr *scr_url_pathname(ScrUrl *u) { return scr_str_retain(u->path); }
767
+
768
+ /* WHATWG host getter: host[:port] — the port only when non-default (the
769
+ * parser already stripped defaults), "" for authority-less URLs. The
770
+ * normalized form findRoute-style authority compares want (lowercased
771
+ * host, no default :443/:80). */
772
+ ScrStr *scr_url_host(ScrUrl *u) {
773
+ if (u->port->len == 0) return scr_str_retain(u->host);
774
+ UrlBuf b;
775
+ ub_init(&b);
776
+ ub_append(&b, u->host->data, u->host->len);
777
+ ub_push(&b, ':');
778
+ ub_append(&b, u->port->data, u->port->len);
779
+ return ub_take(&b);
780
+ }
781
+
782
+ /* WHATWG hostname getter: the stored port-less host verbatim ("" for
783
+ * authority-less URLs); IPv6 literals retain their brackets. */
784
+ ScrStr *scr_url_hostname(ScrUrl *u) { return scr_str_retain(u->host); }
785
+
786
+ ScrStr *scr_url_port(ScrUrl *u) { return scr_str_retain(u->port); }
787
+
788
+ /* WHATWG origin is opaque for file and non-special schemes. A blob URL
789
+ * inherits the origin of an embedded http(s) URL when its path parses. */
790
+ ScrStr *scr_url_origin(ScrUrl *u) {
791
+ const char *scheme = u->scheme->data;
792
+ size_t len = u->scheme->len;
793
+ if (len == 4 && memcmp(scheme, "blob", 4) == 0) {
794
+ ScrUrl *inner = scr_url_new(u->path);
795
+ if (!inner) {
796
+ scr_exc_clear();
797
+ return scr_str_new("null", 4);
798
+ }
799
+ bool http = (inner->scheme->len == 4 && memcmp(inner->scheme->data, "http", 4) == 0) ||
800
+ (inner->scheme->len == 5 && memcmp(inner->scheme->data, "https", 5) == 0);
801
+ ScrStr *result = http ? scr_url_origin(inner) : scr_str_new("null", 4);
802
+ scr_url_release(inner);
803
+ return result;
804
+ }
805
+ if (!((len == 4 && memcmp(scheme, "http", 4) == 0) ||
806
+ (len == 5 && memcmp(scheme, "https", 5) == 0) ||
807
+ (len == 2 && memcmp(scheme, "ws", 2) == 0) ||
808
+ (len == 3 && memcmp(scheme, "wss", 3) == 0) ||
809
+ (len == 3 && memcmp(scheme, "ftp", 3) == 0))) {
810
+ return scr_str_new("null", 4);
811
+ }
812
+ UrlBuf b;
813
+ ub_init(&b);
814
+ ub_append(&b, scheme, len);
815
+ ub_append(&b, "://", 3);
816
+ ub_append(&b, u->host->data, u->host->len);
817
+ if (u->port->len > 0) {
818
+ ub_push(&b, ':');
819
+ ub_append(&b, u->port->data, u->port->len);
820
+ }
821
+ return ub_take(&b);
822
+ }
823
+
824
+ ScrStr *scr_url_username(ScrUrl *u) {
825
+ const char *separator = memchr(u->userinfo->data, ':', u->userinfo->len);
826
+ size_t len = separator ? (size_t)(separator - u->userinfo->data) : u->userinfo->len;
827
+ return scr_str_new(u->userinfo->data, len);
828
+ }
829
+
830
+ ScrStr *scr_url_password(ScrUrl *u) {
831
+ const char *separator = memchr(u->userinfo->data, ':', u->userinfo->len);
832
+ if (!separator) return scr_str_new("", 0);
833
+ const char *start = separator + 1;
834
+ return scr_str_new(start, u->userinfo->len - (size_t)(start - u->userinfo->data));
835
+ }
836
+
837
+ ScrStr *scr_url_href(ScrUrl *u) {
838
+ UrlBuf b;
839
+ ub_init(&b);
840
+ ub_append(&b, u->scheme->data, u->scheme->len);
841
+ ub_push(&b, ':');
842
+ if (u->has_authority) {
843
+ ub_append(&b, "//", 2);
844
+ if (u->userinfo->len > 0) {
845
+ ub_append(&b, u->userinfo->data, u->userinfo->len);
846
+ ub_push(&b, '@');
847
+ }
848
+ ub_append(&b, u->host->data, u->host->len);
849
+ if (u->port->len > 0) {
850
+ ub_push(&b, ':');
851
+ ub_append(&b, u->port->data, u->port->len);
852
+ }
853
+ }
854
+ ub_append(&b, u->path->data, u->path->len);
855
+ ub_append(&b, u->query->data, u->query->len);
856
+ ub_append(&b, u->fragment->data, u->fragment->len);
857
+ return ub_take(&b);
858
+ }
859
+
860
+ /* ── the file-URL bridge ─────────────────────────────────────────────── */
861
+
862
+ static int hex_val(char c) {
863
+ if (c >= '0' && c <= '9') return c - '0';
864
+ if (c >= 'a' && c <= 'f') return c - 'a' + 10;
865
+ if (c >= 'A' && c <= 'F') return c - 'A' + 10;
866
+ return -1;
867
+ }
868
+
869
+ /* fileURLToPath over a parsed URL: Node's checks, Node's messages. The
870
+ * posix arm rejects hosts and keeps forward slashes; the win32 arm maps
871
+ * hosts to UNC \\host prefixes, flips separators, and demands a drive
872
+ * letter otherwise. The public wrappers below select by TARGET. */
873
+ static ScrStr *scr_url_to_path_impl(ScrUrl *u, bool win32) {
874
+ if (!(u->scheme->len == 4 && memcmp(u->scheme->data, "file", 4) == 0)) {
875
+ scr_throw_error_msg(SCR_ERR_TYPE, "The URL must be of scheme file", 30);
876
+ return NULL;
877
+ }
878
+ const char *p = u->path->data;
879
+ size_t len = u->path->len;
880
+ if (win32) {
881
+ /* Node scans the ENCODED pathname for %2f/%2F (/) and %5c/%5C (\). */
882
+ for (size_t n = 0; n + 1 < len; n++) {
883
+ if (p[n] != '%') continue;
884
+ char c1 = p[n + 1];
885
+ int third = (n + 2 < len ? (unsigned char)p[n + 2] : 0) | 0x20;
886
+ if ((c1 == '2' && third == 'f') || (c1 == '5' && third == 'c')) {
887
+ scr_throw_error_msg(SCR_ERR_TYPE,
888
+ "File URL path must not include encoded \\ or / characters", 56);
889
+ return NULL;
890
+ }
891
+ }
892
+ /* Encoded separators have already been refused, so decoding first and
893
+ * replacing the remaining literal slashes has Node's ordering. Use the
894
+ * strict decoder: malformed escapes and invalid UTF-8 throw URIError. */
895
+ ScrStr *decoded = scr_str_decode_uri_component(u->path);
896
+ if (!decoded) return NULL;
897
+ UrlBuf out;
898
+ ub_init(&out);
899
+ if (u->host->len > 0) {
900
+ /* A UNC path: \\host + pathname. (Node passes the hostname through
901
+ * domainToUnicode; this parser rejected non-ASCII/IDN hosts at
902
+ * construction, so the host is already plain ASCII.) */
903
+ ub_append(&out, "\\\\", 2);
904
+ ub_append(&out, u->host->data, u->host->len);
905
+ }
906
+ size_t path_start = out.len;
907
+ for (size_t i = 0; i < decoded->len; i++)
908
+ ub_push(&out, decoded->data[i] == '/' ? '\\' : decoded->data[i]);
909
+ scr_str_release(decoded);
910
+ if (u->host->len > 0) return ub_take(&out);
911
+ /* A local path requires a drive letter: pathname[1] in [a-zA-Z] and
912
+ * pathname[2] === ':' (both on the DECODED, backslashed pathname). */
913
+ size_t plen = out.len - path_start;
914
+ const char *pp = out.data + path_start;
915
+ int letter = (plen > 1 ? (unsigned char)pp[1] : 0) | 0x20;
916
+ char drive_sep = plen > 2 ? pp[2] : 0;
917
+ if (letter < 'a' || letter > 'z' || drive_sep != ':') {
918
+ free(out.data);
919
+ scr_throw_error_msg(SCR_ERR_TYPE, "File URL path must be absolute", 30);
920
+ return NULL;
921
+ }
922
+ /* pathname.slice(1): the leading backslash drops. */
923
+ ScrStr *s = scr_str_new(pp + 1, plen - 1);
924
+ free(out.data);
925
+ return s;
926
+ }
927
+ if (u->host->len > 0) {
928
+ /* Parse-time normalization already emptied "localhost". */
929
+ const char *plat =
930
+ #if defined(__APPLE__)
931
+ "darwin";
932
+ #elif defined(__linux__)
933
+ "linux";
934
+ #elif defined(_WIN32)
935
+ "win32";
936
+ #else
937
+ "posix";
938
+ #endif
939
+ char msg[96];
940
+ int mlen = snprintf(msg, sizeof msg, "File URL host must be \"localhost\" or empty on %s", plat);
941
+ scr_throw_error_msg(SCR_ERR_TYPE, msg, (size_t)mlen);
942
+ return NULL;
943
+ }
944
+ for (size_t i = 0; i < len; i++) {
945
+ if (p[i] == '%' && i + 2 < len) {
946
+ int hi = hex_val(p[i + 1]);
947
+ int lo = hex_val(p[i + 2]);
948
+ if (hi >= 0 && lo >= 0) {
949
+ unsigned char decoded = (unsigned char)((hi << 4) | lo);
950
+ if (decoded == '/') {
951
+ scr_throw_error_msg(SCR_ERR_TYPE,
952
+ "File URL path must not include encoded / characters", 51);
953
+ return NULL;
954
+ }
955
+ i += 2;
956
+ }
957
+ }
958
+ }
959
+ return scr_str_decode_uri_component(u->path);
960
+ }
961
+
962
+ /* The target's arm: Node on Windows takes the win32 branch of the same
963
+ * dispatch (`isWindows` there is this binary's _WIN32 here). */
964
+ ScrStr *scr_url_to_path(ScrUrl *u) {
965
+ #ifdef _WIN32
966
+ return scr_url_to_path_impl(u, true);
967
+ #else
968
+ return scr_url_to_path_impl(u, false);
969
+ #endif
970
+ }
971
+
972
+ /* The string-receiver form parses first (Node accepts URL strings). */
973
+ ScrStr *scr_url_str_to_path(ScrStr *input) {
974
+ ScrUrl *u = scr_url_new(input);
975
+ if (!u) return NULL; /* Invalid URL already thrown */
976
+ ScrStr *path = scr_url_to_path(u);
977
+ scr_url_release(u);
978
+ return path;
979
+ }
980
+
981
+ /* Assembles the file: URL value pathToFileURL returns (fields direct — no
982
+ * reparse). Takes ownership of host and encoded path. */
983
+ static ScrUrl *scr_url_new_file(ScrStr *host, ScrStr *encoded_path) {
984
+ ScrUrl *u = malloc(sizeof(ScrUrl));
985
+ if (!u) {
986
+ scr_trap("scriptc: out of memory\n");
987
+ }
988
+ u->rc = 1;
989
+ u->scheme = scr_str_new("file", 4);
990
+ u->userinfo = scr_str_new("", 0);
991
+ u->host = host;
992
+ u->port = scr_str_new("", 0);
993
+ u->path = encoded_path;
994
+ u->query = scr_str_new("", 0);
995
+ u->fragment = scr_str_new("", 0);
996
+ u->has_authority = true;
997
+ u->sp_cache = NULL;
998
+ return u;
999
+ }
1000
+
1001
+ /* util.inspect-style single-quoting for ERR_INVALID_ARG_VALUE's
1002
+ * "Received" clause ('\' and '\'' escape). */
1003
+ static void ub_push_inspected(UrlBuf *b, const char *s, size_t len) {
1004
+ ub_push(b, '\'');
1005
+ for (size_t i = 0; i < len; i++) {
1006
+ if (s[i] == '\\' || s[i] == '\'') ub_push(b, '\\');
1007
+ ub_push(b, s[i]);
1008
+ }
1009
+ ub_push(b, '\'');
1010
+ }
1011
+
1012
+ /* Node's ERR_INVALID_ARG_VALUE('path', value, reason) — a TypeError. */
1013
+ static void scr_url_throw_arg_value(const char *reason, ScrStr *value) {
1014
+ UrlBuf msg;
1015
+ ub_init(&msg);
1016
+ ub_append(&msg, "The argument 'path' ", 20);
1017
+ ub_append(&msg, reason, strlen(reason));
1018
+ ub_append(&msg, ". Received ", 11);
1019
+ ub_push_inspected(&msg, value->data, value->len);
1020
+ scr_throw_error_msg(SCR_ERR_TYPE, msg.data, msg.len);
1021
+ free(msg.data);
1022
+ }
1023
+
1024
+ /* Percent-encodes a raw filesystem path the way Node's
1025
+ * bindingUrl.pathToFileURL does, reusing the parser's rooted-path
1026
+ * machinery (WHATWG dot-segment removal with empty segments preserved,
1027
+ * backslash-as-slash when `backslash_sep`, the enc_path set): the bytes
1028
+ * Node encodes BEYOND that set ('%', '[', ']', '^', '|' — and '\\' when
1029
+ * it is a path byte rather than a separator) pre-encode here so the
1030
+ * parser passes them through. */
1031
+ static ScrStr *scr_url_encode_file_path(const char *raw, size_t len, bool backslash_sep) {
1032
+ UrlBuf pre;
1033
+ ub_init(&pre);
1034
+ for (size_t i = 0; i < len; i++) {
1035
+ unsigned char c = (unsigned char)raw[i];
1036
+ if (c == '%' || c == '[' || c == ']' || c == '^' || c == '|' ||
1037
+ (c == '\\' && !backslash_sep)) {
1038
+ char hex[4];
1039
+ snprintf(hex, sizeof hex, "%%%02X", c);
1040
+ ub_append(&pre, hex, 3);
1041
+ } else {
1042
+ ub_push(&pre, (char)c);
1043
+ }
1044
+ }
1045
+ ScrStr *encoded = parse_rooted_path(pre.data, pre.len, backslash_sep);
1046
+ free(pre.data);
1047
+ return encoded;
1048
+ }
1049
+
1050
+ /* pathToFileURL: resolve against the cwd (Node does), keep an
1051
+ * intentionally-trailing separator, percent-encode. The posix arm
1052
+ * %5C-encodes backslashes (valid path bytes there); the win32 arm
1053
+ * resolves through path.win32, flips separators, and routes UNC prefixes
1054
+ * (\\server\share, \\?\UNC\...) into the URL host — with WHATWG
1055
+ * dot-segment removal on the unresolved UNC remainder, exactly Node.
1056
+ * Throws only for the win32 UNC malformations (Node's
1057
+ * ERR_INVALID_ARG_VALUE TypeErrors). */
1058
+ static ScrUrl *scr_url_from_path_impl(ScrStr *path, bool win32) {
1059
+ ScrStr *resolved;
1060
+ if (win32) {
1061
+ bool is_unc = path->len >= 2 && path->data[0] == '\\' && path->data[1] == '\\';
1062
+ if (is_unc) {
1063
+ resolved = scr_str_retain(path);
1064
+ } else {
1065
+ ScrArr *pack = scr_arr_new(SCR_ELEM_STR, 1);
1066
+ scr_arr_push_ref(pack, scr_str_retain(path));
1067
+ resolved = scr_path_win32_resolve(pack);
1068
+ scr_arr_release(pack);
1069
+ }
1070
+ if (is_unc || (resolved->len >= 2 && resolved->data[0] == '\\' && resolved->data[1] == '\\')) {
1071
+ /* UNC path format: \\server\share\resource; an extended
1072
+ * \\?\UNC\ prefix is ignored. */
1073
+ bool extended = resolved->len >= 8 && memcmp(resolved->data, "\\\\?\\UNC\\", 8) == 0;
1074
+ size_t prefix = extended ? 8 : 2;
1075
+ long host_end = -1;
1076
+ for (size_t i = prefix; i < resolved->len; i++) {
1077
+ if (resolved->data[i] == '\\') {
1078
+ host_end = (long)i;
1079
+ break;
1080
+ }
1081
+ }
1082
+ if (host_end == -1) {
1083
+ scr_url_throw_arg_value("Missing UNC resource path", resolved);
1084
+ scr_str_release(resolved);
1085
+ return NULL;
1086
+ }
1087
+ if (host_end == 2) {
1088
+ scr_url_throw_arg_value("Empty UNC servername", resolved);
1089
+ scr_str_release(resolved);
1090
+ return NULL;
1091
+ }
1092
+ /* The URL host parser lowercases ASCII and TERMINATES at the URL
1093
+ * delimiters '/', '?', '#' (Node feeds the servername through
1094
+ * set_hostname: "\\\\?\\C:\\x" gets an EMPTY host and stays a
1095
+ * drive path). No IDNA (documented divergence — Node punycodes
1096
+ * non-ASCII names), and names with ':' or '%' stay verbatim where
1097
+ * Node aborts on a native set_hostname assertion. */
1098
+ UrlBuf host;
1099
+ ub_init(&host);
1100
+ for (size_t i = prefix; i < (size_t)host_end; i++) {
1101
+ char c = resolved->data[i];
1102
+ if (c == '/' || c == '?' || c == '#') break;
1103
+ if (c >= 'A' && c <= 'Z') c = (char)(c + 32);
1104
+ ub_push(&host, c);
1105
+ }
1106
+ ScrStr *encoded = scr_url_encode_file_path(resolved->data + host_end,
1107
+ resolved->len - (size_t)host_end, true);
1108
+ scr_str_release(resolved);
1109
+ return scr_url_new_file(ub_take(&host), encoded);
1110
+ }
1111
+ } else {
1112
+ ScrArr *pack = scr_arr_new(SCR_ELEM_STR, 1);
1113
+ scr_arr_push_ref(pack, scr_str_retain(path));
1114
+ resolved = scr_path_resolve(pack);
1115
+ scr_arr_release(pack);
1116
+ }
1117
+ /* path.resolve strips trailing slashes — Node adds an intentional one
1118
+ * back (the input ends with a separator the resolved path lost). On
1119
+ * win32 the input separator set is both slashes and the resolved path
1120
+ * keeps '\\' only at a root; posix knows '/' alone. */
1121
+ char last = path->len > 0 ? path->data[path->len - 1] : 0;
1122
+ bool wants_trailing = win32 ? (last == '/' || last == '\\') : last == '/';
1123
+ char resolved_last = resolved->len > 0 ? resolved->data[resolved->len - 1] : 0;
1124
+ bool has_trailing = win32 ? resolved_last == '\\' : resolved_last == '/';
1125
+ UrlBuf raw;
1126
+ ub_init(&raw);
1127
+ ub_append(&raw, resolved->data, resolved->len);
1128
+ if (wants_trailing && !has_trailing) ub_push(&raw, '/');
1129
+ ScrStr *encoded = scr_url_encode_file_path(raw.data, raw.len, win32);
1130
+ free(raw.data);
1131
+ scr_str_release(resolved);
1132
+ return scr_url_new_file(scr_str_new("", 0), encoded);
1133
+ }
1134
+
1135
+ /* The target's arm, like scr_url_to_path's. Never throws on posix. */
1136
+ ScrUrl *scr_url_from_path(ScrStr *path) {
1137
+ #ifdef _WIN32
1138
+ return scr_url_from_path_impl(path, true);
1139
+ #else
1140
+ return scr_url_from_path_impl(path, false);
1141
+ #endif
1142
+ }
1143
+
1144
+ ScrUrl *scr_url_from_path_platform(ScrStr *path, bool windows) {
1145
+ return scr_url_from_path_impl(path, windows);
1146
+ }
1147
+
1148
+ /* The win32 arms as real entry points: the host-side differential tests
1149
+ * (test_url.c) exercise the Windows behavior from any platform, the same
1150
+ * way Node exposes { windows: true } options on the bridge pair. */
1151
+ ScrStr *scr_url_to_path_w32(ScrUrl *u) { return scr_url_to_path_impl(u, true); }
1152
+ ScrUrl *scr_url_from_path_w32(ScrStr *path) { return scr_url_from_path_impl(path, true); }
1153
+
1154
+ /* WHATWG search getter: "" for no query AND for the bare-'?' query;
1155
+ * "?..." verbatim otherwise. */
1156
+ ScrStr *scr_url_search(ScrUrl *u) {
1157
+ if (u->query->len <= 1) return scr_str_new("", 0);
1158
+ return scr_str_retain(u->query);
1159
+ }
1160
+
1161
+ /* A bare '#' remains in href but its hash getter is empty, like Node. */
1162
+ ScrStr *scr_url_hash(ScrUrl *u) {
1163
+ if (u->fragment->len <= 1) return scr_str_new("", 0);
1164
+ return scr_str_retain(u->fragment);
1165
+ }
1166
+
1167
+ /* Checked native URL values preserve their handle across unknown storage. */
1168
+ static ScrDyn *scr_native_url_get(void *ptr, const char *key, size_t len) {
1169
+ if (len == 12 && !memcmp(key, "searchParams", len)) {
1170
+ ScrSearchParams *params = scr_url_search_params(ptr);
1171
+ ScrDyn *result = scr_dyn_native_search_params(params);
1172
+ scr_sp_release(params);
1173
+ return result;
1174
+ }
1175
+ ScrStr *text = NULL;
1176
+ #define URL_GET(name) if (len == sizeof(#name) - 1 && memcmp(key, #name, len) == 0) text = scr_url_##name(ptr)
1177
+ URL_GET(href);
1178
+ else URL_GET(protocol);
1179
+ else URL_GET(origin);
1180
+ else URL_GET(username);
1181
+ else URL_GET(password);
1182
+ else URL_GET(host);
1183
+ else URL_GET(hostname);
1184
+ else URL_GET(port);
1185
+ else URL_GET(pathname);
1186
+ else URL_GET(search);
1187
+ else URL_GET(hash);
1188
+ #undef URL_GET
1189
+ if (!text) return scr_dyn_retain(scr_dyn_undefined());
1190
+ ScrDyn *result = scr_dyn_new_str(text);
1191
+ scr_str_release(text);
1192
+ return result;
1193
+ }
1194
+
1195
+ static ScrDyn *scr_native_url_invoke(void *ptr, ScrDyn *self, const char *method,
1196
+ ScrDyn *const *args, size_t argc, const char *what) {
1197
+ (void)self; (void)args; (void)argc; (void)what;
1198
+ if (!strcmp(method, "toString") || !strcmp(method, "toJSON")) {
1199
+ ScrStr *text = scr_url_href(ptr);
1200
+ ScrDyn *result = scr_dyn_new_str(text);
1201
+ scr_str_release(text);
1202
+ return result;
1203
+ }
1204
+ static const char message[] = "Native URL method has no lowering";
1205
+ scr_throw_error_msg_code(SCR_ERR_ERROR, message, sizeof message - 1, "SC2020");
1206
+ return NULL;
1207
+ }
1208
+
1209
+ ScrDyn *scr_dyn_native_url(ScrUrl *value) {
1210
+ static const ScrDynHandleOps ops = {
1211
+ "URL", &scr_url_retain_v, &scr_url_release_v, &scr_native_url_invoke,
1212
+ &scr_native_url_get, NULL, NULL, NULL,
1213
+ };
1214
+ scr_dyn_handle_install(SCR_DYNH_URL, &ops);
1215
+ return scr_dyn_new_handle(value, SCR_DYNH_URL);
1216
+ }
1217
+
1218
+ bool scr_dyn_native_url_is(const ScrDyn *value) {
1219
+ return value && value->kind == SCR_DYN_HANDLE && value->v.handle.tag == SCR_DYNH_URL;
1220
+ }
1221
+
1222
+ ScrUrl *scr_dyn_native_url_check(const ScrDyn *value, const ScrDynPath *path) {
1223
+ if (!scr_dyn_native_url_is(value)) { scr_dyn_check_fail(path, "URL", value); return NULL; }
1224
+ return scr_url_retain(value->v.handle.ptr);
1225
+ }
1226
+
1227
+ static ScrDyn *scr_native_sp_get(void *ptr, const char *key, size_t len) {
1228
+ if (len == 4 && !memcmp(key, "size", len)) return scr_dyn_new_num(scr_sp_size(ptr));
1229
+ return scr_dyn_retain(scr_dyn_undefined());
1230
+ }
1231
+
1232
+ static ScrDyn *scr_native_sp_step(void *ptr, double *index, unsigned selection) {
1233
+ bool done = *index >= scr_sp_size(ptr);
1234
+ ScrDyn *value = scr_dyn_retain(scr_dyn_undefined());
1235
+ if (!done) {
1236
+ scr_dyn_release(value);
1237
+ ScrStr *key = scr_sp_key_at(ptr, *index), *text = scr_sp_val_at(ptr, *index);
1238
+ (*index)++;
1239
+ if (selection == 2) {
1240
+ value = scr_dyn_new_arr();
1241
+ scr_dyn_arr_push(value, scr_dyn_new_str(key));
1242
+ scr_dyn_arr_push(value, scr_dyn_new_str(text));
1243
+ } else value = scr_dyn_new_str(selection == 1 ? key : text);
1244
+ scr_str_release(key); scr_str_release(text);
1245
+ }
1246
+ ScrDyn *result = scr_dyn_new_obj();
1247
+ scr_dyn_obj_set(result, "done", 4, scr_dyn_new_bool(done));
1248
+ scr_dyn_obj_set(result, "value", 5, value);
1249
+ return result;
1250
+ }
1251
+
1252
+ static ScrDyn *scr_native_sp_invoke(void *ptr, ScrDyn *self, const char *method,
1253
+ ScrDyn *const *args, size_t argc, const char *what) {
1254
+ if (!strcmp(method, "entries") || !strcmp(method, "keys") || !strcmp(method, "values"))
1255
+ return scr_dyn_native_handle_iterator(self, !strcmp(method, "entries") ? 2 : !strcmp(method, "keys") ? 1 : 0);
1256
+ if (!strcmp(method, "toString")) {
1257
+ ScrStr *text = scr_sp_to_string(ptr);
1258
+ ScrDyn *result = scr_dyn_new_str(text);
1259
+ scr_str_release(text);
1260
+ return result;
1261
+ }
1262
+ if (!strcmp(method, "sort")) { scr_sp_sort(ptr); return scr_dyn_retain(scr_dyn_undefined()); }
1263
+ if (!strcmp(method, "forEach")) {
1264
+ if (!argc) { scr_dyn_arg_type_fail("callback", "of type function", scr_dyn_undefined()); return NULL; }
1265
+ for (double i = 0; i < scr_sp_size(ptr); i++) {
1266
+ ScrStr *key = scr_sp_key_at(ptr, i), *value = scr_sp_val_at(ptr, i);
1267
+ ScrDyn *argv[] = {scr_dyn_new_str(value), scr_dyn_new_str(key), self};
1268
+ scr_str_release(key); scr_str_release(value);
1269
+ scr_dyn_this_push_dyn(argc > 1 ? args[1] : NULL);
1270
+ ScrDyn *called = scr_dyn_call(args[0], argv, 3, "callback");
1271
+ scr_dyn_this_pop();
1272
+ scr_dyn_release(called); scr_dyn_release(argv[0]); scr_dyn_release(argv[1]);
1273
+ if (scr_exc_pending()) return NULL;
1274
+ }
1275
+ return scr_dyn_retain(scr_dyn_undefined());
1276
+ }
1277
+ bool two = !strcmp(method, "append") || !strcmp(method, "set");
1278
+ bool one = !strcmp(method, "get") || !strcmp(method, "getAll") || !strcmp(method, "has") || !strcmp(method, "delete");
1279
+ if (!one && !two) {
1280
+ scr_dyn_arg_type_fail(what, "of type function", scr_dyn_undefined());
1281
+ return NULL;
1282
+ }
1283
+ if (argc < (two ? 2 : 1)) {
1284
+ static const char message[] = "Not enough arguments";
1285
+ scr_throw_error_msg_code(SCR_ERR_TYPE, message, sizeof message - 1, "ERR_MISSING_ARGS");
1286
+ return NULL;
1287
+ }
1288
+ ScrStr *key = scr_dyn_string_coerce_js(args[0]);
1289
+ if (scr_exc_pending()) return NULL;
1290
+ ScrStr *value = NULL;
1291
+ if (two || argc > 1 && args[1]->kind != SCR_DYN_UNDEF) value = scr_dyn_string_coerce_js(args[1]);
1292
+ if (scr_exc_pending()) { scr_str_release(key); return NULL; }
1293
+ ScrDyn *result = NULL;
1294
+ if (!strcmp(method, "get")) {
1295
+ ScrStr *found = scr_sp_get(ptr, key);
1296
+ result = found ? scr_dyn_new_str(found) : scr_dyn_new_null();
1297
+ scr_str_release(found);
1298
+ } else if (!strcmp(method, "getAll")) {
1299
+ ScrArr *found = scr_sp_get_all(ptr, key);
1300
+ result = scr_dyn_new_arr();
1301
+ for (size_t i = 0; i < found->len; i++) {
1302
+ ScrStr *text = scr_arr_get_ref(found, i);
1303
+ scr_dyn_arr_push(result, scr_dyn_new_str(text));
1304
+ scr_str_release(text);
1305
+ }
1306
+ scr_arr_release(found);
1307
+ } else if (!strcmp(method, "has")) result = scr_dyn_new_bool(value ? scr_sp_has_value(ptr, key, value) : scr_sp_has(ptr, key));
1308
+ else {
1309
+ if (!strcmp(method, "append")) scr_sp_append(ptr, key, value);
1310
+ else if (!strcmp(method, "set")) scr_sp_set(ptr, key, value);
1311
+ else if (value) scr_sp_delete_value(ptr, key, value);
1312
+ else scr_sp_delete(ptr, key);
1313
+ result = scr_dyn_retain(scr_dyn_undefined());
1314
+ }
1315
+ scr_str_release(key); scr_str_release(value);
1316
+ return result;
1317
+ }
1318
+
1319
+ ScrDyn *scr_dyn_native_search_params(ScrSearchParams *value) {
1320
+ static const ScrDynHandleOps ops = {
1321
+ "URLSearchParams", &scr_sp_retain_v, &scr_sp_release_v, &scr_native_sp_invoke,
1322
+ &scr_native_sp_get, NULL, NULL, NULL, &scr_native_sp_step,
1323
+ };
1324
+ scr_dyn_handle_install(SCR_DYNH_SEARCH_PARAMS, &ops);
1325
+ return scr_dyn_new_handle(value, SCR_DYNH_SEARCH_PARAMS);
1326
+ }
1327
+
1328
+ bool scr_dyn_native_search_params_is(const ScrDyn *value) {
1329
+ return value && value->kind == SCR_DYN_HANDLE && value->v.handle.tag == SCR_DYNH_SEARCH_PARAMS;
1330
+ }
1331
+
1332
+ ScrSearchParams *scr_dyn_native_search_params_check(const ScrDyn *value, const ScrDynPath *path) {
1333
+ if (!scr_dyn_native_search_params_is(value)) { scr_dyn_check_fail(path, "URLSearchParams", value); return NULL; }
1334
+ return scr_sp_retain(value->v.handle.ptr);
1335
+ }
1336
+
1337
+ ScrSearchParams *scr_sp_new_checked(const ScrDyn *value) {
1338
+ if (!value || value->kind == SCR_DYN_UNDEF || value->kind == SCR_DYN_NULL) return scr_sp_new();
1339
+ if (scr_dyn_native_search_params_is(value)) return scr_sp_copy(value->v.handle.ptr);
1340
+ if (value->kind == SCR_DYN_OBJ || value->kind == SCR_DYN_ARR || value->kind == SCR_DYN_TYPED_REF) {
1341
+ ScrDyn *iterator = scr_dyn_iterator_optional(value);
1342
+ if (scr_exc_pending()) return NULL;
1343
+ ScrSearchParams *result = scr_sp_new();
1344
+ if (iterator) {
1345
+ for (;;) {
1346
+ ScrStr *next_key = scr_str_new("next", 4);
1347
+ ScrDyn *next = iterator->kind == SCR_DYN_HANDLE ? scr_dyn_handle_key_get(iterator, next_key) : scr_dyn_obj_read(iterator, "next", 4);
1348
+ scr_str_release(next_key);
1349
+ scr_dyn_this_push_dyn(iterator);
1350
+ ScrDyn *step = scr_exc_pending() ? NULL : scr_dyn_call(next, NULL, 0, "iterator.next");
1351
+ scr_dyn_this_pop();
1352
+ scr_dyn_release(next);
1353
+ if (scr_exc_pending()) break;
1354
+ ScrDyn *done = scr_dyn_obj_read(step, "done", 4);
1355
+ bool end = scr_dyn_truthy(done);
1356
+ scr_dyn_release(done);
1357
+ if (end) { scr_dyn_release(step); scr_dyn_release(iterator); return result; }
1358
+ ScrDyn *row = scr_dyn_obj_read(step, "value", 5);
1359
+ ScrDyn *pair = scr_dyn_iter_pack(row, NULL);
1360
+ scr_dyn_release(row); scr_dyn_release(step);
1361
+ if (scr_exc_pending()) { scr_dyn_release(pair); break; }
1362
+ if (!pair || pair->kind != SCR_DYN_ARR || pair->v.arr.len != 2) {
1363
+ static const char message[] = "Each query pair must be an iterable [name, value] tuple";
1364
+ scr_throw_error_msg_code(SCR_ERR_TYPE, message, sizeof message - 1, "ERR_INVALID_TUPLE");
1365
+ scr_dyn_release(pair); break;
1366
+ }
1367
+ ScrStr *key = scr_dyn_string_coerce_js(pair->v.arr.items[0]);
1368
+ ScrStr *text = scr_exc_pending() ? NULL : scr_dyn_string_coerce_js(pair->v.arr.items[1]);
1369
+ if (!scr_exc_pending()) scr_sp_append(result, key, text);
1370
+ scr_str_release(key); scr_str_release(text); scr_dyn_release(pair);
1371
+ if (scr_exc_pending()) break;
1372
+ }
1373
+ scr_dyn_release(iterator); scr_sp_release(result); return NULL;
1374
+ }
1375
+ ScrDyn *keys = scr_dyn_obj_keys(value);
1376
+ if (scr_exc_pending()) { scr_sp_release(result); return NULL; }
1377
+ for (size_t i = 0; i < keys->v.arr.len; i++) {
1378
+ ScrStr *key = keys->v.arr.items[i]->v.str;
1379
+ ScrDyn *entry = scr_dyn_obj_read(value, key->data, key->len);
1380
+ ScrStr *text = scr_exc_pending() ? NULL : scr_dyn_string_coerce_js(entry);
1381
+ scr_dyn_release(entry);
1382
+ if (!scr_exc_pending()) scr_sp_append(result, key, text);
1383
+ scr_str_release(text);
1384
+ if (scr_exc_pending()) { scr_dyn_release(keys); scr_sp_release(result); return NULL; }
1385
+ }
1386
+ scr_dyn_release(keys); return result;
1387
+ }
1388
+ ScrStr *text = scr_dyn_string_coerce_js(value);
1389
+ if (scr_exc_pending()) return NULL;
1390
+ ScrSearchParams *result = scr_sp_parse(text);
1391
+ scr_str_release(text);
1392
+ return result;
1393
+ }
1394
+
1395
+ ScrStr *scr_url_checked_to_path(const ScrDyn *value) {
1396
+ if (scr_dyn_native_url_is(value)) return scr_url_to_path(value->v.handle.ptr);
1397
+ if (value->kind == SCR_DYN_STR) return scr_url_str_to_path(value->v.str);
1398
+ scr_dyn_arg_type_fail("path", "of type string or an instance of URL", value);
1399
+ return NULL;
1400
+ }