@rindo/core 1.8.12 → 2.5.2

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 (608) hide show
  1. package/LICENSE.md +27 -27
  2. package/bin/cli.ts +20 -0
  3. package/bin/rindo +51 -22
  4. package/cli/index.cjs +1263 -0
  5. package/cli/index.d.ts +15 -0
  6. package/cli/index.js +1237 -0
  7. package/cli/package.json +14 -0
  8. package/compiler/lib.d.ts +24 -0
  9. package/compiler/lib.dom.d.ts +20230 -0
  10. package/compiler/lib.dom.iterable.d.ts +351 -0
  11. package/compiler/lib.es2015.collection.d.ts +89 -0
  12. package/compiler/lib.es2015.core.d.ts +517 -0
  13. package/compiler/lib.es2015.d.ts +30 -0
  14. package/compiler/lib.es2015.generator.d.ts +79 -0
  15. package/compiler/lib.es2015.iterable.d.ts +505 -0
  16. package/compiler/lib.es2015.promise.d.ts +150 -0
  17. package/compiler/lib.es2015.proxy.d.ts +41 -0
  18. package/compiler/lib.es2015.reflect.d.ts +123 -0
  19. package/compiler/lib.es2015.symbol.d.ts +48 -0
  20. package/compiler/lib.es2015.symbol.wellknown.d.ts +324 -0
  21. package/compiler/lib.es2016.array.include.d.ts +118 -0
  22. package/compiler/lib.es2016.d.ts +22 -0
  23. package/compiler/lib.es2016.full.d.ts +25 -0
  24. package/compiler/lib.es2017.d.ts +26 -0
  25. package/compiler/lib.es2017.full.d.ts +25 -0
  26. package/compiler/lib.es2017.intl.d.ts +32 -0
  27. package/compiler/lib.es2017.object.d.ts +51 -0
  28. package/compiler/lib.es2017.sharedmemory.d.ts +137 -0
  29. package/compiler/lib.es2017.string.d.ts +47 -0
  30. package/compiler/lib.es2017.typedarrays.d.ts +55 -0
  31. package/compiler/lib.es2018.asyncgenerator.d.ts +79 -0
  32. package/compiler/lib.es2018.asynciterable.d.ts +45 -0
  33. package/compiler/lib.es2018.d.ts +26 -0
  34. package/compiler/lib.es2018.full.d.ts +25 -0
  35. package/compiler/lib.es2018.intl.d.ts +61 -0
  36. package/compiler/lib.es2018.promise.d.ts +32 -0
  37. package/compiler/lib.es2018.regexp.d.ts +39 -0
  38. package/compiler/lib.es2019.array.d.ts +85 -0
  39. package/compiler/lib.es2019.d.ts +25 -0
  40. package/compiler/lib.es2019.full.d.ts +25 -0
  41. package/compiler/lib.es2019.object.d.ts +35 -0
  42. package/compiler/lib.es2019.string.d.ts +33 -0
  43. package/compiler/lib.es2019.symbol.d.ts +26 -0
  44. package/compiler/lib.es2020.bigint.d.ts +728 -0
  45. package/compiler/lib.es2020.d.ts +27 -0
  46. package/compiler/lib.es2020.full.d.ts +25 -0
  47. package/compiler/lib.es2020.intl.d.ts +310 -0
  48. package/compiler/lib.es2020.promise.d.ts +50 -0
  49. package/compiler/lib.es2020.sharedmemory.d.ts +99 -0
  50. package/compiler/lib.es2020.string.d.ts +30 -0
  51. package/compiler/lib.es2020.symbol.wellknown.d.ts +39 -0
  52. package/compiler/lib.es5.d.ts +4435 -0
  53. package/compiler/lib.es6.d.ts +25 -0
  54. package/compiler/lib.esnext.d.ts +25 -0
  55. package/compiler/lib.esnext.full.d.ts +25 -0
  56. package/compiler/lib.esnext.intl.d.ts +32 -0
  57. package/compiler/lib.esnext.promise.d.ts +43 -0
  58. package/compiler/lib.esnext.string.d.ts +35 -0
  59. package/compiler/lib.esnext.weakref.d.ts +75 -0
  60. package/compiler/lib.scripthost.d.ts +327 -0
  61. package/compiler/lib.webworker.d.ts +6042 -0
  62. package/compiler/lib.webworker.importscripts.d.ts +26 -0
  63. package/compiler/lib.webworker.iterable.d.ts +166 -0
  64. package/compiler/package.json +8 -6
  65. package/compiler/rindo.d.ts +95 -0
  66. package/compiler/rindo.js +65051 -6657
  67. package/compiler/rindo.min.js +4 -0
  68. package/dependencies.json +103 -0
  69. package/dev-server/client/app-error.d.ts +18 -0
  70. package/dev-server/client/events.d.ts +6 -0
  71. package/dev-server/client/hmr-components.d.ts +1 -0
  72. package/dev-server/client/hmr-external-styles.d.ts +1 -0
  73. package/dev-server/client/hmr-images.d.ts +1 -0
  74. package/dev-server/client/hmr-inline-styles.d.ts +1 -0
  75. package/dev-server/client/hmr-util.d.ts +9 -0
  76. package/dev-server/client/hmr-window.d.ts +10 -0
  77. package/dev-server/client/index.d.ts +6 -0
  78. package/dev-server/client/index.js +808 -0
  79. package/dev-server/client/logger.d.ts +5 -0
  80. package/dev-server/client/package.json +8 -0
  81. package/dev-server/client/progress.d.ts +3 -0
  82. package/dev-server/client/status.d.ts +4 -0
  83. package/dev-server/connector.html +6 -0
  84. package/dev-server/index.d.ts +3 -0
  85. package/dev-server/index.js +264 -0
  86. package/dev-server/open-in-editor-api.js +1 -0
  87. package/dev-server/package.json +8 -0
  88. package/dev-server/server-process.js +1738 -0
  89. package/dev-server/server-worker-thread.js +39 -0
  90. package/{dist/dev-server → dev-server}/templates/directory-index.html +132 -132
  91. package/{dist/dev-server → dev-server}/templates/initial-load.html +160 -160
  92. package/dev-server/ws.js +1 -0
  93. package/internal/app-data/index.cjs +90 -0
  94. package/internal/app-data/index.d.ts +4 -0
  95. package/internal/{client/build-conditionals.mjs → app-data/index.js} +25 -21
  96. package/internal/app-data/package.json +15 -0
  97. package/internal/client/css-shim.js +4 -0
  98. package/internal/client/{dom.rindo-client.mjs → dom.js} +73 -137
  99. package/{dist/client/index.mjs → internal/client/index.js} +863 -789
  100. package/internal/client/package.json +8 -0
  101. package/internal/client/patch-browser.js +120 -0
  102. package/internal/client/patch-esm.js +23 -0
  103. package/internal/client/polyfills/core-js.js +11 -10
  104. package/internal/client/polyfills/css-shim.js +1 -656
  105. package/internal/client/polyfills/dom.js +79 -146
  106. package/internal/client/polyfills/es5-html-element.js +1 -18
  107. package/internal/client/polyfills/index.js +34 -35
  108. package/internal/client/{shadow-css.rindo-client.mjs → shadow-css.js} +20 -17
  109. package/internal/hydrate/index.js +1097 -0
  110. package/internal/hydrate/package.json +7 -0
  111. package/internal/hydrate/runner.d.ts +217 -0
  112. package/internal/hydrate/runner.js +777 -0
  113. package/internal/hydrate/shadow-css.js +146 -0
  114. package/internal/index.d.ts +4 -18
  115. package/internal/index.js +1 -1
  116. package/internal/package.json +9 -6
  117. package/internal/rindo-core/index.cjs +1 -0
  118. package/internal/rindo-core/index.d.ts +51 -0
  119. package/internal/rindo-core/index.js +15 -0
  120. package/internal/rindo-ext-modules.d.ts +41 -0
  121. package/internal/rindo-private.d.ts +2128 -0
  122. package/internal/rindo-public-compiler.d.ts +2170 -0
  123. package/{dist/declarations/docs.d.ts → internal/rindo-public-docs.d.ts} +13 -1
  124. package/internal/rindo-public-runtime.d.ts +1555 -0
  125. package/internal/testing/index.js +1055 -0
  126. package/internal/testing/package.json +7 -0
  127. package/internal/testing/shadow-css.js +146 -0
  128. package/mock-doc/index.cjs +4610 -0
  129. package/mock-doc/index.d.ts +916 -0
  130. package/mock-doc/index.js +4574 -2
  131. package/mock-doc/package.json +15 -10
  132. package/package.json +132 -186
  133. package/readme.md +21 -174
  134. package/screenshot/compare/build/app.css +1 -1
  135. package/screenshot/compare/build/app.esm.js +1 -1
  136. package/screenshot/compare/build/app.js +33 -818
  137. package/screenshot/compare/build/{p-113f7459.js → p-081b0641.js} +1 -1
  138. package/screenshot/compare/build/p-227a1e18.entry.js +1 -0
  139. package/screenshot/compare/build/p-2c298727.entry.js +1 -0
  140. package/screenshot/compare/build/p-5479268c.entry.js +1 -0
  141. package/screenshot/compare/build/p-573ec8a4.entry.js +1 -0
  142. package/screenshot/compare/build/p-6ba08604.entry.js +1 -0
  143. package/screenshot/compare/build/p-6bc63295.entry.js +1 -0
  144. package/screenshot/compare/build/p-7a3759fd.entry.js +1 -0
  145. package/screenshot/compare/build/{p-ejpsp3kx.js → p-7b4e3ba7.js} +1 -1
  146. package/screenshot/compare/build/p-988eb362.css +1 -0
  147. package/screenshot/compare/build/p-9b6a9315.js +1 -0
  148. package/screenshot/compare/build/p-b4cc611c.entry.js +1 -0
  149. package/screenshot/compare/build/p-d1bf53f5.entry.js +1 -0
  150. package/screenshot/compare/build/{p-efb0eac6.js → p-e2efe0df.js} +1 -1
  151. package/screenshot/compare/build/p-e8ca6d97.entry.js +1 -0
  152. package/screenshot/compare/build/p-ec2f13e0.entry.js +1 -0
  153. package/screenshot/compare/build/p-f0b99977.entry.js +1 -0
  154. package/screenshot/compare/build/p-f4745c2f.entry.js +1 -0
  155. package/screenshot/compare/build/p-fbbae598.js +1 -0
  156. package/screenshot/compare/host.config.json +14 -14
  157. package/screenshot/compare/index.html +1 -1
  158. package/{dist/screenshot → screenshot}/connector-base.d.ts +1 -1
  159. package/{dist/screenshot → screenshot}/connector-local.d.ts +1 -1
  160. package/screenshot/connector.js +2 -3
  161. package/{dist/screenshot → screenshot}/index.d.ts +1 -1
  162. package/screenshot/index.js +659 -2
  163. package/screenshot/local-connector.js +2 -3
  164. package/screenshot/package.json +15 -13
  165. package/screenshot/pixel-match.js +62 -49
  166. package/screenshot/screenshot-compare.d.ts +3 -0
  167. package/{dist/screenshot → screenshot}/screenshot-fs.d.ts +1 -1
  168. package/sys/deno/index.js +1785 -0
  169. package/sys/deno/node-compat.js +2654 -0
  170. package/sys/deno/worker.js +44 -0
  171. package/sys/node/autoprefixer.js +8 -0
  172. package/sys/node/glob.js +1 -0
  173. package/sys/node/graceful-fs.js +1 -0
  174. package/sys/node/index.d.ts +18 -0
  175. package/sys/node/index.js +1386 -2
  176. package/sys/node/node-fetch.js +1 -0
  177. package/sys/node/package.json +8 -5
  178. package/sys/node/prompts.js +1 -0
  179. package/sys/node/worker.js +52 -0
  180. package/{dist/testing → testing}/index.d.ts +5 -6
  181. package/testing/index.js +4017 -2
  182. package/testing/jest/jest-config.d.ts +5 -0
  183. package/{dist/testing → testing}/jest/jest-environment.d.ts +4 -2
  184. package/{dist/testing → testing}/jest/jest-preprocessor.d.ts +1 -0
  185. package/{dist/testing → testing}/jest/jest-runner.d.ts +1 -1
  186. package/{dist/testing → testing}/jest/jest-screenshot.d.ts +1 -1
  187. package/{dist/testing → testing}/jest/jest-serializer.d.ts +1 -1
  188. package/testing/jest-environment.js +3 -3
  189. package/testing/jest-preprocessor.js +3 -3
  190. package/testing/jest-preset.js +32 -40
  191. package/testing/jest-runner.js +3 -3
  192. package/testing/jest-setuptestframework.js +3 -3
  193. package/{dist/testing → testing}/matchers/events.d.ts +9 -1
  194. package/{dist/testing → testing}/matchers/index.d.ts +3 -1
  195. package/{dist/testing → testing}/matchers/screenshot.d.ts +1 -1
  196. package/testing/mock-fetch.d.ts +11 -0
  197. package/testing/mocks.d.ts +14 -0
  198. package/testing/package.json +8 -6
  199. package/testing/puppeteer/index.d.ts +2 -0
  200. package/{dist/testing → testing}/puppeteer/puppeteer-browser.d.ts +3 -3
  201. package/{dist/testing → testing}/puppeteer/puppeteer-declarations.d.ts +18 -18
  202. package/{dist/testing → testing}/puppeteer/puppeteer-element.d.ts +7 -5
  203. package/testing/puppeteer/puppeteer-emulate.d.ts +2 -0
  204. package/{dist/testing → testing}/puppeteer/puppeteer-events.d.ts +9 -9
  205. package/testing/puppeteer/puppeteer-page.d.ts +2 -0
  206. package/testing/puppeteer/puppeteer-screenshot.d.ts +4 -0
  207. package/testing/reset-build-conditionals.d.ts +2 -0
  208. package/testing/spec-page.d.ts +2 -0
  209. package/testing/test-transpile.d.ts +2 -0
  210. package/{dist/testing → testing}/testing-logger.d.ts +10 -8
  211. package/testing/testing-sys.d.ts +1 -0
  212. package/{dist/testing → testing}/testing-utils.d.ts +3 -2
  213. package/testing/testing.d.ts +2 -0
  214. package/build-conditionals/index.d.ts +0 -2
  215. package/build-conditionals/index.mjs +0 -66
  216. package/build-conditionals/package.json +0 -6
  217. package/compiler/index.js +0 -2
  218. package/dist/cli/index.js +0 -6068
  219. package/dist/client/css-shim-14a9812e.js +0 -656
  220. package/dist/client/css-shim-69821662.js +0 -658
  221. package/dist/client/declarations/rindo.core.d.ts +0 -1347
  222. package/dist/client/dom-68c8fe31.js +0 -139
  223. package/dist/client/dom-af01458a.js +0 -137
  224. package/dist/client/index.js +0 -2937
  225. package/dist/client/polyfills/core-js.js +0 -10
  226. package/dist/client/polyfills/css-shim.js +0 -656
  227. package/dist/client/polyfills/dom.js +0 -146
  228. package/dist/client/polyfills/es5-html-element.js +0 -18
  229. package/dist/client/polyfills/index.js +0 -35
  230. package/dist/client/polyfills/promise.js +0 -9
  231. package/dist/client/polyfills/system.js +0 -6
  232. package/dist/client/shadow-css-6ef31c68.js +0 -386
  233. package/dist/client/shadow-css-8fd1a9e4.js +0 -388
  234. package/dist/compiler/app-core/app-es5-disabled.d.ts +0 -2
  235. package/dist/compiler/app-core/app-polyfills.d.ts +0 -3
  236. package/dist/compiler/app-core/build-conditionals.d.ts +0 -6
  237. package/dist/compiler/app-core/bundle-app-core.d.ts +0 -6
  238. package/dist/compiler/app-core/component-styles.d.ts +0 -4
  239. package/dist/compiler/app-core/format-component-runtime-meta.d.ts +0 -4
  240. package/dist/compiler/app-core/optimize-module.d.ts +0 -7
  241. package/dist/compiler/browser/build-conditionals-client.d.ts +0 -3
  242. package/dist/compiler/browser/compile-options.d.ts +0 -12
  243. package/dist/compiler/browser/compile.d.ts +0 -2
  244. package/dist/compiler/browser/create-compiler.d.ts +0 -14
  245. package/dist/compiler/browser/index.d.ts +0 -11
  246. package/dist/compiler/build/build-ctx.d.ts +0 -74
  247. package/dist/compiler/build/build-finish.d.ts +0 -3
  248. package/dist/compiler/build/build-hmr.d.ts +0 -2
  249. package/dist/compiler/build/build-results.d.ts +0 -2
  250. package/dist/compiler/build/build-stats.d.ts +0 -3
  251. package/dist/compiler/build/build.d.ts +0 -2
  252. package/dist/compiler/build/cache-stats.d.ts +0 -4
  253. package/dist/compiler/build/compiler-build-id.d.ts +0 -6
  254. package/dist/compiler/build/compiler-ctx.d.ts +0 -44
  255. package/dist/compiler/build/init-index-html.d.ts +0 -2
  256. package/dist/compiler/build/validate-files.d.ts +0 -2
  257. package/dist/compiler/build/write-build.d.ts +0 -2
  258. package/dist/compiler/cache.d.ts +0 -22
  259. package/dist/compiler/compiler.d.ts +0 -27
  260. package/dist/compiler/component-hydrate/bundle-hydrate-factory.d.ts +0 -3
  261. package/dist/compiler/component-hydrate/generate-hydrate-app.d.ts +0 -2
  262. package/dist/compiler/component-hydrate/hydrate-factory-closure.d.ts +0 -2
  263. package/dist/compiler/component-hydrate/update-to-hydrate-components.d.ts +0 -2
  264. package/dist/compiler/component-hydrate/write-hydrate-outputs.d.ts +0 -3
  265. package/dist/compiler/component-lazy/generate-cjs.d.ts +0 -3
  266. package/dist/compiler/component-lazy/generate-esm-browser.d.ts +0 -3
  267. package/dist/compiler/component-lazy/generate-esm.d.ts +0 -3
  268. package/dist/compiler/component-lazy/generate-lazy-app.d.ts +0 -3
  269. package/dist/compiler/component-lazy/generate-lazy-module.d.ts +0 -4
  270. package/dist/compiler/component-lazy/generate-system.d.ts +0 -3
  271. package/dist/compiler/component-lazy/update-to-lazy-component.d.ts +0 -2
  272. package/dist/compiler/component-lazy/write-lazy-entry-module.d.ts +0 -2
  273. package/dist/compiler/component-native/update-to-native-component.d.ts +0 -2
  274. package/dist/compiler/config/config-reload.d.ts +0 -3
  275. package/dist/compiler/config/config-utils.d.ts +0 -4
  276. package/dist/compiler/config/validate-config.d.ts +0 -4
  277. package/dist/compiler/config/validate-copy.d.ts +0 -2
  278. package/dist/compiler/config/validate-dev-server.d.ts +0 -2
  279. package/dist/compiler/config/validate-docs.d.ts +0 -2
  280. package/dist/compiler/config/validate-namespace.d.ts +0 -3
  281. package/dist/compiler/config/validate-output-stats.d.ts +0 -2
  282. package/dist/compiler/config/validate-outputs-angular.d.ts +0 -2
  283. package/dist/compiler/config/validate-outputs-custom.d.ts +0 -2
  284. package/dist/compiler/config/validate-outputs-dist-module.d.ts +0 -2
  285. package/dist/compiler/config/validate-outputs-dist.d.ts +0 -2
  286. package/dist/compiler/config/validate-outputs-hydrate-script.d.ts +0 -2
  287. package/dist/compiler/config/validate-outputs-www.d.ts +0 -2
  288. package/dist/compiler/config/validate-outputs.d.ts +0 -2
  289. package/dist/compiler/config/validate-paths.d.ts +0 -2
  290. package/dist/compiler/config/validate-plugins.d.ts +0 -2
  291. package/dist/compiler/config/validate-prerender.d.ts +0 -2
  292. package/dist/compiler/config/validate-rollup-config.d.ts +0 -2
  293. package/dist/compiler/config/validate-service-worker.d.ts +0 -2
  294. package/dist/compiler/config/validate-testing.d.ts +0 -2
  295. package/dist/compiler/config/validate-workers.d.ts +0 -2
  296. package/dist/compiler/copy/assets-copy-tasks.d.ts +0 -3
  297. package/dist/compiler/copy/hashed-copy.d.ts +0 -2
  298. package/dist/compiler/copy/local-copy-tasks.d.ts +0 -3
  299. package/dist/compiler/docs/constants.d.ts +0 -2
  300. package/dist/compiler/docs/custom/index.d.ts +0 -2
  301. package/dist/compiler/docs/docs.d.ts +0 -2
  302. package/dist/compiler/docs/generate-doc-data.d.ts +0 -3
  303. package/dist/compiler/docs/json/index.d.ts +0 -3
  304. package/dist/compiler/docs/readme/docs-util.d.ts +0 -13
  305. package/dist/compiler/docs/readme/index.d.ts +0 -3
  306. package/dist/compiler/docs/readme/markdown-css-props.d.ts +0 -2
  307. package/dist/compiler/docs/readme/markdown-dependencies.d.ts +0 -2
  308. package/dist/compiler/docs/readme/markdown-events.d.ts +0 -2
  309. package/dist/compiler/docs/readme/markdown-methods.d.ts +0 -2
  310. package/dist/compiler/docs/readme/markdown-props.d.ts +0 -2
  311. package/dist/compiler/docs/readme/markdown-slots.d.ts +0 -2
  312. package/dist/compiler/docs/readme/markdown-usage.d.ts +0 -6
  313. package/dist/compiler/docs/readme/output-docs.d.ts +0 -3
  314. package/dist/compiler/docs/style-docs.d.ts +0 -2
  315. package/dist/compiler/docs/vscode/index.d.ts +0 -2
  316. package/dist/compiler/entries/component-bundles.d.ts +0 -3
  317. package/dist/compiler/entries/component-graph.d.ts +0 -2
  318. package/dist/compiler/entries/default-bundles.d.ts +0 -3
  319. package/dist/compiler/entries/entry-modules.d.ts +0 -6
  320. package/dist/compiler/entries/resolve-component-dependencies.d.ts +0 -2
  321. package/dist/compiler/events.d.ts +0 -15
  322. package/dist/compiler/fs-watch/fs-watch-init.d.ts +0 -2
  323. package/dist/compiler/fs-watch/fs-watch-log.d.ts +0 -2
  324. package/dist/compiler/fs-watch/fs-watch-rebuild.d.ts +0 -7
  325. package/dist/compiler/html/inject-module-preloads.d.ts +0 -3
  326. package/dist/compiler/html/inject-sw-script.d.ts +0 -4
  327. package/dist/compiler/html/inline-esm-import.d.ts +0 -2
  328. package/dist/compiler/html/inline-style-sheets.d.ts +0 -2
  329. package/dist/compiler/html/update-global-styles-link.d.ts +0 -2
  330. package/dist/compiler/html/used-components.d.ts +0 -2
  331. package/dist/compiler/html/utils.d.ts +0 -2
  332. package/dist/compiler/html/validate-manifest-json.d.ts +0 -2
  333. package/dist/compiler/index.d.ts +0 -10
  334. package/dist/compiler/index.js +0 -18008
  335. package/dist/compiler/output-targets/empty-dir.d.ts +0 -6
  336. package/dist/compiler/output-targets/index.d.ts +0 -2
  337. package/dist/compiler/output-targets/output-angular.d.ts +0 -4
  338. package/dist/compiler/output-targets/output-app.d.ts +0 -4
  339. package/dist/compiler/output-targets/output-collection.d.ts +0 -3
  340. package/dist/compiler/output-targets/output-copy.d.ts +0 -2
  341. package/dist/compiler/output-targets/output-custom.d.ts +0 -2
  342. package/dist/compiler/output-targets/output-docs.d.ts +0 -2
  343. package/dist/compiler/output-targets/output-hydrate.d.ts +0 -2
  344. package/dist/compiler/output-targets/output-lazy-loader.d.ts +0 -2
  345. package/dist/compiler/output-targets/output-module.d.ts +0 -4
  346. package/dist/compiler/output-targets/output-prerender.d.ts +0 -2
  347. package/dist/compiler/output-targets/output-service-workers.d.ts +0 -2
  348. package/dist/compiler/output-targets/output-types.d.ts +0 -2
  349. package/dist/compiler/output-targets/output-utils.d.ts +0 -54
  350. package/dist/compiler/output-targets/output-www.d.ts +0 -2
  351. package/dist/compiler/plugin/plugin.d.ts +0 -6
  352. package/dist/compiler/prerender/crawl-urls.d.ts +0 -3
  353. package/dist/compiler/prerender/host-config.d.ts +0 -12
  354. package/dist/compiler/prerender/prerender-config.d.ts +0 -2
  355. package/dist/compiler/prerender/prerender-main.d.ts +0 -2
  356. package/dist/compiler/prerender/prerender-queue.d.ts +0 -3
  357. package/dist/compiler/prerender/prerender-template-html.d.ts +0 -2
  358. package/dist/compiler/prerender/prerendered-write-path.d.ts +0 -2
  359. package/dist/compiler/prerender/robots-txt.d.ts +0 -2
  360. package/dist/compiler/prerender/sitemap-xml.d.ts +0 -3
  361. package/dist/compiler/rollup-plugins/component-entry.d.ts +0 -3
  362. package/dist/compiler/rollup-plugins/css-transformer.d.ts +0 -3
  363. package/dist/compiler/rollup-plugins/global-scripts.d.ts +0 -4
  364. package/dist/compiler/rollup-plugins/image-plugin.d.ts +0 -3
  365. package/dist/compiler/rollup-plugins/in-memory-fs-read.d.ts +0 -3
  366. package/dist/compiler/rollup-plugins/loader.d.ts +0 -4
  367. package/dist/compiler/rollup-plugins/plugin-helper.d.ts +0 -5
  368. package/dist/compiler/rollup-plugins/rindo-build-conditionals.d.ts +0 -7
  369. package/dist/compiler/rollup-plugins/rindo-client.d.ts +0 -3
  370. package/dist/compiler/rollup-plugins/rindo-external-runtime.d.ts +0 -2
  371. package/dist/compiler/rollup-plugins/rindo-hydrate.d.ts +0 -3
  372. package/dist/compiler/rollup-plugins/rindo-public-plugin.d.ts +0 -2
  373. package/dist/compiler/service-worker/generate-sw.d.ts +0 -7
  374. package/dist/compiler/service-worker/service-worker-util.d.ts +0 -2
  375. package/dist/compiler/style/cached-styles.d.ts +0 -5
  376. package/dist/compiler/style/component-styles.d.ts +0 -2
  377. package/dist/compiler/style/css-imports.d.ts +0 -9
  378. package/dist/compiler/style/css-to-esm.d.ts +0 -5
  379. package/dist/compiler/style/generate-styles.d.ts +0 -2
  380. package/dist/compiler/style/global-styles.d.ts +0 -3
  381. package/dist/compiler/style/normalize-styles.d.ts +0 -2
  382. package/dist/compiler/style/optimize-css.d.ts +0 -2
  383. package/dist/compiler/style/scope-css.d.ts +0 -3
  384. package/dist/compiler/style/style-utils.d.ts +0 -10
  385. package/dist/compiler/transformers/add-component-meta-proxy.d.ts +0 -3
  386. package/dist/compiler/transformers/add-component-meta-static.d.ts +0 -4
  387. package/dist/compiler/transformers/add-imports.d.ts +0 -3
  388. package/dist/compiler/transformers/collections/add-external-import.d.ts +0 -2
  389. package/dist/compiler/transformers/collections/parse-collection-components.d.ts +0 -2
  390. package/dist/compiler/transformers/collections/parse-collection-deprecated.d.ts +0 -2
  391. package/dist/compiler/transformers/collections/parse-collection-manifest.d.ts +0 -7
  392. package/dist/compiler/transformers/collections/parse-collection-module.d.ts +0 -2
  393. package/dist/compiler/transformers/component-build-conditionals.d.ts +0 -2
  394. package/dist/compiler/transformers/component-hydrate/hydrate-component.d.ts +0 -3
  395. package/dist/compiler/transformers/component-hydrate/hydrate-runtime-cmp-meta.d.ts +0 -3
  396. package/dist/compiler/transformers/component-hydrate/tranform-to-hydrate-component.d.ts +0 -2
  397. package/dist/compiler/transformers/component-lazy/lazy-component.d.ts +0 -3
  398. package/dist/compiler/transformers/component-lazy/lazy-constructor.d.ts +0 -3
  399. package/dist/compiler/transformers/component-lazy/lazy-element-getter.d.ts +0 -3
  400. package/dist/compiler/transformers/component-lazy/transform-lazy-component.d.ts +0 -4
  401. package/dist/compiler/transformers/component-native/native-component.d.ts +0 -3
  402. package/dist/compiler/transformers/component-native/native-connected-callback.d.ts +0 -3
  403. package/dist/compiler/transformers/component-native/native-constructor.d.ts +0 -3
  404. package/dist/compiler/transformers/component-native/native-element-getter.d.ts +0 -3
  405. package/dist/compiler/transformers/component-native/native-static-style.d.ts +0 -3
  406. package/dist/compiler/transformers/component-native/tranform-to-native-component.d.ts +0 -4
  407. package/dist/compiler/transformers/core-runtime-apis.d.ts +0 -30
  408. package/dist/compiler/transformers/create-event.d.ts +0 -3
  409. package/dist/compiler/transformers/decorators-to-static/component-decorator.d.ts +0 -3
  410. package/dist/compiler/transformers/decorators-to-static/convert-decorators.d.ts +0 -3
  411. package/dist/compiler/transformers/decorators-to-static/decorator-utils.d.ts +0 -10
  412. package/dist/compiler/transformers/decorators-to-static/element-decorator.d.ts +0 -3
  413. package/dist/compiler/transformers/decorators-to-static/event-decorator.d.ts +0 -4
  414. package/dist/compiler/transformers/decorators-to-static/listen-decorator.d.ts +0 -6
  415. package/dist/compiler/transformers/decorators-to-static/method-decorator.d.ts +0 -3
  416. package/dist/compiler/transformers/decorators-to-static/prop-decorator.d.ts +0 -4
  417. package/dist/compiler/transformers/decorators-to-static/state-decorator.d.ts +0 -3
  418. package/dist/compiler/transformers/decorators-to-static/style-to-static.d.ts +0 -3
  419. package/dist/compiler/transformers/decorators-to-static/watch-decorator.d.ts +0 -3
  420. package/dist/compiler/transformers/define-custom-element.d.ts +0 -3
  421. package/dist/compiler/transformers/host-data-transform.d.ts +0 -3
  422. package/dist/compiler/transformers/legacy-props.d.ts +0 -3
  423. package/dist/compiler/transformers/remove-static-meta-properties.d.ts +0 -2
  424. package/dist/compiler/transformers/reserved-public-members.d.ts +0 -3
  425. package/dist/compiler/transformers/rindo-import-path.d.ts +0 -3
  426. package/dist/compiler/transformers/static-to-meta/call-expression.d.ts +0 -3
  427. package/dist/compiler/transformers/static-to-meta/class-methods.d.ts +0 -3
  428. package/dist/compiler/transformers/static-to-meta/component.d.ts +0 -3
  429. package/dist/compiler/transformers/static-to-meta/element-ref.d.ts +0 -2
  430. package/dist/compiler/transformers/static-to-meta/encapsulation.d.ts +0 -3
  431. package/dist/compiler/transformers/static-to-meta/events.d.ts +0 -3
  432. package/dist/compiler/transformers/static-to-meta/import.d.ts +0 -3
  433. package/dist/compiler/transformers/static-to-meta/listeners.d.ts +0 -3
  434. package/dist/compiler/transformers/static-to-meta/methods.d.ts +0 -3
  435. package/dist/compiler/transformers/static-to-meta/props.d.ts +0 -3
  436. package/dist/compiler/transformers/static-to-meta/states.d.ts +0 -3
  437. package/dist/compiler/transformers/static-to-meta/string-literal.d.ts +0 -3
  438. package/dist/compiler/transformers/static-to-meta/styles.d.ts +0 -3
  439. package/dist/compiler/transformers/static-to-meta/vdom.d.ts +0 -3
  440. package/dist/compiler/transformers/static-to-meta/visitor.d.ts +0 -3
  441. package/dist/compiler/transformers/static-to-meta/watchers.d.ts +0 -3
  442. package/dist/compiler/transformers/style-imports.d.ts +0 -3
  443. package/dist/compiler/transformers/transform-utils.d.ts +0 -31
  444. package/dist/compiler/transformers/update-component-class.d.ts +0 -3
  445. package/dist/compiler/transformers/update-rindo-core-import.d.ts +0 -3
  446. package/dist/compiler/transformers/watcher-meta-transform.d.ts +0 -3
  447. package/dist/compiler/transpile/compiler-options.d.ts +0 -4
  448. package/dist/compiler/transpile/transpile-app.d.ts +0 -2
  449. package/dist/compiler/transpile/transpile-module.d.ts +0 -5
  450. package/dist/compiler/transpile/transpile-service.d.ts +0 -3
  451. package/dist/compiler/transpile/transpile-to-es5-main.d.ts +0 -2
  452. package/dist/compiler/transpile/validate-types-main.d.ts +0 -2
  453. package/dist/compiler/types/generate-app-types.d.ts +0 -2
  454. package/dist/compiler/types/generate-component-types.d.ts +0 -8
  455. package/dist/compiler/types/generate-event-types.d.ts +0 -2
  456. package/dist/compiler/types/generate-method-types.d.ts +0 -2
  457. package/dist/compiler/types/generate-prop-types.d.ts +0 -2
  458. package/dist/compiler/types/generate-types.d.ts +0 -2
  459. package/dist/compiler/types/rindo-types.d.ts +0 -3
  460. package/dist/compiler/types/types-utils.d.ts +0 -4
  461. package/dist/compiler/types/update-import-refs.d.ts +0 -11
  462. package/dist/compiler/types/validate-package-json.d.ts +0 -9
  463. package/dist/declarations/assets.d.ts +0 -17
  464. package/dist/declarations/browser-compile.d.ts +0 -47
  465. package/dist/declarations/build-conditionals.d.ts +0 -91
  466. package/dist/declarations/build-events.d.ts +0 -19
  467. package/dist/declarations/build.d.ts +0 -247
  468. package/dist/declarations/cache.d.ts +0 -11
  469. package/dist/declarations/collection-manifest.d.ts +0 -106
  470. package/dist/declarations/collection.d.ts +0 -139
  471. package/dist/declarations/compiler.d.ts +0 -53
  472. package/dist/declarations/component-compiler-meta.d.ts +0 -198
  473. package/dist/declarations/component-constructor.d.ts +0 -61
  474. package/dist/declarations/component-interfaces.d.ts +0 -123
  475. package/dist/declarations/config.d.ts +0 -409
  476. package/dist/declarations/css-var-shim.d.ts +0 -9
  477. package/dist/declarations/decorators.d.ts +0 -150
  478. package/dist/declarations/dev-server.d.ts +0 -135
  479. package/dist/declarations/diagnostics.d.ts +0 -21
  480. package/dist/declarations/entry.d.ts +0 -28
  481. package/dist/declarations/events.d.ts +0 -13
  482. package/dist/declarations/file-system.d.ts +0 -91
  483. package/dist/declarations/fs-watch.d.ts +0 -15
  484. package/dist/declarations/host-element.d.ts +0 -53
  485. package/dist/declarations/hydrate.d.ts +0 -99
  486. package/dist/declarations/in-memory-fs.d.ts +0 -59
  487. package/dist/declarations/index.d.ts +0 -45
  488. package/dist/declarations/jsdoc.d.ts +0 -16
  489. package/dist/declarations/jsx.d.ts +0 -1050
  490. package/dist/declarations/logger.d.ts +0 -25
  491. package/dist/declarations/minify-js.d.ts +0 -11
  492. package/dist/declarations/module.d.ts +0 -35
  493. package/dist/declarations/optimize-css.d.ts +0 -12
  494. package/dist/declarations/output-targets.d.ts +0 -189
  495. package/dist/declarations/plugin.d.ts +0 -23
  496. package/dist/declarations/prerender.d.ts +0 -79
  497. package/dist/declarations/render.d.ts +0 -62
  498. package/dist/declarations/runtime.d.ts +0 -92
  499. package/dist/declarations/screenshots.d.ts +0 -192
  500. package/dist/declarations/server.d.ts +0 -19
  501. package/dist/declarations/style.d.ts +0 -35
  502. package/dist/declarations/system.d.ts +0 -174
  503. package/dist/declarations/testing.d.ts +0 -523
  504. package/dist/declarations/transpile.d.ts +0 -24
  505. package/dist/declarations/types.d.ts +0 -24
  506. package/dist/declarations/vdom.d.ts +0 -55
  507. package/dist/declarations/worker.d.ts +0 -33
  508. package/dist/dev-server/content-type-db.json +0 -1
  509. package/dist/dev-server/index.js +0 -887
  510. package/dist/dev-server/static/app-error.css +0 -257
  511. package/dist/dev-server/static/dev-server-client.html +0 -13
  512. package/dist/hydrate/index.d.ts +0 -101
  513. package/dist/hydrate/index.mjs +0 -1281
  514. package/dist/hydrate/platform.mjs +0 -347
  515. package/dist/index.d.ts +0 -99
  516. package/dist/index.js +0 -1
  517. package/dist/mock-doc/index.d.ts +0 -851
  518. package/dist/mock-doc/index.js +0 -3982
  519. package/dist/mock-doc/index.mjs +0 -3954
  520. package/dist/runtime/index.js +0 -2576
  521. package/dist/runtime/index.mjs +0 -2521
  522. package/dist/runtime/shadow-css-6ef31c68.js +0 -386
  523. package/dist/runtime/shadow-css-8fd1a9e4.js +0 -388
  524. package/dist/screenshot/index.js +0 -520
  525. package/dist/sys/node/graceful-fs.js +0 -975
  526. package/dist/sys/node/index.js +0 -33545
  527. package/dist/sys/node/node-fetch.js +0 -1779
  528. package/dist/sys/node/open-in-editor.js +0 -734
  529. package/dist/sys/node/sys-worker.js +0 -67035
  530. package/dist/sys/node/websocket.js +0 -3728
  531. package/dist/testing/build-conditionals.d.ts +0 -4
  532. package/dist/testing/build-conditionals.js +0 -43
  533. package/dist/testing/core.d.ts +0 -35
  534. package/dist/testing/core.js +0 -52
  535. package/dist/testing/index.js +0 -40511
  536. package/dist/testing/jest/jest-config.d.ts +0 -4
  537. package/dist/testing/mock-fetch.d.ts +0 -46
  538. package/dist/testing/mocks.d.ts +0 -12
  539. package/dist/testing/platform.d.ts +0 -23
  540. package/dist/testing/platform.js +0 -321
  541. package/dist/testing/puppeteer/puppeteer-emulate.d.ts +0 -2
  542. package/dist/testing/puppeteer/puppeteer-find.d.ts +0 -5
  543. package/dist/testing/puppeteer/puppeteer-page.d.ts +0 -2
  544. package/dist/testing/puppeteer/puppeteer-screenshot.d.ts +0 -4
  545. package/dist/testing/spec-page.d.ts +0 -5
  546. package/dist/testing/task-queue.d.ts +0 -15
  547. package/dist/testing/test-transpile.d.ts +0 -5
  548. package/dist/testing/testing-fs.d.ts +0 -31
  549. package/dist/testing/testing-sys.d.ts +0 -19
  550. package/dist/testing/testing.d.ts +0 -12
  551. package/dist/utils/index.js +0 -1575
  552. package/dist/utils/index.mjs +0 -1511
  553. package/internal/client/css-shim.rindo-client.mjs +0 -656
  554. package/internal/client/index.mjs +0 -2859
  555. package/internal/client/polyfills/promise.js +0 -9
  556. package/internal/images.d.ts +0 -5
  557. package/runtime/package.json +0 -5
  558. package/screenshot/compare/build/p-020f8d73.js +0 -1
  559. package/screenshot/compare/build/p-09qdknbg.system.entry.js +0 -1
  560. package/screenshot/compare/build/p-0a13mpsc.system.entry.js +0 -1
  561. package/screenshot/compare/build/p-168ec2c4.system.js +0 -1
  562. package/screenshot/compare/build/p-2ab1fdf1.system.js +0 -1
  563. package/screenshot/compare/build/p-2pxcsgrj.entry.js +0 -1
  564. package/screenshot/compare/build/p-42fb7034.system.js +0 -1
  565. package/screenshot/compare/build/p-54d9d7c2.system.js +0 -1
  566. package/screenshot/compare/build/p-67c1f911.js +0 -1
  567. package/screenshot/compare/build/p-68613371.system.js +0 -1
  568. package/screenshot/compare/build/p-7dvsjpu0.entry.js +0 -1
  569. package/screenshot/compare/build/p-aa67fb06.js +0 -1
  570. package/screenshot/compare/build/p-aeb3cec1.system.js +0 -1
  571. package/screenshot/compare/build/p-b6e44a24.js +0 -1
  572. package/screenshot/compare/build/p-c1c25b8a.js +0 -1
  573. package/screenshot/compare/build/p-c9bopbjy.system.entry.js +0 -1
  574. package/screenshot/compare/build/p-c9iqz1pp.system.entry.js +0 -1
  575. package/screenshot/compare/build/p-dizjz8rg.entry.js +0 -1
  576. package/screenshot/compare/build/p-dnta0rwp.system.entry.js +0 -1
  577. package/screenshot/compare/build/p-e9670d22.system.js +0 -1
  578. package/screenshot/compare/build/p-ei9jkpd0.system.entry.js +0 -1
  579. package/screenshot/compare/build/p-ejwcppol.entry.js +0 -1
  580. package/screenshot/compare/build/p-f6612d5d.system.js +0 -1
  581. package/screenshot/compare/build/p-foiivsfc.css +0 -1
  582. package/screenshot/compare/build/p-gpjjyogx.entry.js +0 -1
  583. package/screenshot/compare/build/p-howklem2.system.entry.js +0 -1
  584. package/screenshot/compare/build/p-knv9wvoc.entry.js +0 -1
  585. package/screenshot/compare/build/p-nsqsfhhy.entry.js +0 -1
  586. package/screenshot/compare/build/p-ojt278pp.entry.js +0 -1
  587. package/screenshot/compare/build/p-oywass99.entry.js +0 -1
  588. package/screenshot/compare/build/p-q3ujhub6.entry.js +0 -1
  589. package/screenshot/compare/build/p-qw4xnmxv.entry.js +0 -1
  590. package/screenshot/compare/build/p-t1wvevhc.system.entry.js +0 -1
  591. package/screenshot/compare/build/p-tnjarrex.system.entry.js +0 -1
  592. package/screenshot/compare/build/p-vhfpd6kk.system.entry.js +0 -1
  593. package/screenshot/compare/build/p-vk6rhemd.system.entry.js +0 -1
  594. package/screenshot/compare/build/p-w6bnm16k.entry.js +0 -1
  595. package/screenshot/compare/build/p-xje6d7zl.system.entry.js +0 -1
  596. package/screenshot/compare/build/p-y5jlrcha.system.entry.js +0 -1
  597. package/screenshot/compare/build/p-yh170wkt.entry.js +0 -1
  598. package/testing/jest.preprocessor.js +0 -7
  599. /package/{dist/dev-server → dev-server}/static/favicon.ico +0 -0
  600. /package/{dist/sys/node → dev-server}/visualstudio.vbs +0 -0
  601. /package/{dist/sys/node → dev-server}/xdg-open +0 -0
  602. /package/{dist/compiler/polyfills.d.ts → screenshot/compare/build/index.esm.js} +0 -0
  603. /package/{dist/screenshot → screenshot}/pixel-match.d.ts +0 -0
  604. /package/{dist/testing → testing}/jest/jest-setup-test-framework.d.ts +0 -0
  605. /package/{dist/testing → testing}/matchers/attributes.d.ts +0 -0
  606. /package/{dist/testing → testing}/matchers/class-list.d.ts +0 -0
  607. /package/{dist/testing → testing}/matchers/html.d.ts +0 -0
  608. /package/{dist/testing → testing}/matchers/text.d.ts +0 -0
@@ -0,0 +1,1785 @@
1
+ /*! Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
2
+ * https://github.com/denoland/deno/blob/master/LICENSE
3
+ * https://deno.land/ */
4
+ function assertPath(e) {
5
+ if ("string" != typeof e) throw new TypeError(`Path must be a string. Received ${JSON.stringify(e)}`);
6
+ }
7
+
8
+ function isPosixPathSeparator(e) {
9
+ return 47 === e;
10
+ }
11
+
12
+ function isPathSeparator(e) {
13
+ return isPosixPathSeparator(e) || 92 === e;
14
+ }
15
+
16
+ function isWindowsDeviceRoot(e) {
17
+ return e >= 97 && e <= 122 || e >= 65 && e <= 90;
18
+ }
19
+
20
+ function normalizeString(e, t, r, n) {
21
+ let o, i = "", a = 0, s = -1, l = 0;
22
+ for (let c = 0, h = e.length; c <= h; ++c) {
23
+ if (c < h) o = e.charCodeAt(c); else {
24
+ if (n(o)) break;
25
+ o = 47;
26
+ }
27
+ if (n(o)) {
28
+ if (s === c - 1 || 1 === l) ; else if (s !== c - 1 && 2 === l) {
29
+ if (i.length < 2 || 2 !== a || 46 !== i.charCodeAt(i.length - 1) || 46 !== i.charCodeAt(i.length - 2)) {
30
+ if (i.length > 2) {
31
+ const e = i.lastIndexOf(r);
32
+ -1 === e ? (i = "", a = 0) : (i = i.slice(0, e), a = i.length - 1 - i.lastIndexOf(r)),
33
+ s = c, l = 0;
34
+ continue;
35
+ }
36
+ if (2 === i.length || 1 === i.length) {
37
+ i = "", a = 0, s = c, l = 0;
38
+ continue;
39
+ }
40
+ }
41
+ t && (i.length > 0 ? i += `${r}..` : i = "..", a = 2);
42
+ } else i.length > 0 ? i += r + e.slice(s + 1, c) : i = e.slice(s + 1, c), a = c - s - 1;
43
+ s = c, l = 0;
44
+ } else 46 === o && -1 !== l ? ++l : l = -1;
45
+ }
46
+ return i;
47
+ }
48
+
49
+ function _format(e, t) {
50
+ const r = t.dir || t.root, n = t.base || (t.name || "") + (t.ext || "");
51
+ return r ? r === t.root ? r + n : r + e + n : n;
52
+ }
53
+
54
+ function assert(e, t = "") {
55
+ if (!e) throw new DenoStdInternalError(t);
56
+ }
57
+
58
+ function resolve$2(...e) {
59
+ let t = "", r = "", n = !1;
60
+ for (let o = e.length - 1; o >= -1; o--) {
61
+ let i;
62
+ if (o >= 0) i = e[o]; else if (t) {
63
+ if (null == globalThis.Deno) throw new TypeError("Resolved a relative path without a CWD.");
64
+ i = Deno.env.get(`=${t}`) || Deno.cwd(), void 0 !== i && i.slice(0, 3).toLowerCase() === `${t.toLowerCase()}\\` || (i = `${t}\\`);
65
+ } else {
66
+ if (null == globalThis.Deno) throw new TypeError("Resolved a drive-letter-less path without a CWD.");
67
+ i = Deno.cwd();
68
+ }
69
+ assertPath(i);
70
+ const a = i.length;
71
+ if (0 === a) continue;
72
+ let s = 0, l = "", c = !1;
73
+ const h = i.charCodeAt(0);
74
+ if (a > 1) if (isPathSeparator(h)) if (c = !0, isPathSeparator(i.charCodeAt(1))) {
75
+ let e = 2, t = e;
76
+ for (;e < a && !isPathSeparator(i.charCodeAt(e)); ++e) ;
77
+ if (e < a && e !== t) {
78
+ const r = i.slice(t, e);
79
+ for (t = e; e < a && isPathSeparator(i.charCodeAt(e)); ++e) ;
80
+ if (e < a && e !== t) {
81
+ for (t = e; e < a && !isPathSeparator(i.charCodeAt(e)); ++e) ;
82
+ e === a ? (l = `\\\\${r}\\${i.slice(t)}`, s = e) : e !== t && (l = `\\\\${r}\\${i.slice(t, e)}`,
83
+ s = e);
84
+ }
85
+ }
86
+ } else s = 1; else isWindowsDeviceRoot(h) && 58 === i.charCodeAt(1) && (l = i.slice(0, 2),
87
+ s = 2, a > 2 && isPathSeparator(i.charCodeAt(2)) && (c = !0, s = 3)); else isPathSeparator(h) && (s = 1,
88
+ c = !0);
89
+ if (!(l.length > 0 && t.length > 0 && l.toLowerCase() !== t.toLowerCase()) && (0 === t.length && l.length > 0 && (t = l),
90
+ n || (r = `${i.slice(s)}\\${r}`, n = c), n && t.length > 0)) break;
91
+ }
92
+ return r = normalizeString(r, !n, "\\", isPathSeparator), t + (n ? "\\" : "") + r || ".";
93
+ }
94
+
95
+ function normalize$2(e) {
96
+ assertPath(e);
97
+ const t = e.length;
98
+ if (0 === t) return ".";
99
+ let r, n = 0, o = !1;
100
+ const i = e.charCodeAt(0);
101
+ if (t > 1) if (isPathSeparator(i)) if (o = !0, isPathSeparator(e.charCodeAt(1))) {
102
+ let o = 2, i = o;
103
+ for (;o < t && !isPathSeparator(e.charCodeAt(o)); ++o) ;
104
+ if (o < t && o !== i) {
105
+ const a = e.slice(i, o);
106
+ for (i = o; o < t && isPathSeparator(e.charCodeAt(o)); ++o) ;
107
+ if (o < t && o !== i) {
108
+ for (i = o; o < t && !isPathSeparator(e.charCodeAt(o)); ++o) ;
109
+ if (o === t) return `\\\\${a}\\${e.slice(i)}\\`;
110
+ o !== i && (r = `\\\\${a}\\${e.slice(i, o)}`, n = o);
111
+ }
112
+ }
113
+ } else n = 1; else isWindowsDeviceRoot(i) && 58 === e.charCodeAt(1) && (r = e.slice(0, 2),
114
+ n = 2, t > 2 && isPathSeparator(e.charCodeAt(2)) && (o = !0, n = 3)); else if (isPathSeparator(i)) return "\\";
115
+ let a;
116
+ return a = n < t ? normalizeString(e.slice(n), !o, "\\", isPathSeparator) : "",
117
+ 0 !== a.length || o || (a = "."), a.length > 0 && isPathSeparator(e.charCodeAt(t - 1)) && (a += "\\"),
118
+ void 0 === r ? o ? a.length > 0 ? `\\${a}` : "\\" : a.length > 0 ? a : "" : o ? a.length > 0 ? `${r}\\${a}` : `${r}\\` : a.length > 0 ? r + a : r;
119
+ }
120
+
121
+ function resolve$1(...e) {
122
+ let t = "", r = !1;
123
+ for (let n = e.length - 1; n >= -1 && !r; n--) {
124
+ let o;
125
+ if (n >= 0) o = e[n]; else {
126
+ if (null == globalThis.Deno) throw new TypeError("Resolved a relative path without a CWD.");
127
+ o = Deno.cwd();
128
+ }
129
+ assertPath(o), 0 !== o.length && (t = `${o}/${t}`, r = 47 === o.charCodeAt(0));
130
+ }
131
+ return t = normalizeString(t, !r, "/", isPosixPathSeparator), r ? t.length > 0 ? `/${t}` : "/" : t.length > 0 ? t : ".";
132
+ }
133
+
134
+ function normalize$1(e) {
135
+ if (assertPath(e), 0 === e.length) return ".";
136
+ const t = 47 === e.charCodeAt(0), r = 47 === e.charCodeAt(e.length - 1);
137
+ return 0 !== (e = normalizeString(e, !t, "/", isPosixPathSeparator)).length || t || (e = "."),
138
+ e.length > 0 && r && (e += "/"), t ? `/${e}` : e;
139
+ }
140
+
141
+ function globToRegExp(e, {extended: t = !1, globstar: r = !0} = {}) {
142
+ const n = function o(e, {extended: t = !1, globstar: r = !1, strict: n = !1, filepath: i = !1, flags: a = ""} = {}) {
143
+ function s(e, t = {
144
+ split: !1,
145
+ last: !1,
146
+ only: ""
147
+ }) {
148
+ const {split: r, last: n, only: o} = t;
149
+ "path" !== o && (c += e), i && "regex" !== o && (u += e.match(l) ? SEP : e, r ? (n && (h += e),
150
+ "" !== h && (a.includes("g") || (h = `^${h}$`), d.push(new RegExp(h, a))), h = "") : h += e);
151
+ }
152
+ const l = new RegExp(`^${SEP}${n ? "" : "+"}$`);
153
+ let c = "", h = "", u = "";
154
+ const d = [];
155
+ let f = !1, m = !1;
156
+ const g = [];
157
+ let p, y;
158
+ for (let o = 0; o < e.length; o++) if (p = e[o], y = e[o + 1], [ "\\", "$", "^", ".", "=" ].includes(p)) s(`\\${p}`); else if (p.match(l)) s(SEP, {
159
+ split: !0
160
+ }), null != y && y.match(l) && !n && (c += "?"); else if ("(" !== p) if (")" !== p) if ("|" !== p) if ("+" !== p) if ("@" === p && t && "(" === y) g.push(p); else if ("!" !== p) if ("?" !== p) if ("[" !== p) if ("]" !== p) if ("{" !== p) if ("}" !== p) if ("," !== p) if ("*" !== p) s(p); else {
161
+ if ("(" === y && t) {
162
+ g.push(p);
163
+ continue;
164
+ }
165
+ const n = e[o - 1];
166
+ let i = 1;
167
+ for (;"*" === e[o + 1]; ) i++, o++;
168
+ const a = e[o + 1];
169
+ r ? i > 1 && [ SEP_RAW, "/", void 0 ].includes(n) && [ SEP_RAW, "/", void 0 ].includes(a) ? (s(GLOBSTAR, {
170
+ only: "regex"
171
+ }), s(GLOBSTAR_SEGMENT, {
172
+ only: "path",
173
+ last: !0,
174
+ split: !0
175
+ }), o++) : (s(WILDCARD, {
176
+ only: "regex"
177
+ }), s(WILDCARD_SEGMENT, {
178
+ only: "path"
179
+ })) : s(".*");
180
+ } else {
181
+ if (f) {
182
+ s("|");
183
+ continue;
184
+ }
185
+ s(`\\${p}`);
186
+ } else {
187
+ if (t) {
188
+ f = !1, s(")");
189
+ continue;
190
+ }
191
+ s(`\\${p}`);
192
+ } else {
193
+ if (t) {
194
+ f = !0, s("(?:");
195
+ continue;
196
+ }
197
+ s(`\\${p}`);
198
+ } else {
199
+ if (t) {
200
+ m = !1, s(p);
201
+ continue;
202
+ }
203
+ s(`\\${p}`);
204
+ } else {
205
+ if (m && ":" === y) {
206
+ o++;
207
+ let t = "";
208
+ for (;":" !== e[++o]; ) t += e[o];
209
+ "alnum" === t ? s("(?:\\w|\\d)") : "space" === t ? s("\\s") : "digit" === t && s("\\d"),
210
+ o++;
211
+ continue;
212
+ }
213
+ if (t) {
214
+ m = !0, s(p);
215
+ continue;
216
+ }
217
+ s(`\\${p}`);
218
+ } else {
219
+ if (t) {
220
+ "(" === y ? g.push(p) : s(".");
221
+ continue;
222
+ }
223
+ s(`\\${p}`);
224
+ } else {
225
+ if (t) {
226
+ if (m) {
227
+ s("^");
228
+ continue;
229
+ }
230
+ if ("(" === y) {
231
+ g.push(p), s("(?!"), o++;
232
+ continue;
233
+ }
234
+ s(`\\${p}`);
235
+ continue;
236
+ }
237
+ s(`\\${p}`);
238
+ } else {
239
+ if ("(" === y && t) {
240
+ g.push(p);
241
+ continue;
242
+ }
243
+ s(`\\${p}`);
244
+ } else {
245
+ if (g.length) {
246
+ s(p);
247
+ continue;
248
+ }
249
+ s(`\\${p}`);
250
+ } else {
251
+ if (g.length) {
252
+ s(p);
253
+ const e = g.pop();
254
+ s("@" === e ? "{1}" : "!" === e ? WILDCARD : e);
255
+ continue;
256
+ }
257
+ s(`\\${p}`);
258
+ } else {
259
+ if (g.length) {
260
+ s(`${p}?:`);
261
+ continue;
262
+ }
263
+ s(`\\${p}`);
264
+ }
265
+ a.includes("g") || (c = `^${c}$`, h = `^${h}$`, i && (u = `^${u}$`));
266
+ const w = {
267
+ regex: new RegExp(c, a)
268
+ };
269
+ return i && (d.push(new RegExp(h, a)), w.path = {
270
+ regex: new RegExp(u, a),
271
+ segments: d,
272
+ globstar: new RegExp(a.includes("g") ? GLOBSTAR_SEGMENT : `^${GLOBSTAR_SEGMENT}$`, a)
273
+ }), w;
274
+ }(e, {
275
+ extended: t,
276
+ globstar: r,
277
+ strict: !1,
278
+ filepath: !0
279
+ });
280
+ return assert(null != n.path), n.path.regex;
281
+ }
282
+
283
+ function isGlob(e) {
284
+ const t = {
285
+ "{": "}",
286
+ "(": ")",
287
+ "[": "]"
288
+ }, r = /\\(.)|(^!|\*|[\].+)]\?|\[[^\\\]]+\]|\{[^\\}]+\}|\(\?[:!=][^\\)]+\)|\([^|]+\|[^\\)]+\))/;
289
+ if ("" === e) return !1;
290
+ let n;
291
+ for (;n = r.exec(e); ) {
292
+ if (n[2]) return !0;
293
+ let r = n.index + n[0].length;
294
+ const o = n[1], i = o ? t[o] : null;
295
+ if (o && i) {
296
+ const t = e.indexOf(i, r);
297
+ -1 !== t && (r = t + 1);
298
+ }
299
+ e = e.slice(r);
300
+ }
301
+ return !1;
302
+ }
303
+
304
+ function joinGlobs(e, {extended: t = !1, globstar: r = !1} = {}) {
305
+ if (!r || 0 == e.length) return join(...e);
306
+ if (0 === e.length) return ".";
307
+ let n;
308
+ for (const t of e) {
309
+ const e = t;
310
+ e.length > 0 && (n ? n += `${SEP$1}${e}` : n = e);
311
+ }
312
+ return n ? function o(e, {globstar: t = !1} = {}) {
313
+ if (e.match(/\0/g)) throw new Error(`Glob contains invalid characters: "${e}"`);
314
+ if (!t) return normalize(e);
315
+ const r = SEP_PATTERN.source, n = new RegExp(`(?<=(${r}|^)\\*\\*${r})\\.\\.(?=${r}|$)`, "g");
316
+ return normalize(e.replace(n, "\0")).replace(/\0/g, "..");
317
+ }(n, {
318
+ extended: t,
319
+ globstar: r
320
+ }) : ".";
321
+ }
322
+
323
+ function code(e, t) {
324
+ return {
325
+ open: `[${e.join(";")}m`,
326
+ close: `[${t}m`,
327
+ regexp: new RegExp(`\\x1b\\[${t}m`, "g")
328
+ };
329
+ }
330
+
331
+ function run(e, t) {
332
+ return enabled ? `${t.open}${e.replace(t.regexp, t.open)}${t.close}` : e;
333
+ }
334
+
335
+ async function createWalkEntry(e) {
336
+ e = normalize(e);
337
+ const t = basename(e), r = await Deno.stat(e);
338
+ return {
339
+ path: e,
340
+ name: t,
341
+ isFile: r.isFile,
342
+ isDirectory: r.isDirectory,
343
+ isSymlink: r.isSymlink
344
+ };
345
+ }
346
+
347
+ function include(e, t, r, n) {
348
+ return !(t && !t.some((t => e.endsWith(t))) || r && !r.some((t => !!e.match(t))) || n && n.some((t => !!e.match(t))));
349
+ }
350
+
351
+ async function* walk(e, {maxDepth: t = 1 / 0, includeFiles: r = !0, includeDirs: n = !0, followSymlinks: o = !1, exts: i, match: a, skip: s} = {}) {
352
+ if (!(t < 0) && (n && include(e, i, a, s) && (yield await createWalkEntry(e)), !(t < 1) && include(e, void 0, void 0, s))) for await (const l of Deno.readDir(e)) {
353
+ if (l.isSymlink) {
354
+ if (o) throw new Error("unimplemented");
355
+ continue;
356
+ }
357
+ assert(null != l.name);
358
+ const c = join(e, l.name);
359
+ l.isFile ? r && include(c, i, a, s) && (yield {
360
+ path: c,
361
+ ...l
362
+ }) : yield* walk(c, {
363
+ maxDepth: t - 1,
364
+ includeFiles: r,
365
+ includeDirs: n,
366
+ followSymlinks: o,
367
+ exts: i,
368
+ match: a,
369
+ skip: s
370
+ });
371
+ }
372
+ }
373
+
374
+ function throwUnlessNotFound(e) {
375
+ if (!(e instanceof Deno.errors.NotFound)) throw e;
376
+ }
377
+
378
+ function comparePath(e, t) {
379
+ return e.path < t.path ? -1 : e.path > t.path ? 1 : 0;
380
+ }
381
+
382
+ async function denoCopyTasks(e, t, r) {
383
+ const n = {
384
+ diagnostics: [],
385
+ dirPaths: [],
386
+ filePaths: []
387
+ };
388
+ try {
389
+ i = await Promise.all(t.map((e => async function t(e, r) {
390
+ return isGlob(e.src) ? await async function n(e, t) {
391
+ const r = [];
392
+ for await (const n of async function* n(e, {root: t = Deno.cwd(), exclude: r = [], includeDirs: o = !0, extended: i = !1, globstar: a = !1} = {}) {
393
+ async function* s(e, t) {
394
+ if (e.isDirectory) if (".." != t) {
395
+ if ("**" == t) return yield* walk(e.path, {
396
+ includeFiles: !1,
397
+ skip: u
398
+ });
399
+ yield* walk(e.path, {
400
+ maxDepth: 1,
401
+ match: [ globToRegExp(joinGlobs([ e.path, t ], l), l) ],
402
+ skip: u
403
+ });
404
+ } else {
405
+ const t = joinGlobs([ e.path, ".." ], l);
406
+ try {
407
+ if ((e => !u.some((t => !!e.match(t))))(t)) return yield await createWalkEntry(t);
408
+ } catch (e) {
409
+ throwUnlessNotFound(e);
410
+ }
411
+ }
412
+ }
413
+ const l = {
414
+ extended: i,
415
+ globstar: a
416
+ }, c = isAbsolute(t) ? normalize(t) : joinGlobs([ Deno.cwd(), t ], l), h = e => isAbsolute(e) ? normalize(e) : joinGlobs([ c, e ], l), u = r.map(h).map((e => globToRegExp(e, l))), {segments: d, hasTrailingSep: f, winRoot: m} = function g(e) {
417
+ const t = SEP_PATTERN.source, r = e.replace(new RegExp(`^${t}|${t}$`, "g"), "").split(SEP_PATTERN), n = isAbsolute(e);
418
+ return {
419
+ segments: r,
420
+ isAbsolute: n,
421
+ hasTrailingSep: !!e.match(new RegExp(`${t}$`)),
422
+ winRoot: isWindows && n ? r.shift() : void 0
423
+ };
424
+ }(h(e));
425
+ let p, y = null != m ? m : "/";
426
+ for (;d.length > 0 && !isGlob(d[0]); ) {
427
+ const e = d.shift();
428
+ assert(null != e), y = joinGlobs([ y, e ], l);
429
+ }
430
+ try {
431
+ p = await createWalkEntry(y);
432
+ } catch (e) {
433
+ return throwUnlessNotFound(e);
434
+ }
435
+ let w = [ p ];
436
+ for (const e of d) {
437
+ const t = new Map;
438
+ for (const r of w) for await (const n of s(r, e)) t.set(n.path, n);
439
+ w = [ ...t.values() ].sort(comparePath);
440
+ }
441
+ f && (w = w.filter((e => e.isDirectory))), o || (w = w.filter((e => !e.isDirectory))),
442
+ yield* w;
443
+ }(e.src, {
444
+ root: t
445
+ })) {
446
+ const o = createGlobCopyTask(e, t, n.name);
447
+ r.push(o);
448
+ }
449
+ return r;
450
+ }(e, r) : [ {
451
+ src: getSrcAbsPath(r, e.src),
452
+ dest: e.keepDirStructure ? join(e.dest, e.src) : e.dest,
453
+ warn: e.warn,
454
+ keepDirStructure: e.keepDirStructure
455
+ } ];
456
+ }(e, r)))), t = i.flat ? i.flat(1) : i.reduce(((e, t) => (e.push(...t), e)), []);
457
+ const o = [];
458
+ for (;t.length > 0; ) {
459
+ const r = t.splice(0, 100);
460
+ await Promise.all(r.map((t => processCopyTask(e, n, o, t))));
461
+ }
462
+ const a = function o(e) {
463
+ const t = [];
464
+ return e.forEach((e => {
465
+ !function r(e, t) {
466
+ (t = normalizePath(t)) !== ROOT_DIR && t + "/" !== ROOT_DIR && "" !== t && (e.includes(t) || e.push(t));
467
+ }(t, dirname(e.dest));
468
+ })), t.sort(((e, t) => {
469
+ const r = e.split("/").length, n = t.split("/").length;
470
+ return r < n ? -1 : r > n ? 1 : e < t ? -1 : e > t ? 1 : 0;
471
+ })), t;
472
+ }(o);
473
+ try {
474
+ await Promise.all(a.map((t => e.mkdir(t, {
475
+ recursive: !0
476
+ }))));
477
+ } catch (e) {}
478
+ for (;o.length > 0; ) {
479
+ const t = o.splice(0, 100);
480
+ await Promise.all(t.map((t => e.copyFile(t.src, t.dest))));
481
+ }
482
+ } catch (e) {
483
+ catchError(n.diagnostics, e);
484
+ }
485
+ var i;
486
+ return n;
487
+ }
488
+
489
+ function getSrcAbsPath(e, t) {
490
+ return isAbsolute(t) ? t : join(e, t);
491
+ }
492
+
493
+ function createGlobCopyTask(e, t, r) {
494
+ const n = join(e.dest, e.keepDirStructure ? r : basename(r));
495
+ return {
496
+ src: join(t, r),
497
+ dest: n,
498
+ warn: e.warn,
499
+ keepDirStructure: e.keepDirStructure
500
+ };
501
+ }
502
+
503
+ async function processCopyTask(e, t, r, n) {
504
+ try {
505
+ n.src = normalizePath(n.src), n.dest = normalizePath(n.dest), (await e.stat(n.src)).isDirectory ? (t.dirPaths.includes(n.dest) || t.dirPaths.push(n.dest),
506
+ await async function o(e, t, r, n) {
507
+ try {
508
+ for await (const o of e.readDir(n.src)) {
509
+ const i = {
510
+ src: join(n.src, o.name),
511
+ dest: join(n.dest, o.name),
512
+ warn: n.warn
513
+ };
514
+ await processCopyTask(e, t, r, i);
515
+ }
516
+ } catch (e) {
517
+ catchError(t.diagnostics, e);
518
+ }
519
+ }(e, t, r, n)) : function i(e) {
520
+ return e = e.trim().toLowerCase(), IGNORE.some((t => e.endsWith(t)));
521
+ }(n.src) || (t.filePaths.includes(n.dest) || t.filePaths.push(n.dest), r.push(n));
522
+ } catch (e) {
523
+ !1 !== n.warn && (buildError(t.diagnostics).messageText = e.message);
524
+ }
525
+ }
526
+
527
+ function createDenoSys(e = {}) {
528
+ let t, r, n, o, i = null, a = new URL("../../compiler/rindo.js", import.meta.url).href;
529
+ const s = e.Deno || globalThis.Deno, l = new Set, c = isRemoteUrl(import.meta.url), h = async (e, t, r) => {
530
+ try {
531
+ return void await s.stat(r);
532
+ } catch (e) {}
533
+ try {
534
+ const n = await fetch(t);
535
+ if (n.ok) {
536
+ const e = dirname(r);
537
+ try {
538
+ await s.mkdir(e, {
539
+ recursive: !0
540
+ });
541
+ } catch (e) {}
542
+ const t = await n.clone().text(), o = new TextEncoder;
543
+ await s.writeFile(r, o.encode(t));
544
+ } else buildError(e).messageText = `Unable to fetch: ${t}, ${n.status}`;
545
+ } catch (t) {
546
+ catchError(e, t);
547
+ }
548
+ }, u = {
549
+ name: "deno",
550
+ version: s.version.deno,
551
+ async access(e) {
552
+ try {
553
+ return await s.stat(e), !0;
554
+ } catch (e) {
555
+ return !1;
556
+ }
557
+ },
558
+ accessSync(e) {
559
+ try {
560
+ return s.statSync(e), !0;
561
+ } catch (e) {
562
+ return !1;
563
+ }
564
+ },
565
+ addDestory(e) {
566
+ l.add(e);
567
+ },
568
+ removeDestory(e) {
569
+ l.delete(e);
570
+ },
571
+ async copyFile(e, t) {
572
+ try {
573
+ return await s.copyFile(e, t), !0;
574
+ } catch (e) {
575
+ return !1;
576
+ }
577
+ },
578
+ async createDir(e, t) {
579
+ const r = {
580
+ basename: basename(e),
581
+ dirname: dirname(e),
582
+ path: e,
583
+ newDirs: [],
584
+ error: null
585
+ };
586
+ try {
587
+ await s.mkdir(e, t);
588
+ } catch (e) {
589
+ r.error = e;
590
+ }
591
+ return r;
592
+ },
593
+ createDirSync(e, t) {
594
+ const r = {
595
+ basename: basename(e),
596
+ dirname: dirname(e),
597
+ path: e,
598
+ newDirs: [],
599
+ error: null
600
+ };
601
+ try {
602
+ s.mkdirSync(e, t);
603
+ } catch (e) {
604
+ r.error = e;
605
+ }
606
+ return r;
607
+ },
608
+ createWorkerController: e => ((e, t) => {
609
+ let r = 0, n = !1, o = !1, i = 0;
610
+ const a = new Map, s = [], l = [], c = Math.max(Math.min(t, e.hardwareConcurrency), 2) - 1, h = new Map, u = e => console.error(e), d = () => {
611
+ const e = new URL("./worker.js", import.meta.url).href, t = {
612
+ name: "rindo.worker." + i++,
613
+ type: "module",
614
+ deno: !0
615
+ }, r = new Worker(e, t), o = {
616
+ worker: r,
617
+ activeTasks: 0,
618
+ sendQueue: []
619
+ };
620
+ return r.onerror = u, r.onmessage = e => ((e, t) => {
621
+ if (!n) {
622
+ const r = t.data;
623
+ if (Array.isArray(r)) for (const t of r) if (t) {
624
+ const r = a.get(t.rindoId);
625
+ r ? (a.delete(t.rindoId), t.rindoRtnError ? r.reject(t.rindoRtnError) : r.resolve(t.rindoRtnValue),
626
+ e.activeTasks--, (e.activeTasks < 0 || e.activeTasks > 50) && (e.activeTasks = 0)) : t.rindoRtnError && console.error(t.rindoRtnError);
627
+ }
628
+ }
629
+ })(o, e), o;
630
+ }, f = e => {
631
+ e.sendQueue.length > 0 && (e.worker.postMessage(e.sendQueue), e.sendQueue.length = 0);
632
+ }, m = e => {
633
+ let t;
634
+ if (l.length > 0) {
635
+ if (t = l[0], c > 1) {
636
+ for (const e of l) e.activeTasks < t.activeTasks && (t = e);
637
+ t.activeTasks > 0 && l.length < c && (t = d(), l.push(t));
638
+ }
639
+ } else t = d(), l.push(t);
640
+ t.activeTasks++, t.sendQueue.push(e);
641
+ }, g = () => {
642
+ o = !1, s.forEach(m), s.length = 0, l.forEach(f);
643
+ }, p = (...e) => new Promise(((t, i) => {
644
+ if (n) i(TASK_CANCELED_MSG); else {
645
+ const n = {
646
+ rindoId: r++,
647
+ args: e
648
+ };
649
+ s.push(n), h.set(n.rindoId, Date.now()), a.set(n.rindoId, {
650
+ resolve: t,
651
+ reject: i
652
+ }), o || (o = !0, queueMicrotask(g));
653
+ }
654
+ }));
655
+ return {
656
+ send: p,
657
+ destroy: () => {
658
+ n = !0, a.forEach((e => e.reject(TASK_CANCELED_MSG))), a.clear(), l.forEach((e => e.worker.terminate())),
659
+ l.length = 0;
660
+ },
661
+ handler: e => function(...t) {
662
+ return p(e, ...t);
663
+ },
664
+ maxWorkers: c
665
+ };
666
+ })(u, e),
667
+ async destroy() {
668
+ const e = [];
669
+ l.forEach((t => {
670
+ try {
671
+ const r = t();
672
+ r && r.then && e.push(r);
673
+ } catch (e) {
674
+ console.error(`node sys destroy: ${e}`);
675
+ }
676
+ })), await Promise.all(e), l.clear();
677
+ },
678
+ dynamicImport: e => (c && (e = (e => (!isString(e) || isRemoteUrl(e) || isFileUrl(e) || (e = isFileUrl(e) ? new URL(e).href : (e = normalizePath(e)).startsWith("/") ? "file://" + e : "file:///" + e),
679
+ e))(e)), import(`${e}?2.5.2`)),
680
+ encodeToBase64: e => Buffer.from(e).toString("base64"),
681
+ async ensureDependencies(e) {
682
+ const i = e.logger.createTimeSpan("ensure dependencies start", !0), s = [], l = e.dependencies.find((e => "@rindo/core" === e.name)), c = e.dependencies.find((e => "typescript" === e.name));
683
+ r = new URL("../../compiler/rindo.js", import.meta.url).href, isRemoteUrl(r) || (r = u.getRemoteModuleUrl({
684
+ moduleId: l.name,
685
+ version: l.version,
686
+ path: l.main
687
+ })), t = new URL("../../", r), a = u.getLocalModulePath({
688
+ rootDir: e.rootDir,
689
+ moduleId: l.name,
690
+ path: l.main
691
+ }), n = u.getRemoteModuleUrl({
692
+ moduleId: c.name,
693
+ version: c.version,
694
+ path: c.main
695
+ }), o = u.getLocalModulePath({
696
+ rootDir: e.rootDir,
697
+ moduleId: c.name,
698
+ path: c.main
699
+ });
700
+ const d = h(s, r, a), f = h(s, n, o);
701
+ return await Promise.all([ d, f ]), u.getCompilerExecutingPath = () => a, i.finish("ensure dependencies end"),
702
+ {
703
+ rindoPath: a,
704
+ typescriptPath: o,
705
+ diagnostics: s
706
+ };
707
+ },
708
+ async ensureResources(e) {
709
+ const r = e.dependencies.find((e => "@rindo/core" === e.name)), n = e.dependencies.find((e => "typescript" === e.name)), o = [], i = u.getLocalModulePath({
710
+ rootDir: e.rootDir,
711
+ moduleId: r.name,
712
+ path: "package.json"
713
+ }), a = u.getLocalModulePath({
714
+ rootDir: e.rootDir,
715
+ moduleId: n.name,
716
+ path: "package.json"
717
+ }), s = u.access(i), l = u.access(a), c = await s, h = await l;
718
+ if (c || (e.logger.debug(`rindoBaseUrl: ${t.href}`), r.resources.forEach((n => {
719
+ o.push({
720
+ url: new URL(n, t).href,
721
+ path: u.getLocalModulePath({
722
+ rootDir: e.rootDir,
723
+ moduleId: r.name,
724
+ path: n
725
+ })
726
+ });
727
+ }))), h || n.resources.forEach((t => {
728
+ o.push({
729
+ url: u.getRemoteModuleUrl({
730
+ moduleId: n.name,
731
+ version: n.version,
732
+ path: t
733
+ }),
734
+ path: u.getLocalModulePath({
735
+ rootDir: e.rootDir,
736
+ moduleId: n.name,
737
+ path: t
738
+ })
739
+ });
740
+ })), o.length > 0) {
741
+ console.log(o);
742
+ const t = new Set, r = e.logger.createTimeSpan("ensure resources start", !0);
743
+ await Promise.all(o.map((async r => {
744
+ const n = await fetch(r.url);
745
+ if (n.ok) {
746
+ const e = n.text(), o = dirname(r.path);
747
+ t.has(o) || (u.createDir(o, {
748
+ recursive: !0
749
+ }), t.add(o)), await u.writeFile(r.path, await e);
750
+ } else e.logger.error(`unable to fetch: ${r.url}`);
751
+ }))), r.finish(`ensure resources end: ${o.length}`);
752
+ }
753
+ },
754
+ exit: async e => {
755
+ s.exit(e);
756
+ },
757
+ getCompilerExecutingPath: () => a,
758
+ getCurrentDirectory: () => normalizePath(s.cwd()),
759
+ getEnvironmentVar: e => s.env.get(e),
760
+ getLocalModulePath: e => join(e.rootDir, "node_modules", e.moduleId, e.path),
761
+ getRemoteModuleUrl: e => {
762
+ const t = `${e.moduleId}${e.version ? "@" + e.version : ""}/${e.path}`;
763
+ return new URL(t, "https://cdn.jsdelivr.net/npm/").href;
764
+ },
765
+ glob: (e, t) => null,
766
+ hardwareConcurrency: 0,
767
+ async isSymbolicLink(e) {
768
+ try {
769
+ return (await s.stat(e)).isSymlink;
770
+ } catch (e) {
771
+ return !1;
772
+ }
773
+ },
774
+ nextTick: queueMicrotask,
775
+ normalizePath,
776
+ platformPath: {
777
+ basename,
778
+ dirname,
779
+ extname,
780
+ isAbsolute,
781
+ join,
782
+ normalize,
783
+ parse,
784
+ relative,
785
+ resolve,
786
+ sep,
787
+ delimiter,
788
+ posix,
789
+ win32
790
+ },
791
+ async readDir(e) {
792
+ const t = [];
793
+ try {
794
+ for await (const r of s.readDir(e)) t.push(join(e, r.name));
795
+ } catch (e) {}
796
+ return t;
797
+ },
798
+ readDirSync(e) {
799
+ const t = [];
800
+ try {
801
+ for (const r of s.readDirSync(e)) t.push(join(e, r.name));
802
+ } catch (e) {}
803
+ return t;
804
+ },
805
+ async readFile(e, t) {
806
+ try {
807
+ const r = await s.readFile(e);
808
+ return "binary" === t ? r : new TextDecoder("utf-8").decode(r);
809
+ } catch (e) {}
810
+ },
811
+ readFileSync(e) {
812
+ try {
813
+ const t = new TextDecoder("utf-8"), r = s.readFileSync(e);
814
+ return t.decode(r);
815
+ } catch (e) {}
816
+ },
817
+ async realpath(e) {
818
+ const t = {
819
+ error: null,
820
+ path: void 0
821
+ };
822
+ try {
823
+ t.path = await s.realPath(e);
824
+ } catch (e) {
825
+ t.error = e;
826
+ }
827
+ return t;
828
+ },
829
+ realpathSync(e) {
830
+ const t = {
831
+ error: null,
832
+ path: void 0
833
+ };
834
+ try {
835
+ t.path = s.realPathSync(e);
836
+ } catch (e) {
837
+ t.error = e;
838
+ }
839
+ return t;
840
+ },
841
+ async rename(e, t) {
842
+ const r = {
843
+ oldPath: e,
844
+ newPath: t,
845
+ error: null,
846
+ oldDirs: [],
847
+ oldFiles: [],
848
+ newDirs: [],
849
+ newFiles: [],
850
+ renamed: [],
851
+ isFile: !1,
852
+ isDirectory: !1
853
+ };
854
+ try {
855
+ await s.rename(e, t);
856
+ } catch (e) {
857
+ r.error = e;
858
+ }
859
+ return r;
860
+ },
861
+ resolvePath: e => normalizePath(e),
862
+ async removeDir(e, t) {
863
+ const r = {
864
+ basename: basename(e),
865
+ dirname: dirname(e),
866
+ path: e,
867
+ removedDirs: [],
868
+ removedFiles: [],
869
+ error: null
870
+ };
871
+ try {
872
+ await s.remove(e, t);
873
+ } catch (e) {
874
+ r.error = e;
875
+ }
876
+ return r;
877
+ },
878
+ removeDirSync(e, t) {
879
+ const r = {
880
+ basename: basename(e),
881
+ dirname: dirname(e),
882
+ path: e,
883
+ removedDirs: [],
884
+ removedFiles: [],
885
+ error: null
886
+ };
887
+ try {
888
+ s.removeSync(e, t);
889
+ } catch (e) {
890
+ r.error = e;
891
+ }
892
+ return r;
893
+ },
894
+ async removeFile(e) {
895
+ const t = {
896
+ basename: basename(e),
897
+ dirname: dirname(e),
898
+ path: e,
899
+ error: null
900
+ };
901
+ try {
902
+ await s.remove(e);
903
+ } catch (e) {
904
+ t.error = e;
905
+ }
906
+ return t;
907
+ },
908
+ removeFileSync(e) {
909
+ const t = {
910
+ basename: basename(e),
911
+ dirname: dirname(e),
912
+ path: e,
913
+ error: null
914
+ };
915
+ try {
916
+ s.removeSync(e);
917
+ } catch (e) {
918
+ t.error = e;
919
+ }
920
+ return t;
921
+ },
922
+ async stat(e) {
923
+ try {
924
+ const t = s.statSync(e);
925
+ return {
926
+ isDirectory: t.isDirectory,
927
+ isFile: t.isFile,
928
+ isSymbolicLink: t.isSymlink,
929
+ size: t.size,
930
+ mtimeMs: t.mtime.getTime(),
931
+ error: null
932
+ };
933
+ } catch (e) {
934
+ return {
935
+ isDirectory: !1,
936
+ isFile: !1,
937
+ isSymbolicLink: !1,
938
+ size: 0,
939
+ mtimeMs: 0,
940
+ error: e
941
+ };
942
+ }
943
+ },
944
+ statSync(e) {
945
+ try {
946
+ const t = s.statSync(e);
947
+ return {
948
+ isDirectory: t.isDirectory,
949
+ isFile: t.isFile,
950
+ isSymbolicLink: t.isSymlink,
951
+ size: t.size,
952
+ mtimeMs: t.mtime.getTime(),
953
+ error: null
954
+ };
955
+ } catch (e) {
956
+ return {
957
+ isDirectory: !1,
958
+ isFile: !1,
959
+ isSymbolicLink: !1,
960
+ size: 0,
961
+ mtimeMs: 0,
962
+ error: e
963
+ };
964
+ }
965
+ },
966
+ tmpDirSync: () => (null == i && (i = dirname(s.makeTempDirSync())), i),
967
+ async writeFile(e, t) {
968
+ const r = {
969
+ path: e,
970
+ error: null
971
+ };
972
+ try {
973
+ const r = new TextEncoder;
974
+ await s.writeFile(e, r.encode(t));
975
+ } catch (e) {
976
+ r.error = e;
977
+ }
978
+ return r;
979
+ },
980
+ writeFileSync(e, t) {
981
+ const r = {
982
+ path: e,
983
+ error: null
984
+ };
985
+ try {
986
+ const r = new TextEncoder;
987
+ s.writeFileSync(e, r.encode(t));
988
+ } catch (e) {
989
+ r.error = e;
990
+ }
991
+ return r;
992
+ },
993
+ watchDirectory(e, t, r) {
994
+ const n = s.watchFs(e, {
995
+ recursive: r
996
+ });
997
+ (async () => {
998
+ try {
999
+ for await (const e of n) for (const r of e.paths) {
1000
+ const n = normalizePath(r);
1001
+ "create" === e.kind ? (t(n, "dirAdd"), u.events.emit("dirAdd", n)) : "modify" === e.kind ? (t(n, "fileUpdate"),
1002
+ u.events.emit("fileUpdate", n)) : "remove" === e.kind && (t(n, "dirDelete"), u.events.emit("dirDelete", n));
1003
+ }
1004
+ } catch (e) {}
1005
+ })();
1006
+ const o = async () => {
1007
+ try {
1008
+ await n.return();
1009
+ } catch (e) {}
1010
+ };
1011
+ return u.addDestory(o), {
1012
+ close: o
1013
+ };
1014
+ },
1015
+ watchFile(e, t) {
1016
+ const r = s.watchFs(e, {
1017
+ recursive: !1
1018
+ });
1019
+ (async () => {
1020
+ try {
1021
+ for await (const e of r) for (const r of e.paths) {
1022
+ const n = normalizePath(r);
1023
+ "create" === e.kind ? (t(n, "fileAdd"), u.events.emit("fileAdd", n)) : "modify" === e.kind ? (t(n, "fileUpdate"),
1024
+ u.events.emit("fileUpdate", n)) : "remove" === e.kind && (t(n, "fileDelete"), u.events.emit("fileDelete", n));
1025
+ }
1026
+ } catch (e) {}
1027
+ })();
1028
+ const n = async () => {
1029
+ try {
1030
+ await r.return();
1031
+ } catch (e) {}
1032
+ };
1033
+ return u.addDestory(n), {
1034
+ close: n
1035
+ };
1036
+ },
1037
+ async generateContentHash(e) {
1038
+ const t = e.length;
1039
+ if (0 === t) return "";
1040
+ let r = 0;
1041
+ for (let n = 0; n < t; n++) r = (r << 5) - r + e.charCodeAt(n), r |= 0;
1042
+ return r < 0 && (r *= -1), r + "";
1043
+ },
1044
+ copy: (e, t) => denoCopyTasks(s, e, t),
1045
+ details: {
1046
+ cpuModel: "cpu-model",
1047
+ freemem: () => 0,
1048
+ platform: s.build.os,
1049
+ release: s.build.vendor,
1050
+ totalmem: 0
1051
+ },
1052
+ applyGlobalPatch: async e => {
1053
+ const {applyNodeCompat: t} = await import("./node-compat.js");
1054
+ t({
1055
+ fromDir: e
1056
+ });
1057
+ }
1058
+ };
1059
+ return u;
1060
+ }
1061
+
1062
+ const createTerminalLogger = e => {
1063
+ let t = "info", r = null;
1064
+ const n = [], o = e => {
1065
+ if (e.length) {
1066
+ const t = new Date, r = "[" + ("0" + t.getMinutes()).slice(-2) + ":" + ("0" + t.getSeconds()).slice(-2) + "." + Math.floor(t.getMilliseconds() / 1e3 * 10) + "]";
1067
+ e[0] = f(r) + e[0].substr(r.length);
1068
+ }
1069
+ }, i = e => {
1070
+ if (e.length) {
1071
+ const t = "[ WARN ]";
1072
+ e[0] = d(h(t)) + e[0].substr(t.length);
1073
+ }
1074
+ }, a = e => {
1075
+ if (e.length) {
1076
+ const t = "[ ERROR ]";
1077
+ e[0] = d(c(t)) + e[0].substr(t.length);
1078
+ }
1079
+ }, s = e => {
1080
+ if (e.length) {
1081
+ const t = new Date, r = "[" + ("0" + t.getMinutes()).slice(-2) + ":" + ("0" + t.getSeconds()).slice(-2) + "." + Math.floor(t.getMilliseconds() / 1e3 * 10) + "]";
1082
+ e[0] = u(r) + e[0].substr(r.length);
1083
+ }
1084
+ }, l = (t, o) => {
1085
+ if (r) {
1086
+ const r = new Date, i = ("0" + r.getHours()).slice(-2) + ":" + ("0" + r.getMinutes()).slice(-2) + ":" + ("0" + r.getSeconds()).slice(-2) + ".0" + Math.floor(r.getMilliseconds() / 1e3 * 10) + " " + ("000" + (e.memoryUsage() / 1e6).toFixed(1)).slice(-6) + "MB " + t + " " + o.join(", ");
1087
+ n.push(i);
1088
+ }
1089
+ }, c = t => e.color(t, "red"), h = t => e.color(t, "yellow"), u = t => e.color(t, "cyan"), d = t => e.color(t, "bold"), f = t => e.color(t, "dim"), m = t => e.color(t, "bgRed"), g = e => LOG_LEVELS.indexOf(e) >= LOG_LEVELS.indexOf(t), p = (t, r, n) => {
1090
+ var o, i;
1091
+ let a = t.length - r + n - 1;
1092
+ for (;t.length + INDENT.length > e.getColumns(); ) if (r > t.length - r + n && r > 5) t = t.substr(1),
1093
+ r--; else {
1094
+ if (!(a > 1)) break;
1095
+ t = t.substr(0, t.length - 1), a--;
1096
+ }
1097
+ const s = [], l = Math.max(t.length, r + n);
1098
+ for (o = 0; o < l; o++) i = t.charAt(o), o >= r && o < r + n && (i = m("" === i ? " " : i)),
1099
+ s.push(i);
1100
+ return s.join("");
1101
+ }, y = e => e.trim().startsWith("//") ? f(e) : e.split(" ").map((e => JS_KEYWORDS.indexOf(e) > -1 ? u(e) : e)).join(" "), w = e => {
1102
+ let t = !0;
1103
+ const r = [];
1104
+ for (var n = 0; n < e.length; n++) {
1105
+ const o = e.charAt(n);
1106
+ ";" === o || "{" === o ? t = !0 : ".#,:}@$[]/*".indexOf(o) > -1 && (t = !1), t && "abcdefghijklmnopqrstuvwxyz-_".indexOf(o.toLowerCase()) > -1 ? r.push(u(o)) : r.push(o);
1107
+ }
1108
+ return r.join("");
1109
+ };
1110
+ return {
1111
+ enableColors: e.enableColors,
1112
+ emoji: e.emoji,
1113
+ getLevel: () => t,
1114
+ setLevel: e => t = e,
1115
+ debug: (...t) => {
1116
+ if (g("debug")) {
1117
+ e.memoryUsage() > 0 && t.push(f(` MEM: ${(e.memoryUsage() / 1e6).toFixed(1)}MB`));
1118
+ const r = wordWrap(t, e.getColumns());
1119
+ s(r), console.log(r.join("\n"));
1120
+ }
1121
+ l("D", t);
1122
+ },
1123
+ info: (...t) => {
1124
+ if (g("info")) {
1125
+ const r = wordWrap(t, e.getColumns());
1126
+ o(r), console.log(r.join("\n"));
1127
+ }
1128
+ l("I", t);
1129
+ },
1130
+ warn: (...t) => {
1131
+ if (g("warn")) {
1132
+ const r = wordWrap(t, e.getColumns());
1133
+ i(r), console.warn("\n" + r.join("\n") + "\n");
1134
+ }
1135
+ l("W", t);
1136
+ },
1137
+ error: (...t) => {
1138
+ for (let e = 0; e < t.length; e++) if (t[e] instanceof Error) {
1139
+ const r = t[e];
1140
+ t[e] = r.message, r.stack && (t[e] += "\n" + r.stack);
1141
+ }
1142
+ if (g("error")) {
1143
+ const r = wordWrap(t, e.getColumns());
1144
+ a(r), console.error("\n" + r.join("\n") + "\n");
1145
+ }
1146
+ l("E", t);
1147
+ },
1148
+ createTimeSpan: (t, r = !1, n) => {
1149
+ const i = Date.now(), a = () => Date.now() - i, c = {
1150
+ duration: a,
1151
+ finish: (t, i, c, h) => {
1152
+ const u = a();
1153
+ let m;
1154
+ return m = u > 1e3 ? "in " + (u / 1e3).toFixed(2) + " s" : parseFloat(u.toFixed(3)) > 0 ? "in " + u + " ms" : "in less than 1 ms",
1155
+ ((t, r, n, i, a, c, h) => {
1156
+ let u = t;
1157
+ if (n && (u = e.color(t, n)), i && (u = d(u)), u += " " + f(r), c) {
1158
+ if (g("debug")) {
1159
+ const t = [ u ], r = e.memoryUsage();
1160
+ r > 0 && t.push(f(` MEM: ${(r / 1e6).toFixed(1)}MB`));
1161
+ const n = wordWrap(t, e.getColumns());
1162
+ s(n), console.log(n.join("\n"));
1163
+ }
1164
+ l("D", [ `${t} ${r}` ]);
1165
+ } else {
1166
+ const n = wordWrap([ u ], e.getColumns());
1167
+ o(n), console.log(n.join("\n")), l("I", [ `${t} ${r}` ]), h && h.push(`${t} ${r}`);
1168
+ }
1169
+ a && console.log("");
1170
+ })(t, m, i, c, h, r, n), u;
1171
+ }
1172
+ };
1173
+ return ((t, r, n) => {
1174
+ const i = [ `${t} ${f("...")}` ];
1175
+ if (r) {
1176
+ if (g("debug")) {
1177
+ e.memoryUsage() > 0 && i.push(f(` MEM: ${(e.memoryUsage() / 1e6).toFixed(1)}MB`));
1178
+ const r = wordWrap(i, e.getColumns());
1179
+ s(r), console.log(r.join("\n")), l("D", [ `${t} ...` ]);
1180
+ }
1181
+ } else {
1182
+ const r = wordWrap(i, e.getColumns());
1183
+ o(r), console.log(r.join("\n")), l("I", [ `${t} ...` ]), n && n.push(`${t} ...`);
1184
+ }
1185
+ })(t, r, n), c;
1186
+ },
1187
+ printDiagnostics: (r, n) => {
1188
+ if (!r || 0 === r.length) return;
1189
+ let l = [ "" ];
1190
+ r.forEach((r => {
1191
+ l = l.concat(((r, n) => {
1192
+ const l = wordWrap([ r.messageText ], e.getColumns());
1193
+ let c = "";
1194
+ r.header && "Build Error" !== r.header && (c += r.header), "string" == typeof r.absFilePath && "string" != typeof r.relFilePath && ("string" != typeof n && (n = e.cwd()),
1195
+ r.relFilePath = e.relativePath(n, r.absFilePath), r.relFilePath.includes("/") || (r.relFilePath = "./" + r.relFilePath));
1196
+ let d = r.relFilePath;
1197
+ return "string" != typeof d && (d = r.absFilePath), "string" == typeof d && (c.length > 0 && (c += ": "),
1198
+ c += u(d), "number" == typeof r.lineNumber && r.lineNumber > -1 && (c += f(":"),
1199
+ c += h(`${r.lineNumber}`), "number" == typeof r.columnNumber && r.columnNumber > -1 && (c += f(":"),
1200
+ c += h(`${r.columnNumber}`)))), c.length > 0 && l.unshift(INDENT + c), l.push(""),
1201
+ r.lines && r.lines.length && (prepareLines(r.lines).forEach((e => {
1202
+ if (!isMeaningfulLine(e.text)) return;
1203
+ let t = "";
1204
+ for (e.lineNumber > -1 && (t = `L${e.lineNumber}: `); t.length < INDENT.length; ) t = " " + t;
1205
+ let n = e.text;
1206
+ e.errorCharStart > -1 && (n = p(n, e.errorCharStart, e.errorLength)), t = f(t),
1207
+ "typescript" === r.language || "javascript" === r.language ? t += y(n) : "scss" === r.language || "css" === r.language ? t += w(n) : t += n,
1208
+ l.push(t);
1209
+ })), l.push("")), "error" === r.level ? a(l) : "warn" === r.level ? i(l) : "debug" === r.level ? s(l) : o(l),
1210
+ null != r.debugText && "debug" === t && (l.push(r.debugText), s(wordWrap([ r.debugText ], e.getColumns()))),
1211
+ l;
1212
+ })(r, n));
1213
+ })), console.log(l.join("\n"));
1214
+ },
1215
+ red: c,
1216
+ green: t => e.color(t, "green"),
1217
+ yellow: h,
1218
+ blue: t => e.color(t, "blue"),
1219
+ magenta: t => e.color(t, "magenta"),
1220
+ cyan: u,
1221
+ gray: t => e.color(t, "gray"),
1222
+ bold: d,
1223
+ dim: f,
1224
+ bgRed: m,
1225
+ setLogFilePath: e => r = e,
1226
+ writeLogs: t => {
1227
+ if (r) try {
1228
+ l("F", [ "--------------------------------------" ]), e.writeLogs(r, n.join("\n"), t);
1229
+ } catch (e) {}
1230
+ n.length = 0;
1231
+ }
1232
+ };
1233
+ }, LOG_LEVELS = [ "debug", "info", "warn", "error" ], wordWrap = (e, t) => {
1234
+ const r = [], n = [];
1235
+ e.forEach((e => {
1236
+ null === e ? n.push("null") : void 0 === e ? n.push("undefined") : "string" == typeof e ? e.replace(/\s/gm, " ").split(" ").forEach((e => {
1237
+ e.trim().length && n.push(e.trim());
1238
+ })) : "number" == typeof e || "boolean" == typeof e || "function" == typeof e ? n.push(e.toString()) : Array.isArray(e) || Object(e) === e ? n.push((() => e.toString())) : n.push(e.toString());
1239
+ }));
1240
+ let o = INDENT;
1241
+ return n.forEach((e => {
1242
+ r.length > 25 || ("function" == typeof e ? (o.trim().length && r.push(o), r.push(e()),
1243
+ o = INDENT) : INDENT.length + e.length > t - 1 ? (o.trim().length && r.push(o),
1244
+ r.push(INDENT + e), o = INDENT) : e.length + o.length > t - 1 ? (r.push(o), o = INDENT + e + " ") : o += e + " ");
1245
+ })), o.trim().length && r.push(o), r.map((e => e.trimRight()));
1246
+ }, prepareLines = e => {
1247
+ const t = JSON.parse(JSON.stringify(e));
1248
+ for (let e = 0; e < 100; e++) {
1249
+ if (!eachLineHasLeadingWhitespace(t)) return t;
1250
+ for (let e = 0; e < t.length; e++) if (t[e].text = t[e].text.substr(1), t[e].errorCharStart--,
1251
+ !t[e].text.length) return t;
1252
+ }
1253
+ return t;
1254
+ }, eachLineHasLeadingWhitespace = e => {
1255
+ if (!e.length) return !1;
1256
+ for (var t = 0; t < e.length; t++) {
1257
+ if (!e[t].text || e[t].text.length < 1) return !1;
1258
+ const r = e[t].text.charAt(0);
1259
+ if (" " !== r && "\t" !== r) return !1;
1260
+ }
1261
+ return !0;
1262
+ }, isMeaningfulLine = e => !!e && (e = e.trim()).length > 0, JS_KEYWORDS = [ "abstract", "any", "as", "break", "boolean", "case", "catch", "class", "console", "const", "continue", "debugger", "declare", "default", "delete", "do", "else", "enum", "export", "extends", "false", "finally", "for", "from", "function", "get", "if", "import", "in", "implements", "Infinity", "instanceof", "let", "module", "namespace", "NaN", "new", "number", "null", "public", "private", "protected", "require", "return", "static", "set", "string", "super", "switch", "this", "throw", "try", "true", "type", "typeof", "undefined", "var", "void", "with", "while", "yield" ], INDENT = " ", navigator = globalThis.navigator;
1263
+
1264
+ let isWindows$1 = !1;
1265
+
1266
+ null != globalThis.Deno ? isWindows$1 = "windows" == Deno.build.os : null != (null == navigator ? void 0 : navigator.appVersion) && (isWindows$1 = navigator.appVersion.includes("Win"));
1267
+
1268
+ class DenoStdInternalError extends Error {
1269
+ constructor(e) {
1270
+ super(e), this.name = "DenoStdInternalError";
1271
+ }
1272
+ }
1273
+
1274
+ const _win32 = {
1275
+ __proto__: null,
1276
+ sep: "\\",
1277
+ delimiter: ";",
1278
+ resolve: resolve$2,
1279
+ normalize: normalize$2,
1280
+ isAbsolute: function isAbsolute$2(e) {
1281
+ assertPath(e);
1282
+ const t = e.length;
1283
+ if (0 === t) return !1;
1284
+ const r = e.charCodeAt(0);
1285
+ return !!isPathSeparator(r) || !!(isWindowsDeviceRoot(r) && t > 2 && 58 === e.charCodeAt(1) && isPathSeparator(e.charCodeAt(2)));
1286
+ },
1287
+ join: function join$2(...e) {
1288
+ const t = e.length;
1289
+ if (0 === t) return ".";
1290
+ let r, n = null;
1291
+ for (let o = 0; o < t; ++o) {
1292
+ const t = e[o];
1293
+ assertPath(t), t.length > 0 && (void 0 === r ? r = n = t : r += `\\${t}`);
1294
+ }
1295
+ if (void 0 === r) return ".";
1296
+ let o = !0, i = 0;
1297
+ if (assert(null != n), isPathSeparator(n.charCodeAt(0))) {
1298
+ ++i;
1299
+ const e = n.length;
1300
+ e > 1 && isPathSeparator(n.charCodeAt(1)) && (++i, e > 2 && (isPathSeparator(n.charCodeAt(2)) ? ++i : o = !1));
1301
+ }
1302
+ if (o) {
1303
+ for (;i < r.length && isPathSeparator(r.charCodeAt(i)); ++i) ;
1304
+ i >= 2 && (r = `\\${r.slice(i)}`);
1305
+ }
1306
+ return normalize$2(r);
1307
+ },
1308
+ relative: function relative$2(e, t) {
1309
+ if (assertPath(e), assertPath(t), e === t) return "";
1310
+ const r = resolve$2(e), n = resolve$2(t);
1311
+ if (r === n) return "";
1312
+ if ((e = r.toLowerCase()) === (t = n.toLowerCase())) return "";
1313
+ let o = 0, i = e.length;
1314
+ for (;o < i && 92 === e.charCodeAt(o); ++o) ;
1315
+ for (;i - 1 > o && 92 === e.charCodeAt(i - 1); --i) ;
1316
+ const a = i - o;
1317
+ let s = 0, l = t.length;
1318
+ for (;s < l && 92 === t.charCodeAt(s); ++s) ;
1319
+ for (;l - 1 > s && 92 === t.charCodeAt(l - 1); --l) ;
1320
+ const c = l - s, h = a < c ? a : c;
1321
+ let u = -1, d = 0;
1322
+ for (;d <= h; ++d) {
1323
+ if (d === h) {
1324
+ if (c > h) {
1325
+ if (92 === t.charCodeAt(s + d)) return n.slice(s + d + 1);
1326
+ if (2 === d) return n.slice(s + d);
1327
+ }
1328
+ a > h && (92 === e.charCodeAt(o + d) ? u = d : 2 === d && (u = 3));
1329
+ break;
1330
+ }
1331
+ const r = e.charCodeAt(o + d);
1332
+ if (r !== t.charCodeAt(s + d)) break;
1333
+ 92 === r && (u = d);
1334
+ }
1335
+ if (d !== h && -1 === u) return n;
1336
+ let f = "";
1337
+ for (-1 === u && (u = 0), d = o + u + 1; d <= i; ++d) d !== i && 92 !== e.charCodeAt(d) || (0 === f.length ? f += ".." : f += "\\..");
1338
+ return f.length > 0 ? f + n.slice(s + u, l) : (s += u, 92 === n.charCodeAt(s) && ++s,
1339
+ n.slice(s, l));
1340
+ },
1341
+ toNamespacedPath: function toNamespacedPath$2(e) {
1342
+ if ("string" != typeof e) return e;
1343
+ if (0 === e.length) return "";
1344
+ const t = resolve$2(e);
1345
+ if (t.length >= 3) if (92 === t.charCodeAt(0)) {
1346
+ if (92 === t.charCodeAt(1)) {
1347
+ const e = t.charCodeAt(2);
1348
+ if (63 !== e && 46 !== e) return `\\\\?\\UNC\\${t.slice(2)}`;
1349
+ }
1350
+ } else if (isWindowsDeviceRoot(t.charCodeAt(0)) && 58 === t.charCodeAt(1) && 92 === t.charCodeAt(2)) return `\\\\?\\${t}`;
1351
+ return e;
1352
+ },
1353
+ dirname: function dirname$2(e) {
1354
+ assertPath(e);
1355
+ const t = e.length;
1356
+ if (0 === t) return ".";
1357
+ let r = -1, n = -1, o = !0, i = 0;
1358
+ const a = e.charCodeAt(0);
1359
+ if (t > 1) if (isPathSeparator(a)) {
1360
+ if (r = i = 1, isPathSeparator(e.charCodeAt(1))) {
1361
+ let n = 2, o = n;
1362
+ for (;n < t && !isPathSeparator(e.charCodeAt(n)); ++n) ;
1363
+ if (n < t && n !== o) {
1364
+ for (o = n; n < t && isPathSeparator(e.charCodeAt(n)); ++n) ;
1365
+ if (n < t && n !== o) {
1366
+ for (o = n; n < t && !isPathSeparator(e.charCodeAt(n)); ++n) ;
1367
+ if (n === t) return e;
1368
+ n !== o && (r = i = n + 1);
1369
+ }
1370
+ }
1371
+ }
1372
+ } else isWindowsDeviceRoot(a) && 58 === e.charCodeAt(1) && (r = i = 2, t > 2 && isPathSeparator(e.charCodeAt(2)) && (r = i = 3)); else if (isPathSeparator(a)) return e;
1373
+ for (let r = t - 1; r >= i; --r) if (isPathSeparator(e.charCodeAt(r))) {
1374
+ if (!o) {
1375
+ n = r;
1376
+ break;
1377
+ }
1378
+ } else o = !1;
1379
+ if (-1 === n) {
1380
+ if (-1 === r) return ".";
1381
+ n = r;
1382
+ }
1383
+ return e.slice(0, n);
1384
+ },
1385
+ basename: function basename$2(e, t = "") {
1386
+ if (void 0 !== t && "string" != typeof t) throw new TypeError('"ext" argument must be a string');
1387
+ assertPath(e);
1388
+ let r, n = 0, o = -1, i = !0;
1389
+ if (e.length >= 2 && isWindowsDeviceRoot(e.charCodeAt(0)) && 58 === e.charCodeAt(1) && (n = 2),
1390
+ void 0 !== t && t.length > 0 && t.length <= e.length) {
1391
+ if (t.length === e.length && t === e) return "";
1392
+ let a = t.length - 1, s = -1;
1393
+ for (r = e.length - 1; r >= n; --r) {
1394
+ const l = e.charCodeAt(r);
1395
+ if (isPathSeparator(l)) {
1396
+ if (!i) {
1397
+ n = r + 1;
1398
+ break;
1399
+ }
1400
+ } else -1 === s && (i = !1, s = r + 1), a >= 0 && (l === t.charCodeAt(a) ? -1 == --a && (o = r) : (a = -1,
1401
+ o = s));
1402
+ }
1403
+ return n === o ? o = s : -1 === o && (o = e.length), e.slice(n, o);
1404
+ }
1405
+ for (r = e.length - 1; r >= n; --r) if (isPathSeparator(e.charCodeAt(r))) {
1406
+ if (!i) {
1407
+ n = r + 1;
1408
+ break;
1409
+ }
1410
+ } else -1 === o && (i = !1, o = r + 1);
1411
+ return -1 === o ? "" : e.slice(n, o);
1412
+ },
1413
+ extname: function extname$2(e) {
1414
+ assertPath(e);
1415
+ let t = 0, r = -1, n = 0, o = -1, i = !0, a = 0;
1416
+ e.length >= 2 && 58 === e.charCodeAt(1) && isWindowsDeviceRoot(e.charCodeAt(0)) && (t = n = 2);
1417
+ for (let s = e.length - 1; s >= t; --s) {
1418
+ const t = e.charCodeAt(s);
1419
+ if (isPathSeparator(t)) {
1420
+ if (!i) {
1421
+ n = s + 1;
1422
+ break;
1423
+ }
1424
+ } else -1 === o && (i = !1, o = s + 1), 46 === t ? -1 === r ? r = s : 1 !== a && (a = 1) : -1 !== r && (a = -1);
1425
+ }
1426
+ return -1 === r || -1 === o || 0 === a || 1 === a && r === o - 1 && r === n + 1 ? "" : e.slice(r, o);
1427
+ },
1428
+ format: function format$2(e) {
1429
+ if (null === e || "object" != typeof e) throw new TypeError('The "pathObject" argument must be of type Object. Received type ' + typeof e);
1430
+ return _format("\\", e);
1431
+ },
1432
+ parse: function parse$2(e) {
1433
+ assertPath(e);
1434
+ const t = {
1435
+ root: "",
1436
+ dir: "",
1437
+ base: "",
1438
+ ext: "",
1439
+ name: ""
1440
+ }, r = e.length;
1441
+ if (0 === r) return t;
1442
+ let n = 0, o = e.charCodeAt(0);
1443
+ if (r > 1) {
1444
+ if (isPathSeparator(o)) {
1445
+ if (n = 1, isPathSeparator(e.charCodeAt(1))) {
1446
+ let t = 2, o = t;
1447
+ for (;t < r && !isPathSeparator(e.charCodeAt(t)); ++t) ;
1448
+ if (t < r && t !== o) {
1449
+ for (o = t; t < r && isPathSeparator(e.charCodeAt(t)); ++t) ;
1450
+ if (t < r && t !== o) {
1451
+ for (o = t; t < r && !isPathSeparator(e.charCodeAt(t)); ++t) ;
1452
+ t === r ? n = t : t !== o && (n = t + 1);
1453
+ }
1454
+ }
1455
+ }
1456
+ } else if (isWindowsDeviceRoot(o) && 58 === e.charCodeAt(1)) {
1457
+ if (n = 2, !(r > 2)) return t.root = t.dir = e, t;
1458
+ if (isPathSeparator(e.charCodeAt(2))) {
1459
+ if (3 === r) return t.root = t.dir = e, t;
1460
+ n = 3;
1461
+ }
1462
+ }
1463
+ } else if (isPathSeparator(o)) return t.root = t.dir = e, t;
1464
+ n > 0 && (t.root = e.slice(0, n));
1465
+ let i = -1, a = n, s = -1, l = !0, c = e.length - 1, h = 0;
1466
+ for (;c >= n; --c) if (o = e.charCodeAt(c), isPathSeparator(o)) {
1467
+ if (!l) {
1468
+ a = c + 1;
1469
+ break;
1470
+ }
1471
+ } else -1 === s && (l = !1, s = c + 1), 46 === o ? -1 === i ? i = c : 1 !== h && (h = 1) : -1 !== i && (h = -1);
1472
+ return -1 === i || -1 === s || 0 === h || 1 === h && i === s - 1 && i === a + 1 ? -1 !== s && (t.base = t.name = e.slice(a, s)) : (t.name = e.slice(a, i),
1473
+ t.base = e.slice(a, s), t.ext = e.slice(i, s)), t.dir = a > 0 && a !== n ? e.slice(0, a - 1) : t.root,
1474
+ t;
1475
+ },
1476
+ fromFileUrl: function fromFileUrl$2(e) {
1477
+ if ("file:" != (e = e instanceof URL ? e : new URL(e)).protocol) throw new TypeError("Must be a file URL.");
1478
+ let t = decodeURIComponent(e.pathname.replace(/^\/*([A-Za-z]:)(\/|$)/, "$1/").replace(/\//g, "\\"));
1479
+ return "" != e.hostname && (t = `\\\\${e.hostname}${t}`), t;
1480
+ }
1481
+ }, _posix = {
1482
+ __proto__: null,
1483
+ sep: "/",
1484
+ delimiter: ":",
1485
+ resolve: resolve$1,
1486
+ normalize: normalize$1,
1487
+ isAbsolute: function isAbsolute$1(e) {
1488
+ return assertPath(e), e.length > 0 && 47 === e.charCodeAt(0);
1489
+ },
1490
+ join: function join$1(...e) {
1491
+ if (0 === e.length) return ".";
1492
+ let t;
1493
+ for (let r = 0, n = e.length; r < n; ++r) {
1494
+ const n = e[r];
1495
+ assertPath(n), n.length > 0 && (t ? t += `/${n}` : t = n);
1496
+ }
1497
+ return t ? normalize$1(t) : ".";
1498
+ },
1499
+ relative: function relative$1(e, t) {
1500
+ if (assertPath(e), assertPath(t), e === t) return "";
1501
+ if ((e = resolve$1(e)) === (t = resolve$1(t))) return "";
1502
+ let r = 1;
1503
+ const n = e.length;
1504
+ for (;r < n && 47 === e.charCodeAt(r); ++r) ;
1505
+ const o = n - r;
1506
+ let i = 1;
1507
+ const a = t.length;
1508
+ for (;i < a && 47 === t.charCodeAt(i); ++i) ;
1509
+ const s = a - i, l = o < s ? o : s;
1510
+ let c = -1, h = 0;
1511
+ for (;h <= l; ++h) {
1512
+ if (h === l) {
1513
+ if (s > l) {
1514
+ if (47 === t.charCodeAt(i + h)) return t.slice(i + h + 1);
1515
+ if (0 === h) return t.slice(i + h);
1516
+ } else o > l && (47 === e.charCodeAt(r + h) ? c = h : 0 === h && (c = 0));
1517
+ break;
1518
+ }
1519
+ const n = e.charCodeAt(r + h);
1520
+ if (n !== t.charCodeAt(i + h)) break;
1521
+ 47 === n && (c = h);
1522
+ }
1523
+ let u = "";
1524
+ for (h = r + c + 1; h <= n; ++h) h !== n && 47 !== e.charCodeAt(h) || (0 === u.length ? u += ".." : u += "/..");
1525
+ return u.length > 0 ? u + t.slice(i + c) : (i += c, 47 === t.charCodeAt(i) && ++i,
1526
+ t.slice(i));
1527
+ },
1528
+ toNamespacedPath: function toNamespacedPath$1(e) {
1529
+ return e;
1530
+ },
1531
+ dirname: function dirname$1(e) {
1532
+ if (assertPath(e), 0 === e.length) return ".";
1533
+ const t = 47 === e.charCodeAt(0);
1534
+ let r = -1, n = !0;
1535
+ for (let t = e.length - 1; t >= 1; --t) if (47 === e.charCodeAt(t)) {
1536
+ if (!n) {
1537
+ r = t;
1538
+ break;
1539
+ }
1540
+ } else n = !1;
1541
+ return -1 === r ? t ? "/" : "." : t && 1 === r ? "//" : e.slice(0, r);
1542
+ },
1543
+ basename: function basename$1(e, t = "") {
1544
+ if (void 0 !== t && "string" != typeof t) throw new TypeError('"ext" argument must be a string');
1545
+ assertPath(e);
1546
+ let r, n = 0, o = -1, i = !0;
1547
+ if (void 0 !== t && t.length > 0 && t.length <= e.length) {
1548
+ if (t.length === e.length && t === e) return "";
1549
+ let a = t.length - 1, s = -1;
1550
+ for (r = e.length - 1; r >= 0; --r) {
1551
+ const l = e.charCodeAt(r);
1552
+ if (47 === l) {
1553
+ if (!i) {
1554
+ n = r + 1;
1555
+ break;
1556
+ }
1557
+ } else -1 === s && (i = !1, s = r + 1), a >= 0 && (l === t.charCodeAt(a) ? -1 == --a && (o = r) : (a = -1,
1558
+ o = s));
1559
+ }
1560
+ return n === o ? o = s : -1 === o && (o = e.length), e.slice(n, o);
1561
+ }
1562
+ for (r = e.length - 1; r >= 0; --r) if (47 === e.charCodeAt(r)) {
1563
+ if (!i) {
1564
+ n = r + 1;
1565
+ break;
1566
+ }
1567
+ } else -1 === o && (i = !1, o = r + 1);
1568
+ return -1 === o ? "" : e.slice(n, o);
1569
+ },
1570
+ extname: function extname$1(e) {
1571
+ assertPath(e);
1572
+ let t = -1, r = 0, n = -1, o = !0, i = 0;
1573
+ for (let a = e.length - 1; a >= 0; --a) {
1574
+ const s = e.charCodeAt(a);
1575
+ if (47 !== s) -1 === n && (o = !1, n = a + 1), 46 === s ? -1 === t ? t = a : 1 !== i && (i = 1) : -1 !== t && (i = -1); else if (!o) {
1576
+ r = a + 1;
1577
+ break;
1578
+ }
1579
+ }
1580
+ return -1 === t || -1 === n || 0 === i || 1 === i && t === n - 1 && t === r + 1 ? "" : e.slice(t, n);
1581
+ },
1582
+ format: function format$1(e) {
1583
+ if (null === e || "object" != typeof e) throw new TypeError('The "pathObject" argument must be of type Object. Received type ' + typeof e);
1584
+ return _format("/", e);
1585
+ },
1586
+ parse: function parse$1(e) {
1587
+ assertPath(e);
1588
+ const t = {
1589
+ root: "",
1590
+ dir: "",
1591
+ base: "",
1592
+ ext: "",
1593
+ name: ""
1594
+ };
1595
+ if (0 === e.length) return t;
1596
+ const r = 47 === e.charCodeAt(0);
1597
+ let n;
1598
+ r ? (t.root = "/", n = 1) : n = 0;
1599
+ let o = -1, i = 0, a = -1, s = !0, l = e.length - 1, c = 0;
1600
+ for (;l >= n; --l) {
1601
+ const t = e.charCodeAt(l);
1602
+ if (47 !== t) -1 === a && (s = !1, a = l + 1), 46 === t ? -1 === o ? o = l : 1 !== c && (c = 1) : -1 !== o && (c = -1); else if (!s) {
1603
+ i = l + 1;
1604
+ break;
1605
+ }
1606
+ }
1607
+ return -1 === o || -1 === a || 0 === c || 1 === c && o === a - 1 && o === i + 1 ? -1 !== a && (t.base = t.name = 0 === i && r ? e.slice(1, a) : e.slice(i, a)) : (0 === i && r ? (t.name = e.slice(1, o),
1608
+ t.base = e.slice(1, a)) : (t.name = e.slice(i, o), t.base = e.slice(i, a)), t.ext = e.slice(o, a)),
1609
+ i > 0 ? t.dir = e.slice(0, i - 1) : r && (t.dir = "/"), t;
1610
+ },
1611
+ fromFileUrl: function fromFileUrl$1(e) {
1612
+ if ("file:" != (e = e instanceof URL ? e : new URL(e)).protocol) throw new TypeError("Must be a file URL.");
1613
+ return decodeURIComponent(e.pathname);
1614
+ }
1615
+ }, SEP$1 = isWindows$1 ? "\\" : "/", SEP_PATTERN = isWindows$1 ? /[\\/]+/ : /\/+/, SEP = isWindows$1 ? "(?:\\\\|\\/)" : "\\/", SEP_ESC = isWindows$1 ? "\\\\" : "/", SEP_RAW = isWindows$1 ? "\\" : "/", GLOBSTAR = `(?:(?:[^${SEP_ESC}/]*(?:${SEP_ESC}|/|$))*)`, WILDCARD = `(?:[^${SEP_ESC}/]*)`, GLOBSTAR_SEGMENT = `((?:[^${SEP_ESC}/]*(?:${SEP_ESC}|/|$))*)`, WILDCARD_SEGMENT = `(?:[^${SEP_ESC}/]*)`, path = isWindows$1 ? _win32 : _posix, win32 = _win32, posix = _posix, {basename, delimiter, dirname, extname, format, fromFileUrl, isAbsolute, join, normalize, parse, relative, resolve, sep, toNamespacedPath} = path;
1616
+
1617
+ var _a, _b;
1618
+
1619
+ let enabled = !(null === (_b = null === (_a = globalThis.Deno) || void 0 === _a ? void 0 : _a.noColor) || void 0 === _b || _b);
1620
+
1621
+ const isWindows = "windows" == Deno.build.os, createDenoLogger = e => {
1622
+ let t = !0;
1623
+ const r = e.Deno;
1624
+ return createTerminalLogger({
1625
+ color: (e, n) => {
1626
+ if (t && !r.noColor) switch (n) {
1627
+ case "bgRed":
1628
+ return function o(e) {
1629
+ return run(e, code([ 41 ], 49));
1630
+ }(e);
1631
+
1632
+ case "blue":
1633
+ return function i(e) {
1634
+ return run(e, code([ 34 ], 39));
1635
+ }(e);
1636
+
1637
+ case "bold":
1638
+ return function a(e) {
1639
+ return run(e, code([ 1 ], 22));
1640
+ }(e);
1641
+
1642
+ case "cyan":
1643
+ return function s(e) {
1644
+ return run(e, code([ 36 ], 39));
1645
+ }(e);
1646
+
1647
+ case "dim":
1648
+ return function l(e) {
1649
+ return run(e, code([ 2 ], 22));
1650
+ }(e);
1651
+
1652
+ case "gray":
1653
+ return function c(e) {
1654
+ return run(e, code([ 90 ], 39));
1655
+ }(e);
1656
+
1657
+ case "green":
1658
+ return function h(e) {
1659
+ return run(e, code([ 32 ], 39));
1660
+ }(e);
1661
+
1662
+ case "magenta":
1663
+ return function u(e) {
1664
+ return run(e, code([ 35 ], 39));
1665
+ }(e);
1666
+
1667
+ case "red":
1668
+ return function d(e) {
1669
+ return run(e, code([ 31 ], 39));
1670
+ }(e);
1671
+
1672
+ case "yellow":
1673
+ return function f(e) {
1674
+ return run(e, code([ 33 ], 39));
1675
+ }(e);
1676
+ }
1677
+ return e;
1678
+ },
1679
+ cwd: () => r.cwd(),
1680
+ emoji: e => "windows" !== r.build.os ? e : "",
1681
+ enableColors: e => t = e,
1682
+ getColumns: () => {
1683
+ const e = r.stdout && r.stdout.columns || 80;
1684
+ return Math.max(Math.min(120, e), 60);
1685
+ },
1686
+ memoryUsage: () => -1,
1687
+ relativePath: (e, t) => t,
1688
+ writeLogs: (e, t, n) => {
1689
+ const o = (new TextEncoder).encode(t);
1690
+ r.writeFileSync(e, o, {
1691
+ append: n
1692
+ });
1693
+ }
1694
+ });
1695
+ }, isString = e => "string" == typeof e, buildError = e => {
1696
+ const t = {
1697
+ level: "error",
1698
+ type: "build",
1699
+ header: "Build Error",
1700
+ messageText: "build error",
1701
+ relFilePath: null,
1702
+ absFilePath: null,
1703
+ lines: []
1704
+ };
1705
+ return e && e.push(t), t;
1706
+ }, catchError = (e, t, r) => {
1707
+ const n = {
1708
+ level: "error",
1709
+ type: "build",
1710
+ header: "Build Error",
1711
+ messageText: "build error",
1712
+ relFilePath: null,
1713
+ absFilePath: null,
1714
+ lines: []
1715
+ };
1716
+ return isString(r) ? n.messageText = r : null != t && (null != t.stack ? n.messageText = t.stack.toString() : null != t.message ? n.messageText = t.message.toString() : n.messageText = t.toString()),
1717
+ null == e || shouldIgnoreError(n.messageText) || e.push(n), n;
1718
+ }, shouldIgnoreError = e => e === TASK_CANCELED_MSG, TASK_CANCELED_MSG = "task canceled", normalizePath = e => {
1719
+ if ("string" != typeof e) throw new Error("invalid path to normalize");
1720
+ e = normalizeSlashes(e.trim());
1721
+ const t = pathComponents(e, getRootLength(e)), r = reducePathComponents(t), n = r[0], o = r[1], i = n + r.slice(1).join("/");
1722
+ return "" === i ? "." : "" === n && o && e.includes("/") && !o.startsWith(".") && !o.startsWith("@") ? "./" + i : i;
1723
+ }, normalizeSlashes = e => e.replace(backslashRegExp, "/"), backslashRegExp = /\\/g, reducePathComponents = e => {
1724
+ if (!Array.isArray(e) || 0 === e.length) return [];
1725
+ const t = [ e[0] ];
1726
+ for (let r = 1; r < e.length; r++) {
1727
+ const n = e[r];
1728
+ if (n && "." !== n) {
1729
+ if (".." === n) if (t.length > 1) {
1730
+ if (".." !== t[t.length - 1]) {
1731
+ t.pop();
1732
+ continue;
1733
+ }
1734
+ } else if (t[0]) continue;
1735
+ t.push(n);
1736
+ }
1737
+ }
1738
+ return t;
1739
+ }, getRootLength = e => {
1740
+ const t = getEncodedRootLength(e);
1741
+ return t < 0 ? ~t : t;
1742
+ }, getEncodedRootLength = e => {
1743
+ if (!e) return 0;
1744
+ const t = e.charCodeAt(0);
1745
+ if (47 === t || 92 === t) {
1746
+ if (e.charCodeAt(1) !== t) return 1;
1747
+ const r = e.indexOf(47 === t ? "/" : "\\", 2);
1748
+ return r < 0 ? e.length : r + 1;
1749
+ }
1750
+ if (isVolumeCharacter(t) && 58 === e.charCodeAt(1)) {
1751
+ const t = e.charCodeAt(2);
1752
+ if (47 === t || 92 === t) return 3;
1753
+ if (2 === e.length) return 2;
1754
+ }
1755
+ const r = e.indexOf("://");
1756
+ if (-1 !== r) {
1757
+ const t = r + "://".length, n = e.indexOf("/", t);
1758
+ if (-1 !== n) {
1759
+ const o = e.slice(0, r), i = e.slice(t, n);
1760
+ if ("file" === o && ("" === i || "localhost" === i) && isVolumeCharacter(e.charCodeAt(n + 1))) {
1761
+ const t = getFileUrlVolumeSeparatorEnd(e, n + 2);
1762
+ if (-1 !== t) {
1763
+ if (47 === e.charCodeAt(t)) return ~(t + 1);
1764
+ if (t === e.length) return ~t;
1765
+ }
1766
+ }
1767
+ return ~(n + 1);
1768
+ }
1769
+ return ~e.length;
1770
+ }
1771
+ return 0;
1772
+ }, isVolumeCharacter = e => e >= 97 && e <= 122 || e >= 65 && e <= 90, getFileUrlVolumeSeparatorEnd = (e, t) => {
1773
+ const r = e.charCodeAt(t);
1774
+ if (58 === r) return t + 1;
1775
+ if (37 === r && 51 === e.charCodeAt(t + 1)) {
1776
+ const r = e.charCodeAt(t + 2);
1777
+ if (97 === r || 65 === r) return t + 3;
1778
+ }
1779
+ return -1;
1780
+ }, pathComponents = (e, t) => {
1781
+ const r = e.substring(0, t), n = e.substring(t).split("/"), o = n.length;
1782
+ return o > 0 && !n[o - 1] && n.pop(), [ r, ...n ];
1783
+ }, isRemoteUrl = e => !!isString(e) && ((e = e.toLowerCase()).startsWith("https://") || e.startsWith("http://")), isFileUrl = e => !!isString(e) && e.toLowerCase().startsWith("file:/"), ROOT_DIR = normalizePath(resolve("/")), IGNORE = [ ".ds_store", ".gitignore", "desktop.ini", "thumbs.db" ];
1784
+
1785
+ export { createDenoLogger, createDenoSys };