@genome-spy/core 0.77.0 → 0.79.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (317) hide show
  1. package/dist/bundle/{browser-KWU9rWZT.js → browser-CETrb2cm.js} +53 -33
  2. package/dist/bundle/esm-BdLYkz-m.js +248 -0
  3. package/dist/bundle/esm-BwiDsqSb.js +1367 -0
  4. package/dist/bundle/esm-CDFd1cjk.js +441 -0
  5. package/dist/bundle/{esm-CRMf_I9V.js → esm-CTUHLDbv.js} +30 -30
  6. package/dist/bundle/esm-Cx-EbkOj.js +1221 -0
  7. package/dist/bundle/esm-DlYGqi79.js +128 -0
  8. package/dist/bundle/{esm-BygJiwh0.js → esm-k9p3oHkt.js} +133 -158
  9. package/dist/bundle/{esm-CT3ygiMq.js → esm-zAZJQO6D.js} +226 -212
  10. package/dist/bundle/index.es.js +14102 -10810
  11. package/dist/bundle/index.js +109 -95
  12. package/dist/bundle/{parquetRead-DG_-F5j5.js → parquetRead-Cad1SOVV.js} +473 -399
  13. package/dist/schema.json +23788 -11049
  14. package/dist/src/config/axisConfig.d.ts +2 -2
  15. package/dist/src/config/axisConfig.d.ts.map +1 -1
  16. package/dist/src/config/axisConfig.js +28 -44
  17. package/dist/src/config/configLayers.d.ts +45 -0
  18. package/dist/src/config/configLayers.d.ts.map +1 -0
  19. package/dist/src/config/configLayers.js +110 -0
  20. package/dist/src/config/defaultConfig.d.ts.map +1 -1
  21. package/dist/src/config/defaultConfig.js +8 -1
  22. package/dist/src/config/defaults/legendDefaults.d.ts +14 -0
  23. package/dist/src/config/defaults/legendDefaults.d.ts.map +1 -0
  24. package/dist/src/config/defaults/legendDefaults.js +46 -0
  25. package/dist/src/config/defaults/titleDefaults.d.ts.map +1 -1
  26. package/dist/src/config/defaults/titleDefaults.js +26 -18
  27. package/dist/src/config/legendConfig.d.ts +11 -0
  28. package/dist/src/config/legendConfig.d.ts.map +1 -0
  29. package/dist/src/config/legendConfig.js +63 -0
  30. package/dist/src/config/styleUtils.d.ts +8 -2
  31. package/dist/src/config/styleUtils.d.ts.map +1 -1
  32. package/dist/src/config/styleUtils.js +25 -1
  33. package/dist/src/config/themes.d.ts.map +1 -1
  34. package/dist/src/config/themes.js +21 -2
  35. package/dist/src/config/titleConfig.d.ts.map +1 -1
  36. package/dist/src/config/titleConfig.js +2 -18
  37. package/dist/src/data/collector.d.ts.map +1 -1
  38. package/dist/src/data/collector.js +40 -18
  39. package/dist/src/data/flowInit.d.ts +6 -0
  40. package/dist/src/data/flowInit.d.ts.map +1 -1
  41. package/dist/src/data/flowInit.js +1 -1
  42. package/dist/src/data/flowNode.d.ts +32 -0
  43. package/dist/src/data/flowNode.d.ts.map +1 -1
  44. package/dist/src/data/flowNode.js +59 -0
  45. package/dist/src/data/sources/lazy/bamSource.d.ts +0 -1
  46. package/dist/src/data/sources/lazy/bamSource.d.ts.map +1 -1
  47. package/dist/src/data/sources/lazy/bamSource.js +39 -30
  48. package/dist/src/data/sources/lazy/bigBedSource.d.ts +0 -10
  49. package/dist/src/data/sources/lazy/bigBedSource.d.ts.map +1 -1
  50. package/dist/src/data/sources/lazy/bigBedSource.js +127 -62
  51. package/dist/src/data/sources/lazy/bigWigSource.d.ts +2 -2
  52. package/dist/src/data/sources/lazy/bigWigSource.d.ts.map +1 -1
  53. package/dist/src/data/sources/lazy/bigWigSource.js +234 -81
  54. package/dist/src/data/sources/lazy/gff3Source.d.ts +7 -3
  55. package/dist/src/data/sources/lazy/gff3Source.d.ts.map +1 -1
  56. package/dist/src/data/sources/lazy/gff3Source.js +7 -8
  57. package/dist/src/data/sources/lazy/indexedFastaSource.d.ts +1 -1
  58. package/dist/src/data/sources/lazy/indexedFastaSource.d.ts.map +1 -1
  59. package/dist/src/data/sources/lazy/indexedFastaSource.js +28 -19
  60. package/dist/src/data/sources/lazy/legendEntriesSource.d.ts +24 -0
  61. package/dist/src/data/sources/lazy/legendEntriesSource.d.ts.map +1 -0
  62. package/dist/src/data/sources/lazy/legendEntriesSource.js +217 -0
  63. package/dist/src/data/sources/lazy/legendGradientSource.d.ts +30 -0
  64. package/dist/src/data/sources/lazy/legendGradientSource.d.ts.map +1 -0
  65. package/dist/src/data/sources/lazy/legendGradientSource.js +388 -0
  66. package/dist/src/data/sources/lazy/mockLazySource.d.ts +4 -1
  67. package/dist/src/data/sources/lazy/mockLazySource.d.ts.map +1 -1
  68. package/dist/src/data/sources/lazy/mockLazySource.js +49 -4
  69. package/dist/src/data/sources/lazy/registerCoreLazySources.js +2 -0
  70. package/dist/src/data/sources/lazy/singleAxisWindowedSource.d.ts.map +1 -1
  71. package/dist/src/data/sources/lazy/singleAxisWindowedSource.js +3 -4
  72. package/dist/src/data/sources/lazy/tabixSource.d.ts +9 -4
  73. package/dist/src/data/sources/lazy/tabixSource.d.ts.map +1 -1
  74. package/dist/src/data/sources/lazy/tabixSource.js +201 -70
  75. package/dist/src/data/sources/lazy/tabixTsvSource.d.ts +2 -3
  76. package/dist/src/data/sources/lazy/tabixTsvSource.d.ts.map +1 -1
  77. package/dist/src/data/sources/lazy/tabixTsvSource.js +14 -12
  78. package/dist/src/data/sources/lazy/vcfSource.d.ts +7 -3
  79. package/dist/src/data/sources/lazy/vcfSource.d.ts.map +1 -1
  80. package/dist/src/data/sources/lazy/vcfSource.js +7 -8
  81. package/dist/src/data/sources/urlDescriptor.d.ts +165 -0
  82. package/dist/src/data/sources/urlDescriptor.d.ts.map +1 -0
  83. package/dist/src/data/sources/urlDescriptor.js +473 -0
  84. package/dist/src/data/sources/urlDescriptorController.d.ts +25 -0
  85. package/dist/src/data/sources/urlDescriptorController.d.ts.map +1 -0
  86. package/dist/src/data/sources/urlDescriptorController.js +72 -0
  87. package/dist/src/data/sources/urlDescriptorState.d.ts +47 -0
  88. package/dist/src/data/sources/urlDescriptorState.d.ts.map +1 -0
  89. package/dist/src/data/sources/urlDescriptorState.js +129 -0
  90. package/dist/src/data/sources/urlSource.d.ts.map +1 -1
  91. package/dist/src/data/sources/urlSource.js +101 -61
  92. package/dist/src/data/transforms/packLegendLabels.d.ts +21 -0
  93. package/dist/src/data/transforms/packLegendLabels.d.ts.map +1 -0
  94. package/dist/src/data/transforms/packLegendLabels.js +189 -0
  95. package/dist/src/data/transforms/transformFactory.d.ts.map +1 -1
  96. package/dist/src/data/transforms/transformFactory.js +4 -0
  97. package/dist/src/data/transforms/truncateText.d.ts +27 -0
  98. package/dist/src/data/transforms/truncateText.d.ts.map +1 -0
  99. package/dist/src/data/transforms/truncateText.js +94 -0
  100. package/dist/src/debug/dataflowDebugSnapshot.d.ts +58 -0
  101. package/dist/src/debug/dataflowDebugSnapshot.d.ts.map +1 -0
  102. package/dist/src/debug/dataflowDebugSnapshot.js +159 -0
  103. package/dist/src/debug/markDebugSnapshot.d.ts +54 -0
  104. package/dist/src/debug/markDebugSnapshot.d.ts.map +1 -0
  105. package/dist/src/debug/markDebugSnapshot.js +100 -0
  106. package/dist/src/debug/paramDebugSnapshot.d.ts +53 -0
  107. package/dist/src/debug/paramDebugSnapshot.d.ts.map +1 -0
  108. package/dist/src/debug/paramDebugSnapshot.js +86 -0
  109. package/dist/src/debug/resolutionDebugSnapshot.d.ts +155 -0
  110. package/dist/src/debug/resolutionDebugSnapshot.d.ts.map +1 -0
  111. package/dist/src/debug/resolutionDebugSnapshot.js +291 -0
  112. package/dist/src/debug/valuePreview.d.ts +9 -0
  113. package/dist/src/debug/valuePreview.d.ts.map +1 -0
  114. package/dist/src/debug/valuePreview.js +57 -0
  115. package/dist/src/debug/viewDebugSnapshot.d.ts +131 -0
  116. package/dist/src/debug/viewDebugSnapshot.d.ts.map +1 -0
  117. package/dist/src/debug/viewDebugSnapshot.js +390 -0
  118. package/dist/src/embedFactory.d.ts.map +1 -1
  119. package/dist/src/embedFactory.js +6 -1
  120. package/dist/src/encoder/encoder.d.ts +2 -2
  121. package/dist/src/encoder/encoder.d.ts.map +1 -1
  122. package/dist/src/encoder/encoder.js +5 -4
  123. package/dist/src/fonts/bmFontManager.d.ts +1 -1
  124. package/dist/src/fonts/bmFontManager.d.ts.map +1 -1
  125. package/dist/src/fonts/bmFontManager.js +45 -10
  126. package/dist/src/fonts/textMetrics.d.ts +69 -0
  127. package/dist/src/fonts/textMetrics.d.ts.map +1 -0
  128. package/dist/src/fonts/textMetrics.js +73 -0
  129. package/dist/src/genomeSpy/headlessBootstrap.d.ts.map +1 -1
  130. package/dist/src/genomeSpy/headlessBootstrap.js +8 -0
  131. package/dist/src/genomeSpy/interactionController.d.ts +4 -1
  132. package/dist/src/genomeSpy/interactionController.d.ts.map +1 -1
  133. package/dist/src/genomeSpy/interactionController.js +57 -13
  134. package/dist/src/genomeSpy/renderCoordinator.d.ts.map +1 -1
  135. package/dist/src/genomeSpy/renderCoordinator.js +25 -3
  136. package/dist/src/genomeSpy/viewDataInit.d.ts +14 -0
  137. package/dist/src/genomeSpy/viewDataInit.d.ts.map +1 -1
  138. package/dist/src/genomeSpy/viewDataInit.js +45 -8
  139. package/dist/src/genomeSpyBase.d.ts +6 -0
  140. package/dist/src/genomeSpyBase.d.ts.map +1 -1
  141. package/dist/src/genomeSpyBase.js +25 -4
  142. package/dist/src/gl/glslScaleGenerator.d.ts +17 -0
  143. package/dist/src/gl/glslScaleGenerator.d.ts.map +1 -1
  144. package/dist/src/gl/glslScaleGenerator.js +39 -2
  145. package/dist/src/gl/includes/common.glsl.js +1 -1
  146. package/dist/src/gl/vertexRangeIndex.d.ts.map +1 -1
  147. package/dist/src/gl/vertexRangeIndex.js +4 -2
  148. package/dist/src/gl/webGLHelper.d.ts +1 -1
  149. package/dist/src/gl/webGLHelper.d.ts.map +1 -1
  150. package/dist/src/gl/webGLHelper.js +13 -8
  151. package/dist/src/marks/__snapshots__/shaderSnapshot.test.js.snap +140 -3
  152. package/dist/src/marks/mark.d.ts +47 -4
  153. package/dist/src/marks/mark.d.ts.map +1 -1
  154. package/dist/src/marks/mark.js +158 -54
  155. package/dist/src/marks/point.d.ts.map +1 -1
  156. package/dist/src/marks/point.js +4 -0
  157. package/dist/src/marks/point.vertex.glsl.js +1 -1
  158. package/dist/src/marks/text.d.ts +1 -1
  159. package/dist/src/marks/text.d.ts.map +1 -1
  160. package/dist/src/marks/text.js +2 -7
  161. package/dist/src/marks/text.vertex.glsl.js +1 -1
  162. package/dist/src/paramRuntime/paramUtils.d.ts +43 -9
  163. package/dist/src/paramRuntime/paramUtils.d.ts.map +1 -1
  164. package/dist/src/paramRuntime/paramUtils.js +61 -1
  165. package/dist/src/paramRuntime/viewParamRuntime.d.ts +32 -0
  166. package/dist/src/paramRuntime/viewParamRuntime.d.ts.map +1 -1
  167. package/dist/src/paramRuntime/viewParamRuntime.js +63 -0
  168. package/dist/src/scales/axisResolution.d.ts +35 -0
  169. package/dist/src/scales/axisResolution.d.ts.map +1 -1
  170. package/dist/src/scales/axisResolution.js +115 -7
  171. package/dist/src/scales/domainExpressions.d.ts +21 -0
  172. package/dist/src/scales/domainExpressions.d.ts.map +1 -0
  173. package/dist/src/scales/domainExpressions.js +43 -0
  174. package/dist/src/scales/domainPlanner.d.ts +12 -1
  175. package/dist/src/scales/domainPlanner.d.ts.map +1 -1
  176. package/dist/src/scales/domainPlanner.js +55 -36
  177. package/dist/src/scales/legendResolution.d.ts +83 -0
  178. package/dist/src/scales/legendResolution.d.ts.map +1 -0
  179. package/dist/src/scales/legendResolution.js +461 -0
  180. package/dist/src/scales/scaleInstanceManager.d.ts +1 -0
  181. package/dist/src/scales/scaleInstanceManager.d.ts.map +1 -1
  182. package/dist/src/scales/scaleInstanceManager.js +5 -0
  183. package/dist/src/scales/scalePropsResolver.d.ts +6 -1
  184. package/dist/src/scales/scalePropsResolver.d.ts.map +1 -1
  185. package/dist/src/scales/scalePropsResolver.js +35 -10
  186. package/dist/src/scales/scaleResolution.d.ts +52 -0
  187. package/dist/src/scales/scaleResolution.d.ts.map +1 -1
  188. package/dist/src/scales/scaleResolution.js +195 -16
  189. package/dist/src/scales/scaleRules.d.ts +10 -0
  190. package/dist/src/scales/scaleRules.d.ts.map +1 -1
  191. package/dist/src/scales/scaleRules.js +38 -1
  192. package/dist/src/scales/viewLevelGuideConfig.d.ts +53 -0
  193. package/dist/src/scales/viewLevelGuideConfig.d.ts.map +1 -0
  194. package/dist/src/scales/viewLevelGuideConfig.js +224 -0
  195. package/dist/src/scales/viewLevelScaleConfig.d.ts +45 -0
  196. package/dist/src/scales/viewLevelScaleConfig.d.ts.map +1 -0
  197. package/dist/src/scales/viewLevelScaleConfig.js +149 -0
  198. package/dist/src/spec/axis.d.ts +109 -3
  199. package/dist/src/spec/channel.d.ts +23 -4
  200. package/dist/src/spec/config.d.ts +59 -4
  201. package/dist/src/spec/data.d.ts +177 -17
  202. package/dist/src/spec/legend.d.ts +246 -0
  203. package/dist/src/spec/mark.d.ts +16 -4
  204. package/dist/src/spec/scale.d.ts +19 -6
  205. package/dist/src/spec/title.d.ts +58 -1
  206. package/dist/src/spec/transform.d.ts +149 -0
  207. package/dist/src/spec/view.d.ts +50 -6
  208. package/dist/src/styles/genome-spy.css +4 -1
  209. package/dist/src/styles/genome-spy.css.d.ts +1 -1
  210. package/dist/src/styles/genome-spy.css.d.ts.map +1 -1
  211. package/dist/src/styles/genome-spy.css.js +4 -1
  212. package/dist/src/types/embedApi.d.ts +262 -6
  213. package/dist/src/types/rendering.d.ts +19 -3
  214. package/dist/src/types/viewContext.d.ts +18 -2
  215. package/dist/src/utils/arrayUtils.d.ts +11 -0
  216. package/dist/src/utils/arrayUtils.d.ts.map +1 -1
  217. package/dist/src/utils/arrayUtils.js +23 -0
  218. package/dist/src/utils/suspension.d.ts +17 -0
  219. package/dist/src/utils/suspension.d.ts.map +1 -0
  220. package/dist/src/utils/suspension.js +41 -0
  221. package/dist/src/utils/ui/tooltip.d.ts +4 -0
  222. package/dist/src/utils/ui/tooltip.d.ts.map +1 -1
  223. package/dist/src/utils/ui/tooltip.js +35 -10
  224. package/dist/src/view/axisGridView.d.ts.map +1 -1
  225. package/dist/src/view/axisGridView.js +1 -4
  226. package/dist/src/view/axisView.d.ts +18 -2
  227. package/dist/src/view/axisView.d.ts.map +1 -1
  228. package/dist/src/view/axisView.js +180 -75
  229. package/dist/src/view/concatView.d.ts +10 -2
  230. package/dist/src/view/concatView.d.ts.map +1 -1
  231. package/dist/src/view/concatView.js +46 -9
  232. package/dist/src/view/containerMutationHelper.d.ts +20 -1
  233. package/dist/src/view/containerMutationHelper.d.ts.map +1 -1
  234. package/dist/src/view/containerMutationHelper.js +203 -32
  235. package/dist/src/view/facetView.d.ts +1 -1
  236. package/dist/src/view/gridView/gridChild.d.ts +54 -4
  237. package/dist/src/view/gridView/gridChild.d.ts.map +1 -1
  238. package/dist/src/view/gridView/gridChild.js +301 -120
  239. package/dist/src/view/gridView/gridChildLegends.d.ts +57 -0
  240. package/dist/src/view/gridView/gridChildLegends.d.ts.map +1 -0
  241. package/dist/src/view/gridView/gridChildLegends.js +503 -0
  242. package/dist/src/view/gridView/gridView.d.ts +25 -0
  243. package/dist/src/view/gridView/gridView.d.ts.map +1 -1
  244. package/dist/src/view/gridView/gridView.js +454 -78
  245. package/dist/src/view/gridView/legendLayout.d.ts +26 -0
  246. package/dist/src/view/gridView/legendLayout.d.ts.map +1 -0
  247. package/dist/src/view/gridView/legendLayout.js +111 -0
  248. package/dist/src/view/gridView/scrollbar.d.ts.map +1 -1
  249. package/dist/src/view/gridView/scrollbar.js +1 -4
  250. package/dist/src/view/gridView/selectionRect.d.ts.map +1 -1
  251. package/dist/src/view/gridView/selectionRect.js +1 -4
  252. package/dist/src/view/gridView/separatorView.d.ts.map +1 -1
  253. package/dist/src/view/gridView/separatorView.js +1 -4
  254. package/dist/src/view/layerView.d.ts +9 -2
  255. package/dist/src/view/layerView.d.ts.map +1 -1
  256. package/dist/src/view/layerView.js +18 -1
  257. package/dist/src/view/layout/flexLayout.d.ts +20 -4
  258. package/dist/src/view/layout/flexLayout.d.ts.map +1 -1
  259. package/dist/src/view/layout/flexLayout.js +331 -31
  260. package/dist/src/view/layout/rectangle.d.ts +14 -0
  261. package/dist/src/view/layout/rectangle.d.ts.map +1 -1
  262. package/dist/src/view/layout/rectangle.js +40 -0
  263. package/dist/src/view/legend/legendEntries.d.ts +20 -0
  264. package/dist/src/view/legend/legendEntries.d.ts.map +1 -0
  265. package/dist/src/view/legend/legendEntries.js +21 -0
  266. package/dist/src/view/legendView.d.ts +134 -0
  267. package/dist/src/view/legendView.d.ts.map +1 -0
  268. package/dist/src/view/legendView.js +1611 -0
  269. package/dist/src/view/renderingContext/bufferedViewRenderingContext.d.ts.map +1 -1
  270. package/dist/src/view/renderingContext/bufferedViewRenderingContext.js +26 -4
  271. package/dist/src/view/renderingContext/clipOptions.d.ts +44 -0
  272. package/dist/src/view/renderingContext/clipOptions.d.ts.map +1 -0
  273. package/dist/src/view/renderingContext/clipOptions.js +140 -0
  274. package/dist/src/view/renderingContext/simpleViewRenderingContext.d.ts.map +1 -1
  275. package/dist/src/view/renderingContext/simpleViewRenderingContext.js +12 -1
  276. package/dist/src/view/resolutionPlanner.d.ts +2 -1
  277. package/dist/src/view/resolutionPlanner.d.ts.map +1 -1
  278. package/dist/src/view/resolutionPlanner.js +89 -25
  279. package/dist/src/view/testUtils.d.ts +4 -2
  280. package/dist/src/view/testUtils.d.ts.map +1 -1
  281. package/dist/src/view/testUtils.js +29 -7
  282. package/dist/src/view/titleView.d.ts +37 -0
  283. package/dist/src/view/titleView.d.ts.map +1 -0
  284. package/dist/src/view/titleView.js +584 -0
  285. package/dist/src/view/unitView.d.ts +3 -3
  286. package/dist/src/view/unitView.d.ts.map +1 -1
  287. package/dist/src/view/unitView.js +3 -2
  288. package/dist/src/view/view.d.ts +25 -24
  289. package/dist/src/view/view.d.ts.map +1 -1
  290. package/dist/src/view/view.js +121 -16
  291. package/dist/src/view/viewFactory.d.ts +2 -5
  292. package/dist/src/view/viewFactory.d.ts.map +1 -1
  293. package/dist/src/view/viewFactory.js +1 -2
  294. package/dist/src/view/viewIdentityRegistry.d.ts +37 -0
  295. package/dist/src/view/viewIdentityRegistry.d.ts.map +1 -0
  296. package/dist/src/view/viewIdentityRegistry.js +71 -0
  297. package/dist/src/view/viewMutationAcidTestUtils.d.ts +112 -0
  298. package/dist/src/view/viewMutationAcidTestUtils.d.ts.map +1 -0
  299. package/dist/src/view/viewMutationAcidTestUtils.js +234 -0
  300. package/dist/src/view/viewMutationApi.d.ts +42 -0
  301. package/dist/src/view/viewMutationApi.d.ts.map +1 -0
  302. package/dist/src/view/viewMutationApi.js +811 -0
  303. package/dist/src/view/viewSelectors.d.ts +10 -0
  304. package/dist/src/view/viewSelectors.d.ts.map +1 -1
  305. package/dist/src/view/viewSelectors.js +23 -1
  306. package/package.json +4 -4
  307. package/dist/bundle/esm-0dYHNV_D.js +0 -121
  308. package/dist/bundle/esm-C49STiCR.js +0 -1248
  309. package/dist/bundle/esm-CscjKVDc.js +0 -1426
  310. package/dist/bundle/esm-CuMSzCHy.js +0 -298
  311. package/dist/bundle/esm-DMXpJXM4.js +0 -369
  312. package/dist/src/view/title.d.ts +0 -13
  313. package/dist/src/view/title.d.ts.map +0 -1
  314. package/dist/src/view/title.js +0 -154
  315. /package/dist/bundle/{AbortablePromiseCache-3gHJdF3E.js → AbortablePromiseCache-BTmAcN-t.js} +0 -0
  316. /package/dist/bundle/{esm-CuVa5T98.js → esm-VvpZ9hsq.js} +0 -0
  317. /package/dist/bundle/{chunk-DmhlhrBa.js → rolldown-runtime-Dy4uBu1J.js} +0 -0
@@ -1,17 +1,37 @@
1
- import { t as e } from "./chunk-DmhlhrBa.js";
1
+ import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
2
2
  //#region ../../node_modules/generic-filehandle2/esm/util.js
3
3
  async function t(e) {
4
4
  return e.bytes ? e.bytes() : new Uint8Array(await e.arrayBuffer());
5
5
  }
6
+ var n = 50;
7
+ async function r(e, r) {
8
+ let i = e.headers.get("content-length"), a = i ? parseInt(i, 10) : void 0, o = e.body;
9
+ if (!o || a === void 0) {
10
+ let n = await t(e);
11
+ return r(n.byteLength, a ?? n.byteLength), n;
12
+ }
13
+ let s = o.getReader(), c = new Uint8Array(a), l = 0, u = 0;
14
+ r(0, a);
15
+ for (let e = await s.read(); !e.done; e = await s.read()) {
16
+ if (l + e.value.byteLength > c.length) {
17
+ let t = new Uint8Array(Math.max(l + e.value.byteLength, c.length * 2));
18
+ t.set(c.subarray(0, l)), c = t;
19
+ }
20
+ c.set(e.value, l), l += e.value.byteLength;
21
+ let t = Date.now();
22
+ t - u >= n && (u = t, r(l, a));
23
+ }
24
+ return r(l, a), l === c.length ? c : c.subarray(0, l);
25
+ }
6
26
  //#endregion
7
27
  //#region ../../node_modules/generic-filehandle2/esm/blobFile.js
8
- var n = class {
28
+ var i = class {
9
29
  blob;
10
30
  constructor(e) {
11
31
  this.blob = e;
12
32
  }
13
33
  async read(e, n = 0) {
14
- return e === 0 ? new Uint8Array() : t(this.blob.slice(n, n + e));
34
+ return e === 0 ? /* @__PURE__ */ new Uint8Array() : t(this.blob.slice(n, n + e));
15
35
  }
16
36
  async readFile(e) {
17
37
  let n = typeof e == "string" ? e : e?.encoding;
@@ -28,10 +48,10 @@ var n = class {
28
48
  };
29
49
  //#endregion
30
50
  //#region ../../node_modules/generic-filehandle2/esm/remoteFile.js
31
- function r(e) {
51
+ function a(e) {
32
52
  return (typeof e == "object" && e && "message" in e && typeof e.message == "string" ? e.message : `${e}`).replace(/\.$/, "");
33
53
  }
34
- var i = class {
54
+ var o = class {
35
55
  url;
36
56
  _stat;
37
57
  fetchImplementation;
@@ -56,44 +76,44 @@ var i = class {
56
76
  };
57
77
  }
58
78
  async fetch(e, t) {
59
- let n = (t) => Error(`${r(t)} fetching ${e}`, { cause: t }), i;
79
+ let n = (t) => Error(`${a(t)} fetching ${e}`, { cause: t }), r;
60
80
  try {
61
- i = await this.fetchImplementation(e, t);
62
- } catch (r) {
63
- if (`${r}`.includes("Failed to fetch")) {
81
+ r = await this.fetchImplementation(e, t);
82
+ } catch (i) {
83
+ if (`${i}`.includes("Failed to fetch")) {
64
84
  console.warn(`generic-filehandle: refetching ${e} to attempt to work around chrome CORS header caching bug`);
65
85
  try {
66
- i = await this.fetchImplementation(e, {
86
+ r = await this.fetchImplementation(e, {
67
87
  ...t,
68
88
  cache: "reload"
69
89
  });
70
90
  } catch (e) {
71
91
  throw n(e);
72
92
  }
73
- } else throw n(r);
93
+ } else throw n(i);
74
94
  }
75
- return i;
95
+ return r;
76
96
  }
77
- async read(e, n, r = {}) {
78
- if (e === 0) return new Uint8Array();
97
+ async read(e, n, i = {}) {
98
+ if (e === 0) return /* @__PURE__ */ new Uint8Array();
79
99
  if (Number.isNaN(e) || Number.isNaN(n)) throw TypeError(`read() called with NaN length or position (length=${e}, position=${n}). The index file may be corrupt.`);
80
- let i = await this.fetch(this.url, this.buildRequest(r, { range: `bytes=${n}-${n + e - 1}` }));
81
- if (i.status === 416) return new Uint8Array();
82
- if (!i.ok) throw Error(`HTTP ${i.status} fetching ${this.url}`);
83
- if (i.status === 200 && n === 0 || i.status === 206) {
84
- let n = i.headers.get("content-range"), r = /\/(\d+)$/.exec(n ?? "");
85
- r?.[1] && (this._stat = { size: parseInt(r[1], 10) });
86
- let a = await t(i);
87
- return !this._stat && i.status === 200 && (this._stat = { size: a.byteLength }), a.byteLength <= e ? a : a.subarray(0, e);
100
+ let a = await this.fetch(this.url, this.buildRequest(i, { range: `bytes=${n}-${n + e - 1}` }));
101
+ if (a.status === 416) return /* @__PURE__ */ new Uint8Array();
102
+ if (!a.ok) throw Error(`HTTP ${a.status} fetching ${this.url}`);
103
+ if (a.status === 200 && n === 0 || a.status === 206) {
104
+ let n = a.headers.get("content-range"), o = /\/(\d+)$/.exec(n ?? "");
105
+ o?.[1] && (this._stat = { size: parseInt(o[1], 10) });
106
+ let s = i.onProgress ? await r(a, i.onProgress) : await t(a);
107
+ return !this._stat && a.status === 200 && (this._stat = { size: s.byteLength }), s.byteLength <= e ? s : s.subarray(0, e);
88
108
  }
89
- throw Error(i.status === 200 ? `${this.url} fetch returned status 200, expected 206` : `HTTP ${i.status} fetching ${this.url}`);
109
+ throw Error(a.status === 200 ? `${this.url} fetch returned status 200, expected 206` : `HTTP ${a.status} fetching ${this.url}`);
90
110
  }
91
111
  async readFile(e = {}) {
92
- let n = typeof e == "string" ? e : e.encoding, r = typeof e == "string" ? {} : e, i = await this.fetch(this.url, this.buildRequest(r));
93
- if (!i.ok) throw Error(`HTTP ${i.status} fetching ${this.url}`);
94
- if (n === "utf8") return i.text();
112
+ let n = typeof e == "string" ? e : e.encoding, i = typeof e == "string" ? {} : e, a = await this.fetch(this.url, this.buildRequest(i));
113
+ if (!a.ok) throw Error(`HTTP ${a.status} fetching ${this.url}`);
114
+ if (n === "utf8") return a.text();
95
115
  if (n) throw Error(`unsupported encoding: ${n}`);
96
- return t(i);
116
+ return i.onProgress ? r(a, i.onProgress) : t(a);
97
117
  }
98
118
  async stat() {
99
119
  return this._stat || await this.read(10, 0), this._stat ?? { size: 0 };
@@ -101,11 +121,11 @@ var i = class {
101
121
  close() {
102
122
  return Promise.resolve();
103
123
  }
104
- }, a = /* @__PURE__ */ e({
105
- BlobFile: () => n,
106
- LocalFile: () => o,
107
- RemoteFile: () => i
108
- }), o = class {
124
+ }, s = /* @__PURE__ */ e({
125
+ BlobFile: () => i,
126
+ LocalFile: () => c,
127
+ RemoteFile: () => o
128
+ }), c = class {
109
129
  readFile() {
110
130
  return Promise.reject(/* @__PURE__ */ Error("unimplemented"));
111
131
  }
@@ -120,4 +140,4 @@ var i = class {
120
140
  }
121
141
  };
122
142
  //#endregion
123
- export { a as n, i as r, o as t };
143
+ export { s as n, o as r, c as t };
@@ -0,0 +1,248 @@
1
+ //#region ../../node_modules/gff-nostream/esm/util.js
2
+ var e = {};
3
+ for (let t = 0; t < 256; t++) {
4
+ let n = t.toString(16).toUpperCase().padStart(2, "0");
5
+ e[n] = String.fromCharCode(t), e[n.toLowerCase()] = String.fromCharCode(t);
6
+ }
7
+ function t(t) {
8
+ let n = t.indexOf("%");
9
+ if (n === -1) return t;
10
+ let r = "", i = 0, a = n;
11
+ for (; a < t.length;) if (t[a] === "%" && a + 2 < t.length) {
12
+ r += t.slice(i, a);
13
+ let n = e[t.slice(a + 1, a + 3)];
14
+ n === void 0 ? r += t.slice(a, a + 3) : r += n, a += 3, i = a;
15
+ } else a++;
16
+ return r + t.slice(i);
17
+ }
18
+ function n(e, n) {
19
+ if (e.length === 0 || e === ".") return {};
20
+ let r = {}, i = e.length;
21
+ e[i - 1] === "\n" && (i = e[i - 2] === "\r" ? i - 2 : i - 1, e = e.slice(0, i));
22
+ let a = 0;
23
+ for (; a < i;) {
24
+ let o = e.indexOf(";", a);
25
+ if (o === -1 && (o = i), o > a) {
26
+ let i = e.indexOf("=", a);
27
+ if (i !== -1 && i < o && i + 1 < o) {
28
+ let s = e.slice(a, i), c = r[s];
29
+ c || (c = [], r[s] = c);
30
+ let l = i + 1;
31
+ for (; l < o;) {
32
+ let r = e.indexOf(",", l);
33
+ if ((r === -1 || r > o) && (r = o), r > l) {
34
+ let i = e.slice(l, r);
35
+ c.push(n ? t(i) : i);
36
+ }
37
+ l = r + 1;
38
+ }
39
+ }
40
+ }
41
+ a = o + 1;
42
+ }
43
+ return r;
44
+ }
45
+ function r(e) {
46
+ return e.length === 0 || e === ".";
47
+ }
48
+ function i(e, n, i) {
49
+ return r(e) ? i : n ? t(e) : e;
50
+ }
51
+ function a(e) {
52
+ return r(e) ? null : +e;
53
+ }
54
+ function o(e, t) {
55
+ let o = e.split(" "), s = o[8];
56
+ return {
57
+ seq_id: i(o[0], t, null),
58
+ source: i(o[1], t, null),
59
+ type: i(o[2], t, null),
60
+ start: a(o[3]),
61
+ end: a(o[4]),
62
+ score: a(o[5]),
63
+ strand: i(o[6], !1, null),
64
+ phase: i(o[7], !1, null),
65
+ attributes: r(s) ? null : n(s, t)
66
+ };
67
+ }
68
+ function s(e) {
69
+ return o(e, !0);
70
+ }
71
+ function c(e) {
72
+ return o(e, !1);
73
+ }
74
+ var l = /* @__PURE__ */ new Set([
75
+ "start",
76
+ "end",
77
+ "seq_id",
78
+ "score",
79
+ "type",
80
+ "source",
81
+ "phase",
82
+ "strand"
83
+ ]), u = {
84
+ ID: "id",
85
+ Name: "name",
86
+ Parent: "parent",
87
+ Note: "note",
88
+ Dbxref: "dbxref",
89
+ Ontology_term: "ontology_term",
90
+ Is_circular: "is_circular",
91
+ Alias: "alias",
92
+ Target: "target",
93
+ Gap: "gap",
94
+ Derives_from: "derives_from",
95
+ id: "id",
96
+ name: "name",
97
+ parent: "parent",
98
+ note: "note",
99
+ dbxref: "dbxref",
100
+ alias: "alias",
101
+ target: "target",
102
+ gap: "gap"
103
+ };
104
+ function d(e, n, r) {
105
+ if (e.length === 0 || e === ".") return;
106
+ let i = e.length;
107
+ e[i - 1] === "\n" && (i = e[i - 2] === "\r" ? i - 2 : i - 1, e = e.slice(0, i));
108
+ let a = 0;
109
+ for (; a < i;) {
110
+ let o = e.indexOf(";", a);
111
+ if (o === -1 && (o = i), o > a) {
112
+ let i = e.indexOf("=", a);
113
+ if (i !== -1 && i < o && i + 1 < o) {
114
+ let s = e.slice(a, i), c = u[s];
115
+ c === void 0 && (c = s.toLowerCase(), l.has(c) && (c += "2"));
116
+ let d = [], f = i + 1;
117
+ for (; f < o;) {
118
+ let n = e.indexOf(",", f);
119
+ if ((n === -1 || n > o) && (n = o), n > f) {
120
+ let i = e.slice(f, n);
121
+ d.push(r ? t(i) : i);
122
+ }
123
+ f = n + 1;
124
+ }
125
+ n[c] = d.length === 1 ? d[0] : d;
126
+ }
127
+ }
128
+ a = o + 1;
129
+ }
130
+ }
131
+ var f = {
132
+ "+": 1,
133
+ "-": -1,
134
+ ".": 0
135
+ };
136
+ function p(e, t) {
137
+ let n = e.split(" "), a = n[3], o = n[4], s = n[5], c = n[7], l = n[8], u = {
138
+ refName: i(n[0], t, ""),
139
+ source: i(n[1], t, null),
140
+ type: i(n[2], t, null),
141
+ start: r(a) ? 0 : a - 1,
142
+ end: r(o) ? 0 : +o,
143
+ score: r(s) ? void 0 : +s,
144
+ strand: f[n[6]],
145
+ phase: r(c) ? void 0 : +c,
146
+ subfeatures: []
147
+ };
148
+ return d(l, u, t), u;
149
+ }
150
+ function m(e) {
151
+ return p(e, !0);
152
+ }
153
+ function h(e) {
154
+ return p(e, !1);
155
+ }
156
+ //#endregion
157
+ //#region ../../node_modules/gff-nostream/esm/api.js
158
+ function g(e) {
159
+ let t = e.indexOf(" "), n = e.indexOf(" ", t + 1), r = e.indexOf(" ", n + 1);
160
+ return e.slice(n + 1, r);
161
+ }
162
+ function _(e, t, n) {
163
+ let r = e.get(t);
164
+ r ? r.push(n) : e.set(t, [n]);
165
+ }
166
+ function v(e) {
167
+ let t = Array.isArray(e) ? e[0] : e;
168
+ return typeof t == "string" ? t : void 0;
169
+ }
170
+ function y(e) {
171
+ return Array.isArray(e) ? e.filter((e) => typeof e == "string") : typeof e == "string" ? [e] : [];
172
+ }
173
+ function b(e) {
174
+ return C(S(e));
175
+ }
176
+ function x(e) {
177
+ return w(S(e));
178
+ }
179
+ function S(e) {
180
+ let t = e.split(/\r?\n/), n = [];
181
+ for (let e of t) {
182
+ if (e.startsWith("##FASTA") || e.startsWith(">")) break;
183
+ e.length === 0 || e.startsWith("#") || n.push({
184
+ line: e,
185
+ hasEscapes: e.includes("%")
186
+ });
187
+ }
188
+ return n;
189
+ }
190
+ function C(e) {
191
+ let t = [], n = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Map();
192
+ for (let i of e) {
193
+ let e = {
194
+ ...i.hasEscapes ? s(i.line) : c(i.line),
195
+ child_features: [],
196
+ derived_features: []
197
+ };
198
+ i.lineHash !== void 0 && (e.attributes ??= {}, e.attributes._lineHash = [String(i.lineHash)]);
199
+ let a = e.attributes, o = a?.ID, l = a?.Parent;
200
+ if (!o && !l) t.push([e]);
201
+ else {
202
+ let i;
203
+ if (o) {
204
+ let a = o[0], s = n.get(a);
205
+ if (s) e.child_features = s[0].child_features, e.derived_features = s[0].derived_features, s.push(e), i = s;
206
+ else {
207
+ i = [e], l || t.push(i), n.set(a, i);
208
+ let o = r.get(a);
209
+ if (o) {
210
+ for (let t of o) e.child_features.push(t);
211
+ r.delete(a);
212
+ }
213
+ }
214
+ } else i = [e];
215
+ if (l) for (let e of l) {
216
+ let t = n.get(e);
217
+ t ? t[0].child_features.push(i) : _(r, e, i);
218
+ }
219
+ }
220
+ }
221
+ return t;
222
+ }
223
+ function w(e) {
224
+ let t = [], n = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Map();
225
+ for (let i of e) {
226
+ let e = i.hasEscapes ? m(i.line) : h(i.line);
227
+ i.lineHash !== void 0 && (e._lineHash = String(i.lineHash));
228
+ let a = v(e.id), o = y(e.parent);
229
+ if (!a && o.length === 0) t.push(e);
230
+ else {
231
+ if (o.length === 0 && t.push(e), a && !n.has(a)) {
232
+ n.set(a, e);
233
+ let t = r.get(a);
234
+ if (t) {
235
+ for (let n of t) e.subfeatures.push(n);
236
+ r.delete(a);
237
+ }
238
+ }
239
+ for (let t of o) {
240
+ let i = n.get(t);
241
+ i ? i.subfeatures.push(e) : _(r, t, e);
242
+ }
243
+ }
244
+ }
245
+ return t;
246
+ }
247
+ //#endregion
248
+ export { g as extractType, C as parseRecords, w as parseRecordsJBrowse, b as parseStringSync, x as parseStringSyncJBrowse };