maplibre-gl-components 0.16.2 → 0.17.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 (232) hide show
  1. package/README.md +4 -3
  2. package/dist/{ControlGrid-DQ4w_Nf9.js → ControlGrid-C6zp03Vq.js} +125375 -115454
  3. package/dist/ControlGrid-DIAcXRBe.cjs +17278 -0
  4. package/dist/DuckDBConverter-5a2FWwmf.js +354 -0
  5. package/dist/DuckDBConverter-pfXSUi_l.cjs +23 -0
  6. package/dist/ShapefileConverter-DGCXPY_S.cjs +1 -0
  7. package/dist/ShapefileConverter-DN3fVOuo.js +102 -0
  8. package/dist/basedecoder-BliCKuUS.js +62 -0
  9. package/dist/basedecoder-Zw0CbD9L.cjs +1 -0
  10. package/dist/deflate-DBL0msKQ.js +10 -0
  11. package/dist/deflate-DNeBKDsy.cjs +1 -0
  12. package/dist/esm-Bp6m44bk.js +811 -0
  13. package/dist/esm-oEp_aN1n.cjs +1 -0
  14. package/dist/geojson-Bnoe76Pm.js +2002 -0
  15. package/dist/geojson-CxMdRvJX.cjs +1 -0
  16. package/dist/geotiff-Bzy-Zyc2.js +1882 -0
  17. package/dist/geotiff-DYylEFA9.cjs +8 -0
  18. package/dist/globals-B4iCNAg9.cjs +1 -0
  19. package/dist/globals-BKIWameS.js +572 -0
  20. package/dist/index.cjs +1 -1
  21. package/dist/index.mjs +150 -147
  22. package/dist/jpeg-B6Sg6W8k.cjs +1 -0
  23. package/dist/jpeg-CJcNvScS.js +545 -0
  24. package/dist/lerc-2QwcA_K7.js +840 -0
  25. package/dist/lerc-DQRITnja.cjs +1 -0
  26. package/dist/lib-B4jvG7hB.cjs +4 -0
  27. package/dist/lib-CNQtqzfc.js +4060 -0
  28. package/dist/lzw-1HaU0PJK.cjs +1 -0
  29. package/dist/lzw-DF5VHuii.js +76 -0
  30. package/dist/main-dist-CbHNdsir.js +18314 -0
  31. package/dist/main-dist-DOx_Axbx.cjs +2 -0
  32. package/dist/maplibre-geoman.es-C0F1ydoG.cjs +213 -0
  33. package/dist/maplibre-geoman.es-D1CztSQd.js +27213 -0
  34. package/dist/maplibre-gl-components.css +2 -1
  35. package/dist/packbits-CK8RPU_B.js +22 -0
  36. package/dist/packbits-D5Zovac7.cjs +1 -0
  37. package/dist/pako.esm-DFyPB7cO.cjs +1 -0
  38. package/dist/pako.esm-hTfpTBhd.js +1536 -0
  39. package/dist/raw-Brljg6vy.js +9 -0
  40. package/dist/raw-C-CSxCoU.cjs +1 -0
  41. package/dist/react.cjs +1 -1
  42. package/dist/react.mjs +1357 -1004
  43. package/dist/{types → src}/lib/core/CogLayer.d.ts.map +1 -1
  44. package/dist/{types → src}/lib/core/PMTilesLayer.d.ts.map +1 -1
  45. package/dist/{types → src}/lib/core/SpinGlobeControl.d.ts +6 -7
  46. package/dist/src/lib/core/SpinGlobeControl.d.ts.map +1 -0
  47. package/dist/{types → src}/lib/core/StacLayer.d.ts.map +1 -1
  48. package/dist/{types → src}/lib/core/types.d.ts +3 -1
  49. package/dist/{types → src}/lib/core/types.d.ts.map +1 -1
  50. package/dist/{types → src}/lib/utils/color.d.ts +8 -0
  51. package/dist/src/lib/utils/color.d.ts.map +1 -0
  52. package/dist/{types → src}/lib/utils/index.d.ts +1 -1
  53. package/dist/{types → src}/lib/utils/index.d.ts.map +1 -1
  54. package/dist/webimage-Bh2pNwjN.cjs +1 -0
  55. package/dist/webimage-rg-Z9Sbn.js +25 -0
  56. package/dist/zstd-B3Xa90HD.cjs +1 -0
  57. package/dist/zstd-BwwN0X3K.js +51 -0
  58. package/package.json +66 -53
  59. package/dist/ControlGrid-Bukna_at.cjs +0 -17062
  60. package/dist/DuckDBConverter-B98M0DFs.cjs +0 -23
  61. package/dist/DuckDBConverter-RPq48-t0.js +0 -434
  62. package/dist/ShapefileConverter-AjbEjEyq.cjs +0 -1
  63. package/dist/ShapefileConverter-trvt8J3z.js +0 -125
  64. package/dist/decoder-CLokFc0V.js +0 -8
  65. package/dist/decoder-D9LU4bUo.cjs +0 -1
  66. package/dist/deflate-Bay-vzHJ.cjs +0 -1
  67. package/dist/deflate-yeu3ogBn.js +0 -10
  68. package/dist/geojson-BQSVgKFt.cjs +0 -1
  69. package/dist/geojson-BSUuDj5k.js +0 -2551
  70. package/dist/geotiff-BNxc90fm.cjs +0 -8
  71. package/dist/geotiff-BUZniE5g.js +0 -3105
  72. package/dist/index-8ZZtuDTp.js +0 -705
  73. package/dist/index-DQXdX5y1.js +0 -4666
  74. package/dist/index-Dh1kpCb6.cjs +0 -1
  75. package/dist/index-IrsIiQNM.cjs +0 -4
  76. package/dist/jpeg-B7yImnpY.js +0 -533
  77. package/dist/jpeg-BiN8bMT5.cjs +0 -1
  78. package/dist/lerc-BvSjGMM2.cjs +0 -1
  79. package/dist/lerc-CqgA9njy.js +0 -1031
  80. package/dist/lzw-C-_B7Jis.cjs +0 -1
  81. package/dist/lzw-DL9RcHOz.js +0 -84
  82. package/dist/main-dist-Bymiy5aM.cjs +0 -2
  83. package/dist/main-dist-Cv8AKwrY.js +0 -629
  84. package/dist/maplibre-geoman.es-Bxdg-2EU.cjs +0 -129
  85. package/dist/maplibre-geoman.es-CFgM2ajb.js +0 -22827
  86. package/dist/packbits-DRGSjtn-.cjs +0 -1
  87. package/dist/packbits-YEJGULcy.js +0 -24
  88. package/dist/pako.esm-Bx5X36Wo.js +0 -1074
  89. package/dist/pako.esm-DZC2QrbJ.cjs +0 -1
  90. package/dist/raw-CoQHiEnn.js +0 -9
  91. package/dist/raw-D6OidBKc.cjs +0 -1
  92. package/dist/types/lib/core/SpinGlobeControl.d.ts.map +0 -1
  93. package/dist/types/lib/utils/color.d.ts.map +0 -1
  94. package/dist/webimage-BXLN-zu8.js +0 -19
  95. package/dist/webimage-mWTez3Wv.cjs +0 -1
  96. /package/dist/{types → src}/index.d.ts +0 -0
  97. /package/dist/{types → src}/index.d.ts.map +0 -0
  98. /package/dist/{types → src}/lib/adapters/AddVectorAdapter.d.ts +0 -0
  99. /package/dist/{types → src}/lib/adapters/AddVectorAdapter.d.ts.map +0 -0
  100. /package/dist/{types → src}/lib/adapters/CogLayerAdapter.d.ts +0 -0
  101. /package/dist/{types → src}/lib/adapters/CogLayerAdapter.d.ts.map +0 -0
  102. /package/dist/{types → src}/lib/adapters/PMTilesLayerAdapter.d.ts +0 -0
  103. /package/dist/{types → src}/lib/adapters/PMTilesLayerAdapter.d.ts.map +0 -0
  104. /package/dist/{types → src}/lib/adapters/StacLayerAdapter.d.ts +0 -0
  105. /package/dist/{types → src}/lib/adapters/StacLayerAdapter.d.ts.map +0 -0
  106. /package/dist/{types → src}/lib/adapters/ZarrLayerAdapter.d.ts +0 -0
  107. /package/dist/{types → src}/lib/adapters/ZarrLayerAdapter.d.ts.map +0 -0
  108. /package/dist/{types → src}/lib/adapters/index.d.ts +0 -0
  109. /package/dist/{types → src}/lib/adapters/index.d.ts.map +0 -0
  110. /package/dist/{types → src}/lib/addControlGrid.d.ts +0 -0
  111. /package/dist/{types → src}/lib/addControlGrid.d.ts.map +0 -0
  112. /package/dist/{types → src}/lib/colormaps/diverging.d.ts +0 -0
  113. /package/dist/{types → src}/lib/colormaps/diverging.d.ts.map +0 -0
  114. /package/dist/{types → src}/lib/colormaps/index.d.ts +0 -0
  115. /package/dist/{types → src}/lib/colormaps/index.d.ts.map +0 -0
  116. /package/dist/{types → src}/lib/colormaps/misc.d.ts +0 -0
  117. /package/dist/{types → src}/lib/colormaps/misc.d.ts.map +0 -0
  118. /package/dist/{types → src}/lib/colormaps/sequential.d.ts +0 -0
  119. /package/dist/{types → src}/lib/colormaps/sequential.d.ts.map +0 -0
  120. /package/dist/{types → src}/lib/converters/DuckDBConverter.d.ts +0 -0
  121. /package/dist/{types → src}/lib/converters/DuckDBConverter.d.ts.map +0 -0
  122. /package/dist/{types → src}/lib/converters/ShapefileConverter.d.ts +0 -0
  123. /package/dist/{types → src}/lib/converters/ShapefileConverter.d.ts.map +0 -0
  124. /package/dist/{types → src}/lib/converters/index.d.ts +0 -0
  125. /package/dist/{types → src}/lib/converters/index.d.ts.map +0 -0
  126. /package/dist/{types → src}/lib/converters/types.d.ts +0 -0
  127. /package/dist/{types → src}/lib/converters/types.d.ts.map +0 -0
  128. /package/dist/{types → src}/lib/core/AddVector.d.ts +0 -0
  129. /package/dist/{types → src}/lib/core/AddVector.d.ts.map +0 -0
  130. /package/dist/{types → src}/lib/core/Basemap.d.ts +0 -0
  131. /package/dist/{types → src}/lib/core/Basemap.d.ts.map +0 -0
  132. /package/dist/{types → src}/lib/core/BasemapReact.d.ts +0 -0
  133. /package/dist/{types → src}/lib/core/BasemapReact.d.ts.map +0 -0
  134. /package/dist/{types → src}/lib/core/BookmarkControl.d.ts +0 -0
  135. /package/dist/{types → src}/lib/core/BookmarkControl.d.ts.map +0 -0
  136. /package/dist/{types → src}/lib/core/ChoroplethControl.d.ts +0 -0
  137. /package/dist/{types → src}/lib/core/ChoroplethControl.d.ts.map +0 -0
  138. /package/dist/{types → src}/lib/core/CogLayer.d.ts +0 -0
  139. /package/dist/{types → src}/lib/core/CogLayerReact.d.ts +0 -0
  140. /package/dist/{types → src}/lib/core/CogLayerReact.d.ts.map +0 -0
  141. /package/dist/{types → src}/lib/core/Colorbar.d.ts +0 -0
  142. /package/dist/{types → src}/lib/core/Colorbar.d.ts.map +0 -0
  143. /package/dist/{types → src}/lib/core/ColorbarGuiControl.d.ts +0 -0
  144. /package/dist/{types → src}/lib/core/ColorbarGuiControl.d.ts.map +0 -0
  145. /package/dist/{types → src}/lib/core/ColorbarReact.d.ts +0 -0
  146. /package/dist/{types → src}/lib/core/ColorbarReact.d.ts.map +0 -0
  147. /package/dist/{types → src}/lib/core/ControlGrid.d.ts +0 -0
  148. /package/dist/{types → src}/lib/core/ControlGrid.d.ts.map +0 -0
  149. /package/dist/{types → src}/lib/core/ControlGridReact.d.ts +0 -0
  150. /package/dist/{types → src}/lib/core/ControlGridReact.d.ts.map +0 -0
  151. /package/dist/{types → src}/lib/core/HtmlControl.d.ts +0 -0
  152. /package/dist/{types → src}/lib/core/HtmlControl.d.ts.map +0 -0
  153. /package/dist/{types → src}/lib/core/HtmlControlReact.d.ts +0 -0
  154. /package/dist/{types → src}/lib/core/HtmlControlReact.d.ts.map +0 -0
  155. /package/dist/{types → src}/lib/core/HtmlGuiControl.d.ts +0 -0
  156. /package/dist/{types → src}/lib/core/HtmlGuiControl.d.ts.map +0 -0
  157. /package/dist/{types → src}/lib/core/InspectControl.d.ts +0 -0
  158. /package/dist/{types → src}/lib/core/InspectControl.d.ts.map +0 -0
  159. /package/dist/{types → src}/lib/core/InspectControlReact.d.ts +0 -0
  160. /package/dist/{types → src}/lib/core/InspectControlReact.d.ts.map +0 -0
  161. /package/dist/{types → src}/lib/core/Legend.d.ts +0 -0
  162. /package/dist/{types → src}/lib/core/Legend.d.ts.map +0 -0
  163. /package/dist/{types → src}/lib/core/LegendGuiControl.d.ts +0 -0
  164. /package/dist/{types → src}/lib/core/LegendGuiControl.d.ts.map +0 -0
  165. /package/dist/{types → src}/lib/core/LegendReact.d.ts +0 -0
  166. /package/dist/{types → src}/lib/core/LegendReact.d.ts.map +0 -0
  167. /package/dist/{types → src}/lib/core/MeasureControl.d.ts +0 -0
  168. /package/dist/{types → src}/lib/core/MeasureControl.d.ts.map +0 -0
  169. /package/dist/{types → src}/lib/core/MinimapControl.d.ts +0 -0
  170. /package/dist/{types → src}/lib/core/MinimapControl.d.ts.map +0 -0
  171. /package/dist/{types → src}/lib/core/MinimapControlReact.d.ts +0 -0
  172. /package/dist/{types → src}/lib/core/MinimapControlReact.d.ts.map +0 -0
  173. /package/dist/{types → src}/lib/core/PMTilesLayer.d.ts +0 -0
  174. /package/dist/{types → src}/lib/core/PrintControl.d.ts +0 -0
  175. /package/dist/{types → src}/lib/core/PrintControl.d.ts.map +0 -0
  176. /package/dist/{types → src}/lib/core/SearchControl.d.ts +0 -0
  177. /package/dist/{types → src}/lib/core/SearchControl.d.ts.map +0 -0
  178. /package/dist/{types → src}/lib/core/SearchControlReact.d.ts +0 -0
  179. /package/dist/{types → src}/lib/core/SearchControlReact.d.ts.map +0 -0
  180. /package/dist/{types → src}/lib/core/StacLayer.d.ts +0 -0
  181. /package/dist/{types → src}/lib/core/StacSearch.d.ts +0 -0
  182. /package/dist/{types → src}/lib/core/StacSearch.d.ts.map +0 -0
  183. /package/dist/{types → src}/lib/core/Terrain.d.ts +0 -0
  184. /package/dist/{types → src}/lib/core/Terrain.d.ts.map +0 -0
  185. /package/dist/{types → src}/lib/core/TerrainReact.d.ts +0 -0
  186. /package/dist/{types → src}/lib/core/TerrainReact.d.ts.map +0 -0
  187. /package/dist/{types → src}/lib/core/TileLayerControl.d.ts +0 -0
  188. /package/dist/{types → src}/lib/core/TileLayerControl.d.ts.map +0 -0
  189. /package/dist/{types → src}/lib/core/VectorDataset.d.ts +0 -0
  190. /package/dist/{types → src}/lib/core/VectorDataset.d.ts.map +0 -0
  191. /package/dist/{types → src}/lib/core/VectorDatasetReact.d.ts +0 -0
  192. /package/dist/{types → src}/lib/core/VectorDatasetReact.d.ts.map +0 -0
  193. /package/dist/{types → src}/lib/core/ViewStateControl.d.ts +0 -0
  194. /package/dist/{types → src}/lib/core/ViewStateControl.d.ts.map +0 -0
  195. /package/dist/{types → src}/lib/core/ViewStateControlReact.d.ts +0 -0
  196. /package/dist/{types → src}/lib/core/ViewStateControlReact.d.ts.map +0 -0
  197. /package/dist/{types → src}/lib/core/ZarrLayer.d.ts +0 -0
  198. /package/dist/{types → src}/lib/core/ZarrLayer.d.ts.map +0 -0
  199. /package/dist/{types → src}/lib/hooks/index.d.ts +0 -0
  200. /package/dist/{types → src}/lib/hooks/index.d.ts.map +0 -0
  201. /package/dist/{types → src}/lib/hooks/useBasemap.d.ts +0 -0
  202. /package/dist/{types → src}/lib/hooks/useBasemap.d.ts.map +0 -0
  203. /package/dist/{types → src}/lib/hooks/useCogLayer.d.ts +0 -0
  204. /package/dist/{types → src}/lib/hooks/useCogLayer.d.ts.map +0 -0
  205. /package/dist/{types → src}/lib/hooks/useColorbar.d.ts +0 -0
  206. /package/dist/{types → src}/lib/hooks/useColorbar.d.ts.map +0 -0
  207. /package/dist/{types → src}/lib/hooks/useControlGrid.d.ts +0 -0
  208. /package/dist/{types → src}/lib/hooks/useControlGrid.d.ts.map +0 -0
  209. /package/dist/{types → src}/lib/hooks/useHtmlControl.d.ts +0 -0
  210. /package/dist/{types → src}/lib/hooks/useHtmlControl.d.ts.map +0 -0
  211. /package/dist/{types → src}/lib/hooks/useInspectControl.d.ts +0 -0
  212. /package/dist/{types → src}/lib/hooks/useInspectControl.d.ts.map +0 -0
  213. /package/dist/{types → src}/lib/hooks/useLegend.d.ts +0 -0
  214. /package/dist/{types → src}/lib/hooks/useLegend.d.ts.map +0 -0
  215. /package/dist/{types → src}/lib/hooks/useMinimapControl.d.ts +0 -0
  216. /package/dist/{types → src}/lib/hooks/useMinimapControl.d.ts.map +0 -0
  217. /package/dist/{types → src}/lib/hooks/useSearchControl.d.ts +0 -0
  218. /package/dist/{types → src}/lib/hooks/useSearchControl.d.ts.map +0 -0
  219. /package/dist/{types → src}/lib/hooks/useTerrain.d.ts +0 -0
  220. /package/dist/{types → src}/lib/hooks/useTerrain.d.ts.map +0 -0
  221. /package/dist/{types → src}/lib/hooks/useVectorDataset.d.ts +0 -0
  222. /package/dist/{types → src}/lib/hooks/useVectorDataset.d.ts.map +0 -0
  223. /package/dist/{types → src}/lib/hooks/useViewState.d.ts +0 -0
  224. /package/dist/{types → src}/lib/hooks/useViewState.d.ts.map +0 -0
  225. /package/dist/{types → src}/lib/utils/fileHelpers.d.ts +0 -0
  226. /package/dist/{types → src}/lib/utils/fileHelpers.d.ts.map +0 -0
  227. /package/dist/{types → src}/lib/utils/helpers.d.ts +0 -0
  228. /package/dist/{types → src}/lib/utils/helpers.d.ts.map +0 -0
  229. /package/dist/{types → src}/lib/utils/providers.d.ts +0 -0
  230. /package/dist/{types → src}/lib/utils/providers.d.ts.map +0 -0
  231. /package/dist/{types → src}/react.d.ts +0 -0
  232. /package/dist/{types → src}/react.d.ts.map +0 -0
package/dist/index.mjs CHANGED
@@ -1,10 +1,9 @@
1
- import { C as i } from "./ControlGrid-DQ4w_Nf9.js";
2
- import { A as g, a as O, b as T, c as A, B as f, d as h, e as G, f as y, g as w, h as _, i as X, j as I, k as b, D, l as v, F as P, G as M, m as x, n as B, o as V, p as F, q as R, r as U, s as k, t as H, u as K, H as q, v as J, I as Y, K as Z, w as j, L as z, x as Q, y as W, z as $, M as aa, E as oa, P as ra, J as sa, N as ea, O as ta, Q as na, R as la, S as ia, T as da, U as ca, V as Sa, W as pa, X as Ca, Y as ma, Z as ua, _ as Ea, $ as La, a0 as Na, a1 as ga, a2 as Oa, a3 as Ta, a4 as Aa, a5 as fa, a6 as ha, a7 as Ga, a8 as ya, a9 as wa, aa as _a, ab as Xa, ac as Ia, ad as ba, ae as Da, af as va, ag as Pa, ah as Ma, ai as xa, aj as Ba, ak as Va, al as Fa, am as Ra, an as Ua, ao as ka, ap as Ha, aq as Ka, ar as qa, as as Ja, at as Ya, au as Za, av as ja, aw as za, ax as Qa, ay as Wa, az as $a, aA as ao, aB as oo, aC as ro, aD as so, aE as eo, aF as to, aG as no, aH as lo, aI as io, aJ as co, aK as So, aL as po, aM as Co, aN as mo, aO as uo, aP as Eo, aQ as Lo, aR as No, aS as go, aT as Oo, aU as To, aV as Ao, aW as fo } from "./ControlGrid-DQ4w_Nf9.js";
3
- import { Creator as Go, MapScene as yo, SceneTransform as wo, Sun as _o } from "@dvt3d/maplibre-three-plugin";
1
+ import { $ as E, $t as L, A as N, At as g, B as O, Bt as T, C as A, Ct as h, D as G, Dt as f, E as y, Et as w, F as _, Ft as X, G as I, Gt as b, H as v, Ht as D, I as P, It as M, J as B, Jt as V, K as F, Kt as R, L as U, Lt as x, M as k, Mt as H, N as K, Nt as Y, O as Z, Ot as q, P as J, Pt as j, Q as z, Qt as Q, R as W, Rt as $, S as aa, St as ta, T as ra, Tt as oa, U as sa, Ut as ea, V as na, Vt as ia, W as la, Wt as da, X as Sa, Xt as ca, Y as pa, Yt as Ca, Z as ma, Zt as ua, _ as Ea, _t as La, a as Na, an as ga, at as Oa, b as Ta, bt as Aa, c as ha, ct as Ga, d as fa, dt as ya, en as wa, et as _a, f as Xa, ft as Ia, g as ba, gt as va, h as Da, ht as Pa, i as Ma, in as Ba, it as Va, j as Fa, jt as Ra, k as Ua, kt as xa, l as ka, lt as Ha, m as Ka, mt as Ya, n as Za, nn as qa, nt as Ja, o as ja, ot as za, p as Qa, pt as Wa, q as $a, qt as at, r as tt, rn as rt, rt as ot, s as st, st as et, t as l, tn as nt, tt as it, u as lt, ut as dt, v as St, vt as ct, w as pt, wt as Ct, x as mt, xt as ut, y as Et, yt as Lt, z as Nt, zt as gt } from "./ControlGrid-C6zp03Vq.js";
2
+ import { r as Tt, t as At } from "./DuckDBConverter-5a2FWwmf.js";
3
+ import { r as Gt, t as ft } from "./ShapefileConverter-DN3fVOuo.js";
4
4
  import d from "maplibre-gl";
5
- import { DuckDBConverter as Io, getDuckDBConverter as bo } from "./DuckDBConverter-RPq48-t0.js";
6
- import { ShapefileConverter as vo, getShapefileConverter as Po } from "./ShapefileConverter-trvt8J3z.js";
7
- const c = [
5
+ import { Creator as _t, MapScene as Xt, SceneTransform as It, Sun as bt } from "@dvt3d/maplibre-three-plugin";
6
+ var S = [
8
7
  "globe",
9
8
  "spinGlobe",
10
9
  "fullscreen",
@@ -37,7 +36,7 @@ const c = [
37
36
  "gaussianSplat",
38
37
  "lidar",
39
38
  "usgsLidar"
40
- ], S = [
39
+ ], c = [
41
40
  "usgs-lidar-*",
42
41
  "lidar-*",
43
42
  "mapbox-gl-draw-*",
@@ -46,157 +45,161 @@ const c = [
46
45
  "inspect-highlight-*",
47
46
  "measure-*"
48
47
  ];
49
- function p(o) {
50
- if (o <= 0) return { rows: 1, columns: 1 };
51
- const r = Math.ceil(Math.sqrt(o));
52
- return { rows: Math.ceil(o / r), columns: r };
48
+ function p(t) {
49
+ if (t <= 0) return {
50
+ rows: 1,
51
+ columns: 1
52
+ };
53
+ const r = Math.ceil(Math.sqrt(t));
54
+ return {
55
+ rows: Math.ceil(t / r),
56
+ columns: r
57
+ };
53
58
  }
54
- function C(o, r) {
55
- const { exclude: t, ...a } = r ?? {};
59
+ function C(t, r) {
60
+ const { exclude: n, ...a } = r ?? {};
56
61
  if (a.defaultControls === void 0) {
57
- const s = new Set(t ?? []);
58
- a.defaultControls = c.filter(
59
- (l) => !s.has(l)
60
- );
62
+ const o = new Set(n ?? []);
63
+ a.defaultControls = S.filter((i) => !o.has(i));
61
64
  }
62
- const e = a.defaultControls.length;
65
+ const s = a.defaultControls.length;
63
66
  if (a.rows === void 0 && a.columns === void 0) {
64
- const s = p(e);
65
- a.rows = s.rows, a.columns = s.columns;
66
- } else a.rows === void 0 && a.columns !== void 0 ? a.rows = Math.ceil(e / a.columns) : a.columns === void 0 && a.rows !== void 0 && (a.columns = Math.ceil(e / a.rows));
67
- a.position ??= "top-right", a.collapsible ??= !0, a.collapsed ??= !0, a.showRowColumnControls ??= !0, a.gap ??= 2, a.excludeLayers ??= [...S];
68
- const n = new i(a);
69
- return o.addControl(n, a.position), n;
67
+ const o = p(s);
68
+ a.rows = o.rows, a.columns = o.columns;
69
+ } else a.rows === void 0 && a.columns !== void 0 ? a.rows = Math.ceil(s / a.columns) : a.columns === void 0 && a.rows !== void 0 && (a.columns = Math.ceil(s / a.rows));
70
+ a.position ??= "top-right", a.collapsible ??= !0, a.collapsed ??= !0, a.showRowColumnControls ??= !0, a.gap ??= 2, a.excludeLayers ??= [...c];
71
+ const e = new l(a);
72
+ return t.addControl(e, a.position), e;
70
73
  }
71
- function m(o) {
72
- o.prototype.addControlGrid || (o.prototype.addControlGrid = function(r) {
74
+ function m(t) {
75
+ t.prototype.addControlGrid || (t.prototype.addControlGrid = function(r) {
73
76
  return C(this, r);
74
77
  });
75
78
  }
76
79
  m(d.Map);
77
80
  export {
78
- g as ADVANCED_EXTENSIONS,
79
- c as ALL_DEFAULT_CONTROLS,
80
- O as ALL_EXTENSIONS,
81
- T as AddVectorAdapter,
82
- A as AddVectorControl,
83
- f as BasemapControl,
84
- h as BookmarkControl,
85
- G as COLORMAPS,
86
- y as CSV_EXTENSIONS,
87
- w as ChoroplethControl,
88
- _ as CogLayerAdapter,
89
- X as CogLayerControl,
90
- I as Colorbar,
91
- b as ColorbarGuiControl,
92
- i as ControlGrid,
93
- Go as Creator,
94
- S as DEFAULT_EXCLUDE_LAYERS,
95
- D as DUCKDB_EXTENSIONS,
81
+ W as ADVANCED_EXTENSIONS,
82
+ S as ALL_DEFAULT_CONTROLS,
83
+ Nt as ALL_EXTENSIONS,
84
+ Da as AddVectorAdapter,
85
+ ra as AddVectorControl,
86
+ Ia as BasemapControl,
87
+ Fa as BookmarkControl,
88
+ X as COLORMAPS,
89
+ O as CSV_EXTENSIONS,
90
+ pt as ChoroplethControl,
91
+ St as CogLayerAdapter,
92
+ J as CogLayerControl,
93
+ Pa as Colorbar,
94
+ A as ColorbarGuiControl,
95
+ l as ControlGrid,
96
+ _t as Creator,
97
+ c as DEFAULT_EXCLUDE_LAYERS,
98
+ na as DUCKDB_EXTENSIONS,
96
99
  v as DXF_EXTENSIONS,
97
- Io as DuckDBConverter,
98
- P as FLATGEOBUF_EXTENSIONS,
99
- M as GEOJSON_EXTENSIONS,
100
- x as GEOPACKAGE_EXTENSIONS,
101
- B as GEOPARQUET_EXTENSIONS,
102
- V as GML_EXTENSIONS,
103
- F as GOOGLE_BASEMAPS,
104
- R as GPX_EXTENSIONS,
105
- U as GaussianSplatControl,
106
- k as GaussianSplatLayerAdapter,
107
- H as GeoEditor,
108
- K as GeoEditorLayerAdapter,
109
- q as HtmlControl,
110
- J as HtmlGuiControl,
111
- Y as InspectControl,
112
- Z as KML_EXTENSIONS,
113
- j as KMZ_EXTENSIONS,
114
- z as Legend,
115
- Q as LegendGuiControl,
116
- W as LidarControl,
117
- $ as LidarLayerAdapter,
118
- yo as MapScene,
119
- aa as MeasureControl,
120
- oa as MinimapControl,
121
- ra as PMTilesLayerAdapter,
122
- sa as PMTilesLayerControl,
123
- ea as PlanetaryComputerControl,
124
- ta as PlanetaryComputerLayerAdapter,
125
- na as PrintControl,
126
- la as RdBu,
127
- ia as RdYlBu,
128
- da as RdYlGn,
129
- ca as SHAPEFILE_EXTENSIONS,
130
- Sa as SHPJS_EXTENSIONS,
131
- wo as SceneTransform,
132
- pa as SearchControl,
133
- vo as ShapefileConverter,
134
- Ca as SpinGlobeControl,
135
- ma as StacLayerAdapter,
136
- ua as StacLayerControl,
137
- Ea as StacSearchControl,
138
- La as StreetViewControl,
139
- _o as Sun,
140
- Na as SwipeControl,
141
- ga as TOPOJSON_EXTENSIONS,
142
- Oa as TerrainControl,
143
- Ta as TileLayerControl,
144
- Aa as UsgsLidarControl,
145
- fa as UsgsLidarLayerAdapter,
146
- ha as VectorDatasetControl,
147
- Ga as ViewStateControl,
148
- ya as XLSX_EXTENSIONS,
149
- wa as XYZSERVICES_URL,
150
- _a as ZarrLayerAdapter,
151
- Xa as ZarrLayerControl,
100
+ At as DuckDBConverter,
101
+ sa as FLATGEOBUF_EXTENSIONS,
102
+ la as GEOJSON_EXTENSIONS,
103
+ I as GEOPACKAGE_EXTENSIONS,
104
+ F as GEOPARQUET_EXTENSIONS,
105
+ $a as GML_EXTENSIONS,
106
+ va as GOOGLE_BASEMAPS,
107
+ B as GPX_EXTENSIONS,
108
+ st as GaussianSplatControl,
109
+ ja as GaussianSplatLayerAdapter,
110
+ Xa as GeoEditor,
111
+ Qa as GeoEditorLayerAdapter,
112
+ Wa as HtmlControl,
113
+ mt as HtmlGuiControl,
114
+ P as InspectControl,
115
+ pa as KML_EXTENSIONS,
116
+ Sa as KMZ_EXTENSIONS,
117
+ Ya as Legend,
118
+ aa as LegendGuiControl,
119
+ lt as LidarControl,
120
+ fa as LidarLayerAdapter,
121
+ Xt as MapScene,
122
+ k as MeasureControl,
123
+ K as MinimapControl,
124
+ ba as PMTilesLayerAdapter,
125
+ Z as PMTilesLayerControl,
126
+ ka as PlanetaryComputerControl,
127
+ ha as PlanetaryComputerLayerAdapter,
128
+ N as PrintControl,
129
+ V as RdBu,
130
+ Ca as RdYlBu,
131
+ ca as RdYlGn,
132
+ ma as SHAPEFILE_EXTENSIONS,
133
+ z as SHPJS_EXTENSIONS,
134
+ It as SceneTransform,
135
+ dt as SearchControl,
136
+ ft as ShapefileConverter,
137
+ Ta as SpinGlobeControl,
138
+ Ka as StacLayerAdapter,
139
+ G as StacLayerControl,
140
+ y as StacSearchControl,
141
+ Na as StreetViewControl,
142
+ bt as Sun,
143
+ Ma as SwipeControl,
144
+ E as TOPOJSON_EXTENSIONS,
145
+ ya as TerrainControl,
146
+ Et as TileLayerControl,
147
+ tt as UsgsLidarControl,
148
+ Za as UsgsLidarLayerAdapter,
149
+ U as VectorDatasetControl,
150
+ _ as ViewStateControl,
151
+ _a as XLSX_EXTENSIONS,
152
+ La as XYZSERVICES_URL,
153
+ Ea as ZarrLayerAdapter,
154
+ Ua as ZarrLayerControl,
152
155
  C as addControlGrid,
153
- Ia as bone,
154
- ba as buildTileUrl,
155
- Da as bwr,
156
- va as cividis,
157
- Pa as clamp,
158
- Ma as classNames,
159
- xa as cool,
160
- Ba as coolwarm,
161
- Va as debounce,
162
- Fa as detectFormat,
163
- Ra as fetchProviders,
164
- Ua as filterBasemaps,
165
- ka as formatNumericValue,
166
- Ha as generateGradientCSS,
167
- Ka as generateId,
168
- qa as generateThumbnailUrl,
156
+ gt as bone,
157
+ ct as buildTileUrl,
158
+ ua as bwr,
159
+ nt as cividis,
160
+ xa as clamp,
161
+ g as classNames,
162
+ T as cool,
163
+ Q as coolwarm,
164
+ Ra as debounce,
165
+ it as detectFormat,
166
+ Lt as fetchProviders,
167
+ Aa as filterBasemaps,
168
+ H as formatNumericValue,
169
+ Ct as generateGradientCSS,
170
+ Y as generateId,
171
+ ut as generateThumbnailUrl,
169
172
  Ja as getAcceptedExtensions,
170
- Ya as getColorAtPosition,
171
- Za as getColormap,
172
- ja as getColormapNames,
173
- bo as getDuckDBConverter,
174
- za as getFileExtension,
175
- Qa as getFormatDescription,
176
- Wa as getFormatDisplayName,
177
- Po as getShapefileConverter,
178
- $a as gray,
179
- ao as groupBasemaps,
180
- oo as hexToRgb,
181
- ro as hot,
182
- so as inferno,
183
- eo as interpolateColor,
184
- to as isValidColormap,
185
- no as isValidExtension,
186
- lo as jet,
187
- io as magma,
188
- co as ocean,
189
- So as parseProviders,
190
- po as plasma,
191
- Co as rainbow,
192
- mo as readFileAsBuffer,
193
- uo as requiresConversion,
194
- Eo as requiresDuckDB,
195
- Lo as rgbToHex,
196
- No as seismic,
197
- go as spectral,
198
- Oo as terrain,
199
- To as throttle,
200
- Ao as turbo,
201
- fo as viridis
173
+ oa as getColorAtPosition,
174
+ M as getColormap,
175
+ x as getColormapNames,
176
+ Tt as getDuckDBConverter,
177
+ ot as getFileExtension,
178
+ Va as getFormatDescription,
179
+ Oa as getFormatDisplayName,
180
+ Gt as getShapefileConverter,
181
+ ia as gray,
182
+ ta as groupBasemaps,
183
+ w as hexToRgb,
184
+ D as hot,
185
+ qa as inferno,
186
+ f as interpolateColor,
187
+ $ as isValidColormap,
188
+ za as isValidExtension,
189
+ ea as jet,
190
+ rt as magma,
191
+ da as ocean,
192
+ h as parseProviders,
193
+ Ba as plasma,
194
+ b as rainbow,
195
+ et as readFileAsBuffer,
196
+ Ga as requiresConversion,
197
+ Ha as requiresDuckDB,
198
+ q as rgbToHex,
199
+ L as seismic,
200
+ wa as spectral,
201
+ R as terrain,
202
+ j as throttle,
203
+ at as turbo,
204
+ ga as viridis
202
205
  };
@@ -0,0 +1 @@
1
+ const ie=require("./basedecoder-Zw0CbD9L.cjs");var O=new Int32Array([0,1,8,16,9,2,3,10,17,24,32,25,18,11,4,5,12,19,26,33,40,48,41,34,27,20,13,6,7,14,21,28,35,42,49,56,57,50,43,36,29,22,15,23,30,37,44,51,58,59,52,45,38,31,39,46,53,60,61,54,47,55,62,63]),Z=4017,_=799,$=3406,z=2276,Q=1567,W=3784,V=5793,K=2896;function te(c,s){let g=0;const v=[];let q=16;for(;q>0&&!c[q-1];)--q;v.push({children:[],index:0});let d=v[0],e;for(let u=0;u<q;u++){for(let a=0;a<c[u];a++){if(d=v.pop(),!d)throw new Error("buildHuffmanTable: codeLength mismatch");for(d.children[d.index]=s[g];d.index>0;)if(d=v.pop(),!d)throw new Error("buildHuffmanTable: codeLength mismatch");for(d.index++,v.push(d);v.length<=u;)v.push(e={children:[],index:0}),d.children[d.index]=e.children,d=e;g++}u+1<q&&(v.push(e={children:[],index:0}),d.children[d.index]=e.children,d=e)}return v[0].children}function ce(c,s,g,v,q,d,e,u,a){const{mcusPerLine:r,progressive:l}=g;if(v.length>1&&(r===void 0||g.mcusPerColumn===void 0))throw new Error("Missing MCU dimensions");if(v.length===1&&(v[0].blocksPerLine===void 0||v[0].blocksPerColumn===void 0))throw new Error("Missing block dimensions");const x=s;let i=s,w=0,p=0;function h(){if(p>0)return p--,w>>p&1;if(w=c[i++],w===255){const f=c[i++];if(f)throw new Error(`unexpected marker: ${(w<<8|f).toString(16)}`)}return p=7,w>>>7}function E(f){if(!f)throw new Error("Huffman table not found");let b=f,m;for(;(m=h())!==null;){const y=b[m];if(typeof y=="number")return y;if(typeof y!="object")throw new Error("invalid huffman sequence");b=y}return null}function A(f){let b=f,m=0;for(;b>0;){const y=h();if(y===null)return;m=m<<1|y,--b}return m}function C(f){const b=A(f);if(b!==void 0)return b>=1<<f-1?b:b+(-1<<f)+1}function L(f,b){const m=E(f.huffmanTableDC);if(m===null)throw new Error("Huffman error");const y=m===0?0:C(m);if(y===void 0)throw new Error("Unexpected end of stream");f.pred===void 0&&(f.pred=0),f.pred+=y,b[0]=f.pred;let P=1;for(;P<64;){const U=E(f.huffmanTableAC);if(U===null)throw new Error("Unexpected end of data in AC coefficient decoding");const D=U&15,T=U>>4;if(D===0){if(T<15)break;P+=16}else{P+=T;const I=O[P],j=C(D);if(j===void 0)throw new Error("Unexpected end of stream");b[I]=j,P++}}}function o(f,b){const m=E(f.huffmanTableDC);if(m===null)throw new Error("Huffman error");const y=C(m);if(y===void 0)throw new Error("Unexpected end of data in DC coefficient decoding");const P=m===0?0:y<<a;f.pred===void 0&&(f.pred=0),f.pred+=P,b[0]=f.pred}function t(f,b){const m=h();if(m===null)throw new Error("Unexpected end of data in DC coefficient decoding");b[0]|=m<<a}let k=0;function n(f,b){if(k>0){k--;return}let m=d;const y=e;for(;m<=y;){const P=E(f.huffmanTableAC);if(P===null)throw new Error("Unexpected end of data in AC coefficient decoding");const U=P&15,D=P>>4;if(U===0){if(D<15){const T=A(D);if(T===void 0)throw new Error("Unexpected end of data in AC coefficient decoding");k=T+(1<<D)-1;break}m+=16}else{m+=D;const T=O[m],I=C(U);if(I===void 0)throw new Error("Unexpected end of data in AC coefficient decoding");b[T]=I*(1<<a),m++}}}let M=0,ee;function oe(f,b){let m=d;const y=e;let P=0;for(;m<=y;){const U=O[m],D=b[U]<0?-1:1;switch(M){case 0:{const T=E(f.huffmanTableAC);if(T===null)throw new Error("Unexpected end of data in AC coefficient decoding");const I=T&15;if(P=T>>4,I===0)if(P<15){const j=A(P);if(j===void 0)throw new Error("Unexpected end of data in AC coefficient decoding");k=j+(1<<P),M=4}else P=16,M=1;else{if(I!==1)throw new Error("invalid ACn encoding");const j=C(I);if(j===void 0)throw new Error("Unexpected end of data in AC coefficient decoding");ee=j,M=P?2:3}continue}case 1:case 2:if(b[U]){const T=h();if(T===null)throw new Error("Unexpected end of data in AC coefficient decoding");b[U]+=(T<<a)*D}else P--,P===0&&(M=M===2?3:0);break;case 3:if(b[U]){const T=h();if(T===null)throw new Error("Unexpected end of data in AC coefficient decoding");b[U]+=(T<<a)*D}else b[U]=ee<<a,M=0;break;case 4:if(b[U]){const T=h();if(T===null)throw new Error("Unexpected end of data in AC coefficient decoding");b[U]+=(T<<a)*D}break;default:break}m++}M===4&&(k--,k===0&&(M=0))}function re(f,b,m,y,P){const U=m/r|0,D=m%r,T=U*f.v+y,I=D*f.h+P;if(!f.blocks)throw new Error("Missing blocks");b(f,f.blocks[T][I])}function se(f,b,m){const y=m/f.blocksPerLine|0,P=m%f.blocksPerLine;if(!f.blocks)throw new Error("Missing blocks");b(f,f.blocks[y][P])}const G=v.length;let B,S,N,X,H,F;l?d===0?F=u===0?o:t:F=u===0?n:oe:F=L;let R=0,Y,J;G===1?J=v[0].blocksPerLine*v[0].blocksPerColumn:J=r*g.mcusPerColumn;const ne=q||J;for(;R<J;){for(S=0;S<G;S++)v[S].pred=0;if(k=0,G===1)for(B=v[0],H=0;H<ne;H++)se(B,F,R),R++;else for(H=0;H<ne;H++){for(S=0;S<G;S++){B=v[S];const{h:f,v:b}=B;for(N=0;N<b;N++)for(X=0;X<f;X++)re(B,F,R,N,X)}if(R++,R===J)break}if(p=0,Y=c[i]<<8|c[i+1],Y<65280)throw new Error("marker was not found");if(Y>=65488&&Y<=65495)i+=2;else break}return i-x}function le(c){const s=[],{blocksPerLine:g,blocksPerColumn:v}=c;if(!g||!v||!c.blocks)throw new Error("Missing component data");const q=g<<3,d=new Int32Array(64),e=new Uint8Array(64);function u(a,r,l){const x=c.quantizationTable;if(!x)throw new Error("No quantization table found");let i,w,p,h,E,A,C,L,o;const t=l;let k;for(k=0;k<64;k++)t[k]=a[k]*x[k];for(k=0;k<8;++k){const n=8*k;if(t[1+n]===0&&t[2+n]===0&&t[3+n]===0&&t[4+n]===0&&t[5+n]===0&&t[6+n]===0&&t[7+n]===0){o=V*t[0+n]+512>>10,t[0+n]=o,t[1+n]=o,t[2+n]=o,t[3+n]=o,t[4+n]=o,t[5+n]=o,t[6+n]=o,t[7+n]=o;continue}i=V*t[0+n]+128>>8,w=V*t[4+n]+128>>8,p=t[2+n],h=t[6+n],E=K*(t[1+n]-t[7+n])+128>>8,L=K*(t[1+n]+t[7+n])+128>>8,A=t[3+n]<<4,C=t[5+n]<<4,o=i-w+1>>1,i=i+w+1>>1,w=o,o=p*W+h*Q+128>>8,p=p*Q-h*W+128>>8,h=o,o=E-C+1>>1,E=E+C+1>>1,C=o,o=L+A+1>>1,A=L-A+1>>1,L=o,o=i-h+1>>1,i=i+h+1>>1,h=o,o=w-p+1>>1,w=w+p+1>>1,p=o,o=E*z+L*$+2048>>12,E=E*$-L*z+2048>>12,L=o,o=A*_+C*Z+2048>>12,A=A*Z-C*_+2048>>12,C=o,t[0+n]=i+L,t[7+n]=i-L,t[1+n]=w+C,t[6+n]=w-C,t[2+n]=p+A,t[5+n]=p-A,t[3+n]=h+E,t[4+n]=h-E}for(k=0;k<8;++k){const n=k;if(t[8+n]===0&&t[16+n]===0&&t[24+n]===0&&t[32+n]===0&&t[40+n]===0&&t[48+n]===0&&t[56+n]===0){o=V*l[k+0]+8192>>14,t[0+n]=o,t[8+n]=o,t[16+n]=o,t[24+n]=o,t[32+n]=o,t[40+n]=o,t[48+n]=o,t[56+n]=o;continue}i=V*t[0+n]+2048>>12,w=V*t[32+n]+2048>>12,p=t[16+n],h=t[48+n],E=K*(t[8+n]-t[56+n])+2048>>12,L=K*(t[8+n]+t[56+n])+2048>>12,A=t[24+n],C=t[40+n],o=i-w+1>>1,i=i+w+1>>1,w=o,o=p*W+h*Q+2048>>12,p=p*Q-h*W+2048>>12,h=o,o=E-C+1>>1,E=E+C+1>>1,C=o,o=L+A+1>>1,A=L-A+1>>1,L=o,o=i-h+1>>1,i=i+h+1>>1,h=o,o=w-p+1>>1,w=w+p+1>>1,p=o,o=E*z+L*$+2048>>12,E=E*$-L*z+2048>>12,L=o,o=A*_+C*Z+2048>>12,A=A*Z-C*_+2048>>12,C=o,t[0+n]=i+L,t[56+n]=i-L,t[8+n]=w+C,t[48+n]=w-C,t[16+n]=p+A,t[40+n]=p-A,t[24+n]=h+E,t[32+n]=h-E}for(k=0;k<64;++k){const n=128+(t[k]+8>>4);n<0?r[k]=0:n>255?r[k]=255:r[k]=n}}for(let a=0;a<v;a++){const r=a<<3;for(let l=0;l<8;l++)s.push(new Uint8Array(q));for(let l=0;l<g;l++){u(c.blocks[a][l],e,d);let x=0;const i=l<<3;for(let w=0;w<8;w++){const p=s[r+w];for(let h=0;h<8;h++)p[i+h]=e[x++]}}}return s}var fe=class{constructor(){this.jfif=null,this.adobe=null,this.resetInterval=0,this.quantizationTables=[],this.huffmanTablesAC=[],this.huffmanTablesDC=[],this.frames=[]}resetFrames(){this.frames=[]}parse(c){let s=0;function g(){const e=c[s]<<8|c[s+1];return s+=2,e}function v(){const e=g(),u=c.subarray(s,s+e-2);return s+=u.length,u}function q(e){let u=0,a=0,r,l;for(l in e.components)e.components.hasOwnProperty(l)&&(r=e.components[l],u<r.h&&(u=r.h),a<r.v&&(a=r.v));const x=Math.ceil(e.samplesPerLine/8/u),i=Math.ceil(e.scanLines/8/a);for(l in e.components)if(e.components.hasOwnProperty(l)){r=e.components[l];const w=Math.ceil(Math.ceil(e.samplesPerLine/8)*r.h/u),p=Math.ceil(Math.ceil(e.scanLines/8)*r.v/a),h=x*r.h,E=i*r.v,A=[];for(let C=0;C<E;C++){const L=[];for(let o=0;o<h;o++)L.push(new Int32Array(64));A.push(L)}r.blocksPerLine=w,r.blocksPerColumn=p,r.blocks=A}e.maxH=u,e.maxV=a,e.mcusPerLine=x,e.mcusPerColumn=i}let d=g();if(d!==65496)throw new Error("SOI not found");for(d=g();d!==65497;){switch(d){case 65280:break;case 65504:case 65505:case 65506:case 65507:case 65508:case 65509:case 65510:case 65511:case 65512:case 65513:case 65514:case 65515:case 65516:case 65517:case 65518:case 65519:case 65534:{const e=v();d===65504&&e[0]===74&&e[1]===70&&e[2]===73&&e[3]===70&&e[4]===0&&(this.jfif={version:{major:e[5],minor:e[6]},densityUnits:e[7],xDensity:e[8]<<8|e[9],yDensity:e[10]<<8|e[11],thumbWidth:e[12],thumbHeight:e[13],thumbData:e.subarray(14,14+3*e[12]*e[13])}),d===65518&&e[0]===65&&e[1]===100&&e[2]===111&&e[3]===98&&e[4]===101&&e[5]===0&&(this.adobe={version:e[6],flags0:e[7]<<8|e[8],flags1:e[9]<<8|e[10],transformCode:e[11]});break}case 65499:{const e=g()+s-2;for(;s<e;){const u=c[s++],a=new Int32Array(64);if(u>>4===0)for(let r=0;r<64;r++){const l=O[r];a[l]=c[s++]}else if(u>>4===1)for(let r=0;r<64;r++){const l=O[r];a[l]=g()}else throw new Error("DQT: invalid table spec");this.quantizationTables[u&15]=a}break}case 65472:case 65473:case 65474:{g();const e={extended:d===65473,progressive:d===65474,precision:c[s++],scanLines:g(),samplesPerLine:g(),components:{},componentsOrder:[],maxH:0,maxV:0,mcusPerLine:0,mcusPerColumn:0},u=c[s++];let a;for(let r=0;r<u;r++){a=c[s];const l=c[s+1]>>4,x=c[s+1]&15,i=c[s+2];e.componentsOrder.push(a),e.components[a]={h:l,v:x,quantizationIdx:i,blocksPerLine:0,blocksPerColumn:0,blocks:[]},s+=3}q(e),this.frames.push(e);break}case 65476:{const e=g();for(let u=2;u<e;){const a=c[s++],r=new Uint8Array(16);let l=0;for(let i=0;i<16;i++,s++)r[i]=c[s],l+=r[i];const x=new Uint8Array(l);for(let i=0;i<l;i++,s++)x[i]=c[s];u+=17+l,a>>4===0?this.huffmanTablesDC[a&15]=te(r,x):this.huffmanTablesAC[a&15]=te(r,x)}break}case 65501:g(),this.resetInterval=g();break;case 65498:{g();const e=c[s++],u=[],a=this.frames[0];for(let w=0;w<e;w++){const p=a.components[c[s++]],h=c[s++];p.huffmanTableDC=this.huffmanTablesDC[h>>4],p.huffmanTableAC=this.huffmanTablesAC[h&15],u.push(p)}const r=c[s++],l=c[s++],x=c[s++],i=ce(c,s,a,u,this.resetInterval,r,l,x>>4,x&15);s+=i;break}case 65535:c[s]!==255&&s--;break;default:if(c[s-3]===255&&c[s-2]>=192&&c[s-2]<=254){s-=3;break}throw new Error(`unknown JPEG marker ${d.toString(16)}`)}d=g()}}getResult(){const{frames:c}=this;if(this.frames.length===0)throw new Error("no frames were decoded");this.frames.length>1&&console.warn("more than one frame is not supported");for(let r=0;r<this.frames.length;r++){const l=this.frames[r].components;for(const x of Object.keys(l)){const i=l[x].quantizationIdx;typeof i=="number"&&(l[x].quantizationTable=this.quantizationTables[i],delete l[x].quantizationIdx)}}const s=c[0];if(!s.maxH||!s.maxV)throw new Error("Invalid frame dimensions");const{components:g,componentsOrder:v}=s,q=[],d=s.samplesPerLine,e=s.scanLines;for(let r=0;r<v.length;r++){const l=g[v[r]];q.push({lines:le(l),scaleX:l.h/s.maxH,scaleY:l.v/s.maxV})}const u=new Uint8Array(d*e*q.length);let a=0;for(let r=0;r<e;++r)for(let l=0;l<d;++l)for(let x=0;x<q.length;++x){const i=q[x];u[a]=i.lines[0|r*i.scaleY][0|l*i.scaleX],++a}return u}},ae=class extends ie.BaseDecoder{constructor(c){super(c),this.reader=new fe,c.JPEGTables&&this.reader.parse(c.JPEGTables)}decodeBlock(c){return this.reader.resetFrames(),this.reader.parse(new Uint8Array(c)),this.reader.getResult().buffer}};exports.default=ae;