@genome-spy/core 0.78.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 (289) 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-DVOHLB1e.js → esm-CTUHLDbv.js} +30 -30
  6. package/dist/bundle/{esm-NIYEaYkc.js → esm-Cx-EbkOj.js} +13 -13
  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 +14840 -11661
  11. package/dist/bundle/index.js +119 -108
  12. package/dist/bundle/{parquetRead-DG_-F5j5.js → parquetRead-Cad1SOVV.js} +473 -399
  13. package/dist/schema.json +18940 -6914
  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 +6 -0
  131. package/dist/src/genomeSpy/renderCoordinator.d.ts.map +1 -1
  132. package/dist/src/genomeSpy/renderCoordinator.js +25 -3
  133. package/dist/src/genomeSpy/viewDataInit.d.ts +14 -0
  134. package/dist/src/genomeSpy/viewDataInit.d.ts.map +1 -1
  135. package/dist/src/genomeSpy/viewDataInit.js +45 -8
  136. package/dist/src/genomeSpyBase.d.ts +6 -0
  137. package/dist/src/genomeSpyBase.d.ts.map +1 -1
  138. package/dist/src/genomeSpyBase.js +20 -3
  139. package/dist/src/gl/glslScaleGenerator.d.ts +17 -0
  140. package/dist/src/gl/glslScaleGenerator.d.ts.map +1 -1
  141. package/dist/src/gl/glslScaleGenerator.js +39 -2
  142. package/dist/src/gl/includes/common.glsl.js +1 -1
  143. package/dist/src/gl/vertexRangeIndex.d.ts.map +1 -1
  144. package/dist/src/gl/vertexRangeIndex.js +4 -2
  145. package/dist/src/gl/webGLHelper.d.ts +1 -1
  146. package/dist/src/gl/webGLHelper.d.ts.map +1 -1
  147. package/dist/src/gl/webGLHelper.js +13 -8
  148. package/dist/src/marks/__snapshots__/shaderSnapshot.test.js.snap +140 -3
  149. package/dist/src/marks/mark.d.ts +47 -4
  150. package/dist/src/marks/mark.d.ts.map +1 -1
  151. package/dist/src/marks/mark.js +158 -54
  152. package/dist/src/marks/point.d.ts.map +1 -1
  153. package/dist/src/marks/point.js +4 -0
  154. package/dist/src/marks/point.vertex.glsl.js +1 -1
  155. package/dist/src/marks/text.d.ts +1 -1
  156. package/dist/src/marks/text.d.ts.map +1 -1
  157. package/dist/src/marks/text.js +2 -7
  158. package/dist/src/marks/text.vertex.glsl.js +1 -1
  159. package/dist/src/paramRuntime/paramUtils.d.ts +43 -9
  160. package/dist/src/paramRuntime/paramUtils.d.ts.map +1 -1
  161. package/dist/src/paramRuntime/paramUtils.js +61 -1
  162. package/dist/src/paramRuntime/viewParamRuntime.d.ts +32 -0
  163. package/dist/src/paramRuntime/viewParamRuntime.d.ts.map +1 -1
  164. package/dist/src/paramRuntime/viewParamRuntime.js +63 -0
  165. package/dist/src/scales/axisResolution.d.ts +35 -0
  166. package/dist/src/scales/axisResolution.d.ts.map +1 -1
  167. package/dist/src/scales/axisResolution.js +115 -7
  168. package/dist/src/scales/legendResolution.d.ts +83 -0
  169. package/dist/src/scales/legendResolution.d.ts.map +1 -0
  170. package/dist/src/scales/legendResolution.js +461 -0
  171. package/dist/src/scales/scaleResolution.d.ts +36 -0
  172. package/dist/src/scales/scaleResolution.d.ts.map +1 -1
  173. package/dist/src/scales/scaleResolution.js +59 -0
  174. package/dist/src/scales/viewLevelGuideConfig.d.ts +53 -0
  175. package/dist/src/scales/viewLevelGuideConfig.d.ts.map +1 -0
  176. package/dist/src/scales/viewLevelGuideConfig.js +224 -0
  177. package/dist/src/scales/viewLevelScaleConfig.d.ts.map +1 -1
  178. package/dist/src/scales/viewLevelScaleConfig.js +13 -2
  179. package/dist/src/spec/axis.d.ts +109 -3
  180. package/dist/src/spec/channel.d.ts +23 -4
  181. package/dist/src/spec/config.d.ts +59 -4
  182. package/dist/src/spec/data.d.ts +177 -17
  183. package/dist/src/spec/legend.d.ts +246 -0
  184. package/dist/src/spec/mark.d.ts +16 -4
  185. package/dist/src/spec/title.d.ts +58 -1
  186. package/dist/src/spec/transform.d.ts +149 -0
  187. package/dist/src/spec/view.d.ts +39 -6
  188. package/dist/src/types/embedApi.d.ts +262 -6
  189. package/dist/src/types/rendering.d.ts +19 -3
  190. package/dist/src/types/viewContext.d.ts +18 -2
  191. package/dist/src/utils/arrayUtils.d.ts +11 -0
  192. package/dist/src/utils/arrayUtils.d.ts.map +1 -1
  193. package/dist/src/utils/arrayUtils.js +23 -0
  194. package/dist/src/utils/suspension.d.ts +17 -0
  195. package/dist/src/utils/suspension.d.ts.map +1 -0
  196. package/dist/src/utils/suspension.js +41 -0
  197. package/dist/src/view/axisGridView.d.ts.map +1 -1
  198. package/dist/src/view/axisGridView.js +1 -4
  199. package/dist/src/view/axisView.d.ts +18 -2
  200. package/dist/src/view/axisView.d.ts.map +1 -1
  201. package/dist/src/view/axisView.js +180 -75
  202. package/dist/src/view/concatView.d.ts +10 -2
  203. package/dist/src/view/concatView.d.ts.map +1 -1
  204. package/dist/src/view/concatView.js +46 -9
  205. package/dist/src/view/containerMutationHelper.d.ts +20 -1
  206. package/dist/src/view/containerMutationHelper.d.ts.map +1 -1
  207. package/dist/src/view/containerMutationHelper.js +196 -33
  208. package/dist/src/view/facetView.d.ts +1 -1
  209. package/dist/src/view/gridView/gridChild.d.ts +54 -4
  210. package/dist/src/view/gridView/gridChild.d.ts.map +1 -1
  211. package/dist/src/view/gridView/gridChild.js +301 -120
  212. package/dist/src/view/gridView/gridChildLegends.d.ts +57 -0
  213. package/dist/src/view/gridView/gridChildLegends.d.ts.map +1 -0
  214. package/dist/src/view/gridView/gridChildLegends.js +503 -0
  215. package/dist/src/view/gridView/gridView.d.ts +25 -0
  216. package/dist/src/view/gridView/gridView.d.ts.map +1 -1
  217. package/dist/src/view/gridView/gridView.js +454 -78
  218. package/dist/src/view/gridView/legendLayout.d.ts +26 -0
  219. package/dist/src/view/gridView/legendLayout.d.ts.map +1 -0
  220. package/dist/src/view/gridView/legendLayout.js +111 -0
  221. package/dist/src/view/gridView/scrollbar.d.ts.map +1 -1
  222. package/dist/src/view/gridView/scrollbar.js +1 -4
  223. package/dist/src/view/gridView/selectionRect.d.ts.map +1 -1
  224. package/dist/src/view/gridView/selectionRect.js +1 -4
  225. package/dist/src/view/gridView/separatorView.d.ts.map +1 -1
  226. package/dist/src/view/gridView/separatorView.js +1 -4
  227. package/dist/src/view/layerView.d.ts +9 -2
  228. package/dist/src/view/layerView.d.ts.map +1 -1
  229. package/dist/src/view/layerView.js +18 -1
  230. package/dist/src/view/layout/flexLayout.d.ts +20 -4
  231. package/dist/src/view/layout/flexLayout.d.ts.map +1 -1
  232. package/dist/src/view/layout/flexLayout.js +331 -31
  233. package/dist/src/view/layout/rectangle.d.ts +14 -0
  234. package/dist/src/view/layout/rectangle.d.ts.map +1 -1
  235. package/dist/src/view/layout/rectangle.js +40 -0
  236. package/dist/src/view/legend/legendEntries.d.ts +20 -0
  237. package/dist/src/view/legend/legendEntries.d.ts.map +1 -0
  238. package/dist/src/view/legend/legendEntries.js +21 -0
  239. package/dist/src/view/legendView.d.ts +134 -0
  240. package/dist/src/view/legendView.d.ts.map +1 -0
  241. package/dist/src/view/legendView.js +1611 -0
  242. package/dist/src/view/renderingContext/bufferedViewRenderingContext.d.ts.map +1 -1
  243. package/dist/src/view/renderingContext/bufferedViewRenderingContext.js +26 -4
  244. package/dist/src/view/renderingContext/clipOptions.d.ts +44 -0
  245. package/dist/src/view/renderingContext/clipOptions.d.ts.map +1 -0
  246. package/dist/src/view/renderingContext/clipOptions.js +140 -0
  247. package/dist/src/view/renderingContext/simpleViewRenderingContext.d.ts.map +1 -1
  248. package/dist/src/view/renderingContext/simpleViewRenderingContext.js +12 -1
  249. package/dist/src/view/resolutionPlanner.d.ts +2 -1
  250. package/dist/src/view/resolutionPlanner.d.ts.map +1 -1
  251. package/dist/src/view/resolutionPlanner.js +89 -25
  252. package/dist/src/view/testUtils.d.ts +4 -2
  253. package/dist/src/view/testUtils.d.ts.map +1 -1
  254. package/dist/src/view/testUtils.js +29 -7
  255. package/dist/src/view/titleView.d.ts +37 -0
  256. package/dist/src/view/titleView.d.ts.map +1 -0
  257. package/dist/src/view/titleView.js +584 -0
  258. package/dist/src/view/unitView.d.ts +3 -3
  259. package/dist/src/view/unitView.d.ts.map +1 -1
  260. package/dist/src/view/unitView.js +3 -2
  261. package/dist/src/view/view.d.ts +25 -24
  262. package/dist/src/view/view.d.ts.map +1 -1
  263. package/dist/src/view/view.js +121 -16
  264. package/dist/src/view/viewFactory.d.ts +2 -5
  265. package/dist/src/view/viewFactory.d.ts.map +1 -1
  266. package/dist/src/view/viewFactory.js +1 -2
  267. package/dist/src/view/viewIdentityRegistry.d.ts +37 -0
  268. package/dist/src/view/viewIdentityRegistry.d.ts.map +1 -0
  269. package/dist/src/view/viewIdentityRegistry.js +71 -0
  270. package/dist/src/view/viewMutationAcidTestUtils.d.ts +112 -0
  271. package/dist/src/view/viewMutationAcidTestUtils.d.ts.map +1 -0
  272. package/dist/src/view/viewMutationAcidTestUtils.js +234 -0
  273. package/dist/src/view/viewMutationApi.d.ts +42 -0
  274. package/dist/src/view/viewMutationApi.d.ts.map +1 -0
  275. package/dist/src/view/viewMutationApi.js +811 -0
  276. package/dist/src/view/viewSelectors.d.ts +10 -0
  277. package/dist/src/view/viewSelectors.d.ts.map +1 -1
  278. package/dist/src/view/viewSelectors.js +23 -1
  279. package/package.json +4 -4
  280. package/dist/bundle/esm-CuMSzCHy.js +0 -298
  281. package/dist/bundle/esm-DAnOffpD.js +0 -1426
  282. package/dist/bundle/esm-DMXpJXM4.js +0 -369
  283. package/dist/bundle/esm-DNtC3H80.js +0 -121
  284. package/dist/src/view/title.d.ts +0 -13
  285. package/dist/src/view/title.d.ts.map +0 -1
  286. package/dist/src/view/title.js +0 -154
  287. /package/dist/bundle/{AbortablePromiseCache-3gHJdF3E.js → AbortablePromiseCache-BTmAcN-t.js} +0 -0
  288. /package/dist/bundle/{esm-CuVa5T98.js → esm-VvpZ9hsq.js} +0 -0
  289. /package/dist/bundle/{chunk-DmhlhrBa.js → rolldown-runtime-Dy4uBu1J.js} +0 -0
@@ -0,0 +1,441 @@
1
+ import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
2
+ //#region ../../node_modules/@gmod/bed/esm/autoSql.js
3
+ var t = class extends SyntaxError {
4
+ constructor(e, t, n, r) {
5
+ super(e), this.expected = t, this.found = n, this.location = r, this.name = "SyntaxError";
6
+ }
7
+ format(e) {
8
+ let t = "Error: " + this.message;
9
+ if (this.location) {
10
+ let n = null, r = e.find((e) => e.source === this.location.source);
11
+ r && (n = r.text.split(/\r\n|\n|\r/g));
12
+ let i = this.location.start, a = this.location.source && typeof this.location.source.offset == "function" ? this.location.source.offset(i) : i, o = this.location.source + ":" + a.line + ":" + a.column;
13
+ if (n) {
14
+ let e = this.location.end, r = "".padEnd(a.line.toString().length, " "), s = n[i.line - 1], c = (i.line === e.line ? e.column : s.length + 1) - i.column || 1;
15
+ t += "\n --> " + o + "\n" + r + " |\n" + a.line + " | " + s + "\n" + r + " | " + "".padEnd(i.column - 1, " ") + "".padEnd(c, "^");
16
+ } else t += "\n at " + o;
17
+ }
18
+ return t;
19
+ }
20
+ static buildMessage(e, t) {
21
+ function n(e) {
22
+ return e.codePointAt(0).toString(16).toUpperCase();
23
+ }
24
+ let r = Object.prototype.hasOwnProperty.call(RegExp.prototype, "unicode") ? /* @__PURE__ */ RegExp("[\\p{C}\\p{Mn}\\p{Mc}]", "gu") : null;
25
+ function i(e) {
26
+ return r ? e.replace(r, (e) => "\\u{" + n(e) + "}") : e;
27
+ }
28
+ function a(e) {
29
+ return i(e.replace(/\\/g, "\\\\").replace(/"/g, "\\\"").replace(/\0/g, "\\0").replace(/\t/g, "\\t").replace(/\n/g, "\\n").replace(/\r/g, "\\r").replace(/[\x00-\x0F]/g, (e) => "\\x0" + n(e)).replace(/[\x10-\x1F\x7F-\x9F]/g, (e) => "\\x" + n(e)));
30
+ }
31
+ function o(e) {
32
+ return i(e.replace(/\\/g, "\\\\").replace(/\]/g, "\\]").replace(/\^/g, "\\^").replace(/-/g, "\\-").replace(/\0/g, "\\0").replace(/\t/g, "\\t").replace(/\n/g, "\\n").replace(/\r/g, "\\r").replace(/[\x00-\x0F]/g, (e) => "\\x0" + n(e)).replace(/[\x10-\x1F\x7F-\x9F]/g, (e) => "\\x" + n(e)));
33
+ }
34
+ let s = {
35
+ literal(e) {
36
+ return "\"" + a(e.text) + "\"";
37
+ },
38
+ class(e) {
39
+ let t = e.parts.map((e) => Array.isArray(e) ? o(e[0]) + "-" + o(e[1]) : o(e));
40
+ return "[" + (e.inverted ? "^" : "") + t.join("") + "]" + (e.unicode ? "u" : "");
41
+ },
42
+ any() {
43
+ return "any character";
44
+ },
45
+ end() {
46
+ return "end of input";
47
+ },
48
+ other(e) {
49
+ return e.description;
50
+ }
51
+ };
52
+ function c(e) {
53
+ return s[e.type](e);
54
+ }
55
+ function l(e) {
56
+ let t = e.map(c);
57
+ if (t.sort(), t.length > 0) {
58
+ let e = 1;
59
+ for (let n = 1; n < t.length; n++) t[n - 1] !== t[n] && (t[e] = t[n], e++);
60
+ t.length = e;
61
+ }
62
+ switch (t.length) {
63
+ case 1: return t[0];
64
+ case 2: return t[0] + " or " + t[1];
65
+ default: return t.slice(0, -1).join(", ") + ", or " + t[t.length - 1];
66
+ }
67
+ }
68
+ function u(e) {
69
+ return e ? "\"" + a(e) + "\"" : "end of input";
70
+ }
71
+ return "Expected " + l(e) + " but " + u(t) + " found.";
72
+ }
73
+ };
74
+ function n(e, n) {
75
+ n = n === void 0 ? {} : n;
76
+ let r = {}, i = n.grammarSource, a = { declaration: W }, o = W, s = "primary", c = "index", l = "unique", u = "auto", d = /^[a-zA-Z0-9_]/, f = /^[a-zA-Z_]/, p = /^[^\n\r]/, m = /^[0-9]/, h = /^[ \t\n\r]/, g = z("(", !1), _ = z(")", !1), v = z("simple", !0), y = z("object", !0), b = z("table", !0), ee = z("primary", !1), x = B([
77
+ ["a", "z"],
78
+ ["A", "Z"],
79
+ ["0", "9"],
80
+ "_"
81
+ ], !1, !1, !1), te = z("index", !1), ne = z("unique", !1), re = z("#", !1), S = z("[", !1), C = z("]", !1), ie = z("auto", !1), w = z(";", !1), T = z(",", !1), ae = z("int", !0), oe = z("uint", !0), se = z("short", !0), ce = z("ushort", !0), le = z("byte", !0), ue = z("ubyte", !0), de = z("float", !0), fe = z("char", !0), pe = z("string", !0), me = z("lstring", !0), he = z("enum", !0), ge = z("double", !0), _e = z("bigint", !0), ve = z("set", !0), ye = B([
82
+ ["a", "z"],
83
+ ["A", "Z"],
84
+ "_"
85
+ ], !1, !1, !1), E = B(["\n", "\r"], !0, !1, !1), be = Ie("integer"), D = B([["0", "9"]], !1, !1, !1), O = B([
86
+ " ",
87
+ " ",
88
+ "\n",
89
+ "\r"
90
+ ], !1, !1, !1);
91
+ function xe(e, t, n, r) {
92
+ return {
93
+ type: e,
94
+ name: t,
95
+ comment: n,
96
+ fields: r
97
+ };
98
+ }
99
+ function Se(e) {
100
+ return e.toLowerCase();
101
+ }
102
+ function k(e, t) {
103
+ return t;
104
+ }
105
+ function Ce(e, t) {
106
+ return [e, ...t].filter((e) => e && e.name);
107
+ }
108
+ function we() {
109
+ return null;
110
+ }
111
+ function Te(e, t, n) {
112
+ return {
113
+ type: e,
114
+ name: t,
115
+ comment: n
116
+ };
117
+ }
118
+ function Ee(e, t, n, r) {
119
+ return {
120
+ type: e,
121
+ size: t,
122
+ name: n,
123
+ comment: r
124
+ };
125
+ }
126
+ function De(e, t, n, r) {
127
+ return {
128
+ type: e,
129
+ vals: t,
130
+ name: n,
131
+ comment: r
132
+ };
133
+ }
134
+ function A(e, t) {
135
+ return t;
136
+ }
137
+ function Oe(e, t) {
138
+ return t.unshift(e), t;
139
+ }
140
+ function ke(e) {
141
+ return e.toLowerCase();
142
+ }
143
+ function Ae(e, t) {
144
+ return e + " " + t;
145
+ }
146
+ function je() {
147
+ return R();
148
+ }
149
+ function Me(e) {
150
+ let t = e.join("").trim(), n = /^"(.*)".*$/.exec(t);
151
+ return n ? n[1] : t.replace(/^"|"$/g, "");
152
+ }
153
+ function Ne() {
154
+ return parseInt(R(), 10);
155
+ }
156
+ let j = n.peg$currPos | 0, M = j, N = [{
157
+ line: 1,
158
+ column: 1
159
+ }], P = j, F = n.peg$maxFailExpected || [], I = n.peg$silentFails | 0, L;
160
+ if (n.startRule) {
161
+ if (!(n.startRule in a)) throw Error("Can't start parsing from rule \"" + n.startRule + "\".");
162
+ o = a[n.startRule];
163
+ }
164
+ function R() {
165
+ return e.substring(M, j);
166
+ }
167
+ function Pe(t = j) {
168
+ let n = e.codePointAt(t);
169
+ return n === void 0 ? "" : String.fromCodePoint(n);
170
+ }
171
+ function z(e, t) {
172
+ return {
173
+ type: "literal",
174
+ text: e,
175
+ ignoreCase: t
176
+ };
177
+ }
178
+ function B(e, t, n, r) {
179
+ return {
180
+ type: "class",
181
+ parts: e,
182
+ inverted: t,
183
+ ignoreCase: n,
184
+ unicode: r
185
+ };
186
+ }
187
+ function Fe() {
188
+ return { type: "end" };
189
+ }
190
+ function Ie(e) {
191
+ return {
192
+ type: "other",
193
+ description: e
194
+ };
195
+ }
196
+ function V(t) {
197
+ let n = N[t], r;
198
+ if (n) return n;
199
+ if (t >= N.length) r = N.length - 1;
200
+ else for (r = t; !N[--r];);
201
+ for (n = N[r], n = {
202
+ line: n.line,
203
+ column: n.column
204
+ }; r < t;) e.charCodeAt(r) === 10 ? (n.line++, n.column = 1) : n.column++, r++;
205
+ return N[t] = n, n;
206
+ }
207
+ function H(e, t, n) {
208
+ let r = V(e), a = V(t), o = {
209
+ source: i,
210
+ start: {
211
+ offset: e,
212
+ line: r.line,
213
+ column: r.column
214
+ },
215
+ end: {
216
+ offset: t,
217
+ line: a.line,
218
+ column: a.column
219
+ }
220
+ };
221
+ return n && i && typeof i.offset == "function" && (o.start = i.offset(o.start), o.end = i.offset(o.end)), o;
222
+ }
223
+ function U(e) {
224
+ j < P || (j > P && (P = j, F = []), F.push(e));
225
+ }
226
+ function Le(e, n, r) {
227
+ return new t(t.buildMessage(e, n), e, n, r);
228
+ }
229
+ function W() {
230
+ let t, n, i, a, o, s, c;
231
+ return t = j, Z(), n = G(), n === r ? (j = t, t = r) : (Z(), i = Y(), i === r ? (j = t, t = r) : (Z(), a = X(), Z(), e.charCodeAt(j) === 40 ? (o = "(", j++) : (o = r, I === 0 && U(g)), o === r ? (j = t, t = r) : (Z(), s = ze(), s === r ? (j = t, t = r) : (Z(), e.charCodeAt(j) === 41 ? (c = ")", j++) : (c = r, I === 0 && U(_)), c === r ? (j = t, t = r) : (Z(), M = t, t = xe(n, i, a, s)))))), t;
232
+ }
233
+ function G() {
234
+ let t, n;
235
+ return t = j, n = e.substr(j, 6), n.toLowerCase() === "simple" ? j += 6 : (n = r, I === 0 && U(v)), n === r && (n = e.substr(j, 6), n.toLowerCase() === "object" ? j += 6 : (n = r, I === 0 && U(y)), n === r && (n = e.substr(j, 5), n.toLowerCase() === "table" ? j += 5 : (n = r, I === 0 && U(b)))), n !== r && (M = t, n = Se(n)), t = n, t;
236
+ }
237
+ function Re() {
238
+ let t, n, i, a;
239
+ return t = j, e.substr(j, 7) === s ? (n = s, j += 7) : (n = r, I === 0 && U(ee)), n === r ? (j = t, t = r) : (i = j, I++, a = e.charAt(j), d.test(a) ? j++ : (a = r, I === 0 && U(x)), I--, a === r ? i = void 0 : (j = i, i = r), i === r ? (j = t, t = r) : (n = [n, i], t = n)), t === r && (t = j, e.substr(j, 5) === c ? (n = c, j += 5) : (n = r, I === 0 && U(te)), n === r ? (j = t, t = r) : (i = j, I++, a = e.charAt(j), d.test(a) ? j++ : (a = r, I === 0 && U(x)), I--, a === r ? i = void 0 : (j = i, i = r), i === r ? (j = t, t = r) : (n = [n, i], t = n)), t === r && (t = j, e.substr(j, 6) === l ? (n = l, j += 6) : (n = r, I === 0 && U(ne)), n === r ? (j = t, t = r) : (i = j, I++, a = e.charAt(j), d.test(a) ? j++ : (a = r, I === 0 && U(x)), I--, a === r ? i = void 0 : (j = i, i = r), i === r ? (j = t, t = r) : (n = [n, i], t = n)))), t;
240
+ }
241
+ function ze() {
242
+ let e, t, n, i, a;
243
+ if (e = j, t = q(), t !== r) {
244
+ for (Z(), n = [], i = j, Z(), a = q(), a === r ? (j = i, i = r) : (M = i, i = k(t, a)); i !== r;) n.push(i), i = j, Z(), a = q(), a === r ? (j = i, i = r) : (M = i, i = k(t, a));
245
+ i = Z(), M = e, e = Ce(t, n);
246
+ } else j = e, e = r;
247
+ return e;
248
+ }
249
+ function Be() {
250
+ let t;
251
+ return e.charCodeAt(j) === 35 ? (t = "#", j++) : (t = r, I === 0 && U(re)), t;
252
+ }
253
+ function Ve() {
254
+ let e, t;
255
+ return e = j, Z(), t = Be(), t === r ? (j = e, e = r) : (X(), Z(), M = e, e = we()), e;
256
+ }
257
+ function K() {
258
+ let t, n, i, a, o, s, c, l, f;
259
+ return t = j, n = Re(), n === r ? (j = t, t = r) : (i = j, a = Z(), e.charCodeAt(j) === 91 ? (o = "[", j++) : (o = r, I === 0 && U(S)), o === r ? (j = i, i = r) : (s = Z(), c = We(), c === r ? (j = i, i = r) : (l = Z(), e.charCodeAt(j) === 93 ? (f = "]", j++) : (f = r, I === 0 && U(C)), f === r ? (j = i, i = r) : (a = [
260
+ a,
261
+ o,
262
+ s,
263
+ c,
264
+ l,
265
+ f
266
+ ], i = a))), i === r && (i = null), n = [n, i], t = n), t === r && (t = j, e.substr(j, 4) === u ? (n = u, j += 4) : (n = r, I === 0 && U(ie)), n === r ? (j = t, t = r) : (i = j, I++, a = e.charAt(j), d.test(a) ? j++ : (a = r, I === 0 && U(x)), I--, a === r ? i = void 0 : (j = i, i = r), i === r ? (j = t, t = r) : (n = [n, i], t = n))), t;
267
+ }
268
+ function q() {
269
+ let t, n, i, a, o, s, c, l, u, d, f, p, m, h;
270
+ if (t = j, n = J(), n !== r) if (Z(), i = Y(), i !== r) {
271
+ for (a = [], o = j, s = Z(), c = K(), c === r ? (j = o, o = r) : (s = [s, c], o = s); o !== r;) a.push(o), o = j, s = Z(), c = K(), c === r ? (j = o, o = r) : (s = [s, c], o = s);
272
+ o = Z(), e.charCodeAt(j) === 59 ? (s = ";", j++) : (s = r, I === 0 && U(w)), s === r ? (j = t, t = r) : (c = Z(), l = X(), M = t, t = Te(n, i, l));
273
+ } else j = t, t = r;
274
+ else j = t, t = r;
275
+ if (t === r) {
276
+ if (t = j, n = J(), n !== r) if (Z(), e.charCodeAt(j) === 91 ? (i = "[", j++) : (i = r, I === 0 && U(S)), i !== r) if (a = Z(), o = Ue(), o !== r) if (s = Z(), e.charCodeAt(j) === 93 ? (c = "]", j++) : (c = r, I === 0 && U(C)), c !== r) if (l = Z(), u = Y(), u !== r) {
277
+ for (d = [], f = j, p = Z(), m = K(), m === r ? (j = f, f = r) : (p = [p, m], f = p); f !== r;) d.push(f), f = j, p = Z(), m = K(), m === r ? (j = f, f = r) : (p = [p, m], f = p);
278
+ f = Z(), e.charCodeAt(j) === 59 ? (p = ";", j++) : (p = r, I === 0 && U(w)), p === r ? (j = t, t = r) : (m = Z(), h = X(), M = t, t = Ee(n, o, u, h));
279
+ } else j = t, t = r;
280
+ else j = t, t = r;
281
+ else j = t, t = r;
282
+ else j = t, t = r;
283
+ else j = t, t = r;
284
+ if (t === r) {
285
+ if (t = j, n = J(), n !== r) if (Z(), e.charCodeAt(j) === 40 ? (i = "(", j++) : (i = r, I === 0 && U(g)), i !== r) if (a = Z(), o = He(), o !== r) if (s = Z(), e.charCodeAt(j) === 41 ? (c = ")", j++) : (c = r, I === 0 && U(_)), c !== r) if (l = Z(), u = Y(), u !== r) {
286
+ for (d = [], f = j, p = Z(), m = K(), m === r ? (j = f, f = r) : (p = [p, m], f = p); f !== r;) d.push(f), f = j, p = Z(), m = K(), m === r ? (j = f, f = r) : (p = [p, m], f = p);
287
+ f = Z(), e.charCodeAt(j) === 59 ? (p = ";", j++) : (p = r, I === 0 && U(w)), p === r ? (j = t, t = r) : (m = Z(), h = X(), M = t, t = De(n, o, u, h));
288
+ } else j = t, t = r;
289
+ else j = t, t = r;
290
+ else j = t, t = r;
291
+ else j = t, t = r;
292
+ else j = t, t = r;
293
+ t === r && (t = Ve());
294
+ }
295
+ }
296
+ return t;
297
+ }
298
+ function He() {
299
+ let t, n, i, a, o, s;
300
+ if (t = j, n = Y(), n !== r) {
301
+ for (i = [], a = j, e.charCodeAt(j) === 44 ? (o = ",", j++) : (o = r, I === 0 && U(T)), o === r ? (j = a, a = r) : (Z(), s = Y(), s === r ? (j = a, a = r) : (M = a, a = A(n, s))); a !== r;) i.push(a), a = j, e.charCodeAt(j) === 44 ? (o = ",", j++) : (o = r, I === 0 && U(T)), o === r ? (j = a, a = r) : (Z(), s = Y(), s === r ? (j = a, a = r) : (M = a, a = A(n, s)));
302
+ M = t, t = Oe(n, i);
303
+ } else j = t, t = r;
304
+ return t;
305
+ }
306
+ function J() {
307
+ let t, n, i;
308
+ return t = j, n = e.substr(j, 3), n.toLowerCase() === "int" ? j += 3 : (n = r, I === 0 && U(ae)), n === r && (n = e.substr(j, 4), n.toLowerCase() === "uint" ? j += 4 : (n = r, I === 0 && U(oe)), n === r && (n = e.substr(j, 5), n.toLowerCase() === "short" ? j += 5 : (n = r, I === 0 && U(se)), n === r && (n = e.substr(j, 6), n.toLowerCase() === "ushort" ? j += 6 : (n = r, I === 0 && U(ce)), n === r && (n = e.substr(j, 4), n.toLowerCase() === "byte" ? j += 4 : (n = r, I === 0 && U(le)), n === r && (n = e.substr(j, 5), n.toLowerCase() === "ubyte" ? j += 5 : (n = r, I === 0 && U(ue)), n === r && (n = e.substr(j, 5), n.toLowerCase() === "float" ? j += 5 : (n = r, I === 0 && U(de)), n === r && (n = e.substr(j, 4), n.toLowerCase() === "char" ? j += 4 : (n = r, I === 0 && U(fe)), n === r && (n = e.substr(j, 6), n.toLowerCase() === "string" ? j += 6 : (n = r, I === 0 && U(pe)), n === r && (n = e.substr(j, 7), n.toLowerCase() === "lstring" ? j += 7 : (n = r, I === 0 && U(me)), n === r && (n = e.substr(j, 4), n.toLowerCase() === "enum" ? j += 4 : (n = r, I === 0 && U(he)), n === r && (n = e.substr(j, 6), n.toLowerCase() === "double" ? j += 6 : (n = r, I === 0 && U(ge)), n === r && (n = e.substr(j, 6), n.toLowerCase() === "bigint" ? j += 6 : (n = r, I === 0 && U(_e)), n === r && (n = e.substr(j, 3), n.toLowerCase() === "set" ? j += 3 : (n = r, I === 0 && U(ve))))))))))))))), n !== r && (M = t, n = ke(n)), t = n, t === r && (t = j, n = G(), n === r ? (j = t, t = r) : (Z(), i = Y(), i === r ? (j = t, t = r) : (M = t, t = Ae(n, i)))), t;
309
+ }
310
+ function Ue() {
311
+ let e;
312
+ return e = We(), e === r && (e = Y()), e;
313
+ }
314
+ function Y() {
315
+ let t, n, i, a;
316
+ if (t = j, n = e.charAt(j), f.test(n) ? j++ : (n = r, I === 0 && U(ye)), n !== r) {
317
+ for (i = [], a = e.charAt(j), d.test(a) ? j++ : (a = r, I === 0 && U(x)); a !== r;) i.push(a), a = e.charAt(j), d.test(a) ? j++ : (a = r, I === 0 && U(x));
318
+ M = t, t = je();
319
+ } else j = t, t = r;
320
+ return t;
321
+ }
322
+ function X() {
323
+ let t, n, i;
324
+ for (t = j, n = [], i = e.charAt(j), p.test(i) ? j++ : (i = r, I === 0 && U(E)); i !== r;) n.push(i), i = e.charAt(j), p.test(i) ? j++ : (i = r, I === 0 && U(E));
325
+ return M = t, n = Me(n), t = n, t;
326
+ }
327
+ function We() {
328
+ let t, n, i;
329
+ if (I++, t = j, n = [], i = e.charAt(j), m.test(i) ? j++ : (i = r, I === 0 && U(D)), i !== r) for (; i !== r;) n.push(i), i = e.charAt(j), m.test(i) ? j++ : (i = r, I === 0 && U(D));
330
+ else n = r;
331
+ return n !== r && (M = t, n = Ne()), t = n, I--, t === r && (n = r, I === 0 && U(be)), t;
332
+ }
333
+ function Z() {
334
+ let t, n;
335
+ for (I++, t = [], n = e.charAt(j), h.test(n) ? j++ : (n = r, I === 0 && U(O)); n !== r;) t.push(n), n = e.charAt(j), h.test(n) ? j++ : (n = r, I === 0 && U(O));
336
+ return I--, t;
337
+ }
338
+ L = o();
339
+ let Q = L !== r && j === e.length;
340
+ function $() {
341
+ throw L !== r && j < e.length && U(Fe()), Le(F, P < e.length ? Pe(P) : null, P < e.length ? H(P, P + 1) : H(P, P));
342
+ }
343
+ if (n.peg$library) return {
344
+ peg$result: L,
345
+ peg$currPos: j,
346
+ peg$FAILED: r,
347
+ peg$maxFailExpected: F,
348
+ peg$maxFailPos: P,
349
+ peg$success: Q,
350
+ peg$throw: Q ? void 0 : $
351
+ };
352
+ if (Q) return L;
353
+ $();
354
+ }
355
+ //#endregion
356
+ //#region ../../node_modules/@gmod/bed/esm/as/autoSqlSchemas.js
357
+ var r = /* @__PURE__ */ e({
358
+ bigChain: () => i,
359
+ bigGenePred: () => a,
360
+ bigInteract: () => o,
361
+ bigLink: () => s,
362
+ bigMaf: () => c,
363
+ bigNarrowPeak: () => l,
364
+ bigPsl: () => u,
365
+ defaultBedSchema: () => d,
366
+ mafFrames: () => f,
367
+ mafSummary: () => p
368
+ }), i = "table bigChain\n\"bigChain pairwise alignment\"\n (\n string chrom; \"Reference sequence chromosome or scaffold\"\n uint chromStart; \"Start position in chromosome\"\n uint chromEnd; \"End position in chromosome\"\n string name; \"Name or ID of item, ideally both human readable and unique\"\n uint score; \"Score (0-1000)\"\n char[1] strand; \"+ or - for strand\"\n uint tSize; \"size of target sequence\"\n string qName; \"name of query sequence\"\n uint qSize; \"size of query sequence\"\n uint qStart; \"start of alignment on query sequence\"\n uint qEnd; \"end of alignment on query sequence\"\n uint chainScore; \"score from chain\"\n )", a = "table bigGenePred\n\"bigGenePred gene models\"\n (\n string chrom; \"Reference sequence chromosome or scaffold\"\n uint chromStart; \"Start position in chromosome\"\n uint chromEnd; \"End position in chromosome\"\n string name; \"Name or ID of item, ideally both human readable and unique\"\n uint score; \"Score (0-1000)\"\n char[1] strand; \"+ or - for strand\"\n uint thickStart; \"Start of where display should be thick (start codon)\"\n uint thickEnd; \"End of where display should be thick (stop codon)\"\n uint reserved; \"RGB value (use R,G,B string in input file)\"\n int blockCount; \"Number of blocks\"\n int[blockCount] blockSizes; \"Comma separated list of block sizes\"\n int[blockCount] chromStarts; \"Start positions relative to chromStart\"\n string name2; \"Alternative/human readable name\"\n string cdsStartStat; \"Status of CDS start annotation (none, unknown, incomplete, or complete)\"\n string cdsEndStat; \"Status of CDS end annotation (none, unknown, incomplete, or complete)\"\n int[blockCount] exonFrames; \"Exon frame {0,1,2}, or -1 if no frame for exon\"\n string type; \"Transcript type\"\n string geneName; \"Primary identifier for gene\"\n string geneName2; \"Alternative/human readable gene name\"\n string geneType; \"Gene type\"\n )", o = "table interact\n\"interaction between two regions\"\n (\n string chrom; \"Chromosome (or contig, scaffold, etc.). For interchromosomal, use 2 records\"\n uint chromStart; \"Start position of lower region. For interchromosomal, set to chromStart of this region\"\n uint chromEnd; \"End position of upper region. For interchromosomal, set to chromEnd of this region\"\n string name; \"Name of item, for display. Usually 'sourceName/targetName/exp' or empty\"\n uint score; \"Score (0-1000)\"\n double value; \"Strength of interaction or other data value. Typically basis for score\"\n string exp; \"Experiment name (metadata for filtering). Use . if not applicable\"\n string color; \"Item color. Specified as r,g,b or hexadecimal #RRGGBB or html color name, as in //www.w3.org/TR/css3-color/#html4. Use 0 and spectrum setting to shade by score\"\n string sourceChrom; \"Chromosome of source region (directional) or lower region. For non-directional interchromosomal, chrom of this region.\"\n uint sourceStart; \"Start position in chromosome of source/lower/this region\"\n uint sourceEnd; \"End position in chromosome of source/lower/this region\"\n string sourceName; \"Identifier of source/lower/this region\"\n string sourceStrand; \"Orientation of source/lower/this region: + or -. Use . if not applicable\"\n string targetChrom; \"Chromosome of target region (directional) or upper region. For non-directional interchromosomal, chrom of other region\"\n uint targetStart; \"Start position in chromosome of target/upper/this region\"\n uint targetEnd; \"End position in chromosome of target/upper/this region\"\n string targetName; \"Identifier of target/upper/this region\"\n string targetStrand; \"Orientation of target/upper/this region: + or -. Use . if not applicable\"\n\n )", s = "table bigLink\n\"bigLink pairwise alignment\"\n (\n string chrom; \"Reference sequence chromosome or scaffold\"\n uint chromStart; \"Start position in chromosome\"\n uint chromEnd; \"End position in chromosome\"\n string name; \"Name or ID of item, ideally both human readable and unique\"\n uint qStart; \"start of alignment on query sequence\"\n )", c = "table bedMaf\n\"Bed3 with MAF block\"\n (\n string chrom; \"Reference sequence chromosome or scaffold\"\n uint chromStart; \"Start position in chromosome\"\n uint chromEnd; \"End position in chromosome\"\n lstring mafBlock; \"MAF block\"\n )", l = "table bigNarrowPeak\n\"BED6+4 Peaks of signal enrichment based on pooled, normalized (interpreted) data.\"\n(\n string chrom; \"Reference sequence chromosome or scaffold\"\n uint chromStart; \"Start position in chromosome\"\n uint chromEnd; \"End position in chromosome\"\n string name; \"Name given to a region (preferably unique). Use . if no name is assigned\"\n uint score; \"Indicates how dark the peak will be displayed in the browser (0-1000) \"\n char[1] strand; \"+ or - or . for unknown\"\n float signalValue; \"Measurement of average enrichment for the region\"\n float pValue; \"Statistical significance of signal value (-log10). Set to -1 if not used.\"\n float qValue; \"Statistical significance with multiple-test correction applied (FDR -log10). Set to -1 if not used.\"\n int peak; \"Point-source called for this peak; 0-based offset from chromStart. Set to -1 if no point-source called.\"\n)", u = "table bigPsl\n\"bigPsl pairwise alignment\"\n (\n string chrom; \"Reference sequence chromosome or scaffold\"\n uint chromStart; \"Start position in chromosome\"\n uint chromEnd; \"End position in chromosome\"\n string name; \"Name or ID of item, ideally both human readable and unique\"\n uint score; \"Score (0-1000)\"\n char[1] strand; \"+ or - indicates whether the query aligns to the + or - strand on the reference\"\n uint thickStart; \"Start of where display should be thick (start codon)\"\n uint thickEnd; \"End of where display should be thick (stop codon)\"\n uint reserved; \"RGB value (use R,G,B string in input file)\"\n int blockCount; \"Number of blocks\"\n int[blockCount] blockSizes; \"Comma separated list of block sizes\"\n int[blockCount] chromStarts; \"Start positions relative to chromStart\"\n\n uint oChromStart;\"Start position in other chromosome\"\n uint oChromEnd; \"End position in other chromosome\"\n char[1] oStrand; \"+ or -, - means that psl was reversed into BED-compatible coordinates\"\n uint oChromSize; \"Size of other chromosome.\"\n int[blockCount] oChromStarts; \"Start positions relative to oChromStart or from oChromStart+oChromSize depending on strand\"\n\n lstring oSequence; \"Sequence on other chrom (or empty)\"\n string oCDS; \"CDS in NCBI format\"\n\n uint chromSize;\"Size of target chromosome\"\n\n uint match; \"Number of bases matched.\"\n uint misMatch; \" Number of bases that don't match \"\n uint repMatch; \" Number of bases that match but are part of repeats \"\n uint nCount; \" Number of 'N' bases \"\n uint seqType; \"0=empty, 1=nucleotide, 2=amino_acid\"\n )", d = "table defaultBedSchema\n\"BED12\"\n (\n string chrom; \"The name of the chromosome (e.g. chr3, chrY, chr2_random) or scaffold (e.g. scaffold10671).\"\n uint chromStart; \"The starting position of the feature in the chromosome or scaffold. The first base in a chromosome is numbered 0.\"\n uint chromEnd; \"The ending position of the feature in the chromosome or scaffold. The chromEnd base is not included in the display of the feature. For example, the first 100 bases of a chromosome are defined as chromStart=0, chromEnd=100, and span the bases numbered 0-99.\"\n string name; \"Defines the name of the BED line.\"\n float score; \"Feature score, doesn't care about the 0-1000 limit as in bed\"\n char strand; \"Defines the strand. Either '.' (=no strand) or '+' or '-'\"\n uint thickStart; \"The starting position at which the feature is drawn thickly (for example, the start codon in gene displays). When there is no thick part, thickStart and thickEnd are usually set to the chromStart position.\"\n uint thickEnd; \"The ending position at which the feature is drawn thickly (for example the stop codon in gene displays).\"\n string itemRgb; \"An RGB value of the form R,G,B (e.g. 255,0,0). \"\n uint blockCount; \" The number of blocks (exons) in the BED line.\"\n uint[blockCount] blockSizes; \" A comma-separated list of the block sizes. The number of items in this list should correspond to blockCount.\"\n uint[blockCount] blockStarts; \"A comma-separated list of block starts. All of the blockStart positions should be calculated relative to chromStart. The number of items in this list should correspond to blockCount.\"\n )", f = "table mafFrames\n\"codon frame assignment for MAF components\"\n (\n string chrom; \"Reference sequence chromosome or scaffold\"\n uint chromStart; \"Start range in chromosome\"\n uint chromEnd; \"End range in chromosome\"\n string src; \"Name of sequence source in MAF\"\n ubyte frame; \"frame (0,1,2) for first base(+) or last bast(-)\"\n char[1] strand; \"+ or -\"\n string name; \"Name of gene used to define frame\"\n int prevFramePos; \"target position of the previous base (in transcription direction) that continues this frame, or -1 if none, or frame not contiguous\"\n int nextFramePos; \"target position of the next base (in transcription direction) that continues this frame, or -1 if none, or frame not contiguous\"\n ubyte isExonStart; \"does this start the CDS portion of an exon?\"\n ubyte isExonEnd; \"does this end the CDS portion of an exon?\"\n )", p = "table mafSummary\n\"Positions and scores for alignment blocks\"\n (\n string chrom; \"Reference sequence chromosome or scaffold\"\n uint chromStart; \"Start position in chromosome\"\n uint chromEnd; \"End position in chromosome\"\n string src; \"Sequence name or database of alignment\"\n float score; \"Floating point score.\"\n char[1] leftStatus; \"Gap/break annotation for preceding block\"\n char[1] rightStatus; \"Gap/break annotation for following block\"\n )", m = Object.fromEntries(Object.entries(r).map(([e, t]) => [e, n(t.trim())])), h = /* @__PURE__ */ new Set([
369
+ "uint",
370
+ "int",
371
+ "short",
372
+ "ushort",
373
+ "byte",
374
+ "ubyte",
375
+ "float",
376
+ "double"
377
+ ]);
378
+ function g(e) {
379
+ return {
380
+ ...e,
381
+ fields: e.fields.map((e) => ({
382
+ ...e,
383
+ isArray: !!e.size && e.type !== "char",
384
+ arrayIsNumeric: !!e.size && h.has(e.type),
385
+ isNumeric: !e.size && h.has(e.type)
386
+ }))
387
+ };
388
+ }
389
+ //#endregion
390
+ //#region ../../node_modules/@gmod/bed/esm/parser.js
391
+ var _ = {
392
+ ".": 0,
393
+ "-": -1,
394
+ "+": 1
395
+ };
396
+ function v(e) {
397
+ return e.replace(/%([0-9A-Fa-f]{2})/g, (e, t) => String.fromCharCode(Number.parseInt(t, 16)));
398
+ }
399
+ function y(e) {
400
+ let t = Number.parseInt(e[9], 10);
401
+ return e.length >= 12 && !Number.isNaN(t) && e[10]?.split(",").filter((e) => e).length === t;
402
+ }
403
+ var b = class {
404
+ autoSql;
405
+ attemptDefaultBed;
406
+ constructor(e = {}) {
407
+ if (e.autoSql) this.autoSql = g(n(e.autoSql));
408
+ else if (e.type) {
409
+ if (!m[e.type]) throw Error("Type not found");
410
+ this.autoSql = g(m[e.type]);
411
+ } else this.autoSql = g(m.defaultBedSchema), this.attemptDefaultBed = !0;
412
+ }
413
+ parseLine(e, t = {}) {
414
+ let { autoSql: n } = this, { uniqueId: r } = t, i = Array.isArray(e) ? e : e.split(" "), a = {};
415
+ if (!this.attemptDefaultBed || y(i)) for (let e = 0; e < n.fields.length; e++) {
416
+ let t = n.fields[e], r = i[e], { isNumeric: o, isArray: s, arrayIsNumeric: c, name: l } = t;
417
+ if (r === void 0) break;
418
+ if (r !== ".") if (o) {
419
+ let e = Number(r);
420
+ a[l] = Number.isNaN(e) ? r : e;
421
+ } else if (s) {
422
+ let e = r.split(",");
423
+ e.at(-1) === "" && e.pop(), a[l] = c ? e.map(Number) : e;
424
+ } else a[l] = r;
425
+ }
426
+ else {
427
+ a.chrom = i[0], a.chromStart = Number(i[1]), a.chromEnd = Number(i[2]), i[3] !== void 0 && (a.name = i[3]);
428
+ let e = i[4];
429
+ if (e !== void 0) {
430
+ let t = Number.parseFloat(e);
431
+ Number.isNaN(t) ? a.field4 = e : a.score = t;
432
+ }
433
+ let t = i[5];
434
+ t !== void 0 && (a[t === "+" || t === "-" ? "strand" : "field5"] = t);
435
+ for (let e = 6; e < i.length; e++) a["field" + e] = i[e];
436
+ }
437
+ return r && (a.uniqueId = r), a.strand = _[a.strand] ?? 0, a.chrom = v(String(a.chrom)), a;
438
+ }
439
+ };
440
+ //#endregion
441
+ export { b as default };
@@ -1,8 +1,8 @@
1
- import { n as e, r as t } from "./esm-NIYEaYkc.js";
2
- import { t as n } from "./esm-CuVa5T98.js";
3
- import { r, t as i } from "./browser-KWU9rWZT.js";
4
- import { t as a } from "./AbortablePromiseCache-3gHJdF3E.js";
5
- //#region ../../node_modules/@gmod/tabix/esm/chunk.js
1
+ import { n as e, r as t } from "./esm-Cx-EbkOj.js";
2
+ import { t as n } from "./esm-VvpZ9hsq.js";
3
+ import { r, t as i } from "./browser-CETrb2cm.js";
4
+ import { t as a } from "./AbortablePromiseCache-BTmAcN-t.js";
5
+ //#region node_modules/@gmod/tabix/esm/chunk.js
6
6
  var o = class {
7
7
  constructor(e, t, n, r) {
8
8
  this.minv = e, this.maxv = t, this.bin = n, this._fetchedSize = r;
@@ -58,7 +58,7 @@ function u(e, t = 0) {
58
58
  return ((e[t + 4] | e[t + 5] << 8 | e[t + 6] << 16 | e[t + 7] << 24) >>> 0) * l + (n >>> 0);
59
59
  }
60
60
  //#endregion
61
- //#region ../../node_modules/@gmod/tabix/esm/util.js
61
+ //#region node_modules/@gmod/tabix/esm/util.js
62
62
  function d(e, t) {
63
63
  return t.minv.blockPosition - e.maxv.blockPosition < 65e3 && t.maxv.blockPosition - e.minv.blockPosition < 5e6;
64
64
  }
@@ -73,7 +73,7 @@ function f(e, t) {
73
73
  return n;
74
74
  }
75
75
  //#endregion
76
- //#region ../../node_modules/@gmod/tabix/esm/virtualOffset.js
76
+ //#region node_modules/@gmod/tabix/esm/virtualOffset.js
77
77
  var p = class {
78
78
  constructor(e, t) {
79
79
  this.blockPosition = e, this.dataPosition = t;
@@ -89,7 +89,7 @@ function m(e, t = 0) {
89
89
  return new p(e[t + 7] * 1099511627776 + e[t + 6] * 4294967296 + e[t + 5] * 16777216 + e[t + 4] * 65536 + e[t + 3] * 256 + e[t + 2], e[t + 1] << 8 | e[t]);
90
90
  }
91
91
  //#endregion
92
- //#region ../../node_modules/@gmod/tabix/esm/csi.js
92
+ //#region node_modules/@gmod/tabix/esm/csi.js
93
93
  var h = 21582659, g = 38359875, _ = {
94
94
  0: "generic",
95
95
  1: "SAM",
@@ -239,49 +239,49 @@ var w = class extends s {
239
239
  ref: r.getInt32(12, !0),
240
240
  start: r.getInt32(16, !0),
241
241
  end: r.getInt32(20, !0)
242
- }, u = r.getInt32(24, !0), d = ((1 << 18) - 1) / 7, f = 2 ** 29, p = u ? String.fromCharCode(u) : void 0, h = r.getInt32(28, !0), g = r.getInt32(32, !0), { refNameToId: _, refIdToName: v } = this._parseNameBytes(n.slice(36, 36 + g)), y = 36 + g, b;
242
+ }, u = r.getInt32(24, !0), d = 2 ** 29, f = u ? String.fromCharCode(u) : void 0, p = r.getInt32(28, !0), h = r.getInt32(32, !0), { refNameToId: g, refIdToName: _ } = this._parseNameBytes(n.slice(36, 36 + h)), v = 36 + h, y;
243
243
  return {
244
244
  indices: Array(i).fill(0).map(() => {
245
- let e = r.getInt32(y, !0);
246
- y += 4;
245
+ let e = r.getInt32(v, !0);
246
+ v += 4;
247
247
  let t = {}, i;
248
248
  for (let a = 0; a < e; a += 1) {
249
- let e = r.getUint32(y, !0);
250
- if (y += 4, e > d + 1) throw Error("tabix index contains too many bins, please use a CSI index");
251
- if (e === d + 1) {
252
- let e = r.getInt32(y, !0);
253
- y += 4, e === 2 && (i = this.parsePseudoBin(n, y)), y += 16 * e;
249
+ let e = r.getUint32(v, !0);
250
+ if (v += 4, e > 37450) throw Error("tabix index contains too many bins, please use a CSI index");
251
+ if (e === 37450) {
252
+ let e = r.getInt32(v, !0);
253
+ v += 4, e === 2 && (i = this.parsePseudoBin(n, v)), v += 16 * e;
254
254
  } else {
255
- let i = r.getInt32(y, !0);
256
- y += 4;
255
+ let i = r.getInt32(v, !0);
256
+ v += 4;
257
257
  let a = Array(i);
258
258
  for (let t = 0; t < i; t += 1) {
259
- let r = m(n, y), i = m(n, y + 8);
260
- y += 16, b = this._findFirstData(b, r), a[t] = new o(r, i, e);
259
+ let r = m(n, v), i = m(n, v + 8);
260
+ v += 16, y = this._findFirstData(y, r), a[t] = new o(r, i, e);
261
261
  }
262
262
  t[e] = a;
263
263
  }
264
264
  }
265
- let a = r.getInt32(y, !0);
266
- y += 4;
265
+ let a = r.getInt32(v, !0);
266
+ v += 4;
267
267
  let s = Array(a);
268
- for (let e = 0; e < a; e += 1) s[e] = m(n, y), y += 8, b = this._findFirstData(b, s[e]);
268
+ for (let e = 0; e < a; e += 1) s[e] = m(n, v), v += 8, y = this._findFirstData(y, s[e]);
269
269
  return {
270
270
  binIndex: t,
271
271
  linearIndex: s,
272
272
  stats: i
273
273
  };
274
274
  }),
275
- metaChar: p,
276
- maxBinNumber: d,
277
- maxRefLength: f,
278
- skipLines: h,
279
- firstDataLine: b,
275
+ metaChar: f,
276
+ maxBinNumber: 37449,
277
+ maxRefLength: d,
278
+ skipLines: p,
279
+ firstDataLine: y,
280
280
  columnNumbers: l,
281
281
  coordinateType: s,
282
282
  format: c,
283
- refIdToName: v,
284
- refNameToId: _,
283
+ refIdToName: _,
284
+ refNameToId: g,
285
285
  maxBlockSize: 65536
286
286
  };
287
287
  }