@nasa-terra/components 0.0.203 → 0.0.205

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 (1457) hide show
  1. package/cdn/apis/harmony.api.d.ts +5 -0
  2. package/cdn/chunks/GeoTIFF.CENKOG7R.js +19979 -0
  3. package/cdn/chunks/chunk.2232XEJQ.js +29 -0
  4. package/cdn/chunks/chunk.2B2TSVNY.js +978 -0
  5. package/cdn/chunks/chunk.2NNYMNZ5.js +29 -0
  6. package/cdn/chunks/chunk.2NX4H2BN.js +19 -0
  7. package/cdn/chunks/chunk.2WBW37NH.js +19 -0
  8. package/cdn/chunks/chunk.2X7DAD43.js +29 -0
  9. package/cdn/chunks/chunk.2XT2DXDS.js +528 -0
  10. package/cdn/chunks/chunk.34A6RU6E.js +29 -0
  11. package/cdn/chunks/chunk.3A3Y63MA.js +19 -0
  12. package/cdn/chunks/chunk.3JB5ESJU.js +8969 -0
  13. package/cdn/chunks/chunk.3TH37PLU.js +1121 -0
  14. package/cdn/chunks/chunk.3XHPRPKJ.js +1009 -0
  15. package/cdn/chunks/chunk.4FAAL7CU.js +897 -0
  16. package/cdn/chunks/chunk.4JTU674G.js +48 -0
  17. package/cdn/chunks/chunk.4KBZ7BIR.js +29 -0
  18. package/cdn/chunks/chunk.4PDH3KAH.js +1945 -0
  19. package/cdn/chunks/chunk.4RS5WH4G.js +19 -0
  20. package/cdn/chunks/chunk.4W7HENDQ.js +19 -0
  21. package/cdn/chunks/chunk.5256OMFI.js +62 -0
  22. package/cdn/chunks/chunk.577EXZQP.js +19 -0
  23. package/cdn/chunks/chunk.5DIIZV4K.js +791 -0
  24. package/cdn/chunks/chunk.5DIVPJOJ.js +1653 -0
  25. package/cdn/chunks/chunk.5F22YVKZ.js +19 -0
  26. package/cdn/chunks/chunk.5GC6XXMO.js +19 -0
  27. package/cdn/chunks/chunk.5GD3GQER.js +33 -0
  28. package/cdn/chunks/chunk.5JGHWKZV.js +38 -0
  29. package/cdn/chunks/chunk.5MCRMJ7W.js +110 -0
  30. package/cdn/chunks/chunk.5MFAIDYF.js +19 -0
  31. package/cdn/chunks/chunk.5QQP4HY5.js +29 -0
  32. package/cdn/chunks/chunk.5SGSESUV.js +39 -0
  33. package/cdn/chunks/chunk.5T32ADMR.js +32 -0
  34. package/cdn/chunks/chunk.5TUINKG3.js +19 -0
  35. package/cdn/chunks/chunk.5Z5FTYHQ.js +29 -0
  36. package/cdn/chunks/chunk.64ZLB3XD.js +37 -0
  37. package/cdn/chunks/chunk.67MZVSO7.js +234 -0
  38. package/cdn/chunks/chunk.6KW23GBD.js +3035 -0
  39. package/cdn/chunks/chunk.6NU4LT46.js +189 -0
  40. package/cdn/chunks/chunk.6ONOP4ID.js +29 -0
  41. package/cdn/chunks/chunk.6RBN3R3S.js +19 -0
  42. package/cdn/chunks/chunk.6RVC4QTE.js +19 -0
  43. package/cdn/chunks/chunk.6VGVAUYK.js +256 -0
  44. package/cdn/chunks/chunk.6XBVIYCV.js +32 -0
  45. package/cdn/chunks/chunk.76VAMCFM.js +824 -0
  46. package/cdn/chunks/chunk.7FTE5V2B.js +19 -0
  47. package/cdn/chunks/chunk.7OFUJKBW.js +30 -0
  48. package/cdn/chunks/chunk.7RUFZ7VF.js +475 -0
  49. package/cdn/chunks/chunk.A4KWAYQH.js +4980 -0
  50. package/cdn/chunks/chunk.A63JCTKT.js +19 -0
  51. package/cdn/chunks/chunk.AQ5OKPLZ.js +19 -0
  52. package/cdn/chunks/chunk.AQ5T22QG.js +41 -0
  53. package/cdn/chunks/chunk.ASGNUKTS.js +1131 -0
  54. package/cdn/chunks/chunk.AUWT3HKD.js +940 -0
  55. package/cdn/chunks/chunk.BD5JLOM4.js +357 -0
  56. package/cdn/chunks/chunk.BL2T5FVE.js +10 -0
  57. package/cdn/chunks/chunk.BNIVIVSF.js +2544 -0
  58. package/cdn/chunks/chunk.BPTXUG3W.js +35 -0
  59. package/cdn/chunks/chunk.BQPBQZFS.js +360 -0
  60. package/cdn/chunks/chunk.BYBKLA6W.js +255 -0
  61. package/cdn/chunks/chunk.CHNYNA6A.js +19 -0
  62. package/cdn/chunks/chunk.CISSBK6B.js +1820 -0
  63. package/cdn/chunks/chunk.CN3HAOBC.js +83 -0
  64. package/cdn/chunks/chunk.CO3P3PQN.js +19 -0
  65. package/cdn/chunks/chunk.CSF2PMFW.js +1075 -0
  66. package/cdn/chunks/chunk.CT6JWWV2.js +93 -0
  67. package/cdn/chunks/chunk.CY2NA7DX.js +1040 -0
  68. package/cdn/chunks/chunk.D2OCF56Z.js +74 -0
  69. package/cdn/chunks/chunk.D3WDJ4SS.js +149 -0
  70. package/cdn/chunks/chunk.D52LQ4J3.js +19 -0
  71. package/cdn/chunks/chunk.D5OYZFRL.js +134 -0
  72. package/cdn/chunks/chunk.D6W64PXN.js +19 -0
  73. package/cdn/chunks/chunk.D7YRDTVS.js +134 -0
  74. package/cdn/chunks/chunk.DLBLZUXI.js +19 -0
  75. package/cdn/chunks/chunk.DMAOIRXE.js +19 -0
  76. package/cdn/chunks/chunk.E2RZP3XA.js +19 -0
  77. package/cdn/chunks/chunk.E6423VVS.js +47 -0
  78. package/cdn/chunks/chunk.EAUBUUN5.js +32 -0
  79. package/cdn/chunks/chunk.EBGQWXBG.js +19 -0
  80. package/cdn/chunks/chunk.EDPOC2S3.js +29 -0
  81. package/cdn/chunks/chunk.EH63H56Z.js +333 -0
  82. package/cdn/chunks/chunk.EIAV6I5D.js +600 -0
  83. package/cdn/chunks/chunk.EOTDTPZM.js +259 -0
  84. package/cdn/chunks/chunk.EP6PSBZE.js +100 -0
  85. package/cdn/chunks/chunk.EVAUERXR.js +431 -0
  86. package/cdn/chunks/chunk.F2DLSNNG.js +625 -0
  87. package/cdn/chunks/chunk.F6FVKFVH.js +60 -0
  88. package/cdn/chunks/chunk.FEIRWXAI.js +34 -0
  89. package/cdn/chunks/chunk.FK5JYFNX.js +29 -0
  90. package/cdn/chunks/chunk.FP2ISOJN.js +106 -0
  91. package/cdn/chunks/chunk.FRGR3SUX.js +19 -0
  92. package/cdn/chunks/chunk.G2FP3NMR.js +32 -0
  93. package/cdn/chunks/chunk.G4RHOTZM.js +19 -0
  94. package/cdn/chunks/chunk.G56LMKFK.js +190 -0
  95. package/cdn/chunks/chunk.GAYO2WF7.js +810 -0
  96. package/cdn/chunks/chunk.GGKAPJYB.js +4089 -0
  97. package/cdn/chunks/chunk.GGRHSJRY.js +278 -0
  98. package/cdn/chunks/chunk.GMXOAOYE.js +897 -0
  99. package/cdn/chunks/chunk.GPTTHV22.js +19 -0
  100. package/cdn/chunks/chunk.GSM3UO7L.js +125 -0
  101. package/cdn/chunks/chunk.GUDMVVPM.js +29 -0
  102. package/cdn/chunks/chunk.GWGONIHM.js +621 -0
  103. package/cdn/chunks/chunk.GXLMJLQN.js +19 -0
  104. package/cdn/chunks/chunk.H3M3UFJW.js +225 -0
  105. package/cdn/chunks/chunk.H4CIEYCI.js +274 -0
  106. package/cdn/chunks/chunk.HAMWPWKH.js +536 -0
  107. package/cdn/chunks/chunk.HJX5NP2U.js +49 -0
  108. package/cdn/chunks/chunk.HUS54CD5.js +152 -0
  109. package/cdn/chunks/chunk.HV7OZEJM.js +37 -0
  110. package/cdn/chunks/chunk.HVZFV4RK.js +271 -0
  111. package/cdn/chunks/chunk.I2EO4UEA.js +128 -0
  112. package/cdn/chunks/chunk.I2S4BY2H.js +19 -0
  113. package/cdn/chunks/chunk.IBOPN3BA.js +74 -0
  114. package/cdn/chunks/chunk.IIVOE5EV.js +34 -0
  115. package/cdn/chunks/chunk.ILWTJYAG.js +19 -0
  116. package/cdn/chunks/chunk.IMCWFOML.js +132 -0
  117. package/cdn/chunks/chunk.IPQAZBW5.js +33 -0
  118. package/cdn/chunks/chunk.IWKAVEX2.js +521 -0
  119. package/cdn/chunks/chunk.IXCWTH7X.js +19 -0
  120. package/cdn/chunks/chunk.J2O5J6LC.js +33 -0
  121. package/cdn/chunks/chunk.J665CST2.js +32 -0
  122. package/cdn/chunks/chunk.J7VOBHYB.js +29 -0
  123. package/cdn/chunks/chunk.JRHREVZG.js +195 -0
  124. package/cdn/chunks/chunk.JRT7GG7P.js +193 -0
  125. package/cdn/chunks/chunk.JZBAAUKG.js +37 -0
  126. package/cdn/chunks/chunk.K6JQEUEF.js +855 -0
  127. package/cdn/chunks/chunk.KBU6MR53.js +19 -0
  128. package/cdn/chunks/chunk.KH6TDNWG.js +32 -0
  129. package/cdn/chunks/chunk.KKACL6TT.js +19 -0
  130. package/cdn/chunks/chunk.KORCC6ZC.js +136 -0
  131. package/cdn/chunks/chunk.KOZYPVDG.js +29 -0
  132. package/cdn/chunks/chunk.KRVDOVGU.js +27 -0
  133. package/cdn/chunks/chunk.KVNYSD7J.js +35 -0
  134. package/cdn/chunks/chunk.KVY6HP36.js +504 -0
  135. package/cdn/chunks/chunk.KYTQLAV4.js +33 -0
  136. package/cdn/chunks/chunk.L2JTE4GG.js +29 -0
  137. package/cdn/chunks/chunk.L3IVPHBN.js +29 -0
  138. package/cdn/chunks/chunk.L3RRPSVD.js +310 -0
  139. package/cdn/chunks/chunk.LA6TV4TX.js +231 -0
  140. package/cdn/chunks/chunk.LFASDJBV.js +19 -0
  141. package/cdn/chunks/chunk.LFKTPFJU.js +19 -0
  142. package/cdn/chunks/chunk.LFL3PUXL.js +78 -0
  143. package/cdn/chunks/chunk.LI42WZVM.js +19 -0
  144. package/cdn/chunks/chunk.LNONJFUN.js +19 -0
  145. package/cdn/chunks/chunk.LUKHK72N.js +1038 -0
  146. package/cdn/chunks/chunk.M3QGLBMX.js +256 -0
  147. package/cdn/chunks/chunk.M57M7AQ5.js +19 -0
  148. package/cdn/chunks/chunk.MC7GK7JH.js +36 -0
  149. package/cdn/chunks/chunk.MC7JQJRG.js +32 -0
  150. package/cdn/chunks/chunk.ML5BEAMW.js +276 -0
  151. package/cdn/chunks/chunk.MMF6FZHE.js +19 -0
  152. package/cdn/chunks/chunk.MO4YNF4J.js +29 -0
  153. package/cdn/chunks/chunk.MUSKX3GU.js +138 -0
  154. package/cdn/chunks/chunk.N7GDICRN.js +568 -0
  155. package/cdn/chunks/chunk.NDYEK3K4.js +19 -0
  156. package/cdn/chunks/chunk.NHZJYK2Q.js +111 -0
  157. package/cdn/chunks/chunk.NRLNKN7I.js +17 -0
  158. package/cdn/chunks/chunk.NSKILA2A.js +29 -0
  159. package/cdn/chunks/chunk.NWO2MF5T.js +375 -0
  160. package/cdn/chunks/chunk.NX7VOYQH.js +610 -0
  161. package/cdn/chunks/chunk.NZA757GX.js +60 -0
  162. package/cdn/chunks/chunk.O2NOKPSY.js +169 -0
  163. package/cdn/chunks/chunk.OIOVBL5M.js +32 -0
  164. package/cdn/chunks/chunk.OSNWOWQ2.js +2337 -0
  165. package/cdn/chunks/chunk.OSRGCUJJ.js +891 -0
  166. package/cdn/chunks/chunk.OVC7EVR4.js +32 -0
  167. package/cdn/chunks/chunk.PEGHDN3D.js +32 -0
  168. package/cdn/chunks/chunk.PKU5OUHL.js +19 -0
  169. package/cdn/chunks/chunk.PVAQWFRB.js +224 -0
  170. package/cdn/chunks/chunk.PVNZZZCV.js +1307 -0
  171. package/cdn/chunks/chunk.QBDCDA3E.js +754 -0
  172. package/cdn/chunks/chunk.QDRW3JBM.js +113 -0
  173. package/cdn/chunks/chunk.QFRFT4W5.js +19 -0
  174. package/cdn/chunks/chunk.QJPYGHSA.js +29 -0
  175. package/cdn/chunks/chunk.QN4G5N5L.js +591 -0
  176. package/cdn/chunks/chunk.QQYFIC2N.js +19 -0
  177. package/cdn/chunks/chunk.QR6SCWOR.js +19 -0
  178. package/cdn/chunks/chunk.QRGGKLJQ.js +29 -0
  179. package/cdn/chunks/chunk.QSX2ASPV.js +36 -0
  180. package/cdn/chunks/chunk.QV7MGHUO.js +32 -0
  181. package/cdn/chunks/chunk.QYLVSRAZ.js +442 -0
  182. package/cdn/chunks/chunk.R6TDRJ2T.js +28 -0
  183. package/cdn/chunks/chunk.RRQO6C7V.js +208 -0
  184. package/cdn/chunks/chunk.RRT5M4B3.js +104 -0
  185. package/cdn/chunks/chunk.RZNXY5DA.js +85 -0
  186. package/cdn/chunks/chunk.S2MHJ2BL.js +529 -0
  187. package/cdn/chunks/chunk.S2P2KBX3.js +19 -0
  188. package/cdn/chunks/chunk.S5UFNVHZ.js +1768 -0
  189. package/cdn/chunks/chunk.SAMOMNBR.js +32 -0
  190. package/cdn/chunks/chunk.SPWHG3FQ.js +36 -0
  191. package/cdn/chunks/chunk.SRIL2GZR.js +19 -0
  192. package/cdn/chunks/chunk.T32DCJPK.js +33 -0
  193. package/cdn/chunks/chunk.T3YLYNOF.js +2977 -0
  194. package/cdn/chunks/chunk.T7754SP4.js +33 -0
  195. package/cdn/chunks/chunk.T7KRTL2U.js +19 -0
  196. package/cdn/chunks/chunk.TAY4BUTR.js +92 -0
  197. package/cdn/chunks/chunk.TBU3QGJR.js +29 -0
  198. package/cdn/chunks/chunk.TEEU5HFN.js +284 -0
  199. package/cdn/chunks/chunk.TFRA4ITH.js +32 -0
  200. package/cdn/chunks/chunk.TFRHDABM.js +19 -0
  201. package/cdn/chunks/chunk.THX4K42R.js +19 -0
  202. package/cdn/chunks/chunk.TKLGXW34.js +19 -0
  203. package/cdn/chunks/chunk.TMAJCFSJ.js +19 -0
  204. package/cdn/chunks/chunk.TMPSEY4M.js +876 -0
  205. package/cdn/chunks/chunk.TULXWHMT.js +19 -0
  206. package/cdn/chunks/chunk.U42UGPIF.js +34 -0
  207. package/cdn/chunks/chunk.U7RFQUL4.js +117 -0
  208. package/cdn/chunks/chunk.UHSY6WVZ.js +19 -0
  209. package/cdn/chunks/chunk.UI7YLIQD.js +19 -0
  210. package/cdn/chunks/chunk.UK5FWG26.js +621 -0
  211. package/cdn/chunks/chunk.UMPFH3IG.js +32 -0
  212. package/cdn/chunks/chunk.UW4VQ2ZT.js +29 -0
  213. package/cdn/chunks/chunk.UWQGPSGJ.js +123 -0
  214. package/cdn/chunks/chunk.UYISI6DV.js +161 -0
  215. package/cdn/chunks/chunk.VBP6ZZXJ.js +104 -0
  216. package/cdn/chunks/chunk.VNSMUAG2.js +19 -0
  217. package/cdn/chunks/chunk.VQFDZZR5.js +64743 -0
  218. package/cdn/chunks/chunk.VTJ45MEV.js +68 -0
  219. package/cdn/chunks/chunk.VXTFCFJP.js +29 -0
  220. package/cdn/chunks/chunk.VYRHCJMA.js +19 -0
  221. package/cdn/chunks/chunk.W5BKCYRV.js +19 -0
  222. package/cdn/chunks/chunk.W7NVJUQD.js +42 -0
  223. package/cdn/chunks/chunk.WAIMZWDO.js +32 -0
  224. package/cdn/chunks/chunk.WCOQW5IP.js +29 -0
  225. package/cdn/chunks/chunk.WENZIKZU.js +37 -0
  226. package/cdn/chunks/chunk.WLIBRD3E.js +36 -0
  227. package/cdn/chunks/chunk.WMGJ3MAP.js +415 -0
  228. package/cdn/chunks/chunk.WT45RB6M.js +86 -0
  229. package/cdn/chunks/chunk.WVIQ74WP.js +29 -0
  230. package/cdn/chunks/chunk.WVKE7GDV.js +82 -0
  231. package/cdn/chunks/chunk.X6V5UTEC.js +19 -0
  232. package/cdn/chunks/chunk.XE7NSCVW.js +35 -0
  233. package/cdn/chunks/chunk.XEPXVSXX.js +19 -0
  234. package/cdn/chunks/chunk.XFTU6F75.js +19 -0
  235. package/cdn/chunks/chunk.XGGJLW76.js +19 -0
  236. package/cdn/chunks/chunk.XIPDYSFN.js +32 -0
  237. package/cdn/chunks/chunk.XIY5GTZR.js +19 -0
  238. package/cdn/chunks/chunk.XLUZ67JF.js +11763 -0
  239. package/cdn/chunks/chunk.Y7SR4L5C.js +19 -0
  240. package/cdn/chunks/chunk.YJ7H7EYL.js +71 -0
  241. package/cdn/chunks/chunk.YKDCWNZE.js +17319 -0
  242. package/cdn/chunks/chunk.YMH7U2K5.js +29 -0
  243. package/cdn/chunks/chunk.YU5KVALN.js +29 -0
  244. package/cdn/chunks/chunk.Z6ZRFFCE.js +35 -0
  245. package/cdn/chunks/chunk.ZG6QTQKO.js +162 -0
  246. package/cdn/chunks/chunk.ZL4AGGZE.js +35 -0
  247. package/cdn/chunks/chunk.ZL6COYU6.js +19 -0
  248. package/cdn/chunks/chunk.ZNSSJSKK.js +158 -0
  249. package/cdn/chunks/lerc.IIII5MJ5.js +2099 -0
  250. package/cdn/components/accordion/accordion.component.js +5 -5
  251. package/cdn/components/accordion/accordion.js +6 -6
  252. package/cdn/components/alert/alert.component.js +4 -4
  253. package/cdn/components/alert/alert.js +5 -5
  254. package/cdn/components/avatar/avatar.component.js +5 -5
  255. package/cdn/components/avatar/avatar.js +6 -6
  256. package/cdn/components/badge/badge.component.js +3 -3
  257. package/cdn/components/badge/badge.js +4 -4
  258. package/cdn/components/banner/banner.component.js +3 -3
  259. package/cdn/components/banner/banner.js +4 -4
  260. package/cdn/components/breadcrumb/breadcrumb.component.js +2 -2
  261. package/cdn/components/breadcrumb/breadcrumb.js +3 -3
  262. package/cdn/components/breadcrumbs/breadcrumbs.component.js +2 -2
  263. package/cdn/components/breadcrumbs/breadcrumbs.js +3 -3
  264. package/cdn/components/browse-variables/browse-variables.component.d.ts +1 -1
  265. package/cdn/components/browse-variables/browse-variables.component.js +21 -21
  266. package/cdn/components/browse-variables/browse-variables.controller.js +2 -2
  267. package/cdn/components/browse-variables/browse-variables.js +22 -22
  268. package/cdn/components/button/button.component.js +6 -6
  269. package/cdn/components/button/button.js +7 -7
  270. package/cdn/components/button-group/button-group.component.js +2 -2
  271. package/cdn/components/button-group/button-group.js +3 -3
  272. package/cdn/components/caption/caption.component.js +2 -2
  273. package/cdn/components/caption/caption.js +3 -3
  274. package/cdn/components/card/card.component.js +2 -2
  275. package/cdn/components/card/card.js +3 -3
  276. package/cdn/components/checkbox/checkbox.component.js +5 -5
  277. package/cdn/components/checkbox/checkbox.js +6 -6
  278. package/cdn/components/chip/chip.component.js +2 -2
  279. package/cdn/components/chip/chip.js +3 -3
  280. package/cdn/components/combobox/combobox.component.js +5 -5
  281. package/cdn/components/combobox/combobox.js +6 -6
  282. package/cdn/components/data-access/data-access.component.d.ts +11 -11
  283. package/cdn/components/data-access/data-access.component.js +69 -56
  284. package/cdn/components/data-access/data-access.js +70 -57
  285. package/cdn/components/data-grid/data-grid.component.js +3 -3
  286. package/cdn/components/data-grid/data-grid.js +4 -4
  287. package/cdn/components/data-rods/data-rods.component.d.ts +7 -11
  288. package/cdn/components/data-rods/data-rods.component.js +79 -67
  289. package/cdn/components/data-rods/data-rods.js +80 -68
  290. package/cdn/components/data-subsetter/data-subsetter.component.d.ts +8 -5
  291. package/cdn/components/data-subsetter/data-subsetter.component.js +83 -72
  292. package/cdn/components/data-subsetter/data-subsetter.js +84 -73
  293. package/cdn/components/data-subsetter/data-subsetter.styles.js +1 -1
  294. package/cdn/components/data-subsetter/notebooks/subsetter-notebook.js +1 -1
  295. package/cdn/components/data-subsetter-history/data-subsetter-history.component.d.ts +4 -7
  296. package/cdn/components/data-subsetter-history/data-subsetter-history.component.js +84 -73
  297. package/cdn/components/data-subsetter-history/data-subsetter-history.js +85 -74
  298. package/cdn/components/date-picker/date-picker.component.d.ts +3 -4
  299. package/cdn/components/date-picker/date-picker.component.js +14 -14
  300. package/cdn/components/date-picker/date-picker.js +15 -15
  301. package/cdn/components/date-range-slider/date-range-slider.component.js +3 -3
  302. package/cdn/components/date-range-slider/date-range-slider.js +4 -4
  303. package/cdn/components/dialog/dialog.component.js +8 -8
  304. package/cdn/components/dialog/dialog.js +9 -9
  305. package/cdn/components/divider/divider.component.js +2 -2
  306. package/cdn/components/divider/divider.js +3 -3
  307. package/cdn/components/dropdown/dropdown.component.js +4 -4
  308. package/cdn/components/dropdown/dropdown.js +5 -5
  309. package/cdn/components/earthdata-login/earthdata-login.component.d.ts +3 -1
  310. package/cdn/components/earthdata-login/earthdata-login.component.js +16 -17
  311. package/cdn/components/earthdata-login/earthdata-login.js +17 -18
  312. package/cdn/components/file-upload/file-upload.component.js +2 -2
  313. package/cdn/components/file-upload/file-upload.js +3 -3
  314. package/cdn/components/harmony-history/harmony-history.component.d.ts +3 -6
  315. package/cdn/components/harmony-history/harmony-history.component.js +12 -13
  316. package/cdn/components/harmony-history/harmony-history.js +13 -14
  317. package/cdn/components/icon/icon.component.js +3 -3
  318. package/cdn/components/icon/icon.js +4 -4
  319. package/cdn/components/input/input.component.js +5 -5
  320. package/cdn/components/input/input.js +6 -6
  321. package/cdn/components/loader/loader.component.js +2 -2
  322. package/cdn/components/loader/loader.js +3 -3
  323. package/cdn/components/login/login.component.d.ts +3 -1
  324. package/cdn/components/login/login.component.js +12 -13
  325. package/cdn/components/login/login.js +13 -14
  326. package/cdn/components/map/controls/draw-toolbar.control.d.ts +5 -2
  327. package/cdn/components/map/controls/draw-toolbar.control.js +18 -8
  328. package/cdn/components/map/controls/layer-picker.control.d.ts +16 -0
  329. package/cdn/components/map/controls/layer-picker.control.js +13 -0
  330. package/cdn/components/map/layers/base.layer.d.ts +10 -0
  331. package/cdn/components/map/layers/base.layer.js +25 -14
  332. package/cdn/components/map/layers/borders.layer.js +21 -13
  333. package/cdn/components/map/layers/boundary.d.ts +30 -0
  334. package/cdn/components/map/layers/boundary.js +20 -0
  335. package/cdn/components/map/layers/common.d.ts +2 -0
  336. package/cdn/components/map/layers/geotiff.layer.js +12 -7
  337. package/cdn/components/map/layers/gibs-vector.layer.js +26 -18
  338. package/cdn/components/map/layers/gibs.layer.d.ts +6 -0
  339. package/cdn/components/map/layers/gibs.layer.js +26 -18
  340. package/cdn/components/map/layers/labels.layer.js +21 -13
  341. package/cdn/components/map/layers/layer.js +28 -20
  342. package/cdn/components/map/layers/xyz.layer.js +17 -12
  343. package/cdn/components/map/map.component.d.ts +73 -21
  344. package/cdn/components/map/map.component.js +43 -29
  345. package/cdn/components/map/map.js +44 -30
  346. package/cdn/components/map/map.service.d.ts +92 -9
  347. package/cdn/components/map/map.service.js +33 -19
  348. package/cdn/components/map/map.styles.js +1 -1
  349. package/cdn/components/map/projections.js +4 -3
  350. package/cdn/components/map/type.d.ts +7 -0
  351. package/cdn/components/menu/menu.component.js +2 -2
  352. package/cdn/components/menu/menu.js +3 -3
  353. package/cdn/components/menu-item/menu-item.component.js +7 -7
  354. package/cdn/components/menu-item/menu-item.js +8 -8
  355. package/cdn/components/option/option.component.js +4 -4
  356. package/cdn/components/option/option.js +5 -5
  357. package/cdn/components/pagination/pagination.component.js +4 -4
  358. package/cdn/components/pagination/pagination.js +5 -5
  359. package/cdn/components/plot/plot.component.js +2 -2
  360. package/cdn/components/plot/plot.js +3 -3
  361. package/cdn/components/plot-toolbar/notebooks/time-averaged-map-notebook.js +1 -1
  362. package/cdn/components/plot-toolbar/notebooks/time-series-notebook.js +1 -1
  363. package/cdn/components/plot-toolbar/plot-toolbar.component.d.ts +4 -4
  364. package/cdn/components/plot-toolbar/plot-toolbar.component.js +54 -42
  365. package/cdn/components/plot-toolbar/plot-toolbar.js +55 -43
  366. package/cdn/components/popup/popup.component.js +2 -2
  367. package/cdn/components/popup/popup.js +3 -3
  368. package/cdn/components/progress-bar/progress-bar.component.js +2 -2
  369. package/cdn/components/progress-bar/progress-bar.js +3 -3
  370. package/cdn/components/radio/radio.component.js +3 -3
  371. package/cdn/components/radio/radio.js +4 -4
  372. package/cdn/components/radio-group/radio-group.component.js +3 -3
  373. package/cdn/components/radio-group/radio-group.js +4 -4
  374. package/cdn/components/scroll-hint/scroll-hint.component.js +4 -4
  375. package/cdn/components/scroll-hint/scroll-hint.js +5 -5
  376. package/cdn/components/select/select.component.js +8 -8
  377. package/cdn/components/select/select.js +9 -9
  378. package/cdn/components/site-header/site-header.component.js +5 -5
  379. package/cdn/components/site-header/site-header.js +5 -5
  380. package/cdn/components/site-navigation/site-navigation.component.js +2 -2
  381. package/cdn/components/site-navigation/site-navigation.js +2 -2
  382. package/cdn/components/skeleton/skeleton.component.js +2 -2
  383. package/cdn/components/skeleton/skeleton.js +3 -3
  384. package/cdn/components/slider/slider.component.js +2 -2
  385. package/cdn/components/slider/slider.js +3 -3
  386. package/cdn/components/spatial-picker/spatial-picker.component.d.ts +0 -10
  387. package/cdn/components/spatial-picker/spatial-picker.component.js +53 -39
  388. package/cdn/components/spatial-picker/spatial-picker.js +54 -40
  389. package/cdn/components/status-indicator/status-indicator.component.js +2 -2
  390. package/cdn/components/status-indicator/status-indicator.js +3 -3
  391. package/cdn/components/stepper/stepper.component.js +2 -2
  392. package/cdn/components/stepper/stepper.js +3 -3
  393. package/cdn/components/stepper-step/stepper-step.component.js +4 -4
  394. package/cdn/components/stepper-step/stepper-step.js +5 -5
  395. package/cdn/components/tab/tab.component.js +4 -4
  396. package/cdn/components/tab/tab.js +5 -5
  397. package/cdn/components/tab-panel/tab-panel.component.js +3 -3
  398. package/cdn/components/tab-panel/tab-panel.js +4 -4
  399. package/cdn/components/tabs/tabs.component.d.ts +2 -1
  400. package/cdn/components/tabs/tabs.component.js +4 -4
  401. package/cdn/components/tabs/tabs.js +5 -5
  402. package/cdn/components/tag/tag.component.js +4 -4
  403. package/cdn/components/tag/tag.js +5 -5
  404. package/cdn/components/textarea/textarea.component.js +4 -4
  405. package/cdn/components/textarea/textarea.js +5 -5
  406. package/cdn/components/time-average-map/time-average-map.component.d.ts +10 -14
  407. package/cdn/components/time-average-map/time-average-map.component.js +66 -54
  408. package/cdn/components/time-average-map/time-average-map.controller.js +7 -7
  409. package/cdn/components/time-average-map/time-average-map.js +67 -55
  410. package/cdn/components/time-series/time-series.component.d.ts +2 -10
  411. package/cdn/components/time-series/time-series.component.js +66 -54
  412. package/cdn/components/time-series/time-series.controller.js +7 -7
  413. package/cdn/components/time-series/time-series.js +67 -55
  414. package/cdn/components/toast/toast.component.js +5 -5
  415. package/cdn/components/toast/toast.js +6 -6
  416. package/cdn/components/toggle/toggle.component.js +4 -4
  417. package/cdn/components/toggle/toggle.js +5 -5
  418. package/cdn/components/tooltip/tooltip.component.js +4 -4
  419. package/cdn/components/tooltip/tooltip.js +5 -5
  420. package/cdn/components/variable-combobox/variable-combobox.component.d.ts +5 -9
  421. package/cdn/components/variable-combobox/variable-combobox.component.js +14 -12
  422. package/cdn/components/variable-combobox/variable-combobox.js +15 -13
  423. package/cdn/components/variable-keyword-search/variable-keyword-search.component.d.ts +2 -2
  424. package/cdn/components/variable-keyword-search/variable-keyword-search.component.js +10 -10
  425. package/cdn/components/variable-keyword-search/variable-keyword-search.js +11 -11
  426. package/cdn/custom-elements.json +10670 -8582
  427. package/cdn/events/events.d.ts +2 -2
  428. package/cdn/events/terra-map.d.ts +55 -0
  429. package/cdn/mixins/auth.mixin.d.ts +23 -0
  430. package/cdn/mixins/mixin.types.d.ts +1 -0
  431. package/cdn/mixins/query-client.mixin.d.ts +1 -1
  432. package/cdn/react/accordion/index.js +6 -6
  433. package/cdn/react/alert/index.js +5 -5
  434. package/cdn/react/avatar/index.js +6 -6
  435. package/cdn/react/badge/index.js +4 -4
  436. package/cdn/react/banner/index.js +4 -4
  437. package/cdn/react/breadcrumb/index.js +3 -3
  438. package/cdn/react/breadcrumbs/index.js +3 -3
  439. package/cdn/react/browse-variables/index.js +22 -22
  440. package/cdn/react/button/index.js +7 -7
  441. package/cdn/react/button-group/index.js +3 -3
  442. package/cdn/react/caption/index.js +3 -3
  443. package/cdn/react/card/index.js +3 -3
  444. package/cdn/react/checkbox/index.js +6 -6
  445. package/cdn/react/chip/index.js +3 -3
  446. package/cdn/react/combobox/index.js +6 -6
  447. package/cdn/react/data-access/index.js +70 -57
  448. package/cdn/react/data-grid/index.js +4 -4
  449. package/cdn/react/data-rods/index.d.ts +6 -1
  450. package/cdn/react/data-rods/index.js +80 -68
  451. package/cdn/react/data-subsetter/index.d.ts +3 -0
  452. package/cdn/react/data-subsetter/index.js +84 -73
  453. package/cdn/react/data-subsetter-history/index.d.ts +6 -1
  454. package/cdn/react/data-subsetter-history/index.js +85 -74
  455. package/cdn/react/date-picker/index.js +15 -15
  456. package/cdn/react/date-range-slider/index.js +4 -4
  457. package/cdn/react/dialog/index.js +9 -9
  458. package/cdn/react/divider/index.js +3 -3
  459. package/cdn/react/dropdown/index.js +5 -5
  460. package/cdn/react/earthdata-login/index.js +17 -18
  461. package/cdn/react/file-upload/index.js +3 -3
  462. package/cdn/react/harmony-history/index.d.ts +3 -0
  463. package/cdn/react/harmony-history/index.js +13 -14
  464. package/cdn/react/icon/index.js +4 -4
  465. package/cdn/react/index.d.ts +24 -24
  466. package/cdn/react/index.js +277 -265
  467. package/cdn/react/input/index.js +6 -6
  468. package/cdn/react/loader/index.js +3 -3
  469. package/cdn/react/login/index.js +13 -14
  470. package/cdn/react/map/index.d.ts +32 -1
  471. package/cdn/react/map/index.js +44 -30
  472. package/cdn/react/menu/index.js +3 -3
  473. package/cdn/react/menu-item/index.js +8 -8
  474. package/cdn/react/option/index.js +5 -5
  475. package/cdn/react/pagination/index.js +5 -5
  476. package/cdn/react/plot/index.js +3 -3
  477. package/cdn/react/plot-toolbar/index.d.ts +6 -1
  478. package/cdn/react/plot-toolbar/index.js +55 -43
  479. package/cdn/react/popup/index.js +3 -3
  480. package/cdn/react/progress-bar/index.js +3 -3
  481. package/cdn/react/radio/index.js +4 -4
  482. package/cdn/react/radio-group/index.js +4 -4
  483. package/cdn/react/scroll-hint/index.js +5 -5
  484. package/cdn/react/select/index.js +9 -9
  485. package/cdn/react/site-header/index.js +6 -6
  486. package/cdn/react/site-navigation/index.js +3 -3
  487. package/cdn/react/skeleton/index.js +3 -3
  488. package/cdn/react/slider/index.js +3 -3
  489. package/cdn/react/spatial-picker/index.js +54 -40
  490. package/cdn/react/status-indicator/index.js +3 -3
  491. package/cdn/react/stepper/index.js +3 -3
  492. package/cdn/react/stepper-step/index.js +5 -5
  493. package/cdn/react/tab/index.js +5 -5
  494. package/cdn/react/tab-panel/index.js +4 -4
  495. package/cdn/react/tabs/index.js +5 -5
  496. package/cdn/react/tag/index.js +5 -5
  497. package/cdn/react/textarea/index.js +5 -5
  498. package/cdn/react/time-average-map/index.d.ts +6 -1
  499. package/cdn/react/time-average-map/index.js +67 -55
  500. package/cdn/react/time-series/index.d.ts +3 -0
  501. package/cdn/react/time-series/index.js +67 -55
  502. package/cdn/react/toast/index.js +6 -6
  503. package/cdn/react/toggle/index.js +5 -5
  504. package/cdn/react/tooltip/index.js +5 -5
  505. package/cdn/react/variable-combobox/index.d.ts +4 -1
  506. package/cdn/react/variable-combobox/index.js +15 -13
  507. package/cdn/react/variable-keyword-search/index.d.ts +1 -1
  508. package/cdn/react/variable-keyword-search/index.js +11 -11
  509. package/cdn/terra-ui-components.js +278 -266
  510. package/cdn/types/vue/index.d.ts +1037 -870
  511. package/cdn/utilities/date.d.ts +4 -0
  512. package/cdn/utilities/date.js +3 -1
  513. package/cdn/utilities/variable-task.js +2 -2
  514. package/cdn/vscode.html-custom-data.json +692 -661
  515. package/cdn/web-types.json +2243 -2077
  516. package/dist/apis/harmony.api.d.ts +5 -0
  517. package/dist/chunks/chunk.25A7KRDN.js +19 -0
  518. package/dist/chunks/chunk.2C5HNR5L.js +4 -0
  519. package/dist/chunks/chunk.2O3IOB3J.js +1 -0
  520. package/dist/chunks/chunk.33OXTI3O.js +22 -0
  521. package/dist/chunks/chunk.345LFJWT.js +1 -0
  522. package/dist/chunks/chunk.3D65L7Z7.js +1 -0
  523. package/dist/chunks/chunk.3GAETZS7.js +12 -0
  524. package/dist/chunks/chunk.3IH7Q4YU.js +1 -0
  525. package/dist/chunks/chunk.424PTQE6.js +1 -0
  526. package/dist/chunks/chunk.43YXC3BX.js +1 -0
  527. package/dist/chunks/chunk.45H2PNH4.js +1 -0
  528. package/dist/chunks/chunk.47YM7IJH.js +1 -0
  529. package/dist/chunks/chunk.4A2YMU2A.js +1 -0
  530. package/dist/chunks/chunk.4BU5K6UJ.js +1 -0
  531. package/dist/chunks/chunk.4HQHKAPL.js +1 -0
  532. package/dist/chunks/chunk.4POG3VJI.js +148 -0
  533. package/dist/chunks/chunk.4QRZ7ROR.js +299 -0
  534. package/dist/chunks/chunk.4WJQSWQN.js +1 -0
  535. package/dist/chunks/chunk.52VRTKYJ.js +1 -0
  536. package/dist/chunks/chunk.55FJVUS6.js +43 -0
  537. package/dist/chunks/chunk.55S45QN4.js +1 -0
  538. package/dist/chunks/chunk.574Z2YXE.js +1 -0
  539. package/dist/chunks/chunk.5EE4HG2I.js +1 -0
  540. package/dist/chunks/chunk.5SZGFRLL.js +1 -0
  541. package/dist/chunks/chunk.5TJN4Z3R.js +1 -0
  542. package/dist/chunks/chunk.5TYJPHW2.js +1 -0
  543. package/dist/chunks/chunk.5UYKLBWJ.js +8 -0
  544. package/dist/chunks/chunk.5VNCJX27.js +55 -0
  545. package/dist/chunks/chunk.64725NP3.js +1 -0
  546. package/dist/chunks/chunk.6HO3MVIP.js +1 -0
  547. package/dist/chunks/chunk.6I57S7FR.js +27 -0
  548. package/dist/chunks/chunk.6XHCRR5R.js +9 -0
  549. package/dist/chunks/chunk.73HKAO6V.js +11 -0
  550. package/dist/chunks/chunk.7COB35MT.js +75 -0
  551. package/dist/chunks/chunk.7NCUNKBE.js +1 -0
  552. package/dist/chunks/chunk.7NXWYAIR.js +1 -0
  553. package/dist/chunks/chunk.7SLU543S.js +1 -0
  554. package/dist/chunks/chunk.7XQG4HG3.js +1 -0
  555. package/dist/chunks/chunk.A2ZTVI45.js +154 -0
  556. package/dist/chunks/chunk.AAUFO4KA.js +1 -0
  557. package/dist/chunks/chunk.AFNS7NIK.js +1 -0
  558. package/dist/chunks/chunk.AHL4S3IT.js +1 -0
  559. package/dist/chunks/chunk.AHS4Q35I.js +1 -0
  560. package/dist/chunks/chunk.AIWYS7YQ.js +1 -0
  561. package/dist/chunks/chunk.ALIRA2AC.js +1 -0
  562. package/dist/chunks/chunk.ATILEODB.js +18 -0
  563. package/dist/chunks/chunk.B3X6VXDL.js +1 -0
  564. package/dist/chunks/chunk.B4BXOMMQ.js +1 -0
  565. package/dist/chunks/chunk.BCGQKSR6.js +1 -0
  566. package/dist/chunks/chunk.BOZFOR5U.js +1 -0
  567. package/dist/chunks/chunk.BQB6XWSY.js +1 -0
  568. package/dist/chunks/chunk.BW5OZ5PS.js +1 -0
  569. package/dist/chunks/chunk.BXPTMVQE.js +1 -0
  570. package/dist/chunks/chunk.C6OX4NX6.js +74 -0
  571. package/dist/chunks/chunk.C7VEVA2Y.js +20 -0
  572. package/dist/chunks/chunk.CEOBCS56.js +1 -0
  573. package/dist/chunks/chunk.CGTXCYPM.js +41 -0
  574. package/dist/chunks/chunk.CH2PWIJD.js +5 -0
  575. package/dist/chunks/chunk.CLY6HMJZ.js +121 -0
  576. package/dist/chunks/chunk.CNGZOMLD.js +1 -0
  577. package/dist/chunks/chunk.CPFON5LM.js +1 -0
  578. package/dist/chunks/chunk.CQUQVS3M.js +1 -0
  579. package/dist/chunks/chunk.CRHOUQZH.js +1023 -0
  580. package/dist/chunks/chunk.CVKACFML.js +1 -0
  581. package/dist/chunks/chunk.D3JQRTEL.js +1 -0
  582. package/dist/chunks/chunk.DH5QWPH3.js +126 -0
  583. package/dist/chunks/chunk.DJ5BXB5G.js +48 -0
  584. package/dist/chunks/chunk.DKBGIHHD.js +1 -0
  585. package/dist/chunks/chunk.DOT4H7LX.js +2 -0
  586. package/dist/chunks/chunk.DTKNWAYL.js +62 -0
  587. package/dist/chunks/chunk.DWQMS6BC.js +1 -0
  588. package/dist/chunks/chunk.E477TJOR.js +1 -0
  589. package/dist/chunks/chunk.E4ELJE6I.js +35 -0
  590. package/dist/chunks/chunk.EB3ZPXT6.js +1 -0
  591. package/dist/chunks/chunk.EP2O3QZD.js +1 -0
  592. package/dist/chunks/chunk.EP5CSYKQ.js +1 -0
  593. package/dist/chunks/chunk.EQV2PFSY.js +1 -0
  594. package/dist/chunks/chunk.ER2IYY3T.js +1 -0
  595. package/dist/chunks/chunk.EV5P56DN.js +1 -0
  596. package/dist/chunks/chunk.F3NCEQ7X.js +1 -0
  597. package/dist/chunks/chunk.FSZCT7LX.js +26 -0
  598. package/dist/chunks/chunk.G3ZRWDDX.js +1 -0
  599. package/dist/chunks/chunk.G57LF47A.js +1 -0
  600. package/dist/chunks/chunk.GABTYKJH.js +1 -0
  601. package/dist/chunks/chunk.GHAZYRJA.js +1 -0
  602. package/dist/chunks/chunk.GP5SO7WB.js +43 -0
  603. package/dist/chunks/chunk.GQKEZMI5.js +64 -0
  604. package/dist/chunks/chunk.GUCJK7CQ.js +1 -0
  605. package/dist/chunks/chunk.GVVBO4QC.js +30 -0
  606. package/dist/chunks/chunk.H57KVCKB.js +4 -0
  607. package/dist/chunks/chunk.HCPPIK6X.js +1 -0
  608. package/dist/chunks/chunk.HDBWSDNO.js +1 -0
  609. package/dist/chunks/chunk.HDQVEOLO.js +1 -0
  610. package/dist/chunks/chunk.HKOYW5P7.js +1 -0
  611. package/dist/chunks/chunk.HPJUOBS5.js +1 -0
  612. package/dist/chunks/chunk.HTEGCYSS.js +2 -0
  613. package/dist/chunks/chunk.I2766Z6G.js +1 -0
  614. package/dist/chunks/chunk.I6OSLDVJ.js +1 -0
  615. package/dist/chunks/chunk.I6WZHDJR.js +1 -0
  616. package/dist/chunks/chunk.ID6GATFM.js +1 -0
  617. package/dist/chunks/chunk.IDQKGC62.js +1 -0
  618. package/dist/chunks/chunk.IRLLX53J.js +47 -0
  619. package/dist/chunks/chunk.IS2NEHYI.js +1 -0
  620. package/dist/chunks/chunk.IS4IX5PC.js +1 -0
  621. package/dist/chunks/chunk.J6W2UPV5.js +1 -0
  622. package/dist/chunks/chunk.JBNOA3A2.js +1 -0
  623. package/dist/chunks/chunk.JDM4WI4S.js +20 -0
  624. package/dist/chunks/chunk.JIF57YBB.js +1 -0
  625. package/dist/chunks/chunk.JM33IYJC.js +1 -0
  626. package/dist/chunks/chunk.JMLZNWOP.js +14 -0
  627. package/dist/chunks/chunk.JRCA2SKL.js +145 -0
  628. package/dist/chunks/chunk.JVSJPJIU.js +5 -0
  629. package/dist/chunks/chunk.JZKLCWMN.js +1 -0
  630. package/dist/chunks/chunk.JZLGMRZU.js +157 -0
  631. package/dist/chunks/chunk.K5BRJBGT.js +1 -0
  632. package/dist/chunks/chunk.KACJAQNX.js +6 -0
  633. package/dist/chunks/chunk.KEJYVX6V.js +55 -0
  634. package/dist/chunks/chunk.KF3WZUJB.js +1 -0
  635. package/dist/chunks/chunk.KGWY64U3.js +1 -0
  636. package/dist/chunks/chunk.KHUTJ2EC.js +1 -0
  637. package/dist/chunks/chunk.KOQ6WD4F.js +1 -0
  638. package/dist/chunks/chunk.KPNLEIXC.js +99 -0
  639. package/dist/chunks/chunk.KZAPYGJP.js +1 -0
  640. package/dist/chunks/chunk.L5QDGGS7.js +1 -0
  641. package/dist/chunks/chunk.LCYI63EA.js +20 -0
  642. package/dist/chunks/chunk.LEZEAL23.js +1 -0
  643. package/dist/chunks/chunk.LM6MTY2M.js +37 -0
  644. package/dist/chunks/chunk.LOLJACKL.js +1 -0
  645. package/dist/chunks/chunk.LQU34HVZ.js +1 -0
  646. package/dist/chunks/chunk.LVAET76P.js +1 -0
  647. package/dist/chunks/chunk.LXFMQAKV.js +1 -0
  648. package/dist/chunks/chunk.LYEGL5BZ.js +1 -0
  649. package/dist/chunks/chunk.LZZE65EN.js +1 -0
  650. package/dist/chunks/chunk.MCJ2GX4A.js +30 -0
  651. package/dist/chunks/chunk.MDKK4AJV.js +17 -0
  652. package/dist/chunks/chunk.MF67H5JA.js +1 -0
  653. package/dist/chunks/chunk.MGU32BIU.js +59 -0
  654. package/dist/chunks/chunk.MK3X5JIU.js +65 -0
  655. package/dist/chunks/chunk.MLR4ZKRU.js +1 -0
  656. package/dist/chunks/chunk.MQIO6BEA.js +1 -0
  657. package/dist/chunks/chunk.MU4BRZ5R.js +1 -0
  658. package/dist/chunks/chunk.MWPFFGL3.js +1 -0
  659. package/dist/chunks/chunk.MXMEA7TP.js +1 -0
  660. package/dist/chunks/chunk.N3V2FL7Q.js +1 -0
  661. package/dist/chunks/chunk.NARLVFIQ.js +33 -0
  662. package/dist/chunks/chunk.NK753QCZ.js +1 -0
  663. package/dist/chunks/chunk.NOXPOPPM.js +1 -0
  664. package/dist/chunks/chunk.NTZXYW2X.js +1 -0
  665. package/dist/chunks/chunk.NV3ZCWPP.js +1 -0
  666. package/dist/chunks/chunk.O2UN3QQG.js +1 -0
  667. package/dist/chunks/chunk.O47BMDEV.js +1 -0
  668. package/dist/chunks/chunk.OJM5RA3G.js +1 -0
  669. package/dist/chunks/chunk.OM4YQXHL.js +1 -0
  670. package/dist/chunks/chunk.OVTNI4H2.js +1 -0
  671. package/dist/chunks/chunk.OWXS5GVL.js +1 -0
  672. package/dist/chunks/chunk.OZSD4QYB.js +1 -0
  673. package/dist/chunks/chunk.PIKCG752.js +1 -0
  674. package/dist/chunks/chunk.PLSGWBX4.js +42 -0
  675. package/dist/chunks/chunk.PP6KREF2.js +5 -0
  676. package/dist/chunks/chunk.PQVZB2P2.js +67 -0
  677. package/dist/chunks/chunk.PRUHQ3VS.js +1 -0
  678. package/dist/chunks/chunk.PWFX3VPM.js +1 -0
  679. package/dist/chunks/chunk.PXVAQ2MA.js +55 -0
  680. package/dist/chunks/chunk.Q6O6LV3R.js +1 -0
  681. package/dist/chunks/chunk.QB7E6R2H.js +1 -0
  682. package/dist/chunks/chunk.QJRLPQ4M.js +1 -0
  683. package/dist/chunks/chunk.QOQWXEK5.js +1 -0
  684. package/dist/chunks/chunk.QVDEJXKO.js +1 -0
  685. package/dist/chunks/chunk.RKMR7V7J.js +1 -0
  686. package/dist/chunks/chunk.RLTSECXU.js +1 -0
  687. package/dist/chunks/chunk.RQYBMFWH.js +25 -0
  688. package/dist/chunks/chunk.S6IY5EKN.js +1 -0
  689. package/dist/chunks/chunk.SD2Q7EO2.js +23 -0
  690. package/dist/chunks/chunk.SEBIDNZM.js +1 -0
  691. package/dist/chunks/chunk.SF2OZFKQ.js +26 -0
  692. package/dist/chunks/chunk.SFK6BRQV.js +16 -0
  693. package/dist/chunks/chunk.SJTIVT6P.js +1 -0
  694. package/dist/chunks/chunk.SKK3NN5J.js +129 -0
  695. package/dist/chunks/chunk.SXGO5MEK.js +100 -0
  696. package/dist/chunks/chunk.TANXPJFE.js +1 -0
  697. package/dist/chunks/chunk.TATIBHUA.js +1 -0
  698. package/dist/chunks/chunk.TOON2INB.js +39 -0
  699. package/dist/chunks/chunk.TPUQNE3A.js +1 -0
  700. package/dist/chunks/chunk.TUGWQPTL.js +1 -0
  701. package/dist/chunks/chunk.TVERDMGY.js +113 -0
  702. package/dist/chunks/chunk.TWRNH5K5.js +1 -0
  703. package/dist/chunks/chunk.UQ6BNK6J.js +1 -0
  704. package/dist/chunks/chunk.UR7PHRDS.js +345 -0
  705. package/dist/chunks/chunk.V4XJH6YL.js +80 -0
  706. package/dist/chunks/chunk.VEPO6QAD.js +1 -0
  707. package/dist/chunks/chunk.VGN6LMHA.js +1 -0
  708. package/dist/chunks/chunk.VGQNQREB.js +1 -0
  709. package/dist/chunks/chunk.VSYDUDNW.js +1286 -0
  710. package/dist/chunks/chunk.W2E2TLSM.js +176 -0
  711. package/dist/chunks/chunk.WQ6USVYL.js +1 -0
  712. package/dist/chunks/chunk.WSBH5HTI.js +1 -0
  713. package/dist/chunks/chunk.WVBRHYTU.js +1 -0
  714. package/dist/chunks/chunk.X66E247Y.js +1 -0
  715. package/dist/chunks/chunk.XAPKFJEL.js +1 -0
  716. package/dist/chunks/chunk.XCYCEX7B.js +1 -0
  717. package/dist/chunks/chunk.XYOSJOLJ.js +1 -0
  718. package/dist/chunks/chunk.XZJS7S7T.js +280 -0
  719. package/dist/chunks/chunk.Y6ESPBDJ.js +1 -0
  720. package/dist/chunks/chunk.Y6HSCFK2.js +1 -0
  721. package/dist/chunks/chunk.YA7JZZG4.js +1 -0
  722. package/dist/chunks/chunk.YBALUVPL.js +1 -0
  723. package/dist/chunks/chunk.YFCEZZRF.js +1 -0
  724. package/dist/chunks/chunk.YLGPGQY4.js +566 -0
  725. package/dist/chunks/chunk.YLNZLECF.js +9 -0
  726. package/dist/chunks/chunk.YMDGNLGV.js +1 -0
  727. package/dist/chunks/chunk.YNN3NBWK.js +1 -0
  728. package/dist/chunks/chunk.YO67MSZK.js +780 -0
  729. package/dist/chunks/chunk.YY3G7NCY.js +35 -0
  730. package/dist/chunks/chunk.YZJEAHZH.js +1 -0
  731. package/dist/chunks/chunk.YZXEYQ6F.js +1 -0
  732. package/dist/chunks/chunk.ZBHNSZBH.js +24 -0
  733. package/dist/chunks/chunk.ZCPIP5RL.js +774 -0
  734. package/dist/chunks/chunk.ZFCVEZXM.js +11 -0
  735. package/dist/components/accordion/accordion.component.js +1 -1
  736. package/dist/components/accordion/accordion.js +1 -1
  737. package/dist/components/alert/alert.component.js +1 -1
  738. package/dist/components/alert/alert.js +1 -1
  739. package/dist/components/avatar/avatar.component.js +1 -1
  740. package/dist/components/avatar/avatar.js +1 -1
  741. package/dist/components/badge/badge.component.js +1 -1
  742. package/dist/components/badge/badge.js +1 -1
  743. package/dist/components/banner/banner.component.js +1 -1
  744. package/dist/components/banner/banner.js +1 -1
  745. package/dist/components/breadcrumb/breadcrumb.component.js +1 -1
  746. package/dist/components/breadcrumb/breadcrumb.js +1 -1
  747. package/dist/components/breadcrumbs/breadcrumbs.component.js +1 -1
  748. package/dist/components/breadcrumbs/breadcrumbs.js +1 -1
  749. package/dist/components/browse-variables/browse-variables.component.d.ts +1 -1
  750. package/dist/components/browse-variables/browse-variables.component.js +1 -1
  751. package/dist/components/browse-variables/browse-variables.controller.js +1 -1
  752. package/dist/components/browse-variables/browse-variables.js +1 -1
  753. package/dist/components/button/button.component.js +1 -1
  754. package/dist/components/button/button.js +1 -1
  755. package/dist/components/button-group/button-group.component.js +1 -1
  756. package/dist/components/button-group/button-group.js +1 -1
  757. package/dist/components/caption/caption.component.js +1 -1
  758. package/dist/components/caption/caption.js +1 -1
  759. package/dist/components/card/card.component.js +1 -1
  760. package/dist/components/card/card.js +1 -1
  761. package/dist/components/checkbox/checkbox.component.js +1 -1
  762. package/dist/components/checkbox/checkbox.js +1 -1
  763. package/dist/components/chip/chip.component.js +1 -1
  764. package/dist/components/chip/chip.js +1 -1
  765. package/dist/components/combobox/combobox.component.js +1 -1
  766. package/dist/components/combobox/combobox.js +1 -1
  767. package/dist/components/data-access/data-access.component.d.ts +11 -11
  768. package/dist/components/data-access/data-access.component.js +1 -1
  769. package/dist/components/data-access/data-access.js +1 -1
  770. package/dist/components/data-grid/data-grid.component.js +1 -1
  771. package/dist/components/data-grid/data-grid.js +1 -1
  772. package/dist/components/data-rods/data-rods.component.d.ts +7 -11
  773. package/dist/components/data-rods/data-rods.component.js +1 -1
  774. package/dist/components/data-rods/data-rods.js +1 -1
  775. package/dist/components/data-subsetter/data-subsetter.component.d.ts +8 -5
  776. package/dist/components/data-subsetter/data-subsetter.component.js +1 -1
  777. package/dist/components/data-subsetter/data-subsetter.js +1 -1
  778. package/dist/components/data-subsetter/data-subsetter.styles.js +1 -1
  779. package/dist/components/data-subsetter/notebooks/subsetter-notebook.js +1 -1
  780. package/dist/components/data-subsetter-history/data-subsetter-history.component.d.ts +4 -7
  781. package/dist/components/data-subsetter-history/data-subsetter-history.component.js +1 -1
  782. package/dist/components/data-subsetter-history/data-subsetter-history.js +1 -1
  783. package/dist/components/date-picker/date-picker.component.d.ts +3 -4
  784. package/dist/components/date-picker/date-picker.component.js +1 -1
  785. package/dist/components/date-picker/date-picker.js +1 -1
  786. package/dist/components/date-range-slider/date-range-slider.component.js +1 -1
  787. package/dist/components/date-range-slider/date-range-slider.js +1 -1
  788. package/dist/components/dialog/dialog.component.js +1 -1
  789. package/dist/components/dialog/dialog.js +1 -1
  790. package/dist/components/divider/divider.component.js +1 -1
  791. package/dist/components/divider/divider.js +1 -1
  792. package/dist/components/dropdown/dropdown.component.js +1 -1
  793. package/dist/components/dropdown/dropdown.js +1 -1
  794. package/dist/components/earthdata-login/earthdata-login.component.d.ts +3 -1
  795. package/dist/components/earthdata-login/earthdata-login.component.js +1 -1
  796. package/dist/components/earthdata-login/earthdata-login.js +1 -1
  797. package/dist/components/file-upload/file-upload.component.js +1 -1
  798. package/dist/components/file-upload/file-upload.js +1 -1
  799. package/dist/components/harmony-history/harmony-history.component.d.ts +3 -6
  800. package/dist/components/harmony-history/harmony-history.component.js +1 -1
  801. package/dist/components/harmony-history/harmony-history.js +1 -1
  802. package/dist/components/icon/icon.component.js +1 -1
  803. package/dist/components/icon/icon.js +1 -1
  804. package/dist/components/input/input.component.js +1 -1
  805. package/dist/components/input/input.js +1 -1
  806. package/dist/components/loader/loader.component.js +1 -1
  807. package/dist/components/loader/loader.js +1 -1
  808. package/dist/components/login/login.component.d.ts +3 -1
  809. package/dist/components/login/login.component.js +1 -1
  810. package/dist/components/login/login.js +1 -1
  811. package/dist/components/map/controls/draw-toolbar.control.d.ts +5 -2
  812. package/dist/components/map/controls/draw-toolbar.control.js +1 -1
  813. package/dist/components/map/controls/layer-picker.control.d.ts +16 -0
  814. package/dist/components/map/controls/layer-picker.control.js +1 -0
  815. package/dist/components/map/layers/base.layer.d.ts +10 -0
  816. package/dist/components/map/layers/base.layer.js +1 -1
  817. package/dist/components/map/layers/boundary.d.ts +30 -0
  818. package/dist/components/map/layers/boundary.js +1 -0
  819. package/dist/components/map/layers/common.d.ts +2 -0
  820. package/dist/components/map/layers/gibs-vector.layer.js +1 -1
  821. package/dist/components/map/layers/gibs.layer.d.ts +6 -0
  822. package/dist/components/map/layers/gibs.layer.js +1 -1
  823. package/dist/components/map/layers/layer.js +1 -1
  824. package/dist/components/map/map.component.d.ts +73 -21
  825. package/dist/components/map/map.component.js +1 -1
  826. package/dist/components/map/map.js +1 -1
  827. package/dist/components/map/map.service.d.ts +92 -9
  828. package/dist/components/map/map.service.js +1 -1
  829. package/dist/components/map/map.styles.js +1 -1
  830. package/dist/components/map/type.d.ts +7 -0
  831. package/dist/components/map/type.js +1 -1
  832. package/dist/components/menu/menu.component.js +1 -1
  833. package/dist/components/menu/menu.js +1 -1
  834. package/dist/components/menu-item/menu-item.component.js +1 -1
  835. package/dist/components/menu-item/menu-item.js +1 -1
  836. package/dist/components/option/option.component.js +1 -1
  837. package/dist/components/option/option.js +1 -1
  838. package/dist/components/pagination/pagination.component.js +1 -1
  839. package/dist/components/pagination/pagination.js +1 -1
  840. package/dist/components/plot/plot.component.js +1 -1
  841. package/dist/components/plot/plot.js +1 -1
  842. package/dist/components/plot-toolbar/notebooks/time-averaged-map-notebook.js +1 -1
  843. package/dist/components/plot-toolbar/notebooks/time-series-notebook.js +1 -1
  844. package/dist/components/plot-toolbar/plot-toolbar.component.d.ts +4 -4
  845. package/dist/components/plot-toolbar/plot-toolbar.component.js +1 -1
  846. package/dist/components/plot-toolbar/plot-toolbar.js +1 -1
  847. package/dist/components/popup/popup.component.js +1 -1
  848. package/dist/components/popup/popup.js +1 -1
  849. package/dist/components/progress-bar/progress-bar.component.js +1 -1
  850. package/dist/components/progress-bar/progress-bar.js +1 -1
  851. package/dist/components/radio/radio.component.js +1 -1
  852. package/dist/components/radio/radio.js +1 -1
  853. package/dist/components/radio-group/radio-group.component.js +1 -1
  854. package/dist/components/radio-group/radio-group.js +1 -1
  855. package/dist/components/scroll-hint/scroll-hint.component.js +1 -1
  856. package/dist/components/scroll-hint/scroll-hint.js +1 -1
  857. package/dist/components/select/select.component.js +1 -1
  858. package/dist/components/select/select.js +1 -1
  859. package/dist/components/site-header/site-header.component.js +1 -1
  860. package/dist/components/site-header/site-header.js +1 -1
  861. package/dist/components/site-navigation/site-navigation.component.js +1 -1
  862. package/dist/components/site-navigation/site-navigation.js +1 -1
  863. package/dist/components/skeleton/skeleton.component.js +1 -1
  864. package/dist/components/skeleton/skeleton.js +1 -1
  865. package/dist/components/slider/slider.component.js +1 -1
  866. package/dist/components/slider/slider.js +1 -1
  867. package/dist/components/spatial-picker/spatial-picker.component.d.ts +0 -10
  868. package/dist/components/spatial-picker/spatial-picker.component.js +1 -1
  869. package/dist/components/spatial-picker/spatial-picker.js +1 -1
  870. package/dist/components/status-indicator/status-indicator.component.js +1 -1
  871. package/dist/components/status-indicator/status-indicator.js +1 -1
  872. package/dist/components/stepper/stepper.component.js +1 -1
  873. package/dist/components/stepper/stepper.js +1 -1
  874. package/dist/components/stepper-step/stepper-step.component.js +1 -1
  875. package/dist/components/stepper-step/stepper-step.js +1 -1
  876. package/dist/components/tab/tab.component.js +1 -1
  877. package/dist/components/tab/tab.js +1 -1
  878. package/dist/components/tab-panel/tab-panel.component.js +1 -1
  879. package/dist/components/tab-panel/tab-panel.js +1 -1
  880. package/dist/components/tabs/tabs.component.d.ts +2 -1
  881. package/dist/components/tabs/tabs.component.js +1 -1
  882. package/dist/components/tabs/tabs.js +1 -1
  883. package/dist/components/tag/tag.component.js +1 -1
  884. package/dist/components/tag/tag.js +1 -1
  885. package/dist/components/textarea/textarea.component.js +1 -1
  886. package/dist/components/textarea/textarea.js +1 -1
  887. package/dist/components/time-average-map/time-average-map.component.d.ts +10 -14
  888. package/dist/components/time-average-map/time-average-map.component.js +1 -1
  889. package/dist/components/time-average-map/time-average-map.controller.js +1 -1
  890. package/dist/components/time-average-map/time-average-map.js +1 -1
  891. package/dist/components/time-series/time-series.component.d.ts +2 -10
  892. package/dist/components/time-series/time-series.component.js +1 -1
  893. package/dist/components/time-series/time-series.controller.js +1 -1
  894. package/dist/components/time-series/time-series.js +1 -1
  895. package/dist/components/toast/toast.component.js +1 -1
  896. package/dist/components/toast/toast.js +1 -1
  897. package/dist/components/toggle/toggle.component.js +1 -1
  898. package/dist/components/toggle/toggle.js +1 -1
  899. package/dist/components/tooltip/tooltip.component.js +1 -1
  900. package/dist/components/tooltip/tooltip.js +1 -1
  901. package/dist/components/variable-combobox/variable-combobox.component.d.ts +5 -9
  902. package/dist/components/variable-combobox/variable-combobox.component.js +1 -1
  903. package/dist/components/variable-combobox/variable-combobox.js +1 -1
  904. package/dist/components/variable-keyword-search/variable-keyword-search.component.d.ts +2 -2
  905. package/dist/components/variable-keyword-search/variable-keyword-search.component.js +1 -1
  906. package/dist/components/variable-keyword-search/variable-keyword-search.js +1 -1
  907. package/dist/custom-elements.json +10670 -8582
  908. package/dist/events/events.d.ts +2 -2
  909. package/dist/events/terra-map.d.ts +55 -0
  910. package/dist/mixins/auth.mixin.d.ts +23 -0
  911. package/dist/mixins/mixin.types.d.ts +1 -0
  912. package/dist/mixins/query-client.mixin.d.ts +1 -1
  913. package/dist/react/accordion/index.js +1 -1
  914. package/dist/react/alert/index.js +1 -1
  915. package/dist/react/avatar/index.js +1 -1
  916. package/dist/react/badge/index.js +1 -1
  917. package/dist/react/banner/index.js +1 -1
  918. package/dist/react/breadcrumb/index.js +1 -1
  919. package/dist/react/breadcrumbs/index.js +1 -1
  920. package/dist/react/browse-variables/index.js +1 -1
  921. package/dist/react/button/index.js +1 -1
  922. package/dist/react/button-group/index.js +1 -1
  923. package/dist/react/caption/index.js +1 -1
  924. package/dist/react/card/index.js +1 -1
  925. package/dist/react/checkbox/index.js +1 -1
  926. package/dist/react/chip/index.js +1 -1
  927. package/dist/react/combobox/index.js +1 -1
  928. package/dist/react/data-access/index.js +1 -1
  929. package/dist/react/data-grid/index.js +1 -1
  930. package/dist/react/data-rods/index.d.ts +6 -1
  931. package/dist/react/data-rods/index.js +1 -1
  932. package/dist/react/data-subsetter/index.d.ts +3 -0
  933. package/dist/react/data-subsetter/index.js +1 -1
  934. package/dist/react/data-subsetter-history/index.d.ts +6 -1
  935. package/dist/react/data-subsetter-history/index.js +1 -1
  936. package/dist/react/date-picker/index.js +1 -1
  937. package/dist/react/date-range-slider/index.js +1 -1
  938. package/dist/react/dialog/index.js +1 -1
  939. package/dist/react/divider/index.js +1 -1
  940. package/dist/react/dropdown/index.js +1 -1
  941. package/dist/react/earthdata-login/index.js +1 -1
  942. package/dist/react/file-upload/index.js +1 -1
  943. package/dist/react/harmony-history/index.d.ts +3 -0
  944. package/dist/react/harmony-history/index.js +1 -1
  945. package/dist/react/icon/index.js +1 -1
  946. package/dist/react/index.d.ts +24 -24
  947. package/dist/react/index.js +1 -1
  948. package/dist/react/input/index.js +1 -1
  949. package/dist/react/loader/index.js +1 -1
  950. package/dist/react/login/index.js +1 -1
  951. package/dist/react/map/index.d.ts +32 -1
  952. package/dist/react/map/index.js +1 -1
  953. package/dist/react/menu/index.js +1 -1
  954. package/dist/react/menu-item/index.js +1 -1
  955. package/dist/react/option/index.js +1 -1
  956. package/dist/react/pagination/index.js +1 -1
  957. package/dist/react/plot/index.js +1 -1
  958. package/dist/react/plot-toolbar/index.d.ts +6 -1
  959. package/dist/react/plot-toolbar/index.js +1 -1
  960. package/dist/react/popup/index.js +1 -1
  961. package/dist/react/progress-bar/index.js +1 -1
  962. package/dist/react/radio/index.js +1 -1
  963. package/dist/react/radio-group/index.js +1 -1
  964. package/dist/react/scroll-hint/index.js +1 -1
  965. package/dist/react/select/index.js +1 -1
  966. package/dist/react/site-header/index.js +1 -1
  967. package/dist/react/site-navigation/index.js +1 -1
  968. package/dist/react/skeleton/index.js +1 -1
  969. package/dist/react/slider/index.js +1 -1
  970. package/dist/react/spatial-picker/index.js +1 -1
  971. package/dist/react/status-indicator/index.js +1 -1
  972. package/dist/react/stepper/index.js +1 -1
  973. package/dist/react/stepper-step/index.js +1 -1
  974. package/dist/react/tab/index.js +1 -1
  975. package/dist/react/tab-panel/index.js +1 -1
  976. package/dist/react/tabs/index.js +1 -1
  977. package/dist/react/tag/index.js +1 -1
  978. package/dist/react/textarea/index.js +1 -1
  979. package/dist/react/time-average-map/index.d.ts +6 -1
  980. package/dist/react/time-average-map/index.js +1 -1
  981. package/dist/react/time-series/index.d.ts +3 -0
  982. package/dist/react/time-series/index.js +1 -1
  983. package/dist/react/toast/index.js +1 -1
  984. package/dist/react/toggle/index.js +1 -1
  985. package/dist/react/tooltip/index.js +1 -1
  986. package/dist/react/variable-combobox/index.d.ts +4 -1
  987. package/dist/react/variable-combobox/index.js +1 -1
  988. package/dist/react/variable-keyword-search/index.d.ts +1 -1
  989. package/dist/react/variable-keyword-search/index.js +1 -1
  990. package/dist/terra-ui-components.js +1 -1
  991. package/dist/terra_ui_components-0.0.205-py3-none-any.whl +0 -0
  992. package/dist/terra_ui_components-0.0.205.tar.gz +0 -0
  993. package/dist/types/vue/index.d.ts +1037 -870
  994. package/dist/utilities/date.d.ts +4 -0
  995. package/dist/utilities/date.js +1 -1
  996. package/dist/utilities/variable-task.js +1 -1
  997. package/dist/vscode.html-custom-data.json +692 -661
  998. package/dist/web-types.json +2243 -2077
  999. package/package.json +6 -4
  1000. package/cdn/auth/auth.controller.d.ts +0 -16
  1001. package/cdn/chunks/GeoTIFF.KMHPSKO6.js +0 -19975
  1002. package/cdn/chunks/chunk.27KCXEZH.js +0 -431
  1003. package/cdn/chunks/chunk.2AFX3VCL.js +0 -125
  1004. package/cdn/chunks/chunk.2DFPSVL6.js +0 -68
  1005. package/cdn/chunks/chunk.2DPXUVUW.js +0 -357
  1006. package/cdn/chunks/chunk.2EKGBKN2.js +0 -19
  1007. package/cdn/chunks/chunk.2FSYZKPK.js +0 -29
  1008. package/cdn/chunks/chunk.2HXJHNH3.js +0 -5339
  1009. package/cdn/chunks/chunk.2IA6WV7R.js +0 -19
  1010. package/cdn/chunks/chunk.2NRTTHOD.js +0 -30
  1011. package/cdn/chunks/chunk.2PJPIGBI.js +0 -1122
  1012. package/cdn/chunks/chunk.2RYJM2TF.js +0 -19
  1013. package/cdn/chunks/chunk.2UATMVXP.js +0 -261
  1014. package/cdn/chunks/chunk.2UUMIAXS.js +0 -19
  1015. package/cdn/chunks/chunk.3A3QJT7L.js +0 -29
  1016. package/cdn/chunks/chunk.3UXSNM76.js +0 -32
  1017. package/cdn/chunks/chunk.4CVCW4V3.js +0 -32
  1018. package/cdn/chunks/chunk.4HFZS2GO.js +0 -19
  1019. package/cdn/chunks/chunk.4KCMI4UU.js +0 -1036
  1020. package/cdn/chunks/chunk.4M7FMP7T.js +0 -442
  1021. package/cdn/chunks/chunk.4OETFOY2.js +0 -71
  1022. package/cdn/chunks/chunk.4UI7P3Y4.js +0 -19
  1023. package/cdn/chunks/chunk.4VE4DO4N.js +0 -19
  1024. package/cdn/chunks/chunk.4YE3LB3R.js +0 -19
  1025. package/cdn/chunks/chunk.4ZBYMDD6.js +0 -189
  1026. package/cdn/chunks/chunk.5CDWDWX5.js +0 -136
  1027. package/cdn/chunks/chunk.5CLU2XHI.js +0 -29
  1028. package/cdn/chunks/chunk.5G4MIKDW.js +0 -19
  1029. package/cdn/chunks/chunk.5KHCLX4N.js +0 -64743
  1030. package/cdn/chunks/chunk.5N76KCT4.js +0 -285
  1031. package/cdn/chunks/chunk.5OEHZWXQ.js +0 -19
  1032. package/cdn/chunks/chunk.5U22JWZL.js +0 -117
  1033. package/cdn/chunks/chunk.5USXBJV5.js +0 -35
  1034. package/cdn/chunks/chunk.5YQFC77E.js +0 -37
  1035. package/cdn/chunks/chunk.6E7Z4C4E.js +0 -19
  1036. package/cdn/chunks/chunk.6FWN6ZZC.js +0 -32
  1037. package/cdn/chunks/chunk.6J2OCJ7J.js +0 -84
  1038. package/cdn/chunks/chunk.6LOJQVYN.js +0 -36
  1039. package/cdn/chunks/chunk.6OC7H5OH.js +0 -28
  1040. package/cdn/chunks/chunk.6QEEVDUE.js +0 -427
  1041. package/cdn/chunks/chunk.6SAM6SI7.js +0 -19
  1042. package/cdn/chunks/chunk.6VTIK2C6.js +0 -19
  1043. package/cdn/chunks/chunk.75FXMQOA.js +0 -19
  1044. package/cdn/chunks/chunk.7HUACA54.js +0 -29
  1045. package/cdn/chunks/chunk.7L2TSDLJ.js +0 -2028
  1046. package/cdn/chunks/chunk.7N55EAUN.js +0 -17305
  1047. package/cdn/chunks/chunk.7VOSRG7X.js +0 -19
  1048. package/cdn/chunks/chunk.7WUVQEAR.js +0 -256
  1049. package/cdn/chunks/chunk.7Y44JBIB.js +0 -550
  1050. package/cdn/chunks/chunk.7ZI27RZO.js +0 -1136
  1051. package/cdn/chunks/chunk.ACUUMB46.js +0 -33
  1052. package/cdn/chunks/chunk.AFJMWE55.js +0 -29
  1053. package/cdn/chunks/chunk.AH535OUT.js +0 -19
  1054. package/cdn/chunks/chunk.AJTI5LZT.js +0 -60
  1055. package/cdn/chunks/chunk.AL34JKBE.js +0 -19
  1056. package/cdn/chunks/chunk.ANOS3OTE.js +0 -29
  1057. package/cdn/chunks/chunk.AP5WCU4L.js +0 -134
  1058. package/cdn/chunks/chunk.AQQD3TGI.js +0 -19
  1059. package/cdn/chunks/chunk.AWU6UL7H.js +0 -19
  1060. package/cdn/chunks/chunk.AYV43FGZ.js +0 -110
  1061. package/cdn/chunks/chunk.B6MUHPWI.js +0 -19
  1062. package/cdn/chunks/chunk.BHW5IL3I.js +0 -19
  1063. package/cdn/chunks/chunk.BPRI6OGA.js +0 -29
  1064. package/cdn/chunks/chunk.BPTWMSFM.js +0 -259
  1065. package/cdn/chunks/chunk.BTPIPKWK.js +0 -29
  1066. package/cdn/chunks/chunk.C2SRCC4M.js +0 -19
  1067. package/cdn/chunks/chunk.C3SXIMJF.js +0 -29
  1068. package/cdn/chunks/chunk.CDYBBCIE.js +0 -29
  1069. package/cdn/chunks/chunk.CHKUZKW6.js +0 -19
  1070. package/cdn/chunks/chunk.CJG6IYUQ.js +0 -699
  1071. package/cdn/chunks/chunk.COA7ZPCF.js +0 -86
  1072. package/cdn/chunks/chunk.CV4QCJYB.js +0 -29
  1073. package/cdn/chunks/chunk.CV7V62DS.js +0 -33
  1074. package/cdn/chunks/chunk.CWNNDPJR.js +0 -36
  1075. package/cdn/chunks/chunk.CWVFOCEY.js +0 -123
  1076. package/cdn/chunks/chunk.D6DZ2ABR.js +0 -19
  1077. package/cdn/chunks/chunk.DAHT4D47.js +0 -19
  1078. package/cdn/chunks/chunk.DDCWMDIC.js +0 -32
  1079. package/cdn/chunks/chunk.DNVJF7IY.js +0 -39
  1080. package/cdn/chunks/chunk.DOAEM5ON.js +0 -4083
  1081. package/cdn/chunks/chunk.DOLQGIFG.js +0 -19
  1082. package/cdn/chunks/chunk.DPKA4G53.js +0 -601
  1083. package/cdn/chunks/chunk.DTUP6KDY.js +0 -19
  1084. package/cdn/chunks/chunk.DXQUJESD.js +0 -8969
  1085. package/cdn/chunks/chunk.E52YFLSL.js +0 -32
  1086. package/cdn/chunks/chunk.E6S2GD5C.js +0 -31
  1087. package/cdn/chunks/chunk.EQDMPPT6.js +0 -1413
  1088. package/cdn/chunks/chunk.ERJEIORY.js +0 -36
  1089. package/cdn/chunks/chunk.F26CV3RM.js +0 -32
  1090. package/cdn/chunks/chunk.F5ATUIYK.js +0 -29
  1091. package/cdn/chunks/chunk.FALB73Y2.js +0 -37
  1092. package/cdn/chunks/chunk.FCQ22IGW.js +0 -104
  1093. package/cdn/chunks/chunk.FQ6BZ3IY.js +0 -234
  1094. package/cdn/chunks/chunk.FS3BAWIP.js +0 -19
  1095. package/cdn/chunks/chunk.FUANKNNM.js +0 -19
  1096. package/cdn/chunks/chunk.FVMOO5PZ.js +0 -111
  1097. package/cdn/chunks/chunk.FWA7FNBM.js +0 -29
  1098. package/cdn/chunks/chunk.FXGGRWLG.js +0 -106
  1099. package/cdn/chunks/chunk.G5C4B32K.js +0 -32
  1100. package/cdn/chunks/chunk.GAE7V6RB.js +0 -93
  1101. package/cdn/chunks/chunk.GBGE6X2T.js +0 -1018
  1102. package/cdn/chunks/chunk.GBR3XNSE.js +0 -19
  1103. package/cdn/chunks/chunk.GDXZZBNN.js +0 -29
  1104. package/cdn/chunks/chunk.GEZJ4HAT.js +0 -128
  1105. package/cdn/chunks/chunk.GHYNGNCL.js +0 -19
  1106. package/cdn/chunks/chunk.GVSCZXYP.js +0 -152
  1107. package/cdn/chunks/chunk.H4THPLKV.js +0 -375
  1108. package/cdn/chunks/chunk.H6DYN62P.js +0 -19
  1109. package/cdn/chunks/chunk.H7ILJBVJ.js +0 -29
  1110. package/cdn/chunks/chunk.HA24JYMN.js +0 -34
  1111. package/cdn/chunks/chunk.HBVD5YDA.js +0 -19
  1112. package/cdn/chunks/chunk.HDOVTS2Z.js +0 -333
  1113. package/cdn/chunks/chunk.HE3V76OH.js +0 -29
  1114. package/cdn/chunks/chunk.HSQJHXWN.js +0 -19
  1115. package/cdn/chunks/chunk.HWXTC2NL.js +0 -475
  1116. package/cdn/chunks/chunk.I3ZCGZPC.js +0 -629
  1117. package/cdn/chunks/chunk.IDRFRYGU.js +0 -19
  1118. package/cdn/chunks/chunk.IPAGICZN.js +0 -38
  1119. package/cdn/chunks/chunk.IUV6CTRY.js +0 -231
  1120. package/cdn/chunks/chunk.IW2V63Q4.js +0 -278
  1121. package/cdn/chunks/chunk.J2QE6B7T.js +0 -158
  1122. package/cdn/chunks/chunk.J5WVGYHM.js +0 -1071
  1123. package/cdn/chunks/chunk.JGXF7ZXQ.js +0 -32
  1124. package/cdn/chunks/chunk.JTDMKEVX.js +0 -19
  1125. package/cdn/chunks/chunk.JU2BT7V3.js +0 -29
  1126. package/cdn/chunks/chunk.JUAS37EG.js +0 -47
  1127. package/cdn/chunks/chunk.KCLVMBYX.js +0 -19
  1128. package/cdn/chunks/chunk.KLVTN4RA.js +0 -1780
  1129. package/cdn/chunks/chunk.KNOXZXLV.js +0 -62
  1130. package/cdn/chunks/chunk.KNWDEVCZ.js +0 -872
  1131. package/cdn/chunks/chunk.KTH7B5P7.js +0 -32
  1132. package/cdn/chunks/chunk.KVXAUKHU.js +0 -29
  1133. package/cdn/chunks/chunk.L453DWOS.js +0 -162
  1134. package/cdn/chunks/chunk.L4APEYLE.js +0 -33
  1135. package/cdn/chunks/chunk.L6RUQB6F.js +0 -113
  1136. package/cdn/chunks/chunk.LEJPCXRH.js +0 -575
  1137. package/cdn/chunks/chunk.LGHXPOGX.js +0 -19
  1138. package/cdn/chunks/chunk.LMFFT6QZ.js +0 -19
  1139. package/cdn/chunks/chunk.LV52UGIG.js +0 -19
  1140. package/cdn/chunks/chunk.LYTJDP4F.js +0 -528
  1141. package/cdn/chunks/chunk.M6TNRFZO.js +0 -32
  1142. package/cdn/chunks/chunk.MB55MNWI.js +0 -132
  1143. package/cdn/chunks/chunk.MDV3HVPR.js +0 -82
  1144. package/cdn/chunks/chunk.MKKKY7LJ.js +0 -17565
  1145. package/cdn/chunks/chunk.ML6OFHI2.js +0 -60
  1146. package/cdn/chunks/chunk.MMMP6IHT.js +0 -36
  1147. package/cdn/chunks/chunk.MR7XEWMN.js +0 -29
  1148. package/cdn/chunks/chunk.N26HWWE7.js +0 -92
  1149. package/cdn/chunks/chunk.N6YZ3GGB.js +0 -19
  1150. package/cdn/chunks/chunk.NKJ73Q6Z.js +0 -101
  1151. package/cdn/chunks/chunk.NOJRNK7A.js +0 -1303
  1152. package/cdn/chunks/chunk.O5KNCAFH.js +0 -29
  1153. package/cdn/chunks/chunk.OHLWFMUZ.js +0 -19
  1154. package/cdn/chunks/chunk.OK2PJLA4.js +0 -19
  1155. package/cdn/chunks/chunk.OMERHZ7O.js +0 -1646
  1156. package/cdn/chunks/chunk.OQR3DOIL.js +0 -29
  1157. package/cdn/chunks/chunk.OVV6CMBK.js +0 -74
  1158. package/cdn/chunks/chunk.OXFYKL76.js +0 -19
  1159. package/cdn/chunks/chunk.P5MFJJGP.js +0 -195
  1160. package/cdn/chunks/chunk.P6OHZPUZ.js +0 -2786
  1161. package/cdn/chunks/chunk.PH3LKMHS.js +0 -32
  1162. package/cdn/chunks/chunk.PIEU7GT4.js +0 -29
  1163. package/cdn/chunks/chunk.PILGSWUJ.js +0 -29
  1164. package/cdn/chunks/chunk.PLI3TNYY.js +0 -33
  1165. package/cdn/chunks/chunk.PPCOW47J.js +0 -535
  1166. package/cdn/chunks/chunk.PRI7AVJX.js +0 -19
  1167. package/cdn/chunks/chunk.PWPIV2JK.js +0 -225
  1168. package/cdn/chunks/chunk.QCEPDQ6M.js +0 -32
  1169. package/cdn/chunks/chunk.QJUVJPT6.js +0 -19
  1170. package/cdn/chunks/chunk.QP2APML5.js +0 -536
  1171. package/cdn/chunks/chunk.QS7RKQGD.js +0 -19
  1172. package/cdn/chunks/chunk.QZCCAT7W.js +0 -19
  1173. package/cdn/chunks/chunk.QZIIYAVZ.js +0 -19
  1174. package/cdn/chunks/chunk.QZQ7MTL4.js +0 -34
  1175. package/cdn/chunks/chunk.RBBPG6SO.js +0 -621
  1176. package/cdn/chunks/chunk.RL57R2DM.js +0 -37
  1177. package/cdn/chunks/chunk.RMUH4JXF.js +0 -35
  1178. package/cdn/chunks/chunk.RSH7CL7U.js +0 -310
  1179. package/cdn/chunks/chunk.RXXY2DKG.js +0 -19
  1180. package/cdn/chunks/chunk.S5BNWB7B.js +0 -185
  1181. package/cdn/chunks/chunk.SDVBNJQZ.js +0 -19
  1182. package/cdn/chunks/chunk.SIK75J6S.js +0 -35
  1183. package/cdn/chunks/chunk.SJEEWCBY.js +0 -19
  1184. package/cdn/chunks/chunk.SQWR5Y2X.js +0 -134
  1185. package/cdn/chunks/chunk.SWNYIRFX.js +0 -19
  1186. package/cdn/chunks/chunk.SZJZTSTJ.js +0 -36
  1187. package/cdn/chunks/chunk.T35HK4YD.js +0 -83
  1188. package/cdn/chunks/chunk.T4QHXOJU.js +0 -29
  1189. package/cdn/chunks/chunk.T7A4P7JA.js +0 -19
  1190. package/cdn/chunks/chunk.TA7CFXHM.js +0 -276
  1191. package/cdn/chunks/chunk.TBL6KAUU.js +0 -19
  1192. package/cdn/chunks/chunk.TDCXTEE4.js +0 -29
  1193. package/cdn/chunks/chunk.TFX7LPOA.js +0 -29
  1194. package/cdn/chunks/chunk.TTKS7OPN.js +0 -49
  1195. package/cdn/chunks/chunk.TW72W3FG.js +0 -41
  1196. package/cdn/chunks/chunk.TZ7K6LRZ.js +0 -29
  1197. package/cdn/chunks/chunk.U64UG2NF.js +0 -897
  1198. package/cdn/chunks/chunk.UCGET3OV.js +0 -610
  1199. package/cdn/chunks/chunk.UFODDLBF.js +0 -190
  1200. package/cdn/chunks/chunk.UI7I6F4E.js +0 -29
  1201. package/cdn/chunks/chunk.UL6GPUWY.js +0 -169
  1202. package/cdn/chunks/chunk.UNE5PGU3.js +0 -149
  1203. package/cdn/chunks/chunk.USSOPHIF.js +0 -161
  1204. package/cdn/chunks/chunk.UVQGTCUS.js +0 -621
  1205. package/cdn/chunks/chunk.VAS4SJTV.js +0 -893
  1206. package/cdn/chunks/chunk.VATEZWZS.js +0 -360
  1207. package/cdn/chunks/chunk.VCKHZSH2.js +0 -19
  1208. package/cdn/chunks/chunk.VHHZPEYC.js +0 -29
  1209. package/cdn/chunks/chunk.VM6WPB7T.js +0 -32
  1210. package/cdn/chunks/chunk.VNCKECHZ.js +0 -853
  1211. package/cdn/chunks/chunk.VPMAHEJA.js +0 -32
  1212. package/cdn/chunks/chunk.VQF367DL.js +0 -35
  1213. package/cdn/chunks/chunk.VUXL5UGT.js +0 -2574
  1214. package/cdn/chunks/chunk.W5FQPPPY.js +0 -19
  1215. package/cdn/chunks/chunk.WCBO7P6T.js +0 -34
  1216. package/cdn/chunks/chunk.WO24QJYS.js +0 -1005
  1217. package/cdn/chunks/chunk.WSRDV4NV.js +0 -19
  1218. package/cdn/chunks/chunk.WTGU6E45.js +0 -224
  1219. package/cdn/chunks/chunk.XDVFVONG.js +0 -1945
  1220. package/cdn/chunks/chunk.XNJGPB57.js +0 -35
  1221. package/cdn/chunks/chunk.XXLSM7RI.js +0 -138
  1222. package/cdn/chunks/chunk.Y6OCTUUR.js +0 -19
  1223. package/cdn/chunks/chunk.YAWLOXFX.js +0 -271
  1224. package/cdn/chunks/chunk.YJHDQGK3.js +0 -19
  1225. package/cdn/chunks/chunk.YN7XE2VP.js +0 -940
  1226. package/cdn/chunks/chunk.YTKNBCBF.js +0 -19
  1227. package/cdn/chunks/chunk.Z3PZC46D.js +0 -33
  1228. package/cdn/chunks/chunk.Z5U6BAQK.js +0 -292
  1229. package/cdn/chunks/chunk.ZAS2SUGL.js +0 -19
  1230. package/cdn/chunks/chunk.ZI2LY2UP.js +0 -524
  1231. package/cdn/chunks/chunk.ZRSUDLUY.js +0 -754
  1232. package/cdn/chunks/chunk.ZWUG6EZN.js +0 -544
  1233. package/cdn/chunks/chunk.ZYF3AML6.js +0 -521
  1234. package/cdn/chunks/chunk.ZYGBGEUR.js +0 -48
  1235. package/cdn/chunks/chunk.ZYYDEEKW.js +0 -19
  1236. package/cdn/chunks/lerc.OJS5YQI3.js +0 -2099
  1237. package/cdn/events/terra-map-change.d.ts +0 -14
  1238. package/dist/auth/auth.controller.d.ts +0 -16
  1239. package/dist/chunks/chunk.24QTPUF2.js +0 -6
  1240. package/dist/chunks/chunk.2A67CXHH.js +0 -5
  1241. package/dist/chunks/chunk.2PQNGBP2.js +0 -1
  1242. package/dist/chunks/chunk.2SYEDAOV.js +0 -1
  1243. package/dist/chunks/chunk.2UREYJJ6.js +0 -65
  1244. package/dist/chunks/chunk.2URJIUFD.js +0 -1
  1245. package/dist/chunks/chunk.2VLYWQGB.js +0 -1
  1246. package/dist/chunks/chunk.2XENK37L.js +0 -20
  1247. package/dist/chunks/chunk.33ZH43TV.js +0 -1
  1248. package/dist/chunks/chunk.345UCNEF.js +0 -1
  1249. package/dist/chunks/chunk.347H65MH.js +0 -1
  1250. package/dist/chunks/chunk.3BGJ2Y4W.js +0 -1
  1251. package/dist/chunks/chunk.3OSNYXIB.js +0 -37
  1252. package/dist/chunks/chunk.3SBCV5YV.js +0 -74
  1253. package/dist/chunks/chunk.4AODHTLA.js +0 -1
  1254. package/dist/chunks/chunk.4JUNRLEC.js +0 -1
  1255. package/dist/chunks/chunk.4O6EGUET.js +0 -6
  1256. package/dist/chunks/chunk.4PNNISNN.js +0 -12
  1257. package/dist/chunks/chunk.4PXK26WC.js +0 -1
  1258. package/dist/chunks/chunk.4RJ73FTA.js +0 -1
  1259. package/dist/chunks/chunk.5DG6GZR2.js +0 -1
  1260. package/dist/chunks/chunk.5OFG6SIJ.js +0 -1
  1261. package/dist/chunks/chunk.5UIZ5N7P.js +0 -345
  1262. package/dist/chunks/chunk.5WH5YKQV.js +0 -129
  1263. package/dist/chunks/chunk.5WXBL2P4.js +0 -299
  1264. package/dist/chunks/chunk.5YTPWERZ.js +0 -1
  1265. package/dist/chunks/chunk.67VTCJF4.js +0 -527
  1266. package/dist/chunks/chunk.6DD3MA2P.js +0 -1
  1267. package/dist/chunks/chunk.6J72MJEC.js +0 -1
  1268. package/dist/chunks/chunk.6OCFGLDL.js +0 -1
  1269. package/dist/chunks/chunk.6Q54KXMC.js +0 -157
  1270. package/dist/chunks/chunk.6R6NM245.js +0 -39
  1271. package/dist/chunks/chunk.6SHAP35V.js +0 -55
  1272. package/dist/chunks/chunk.6SW4NJHL.js +0 -42
  1273. package/dist/chunks/chunk.6TALLYX6.js +0 -1
  1274. package/dist/chunks/chunk.6ZIINXUV.js +0 -1
  1275. package/dist/chunks/chunk.7D3QWHPQ.js +0 -1
  1276. package/dist/chunks/chunk.7DGA6X4U.js +0 -23
  1277. package/dist/chunks/chunk.7KZSDLA2.js +0 -11
  1278. package/dist/chunks/chunk.7LR6X6Z6.js +0 -1
  1279. package/dist/chunks/chunk.7TW5XUJL.js +0 -1
  1280. package/dist/chunks/chunk.7V4HIKGV.js +0 -20
  1281. package/dist/chunks/chunk.A3VSFB3O.js +0 -1
  1282. package/dist/chunks/chunk.ADGVYX3D.js +0 -1
  1283. package/dist/chunks/chunk.ALYHNSZZ.js +0 -30
  1284. package/dist/chunks/chunk.AMKSX4J2.js +0 -1
  1285. package/dist/chunks/chunk.AVBBSQQN.js +0 -26
  1286. package/dist/chunks/chunk.BCBEL5J3.js +0 -1
  1287. package/dist/chunks/chunk.BFSQRKZP.js +0 -67
  1288. package/dist/chunks/chunk.BIMQKSIE.js +0 -1
  1289. package/dist/chunks/chunk.BJFYPKRH.js +0 -1
  1290. package/dist/chunks/chunk.BK22YUL3.js +0 -1
  1291. package/dist/chunks/chunk.BMUYWCSS.js +0 -1
  1292. package/dist/chunks/chunk.BRHNY634.js +0 -1
  1293. package/dist/chunks/chunk.BVNNUSMK.js +0 -1
  1294. package/dist/chunks/chunk.C6CZYR3X.js +0 -1
  1295. package/dist/chunks/chunk.C6YOBRFC.js +0 -1
  1296. package/dist/chunks/chunk.CO3YFDGB.js +0 -27
  1297. package/dist/chunks/chunk.CQK6QHLB.js +0 -1
  1298. package/dist/chunks/chunk.CQPFMW2K.js +0 -1
  1299. package/dist/chunks/chunk.CRDPEWYE.js +0 -1
  1300. package/dist/chunks/chunk.CS4EGLGP.js +0 -1
  1301. package/dist/chunks/chunk.CSXC6DPV.js +0 -280
  1302. package/dist/chunks/chunk.DH6S4SMY.js +0 -9
  1303. package/dist/chunks/chunk.DKS4TU3H.js +0 -1
  1304. package/dist/chunks/chunk.DTISX46U.js +0 -1
  1305. package/dist/chunks/chunk.DWB7WY2B.js +0 -1
  1306. package/dist/chunks/chunk.DYY5ZEGD.js +0 -8
  1307. package/dist/chunks/chunk.E264AGUB.js +0 -1
  1308. package/dist/chunks/chunk.E2LODYPF.js +0 -1
  1309. package/dist/chunks/chunk.E36ROOQP.js +0 -1
  1310. package/dist/chunks/chunk.E6SYKRYA.js +0 -18
  1311. package/dist/chunks/chunk.E7D32WNL.js +0 -99
  1312. package/dist/chunks/chunk.EAIG3OAM.js +0 -1
  1313. package/dist/chunks/chunk.EPJM7OIN.js +0 -1
  1314. package/dist/chunks/chunk.EYLQFCG6.js +0 -1
  1315. package/dist/chunks/chunk.F2LSSWTW.js +0 -1
  1316. package/dist/chunks/chunk.F2OOGC7E.js +0 -1
  1317. package/dist/chunks/chunk.F463ZO54.js +0 -26
  1318. package/dist/chunks/chunk.F4QJ3AAN.js +0 -1
  1319. package/dist/chunks/chunk.FCLASTZJ.js +0 -59
  1320. package/dist/chunks/chunk.FEUU6PRO.js +0 -1231
  1321. package/dist/chunks/chunk.FFJ4LVA4.js +0 -1
  1322. package/dist/chunks/chunk.FLY7SZ43.js +0 -1
  1323. package/dist/chunks/chunk.FTSUICBL.js +0 -5
  1324. package/dist/chunks/chunk.FU4VAT7K.js +0 -126
  1325. package/dist/chunks/chunk.FY5MRGO2.js +0 -4
  1326. package/dist/chunks/chunk.G2RBM77C.js +0 -80
  1327. package/dist/chunks/chunk.G5WS7EAO.js +0 -1
  1328. package/dist/chunks/chunk.GCVZMOL6.js +0 -1
  1329. package/dist/chunks/chunk.GFJZ3U6O.js +0 -1
  1330. package/dist/chunks/chunk.GVQ3ULCA.js +0 -1
  1331. package/dist/chunks/chunk.GVWKFBDB.js +0 -1
  1332. package/dist/chunks/chunk.GZC4MHZL.js +0 -1
  1333. package/dist/chunks/chunk.GZJI67IH.js +0 -1
  1334. package/dist/chunks/chunk.HBM2PGPH.js +0 -1
  1335. package/dist/chunks/chunk.HFNSDYFF.js +0 -1
  1336. package/dist/chunks/chunk.HJ7H55BL.js +0 -1
  1337. package/dist/chunks/chunk.HMGPFX2Y.js +0 -1
  1338. package/dist/chunks/chunk.IGXIZYGS.js +0 -1
  1339. package/dist/chunks/chunk.IKZERRE2.js +0 -1
  1340. package/dist/chunks/chunk.IL752DKI.js +0 -1
  1341. package/dist/chunks/chunk.ILG3LGC7.js +0 -1
  1342. package/dist/chunks/chunk.ILLKI5UT.js +0 -1
  1343. package/dist/chunks/chunk.IT5GSXLK.js +0 -1
  1344. package/dist/chunks/chunk.IX7TDXLM.js +0 -1
  1345. package/dist/chunks/chunk.J74HQDC4.js +0 -113
  1346. package/dist/chunks/chunk.JDUDVTGM.js +0 -33
  1347. package/dist/chunks/chunk.JER3EYSI.js +0 -43
  1348. package/dist/chunks/chunk.JFQVCD2G.js +0 -1
  1349. package/dist/chunks/chunk.JJDVDIMZ.js +0 -1
  1350. package/dist/chunks/chunk.JUCYMLNQ.js +0 -24
  1351. package/dist/chunks/chunk.JWV3256S.js +0 -1
  1352. package/dist/chunks/chunk.K3JWAUPW.js +0 -1
  1353. package/dist/chunks/chunk.K7EEMK7S.js +0 -1
  1354. package/dist/chunks/chunk.KQQP67QH.js +0 -1
  1355. package/dist/chunks/chunk.L7LZXSLB.js +0 -1
  1356. package/dist/chunks/chunk.L7TU4EE7.js +0 -1
  1357. package/dist/chunks/chunk.LBQFMWHH.js +0 -1
  1358. package/dist/chunks/chunk.LHS2JI5C.js +0 -1
  1359. package/dist/chunks/chunk.LRB2T4C6.js +0 -1
  1360. package/dist/chunks/chunk.LSBA65NF.js +0 -55
  1361. package/dist/chunks/chunk.LVJYASQH.js +0 -41
  1362. package/dist/chunks/chunk.M5IM24X6.js +0 -1
  1363. package/dist/chunks/chunk.M7GAVBP4.js +0 -1
  1364. package/dist/chunks/chunk.MRAFQ6FC.js +0 -1
  1365. package/dist/chunks/chunk.MSEAPM5O.js +0 -43
  1366. package/dist/chunks/chunk.MXJCFEZ4.js +0 -780
  1367. package/dist/chunks/chunk.NFGRTKHK.js +0 -35
  1368. package/dist/chunks/chunk.NM6S6YGL.js +0 -30
  1369. package/dist/chunks/chunk.NNGAFMYS.js +0 -1
  1370. package/dist/chunks/chunk.NS34WRBV.js +0 -154
  1371. package/dist/chunks/chunk.NZ4QJK47.js +0 -176
  1372. package/dist/chunks/chunk.NZERF5GE.js +0 -1
  1373. package/dist/chunks/chunk.O36CSOQK.js +0 -11
  1374. package/dist/chunks/chunk.OAFIM27Q.js +0 -1
  1375. package/dist/chunks/chunk.OBJ27374.js +0 -1
  1376. package/dist/chunks/chunk.ONZTNAIQ.js +0 -1
  1377. package/dist/chunks/chunk.OQ4IT42W.js +0 -1
  1378. package/dist/chunks/chunk.OSAQ45F4.js +0 -145
  1379. package/dist/chunks/chunk.OSDEVN34.js +0 -1001
  1380. package/dist/chunks/chunk.P23PNMO2.js +0 -1
  1381. package/dist/chunks/chunk.PGC2LCDL.js +0 -1
  1382. package/dist/chunks/chunk.PGUHY4NZ.js +0 -1
  1383. package/dist/chunks/chunk.PHWB36E5.js +0 -4
  1384. package/dist/chunks/chunk.PIP3HL2S.js +0 -1
  1385. package/dist/chunks/chunk.PM3RUTRJ.js +0 -1
  1386. package/dist/chunks/chunk.PNRCW5GH.js +0 -48
  1387. package/dist/chunks/chunk.PO5EHL4Q.js +0 -1
  1388. package/dist/chunks/chunk.PSNV3IQZ.js +0 -1
  1389. package/dist/chunks/chunk.Q6CVPPFA.js +0 -1
  1390. package/dist/chunks/chunk.QDFHF7LY.js +0 -1
  1391. package/dist/chunks/chunk.QEKPRA6B.js +0 -1
  1392. package/dist/chunks/chunk.QGXUQL5S.js +0 -1
  1393. package/dist/chunks/chunk.QGZOQXT5.js +0 -148
  1394. package/dist/chunks/chunk.QH3KZBRJ.js +0 -1
  1395. package/dist/chunks/chunk.QK5M4OHI.js +0 -1
  1396. package/dist/chunks/chunk.R6RTP7QP.js +0 -1
  1397. package/dist/chunks/chunk.RBPNA4JU.js +0 -22
  1398. package/dist/chunks/chunk.REIUDVA3.js +0 -1
  1399. package/dist/chunks/chunk.RH76C7M7.js +0 -1
  1400. package/dist/chunks/chunk.RHDTWIMS.js +0 -1
  1401. package/dist/chunks/chunk.RKLTK3FR.js +0 -1
  1402. package/dist/chunks/chunk.RLOQMCKP.js +0 -1
  1403. package/dist/chunks/chunk.S65R5GMI.js +0 -1
  1404. package/dist/chunks/chunk.S6AD3O5Y.js +0 -2
  1405. package/dist/chunks/chunk.S6UNY7TY.js +0 -1
  1406. package/dist/chunks/chunk.SAVXAZC3.js +0 -1
  1407. package/dist/chunks/chunk.SDFUXOW6.js +0 -47
  1408. package/dist/chunks/chunk.SM2LJQQZ.js +0 -1
  1409. package/dist/chunks/chunk.SN4M25TW.js +0 -1
  1410. package/dist/chunks/chunk.SP4US3KC.js +0 -1
  1411. package/dist/chunks/chunk.SP7J3EGR.js +0 -1
  1412. package/dist/chunks/chunk.ST6Y273B.js +0 -1
  1413. package/dist/chunks/chunk.SW4EXLIK.js +0 -100
  1414. package/dist/chunks/chunk.SYA4MGC4.js +0 -1
  1415. package/dist/chunks/chunk.T3RRBLSI.js +0 -1
  1416. package/dist/chunks/chunk.T5MMUQEM.js +0 -2
  1417. package/dist/chunks/chunk.T5UOTK5T.js +0 -14
  1418. package/dist/chunks/chunk.TCJYR6XR.js +0 -75
  1419. package/dist/chunks/chunk.TEJABDMI.js +0 -1
  1420. package/dist/chunks/chunk.TOUSLOQP.js +0 -19
  1421. package/dist/chunks/chunk.TWL4OKWI.js +0 -1
  1422. package/dist/chunks/chunk.TXJOFCEB.js +0 -20
  1423. package/dist/chunks/chunk.U5DWDLRH.js +0 -25
  1424. package/dist/chunks/chunk.UBXADY37.js +0 -566
  1425. package/dist/chunks/chunk.UJUBD5K6.js +0 -1
  1426. package/dist/chunks/chunk.UMIX7BEK.js +0 -1
  1427. package/dist/chunks/chunk.UNPFONVM.js +0 -121
  1428. package/dist/chunks/chunk.VM42BF4S.js +0 -1
  1429. package/dist/chunks/chunk.VO2NGMYX.js +0 -1
  1430. package/dist/chunks/chunk.VPEIRF5L.js +0 -1
  1431. package/dist/chunks/chunk.VQBTIXTR.js +0 -1
  1432. package/dist/chunks/chunk.VRGYQH3V.js +0 -1
  1433. package/dist/chunks/chunk.W22Z5NC6.js +0 -1
  1434. package/dist/chunks/chunk.W2AIXOEB.js +0 -1
  1435. package/dist/chunks/chunk.W37YFNFN.js +0 -1
  1436. package/dist/chunks/chunk.W7LK5SL4.js +0 -1
  1437. package/dist/chunks/chunk.WHM6GYCJ.js +0 -1
  1438. package/dist/chunks/chunk.WSK5WSL4.js +0 -1
  1439. package/dist/chunks/chunk.X3J4I27U.js +0 -1
  1440. package/dist/chunks/chunk.XD4664TI.js +0 -16
  1441. package/dist/chunks/chunk.XIGVC4SV.js +0 -62
  1442. package/dist/chunks/chunk.XS3KPVEZ.js +0 -1
  1443. package/dist/chunks/chunk.XX7TMK7N.js +0 -1
  1444. package/dist/chunks/chunk.Y5DJ2TIT.js +0 -1
  1445. package/dist/chunks/chunk.YH36XKHI.js +0 -1
  1446. package/dist/chunks/chunk.YJCP5H5H.js +0 -1
  1447. package/dist/chunks/chunk.YUFCED44.js +0 -64
  1448. package/dist/chunks/chunk.Z5WR5G6V.js +0 -35
  1449. package/dist/chunks/chunk.ZAO2ZNCW.js +0 -1
  1450. package/dist/chunks/chunk.ZCO5H22U.js +0 -1
  1451. package/dist/chunks/chunk.ZJRSMGBD.js +0 -1
  1452. package/dist/chunks/chunk.ZOFZPC6S.js +0 -9
  1453. package/dist/chunks/chunk.ZWQ5GUBX.js +0 -55
  1454. package/dist/chunks/chunk.ZZDDQ567.js +0 -1
  1455. package/dist/events/terra-map-change.d.ts +0 -14
  1456. package/dist/terra_ui_components-0.0.203-py3-none-any.whl +0 -0
  1457. package/dist/terra_ui_components-0.0.203.tar.gz +0 -0
@@ -0,0 +1,4089 @@
1
+ import {
2
+ create as create2,
3
+ fromTransform
4
+ } from "./chunk.UD3TU5V6.js";
5
+ import {
6
+ BooleanType,
7
+ CallExpression,
8
+ ColorType,
9
+ NumberArrayType,
10
+ NumberType,
11
+ Ops,
12
+ SizeType,
13
+ StringType,
14
+ isType,
15
+ newParsingContext,
16
+ parse,
17
+ typeName
18
+ } from "./chunk.K6JQEUEF.js";
19
+ import {
20
+ BaseTile_default,
21
+ ImageTile_default,
22
+ LRUCache_default,
23
+ Tile_default
24
+ } from "./chunk.TMPSEY4M.js";
25
+ import {
26
+ DataTile_default,
27
+ TileRange_default,
28
+ TileState_default,
29
+ asArrayLike,
30
+ asImageLike,
31
+ createOrUpdate2 as createOrUpdate,
32
+ getKey
33
+ } from "./chunk.CSF2PMFW.js";
34
+ import {
35
+ EventType_default as EventType_default2,
36
+ Event_default,
37
+ Layer_default,
38
+ Property_default
39
+ } from "./chunk.6KW23GBD.js";
40
+ import {
41
+ asArray
42
+ } from "./chunk.OSNWOWQ2.js";
43
+ import {
44
+ apply,
45
+ assert,
46
+ compose,
47
+ create,
48
+ reset,
49
+ rotate,
50
+ scale,
51
+ toSize,
52
+ translate
53
+ } from "./chunk.WMGJ3MAP.js";
54
+ import {
55
+ Disposable_default,
56
+ EventType_default,
57
+ SAFARI_BUG_237906,
58
+ Target_default,
59
+ abstract,
60
+ createCanvasContext2D,
61
+ descending,
62
+ getUid
63
+ } from "./chunk.2B2TSVNY.js";
64
+ import {
65
+ boundingExtent,
66
+ containsCoordinate,
67
+ equivalent,
68
+ fromUserExtent,
69
+ getIntersection,
70
+ getRotatedViewport,
71
+ isEmpty
72
+ } from "./chunk.S5UFNVHZ.js";
73
+ import {
74
+ clear
75
+ } from "./chunk.KRVDOVGU.js";
76
+ import {
77
+ __spreadProps,
78
+ __spreadValues,
79
+ init_buffer,
80
+ init_dirname,
81
+ init_process
82
+ } from "./chunk.IIJBAEGD.js";
83
+
84
+ // src/components/map/layers/geotiff.layer.ts
85
+ init_dirname();
86
+ init_buffer();
87
+ init_process();
88
+
89
+ // node_modules/ol/layer/WebGLTile.js
90
+ init_dirname();
91
+ init_buffer();
92
+ init_process();
93
+
94
+ // node_modules/ol/expr/gpu.js
95
+ init_dirname();
96
+ init_buffer();
97
+ init_process();
98
+
99
+ // node_modules/ol/renderer/webgl/TileLayer.js
100
+ init_dirname();
101
+ init_buffer();
102
+ init_process();
103
+
104
+ // node_modules/ol/webgl.js
105
+ init_dirname();
106
+ init_buffer();
107
+ init_process();
108
+ var ARRAY_BUFFER = 34962;
109
+ var ELEMENT_ARRAY_BUFFER = 34963;
110
+ var STREAM_DRAW = 35040;
111
+ var STATIC_DRAW = 35044;
112
+ var DYNAMIC_DRAW = 35048;
113
+ var UNSIGNED_BYTE = 5121;
114
+ var UNSIGNED_SHORT = 5123;
115
+ var UNSIGNED_INT = 5125;
116
+ var FLOAT = 5126;
117
+ var CONTEXT_IDS = ["experimental-webgl", "webgl", "webkit-3d", "moz-webgl"];
118
+ function getContext(canvas, attributes) {
119
+ attributes = Object.assign(
120
+ {
121
+ preserveDrawingBuffer: true,
122
+ antialias: SAFARI_BUG_237906 ? false : true
123
+ // https://bugs.webkit.org/show_bug.cgi?id=237906
124
+ },
125
+ attributes
126
+ );
127
+ const ii = CONTEXT_IDS.length;
128
+ for (let i = 0; i < ii; ++i) {
129
+ try {
130
+ const context = canvas.getContext(CONTEXT_IDS[i], attributes);
131
+ if (context) {
132
+ return (
133
+ /** @type {!WebGLRenderingContext} */
134
+ context
135
+ );
136
+ }
137
+ } catch (e) {
138
+ }
139
+ }
140
+ return null;
141
+ }
142
+
143
+ // node_modules/ol/webgl/Buffer.js
144
+ init_dirname();
145
+ init_buffer();
146
+ init_process();
147
+ var BufferUsage = {
148
+ STATIC_DRAW,
149
+ STREAM_DRAW,
150
+ DYNAMIC_DRAW
151
+ };
152
+ var WebGLArrayBuffer = class {
153
+ /**
154
+ * @param {number} type Buffer type, either ARRAY_BUFFER or ELEMENT_ARRAY_BUFFER.
155
+ * @param {number} [usage] Intended usage, either `STATIC_DRAW`, `STREAM_DRAW` or `DYNAMIC_DRAW`.
156
+ * Default is `STATIC_DRAW`.
157
+ */
158
+ constructor(type, usage) {
159
+ this.array_ = null;
160
+ this.type_ = type;
161
+ assert(
162
+ type === ARRAY_BUFFER || type === ELEMENT_ARRAY_BUFFER,
163
+ "A `WebGLArrayBuffer` must either be of type `ELEMENT_ARRAY_BUFFER` or `ARRAY_BUFFER`"
164
+ );
165
+ this.usage_ = usage !== void 0 ? usage : BufferUsage.STATIC_DRAW;
166
+ }
167
+ /**
168
+ * Populates the buffer with an array of the given size (all values will be zeroes).
169
+ * @param {number} size Array size
170
+ * @return {WebGLArrayBuffer} This
171
+ */
172
+ ofSize(size) {
173
+ this.array_ = new (getArrayClassForType(this.type_))(size);
174
+ return this;
175
+ }
176
+ /**
177
+ * Populates the buffer with an array of the given size.
178
+ * @param {Array<number>} array Numerical array
179
+ * @return {WebGLArrayBuffer} This
180
+ */
181
+ fromArray(array) {
182
+ this.array_ = getArrayClassForType(this.type_).from(array);
183
+ return this;
184
+ }
185
+ /**
186
+ * Populates the buffer with a raw binary array buffer.
187
+ * @param {ArrayBuffer} buffer Raw binary buffer to populate the array with. Note that this buffer must have been
188
+ * initialized for the same typed array class.
189
+ * @return {WebGLArrayBuffer} This
190
+ */
191
+ fromArrayBuffer(buffer) {
192
+ this.array_ = new (getArrayClassForType(this.type_))(buffer);
193
+ return this;
194
+ }
195
+ /**
196
+ * @return {number} Buffer type.
197
+ */
198
+ getType() {
199
+ return this.type_;
200
+ }
201
+ /**
202
+ * Will return null if the buffer was not initialized
203
+ * @return {Float32Array|Uint32Array|null} Array.
204
+ */
205
+ getArray() {
206
+ return this.array_;
207
+ }
208
+ /**
209
+ * @param {Float32Array|Uint32Array} array Array.
210
+ */
211
+ setArray(array) {
212
+ const ArrayType = getArrayClassForType(this.type_);
213
+ if (!(array instanceof ArrayType)) {
214
+ throw new Error(`Expected ${ArrayType}`);
215
+ }
216
+ this.array_ = array;
217
+ }
218
+ /**
219
+ * @return {number} Usage.
220
+ */
221
+ getUsage() {
222
+ return this.usage_;
223
+ }
224
+ /**
225
+ * Will return 0 if the buffer is not initialized
226
+ * @return {number} Array size
227
+ */
228
+ getSize() {
229
+ return this.array_ ? this.array_.length : 0;
230
+ }
231
+ };
232
+ function getArrayClassForType(type) {
233
+ switch (type) {
234
+ case ARRAY_BUFFER:
235
+ return Float32Array;
236
+ case ELEMENT_ARRAY_BUFFER:
237
+ return Uint32Array;
238
+ default:
239
+ return Float32Array;
240
+ }
241
+ }
242
+ var Buffer_default = WebGLArrayBuffer;
243
+
244
+ // node_modules/ol/webgl/Helper.js
245
+ init_dirname();
246
+ init_buffer();
247
+ init_process();
248
+
249
+ // node_modules/ol/webgl/ContextEventType.js
250
+ init_dirname();
251
+ init_buffer();
252
+ init_process();
253
+ var ContextEventType_default = {
254
+ LOST: "webglcontextlost",
255
+ RESTORED: "webglcontextrestored"
256
+ };
257
+
258
+ // node_modules/ol/webgl/PostProcessingPass.js
259
+ init_dirname();
260
+ init_buffer();
261
+ init_process();
262
+ var DEFAULT_VERTEX_SHADER = `
263
+ precision mediump float;
264
+
265
+ attribute vec2 a_position;
266
+ varying vec2 v_texCoord;
267
+ varying vec2 v_screenCoord;
268
+
269
+ uniform vec2 u_screenSize;
270
+
271
+ void main() {
272
+ v_texCoord = a_position * 0.5 + 0.5;
273
+ v_screenCoord = v_texCoord * u_screenSize;
274
+ gl_Position = vec4(a_position, 0.0, 1.0);
275
+ }
276
+ `;
277
+ var DEFAULT_FRAGMENT_SHADER = `
278
+ precision mediump float;
279
+
280
+ uniform sampler2D u_image;
281
+ uniform float u_opacity;
282
+
283
+ varying vec2 v_texCoord;
284
+
285
+ void main() {
286
+ gl_FragColor = texture2D(u_image, v_texCoord) * u_opacity;
287
+ }
288
+ `;
289
+ var WebGLPostProcessingPass = class {
290
+ /**
291
+ * @param {Options} options Options.
292
+ */
293
+ constructor(options) {
294
+ this.gl_ = options.webGlContext;
295
+ const gl = this.gl_;
296
+ this.scaleRatio_ = options.scaleRatio || 1;
297
+ this.renderTargetTexture_ = gl.createTexture();
298
+ this.renderTargetTextureSize_ = null;
299
+ this.frameBuffer_ = gl.createFramebuffer();
300
+ this.depthBuffer_ = gl.createRenderbuffer();
301
+ const vertexShader = (
302
+ /** @type {WebGLShader} */
303
+ gl.createShader(gl.VERTEX_SHADER)
304
+ );
305
+ gl.shaderSource(
306
+ vertexShader,
307
+ options.vertexShader || DEFAULT_VERTEX_SHADER
308
+ );
309
+ gl.compileShader(vertexShader);
310
+ const fragmentShader = (
311
+ /** @type {WebGLShader} */
312
+ gl.createShader(gl.FRAGMENT_SHADER)
313
+ );
314
+ gl.shaderSource(
315
+ fragmentShader,
316
+ options.fragmentShader || DEFAULT_FRAGMENT_SHADER
317
+ );
318
+ gl.compileShader(fragmentShader);
319
+ if (!gl.getShaderParameter(fragmentShader, gl.COMPILE_STATUS)) {
320
+ const message = `Fragment shader compilation failed: ${gl.getShaderInfoLog(
321
+ fragmentShader
322
+ )}`;
323
+ throw new Error(message);
324
+ }
325
+ this.renderTargetProgram_ = /** @type {WebGLProgram} */
326
+ gl.createProgram();
327
+ gl.attachShader(this.renderTargetProgram_, vertexShader);
328
+ gl.attachShader(this.renderTargetProgram_, fragmentShader);
329
+ gl.linkProgram(this.renderTargetProgram_);
330
+ this.renderTargetVerticesBuffer_ = gl.createBuffer();
331
+ const verticesArray = [-1, -1, 1, -1, -1, 1, 1, -1, 1, 1, -1, 1];
332
+ gl.bindBuffer(gl.ARRAY_BUFFER, this.renderTargetVerticesBuffer_);
333
+ gl.bufferData(
334
+ gl.ARRAY_BUFFER,
335
+ new Float32Array(verticesArray),
336
+ gl.STATIC_DRAW
337
+ );
338
+ this.renderTargetAttribLocation_ = gl.getAttribLocation(
339
+ this.renderTargetProgram_,
340
+ "a_position"
341
+ );
342
+ this.renderTargetUniformLocation_ = gl.getUniformLocation(
343
+ this.renderTargetProgram_,
344
+ "u_screenSize"
345
+ );
346
+ this.renderTargetOpacityLocation_ = gl.getUniformLocation(
347
+ this.renderTargetProgram_,
348
+ "u_opacity"
349
+ );
350
+ this.renderTargetTextureLocation_ = gl.getUniformLocation(
351
+ this.renderTargetProgram_,
352
+ "u_image"
353
+ );
354
+ this.uniforms_ = [];
355
+ if (options.uniforms) {
356
+ const uniforms = options.uniforms;
357
+ Object.keys(uniforms).forEach((name) => {
358
+ this.uniforms_.push({
359
+ value: (
360
+ /** @type {import("./Helper.js").UniformValue} */
361
+ uniforms[name]
362
+ ),
363
+ location: gl.getUniformLocation(this.renderTargetProgram_, name)
364
+ });
365
+ });
366
+ }
367
+ }
368
+ getRenderTargetTexture() {
369
+ return this.renderTargetTexture_;
370
+ }
371
+ /**
372
+ * Get the WebGL rendering context
373
+ * @return {WebGLRenderingContext} The rendering context.
374
+ */
375
+ getGL() {
376
+ return this.gl_;
377
+ }
378
+ /**
379
+ * Initialize the render target texture of the post process, make sure it is at the
380
+ * right size and bind it as a render target for the next draw calls.
381
+ * The last step to be initialized will be the one where the primitives are rendered.
382
+ * @param {import("../Map.js").FrameState} frameState current frame state
383
+ */
384
+ init(frameState) {
385
+ const gl = this.getGL();
386
+ const textureSize = [
387
+ gl.drawingBufferWidth * this.scaleRatio_,
388
+ gl.drawingBufferHeight * this.scaleRatio_
389
+ ];
390
+ gl.bindFramebuffer(gl.FRAMEBUFFER, this.getFrameBuffer());
391
+ gl.bindRenderbuffer(gl.RENDERBUFFER, this.getDepthBuffer());
392
+ gl.viewport(0, 0, textureSize[0], textureSize[1]);
393
+ if (!this.renderTargetTextureSize_ || this.renderTargetTextureSize_[0] !== textureSize[0] || this.renderTargetTextureSize_[1] !== textureSize[1]) {
394
+ this.renderTargetTextureSize_ = textureSize;
395
+ const level = 0;
396
+ const internalFormat = gl.RGBA;
397
+ const border = 0;
398
+ const format = gl.RGBA;
399
+ const type = gl.UNSIGNED_BYTE;
400
+ const data = null;
401
+ gl.bindTexture(gl.TEXTURE_2D, this.renderTargetTexture_);
402
+ gl.texImage2D(
403
+ gl.TEXTURE_2D,
404
+ level,
405
+ internalFormat,
406
+ textureSize[0],
407
+ textureSize[1],
408
+ border,
409
+ format,
410
+ type,
411
+ data
412
+ );
413
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);
414
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
415
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
416
+ gl.framebufferTexture2D(
417
+ gl.FRAMEBUFFER,
418
+ gl.COLOR_ATTACHMENT0,
419
+ gl.TEXTURE_2D,
420
+ this.renderTargetTexture_,
421
+ 0
422
+ );
423
+ gl.renderbufferStorage(
424
+ gl.RENDERBUFFER,
425
+ gl.DEPTH_COMPONENT16,
426
+ textureSize[0],
427
+ textureSize[1]
428
+ );
429
+ gl.framebufferRenderbuffer(
430
+ gl.FRAMEBUFFER,
431
+ gl.DEPTH_ATTACHMENT,
432
+ gl.RENDERBUFFER,
433
+ this.depthBuffer_
434
+ );
435
+ }
436
+ }
437
+ /**
438
+ * Render to the next postprocessing pass (or to the canvas if final pass).
439
+ * @param {import("../Map.js").FrameState} frameState current frame state
440
+ * @param {WebGLPostProcessingPass} [nextPass] Next pass, optional
441
+ * @param {function(WebGLRenderingContext, import("../Map.js").FrameState):void} [preCompose] Called before composing.
442
+ * @param {function(WebGLRenderingContext, import("../Map.js").FrameState):void} [postCompose] Called before composing.
443
+ */
444
+ apply(frameState, nextPass, preCompose, postCompose) {
445
+ const gl = this.getGL();
446
+ const size = frameState.size;
447
+ gl.bindFramebuffer(
448
+ gl.FRAMEBUFFER,
449
+ nextPass ? nextPass.getFrameBuffer() : null
450
+ );
451
+ gl.activeTexture(gl.TEXTURE0);
452
+ gl.bindTexture(gl.TEXTURE_2D, this.renderTargetTexture_);
453
+ if (!nextPass) {
454
+ const canvasId = getUid(gl.canvas);
455
+ if (!frameState.renderTargets[canvasId]) {
456
+ const attributes = gl.getContextAttributes();
457
+ if (attributes && attributes.preserveDrawingBuffer) {
458
+ gl.clearColor(0, 0, 0, 0);
459
+ gl.clearDepth(1);
460
+ gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
461
+ }
462
+ frameState.renderTargets[canvasId] = true;
463
+ }
464
+ }
465
+ gl.disable(gl.DEPTH_TEST);
466
+ gl.enable(gl.BLEND);
467
+ gl.blendFunc(gl.ONE, gl.ONE_MINUS_SRC_ALPHA);
468
+ gl.viewport(0, 0, gl.drawingBufferWidth, gl.drawingBufferHeight);
469
+ gl.bindBuffer(gl.ARRAY_BUFFER, this.renderTargetVerticesBuffer_);
470
+ gl.useProgram(this.renderTargetProgram_);
471
+ gl.enableVertexAttribArray(this.renderTargetAttribLocation_);
472
+ gl.vertexAttribPointer(
473
+ this.renderTargetAttribLocation_,
474
+ 2,
475
+ gl.FLOAT,
476
+ false,
477
+ 0,
478
+ 0
479
+ );
480
+ gl.uniform2f(this.renderTargetUniformLocation_, size[0], size[1]);
481
+ gl.uniform1i(this.renderTargetTextureLocation_, 0);
482
+ const opacity = frameState.layerStatesArray[frameState.layerIndex].opacity;
483
+ gl.uniform1f(this.renderTargetOpacityLocation_, opacity);
484
+ this.applyUniforms(frameState);
485
+ if (preCompose) {
486
+ preCompose(gl, frameState);
487
+ }
488
+ gl.drawArrays(gl.TRIANGLES, 0, 6);
489
+ if (postCompose) {
490
+ postCompose(gl, frameState);
491
+ }
492
+ }
493
+ /**
494
+ * @return {WebGLFramebuffer} Frame buffer
495
+ */
496
+ getFrameBuffer() {
497
+ return this.frameBuffer_;
498
+ }
499
+ /**
500
+ * @return {WebGLRenderbuffer} Depth buffer
501
+ */
502
+ getDepthBuffer() {
503
+ return this.depthBuffer_;
504
+ }
505
+ /**
506
+ * Sets the custom uniforms based on what was given in the constructor.
507
+ * @param {import("../Map.js").FrameState} frameState Frame state.
508
+ * @private
509
+ */
510
+ applyUniforms(frameState) {
511
+ const gl = this.getGL();
512
+ let value;
513
+ let textureSlot = 1;
514
+ this.uniforms_.forEach(function(uniform) {
515
+ value = typeof uniform.value === "function" ? uniform.value(frameState) : uniform.value;
516
+ if (value instanceof HTMLCanvasElement || value instanceof ImageData) {
517
+ if (!uniform.texture) {
518
+ uniform.texture = gl.createTexture();
519
+ }
520
+ gl.activeTexture(gl.TEXTURE0 + textureSlot);
521
+ gl.bindTexture(gl.TEXTURE_2D, uniform.texture);
522
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);
523
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
524
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
525
+ if (value instanceof ImageData) {
526
+ gl.texImage2D(
527
+ gl.TEXTURE_2D,
528
+ 0,
529
+ gl.RGBA,
530
+ gl.RGBA,
531
+ value.width,
532
+ value.height,
533
+ 0,
534
+ gl.UNSIGNED_BYTE,
535
+ new Uint8Array(value.data)
536
+ );
537
+ } else {
538
+ gl.texImage2D(
539
+ gl.TEXTURE_2D,
540
+ 0,
541
+ gl.RGBA,
542
+ gl.RGBA,
543
+ gl.UNSIGNED_BYTE,
544
+ value
545
+ );
546
+ }
547
+ gl.uniform1i(uniform.location, textureSlot++);
548
+ } else if (Array.isArray(value)) {
549
+ switch (value.length) {
550
+ case 2:
551
+ gl.uniform2f(uniform.location, value[0], value[1]);
552
+ return;
553
+ case 3:
554
+ gl.uniform3f(uniform.location, value[0], value[1], value[2]);
555
+ return;
556
+ case 4:
557
+ gl.uniform4f(
558
+ uniform.location,
559
+ value[0],
560
+ value[1],
561
+ value[2],
562
+ value[3]
563
+ );
564
+ return;
565
+ case 16:
566
+ gl.uniformMatrix4fv(uniform.location, false, value);
567
+ return;
568
+ default:
569
+ return;
570
+ }
571
+ } else if (typeof value === "number") {
572
+ gl.uniform1f(uniform.location, value);
573
+ }
574
+ });
575
+ }
576
+ };
577
+ var PostProcessingPass_default = WebGLPostProcessingPass;
578
+
579
+ // node_modules/ol/webgl/Helper.js
580
+ var DefaultUniform = {
581
+ PROJECTION_MATRIX: "u_projectionMatrix",
582
+ INVERT_PROJECTION_MATRIX: "u_invertProjectionMatrix",
583
+ TIME: "u_time",
584
+ ZOOM: "u_zoom",
585
+ RESOLUTION: "u_resolution",
586
+ ROTATION: "u_rotation",
587
+ VIEWPORT_SIZE_PX: "u_viewportSizePx",
588
+ PIXEL_RATIO: "u_pixelRatio",
589
+ HIT_DETECTION: "u_hitDetection"
590
+ };
591
+ var AttributeType = {
592
+ UNSIGNED_BYTE,
593
+ UNSIGNED_SHORT,
594
+ UNSIGNED_INT,
595
+ FLOAT
596
+ };
597
+ var canvasCache = {};
598
+ function getSharedCanvasCacheKey(key) {
599
+ return "shared/" + key;
600
+ }
601
+ var uniqueCanvasCacheKeyCount = 0;
602
+ function getUniqueCanvasCacheKey() {
603
+ const key = "unique/" + uniqueCanvasCacheKeyCount;
604
+ uniqueCanvasCacheKeyCount += 1;
605
+ return key;
606
+ }
607
+ function getOrCreateContext(key) {
608
+ let cacheItem = canvasCache[key];
609
+ if (!cacheItem) {
610
+ const canvas = document.createElement("canvas");
611
+ canvas.width = 1;
612
+ canvas.height = 1;
613
+ canvas.style.position = "absolute";
614
+ canvas.style.left = "0";
615
+ const context = (
616
+ /** @type {WebGLRenderingContext} */
617
+ getContext(canvas)
618
+ );
619
+ cacheItem = { users: 0, context };
620
+ canvasCache[key] = cacheItem;
621
+ }
622
+ cacheItem.users += 1;
623
+ return cacheItem.context;
624
+ }
625
+ function releaseCanvas(key) {
626
+ const cacheItem = canvasCache[key];
627
+ if (!cacheItem) {
628
+ return;
629
+ }
630
+ cacheItem.users -= 1;
631
+ if (cacheItem.users > 0) {
632
+ return;
633
+ }
634
+ const gl = cacheItem.context;
635
+ const extension = gl.getExtension("WEBGL_lose_context");
636
+ if (extension) {
637
+ extension.loseContext();
638
+ }
639
+ const canvas = gl.canvas;
640
+ canvas.width = 1;
641
+ canvas.height = 1;
642
+ delete canvasCache[key];
643
+ }
644
+ var WebGLHelper = class extends Disposable_default {
645
+ /**
646
+ * @param {Options} [options] Options.
647
+ */
648
+ constructor(options) {
649
+ var _a;
650
+ super();
651
+ options = options || {};
652
+ this.boundHandleWebGLContextLost_ = this.handleWebGLContextLost.bind(this);
653
+ this.boundHandleWebGLContextRestored_ = this.handleWebGLContextRestored.bind(this);
654
+ this.canvasCacheKey_ = options.canvasCacheKey ? getSharedCanvasCacheKey(options.canvasCacheKey) : getUniqueCanvasCacheKey();
655
+ this.gl_ = getOrCreateContext(this.canvasCacheKey_);
656
+ this.bufferCache_ = {};
657
+ this.extensionCache_ = {};
658
+ this.currentProgram_ = null;
659
+ this.needsToBeRecreated_ = false;
660
+ const canvas = this.gl_.canvas;
661
+ canvas.addEventListener(
662
+ ContextEventType_default.LOST,
663
+ /** @type {EventListener} */
664
+ this.boundHandleWebGLContextLost_
665
+ );
666
+ canvas.addEventListener(
667
+ ContextEventType_default.RESTORED,
668
+ /** @type {EventListener} */
669
+ this.boundHandleWebGLContextRestored_
670
+ );
671
+ this.tmpMat4_ = create2();
672
+ this.uniformLocationsByProgram_ = {};
673
+ this.attribLocationsByProgram_ = {};
674
+ this.uniforms_ = [];
675
+ if (options.uniforms) {
676
+ this.setUniforms(options.uniforms);
677
+ }
678
+ this.postProcessPasses_ = ((_a = options.postProcesses) == null ? void 0 : _a.length) ? options.postProcesses.map(
679
+ (options2) => new PostProcessingPass_default({
680
+ webGlContext: this.gl_,
681
+ scaleRatio: options2.scaleRatio,
682
+ vertexShader: options2.vertexShader,
683
+ fragmentShader: options2.fragmentShader,
684
+ uniforms: options2.uniforms
685
+ })
686
+ ) : [new PostProcessingPass_default({ webGlContext: this.gl_ })];
687
+ this.shaderCompileErrors_ = null;
688
+ this.startTime_ = Date.now();
689
+ this.maxAttributeCount_ = this.gl_.getParameter(
690
+ this.gl_.MAX_VERTEX_ATTRIBS
691
+ );
692
+ }
693
+ /**
694
+ * @param {Object<string, UniformValue>} uniforms Uniform definitions.
695
+ */
696
+ setUniforms(uniforms) {
697
+ this.uniforms_ = [];
698
+ this.addUniforms(uniforms);
699
+ }
700
+ /**
701
+ * @param {Object<string, UniformValue>} uniforms Uniform definitions.
702
+ */
703
+ addUniforms(uniforms) {
704
+ for (const name in uniforms) {
705
+ this.uniforms_.push({
706
+ name,
707
+ value: uniforms[name]
708
+ });
709
+ }
710
+ }
711
+ /**
712
+ * @param {string} canvasCacheKey The canvas cache key.
713
+ * @return {boolean} The provided key matches the one this helper was constructed with.
714
+ */
715
+ canvasCacheKeyMatches(canvasCacheKey) {
716
+ return this.canvasCacheKey_ === getSharedCanvasCacheKey(canvasCacheKey);
717
+ }
718
+ /**
719
+ * Get a WebGL extension. If the extension is not supported, null is returned.
720
+ * Extensions are cached after they are enabled for the first time.
721
+ * @param {string} name The extension name.
722
+ * @return {Object|null} The extension or null if not supported.
723
+ */
724
+ getExtension(name) {
725
+ if (name in this.extensionCache_) {
726
+ return this.extensionCache_[name];
727
+ }
728
+ const extension = this.gl_.getExtension(name);
729
+ this.extensionCache_[name] = extension;
730
+ return extension;
731
+ }
732
+ /**
733
+ * Will throw if the extension is not available
734
+ * @return {ANGLE_instanced_arrays} Extension
735
+ */
736
+ getInstancedRenderingExtension_() {
737
+ const ext = this.getExtension("ANGLE_instanced_arrays");
738
+ assert(
739
+ !!ext,
740
+ "WebGL extension 'ANGLE_instanced_arrays' is required for vector rendering"
741
+ );
742
+ return (
743
+ /** @type {ANGLE_instanced_arrays} */
744
+ ext
745
+ );
746
+ }
747
+ /**
748
+ * Just bind the buffer if it's in the cache. Otherwise create
749
+ * the WebGL buffer, bind it, populate it, and add an entry to
750
+ * the cache.
751
+ * @param {import("./Buffer.js").default} buffer Buffer.
752
+ */
753
+ bindBuffer(buffer) {
754
+ const gl = this.gl_;
755
+ const bufferKey = getUid(buffer);
756
+ let bufferCache = this.bufferCache_[bufferKey];
757
+ if (!bufferCache) {
758
+ const webGlBuffer = gl.createBuffer();
759
+ bufferCache = {
760
+ buffer,
761
+ webGlBuffer
762
+ };
763
+ this.bufferCache_[bufferKey] = bufferCache;
764
+ }
765
+ gl.bindBuffer(buffer.getType(), bufferCache.webGlBuffer);
766
+ }
767
+ /**
768
+ * Update the data contained in the buffer array; this is required for the
769
+ * new data to be rendered
770
+ * @param {import("./Buffer.js").default} buffer Buffer.
771
+ */
772
+ flushBufferData(buffer) {
773
+ const gl = this.gl_;
774
+ this.bindBuffer(buffer);
775
+ gl.bufferData(buffer.getType(), buffer.getArray(), buffer.getUsage());
776
+ }
777
+ /**
778
+ * @param {import("./Buffer.js").default} buf Buffer.
779
+ */
780
+ deleteBuffer(buf) {
781
+ const bufferKey = getUid(buf);
782
+ delete this.bufferCache_[bufferKey];
783
+ }
784
+ /**
785
+ * Clean up.
786
+ * @override
787
+ */
788
+ disposeInternal() {
789
+ const canvas = this.gl_.canvas;
790
+ canvas.removeEventListener(
791
+ ContextEventType_default.LOST,
792
+ /** @type {EventListener} */
793
+ this.boundHandleWebGLContextLost_
794
+ );
795
+ canvas.removeEventListener(
796
+ ContextEventType_default.RESTORED,
797
+ /** @type {EventListener} */
798
+ this.boundHandleWebGLContextRestored_
799
+ );
800
+ releaseCanvas(this.canvasCacheKey_);
801
+ }
802
+ /**
803
+ * Clear the buffer & set the viewport to draw.
804
+ * Post process passes will be initialized here, the first one being bound as a render target for
805
+ * subsequent draw calls.
806
+ * @param {import("../Map.js").FrameState} frameState current frame state
807
+ * @param {boolean} [disableAlphaBlend] If true, no alpha blending will happen.
808
+ * @param {boolean} [enableDepth] If true, enables depth testing.
809
+ */
810
+ prepareDraw(frameState, disableAlphaBlend, enableDepth) {
811
+ const gl = this.gl_;
812
+ const canvas = this.getCanvas();
813
+ const size = frameState.size;
814
+ const pixelRatio = frameState.pixelRatio;
815
+ if (canvas.width !== size[0] * pixelRatio || canvas.height !== size[1] * pixelRatio) {
816
+ canvas.width = size[0] * pixelRatio;
817
+ canvas.height = size[1] * pixelRatio;
818
+ canvas.style.width = size[0] + "px";
819
+ canvas.style.height = size[1] + "px";
820
+ }
821
+ for (let i = this.postProcessPasses_.length - 1; i >= 0; i--) {
822
+ this.postProcessPasses_[i].init(frameState);
823
+ }
824
+ gl.bindTexture(gl.TEXTURE_2D, null);
825
+ gl.clearColor(0, 0, 0, 0);
826
+ gl.depthRange(0, 1);
827
+ gl.clearDepth(1);
828
+ gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
829
+ gl.enable(gl.BLEND);
830
+ gl.blendFunc(gl.ONE, disableAlphaBlend ? gl.ZERO : gl.ONE_MINUS_SRC_ALPHA);
831
+ if (enableDepth) {
832
+ gl.enable(gl.DEPTH_TEST);
833
+ gl.depthFunc(gl.LEQUAL);
834
+ } else {
835
+ gl.disable(gl.DEPTH_TEST);
836
+ }
837
+ }
838
+ /**
839
+ * @param {WebGLFramebuffer|null} frameBuffer The frame buffer.
840
+ * @param {WebGLTexture} [texture] The texture.
841
+ */
842
+ bindFrameBuffer(frameBuffer, texture) {
843
+ const gl = this.getGL();
844
+ gl.bindFramebuffer(gl.FRAMEBUFFER, frameBuffer);
845
+ if (texture) {
846
+ gl.framebufferTexture2D(
847
+ gl.FRAMEBUFFER,
848
+ gl.COLOR_ATTACHMENT0,
849
+ gl.TEXTURE_2D,
850
+ texture,
851
+ 0
852
+ );
853
+ }
854
+ }
855
+ /**
856
+ * Bind the frame buffer from the initial render.
857
+ */
858
+ bindInitialFrameBuffer() {
859
+ const gl = this.getGL();
860
+ const frameBuffer = this.postProcessPasses_[0].getFrameBuffer();
861
+ gl.bindFramebuffer(gl.FRAMEBUFFER, frameBuffer);
862
+ const texture = this.postProcessPasses_[0].getRenderTargetTexture();
863
+ gl.framebufferTexture2D(
864
+ gl.FRAMEBUFFER,
865
+ gl.COLOR_ATTACHMENT0,
866
+ gl.TEXTURE_2D,
867
+ texture,
868
+ 0
869
+ );
870
+ }
871
+ /**
872
+ * Prepare a program to use a texture.
873
+ * @param {WebGLTexture} texture The texture.
874
+ * @param {number} slot The texture slot.
875
+ * @param {string} uniformName The corresponding uniform name.
876
+ */
877
+ bindTexture(texture, slot, uniformName) {
878
+ const gl = this.gl_;
879
+ gl.activeTexture(gl.TEXTURE0 + slot);
880
+ gl.bindTexture(gl.TEXTURE_2D, texture);
881
+ gl.uniform1i(this.getUniformLocation(uniformName), slot);
882
+ }
883
+ /**
884
+ * Set up an attribute array buffer for use in the vertex shader.
885
+ * @param {import("./Buffer.js").default} buffer The buffer.
886
+ * @param {string} attributeName The attribute name.
887
+ * @param {number} size The number of components per attribute vertex.
888
+ */
889
+ bindAttribute(buffer, attributeName, size) {
890
+ const gl = this.getGL();
891
+ this.bindBuffer(buffer);
892
+ const index = this.getAttributeLocation(attributeName);
893
+ gl.enableVertexAttribArray(index);
894
+ gl.vertexAttribPointer(index, size, gl.FLOAT, false, 0, 0);
895
+ }
896
+ /**
897
+ * Clear the render target & bind it for future draw operations.
898
+ * This is similar to `prepareDraw`, only post processes will not be applied.
899
+ * Note: the whole viewport will be drawn to the render target, regardless of its size.
900
+ * @param {import("../Map.js").FrameState} frameState current frame state
901
+ * @param {import("./RenderTarget.js").default} renderTarget Render target to draw to
902
+ * @param {boolean} [disableAlphaBlend] If true, no alpha blending will happen.
903
+ * @param {boolean} [enableDepth] If true, enables depth testing.
904
+ */
905
+ prepareDrawToRenderTarget(frameState, renderTarget, disableAlphaBlend, enableDepth) {
906
+ const gl = this.gl_;
907
+ const size = renderTarget.getSize();
908
+ gl.bindFramebuffer(gl.FRAMEBUFFER, renderTarget.getFramebuffer());
909
+ gl.bindRenderbuffer(gl.RENDERBUFFER, renderTarget.getDepthbuffer());
910
+ gl.viewport(0, 0, size[0], size[1]);
911
+ gl.bindTexture(gl.TEXTURE_2D, renderTarget.getTexture());
912
+ gl.clearColor(0, 0, 0, 0);
913
+ gl.depthRange(0, 1);
914
+ gl.clearDepth(1);
915
+ gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
916
+ gl.enable(gl.BLEND);
917
+ gl.blendFunc(gl.ONE, disableAlphaBlend ? gl.ZERO : gl.ONE_MINUS_SRC_ALPHA);
918
+ if (enableDepth) {
919
+ gl.enable(gl.DEPTH_TEST);
920
+ gl.depthFunc(gl.LEQUAL);
921
+ } else {
922
+ gl.disable(gl.DEPTH_TEST);
923
+ }
924
+ }
925
+ /**
926
+ * Execute a draw call based on the currently bound program, texture, buffers, attributes.
927
+ * @param {number} start Start index.
928
+ * @param {number} end End index.
929
+ */
930
+ drawElements(start, end) {
931
+ const gl = this.gl_;
932
+ this.getExtension("OES_element_index_uint");
933
+ const elementType = gl.UNSIGNED_INT;
934
+ const elementSize = 4;
935
+ const numItems = end - start;
936
+ const offsetInBytes = start * elementSize;
937
+ gl.drawElements(gl.TRIANGLES, numItems, elementType, offsetInBytes);
938
+ }
939
+ /**
940
+ * Execute a draw call similar to `drawElements`, but using instanced rendering.
941
+ * Will have no effect if `enableAttributesInstanced` was not called for this rendering pass.
942
+ * @param {number} start Start index.
943
+ * @param {number} end End index.
944
+ * @param {number} instanceCount The number of instances to render
945
+ */
946
+ drawElementsInstanced(start, end, instanceCount) {
947
+ const gl = this.gl_;
948
+ this.getExtension("OES_element_index_uint");
949
+ const ext = this.getInstancedRenderingExtension_();
950
+ const elementType = gl.UNSIGNED_INT;
951
+ const elementSize = 4;
952
+ const numItems = end - start;
953
+ const offsetInBytes = start * elementSize;
954
+ ext.drawElementsInstancedANGLE(
955
+ gl.TRIANGLES,
956
+ numItems,
957
+ elementType,
958
+ offsetInBytes,
959
+ instanceCount
960
+ );
961
+ for (let i = 0; i < this.maxAttributeCount_; i++) {
962
+ ext.vertexAttribDivisorANGLE(i, 0);
963
+ }
964
+ }
965
+ /**
966
+ * Apply the successive post process passes which will eventually render to the actual canvas.
967
+ * @param {import("../Map.js").FrameState} frameState current frame state
968
+ * @param {function(WebGLRenderingContext, import("../Map.js").FrameState):void} [preCompose] Called before composing.
969
+ * @param {function(WebGLRenderingContext, import("../Map.js").FrameState):void} [postCompose] Called before composing.
970
+ */
971
+ finalizeDraw(frameState, preCompose, postCompose) {
972
+ for (let i = 0, ii = this.postProcessPasses_.length; i < ii; i++) {
973
+ if (i === ii - 1) {
974
+ this.postProcessPasses_[i].apply(
975
+ frameState,
976
+ void 0,
977
+ preCompose,
978
+ postCompose
979
+ );
980
+ } else {
981
+ this.postProcessPasses_[i].apply(
982
+ frameState,
983
+ this.postProcessPasses_[i + 1]
984
+ );
985
+ }
986
+ }
987
+ }
988
+ /**
989
+ * @return {HTMLCanvasElement} Canvas.
990
+ */
991
+ getCanvas() {
992
+ return (
993
+ /** @type {HTMLCanvasElement} */
994
+ this.gl_.canvas
995
+ );
996
+ }
997
+ /**
998
+ * Get the WebGL rendering context
999
+ * @return {WebGLRenderingContext} The rendering context.
1000
+ */
1001
+ getGL() {
1002
+ return this.gl_;
1003
+ }
1004
+ /**
1005
+ * Sets the default matrix uniforms for a given frame state. This is called internally in `prepareDraw`.
1006
+ * @param {import("../Map.js").FrameState} frameState Frame state.
1007
+ */
1008
+ applyFrameState(frameState) {
1009
+ const size = frameState.size;
1010
+ const rotation = frameState.viewState.rotation;
1011
+ const pixelRatio = frameState.pixelRatio;
1012
+ this.setUniformFloatValue(
1013
+ DefaultUniform.TIME,
1014
+ (Date.now() - this.startTime_) * 1e-3
1015
+ );
1016
+ this.setUniformFloatValue(DefaultUniform.ZOOM, frameState.viewState.zoom);
1017
+ this.setUniformFloatValue(
1018
+ DefaultUniform.RESOLUTION,
1019
+ frameState.viewState.resolution
1020
+ );
1021
+ this.setUniformFloatValue(DefaultUniform.PIXEL_RATIO, pixelRatio);
1022
+ this.setUniformFloatVec2(DefaultUniform.VIEWPORT_SIZE_PX, [
1023
+ size[0],
1024
+ size[1]
1025
+ ]);
1026
+ this.setUniformFloatValue(DefaultUniform.ROTATION, rotation);
1027
+ }
1028
+ /**
1029
+ * Sets the `u_hitDetection` uniform.
1030
+ * @param {boolean} enabled Whether to enable the hit detection code path
1031
+ */
1032
+ applyHitDetectionUniform(enabled) {
1033
+ const loc = this.getUniformLocation(DefaultUniform.HIT_DETECTION);
1034
+ if (loc) {
1035
+ this.getGL().uniform1i(loc, enabled ? 1 : 0);
1036
+ }
1037
+ if (enabled) {
1038
+ this.setUniformFloatValue(DefaultUniform.PIXEL_RATIO, 0.5);
1039
+ }
1040
+ }
1041
+ /**
1042
+ * Sets the custom uniforms based on what was given in the constructor. This is called internally in `prepareDraw`.
1043
+ * @param {import("../Map.js").FrameState} frameState Frame state.
1044
+ */
1045
+ applyUniforms(frameState) {
1046
+ const gl = this.gl_;
1047
+ let value;
1048
+ let textureSlot = 0;
1049
+ this.uniforms_.forEach((uniform) => {
1050
+ value = typeof uniform.value === "function" ? uniform.value(frameState) : uniform.value;
1051
+ if (value instanceof HTMLCanvasElement || value instanceof HTMLImageElement || value instanceof ImageData || value instanceof WebGLTexture) {
1052
+ if (value instanceof WebGLTexture && !uniform.texture) {
1053
+ uniform.prevValue = void 0;
1054
+ uniform.texture = value;
1055
+ } else if (!uniform.texture) {
1056
+ uniform.prevValue = void 0;
1057
+ uniform.texture = gl.createTexture();
1058
+ }
1059
+ this.bindTexture(uniform.texture, textureSlot, uniform.name);
1060
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);
1061
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
1062
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
1063
+ const imageReady = !(value instanceof HTMLImageElement) || /** @type {HTMLImageElement} */
1064
+ value.complete;
1065
+ if (!(value instanceof WebGLTexture) && imageReady && uniform.prevValue !== value) {
1066
+ uniform.prevValue = value;
1067
+ gl.texImage2D(
1068
+ gl.TEXTURE_2D,
1069
+ 0,
1070
+ gl.RGBA,
1071
+ gl.RGBA,
1072
+ gl.UNSIGNED_BYTE,
1073
+ value
1074
+ );
1075
+ }
1076
+ textureSlot++;
1077
+ } else if (Array.isArray(value) && value.length === 6) {
1078
+ this.setUniformMatrixValue(
1079
+ uniform.name,
1080
+ fromTransform(this.tmpMat4_, value)
1081
+ );
1082
+ } else if (Array.isArray(value) && value.length <= 4) {
1083
+ switch (value.length) {
1084
+ case 2:
1085
+ gl.uniform2f(
1086
+ this.getUniformLocation(uniform.name),
1087
+ value[0],
1088
+ value[1]
1089
+ );
1090
+ return;
1091
+ case 3:
1092
+ gl.uniform3f(
1093
+ this.getUniformLocation(uniform.name),
1094
+ value[0],
1095
+ value[1],
1096
+ value[2]
1097
+ );
1098
+ return;
1099
+ case 4:
1100
+ gl.uniform4f(
1101
+ this.getUniformLocation(uniform.name),
1102
+ value[0],
1103
+ value[1],
1104
+ value[2],
1105
+ value[3]
1106
+ );
1107
+ return;
1108
+ default:
1109
+ return;
1110
+ }
1111
+ } else if (typeof value === "number") {
1112
+ gl.uniform1f(this.getUniformLocation(uniform.name), value);
1113
+ }
1114
+ });
1115
+ }
1116
+ /**
1117
+ * Set up a program for use. The program will be set as the current one. Then, the uniforms used
1118
+ * in the program will be set based on the current frame state and the helper configuration.
1119
+ * @param {WebGLProgram} program Program.
1120
+ * @param {import("../Map.js").FrameState} [frameState] Frame state.
1121
+ */
1122
+ useProgram(program, frameState) {
1123
+ this.disableAllAttributes_();
1124
+ const gl = this.gl_;
1125
+ gl.useProgram(program);
1126
+ this.currentProgram_ = program;
1127
+ if (frameState) {
1128
+ this.applyFrameState(frameState);
1129
+ this.applyUniforms(frameState);
1130
+ }
1131
+ }
1132
+ /**
1133
+ * Will attempt to compile a vertex or fragment shader based on source
1134
+ * On error, the shader will be returned but
1135
+ * `gl.getShaderParameter(shader, gl.COMPILE_STATUS)` will return `true`
1136
+ * Use `gl.getShaderInfoLog(shader)` to have details
1137
+ * @param {string} source Shader source
1138
+ * @param {ShaderType} type VERTEX_SHADER or FRAGMENT_SHADER
1139
+ * @return {WebGLShader} Shader object
1140
+ */
1141
+ compileShader(source, type) {
1142
+ const gl = this.gl_;
1143
+ const shader = (
1144
+ /** @type {WebGLShader} */
1145
+ gl.createShader(type)
1146
+ );
1147
+ gl.shaderSource(shader, source);
1148
+ gl.compileShader(shader);
1149
+ return shader;
1150
+ }
1151
+ /**
1152
+ * Create a program for a vertex and fragment shader. Throws if shader compilation fails.
1153
+ * @param {string} fragmentShaderSource Fragment shader source.
1154
+ * @param {string} vertexShaderSource Vertex shader source.
1155
+ * @return {WebGLProgram} Program
1156
+ */
1157
+ getProgram(fragmentShaderSource, vertexShaderSource) {
1158
+ const gl = this.gl_;
1159
+ const fragmentShader = this.compileShader(
1160
+ fragmentShaderSource,
1161
+ gl.FRAGMENT_SHADER
1162
+ );
1163
+ const vertexShader = this.compileShader(
1164
+ vertexShaderSource,
1165
+ gl.VERTEX_SHADER
1166
+ );
1167
+ const program = gl.createProgram();
1168
+ gl.attachShader(program, fragmentShader);
1169
+ gl.attachShader(program, vertexShader);
1170
+ gl.linkProgram(program);
1171
+ if (!gl.getShaderParameter(fragmentShader, gl.COMPILE_STATUS)) {
1172
+ const message = `Fragment shader compilation failed: ${gl.getShaderInfoLog(
1173
+ fragmentShader
1174
+ )}`;
1175
+ throw new Error(message);
1176
+ }
1177
+ gl.deleteShader(fragmentShader);
1178
+ if (!gl.getShaderParameter(vertexShader, gl.COMPILE_STATUS)) {
1179
+ const message = `Vertex shader compilation failed: ${gl.getShaderInfoLog(
1180
+ vertexShader
1181
+ )}`;
1182
+ throw new Error(message);
1183
+ }
1184
+ gl.deleteShader(vertexShader);
1185
+ if (!gl.getProgramParameter(program, gl.LINK_STATUS)) {
1186
+ const message = `GL program linking failed: ${gl.getProgramInfoLog(
1187
+ program
1188
+ )}`;
1189
+ throw new Error(message);
1190
+ }
1191
+ return program;
1192
+ }
1193
+ /**
1194
+ * Will get the location from the shader or the cache
1195
+ * @param {string} name Uniform name
1196
+ * @return {WebGLUniformLocation|null} uniformLocation
1197
+ */
1198
+ getUniformLocation(name) {
1199
+ const programUid = getUid(
1200
+ /** @type {Object} */
1201
+ this.currentProgram_
1202
+ );
1203
+ if (this.uniformLocationsByProgram_[programUid] === void 0) {
1204
+ this.uniformLocationsByProgram_[programUid] = {};
1205
+ }
1206
+ if (this.uniformLocationsByProgram_[programUid][name] === void 0) {
1207
+ this.uniformLocationsByProgram_[programUid][name] = this.currentProgram_ && this.gl_.getUniformLocation(this.currentProgram_, name);
1208
+ }
1209
+ return this.uniformLocationsByProgram_[programUid][name];
1210
+ }
1211
+ /**
1212
+ * Will get the location from the shader or the cache
1213
+ * @param {string} name Attribute name
1214
+ * @return {number} attribLocation
1215
+ */
1216
+ getAttributeLocation(name) {
1217
+ const programUid = getUid(
1218
+ /** @type {Object} */
1219
+ this.currentProgram_
1220
+ );
1221
+ if (this.attribLocationsByProgram_[programUid] === void 0) {
1222
+ this.attribLocationsByProgram_[programUid] = {};
1223
+ }
1224
+ if (this.attribLocationsByProgram_[programUid][name] === void 0) {
1225
+ this.attribLocationsByProgram_[programUid][name] = this.currentProgram_ ? this.gl_.getAttribLocation(this.currentProgram_, name) : -1;
1226
+ }
1227
+ return this.attribLocationsByProgram_[programUid][name];
1228
+ }
1229
+ /**
1230
+ * Sets the given transform to apply the rotation/translation/scaling of the given frame state.
1231
+ * The resulting transform can be used to convert world space coordinates to view coordinates in the [-1, 1] range.
1232
+ * @param {import("../Map.js").FrameState} frameState Frame state.
1233
+ * @param {import("../transform.js").Transform} transform Transform to update.
1234
+ * @param {boolean} [ignoreRotation] If true, view rotation will not be added to the transform
1235
+ * @return {import("../transform.js").Transform} The updated transform object.
1236
+ */
1237
+ makeProjectionTransform(frameState, transform, ignoreRotation) {
1238
+ const size = frameState.size;
1239
+ const rotation = ignoreRotation ? 0 : frameState.viewState.rotation;
1240
+ const resolution = frameState.viewState.resolution;
1241
+ const center = frameState.viewState.center;
1242
+ compose(
1243
+ transform,
1244
+ 0,
1245
+ 0,
1246
+ 2 / (resolution * size[0]),
1247
+ 2 / (resolution * size[1]),
1248
+ -rotation,
1249
+ -center[0],
1250
+ -center[1]
1251
+ );
1252
+ return transform;
1253
+ }
1254
+ /**
1255
+ * Give a value for a standard float uniform
1256
+ * @param {string} uniform Uniform name
1257
+ * @param {number} value Value
1258
+ */
1259
+ setUniformFloatValue(uniform, value) {
1260
+ this.gl_.uniform1f(this.getUniformLocation(uniform), value);
1261
+ }
1262
+ /**
1263
+ * Give a value for a vec2 uniform
1264
+ * @param {string} uniform Uniform name
1265
+ * @param {Array<number>} value Array of length 4.
1266
+ */
1267
+ setUniformFloatVec2(uniform, value) {
1268
+ this.gl_.uniform2fv(this.getUniformLocation(uniform), value);
1269
+ }
1270
+ /**
1271
+ * Give a value for a vec4 uniform
1272
+ * @param {string} uniform Uniform name
1273
+ * @param {Array<number>} value Array of length 4.
1274
+ */
1275
+ setUniformFloatVec4(uniform, value) {
1276
+ this.gl_.uniform4fv(this.getUniformLocation(uniform), value);
1277
+ }
1278
+ /**
1279
+ * Give a value for a standard matrix4 uniform
1280
+ * @param {string} uniform Uniform name
1281
+ * @param {Array<number>} value Matrix value
1282
+ */
1283
+ setUniformMatrixValue(uniform, value) {
1284
+ this.gl_.uniformMatrix4fv(this.getUniformLocation(uniform), false, value);
1285
+ }
1286
+ /**
1287
+ * Disable all vertex attributes.
1288
+ * @private
1289
+ */
1290
+ disableAllAttributes_() {
1291
+ for (let i = 0; i < this.maxAttributeCount_; i++) {
1292
+ this.gl_.disableVertexAttribArray(i);
1293
+ }
1294
+ }
1295
+ /**
1296
+ * Will set the currently bound buffer to an attribute of the shader program. Used by `#enableAttributes`
1297
+ * internally.
1298
+ * @param {string} attribName Attribute name
1299
+ * @param {number} size Number of components per attributes
1300
+ * @param {number} type UNSIGNED_INT, UNSIGNED_BYTE, UNSIGNED_SHORT or FLOAT
1301
+ * @param {number} stride Stride in bytes (0 means attribs are packed)
1302
+ * @param {number} offset Offset in bytes
1303
+ * @param {boolean} instanced Whether the attribute is used for instanced rendering
1304
+ * @private
1305
+ */
1306
+ enableAttributeArray_(attribName, size, type, stride, offset, instanced) {
1307
+ const location = this.getAttributeLocation(attribName);
1308
+ if (location < 0) {
1309
+ return;
1310
+ }
1311
+ this.gl_.enableVertexAttribArray(location);
1312
+ this.gl_.vertexAttribPointer(location, size, type, false, stride, offset);
1313
+ if (instanced) {
1314
+ this.getInstancedRenderingExtension_().vertexAttribDivisorANGLE(
1315
+ location,
1316
+ 1
1317
+ );
1318
+ }
1319
+ }
1320
+ /**
1321
+ * @private
1322
+ * @param {Array<AttributeDescription>} attributes Ordered list of attributes to read from the buffer
1323
+ * @param {boolean} instanced Whether the attributes are instanced.
1324
+ */
1325
+ enableAttributes_(attributes, instanced) {
1326
+ const stride = computeAttributesStride(attributes);
1327
+ let offset = 0;
1328
+ for (let i = 0; i < attributes.length; i++) {
1329
+ const attr = attributes[i];
1330
+ if (attr.name) {
1331
+ this.enableAttributeArray_(
1332
+ attr.name,
1333
+ attr.size,
1334
+ attr.type || FLOAT,
1335
+ stride,
1336
+ offset,
1337
+ instanced
1338
+ );
1339
+ }
1340
+ offset += attr.size * getByteSizeFromType(attr.type || FLOAT);
1341
+ }
1342
+ }
1343
+ /**
1344
+ * Will enable the following attributes to be read from the currently bound buffer,
1345
+ * i.e. tell the GPU where to read the different attributes in the buffer. An error in the
1346
+ * size/type/order of attributes will most likely break the rendering and throw a WebGL exception.
1347
+ * @param {Array<AttributeDescription>} attributes Ordered list of attributes to read from the buffer
1348
+ */
1349
+ enableAttributes(attributes) {
1350
+ this.enableAttributes_(attributes, false);
1351
+ }
1352
+ /**
1353
+ * Will enable these attributes as instanced, meaning that they will only be read
1354
+ * once per instance instead of per vertex.
1355
+ * @param {Array<AttributeDescription>} attributes Ordered list of attributes to read from the buffer
1356
+ */
1357
+ enableAttributesInstanced(attributes) {
1358
+ this.enableAttributes_(attributes, true);
1359
+ }
1360
+ /**
1361
+ * WebGL context was lost
1362
+ * @param {WebGLContextEvent} event The context loss event.
1363
+ * @private
1364
+ */
1365
+ handleWebGLContextLost(event) {
1366
+ clear(this.bufferCache_);
1367
+ this.currentProgram_ = null;
1368
+ event.preventDefault();
1369
+ }
1370
+ /**
1371
+ * WebGL context was restored
1372
+ * @private
1373
+ */
1374
+ handleWebGLContextRestored() {
1375
+ this.needsToBeRecreated_ = true;
1376
+ }
1377
+ /**
1378
+ * Returns whether this helper needs to be recreated, as the context was lost and then restored.
1379
+ * @return {boolean} Whether this helper needs to be recreated.
1380
+ */
1381
+ needsToBeRecreated() {
1382
+ return this.needsToBeRecreated_;
1383
+ }
1384
+ /**
1385
+ * Will create or reuse a given webgl texture and apply the given size. If no image data
1386
+ * specified, the texture will be empty, otherwise image data will be used and the `size`
1387
+ * parameter will be ignored. If a Uint8Array is provided for data, a size must also be provided.
1388
+ * Note: wrap parameters are set to clamp to edge, min filter is set to linear.
1389
+ * @param {Array<number>} size Expected size of the texture
1390
+ * @param {ImageData|HTMLImageElement|HTMLCanvasElement|Uint8Array|null} data Image data/object to bind to the texture
1391
+ * @param {WebGLTexture} [texture] Existing texture to reuse
1392
+ * @param {boolean} [nearest] Use gl.NEAREST for min/mag filter.
1393
+ * @return {WebGLTexture} The generated texture
1394
+ */
1395
+ createTexture(size, data, texture, nearest) {
1396
+ const gl = this.gl_;
1397
+ texture = texture || gl.createTexture();
1398
+ const filter = nearest ? gl.NEAREST : gl.LINEAR;
1399
+ gl.bindTexture(gl.TEXTURE_2D, texture);
1400
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, filter);
1401
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, filter);
1402
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
1403
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
1404
+ const level = 0;
1405
+ const internalFormat = gl.RGBA;
1406
+ const border = 0;
1407
+ const format = gl.RGBA;
1408
+ const type = gl.UNSIGNED_BYTE;
1409
+ if (data instanceof Uint8Array) {
1410
+ gl.texImage2D(
1411
+ gl.TEXTURE_2D,
1412
+ level,
1413
+ internalFormat,
1414
+ size[0],
1415
+ size[1],
1416
+ border,
1417
+ format,
1418
+ type,
1419
+ data
1420
+ );
1421
+ } else if (data) {
1422
+ gl.texImage2D(gl.TEXTURE_2D, level, internalFormat, format, type, data);
1423
+ } else {
1424
+ gl.texImage2D(
1425
+ gl.TEXTURE_2D,
1426
+ level,
1427
+ internalFormat,
1428
+ size[0],
1429
+ size[1],
1430
+ border,
1431
+ format,
1432
+ type,
1433
+ null
1434
+ );
1435
+ }
1436
+ return texture;
1437
+ }
1438
+ };
1439
+ function computeAttributesStride(attributes) {
1440
+ let stride = 0;
1441
+ for (let i = 0; i < attributes.length; i++) {
1442
+ const attr = attributes[i];
1443
+ stride += attr.size * getByteSizeFromType(attr.type || FLOAT);
1444
+ }
1445
+ return stride;
1446
+ }
1447
+ function getByteSizeFromType(type) {
1448
+ switch (type) {
1449
+ case AttributeType.UNSIGNED_BYTE:
1450
+ return Uint8Array.BYTES_PER_ELEMENT;
1451
+ case AttributeType.UNSIGNED_SHORT:
1452
+ return Uint16Array.BYTES_PER_ELEMENT;
1453
+ case AttributeType.UNSIGNED_INT:
1454
+ return Uint32Array.BYTES_PER_ELEMENT;
1455
+ case AttributeType.FLOAT:
1456
+ default:
1457
+ return Float32Array.BYTES_PER_ELEMENT;
1458
+ }
1459
+ }
1460
+ var Helper_default = WebGLHelper;
1461
+
1462
+ // node_modules/ol/webgl/TileTexture.js
1463
+ init_dirname();
1464
+ init_buffer();
1465
+ init_process();
1466
+
1467
+ // node_modules/ol/webgl/BaseTileRepresentation.js
1468
+ init_dirname();
1469
+ init_buffer();
1470
+ init_process();
1471
+ var BaseTileRepresentation = class extends Target_default {
1472
+ /**
1473
+ * @param {TileRepresentationOptions<TileType>} options The tile representation options.
1474
+ */
1475
+ constructor(options) {
1476
+ super();
1477
+ this.tile;
1478
+ this.handleTileChange_ = this.handleTileChange_.bind(this);
1479
+ this.gutter = options.gutter || 0;
1480
+ this.helper = options.helper;
1481
+ this.loaded = false;
1482
+ this.ready = false;
1483
+ }
1484
+ /**
1485
+ * @param {TileType} tile Tile.
1486
+ */
1487
+ setTile(tile) {
1488
+ if (tile !== this.tile) {
1489
+ if (this.tile) {
1490
+ this.tile.removeEventListener(EventType_default.CHANGE, this.handleTileChange_);
1491
+ }
1492
+ this.tile = tile;
1493
+ this.loaded = tile.getState() === TileState_default.LOADED;
1494
+ if (this.loaded) {
1495
+ this.uploadTile();
1496
+ } else {
1497
+ if (tile instanceof ImageTile_default) {
1498
+ const image = tile.getImage();
1499
+ if (image instanceof Image && !image.crossOrigin) {
1500
+ image.crossOrigin = "anonymous";
1501
+ }
1502
+ }
1503
+ tile.addEventListener(EventType_default.CHANGE, this.handleTileChange_);
1504
+ }
1505
+ }
1506
+ }
1507
+ /**
1508
+ * @abstract
1509
+ * @protected
1510
+ */
1511
+ uploadTile() {
1512
+ abstract();
1513
+ }
1514
+ setReady() {
1515
+ this.ready = true;
1516
+ this.dispatchEvent(EventType_default.CHANGE);
1517
+ }
1518
+ handleTileChange_() {
1519
+ if (this.tile.getState() === TileState_default.LOADED) {
1520
+ this.loaded = true;
1521
+ this.uploadTile();
1522
+ }
1523
+ }
1524
+ /**
1525
+ * @param {import("./Helper.js").default|null} helper The WebGL helper.
1526
+ */
1527
+ setHelper(helper) {
1528
+ this.helper = /** @type {import("./Helper.js").default} */
1529
+ helper;
1530
+ if (this.helper && this.loaded) {
1531
+ this.uploadTile();
1532
+ }
1533
+ }
1534
+ /**
1535
+ * @override
1536
+ */
1537
+ disposeInternal() {
1538
+ this.setHelper(null);
1539
+ this.tile.removeEventListener(EventType_default.CHANGE, this.handleTileChange_);
1540
+ }
1541
+ };
1542
+ var BaseTileRepresentation_default = BaseTileRepresentation;
1543
+
1544
+ // node_modules/ol/webgl/TileTexture.js
1545
+ function bindAndConfigure(gl, texture, interpolate) {
1546
+ const resampleFilter = interpolate ? gl.LINEAR : gl.NEAREST;
1547
+ gl.bindTexture(gl.TEXTURE_2D, texture);
1548
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
1549
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
1550
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, resampleFilter);
1551
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, resampleFilter);
1552
+ }
1553
+ function uploadImageTexture(gl, texture, image, interpolate) {
1554
+ bindAndConfigure(gl, texture, interpolate);
1555
+ gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, image);
1556
+ }
1557
+ function uploadDataTexture(helper, texture, data, size, bandCount, interpolate) {
1558
+ const gl = helper.getGL();
1559
+ let textureType;
1560
+ let canInterpolate;
1561
+ if (data instanceof Float32Array) {
1562
+ textureType = gl.FLOAT;
1563
+ helper.getExtension("OES_texture_float");
1564
+ const extension = helper.getExtension("OES_texture_float_linear");
1565
+ canInterpolate = extension !== null;
1566
+ } else {
1567
+ textureType = gl.UNSIGNED_BYTE;
1568
+ canInterpolate = true;
1569
+ }
1570
+ bindAndConfigure(gl, texture, interpolate && canInterpolate);
1571
+ const bytesPerRow = data.byteLength / size[1];
1572
+ let unpackAlignment = 1;
1573
+ if (bytesPerRow % 8 === 0) {
1574
+ unpackAlignment = 8;
1575
+ } else if (bytesPerRow % 4 === 0) {
1576
+ unpackAlignment = 4;
1577
+ } else if (bytesPerRow % 2 === 0) {
1578
+ unpackAlignment = 2;
1579
+ }
1580
+ let format;
1581
+ switch (bandCount) {
1582
+ case 1: {
1583
+ format = gl.LUMINANCE;
1584
+ break;
1585
+ }
1586
+ case 2: {
1587
+ format = gl.LUMINANCE_ALPHA;
1588
+ break;
1589
+ }
1590
+ case 3: {
1591
+ format = gl.RGB;
1592
+ break;
1593
+ }
1594
+ case 4: {
1595
+ format = gl.RGBA;
1596
+ break;
1597
+ }
1598
+ default: {
1599
+ throw new Error(`Unsupported number of bands: ${bandCount}`);
1600
+ }
1601
+ }
1602
+ const oldUnpackAlignment = gl.getParameter(gl.UNPACK_ALIGNMENT);
1603
+ gl.pixelStorei(gl.UNPACK_ALIGNMENT, unpackAlignment);
1604
+ gl.texImage2D(
1605
+ gl.TEXTURE_2D,
1606
+ 0,
1607
+ format,
1608
+ size[0],
1609
+ size[1],
1610
+ 0,
1611
+ format,
1612
+ textureType,
1613
+ data
1614
+ );
1615
+ gl.pixelStorei(gl.UNPACK_ALIGNMENT, oldUnpackAlignment);
1616
+ }
1617
+ var pixelContext = null;
1618
+ function createPixelContext() {
1619
+ pixelContext = createCanvasContext2D(1, 1, void 0, {
1620
+ willReadFrequently: true
1621
+ });
1622
+ }
1623
+ var TileTexture = class extends BaseTileRepresentation_default {
1624
+ /**
1625
+ * @param {import("./BaseTileRepresentation.js").TileRepresentationOptions<TileType>} options The tile texture options.
1626
+ */
1627
+ constructor(options) {
1628
+ super(options);
1629
+ this.textures = [];
1630
+ this.renderSize_ = toSize(
1631
+ options.grid.getTileSize(options.tile.tileCoord[0])
1632
+ );
1633
+ this.bandCount = NaN;
1634
+ const coords = new Buffer_default(ARRAY_BUFFER, STATIC_DRAW);
1635
+ coords.fromArray([
1636
+ 0,
1637
+ // P0
1638
+ 1,
1639
+ 1,
1640
+ // P1
1641
+ 1,
1642
+ 1,
1643
+ // P2
1644
+ 0,
1645
+ 0,
1646
+ // P3
1647
+ 0
1648
+ ]);
1649
+ options.helper.flushBufferData(coords);
1650
+ this.coords = coords;
1651
+ this.setTile(options.tile);
1652
+ }
1653
+ /**
1654
+ * @override
1655
+ * @param {import("./Helper.js").default} helper The WebGL helper.
1656
+ */
1657
+ setHelper(helper) {
1658
+ var _a, _b;
1659
+ const gl = (_a = this.helper) == null ? void 0 : _a.getGL();
1660
+ if (gl) {
1661
+ (_b = this.helper) == null ? void 0 : _b.deleteBuffer(this.coords);
1662
+ for (let i = 0; i < this.textures.length; ++i) {
1663
+ gl.deleteTexture(this.textures[i]);
1664
+ }
1665
+ }
1666
+ super.setHelper(helper);
1667
+ if (helper) {
1668
+ helper.flushBufferData(this.coords);
1669
+ }
1670
+ }
1671
+ /**
1672
+ * @override
1673
+ */
1674
+ uploadTile() {
1675
+ const helper = this.helper;
1676
+ if (!helper) {
1677
+ return;
1678
+ }
1679
+ const gl = helper.getGL();
1680
+ const tile = this.tile;
1681
+ this.textures.length = 0;
1682
+ let data;
1683
+ if (tile instanceof ImageTile_default || tile instanceof Tile_default) {
1684
+ data = tile.getImage();
1685
+ } else {
1686
+ data = tile.getData();
1687
+ }
1688
+ if (!data) {
1689
+ return;
1690
+ }
1691
+ const image = asImageLike(data);
1692
+ if (image) {
1693
+ const texture = gl.createTexture();
1694
+ this.textures.push(texture);
1695
+ this.bandCount = 4;
1696
+ uploadImageTexture(gl, texture, image, tile.interpolate);
1697
+ this.setReady();
1698
+ return;
1699
+ }
1700
+ const arrayData = asArrayLike(data);
1701
+ if (!arrayData) {
1702
+ return;
1703
+ }
1704
+ data = arrayData;
1705
+ const sourceTileSize = (
1706
+ /** @type {DataTile} */
1707
+ tile.getSize()
1708
+ );
1709
+ const pixelSize = [
1710
+ sourceTileSize[0] + 2 * this.gutter,
1711
+ sourceTileSize[1] + 2 * this.gutter
1712
+ ];
1713
+ const isFloat = data instanceof Float32Array;
1714
+ const pixelCount = pixelSize[0] * pixelSize[1];
1715
+ const DataType = isFloat ? Float32Array : Uint8Array;
1716
+ const bytesPerElement = DataType.BYTES_PER_ELEMENT;
1717
+ const arrayLike = (
1718
+ /** @type {import("../DataTile.js").ArrayLike} */
1719
+ data
1720
+ );
1721
+ const bytesPerRow = arrayLike.byteLength / pixelSize[1];
1722
+ this.bandCount = Math.floor(bytesPerRow / bytesPerElement / pixelSize[0]);
1723
+ const textureCount = Math.ceil(this.bandCount / 4);
1724
+ if (textureCount === 1) {
1725
+ const texture = gl.createTexture();
1726
+ this.textures.push(texture);
1727
+ uploadDataTexture(
1728
+ helper,
1729
+ texture,
1730
+ data,
1731
+ pixelSize,
1732
+ this.bandCount,
1733
+ tile.interpolate
1734
+ );
1735
+ this.setReady();
1736
+ return;
1737
+ }
1738
+ const textureDataArrays = new Array(textureCount);
1739
+ for (let textureIndex = 0; textureIndex < textureCount; ++textureIndex) {
1740
+ const texture = gl.createTexture();
1741
+ this.textures.push(texture);
1742
+ const bandCount = textureIndex < textureCount - 1 ? 4 : (this.bandCount - 1) % 4 + 1;
1743
+ textureDataArrays[textureIndex] = new DataType(pixelCount * bandCount);
1744
+ }
1745
+ let dataIndex = 0;
1746
+ let rowOffset = 0;
1747
+ const colCount = pixelSize[0] * this.bandCount;
1748
+ for (let rowIndex = 0; rowIndex < pixelSize[1]; ++rowIndex) {
1749
+ for (let colIndex = 0; colIndex < colCount; ++colIndex) {
1750
+ const dataValue = (
1751
+ /** @type {Float32Array|Uint8ClampedArray|Uint8Array} */
1752
+ arrayLike[rowOffset + colIndex]
1753
+ );
1754
+ const pixelIndex = Math.floor(dataIndex / this.bandCount);
1755
+ const bandIndex = colIndex % this.bandCount;
1756
+ const textureIndex = Math.floor(bandIndex / 4);
1757
+ const textureData = textureDataArrays[textureIndex];
1758
+ const bandCount = textureData.length / pixelCount;
1759
+ const textureBandIndex = bandIndex % 4;
1760
+ textureData[pixelIndex * bandCount + textureBandIndex] = dataValue;
1761
+ ++dataIndex;
1762
+ }
1763
+ rowOffset += bytesPerRow / bytesPerElement;
1764
+ }
1765
+ for (let textureIndex = 0; textureIndex < textureCount; ++textureIndex) {
1766
+ const texture = this.textures[textureIndex];
1767
+ const textureData = textureDataArrays[textureIndex];
1768
+ const bandCount = textureData.length / pixelCount;
1769
+ uploadDataTexture(
1770
+ helper,
1771
+ texture,
1772
+ textureData,
1773
+ pixelSize,
1774
+ bandCount,
1775
+ tile.interpolate
1776
+ );
1777
+ }
1778
+ this.setReady();
1779
+ }
1780
+ /**
1781
+ * @param {import("../DataTile.js").ImageLike} image The image.
1782
+ * @param {number} renderCol The column index (in rendered tile space).
1783
+ * @param {number} renderRow The row index (in rendered tile space).
1784
+ * @return {Uint8ClampedArray|null} The data.
1785
+ * @private
1786
+ */
1787
+ getImagePixelData_(image, renderCol, renderRow) {
1788
+ const gutter = this.gutter;
1789
+ const renderWidth = this.renderSize_[0];
1790
+ const renderHeight = this.renderSize_[1];
1791
+ if (!pixelContext) {
1792
+ createPixelContext();
1793
+ }
1794
+ const context = (
1795
+ /** @type {CanvasRenderingContext2D} */
1796
+ pixelContext
1797
+ );
1798
+ context.clearRect(0, 0, 1, 1);
1799
+ const sourceWidth = image.width;
1800
+ const sourceHeight = image.height;
1801
+ const sourceWidthWithoutGutter = sourceWidth - 2 * gutter;
1802
+ const sourceHeightWithoutGutter = sourceHeight - 2 * gutter;
1803
+ const sourceCol = gutter + Math.floor(sourceWidthWithoutGutter * (renderCol / renderWidth));
1804
+ const sourceRow = gutter + Math.floor(sourceHeightWithoutGutter * (renderRow / renderHeight));
1805
+ let data;
1806
+ try {
1807
+ context.drawImage(image, sourceCol, sourceRow, 1, 1, 0, 0, 1, 1);
1808
+ data = context.getImageData(0, 0, 1, 1).data;
1809
+ } catch (e) {
1810
+ pixelContext = null;
1811
+ return null;
1812
+ }
1813
+ return data;
1814
+ }
1815
+ /**
1816
+ * @param {import("../DataTile.js").ArrayLike} data The data.
1817
+ * @param {import("../size.js").Size} sourceSize The size.
1818
+ * @param {number} renderCol The column index (in rendered tile space).
1819
+ * @param {number} renderRow The row index (in rendered tile space).
1820
+ * @return {import("../DataTile.js").ArrayLike|null} The data.
1821
+ * @private
1822
+ */
1823
+ getArrayPixelData_(data, sourceSize, renderCol, renderRow) {
1824
+ const gutter = this.gutter;
1825
+ const renderWidth = this.renderSize_[0];
1826
+ const renderHeight = this.renderSize_[1];
1827
+ const sourceWidthWithoutGutter = sourceSize[0];
1828
+ const sourceHeightWithoutGutter = sourceSize[1];
1829
+ const sourceWidth = sourceWidthWithoutGutter + 2 * gutter;
1830
+ const sourceHeight = sourceHeightWithoutGutter + 2 * gutter;
1831
+ const sourceCol = gutter + Math.floor(sourceWidthWithoutGutter * (renderCol / renderWidth));
1832
+ const sourceRow = gutter + Math.floor(sourceHeightWithoutGutter * (renderRow / renderHeight));
1833
+ if (data instanceof DataView) {
1834
+ const bytesPerPixel = data.byteLength / (sourceWidth * sourceHeight);
1835
+ const offset2 = bytesPerPixel * (sourceRow * sourceWidth + sourceCol);
1836
+ const buffer = data.buffer.slice(offset2, offset2 + bytesPerPixel);
1837
+ return new DataView(buffer);
1838
+ }
1839
+ const offset = this.bandCount * (sourceRow * sourceWidth + sourceCol);
1840
+ return data.slice(offset, offset + this.bandCount);
1841
+ }
1842
+ /**
1843
+ * Get data for a pixel. If the tile is not loaded, null is returned.
1844
+ * @param {number} renderCol The column index (in rendered tile space).
1845
+ * @param {number} renderRow The row index (in rendered tile space).
1846
+ * @return {import("../DataTile.js").ArrayLike|null} The data.
1847
+ */
1848
+ getPixelData(renderCol, renderRow) {
1849
+ if (!this.loaded) {
1850
+ return null;
1851
+ }
1852
+ if (this.tile instanceof DataTile_default) {
1853
+ const tileData = this.tile.getData();
1854
+ if (!tileData) {
1855
+ return null;
1856
+ }
1857
+ const arrayData = asArrayLike(tileData);
1858
+ if (arrayData) {
1859
+ const sourceSize = this.tile.getSize();
1860
+ return this.getArrayPixelData_(
1861
+ arrayData,
1862
+ sourceSize,
1863
+ renderCol,
1864
+ renderRow
1865
+ );
1866
+ }
1867
+ const imageData = asImageLike(tileData);
1868
+ if (!imageData) {
1869
+ return null;
1870
+ }
1871
+ return this.getImagePixelData_(imageData, renderCol, renderRow);
1872
+ }
1873
+ const image = this.tile.getImage();
1874
+ if (!image) {
1875
+ return null;
1876
+ }
1877
+ return this.getImagePixelData_(image, renderCol, renderRow);
1878
+ }
1879
+ };
1880
+ var TileTexture_default = TileTexture;
1881
+
1882
+ // node_modules/ol/renderer/webgl/TileLayerBase.js
1883
+ init_dirname();
1884
+ init_buffer();
1885
+ init_process();
1886
+
1887
+ // node_modules/ol/renderer/webgl/Layer.js
1888
+ init_dirname();
1889
+ init_buffer();
1890
+ init_process();
1891
+ var WebGLLayerRenderer = class _WebGLLayerRenderer extends Layer_default {
1892
+ /**
1893
+ * @param {LayerType} layer Layer.
1894
+ * @param {Options} [options] Options.
1895
+ */
1896
+ constructor(layer, options) {
1897
+ super(layer);
1898
+ options = options || {};
1899
+ this.inversePixelTransform_ = create();
1900
+ this.postProcesses_ = options.postProcesses;
1901
+ this.uniforms_ = options.uniforms;
1902
+ this.helper;
1903
+ this.onMapChanged_ = () => {
1904
+ this.clearCache();
1905
+ this.removeHelper();
1906
+ };
1907
+ layer.addChangeListener(Property_default.MAP, this.onMapChanged_);
1908
+ this.dispatchPreComposeEvent = this.dispatchPreComposeEvent.bind(this);
1909
+ this.dispatchPostComposeEvent = this.dispatchPostComposeEvent.bind(this);
1910
+ }
1911
+ /**
1912
+ * @param {WebGLRenderingContext} context The WebGL rendering context.
1913
+ * @param {import("../../Map.js").FrameState} frameState Frame state.
1914
+ * @protected
1915
+ */
1916
+ dispatchPreComposeEvent(context, frameState) {
1917
+ const layer = this.getLayer();
1918
+ if (layer.hasListener(EventType_default2.PRECOMPOSE)) {
1919
+ const event = new Event_default(
1920
+ EventType_default2.PRECOMPOSE,
1921
+ void 0,
1922
+ frameState,
1923
+ context
1924
+ );
1925
+ layer.dispatchEvent(event);
1926
+ }
1927
+ }
1928
+ /**
1929
+ * @param {WebGLRenderingContext} context The WebGL rendering context.
1930
+ * @param {import("../../Map.js").FrameState} frameState Frame state.
1931
+ * @protected
1932
+ */
1933
+ dispatchPostComposeEvent(context, frameState) {
1934
+ const layer = this.getLayer();
1935
+ if (layer.hasListener(EventType_default2.POSTCOMPOSE)) {
1936
+ const event = new Event_default(
1937
+ EventType_default2.POSTCOMPOSE,
1938
+ void 0,
1939
+ frameState,
1940
+ context
1941
+ );
1942
+ layer.dispatchEvent(event);
1943
+ }
1944
+ }
1945
+ /**
1946
+ * Reset options (only handles uniforms).
1947
+ * @param {Options} options Options.
1948
+ */
1949
+ reset(options) {
1950
+ var _a;
1951
+ this.uniforms_ = (_a = options.uniforms) != null ? _a : {};
1952
+ if (this.helper) {
1953
+ this.helper.setUniforms(this.uniforms_);
1954
+ }
1955
+ }
1956
+ /**
1957
+ * @protected
1958
+ */
1959
+ removeHelper() {
1960
+ if (this.helper) {
1961
+ this.helper.dispose();
1962
+ this.helper = /** @type {import("../../webgl/Helper.js").default} */
1963
+ /** @type {unknown} */
1964
+ void 0;
1965
+ }
1966
+ }
1967
+ /**
1968
+ * Determine whether renderFrame should be called.
1969
+ * @param {import("../../Map.js").FrameState} frameState Frame state.
1970
+ * @return {boolean} Layer is ready to be rendered.
1971
+ * @override
1972
+ */
1973
+ prepareFrame(frameState) {
1974
+ if (this.getLayer().getRenderSource()) {
1975
+ let incrementGroup = true;
1976
+ let groupNumber = -1;
1977
+ let className;
1978
+ for (let i = 0, ii = frameState.layerStatesArray.length; i < ii; i++) {
1979
+ const layer = (
1980
+ /** @type {import("../../layer/Layer.js").default} */
1981
+ frameState.layerStatesArray[i].layer
1982
+ );
1983
+ const renderer = layer.getRenderer();
1984
+ if (!(renderer instanceof _WebGLLayerRenderer)) {
1985
+ incrementGroup = true;
1986
+ continue;
1987
+ }
1988
+ const layerClassName = layer.getClassName();
1989
+ if (incrementGroup || layerClassName !== className) {
1990
+ groupNumber += 1;
1991
+ incrementGroup = false;
1992
+ }
1993
+ className = layerClassName;
1994
+ if (renderer === this) {
1995
+ break;
1996
+ }
1997
+ }
1998
+ const canvasCacheKey = "map/" + frameState.mapId + "/group/" + groupNumber;
1999
+ if (!this.helper || !this.helper.canvasCacheKeyMatches(canvasCacheKey) || this.helper.needsToBeRecreated()) {
2000
+ this.removeHelper();
2001
+ this.helper = new Helper_default({
2002
+ postProcesses: this.postProcesses_,
2003
+ uniforms: this.uniforms_,
2004
+ canvasCacheKey
2005
+ });
2006
+ if (className) {
2007
+ this.helper.getCanvas().className = className;
2008
+ }
2009
+ this.afterHelperCreated();
2010
+ }
2011
+ }
2012
+ return this.prepareFrameInternal(frameState);
2013
+ }
2014
+ /**
2015
+ * @protected
2016
+ */
2017
+ afterHelperCreated() {
2018
+ }
2019
+ /**
2020
+ * Determine whether renderFrame should be called.
2021
+ * @param {import("../../Map.js").FrameState} frameState Frame state.
2022
+ * @return {boolean} Layer is ready to be rendered.
2023
+ * @protected
2024
+ */
2025
+ prepareFrameInternal(frameState) {
2026
+ return true;
2027
+ }
2028
+ /**
2029
+ * @protected
2030
+ */
2031
+ clearCache() {
2032
+ }
2033
+ /**
2034
+ * @protected
2035
+ * @param {Array<PostProcessesOptions>} postProcesses New post processes array
2036
+ */
2037
+ setPostProcesses(postProcesses) {
2038
+ this.postProcesses_ = postProcesses;
2039
+ this.removeHelper();
2040
+ }
2041
+ /**
2042
+ * @protected
2043
+ * @return {Array<PostProcessesOptions>} Array of post processes
2044
+ */
2045
+ getPostProcesses() {
2046
+ var _a;
2047
+ return (_a = this.postProcesses_) != null ? _a : [];
2048
+ }
2049
+ /**
2050
+ * Clean up.
2051
+ * @override
2052
+ */
2053
+ disposeInternal() {
2054
+ var _a;
2055
+ this.clearCache();
2056
+ this.removeHelper();
2057
+ (_a = this.getLayer()) == null ? void 0 : _a.removeChangeListener(
2058
+ Property_default.MAP,
2059
+ this.onMapChanged_
2060
+ );
2061
+ super.disposeInternal();
2062
+ }
2063
+ /**
2064
+ * @param {import("../../render/EventType.js").default} type Event type.
2065
+ * @param {WebGLRenderingContext} context The rendering context.
2066
+ * @param {import("../../Map.js").FrameState} frameState Frame state.
2067
+ * @private
2068
+ */
2069
+ dispatchRenderEvent_(type, context, frameState) {
2070
+ const layer = this.getLayer();
2071
+ if (layer.hasListener(type)) {
2072
+ compose(
2073
+ this.inversePixelTransform_,
2074
+ 0,
2075
+ 0,
2076
+ frameState.pixelRatio,
2077
+ -frameState.pixelRatio,
2078
+ 0,
2079
+ 0,
2080
+ -frameState.size[1]
2081
+ );
2082
+ const event = new Event_default(
2083
+ type,
2084
+ this.inversePixelTransform_,
2085
+ frameState,
2086
+ context
2087
+ );
2088
+ layer.dispatchEvent(event);
2089
+ }
2090
+ }
2091
+ /**
2092
+ * @param {WebGLRenderingContext} context The rendering context.
2093
+ * @param {import("../../Map.js").FrameState} frameState Frame state.
2094
+ * @protected
2095
+ */
2096
+ preRender(context, frameState) {
2097
+ this.dispatchRenderEvent_(EventType_default2.PRERENDER, context, frameState);
2098
+ }
2099
+ /**
2100
+ * @param {WebGLRenderingContext} context The rendering context.
2101
+ * @param {import("../../Map.js").FrameState} frameState Frame state.
2102
+ * @protected
2103
+ */
2104
+ postRender(context, frameState) {
2105
+ this.dispatchRenderEvent_(EventType_default2.POSTRENDER, context, frameState);
2106
+ }
2107
+ };
2108
+ var Layer_default2 = WebGLLayerRenderer;
2109
+
2110
+ // node_modules/ol/renderer/webgl/TileLayerBase.js
2111
+ var Uniforms = __spreadProps(__spreadValues({}, DefaultUniform), {
2112
+ TILE_TRANSFORM: "u_tileTransform",
2113
+ TRANSITION_ALPHA: "u_transitionAlpha",
2114
+ DEPTH: "u_depth",
2115
+ RENDER_EXTENT: "u_renderExtent",
2116
+ // intersection of layer, source, and view extent
2117
+ GLOBAL_ALPHA: "u_globalAlpha"
2118
+ });
2119
+ function depthForZ(z) {
2120
+ return 1 / (z + 2);
2121
+ }
2122
+ function newTileRepresentationLookup() {
2123
+ return { tileIds: /* @__PURE__ */ new Set(), representationsByZ: {} };
2124
+ }
2125
+ function lookupHasTile(tileRepresentationLookup, tile) {
2126
+ return tileRepresentationLookup.tileIds.has(getUid(tile));
2127
+ }
2128
+ function addTileRepresentationToLookup(tileRepresentationLookup, tileRepresentation, z) {
2129
+ const representationsByZ = tileRepresentationLookup.representationsByZ;
2130
+ if (!(z in representationsByZ)) {
2131
+ representationsByZ[z] = /* @__PURE__ */ new Set();
2132
+ }
2133
+ representationsByZ[z].add(tileRepresentation);
2134
+ tileRepresentationLookup.tileIds.add(getUid(tileRepresentation.tile));
2135
+ }
2136
+ function removeTileRepresentationFromLookup(tileRepresentationLookup, tileRepresentation, z) {
2137
+ const representations = tileRepresentationLookup.representationsByZ[z];
2138
+ if (representations) {
2139
+ representations.delete(tileRepresentation);
2140
+ }
2141
+ tileRepresentationLookup.tileIds.delete(getUid(tileRepresentation.tile));
2142
+ }
2143
+ function getRenderExtent(frameState, extent) {
2144
+ const layerState = frameState.layerStatesArray[frameState.layerIndex];
2145
+ if (layerState.extent) {
2146
+ extent = getIntersection(
2147
+ extent,
2148
+ fromUserExtent(layerState.extent, frameState.viewState.projection)
2149
+ );
2150
+ }
2151
+ const layer = layerState.layer;
2152
+ if (!layer) {
2153
+ return extent;
2154
+ }
2155
+ const source = (
2156
+ /** @type {import("../../source/Tile.js").default} */
2157
+ layer.getRenderSource()
2158
+ );
2159
+ if (!source.getWrapX()) {
2160
+ const gridExtent = source.getTileGridForProjection(frameState.viewState.projection).getExtent();
2161
+ if (gridExtent) {
2162
+ extent = getIntersection(extent, gridExtent);
2163
+ }
2164
+ }
2165
+ return extent;
2166
+ }
2167
+ function getCacheKey(source, tileCoord, key = source.getKey()) {
2168
+ return `${getUid(source)},${key},${getKey(tileCoord)}`;
2169
+ }
2170
+ var WebGLBaseTileLayerRenderer = class extends Layer_default2 {
2171
+ /**
2172
+ * @param {LayerType} tileLayer Tile layer.
2173
+ * @param {Options} options Options.
2174
+ */
2175
+ constructor(tileLayer, options) {
2176
+ super(tileLayer, {
2177
+ uniforms: options.uniforms,
2178
+ postProcesses: options.postProcesses
2179
+ });
2180
+ this.renderComplete = false;
2181
+ this.tileTransform_ = create();
2182
+ this.tmpCoords_ = [0, 0];
2183
+ this.tmpCoords2_ = [0, 0];
2184
+ this.tmpExtent_ = [0, 0, 0, 0];
2185
+ this.tmpTransform_ = create();
2186
+ this.tmpMat4_ = create2();
2187
+ this.tempTileRange_ = new TileRange_default(0, 0, 0, 0);
2188
+ this.tempTileCoord_ = createOrUpdate(0, 0, 0);
2189
+ this.tempSize_ = [0, 0];
2190
+ const cacheSize = options.cacheSize !== void 0 ? options.cacheSize : 512;
2191
+ this.tileRepresentationCache = new LRUCache_default(cacheSize);
2192
+ this.maxStaleKeys = cacheSize * 0.5;
2193
+ this.frameState = null;
2194
+ this.renderedProjection_ = void 0;
2195
+ this.sourceTileCache_ = null;
2196
+ }
2197
+ /**
2198
+ * @param {Options} options Options.
2199
+ * @override
2200
+ */
2201
+ reset(options) {
2202
+ super.reset({
2203
+ uniforms: options.uniforms
2204
+ });
2205
+ }
2206
+ /**
2207
+ * Determine whether renderFrame should be called.
2208
+ * @param {import("../../Map.js").FrameState} frameState Frame state.
2209
+ * @return {boolean} Layer is ready to be rendered.
2210
+ * @override
2211
+ */
2212
+ prepareFrameInternal(frameState) {
2213
+ if (!this.renderedProjection_) {
2214
+ this.renderedProjection_ = frameState.viewState.projection;
2215
+ } else if (frameState.viewState.projection !== this.renderedProjection_) {
2216
+ this.clearCache();
2217
+ this.renderedProjection_ = frameState.viewState.projection;
2218
+ }
2219
+ const layer = this.getLayer();
2220
+ const source = layer.getRenderSource();
2221
+ if (!source) {
2222
+ return false;
2223
+ }
2224
+ const extent = frameState.extent;
2225
+ if (!extent || isEmpty(getRenderExtent(frameState, extent))) {
2226
+ return false;
2227
+ }
2228
+ return source.getState() === "ready";
2229
+ }
2230
+ /**
2231
+ * @abstract
2232
+ * @param {import("../../webgl/BaseTileRepresentation.js").TileRepresentationOptions<TileType>} options tile representation options
2233
+ * @return {TileRepresentation} A new tile representation
2234
+ * @protected
2235
+ */
2236
+ createTileRepresentation(options) {
2237
+ return abstract();
2238
+ }
2239
+ /**
2240
+ * @param {import("../../Map.js").FrameState} frameState Frame state.
2241
+ * @param {import("../../extent.js").Extent} extent The extent to be rendered.
2242
+ * @param {number} initialZ The zoom level.
2243
+ * @param {TileRepresentationLookup} tileRepresentationLookup The zoom level.
2244
+ * @param {number} preload Number of additional levels to load.
2245
+ */
2246
+ enqueueTiles(frameState, extent, initialZ, tileRepresentationLookup, preload) {
2247
+ const viewState = frameState.viewState;
2248
+ const tileLayer = this.getLayer();
2249
+ const tileSource = tileLayer.getRenderSource();
2250
+ const tileGrid = tileSource.getTileGridForProjection(viewState.projection);
2251
+ const gutter = tileSource.getGutterForProjection(viewState.projection);
2252
+ const tileSourceKey = getUid(tileSource);
2253
+ if (!(tileSourceKey in frameState.wantedTiles)) {
2254
+ frameState.wantedTiles[tileSourceKey] = {};
2255
+ }
2256
+ const wantedTiles = frameState.wantedTiles[tileSourceKey];
2257
+ const tileRepresentationCache = this.tileRepresentationCache;
2258
+ const map = tileLayer.getMapInternal();
2259
+ const minZ = Math.max(
2260
+ initialZ - preload,
2261
+ tileGrid.getMinZoom(),
2262
+ tileGrid.getZForResolution(
2263
+ Math.min(
2264
+ tileLayer.getMaxResolution(),
2265
+ map ? map.getView().getResolutionForZoom(Math.max(tileLayer.getMinZoom(), 0)) : tileGrid.getResolution(0)
2266
+ ),
2267
+ tileSource.zDirection
2268
+ )
2269
+ );
2270
+ const rotation = viewState.rotation;
2271
+ const viewport = rotation ? getRotatedViewport(
2272
+ viewState.center,
2273
+ viewState.resolution,
2274
+ rotation,
2275
+ frameState.size
2276
+ ) : void 0;
2277
+ for (let z = initialZ; z >= minZ; --z) {
2278
+ const tileRange = tileGrid.getTileRangeForExtentAndZ(
2279
+ extent,
2280
+ z,
2281
+ this.tempTileRange_
2282
+ );
2283
+ const tileResolution = tileGrid.getResolution(z);
2284
+ for (let x = tileRange.minX; x <= tileRange.maxX; ++x) {
2285
+ for (let y = tileRange.minY; y <= tileRange.maxY; ++y) {
2286
+ if (rotation && !tileGrid.tileCoordIntersectsViewport([z, x, y], viewport)) {
2287
+ continue;
2288
+ }
2289
+ const tileCoord = createOrUpdate(z, x, y, this.tempTileCoord_);
2290
+ const cacheKey = getCacheKey(tileSource, tileCoord);
2291
+ let tileRepresentation;
2292
+ let tile;
2293
+ if (tileRepresentationCache.containsKey(cacheKey)) {
2294
+ tileRepresentation = tileRepresentationCache.get(cacheKey);
2295
+ tile = tileRepresentation.tile;
2296
+ }
2297
+ if (!tileRepresentation || tileRepresentation.tile.key !== tileSource.getKey()) {
2298
+ const sourceProjection = tileSource.getProjection();
2299
+ const sourceTileCache = sourceProjection && !equivalent(sourceProjection, viewState.projection) ? this.getSourceTileCache_() : void 0;
2300
+ tile = tileSource.getTile(
2301
+ z,
2302
+ x,
2303
+ y,
2304
+ frameState.pixelRatio,
2305
+ viewState.projection,
2306
+ sourceTileCache
2307
+ );
2308
+ if (!tile) {
2309
+ continue;
2310
+ }
2311
+ }
2312
+ if (!tile) {
2313
+ continue;
2314
+ }
2315
+ if (lookupHasTile(tileRepresentationLookup, tile)) {
2316
+ continue;
2317
+ }
2318
+ if (!tileRepresentation) {
2319
+ tileRepresentation = this.createTileRepresentation({
2320
+ tile,
2321
+ grid: tileGrid,
2322
+ helper: this.helper,
2323
+ gutter
2324
+ });
2325
+ tileRepresentationCache.set(cacheKey, tileRepresentation);
2326
+ } else {
2327
+ tileRepresentation.setTile(tile);
2328
+ }
2329
+ addTileRepresentationToLookup(
2330
+ tileRepresentationLookup,
2331
+ tileRepresentation,
2332
+ z
2333
+ );
2334
+ const tileQueueKey = tile.getKey();
2335
+ wantedTiles[tileQueueKey] = true;
2336
+ if (tile.getState() === TileState_default.IDLE) {
2337
+ if (!frameState.tileQueue.isKeyQueued(tileQueueKey)) {
2338
+ frameState.tileQueue.enqueue([
2339
+ tile,
2340
+ tileSourceKey,
2341
+ tileGrid.getTileCoordCenter(tileCoord),
2342
+ tileResolution
2343
+ ]);
2344
+ }
2345
+ }
2346
+ }
2347
+ }
2348
+ }
2349
+ }
2350
+ /**
2351
+ * @param {import("../../Map.js").FrameState} frameState Frame state.
2352
+ * @param {boolean} tilesWithAlpha True if at least one of the rendered tiles has alpha
2353
+ * @protected
2354
+ */
2355
+ beforeTilesRender(frameState, tilesWithAlpha) {
2356
+ var _a;
2357
+ const currentFrameState = (_a = this.frameState) != null ? _a : frameState;
2358
+ this.helper.prepareDraw(currentFrameState, !tilesWithAlpha, true);
2359
+ }
2360
+ /**
2361
+ * @param {import("../../Map.js").FrameState} frameState Frame state.
2362
+ * @return {boolean} If returns false, tile mask rendering will be skipped
2363
+ * @protected
2364
+ */
2365
+ beforeTilesMaskRender(frameState) {
2366
+ return false;
2367
+ }
2368
+ /**
2369
+ * @param {TileRepresentation} tileRepresentation Tile representation
2370
+ * @param {import("../../transform.js").Transform} tileTransform Tile transform
2371
+ * @param {import("../../Map.js").FrameState} frameState Frame state
2372
+ * @param {import("../../extent.js").Extent} renderExtent Render extent
2373
+ * @param {number} tileResolution Tile resolution
2374
+ * @param {import("../../size.js").Size} tileSize Tile size
2375
+ * @param {import("../../coordinate.js").Coordinate} tileOrigin Tile origin
2376
+ * @param {import("../../extent.js").Extent} tileExtent tile Extent
2377
+ * @param {number} depth Depth
2378
+ * @param {number} gutter Gutter
2379
+ * @param {number} alpha Alpha
2380
+ * @protected
2381
+ */
2382
+ renderTile(tileRepresentation, tileTransform, frameState, renderExtent, tileResolution, tileSize, tileOrigin, tileExtent, depth, gutter, alpha) {
2383
+ }
2384
+ /**
2385
+ * @param {TileRepresentation} tileRepresentation Tile representation
2386
+ * @param {number} tileZ Tile Z
2387
+ * @param {import("../../extent.js").Extent} extent Render extent
2388
+ * @param {number} depth Depth
2389
+ * @protected
2390
+ */
2391
+ renderTileMask(tileRepresentation, tileZ, extent, depth) {
2392
+ }
2393
+ /**
2394
+ * @param {import("../../Map.js").FrameState} frameState Frame state.
2395
+ * @param {TileRepresentation} tileRepresentation Tile representation.
2396
+ * @param {number} tileZ Tile Z.
2397
+ * @param {number} gutter Gutter.
2398
+ * @param {import("../../extent.js").Extent} extent Render extent.
2399
+ * @param {Object<string, number>} alphaLookup Alpha lookup.
2400
+ * @param {import("../../tilegrid/TileGrid.js").default} tileGrid Tile grid.
2401
+ * @private
2402
+ */
2403
+ drawTile_(frameState, tileRepresentation, tileZ, gutter, extent, alphaLookup, tileGrid) {
2404
+ if (!tileRepresentation.ready) {
2405
+ return;
2406
+ }
2407
+ const tile = tileRepresentation.tile;
2408
+ const tileCoord = tile.tileCoord;
2409
+ const tileCoordKey = getKey(tileCoord);
2410
+ const alpha = tileCoordKey in alphaLookup ? alphaLookup[tileCoordKey] : 1;
2411
+ const tileResolution = tileGrid.getResolution(tileZ);
2412
+ const tileSize = toSize(tileGrid.getTileSize(tileZ), this.tempSize_);
2413
+ const tileOrigin = tileGrid.getOrigin(tileZ);
2414
+ const tileExtent = tileGrid.getTileCoordExtent(tileCoord);
2415
+ const depth = alpha < 1 ? -1 : depthForZ(tileZ);
2416
+ if (alpha < 1) {
2417
+ frameState.animate = true;
2418
+ }
2419
+ const viewState = frameState.viewState;
2420
+ const centerX = viewState.center[0];
2421
+ const centerY = viewState.center[1];
2422
+ const tileWidthWithGutter = tileSize[0] + 2 * gutter;
2423
+ const tileHeightWithGutter = tileSize[1] + 2 * gutter;
2424
+ const aspectRatio = tileWidthWithGutter / tileHeightWithGutter;
2425
+ const centerI = (centerX - tileOrigin[0]) / (tileSize[0] * tileResolution);
2426
+ const centerJ = (tileOrigin[1] - centerY) / (tileSize[1] * tileResolution);
2427
+ const tileScale = viewState.resolution / tileResolution;
2428
+ const tileCenterI = tileCoord[1];
2429
+ const tileCenterJ = tileCoord[2];
2430
+ reset(this.tileTransform_);
2431
+ scale(
2432
+ this.tileTransform_,
2433
+ 2 / (frameState.size[0] * tileScale / tileWidthWithGutter),
2434
+ -2 / (frameState.size[1] * tileScale / tileWidthWithGutter)
2435
+ );
2436
+ rotate(this.tileTransform_, viewState.rotation);
2437
+ scale(this.tileTransform_, 1, 1 / aspectRatio);
2438
+ translate(
2439
+ this.tileTransform_,
2440
+ (tileSize[0] * (tileCenterI - centerI) - gutter) / tileWidthWithGutter,
2441
+ (tileSize[1] * (tileCenterJ - centerJ) - gutter) / tileHeightWithGutter
2442
+ );
2443
+ this.renderTile(
2444
+ /** @type {TileRepresentation} */
2445
+ tileRepresentation,
2446
+ this.tileTransform_,
2447
+ frameState,
2448
+ extent,
2449
+ tileResolution,
2450
+ tileSize,
2451
+ tileOrigin,
2452
+ tileExtent,
2453
+ depth,
2454
+ gutter,
2455
+ alpha
2456
+ );
2457
+ }
2458
+ /**
2459
+ * Render the layer.
2460
+ * @param {import("../../Map.js").FrameState} frameState Frame state.
2461
+ * @return {HTMLElement} The rendered element.
2462
+ * @override
2463
+ */
2464
+ renderFrame(frameState) {
2465
+ this.frameState = frameState;
2466
+ this.renderComplete = true;
2467
+ const gl = this.helper.getGL();
2468
+ this.preRender(gl, frameState);
2469
+ const viewState = frameState.viewState;
2470
+ const tileLayer = this.getLayer();
2471
+ const tileSource = tileLayer.getRenderSource();
2472
+ const tileGrid = tileSource.getTileGridForProjection(viewState.projection);
2473
+ const gutter = tileSource.getGutterForProjection(viewState.projection);
2474
+ const frameExtent = frameState.extent;
2475
+ if (!frameExtent) {
2476
+ return this.helper.getCanvas();
2477
+ }
2478
+ const extent = getRenderExtent(frameState, frameExtent);
2479
+ const z = tileGrid.getZForResolution(
2480
+ viewState.resolution,
2481
+ tileSource.zDirection
2482
+ );
2483
+ this.updateStaleKeys(tileSource.getKey());
2484
+ const tileRepresentationLookup = newTileRepresentationLookup();
2485
+ const preload = tileLayer.getPreload();
2486
+ if (frameState.nextExtent) {
2487
+ const targetZ = tileGrid.getZForResolution(
2488
+ viewState.nextResolution,
2489
+ tileSource.zDirection
2490
+ );
2491
+ const nextExtent = getRenderExtent(frameState, frameState.nextExtent);
2492
+ this.enqueueTiles(
2493
+ frameState,
2494
+ nextExtent,
2495
+ targetZ,
2496
+ tileRepresentationLookup,
2497
+ preload
2498
+ );
2499
+ }
2500
+ this.enqueueTiles(frameState, extent, z, tileRepresentationLookup, 0);
2501
+ if (preload > 0) {
2502
+ setTimeout(() => {
2503
+ this.enqueueTiles(
2504
+ frameState,
2505
+ extent,
2506
+ z - 1,
2507
+ tileRepresentationLookup,
2508
+ preload - 1
2509
+ );
2510
+ }, 0);
2511
+ }
2512
+ const alphaLookup = {};
2513
+ let blend = false;
2514
+ const representationsByZ = tileRepresentationLookup.representationsByZ;
2515
+ if (z in representationsByZ) {
2516
+ const uid = getUid(this);
2517
+ const time = frameState.time;
2518
+ for (const tileRepresentation of representationsByZ[z]) {
2519
+ const tile = tileRepresentation.tile;
2520
+ if (tile.getState() === TileState_default.EMPTY) {
2521
+ continue;
2522
+ }
2523
+ const tileCoord = tile.tileCoord;
2524
+ const tileCoordKey = getKey(tileCoord);
2525
+ if (tileRepresentation.ready) {
2526
+ const alpha = tile.getAlpha(uid, time);
2527
+ if (alpha === 1) {
2528
+ tile.endTransition(uid);
2529
+ continue;
2530
+ }
2531
+ blend = true;
2532
+ alphaLookup[tileCoordKey] = alpha;
2533
+ }
2534
+ this.renderComplete = false;
2535
+ const hasStaleTile = this.findStaleTile_(
2536
+ tileCoord,
2537
+ tileRepresentationLookup
2538
+ );
2539
+ if (hasStaleTile) {
2540
+ delete alphaLookup[tileCoordKey];
2541
+ removeTileRepresentationFromLookup(
2542
+ tileRepresentationLookup,
2543
+ tileRepresentation,
2544
+ z
2545
+ );
2546
+ frameState.animate = true;
2547
+ continue;
2548
+ }
2549
+ const coveredByChildren = this.findAltTiles_(
2550
+ tileGrid,
2551
+ tileCoord,
2552
+ z + 1,
2553
+ tileRepresentationLookup
2554
+ );
2555
+ if (coveredByChildren) {
2556
+ continue;
2557
+ }
2558
+ const minZoom = tileGrid.getMinZoom();
2559
+ for (let parentZ = z - 1; parentZ >= minZoom; --parentZ) {
2560
+ const coveredByParent = this.findAltTiles_(
2561
+ tileGrid,
2562
+ tileCoord,
2563
+ parentZ,
2564
+ tileRepresentationLookup
2565
+ );
2566
+ if (coveredByParent) {
2567
+ break;
2568
+ }
2569
+ }
2570
+ }
2571
+ }
2572
+ const zs = Object.keys(representationsByZ).map(Number).sort(descending);
2573
+ const renderTileMask = this.beforeTilesMaskRender(frameState);
2574
+ if (renderTileMask) {
2575
+ for (let j = 0, jj = zs.length; j < jj; ++j) {
2576
+ const tileZ = zs[j];
2577
+ for (const tileRepresentation of representationsByZ[tileZ]) {
2578
+ const tileCoord = tileRepresentation.tile.tileCoord;
2579
+ const tileCoordKey = getKey(tileCoord);
2580
+ if (tileCoordKey in alphaLookup) {
2581
+ continue;
2582
+ }
2583
+ const tileExtent = tileGrid.getTileCoordExtent(tileCoord);
2584
+ this.renderTileMask(
2585
+ /** @type {TileRepresentation} */
2586
+ tileRepresentation,
2587
+ tileZ,
2588
+ tileExtent,
2589
+ depthForZ(tileZ)
2590
+ );
2591
+ }
2592
+ }
2593
+ }
2594
+ this.beforeTilesRender(frameState, blend);
2595
+ for (let j = 0, jj = zs.length; j < jj; ++j) {
2596
+ const tileZ = zs[j];
2597
+ for (const tileRepresentation of representationsByZ[tileZ]) {
2598
+ const tileCoord = tileRepresentation.tile.tileCoord;
2599
+ const tileCoordKey = getKey(tileCoord);
2600
+ if (tileCoordKey in alphaLookup) {
2601
+ continue;
2602
+ }
2603
+ this.drawTile_(
2604
+ frameState,
2605
+ /** @type {TileRepresentation} */
2606
+ tileRepresentation,
2607
+ tileZ,
2608
+ gutter,
2609
+ extent,
2610
+ alphaLookup,
2611
+ tileGrid
2612
+ );
2613
+ }
2614
+ }
2615
+ if (z in representationsByZ) {
2616
+ for (const tileRepresentation of representationsByZ[z]) {
2617
+ const tileCoord = tileRepresentation.tile.tileCoord;
2618
+ const tileCoordKey = getKey(tileCoord);
2619
+ if (tileCoordKey in alphaLookup) {
2620
+ this.drawTile_(
2621
+ frameState,
2622
+ /** @type {TileRepresentation} */
2623
+ tileRepresentation,
2624
+ z,
2625
+ gutter,
2626
+ extent,
2627
+ alphaLookup,
2628
+ tileGrid
2629
+ );
2630
+ }
2631
+ }
2632
+ }
2633
+ this.beforeFinalize(frameState);
2634
+ this.helper.finalizeDraw(
2635
+ frameState,
2636
+ this.dispatchPreComposeEvent,
2637
+ this.dispatchPostComposeEvent
2638
+ );
2639
+ const canvas = this.helper.getCanvas();
2640
+ const tileRepresentationCache = this.tileRepresentationCache;
2641
+ tileRepresentationCache.expireCache();
2642
+ this.postRender(gl, frameState);
2643
+ return canvas;
2644
+ }
2645
+ /**
2646
+ * @param {import("../../Map.js").FrameState} frameState Frame state.
2647
+ * @protected
2648
+ */
2649
+ beforeFinalize(frameState) {
2650
+ }
2651
+ /**
2652
+ * Look for a ready tile at the same coordinate from a previous source key.
2653
+ * A match is added to the provided lookup at the target zoom level.
2654
+ * @param {import("../../tilecoord.js").TileCoord} tileCoord The target tile coordinate.
2655
+ * @param {TileRepresentationLookup} tileRepresentationLookup Lookup of
2656
+ * tile representations by zoom level.
2657
+ * @return {boolean} A stale tile was found and added to the lookup.
2658
+ * @private
2659
+ */
2660
+ findStaleTile_(tileCoord, tileRepresentationLookup) {
2661
+ const tileRepresentationCache = this.tileRepresentationCache;
2662
+ const source = this.getLayer().getRenderSource();
2663
+ const z = tileCoord[0];
2664
+ const staleKeys = this.getStaleKeys();
2665
+ for (let i = 0, ii = staleKeys.length; i < ii; ++i) {
2666
+ const cacheKey = getCacheKey(source, tileCoord, staleKeys[i]);
2667
+ if (tileRepresentationCache.containsKey(cacheKey)) {
2668
+ const tileRepresentation = tileRepresentationCache.get(cacheKey);
2669
+ if (tileRepresentation.ready && !lookupHasTile(tileRepresentationLookup, tileRepresentation.tile)) {
2670
+ tileRepresentation.tile.endTransition(getUid(this));
2671
+ addTileRepresentationToLookup(
2672
+ tileRepresentationLookup,
2673
+ tileRepresentation,
2674
+ z
2675
+ );
2676
+ return true;
2677
+ }
2678
+ }
2679
+ }
2680
+ return false;
2681
+ }
2682
+ /**
2683
+ * Look for tiles covering the provided tile coordinate at an alternate
2684
+ * zoom level. Loaded tiles will be added to the provided tile representation lookup.
2685
+ * @param {import("../../tilegrid/TileGrid.js").default} tileGrid The tile grid.
2686
+ * @param {import("../../tilecoord.js").TileCoord} tileCoord The target tile coordinate.
2687
+ * @param {number} altZ The alternate zoom level.
2688
+ * @param {TileRepresentationLookup} tileRepresentationLookup Lookup of
2689
+ * tile representations by zoom level.
2690
+ * @return {boolean} The tile coordinate is covered by loaded tiles at the alternate zoom level.
2691
+ * @private
2692
+ */
2693
+ findAltTiles_(tileGrid, tileCoord, altZ, tileRepresentationLookup) {
2694
+ const tileRange = tileGrid.getTileRangeForTileCoordAndZ(
2695
+ tileCoord,
2696
+ altZ,
2697
+ this.tempTileRange_
2698
+ );
2699
+ if (!tileRange) {
2700
+ return false;
2701
+ }
2702
+ let covered = true;
2703
+ const tileRepresentationCache = this.tileRepresentationCache;
2704
+ const source = this.getLayer().getRenderSource();
2705
+ for (let x = tileRange.minX; x <= tileRange.maxX; ++x) {
2706
+ for (let y = tileRange.minY; y <= tileRange.maxY; ++y) {
2707
+ const cacheKey = getCacheKey(source, [altZ, x, y]);
2708
+ let loaded = false;
2709
+ if (tileRepresentationCache.containsKey(cacheKey)) {
2710
+ const tileRepresentation = tileRepresentationCache.get(cacheKey);
2711
+ if (tileRepresentation.ready && !lookupHasTile(tileRepresentationLookup, tileRepresentation.tile)) {
2712
+ addTileRepresentationToLookup(
2713
+ tileRepresentationLookup,
2714
+ tileRepresentation,
2715
+ altZ
2716
+ );
2717
+ loaded = true;
2718
+ }
2719
+ }
2720
+ if (!loaded) {
2721
+ covered = false;
2722
+ }
2723
+ }
2724
+ }
2725
+ return covered;
2726
+ }
2727
+ /**
2728
+ * @override
2729
+ */
2730
+ /**
2731
+ * @return {import("../../structs/LRUCache.js").default<import("../../Tile.js").default>} Source tile cache.
2732
+ * @private
2733
+ */
2734
+ getSourceTileCache_() {
2735
+ if (!this.sourceTileCache_) {
2736
+ this.sourceTileCache_ = new LRUCache_default(512);
2737
+ }
2738
+ return this.sourceTileCache_;
2739
+ }
2740
+ /**
2741
+ * @override
2742
+ */
2743
+ clearCache() {
2744
+ var _a;
2745
+ super.clearCache();
2746
+ const tileRepresentationCache = this.tileRepresentationCache;
2747
+ tileRepresentationCache.forEach(
2748
+ (tileRepresentation) => tileRepresentation.dispose()
2749
+ );
2750
+ tileRepresentationCache.clear();
2751
+ (_a = this.sourceTileCache_) == null ? void 0 : _a.clear();
2752
+ }
2753
+ /**
2754
+ * @override
2755
+ */
2756
+ afterHelperCreated() {
2757
+ super.afterHelperCreated();
2758
+ this.tileRepresentationCache.forEach(
2759
+ (tileRepresentation) => tileRepresentation.setHelper(this.helper)
2760
+ );
2761
+ }
2762
+ /**
2763
+ * Clean up.
2764
+ * @override
2765
+ */
2766
+ disposeInternal() {
2767
+ super.disposeInternal();
2768
+ this.frameState = null;
2769
+ }
2770
+ /**
2771
+ * Apply the render extent as a uniform; the render extent uniform is expressed in the same coordinate space as the geometries in the render buffers,
2772
+ * whereas the input render extent is expressed in full world coordinates.
2773
+ * @protected
2774
+ * @param {import("../../extent.js").Extent} renderExtent Render extent in map units (world coordinates)
2775
+ * @param {import('../../transform.js').Transform} worldToLocalTransform Transform.
2776
+ */
2777
+ applyRenderExtentUniform(renderExtent, worldToLocalTransform) {
2778
+ this.tmpCoords_[0] = renderExtent[0];
2779
+ this.tmpCoords_[1] = renderExtent[1];
2780
+ apply(worldToLocalTransform, this.tmpCoords_);
2781
+ this.tmpCoords2_[0] = renderExtent[2];
2782
+ this.tmpCoords2_[1] = renderExtent[3];
2783
+ apply(worldToLocalTransform, this.tmpCoords2_);
2784
+ this.tmpExtent_[0] = this.tmpCoords_[0];
2785
+ this.tmpExtent_[1] = this.tmpCoords_[1];
2786
+ this.tmpExtent_[2] = this.tmpCoords2_[0];
2787
+ this.tmpExtent_[3] = this.tmpCoords2_[1];
2788
+ this.helper.setUniformFloatVec4(Uniforms.RENDER_EXTENT, this.tmpExtent_);
2789
+ }
2790
+ };
2791
+ var TileLayerBase_default = WebGLBaseTileLayerRenderer;
2792
+
2793
+ // node_modules/ol/renderer/webgl/TileLayer.js
2794
+ var Uniforms2 = __spreadProps(__spreadValues({}, Uniforms), {
2795
+ TILE_TEXTURE_ARRAY: "u_tileTextures",
2796
+ TEXTURE_PIXEL_WIDTH: "u_texturePixelWidth",
2797
+ TEXTURE_PIXEL_HEIGHT: "u_texturePixelHeight",
2798
+ TEXTURE_RESOLUTION: "u_textureResolution"
2799
+ // map units per texture pixel
2800
+ });
2801
+ var Attributes = {
2802
+ TEXTURE_COORD: "a_textureCoord"
2803
+ };
2804
+ var attributeDescriptions = [
2805
+ {
2806
+ name: Attributes.TEXTURE_COORD,
2807
+ size: 2,
2808
+ type: AttributeType.FLOAT
2809
+ }
2810
+ ];
2811
+ var WebGLTileLayerRenderer = class extends TileLayerBase_default {
2812
+ /**
2813
+ * @param {LayerType} tileLayer Tile layer.
2814
+ * @param {Options} options Options.
2815
+ */
2816
+ constructor(tileLayer, options) {
2817
+ super(tileLayer, options);
2818
+ this.program_;
2819
+ this.vertexShader_ = options.vertexShader;
2820
+ this.fragmentShader_ = options.fragmentShader;
2821
+ this.indices_ = new Buffer_default(ELEMENT_ARRAY_BUFFER, STATIC_DRAW);
2822
+ this.indices_.fromArray([0, 1, 3, 1, 2, 3]);
2823
+ this.paletteTextures_ = options.paletteTextures || [];
2824
+ }
2825
+ /**
2826
+ * @param {Options} options Options.
2827
+ * @override
2828
+ */
2829
+ reset(options) {
2830
+ super.reset(options);
2831
+ if (this.helper) {
2832
+ const gl = this.helper.getGL();
2833
+ for (const paletteTexture of this.paletteTextures_) {
2834
+ paletteTexture.delete(gl);
2835
+ }
2836
+ }
2837
+ this.vertexShader_ = options.vertexShader;
2838
+ this.fragmentShader_ = options.fragmentShader;
2839
+ this.paletteTextures_ = options.paletteTextures || [];
2840
+ if (this.helper) {
2841
+ this.program_ = this.helper.getProgram(
2842
+ this.fragmentShader_,
2843
+ this.vertexShader_
2844
+ );
2845
+ const gl = this.helper.getGL();
2846
+ for (const paletteTexture of this.paletteTextures_) {
2847
+ paletteTexture.getTexture(gl);
2848
+ }
2849
+ }
2850
+ }
2851
+ /**
2852
+ * @override
2853
+ */
2854
+ afterHelperCreated() {
2855
+ super.afterHelperCreated();
2856
+ const gl = this.helper.getGL();
2857
+ for (const paletteTexture of this.paletteTextures_) {
2858
+ paletteTexture.getTexture(gl);
2859
+ }
2860
+ this.program_ = this.helper.getProgram(
2861
+ this.fragmentShader_,
2862
+ this.vertexShader_
2863
+ );
2864
+ const indices = this.indices_;
2865
+ if (indices) {
2866
+ this.helper.flushBufferData(indices);
2867
+ }
2868
+ }
2869
+ /**
2870
+ * @override
2871
+ */
2872
+ removeHelper() {
2873
+ if (this.helper) {
2874
+ const gl = this.helper.getGL();
2875
+ for (const paletteTexture of this.paletteTextures_) {
2876
+ paletteTexture.delete(gl);
2877
+ }
2878
+ }
2879
+ super.removeHelper();
2880
+ }
2881
+ /**
2882
+ * @param {import("../../webgl/BaseTileRepresentation.js").TileRepresentationOptions<import("../../webgl/TileTexture.js").TileType>} options Tile representation options.
2883
+ * @override
2884
+ */
2885
+ createTileRepresentation(options) {
2886
+ return new TileTexture_default(options);
2887
+ }
2888
+ /**
2889
+ * @param {import("../../Map.js").FrameState} frameState Frame state.
2890
+ * @param {boolean} tilesWithAlpha True if at least one of the rendered tiles has alpha.
2891
+ * @override
2892
+ */
2893
+ beforeTilesRender(frameState, tilesWithAlpha) {
2894
+ super.beforeTilesRender(frameState, tilesWithAlpha);
2895
+ const program = this.program_;
2896
+ if (program) {
2897
+ this.helper.useProgram(program, frameState);
2898
+ }
2899
+ }
2900
+ /**
2901
+ * @param {TileTextureRepresentation} tileTexture Tile texture.
2902
+ * @param {import("../../transform.js").Transform} tileTransform Tile transform.
2903
+ * @param {import("../../Map.js").FrameState} frameState Frame state.
2904
+ * @param {import("../../extent.js").Extent} renderExtent Render extent.
2905
+ * @param {number} tileResolution Tile resolution.
2906
+ * @param {import("../../size.js").Size} tileSize Tile size.
2907
+ * @param {import("../../coordinate.js").Coordinate} tileOrigin Tile origin.
2908
+ * @param {import("../../extent.js").Extent} tileExtent Tile extent.
2909
+ * @param {number} depth Depth.
2910
+ * @param {number} gutter Gutter.
2911
+ * @param {number} alpha Alpha.
2912
+ * @override
2913
+ */
2914
+ renderTile(tileTexture, tileTransform, frameState, renderExtent, tileResolution, tileSize, tileOrigin, tileExtent, depth, gutter, alpha) {
2915
+ const gl = this.helper.getGL();
2916
+ this.helper.bindBuffer(tileTexture.coords);
2917
+ const tileIndices = this.indices_;
2918
+ if (tileIndices) {
2919
+ this.helper.bindBuffer(tileIndices);
2920
+ }
2921
+ this.helper.enableAttributes(attributeDescriptions);
2922
+ let textureSlot = 0;
2923
+ while (textureSlot < tileTexture.textures.length) {
2924
+ const uniformName = `${Uniforms2.TILE_TEXTURE_ARRAY}[${textureSlot}]`;
2925
+ this.helper.bindTexture(
2926
+ tileTexture.textures[textureSlot],
2927
+ textureSlot,
2928
+ uniformName
2929
+ );
2930
+ ++textureSlot;
2931
+ }
2932
+ for (let paletteIndex = 0; paletteIndex < this.paletteTextures_.length; ++paletteIndex) {
2933
+ const paletteTexture = this.paletteTextures_[paletteIndex];
2934
+ const texture = paletteTexture.getTexture(gl);
2935
+ this.helper.bindTexture(texture, textureSlot, paletteTexture.name);
2936
+ ++textureSlot;
2937
+ }
2938
+ const viewState = frameState.viewState;
2939
+ const tileWidthWithGutter = tileSize[0] + 2 * gutter;
2940
+ const tileHeightWithGutter = tileSize[1] + 2 * gutter;
2941
+ const tile = tileTexture.tile;
2942
+ const tileCoord = tile.tileCoord;
2943
+ const tileCenterI = tileCoord[1];
2944
+ const tileCenterJ = tileCoord[2];
2945
+ this.helper.setUniformMatrixValue(
2946
+ Uniforms2.TILE_TRANSFORM,
2947
+ fromTransform(this.tmpMat4_, tileTransform)
2948
+ );
2949
+ this.helper.setUniformFloatValue(Uniforms2.TRANSITION_ALPHA, alpha);
2950
+ this.helper.setUniformFloatValue(Uniforms2.DEPTH, depth);
2951
+ let gutterExtent = renderExtent;
2952
+ if (gutter > 0) {
2953
+ gutterExtent = tileExtent;
2954
+ getIntersection(gutterExtent, renderExtent, gutterExtent);
2955
+ }
2956
+ const textureOriginX = tileOrigin[0] + tileCenterI * tileSize[0] * tileResolution - gutter * tileResolution;
2957
+ const textureOriginY = tileOrigin[1] - tileCenterJ * tileSize[1] * tileResolution + gutter * tileResolution;
2958
+ const extentTransform = translate(
2959
+ reset(this.tmpTransform_),
2960
+ -textureOriginX,
2961
+ -textureOriginY
2962
+ );
2963
+ this.applyRenderExtentUniform(gutterExtent, extentTransform);
2964
+ this.helper.setUniformFloatValue(Uniforms2.RESOLUTION, viewState.resolution);
2965
+ this.helper.setUniformFloatValue(Uniforms2.ZOOM, viewState.zoom);
2966
+ this.helper.setUniformFloatValue(
2967
+ Uniforms2.TEXTURE_PIXEL_WIDTH,
2968
+ tileWidthWithGutter
2969
+ );
2970
+ this.helper.setUniformFloatValue(
2971
+ Uniforms2.TEXTURE_PIXEL_HEIGHT,
2972
+ tileHeightWithGutter
2973
+ );
2974
+ this.helper.setUniformFloatValue(
2975
+ Uniforms2.TEXTURE_RESOLUTION,
2976
+ tileResolution
2977
+ );
2978
+ const indices = this.indices_;
2979
+ if (indices) {
2980
+ this.helper.drawElements(0, indices.getSize());
2981
+ }
2982
+ }
2983
+ /**
2984
+ * @param {import("../../pixel.js").Pixel} pixel Pixel.
2985
+ * @return {Uint8ClampedArray|Uint8Array|Float32Array|DataView|null} Data at the pixel location.
2986
+ * @override
2987
+ */
2988
+ getData(pixel) {
2989
+ var _a;
2990
+ const gl = this.helper.getGL();
2991
+ if (!gl) {
2992
+ return null;
2993
+ }
2994
+ const frameState = this.frameState;
2995
+ if (!frameState) {
2996
+ return null;
2997
+ }
2998
+ const layer = this.getLayer();
2999
+ const coordinate = apply(
3000
+ frameState.pixelToCoordinateTransform,
3001
+ pixel.slice()
3002
+ );
3003
+ const viewState = frameState.viewState;
3004
+ const layerExtent = layer.getExtent();
3005
+ if (layerExtent) {
3006
+ if (!containsCoordinate(
3007
+ fromUserExtent(layerExtent, viewState.projection),
3008
+ coordinate
3009
+ )) {
3010
+ return null;
3011
+ }
3012
+ }
3013
+ const sources = layer.getSources(
3014
+ boundingExtent([coordinate]),
3015
+ viewState.resolution
3016
+ );
3017
+ let i, source, tileGrid;
3018
+ for (i = sources.length - 1; i >= 0; --i) {
3019
+ source = sources[i];
3020
+ if (source.getState() === "ready") {
3021
+ tileGrid = source.getTileGridForProjection(viewState.projection);
3022
+ if (source.getWrapX()) {
3023
+ break;
3024
+ }
3025
+ const gridExtent = tileGrid.getExtent();
3026
+ if (!gridExtent || containsCoordinate(gridExtent, coordinate)) {
3027
+ break;
3028
+ }
3029
+ }
3030
+ }
3031
+ if (i < 0 || !source || !tileGrid) {
3032
+ return null;
3033
+ }
3034
+ const tileTextureCache = this.tileRepresentationCache;
3035
+ for (let z = tileGrid.getZForResolution(viewState.resolution); z >= tileGrid.getMinZoom(); --z) {
3036
+ const tileCoord = tileGrid.getTileCoordForCoordAndZ(coordinate, z);
3037
+ const cacheKey = getCacheKey(source, tileCoord);
3038
+ if (!tileTextureCache.containsKey(cacheKey)) {
3039
+ continue;
3040
+ }
3041
+ const tileTexture = tileTextureCache.get(cacheKey);
3042
+ const tile = tileTexture.tile;
3043
+ if (tile.getState() === TileState_default.EMPTY) {
3044
+ return null;
3045
+ }
3046
+ if (!tileTexture.loaded) {
3047
+ continue;
3048
+ }
3049
+ const tileOrigin = tileGrid.getOrigin(z);
3050
+ const tileSize = toSize(tileGrid.getTileSize(z));
3051
+ const tileResolution = tileGrid.getResolution(z);
3052
+ const col = (coordinate[0] - tileOrigin[0]) / tileResolution - tileCoord[1] * tileSize[0];
3053
+ const row = (tileOrigin[1] - coordinate[1]) / tileResolution - tileCoord[2] * tileSize[1];
3054
+ return (_a = tileTexture.getPixelData(col, row)) != null ? _a : null;
3055
+ }
3056
+ return null;
3057
+ }
3058
+ /**
3059
+ * Clean up.
3060
+ * @override
3061
+ */
3062
+ disposeInternal() {
3063
+ const helper = this.helper;
3064
+ if (helper) {
3065
+ const gl = helper.getGL();
3066
+ for (const paletteTexture of this.paletteTextures_) {
3067
+ paletteTexture.delete(gl);
3068
+ }
3069
+ this.paletteTextures_.length = 0;
3070
+ const program = this.program_;
3071
+ if (program) {
3072
+ gl.deleteProgram(program);
3073
+ }
3074
+ this.program_ = void 0;
3075
+ const indicesBuffer = this.indices_;
3076
+ if (indicesBuffer) {
3077
+ helper.deleteBuffer(indicesBuffer);
3078
+ }
3079
+ this.indices_ = void 0;
3080
+ }
3081
+ super.disposeInternal();
3082
+ }
3083
+ };
3084
+ var TileLayer_default = WebGLTileLayerRenderer;
3085
+
3086
+ // node_modules/ol/webgl/PaletteTexture.js
3087
+ init_dirname();
3088
+ init_buffer();
3089
+ init_process();
3090
+ var PaletteTexture = class {
3091
+ /**
3092
+ * @param {string} name The name of the texture.
3093
+ * @param {Uint8Array} data The texture data.
3094
+ */
3095
+ constructor(name, data) {
3096
+ this.name = name;
3097
+ this.data = data;
3098
+ this.texture_ = null;
3099
+ }
3100
+ /**
3101
+ * @param {WebGLRenderingContext} gl Rendering context.
3102
+ * @return {WebGLTexture} The texture.
3103
+ */
3104
+ getTexture(gl) {
3105
+ if (!this.texture_) {
3106
+ const texture = gl.createTexture();
3107
+ gl.bindTexture(gl.TEXTURE_2D, texture);
3108
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
3109
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
3110
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST);
3111
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.NEAREST);
3112
+ gl.texImage2D(
3113
+ gl.TEXTURE_2D,
3114
+ 0,
3115
+ gl.RGBA,
3116
+ this.data.length / 4,
3117
+ 1,
3118
+ 0,
3119
+ gl.RGBA,
3120
+ gl.UNSIGNED_BYTE,
3121
+ this.data
3122
+ );
3123
+ this.texture_ = texture;
3124
+ }
3125
+ return this.texture_;
3126
+ }
3127
+ /**
3128
+ * @param {WebGLRenderingContext} gl Rendering context.
3129
+ */
3130
+ delete(gl) {
3131
+ if (this.texture_) {
3132
+ gl.deleteTexture(this.texture_);
3133
+ }
3134
+ this.texture_ = null;
3135
+ }
3136
+ };
3137
+ var PaletteTexture_default = PaletteTexture;
3138
+
3139
+ // node_modules/ol/expr/gpu.js
3140
+ function computeOperatorFunctionName(operator, context) {
3141
+ return `operator_${operator}_${Object.keys(context.functions).length}`;
3142
+ }
3143
+ function numberToGlsl(v) {
3144
+ const s = v.toString();
3145
+ return s.includes(".") ? s : s + ".0";
3146
+ }
3147
+ function arrayToGlsl(array) {
3148
+ if (array.length < 2 || array.length > 4) {
3149
+ throw new Error(
3150
+ "`formatArray` can only output `vec2`, `vec3` or `vec4` arrays."
3151
+ );
3152
+ }
3153
+ return `vec${array.length}(${array.map(numberToGlsl).join(", ")})`;
3154
+ }
3155
+ function colorToGlsl(color) {
3156
+ const array = asArray(color);
3157
+ const alpha = array.length > 3 ? array[3] : 1;
3158
+ return arrayToGlsl([array[0] / 255, array[1] / 255, array[2] / 255, alpha]);
3159
+ }
3160
+ function sizeToGlsl(size) {
3161
+ const array = toSize(size);
3162
+ return arrayToGlsl(array);
3163
+ }
3164
+ var stringToFloatMap = {};
3165
+ var stringToFloatCounter = 0;
3166
+ function getStringNumberEquivalent(string) {
3167
+ if (!(string in stringToFloatMap)) {
3168
+ stringToFloatMap[string] = stringToFloatCounter++;
3169
+ }
3170
+ return stringToFloatMap[string];
3171
+ }
3172
+ function stringToGlsl(string) {
3173
+ return numberToGlsl(getStringNumberEquivalent(string));
3174
+ }
3175
+ function uniformNameForVariable(variableName) {
3176
+ return "u_var_" + variableName;
3177
+ }
3178
+ function newCompilationContext(inputVariables) {
3179
+ return {
3180
+ variables: /* @__PURE__ */ new Map(),
3181
+ properties: /* @__PURE__ */ new Map(),
3182
+ functions: {},
3183
+ bandCount: 0,
3184
+ featureId: false,
3185
+ geometryType: false,
3186
+ inputVariables
3187
+ };
3188
+ }
3189
+ var GET_BAND_VALUE_FUNC = "getBandValue";
3190
+ var PALETTE_TEXTURE_ARRAY = "u_paletteTextures";
3191
+ var FEATURE_ID_PROPERTY_NAME = "featureId";
3192
+ var GEOMETRY_TYPE_PROPERTY_NAME = "geometryType";
3193
+ var UNDEFINED_PROP_VALUE = -9999999;
3194
+ function buildExpression(encoded, type, parsingContext, compilationContext) {
3195
+ const expression = parse(encoded, type, parsingContext);
3196
+ compilationContext.properties = new Map([
3197
+ ...compilationContext.properties,
3198
+ ...parsingContext.properties
3199
+ ]);
3200
+ compilationContext.variables = new Map([
3201
+ ...compilationContext.variables,
3202
+ ...parsingContext.variables
3203
+ ]);
3204
+ return compile(expression, type, compilationContext);
3205
+ }
3206
+ function createCompiler(output) {
3207
+ return (context, expression, type) => {
3208
+ const length = expression.args.length;
3209
+ const args = new Array(length);
3210
+ for (let i = 0; i < length; ++i) {
3211
+ args[i] = compile(expression.args[i], type, context);
3212
+ }
3213
+ return output(args, context);
3214
+ };
3215
+ }
3216
+ var compilers = {
3217
+ [Ops.Get]: (context, expression) => {
3218
+ const firstArg = (
3219
+ /** @type {LiteralExpression} */
3220
+ expression.args[0]
3221
+ );
3222
+ const propName = (
3223
+ /** @type {string} */
3224
+ firstArg.value
3225
+ );
3226
+ let result = "a_prop_" + propName;
3227
+ if (isType(expression.type, BooleanType)) {
3228
+ result = `(${result} > 0.0)`;
3229
+ }
3230
+ return result;
3231
+ },
3232
+ [Ops.Id]: (context) => {
3233
+ context.featureId = true;
3234
+ return "a_" + FEATURE_ID_PROPERTY_NAME;
3235
+ },
3236
+ [Ops.GeometryType]: (context) => {
3237
+ context.geometryType = true;
3238
+ return "a_" + GEOMETRY_TYPE_PROPERTY_NAME;
3239
+ },
3240
+ [Ops.LineMetric]: () => "currentLineMetric",
3241
+ // this variable is assumed to always be present in shaders, default is 0.
3242
+ [Ops.Var]: (context, expression) => {
3243
+ const firstArg = (
3244
+ /** @type {LiteralExpression} */
3245
+ expression.args[0]
3246
+ );
3247
+ const varName = (
3248
+ /** @type {string} */
3249
+ firstArg.value
3250
+ );
3251
+ let result = uniformNameForVariable(varName);
3252
+ if (isType(expression.type, BooleanType)) {
3253
+ result = `(${result} > 0.0)`;
3254
+ }
3255
+ return result;
3256
+ },
3257
+ [Ops.Has]: (context, expression) => {
3258
+ const firstArg = (
3259
+ /** @type {LiteralExpression} */
3260
+ expression.args[0]
3261
+ );
3262
+ const propName = (
3263
+ /** @type {string} */
3264
+ firstArg.value
3265
+ );
3266
+ return `(a_prop_${propName} != ${numberToGlsl(UNDEFINED_PROP_VALUE)})`;
3267
+ },
3268
+ [Ops.Resolution]: () => "u_resolution",
3269
+ [Ops.Zoom]: () => "u_zoom",
3270
+ [Ops.Time]: () => "u_time",
3271
+ [Ops.Any]: createCompiler((compiledArgs) => `(${compiledArgs.join(` || `)})`),
3272
+ [Ops.All]: createCompiler((compiledArgs) => `(${compiledArgs.join(` && `)})`),
3273
+ [Ops.Not]: createCompiler(([value]) => `(!${value})`),
3274
+ [Ops.Equal]: createCompiler(
3275
+ ([firstValue, secondValue]) => `(${firstValue} == ${secondValue})`
3276
+ ),
3277
+ [Ops.NotEqual]: createCompiler(
3278
+ ([firstValue, secondValue]) => `(${firstValue} != ${secondValue})`
3279
+ ),
3280
+ [Ops.GreaterThan]: createCompiler(
3281
+ ([firstValue, secondValue]) => `(${firstValue} > ${secondValue})`
3282
+ ),
3283
+ [Ops.GreaterThanOrEqualTo]: createCompiler(
3284
+ ([firstValue, secondValue]) => `(${firstValue} >= ${secondValue})`
3285
+ ),
3286
+ [Ops.LessThan]: createCompiler(
3287
+ ([firstValue, secondValue]) => `(${firstValue} < ${secondValue})`
3288
+ ),
3289
+ [Ops.LessThanOrEqualTo]: createCompiler(
3290
+ ([firstValue, secondValue]) => `(${firstValue} <= ${secondValue})`
3291
+ ),
3292
+ [Ops.Multiply]: createCompiler(
3293
+ (compiledArgs) => `(${compiledArgs.join(" * ")})`
3294
+ ),
3295
+ [Ops.Divide]: createCompiler(
3296
+ ([firstValue, secondValue]) => `(${firstValue} / ${secondValue})`
3297
+ ),
3298
+ [Ops.Add]: createCompiler((compiledArgs) => `(${compiledArgs.join(" + ")})`),
3299
+ [Ops.Subtract]: createCompiler(
3300
+ ([firstValue, secondValue]) => `(${firstValue} - ${secondValue})`
3301
+ ),
3302
+ [Ops.Clamp]: createCompiler(
3303
+ ([value, min, max]) => `clamp(${value}, ${min}, ${max})`
3304
+ ),
3305
+ [Ops.Mod]: createCompiler(([value, modulo]) => `mod(${value}, ${modulo})`),
3306
+ [Ops.Pow]: createCompiler(([value, power]) => `pow(${value}, ${power})`),
3307
+ [Ops.Abs]: createCompiler(([value]) => `abs(${value})`),
3308
+ [Ops.Floor]: createCompiler(([value]) => `floor(${value})`),
3309
+ [Ops.Ceil]: createCompiler(([value]) => `ceil(${value})`),
3310
+ [Ops.Round]: createCompiler(([value]) => `floor(${value} + 0.5)`),
3311
+ [Ops.Sin]: createCompiler(([value]) => `sin(${value})`),
3312
+ [Ops.Cos]: createCompiler(([value]) => `cos(${value})`),
3313
+ [Ops.Atan]: createCompiler(([firstValue, secondValue]) => {
3314
+ return secondValue !== void 0 ? `atan(${firstValue}, ${secondValue})` : `atan(${firstValue})`;
3315
+ }),
3316
+ [Ops.Sqrt]: createCompiler(([value]) => `sqrt(${value})`),
3317
+ [Ops.Match]: createCompiler((compiledArgs) => {
3318
+ const input = compiledArgs[0];
3319
+ const fallback = compiledArgs[compiledArgs.length - 1];
3320
+ let result = fallback;
3321
+ for (let i = compiledArgs.length - 3; i >= 1; i -= 2) {
3322
+ const match = compiledArgs[i];
3323
+ const output = compiledArgs[i + 1];
3324
+ result = `(${input} == ${match} ? ${output} : ${result})`;
3325
+ }
3326
+ return result;
3327
+ }),
3328
+ [Ops.Between]: createCompiler(
3329
+ ([value, min, max]) => `(${value} >= ${min} && ${value} <= ${max})`
3330
+ ),
3331
+ [Ops.Interpolate]: createCompiler(([exponent, input, ...compiledArgs]) => {
3332
+ let result = "";
3333
+ for (let i = 0; i < compiledArgs.length - 2; i += 2) {
3334
+ const stop1 = compiledArgs[i];
3335
+ const output1 = result || compiledArgs[i + 1];
3336
+ const stop2 = compiledArgs[i + 2];
3337
+ const output2 = compiledArgs[i + 3];
3338
+ let ratio;
3339
+ if (exponent === numberToGlsl(1)) {
3340
+ ratio = `(${input} - ${stop1}) / (${stop2} - ${stop1})`;
3341
+ } else {
3342
+ ratio = `(pow(${exponent}, (${input} - ${stop1})) - 1.0) / (pow(${exponent}, (${stop2} - ${stop1})) - 1.0)`;
3343
+ }
3344
+ result = `mix(${output1}, ${output2}, clamp(${ratio}, 0.0, 1.0))`;
3345
+ }
3346
+ return result;
3347
+ }),
3348
+ [Ops.Case]: createCompiler((compiledArgs) => {
3349
+ const fallback = compiledArgs[compiledArgs.length - 1];
3350
+ let result = fallback;
3351
+ for (let i = compiledArgs.length - 3; i >= 0; i -= 2) {
3352
+ const condition = compiledArgs[i];
3353
+ const output = compiledArgs[i + 1];
3354
+ result = `(${condition} ? ${output} : ${result})`;
3355
+ }
3356
+ return result;
3357
+ }),
3358
+ [Ops.In]: createCompiler(([needle, ...haystack], context) => {
3359
+ const funcName = computeOperatorFunctionName("in", context);
3360
+ const tests = [];
3361
+ for (let i = 0; i < haystack.length; i += 1) {
3362
+ tests.push(` if (inputValue == ${haystack[i]}) { return true; }`);
3363
+ }
3364
+ context.functions[funcName] = `bool ${funcName}(float inputValue) {
3365
+ ${tests.join("\n")}
3366
+ return false;
3367
+ }`;
3368
+ return `${funcName}(${needle})`;
3369
+ }),
3370
+ [Ops.Array]: createCompiler(
3371
+ (args) => `vec${args.length}(${args.join(", ")})`
3372
+ ),
3373
+ [Ops.Color]: createCompiler((compiledArgs) => {
3374
+ if (compiledArgs.length === 1) {
3375
+ return `vec4(vec3(${compiledArgs[0]} / 255.0), 1.0)`;
3376
+ }
3377
+ if (compiledArgs.length === 2) {
3378
+ return `vec4(vec3(${compiledArgs[0]} / 255.0), ${compiledArgs[1]})`;
3379
+ }
3380
+ const rgb = compiledArgs.slice(0, 3).map((color) => `${color} / 255.0`);
3381
+ if (compiledArgs.length === 3) {
3382
+ return `vec4(${rgb.join(", ")}, 1.0)`;
3383
+ }
3384
+ const alpha = compiledArgs[3];
3385
+ return `vec4(${rgb.join(", ")}, ${alpha})`;
3386
+ }),
3387
+ [Ops.Band]: createCompiler(([band, xOffset, yOffset], context) => {
3388
+ if (!(GET_BAND_VALUE_FUNC in context.functions)) {
3389
+ let ifBlocks = "";
3390
+ const bandCount = context.bandCount || 1;
3391
+ for (let i = 0; i < bandCount; i++) {
3392
+ const colorIndex = Math.floor(i / 4);
3393
+ let bandIndex = i % 4;
3394
+ if (i === bandCount - 1 && bandIndex === 1) {
3395
+ bandIndex = 3;
3396
+ }
3397
+ const textureName = `${Uniforms2.TILE_TEXTURE_ARRAY}[${colorIndex}]`;
3398
+ ifBlocks += ` if (band == ${i + 1}.0) {
3399
+ return texture2D(${textureName}, v_textureCoord + vec2(dx, dy))[${bandIndex}];
3400
+ }
3401
+ `;
3402
+ }
3403
+ context.functions[GET_BAND_VALUE_FUNC] = `float getBandValue(float band, float xOffset, float yOffset) {
3404
+ float dx = xOffset / ${Uniforms2.TEXTURE_PIXEL_WIDTH};
3405
+ float dy = yOffset / ${Uniforms2.TEXTURE_PIXEL_HEIGHT};
3406
+ ${ifBlocks}
3407
+ }`;
3408
+ }
3409
+ return `${GET_BAND_VALUE_FUNC}(${band}, ${xOffset != null ? xOffset : "0.0"}, ${yOffset != null ? yOffset : "0.0"})`;
3410
+ }),
3411
+ [Ops.Palette]: (context, expression) => {
3412
+ const [index, ...colors] = expression.args;
3413
+ const numColors = colors.length;
3414
+ const palette = new Uint8Array(numColors * 4);
3415
+ for (let i = 0; i < colors.length; i++) {
3416
+ const parsedValue = (
3417
+ /** @type {string | Array<number>} */
3418
+ /** @type {LiteralExpression} */
3419
+ colors[i].value
3420
+ );
3421
+ const color = asArray(parsedValue);
3422
+ const offset = i * 4;
3423
+ palette[offset] = color[0];
3424
+ palette[offset + 1] = color[1];
3425
+ palette[offset + 2] = color[2];
3426
+ palette[offset + 3] = color[3] * 255;
3427
+ }
3428
+ if (!context.paletteTextures) {
3429
+ context.paletteTextures = [];
3430
+ }
3431
+ const paletteName = `${PALETTE_TEXTURE_ARRAY}[${context.paletteTextures.length}]`;
3432
+ const paletteTexture = new PaletteTexture_default(paletteName, palette);
3433
+ context.paletteTextures.push(paletteTexture);
3434
+ const compiledIndex = compile(index, NumberType, context);
3435
+ return `texture2D(${paletteName}, vec2((${compiledIndex} + 0.5) / ${numColors}.0, 0.5))`;
3436
+ }
3437
+ // TODO: unimplemented
3438
+ // Ops.Number
3439
+ // Ops.String
3440
+ // Ops.Coalesce
3441
+ // Ops.Concat
3442
+ // Ops.ToString
3443
+ // Ops.Has
3444
+ };
3445
+ function compile(expression, returnType, context) {
3446
+ if (expression instanceof CallExpression) {
3447
+ const compiler = compilers[expression.operator];
3448
+ if (compiler === void 0) {
3449
+ throw new Error(
3450
+ `No compiler defined for this operator: ${JSON.stringify(
3451
+ expression.operator
3452
+ )}`
3453
+ );
3454
+ }
3455
+ return compiler(context, expression, returnType);
3456
+ }
3457
+ if ((expression.type & NumberType) > 0) {
3458
+ return numberToGlsl(
3459
+ /** @type {number} */
3460
+ expression.value
3461
+ );
3462
+ }
3463
+ if ((expression.type & BooleanType) > 0) {
3464
+ return expression.value.toString();
3465
+ }
3466
+ if ((expression.type & StringType) > 0) {
3467
+ return stringToGlsl(expression.value.toString());
3468
+ }
3469
+ if ((expression.type & ColorType) > 0) {
3470
+ return colorToGlsl(
3471
+ /** @type {Array<number> | string} */
3472
+ expression.value
3473
+ );
3474
+ }
3475
+ if ((expression.type & NumberArrayType) > 0) {
3476
+ return arrayToGlsl(
3477
+ /** @type {Array<number>} */
3478
+ expression.value
3479
+ );
3480
+ }
3481
+ if ((expression.type & SizeType) > 0) {
3482
+ return sizeToGlsl(
3483
+ /** @type {number|import('../size.js').Size} */
3484
+ expression.value
3485
+ );
3486
+ }
3487
+ throw new Error(
3488
+ `Unexpected expression ${expression.value} (expected type ${typeName(
3489
+ returnType
3490
+ )})`
3491
+ );
3492
+ }
3493
+
3494
+ // node_modules/ol/render/webgl/compileUtil.js
3495
+ init_dirname();
3496
+ init_buffer();
3497
+ init_process();
3498
+ function expressionToGlsl(compilationContext, value, expectedType, parsingContext) {
3499
+ return buildExpression(
3500
+ value,
3501
+ expectedType != null ? expectedType : 0,
3502
+ parsingContext != null ? parsingContext : newParsingContext(compilationContext.inputVariables),
3503
+ compilationContext
3504
+ );
3505
+ }
3506
+
3507
+ // node_modules/ol/layer/WebGLTile.js
3508
+ function parseStyle(style, bandCount, nodataBandIndex) {
3509
+ const vertexShader = `
3510
+ attribute vec2 ${Attributes.TEXTURE_COORD};
3511
+ uniform mat4 ${Uniforms2.TILE_TRANSFORM};
3512
+ uniform float ${Uniforms2.TEXTURE_PIXEL_WIDTH};
3513
+ uniform float ${Uniforms2.TEXTURE_PIXEL_HEIGHT};
3514
+ uniform float ${Uniforms2.TEXTURE_RESOLUTION};
3515
+ uniform float ${Uniforms2.DEPTH};
3516
+
3517
+ varying vec2 v_textureCoord;
3518
+ varying vec2 v_localMapCoord;
3519
+
3520
+ void main() {
3521
+ v_textureCoord = ${Attributes.TEXTURE_COORD};
3522
+ v_localMapCoord = vec2(
3523
+ ${Uniforms2.TEXTURE_PIXEL_WIDTH} * ${Uniforms2.TEXTURE_RESOLUTION} * v_textureCoord[0],
3524
+ -1. * ${Uniforms2.TEXTURE_PIXEL_HEIGHT} * ${Uniforms2.TEXTURE_RESOLUTION} * v_textureCoord[1]
3525
+ );
3526
+ gl_Position = ${Uniforms2.TILE_TRANSFORM} * vec4(${Attributes.TEXTURE_COORD}, ${Uniforms2.DEPTH}, 1.0);
3527
+ }
3528
+ `;
3529
+ const context = __spreadProps(__spreadValues({}, newCompilationContext()), {
3530
+ bandCount
3531
+ });
3532
+ const pipeline = [];
3533
+ if (style.color !== void 0) {
3534
+ const color = expressionToGlsl(context, style.color, ColorType);
3535
+ pipeline.push(`color = ${color};`);
3536
+ }
3537
+ if (style.contrast !== void 0) {
3538
+ const contrast = expressionToGlsl(context, style.contrast, NumberType);
3539
+ pipeline.push(
3540
+ `color.rgb = clamp((${contrast} + 1.0) * color.rgb - (${contrast} / 2.0), vec3(0.0, 0.0, 0.0), vec3(1.0, 1.0, 1.0));`
3541
+ );
3542
+ }
3543
+ if (style.exposure !== void 0) {
3544
+ const exposure = expressionToGlsl(context, style.exposure, NumberType);
3545
+ pipeline.push(
3546
+ `color.rgb = clamp((${exposure} + 1.0) * color.rgb, vec3(0.0, 0.0, 0.0), vec3(1.0, 1.0, 1.0));`
3547
+ );
3548
+ }
3549
+ if (style.saturation !== void 0) {
3550
+ const saturation = expressionToGlsl(context, style.saturation, NumberType);
3551
+ pipeline.push(`
3552
+ float saturation = ${saturation} + 1.0;
3553
+ float sr = (1.0 - saturation) * 0.2126;
3554
+ float sg = (1.0 - saturation) * 0.7152;
3555
+ float sb = (1.0 - saturation) * 0.0722;
3556
+ mat3 saturationMatrix = mat3(
3557
+ sr + saturation, sr, sr,
3558
+ sg, sg + saturation, sg,
3559
+ sb, sb, sb + saturation
3560
+ );
3561
+ color.rgb = clamp(saturationMatrix * color.rgb, vec3(0.0, 0.0, 0.0), vec3(1.0, 1.0, 1.0));
3562
+ `);
3563
+ }
3564
+ if (style.gamma !== void 0) {
3565
+ const gamma = expressionToGlsl(context, style.gamma, NumberType);
3566
+ pipeline.push(`color.rgb = pow(color.rgb, vec3(1.0 / ${gamma}));`);
3567
+ }
3568
+ if (style.brightness !== void 0) {
3569
+ const brightness = expressionToGlsl(context, style.brightness, NumberType);
3570
+ pipeline.push(
3571
+ `color.rgb = clamp(color.rgb + ${brightness}, vec3(0.0, 0.0, 0.0), vec3(1.0, 1.0, 1.0));`
3572
+ );
3573
+ }
3574
+ const uniforms = {};
3575
+ const numVariables = context.variables.size;
3576
+ if (numVariables > 1 && !style.variables) {
3577
+ throw new Error(
3578
+ `Missing variables in style (expected ${Array.from(context.variables.keys())})`
3579
+ );
3580
+ }
3581
+ const styleVariables = style.variables || {};
3582
+ for (const [variableName] of context.variables.entries()) {
3583
+ if (!(variableName in styleVariables)) {
3584
+ throw new Error(`Missing '${variableName}' in style variables`);
3585
+ }
3586
+ const uniformName = uniformNameForVariable(variableName);
3587
+ uniforms[uniformName] = function() {
3588
+ let value = styleVariables[variableName];
3589
+ if (typeof value === "string") {
3590
+ value = getStringNumberEquivalent(value);
3591
+ }
3592
+ return value !== void 0 ? value : -9999999;
3593
+ };
3594
+ }
3595
+ const uniformDeclarations = Object.keys(uniforms).map(function(name) {
3596
+ return `uniform float ${name};`;
3597
+ });
3598
+ const bandCountValue = bandCount !== void 0 ? bandCount : 4;
3599
+ const textureCount = Math.ceil(bandCountValue / 4);
3600
+ uniformDeclarations.push(
3601
+ `uniform sampler2D ${Uniforms2.TILE_TEXTURE_ARRAY}[${textureCount}];`
3602
+ );
3603
+ if (context.paletteTextures) {
3604
+ uniformDeclarations.push(
3605
+ `uniform sampler2D ${PALETTE_TEXTURE_ARRAY}[${context.paletteTextures.length}];`
3606
+ );
3607
+ }
3608
+ if (nodataBandIndex && nodataBandIndex > 0 && !("getBandValue" in context.functions)) {
3609
+ let ifBlocks = "";
3610
+ for (let i = 0; i < bandCountValue; i++) {
3611
+ const colorIndex = Math.floor(i / 4);
3612
+ let bandIndex = i % 4;
3613
+ if (i === bandCountValue - 1 && bandIndex === 1) {
3614
+ bandIndex = 3;
3615
+ }
3616
+ const textureName = `${Uniforms2.TILE_TEXTURE_ARRAY}[${colorIndex}]`;
3617
+ ifBlocks += ` if (band == ${i + 1}.0) {
3618
+ return texture2D(${textureName}, v_textureCoord + vec2(dx, dy))[${bandIndex}];
3619
+ }
3620
+ `;
3621
+ }
3622
+ context.functions["getBandValue"] = `float getBandValue(float band, float xOffset, float yOffset) {
3623
+ float dx = xOffset / ${Uniforms2.TEXTURE_PIXEL_WIDTH};
3624
+ float dy = yOffset / ${Uniforms2.TEXTURE_PIXEL_HEIGHT};
3625
+ ${ifBlocks}
3626
+ }`;
3627
+ }
3628
+ const functionDefintions = Object.keys(context.functions).map(
3629
+ function(name) {
3630
+ return context.functions[name];
3631
+ }
3632
+ );
3633
+ const fragmentShader = `
3634
+ #ifdef GL_FRAGMENT_PRECISION_HIGH
3635
+ precision highp float;
3636
+ #else
3637
+ precision mediump float;
3638
+ #endif
3639
+
3640
+ varying vec2 v_textureCoord;
3641
+ varying vec2 v_localMapCoord;
3642
+ uniform vec4 ${Uniforms2.RENDER_EXTENT};
3643
+ uniform float ${Uniforms2.TRANSITION_ALPHA};
3644
+ uniform float ${Uniforms2.TEXTURE_PIXEL_WIDTH};
3645
+ uniform float ${Uniforms2.TEXTURE_PIXEL_HEIGHT};
3646
+ uniform float ${Uniforms2.RESOLUTION};
3647
+ uniform float ${Uniforms2.ZOOM};
3648
+
3649
+ ${uniformDeclarations.join("\n")}
3650
+
3651
+ ${functionDefintions.join("\n")}
3652
+
3653
+ void main() {
3654
+ if (
3655
+ v_localMapCoord[0] < ${Uniforms2.RENDER_EXTENT}[0] ||
3656
+ v_localMapCoord[1] < ${Uniforms2.RENDER_EXTENT}[1] ||
3657
+ v_localMapCoord[0] > ${Uniforms2.RENDER_EXTENT}[2] ||
3658
+ v_localMapCoord[1] > ${Uniforms2.RENDER_EXTENT}[3]
3659
+ ) {
3660
+ discard;
3661
+ }
3662
+
3663
+ vec4 color = texture2D(${Uniforms2.TILE_TEXTURE_ARRAY}[0], v_textureCoord);
3664
+
3665
+ ${nodataBandIndex && style.color === void 0 ? `color.a = getBandValue(${nodataBandIndex}.0, 0.0, 0.0);` : ""}
3666
+
3667
+ ${nodataBandIndex ? `if (getBandValue(${nodataBandIndex}.0, 0.0, 0.0) == 0.0) { discard; }` : ""}
3668
+
3669
+ ${pipeline.join("\n")}
3670
+
3671
+ gl_FragColor = color;
3672
+ gl_FragColor.rgb *= gl_FragColor.a;
3673
+ gl_FragColor *= ${Uniforms2.TRANSITION_ALPHA};
3674
+ }`;
3675
+ return {
3676
+ vertexShader,
3677
+ fragmentShader,
3678
+ uniforms,
3679
+ paletteTextures: context.paletteTextures || []
3680
+ };
3681
+ }
3682
+ var WebGLTileLayer = class extends BaseTile_default {
3683
+ /**
3684
+ * @param {Options} [options] Tile layer options.
3685
+ */
3686
+ constructor(options) {
3687
+ options = options ? Object.assign({}, options) : {};
3688
+ const style = options.style || {};
3689
+ delete options.style;
3690
+ super(options);
3691
+ this.sources_ = /** @type {Array<SourceType>|function(import("../extent.js").Extent, number):Array<SourceType>|undefined} */
3692
+ options.sources;
3693
+ this.renderedSource_ = null;
3694
+ this.renderedResolution_ = NaN;
3695
+ this.style_ = style;
3696
+ this.styleVariables_ = this.style_.variables || {};
3697
+ this.styleBandCount_ = NaN;
3698
+ this.styleNodataBandIndex_ = void 0;
3699
+ this.handleSourceUpdate_();
3700
+ this.addChangeListener(Property_default.SOURCE, this.handleSourceUpdate_);
3701
+ }
3702
+ /**
3703
+ * Gets the sources for this layer, for a given extent and resolution.
3704
+ * @param {import("../extent.js").Extent} extent Extent.
3705
+ * @param {number} resolution Resolution.
3706
+ * @return {Array<SourceType>} Sources.
3707
+ */
3708
+ getSources(extent, resolution) {
3709
+ const source = this.getSource();
3710
+ if (this.sources_) {
3711
+ return typeof this.sources_ === "function" ? this.sources_(extent, resolution) || [] : this.sources_;
3712
+ }
3713
+ return source ? [source] : [];
3714
+ }
3715
+ /**
3716
+ * @return {SourceType|null} The source being rendered.
3717
+ * @override
3718
+ */
3719
+ getRenderSource() {
3720
+ return this.renderedSource_ || this.getSource();
3721
+ }
3722
+ /**
3723
+ * @return {import("../source/Source.js").State} Source state.
3724
+ * @override
3725
+ */
3726
+ getSourceState() {
3727
+ const source = this.getRenderSource();
3728
+ return source ? source.getState() : "undefined";
3729
+ }
3730
+ /**
3731
+ * @private
3732
+ */
3733
+ handleSourceUpdate_() {
3734
+ var _a;
3735
+ if (this.hasRenderer()) {
3736
+ (_a = this.getRenderer()) == null ? void 0 : _a.clearCache();
3737
+ }
3738
+ const source = this.getSource();
3739
+ if (source) {
3740
+ if (source.getState() === "loading") {
3741
+ const onChange = () => {
3742
+ if (source.getState() === "ready") {
3743
+ source.removeEventListener("change", onChange);
3744
+ this.setStyle(this.style_);
3745
+ }
3746
+ };
3747
+ source.addEventListener("change", onChange);
3748
+ } else {
3749
+ this.setStyle(this.style_);
3750
+ }
3751
+ }
3752
+ }
3753
+ /**
3754
+ * @private
3755
+ * @return {SourceType|null} The first render source (or null).
3756
+ */
3757
+ getFirstSource_() {
3758
+ const max = Number.MAX_SAFE_INTEGER;
3759
+ const sources = this.getSources([-max, -max, max, max], max);
3760
+ return sources && sources.length ? sources[0] : null;
3761
+ }
3762
+ /**
3763
+ * Whether reprojecting the source to the given projection appends a coverage
3764
+ * alpha band (only for sources that do not already carry an alpha band).
3765
+ * @private
3766
+ * @param {SourceType} source The render source.
3767
+ * @param {import("../proj/Projection.js").default} [projection] The render projection.
3768
+ * @return {boolean} A coverage band is added.
3769
+ */
3770
+ usesCoverageBand_(source, projection) {
3771
+ if (!source || !projection || source.hasAlpha !== false) {
3772
+ return false;
3773
+ }
3774
+ const sourceProjection = source.getProjection();
3775
+ return !!sourceProjection && !equivalent(sourceProjection, projection);
3776
+ }
3777
+ /**
3778
+ * @private
3779
+ * @param {import("../proj/Projection.js").default} [projection] The render projection.
3780
+ * @return {number} The number of source bands.
3781
+ */
3782
+ getSourceBandCount_(projection) {
3783
+ const source = this.getFirstSource_();
3784
+ const bandCount = source && "bandCount" in source ? source.bandCount : 4;
3785
+ return this.usesCoverageBand_(
3786
+ /** @type {SourceType} */
3787
+ source,
3788
+ projection
3789
+ ) ? bandCount + 1 : bandCount;
3790
+ }
3791
+ /**
3792
+ * @private
3793
+ * @param {import("../proj/Projection.js").default} [projection] The render projection.
3794
+ * @return {number|undefined} The 1-based band index for the nodata alpha band.
3795
+ */
3796
+ getSourceNodataBandIndex_(projection) {
3797
+ const source = this.getFirstSource_();
3798
+ if (!source) {
3799
+ return void 0;
3800
+ }
3801
+ if (this.usesCoverageBand_(source, projection)) {
3802
+ return source.bandCount + 1;
3803
+ }
3804
+ return "nodataBandIndex" in source ? source.nodataBandIndex : void 0;
3805
+ }
3806
+ /**
3807
+ * Parse the style for the given render projection, tracking the band layout
3808
+ * used. The render projection determines whether a coverage band is added
3809
+ * for reprojected alpha-less sources.
3810
+ * @private
3811
+ * @param {import("../proj/Projection.js").default} [projection] The render projection.
3812
+ * @return {ReturnType<typeof parseStyle>} The parsed style.
3813
+ */
3814
+ parseStyleForRender_(projection) {
3815
+ const bandCount = this.getSourceBandCount_(projection);
3816
+ const nodataBandIndex = this.getSourceNodataBandIndex_(projection);
3817
+ this.styleBandCount_ = bandCount;
3818
+ this.styleNodataBandIndex_ = nodataBandIndex;
3819
+ return parseStyle(this.style_, bandCount, nodataBandIndex);
3820
+ }
3821
+ /**
3822
+ * Rebuild the shaders for the given render projection and apply them to the
3823
+ * renderer.
3824
+ * @private
3825
+ * @param {import("../proj/Projection.js").default} [projection] The render projection.
3826
+ */
3827
+ applyShaders_(projection) {
3828
+ var _a;
3829
+ const parsedStyle = this.parseStyleForRender_(projection);
3830
+ (_a = this.getRenderer()) == null ? void 0 : _a.reset({
3831
+ vertexShader: parsedStyle.vertexShader,
3832
+ fragmentShader: parsedStyle.fragmentShader,
3833
+ uniforms: parsedStyle.uniforms,
3834
+ paletteTextures: parsedStyle.paletteTextures
3835
+ });
3836
+ }
3837
+ /**
3838
+ * @override
3839
+ */
3840
+ createRenderer() {
3841
+ var _a, _b;
3842
+ const projection = (_b = (_a = this.getMapInternal()) == null ? void 0 : _a.getView()) == null ? void 0 : _b.getProjection();
3843
+ const parsedStyle = this.parseStyleForRender_(projection);
3844
+ return new TileLayer_default(this, {
3845
+ vertexShader: parsedStyle.vertexShader,
3846
+ fragmentShader: parsedStyle.fragmentShader,
3847
+ uniforms: parsedStyle.uniforms,
3848
+ cacheSize: this.getCacheSize(),
3849
+ paletteTextures: parsedStyle.paletteTextures
3850
+ });
3851
+ }
3852
+ /**
3853
+ * @param {import("../Map.js").FrameState} frameState Frame state.
3854
+ * @param {Array<SourceType>} sources Sources.
3855
+ * @return {HTMLElement} Canvas.
3856
+ */
3857
+ renderSources(frameState, sources) {
3858
+ const layerRenderer = this.getRenderer();
3859
+ if (!layerRenderer) {
3860
+ return (
3861
+ /** @type {HTMLElement} */
3862
+ document.createElement("div")
3863
+ );
3864
+ }
3865
+ let canvas;
3866
+ for (let i = 0, ii = sources.length; i < ii; ++i) {
3867
+ this.renderedSource_ = sources[i];
3868
+ if (layerRenderer.prepareFrame(frameState)) {
3869
+ canvas = layerRenderer.renderFrame(frameState);
3870
+ }
3871
+ }
3872
+ return canvas || /** @type {HTMLElement} */
3873
+ document.createElement("div");
3874
+ }
3875
+ /**
3876
+ * @param {?import("../Map.js").FrameState} frameState Frame state.
3877
+ * @param {HTMLElement} target Target which the renderer may (but need not) use
3878
+ * for rendering its content.
3879
+ * @return {HTMLElement} The rendered element.
3880
+ * @override
3881
+ */
3882
+ render(frameState, target) {
3883
+ this.rendered = true;
3884
+ if (!frameState) {
3885
+ return (
3886
+ /** @type {HTMLElement} */
3887
+ document.createElement("div")
3888
+ );
3889
+ }
3890
+ const viewState = frameState.viewState;
3891
+ const extent = frameState.extent;
3892
+ if (!extent) {
3893
+ return (
3894
+ /** @type {HTMLElement} */
3895
+ document.createElement("div")
3896
+ );
3897
+ }
3898
+ if (this.hasRenderer()) {
3899
+ const projection = viewState.projection;
3900
+ if (this.getSourceBandCount_(projection) !== this.styleBandCount_ || this.getSourceNodataBandIndex_(projection) !== this.styleNodataBandIndex_) {
3901
+ this.applyShaders_(projection);
3902
+ }
3903
+ }
3904
+ const sources = this.getSources(extent, viewState.resolution);
3905
+ let ready = true;
3906
+ for (let i = 0, ii = sources.length; i < ii; ++i) {
3907
+ const source = sources[i];
3908
+ const sourceState = source.getState();
3909
+ if (sourceState == "loading") {
3910
+ const onChange = () => {
3911
+ if (source.getState() == "ready") {
3912
+ source.removeEventListener("change", onChange);
3913
+ this.changed();
3914
+ }
3915
+ };
3916
+ source.addEventListener("change", onChange);
3917
+ }
3918
+ ready = ready && sourceState == "ready";
3919
+ }
3920
+ const canvas = this.renderSources(frameState, sources);
3921
+ const renderer = this.getRenderer();
3922
+ if ((renderer == null ? void 0 : renderer.renderComplete) && ready) {
3923
+ this.renderedResolution_ = viewState.resolution;
3924
+ return canvas;
3925
+ }
3926
+ if (this.renderedResolution_ > 0.5 * viewState.resolution) {
3927
+ const altSources = this.getSources(
3928
+ extent,
3929
+ this.renderedResolution_
3930
+ ).filter((source) => !sources.includes(source));
3931
+ if (altSources.length > 0) {
3932
+ return this.renderSources(frameState, altSources);
3933
+ }
3934
+ }
3935
+ return canvas;
3936
+ }
3937
+ /**
3938
+ * Update the layer style. The `updateStyleVariables` function is a more efficient
3939
+ * way to update layer rendering. In cases where the whole style needs to be updated,
3940
+ * this method may be called instead. Note that calling this method will also replace
3941
+ * any previously set variables, so the new style also needs to include new variables,
3942
+ * if needed.
3943
+ * @param {Style} style The new style.
3944
+ */
3945
+ setStyle(style) {
3946
+ var _a, _b;
3947
+ this.styleVariables_ = style.variables || {};
3948
+ this.style_ = style;
3949
+ if (this.hasRenderer()) {
3950
+ const projection = (_b = (_a = this.getMapInternal()) == null ? void 0 : _a.getView()) == null ? void 0 : _b.getProjection();
3951
+ this.applyShaders_(projection);
3952
+ this.changed();
3953
+ }
3954
+ }
3955
+ /**
3956
+ * Update any variables used by the layer style and trigger a re-render.
3957
+ * @param {Object<string, number>} variables Variables to update.
3958
+ * @api
3959
+ */
3960
+ updateStyleVariables(variables) {
3961
+ Object.assign(this.styleVariables_, variables);
3962
+ this.changed();
3963
+ }
3964
+ };
3965
+ WebGLTileLayer.prototype.dispose;
3966
+ var WebGLTile_default = WebGLTileLayer;
3967
+
3968
+ // src/components/map/layers/geotiff.layer.ts
3969
+ async function getNoDataValue(gtSource, fallback) {
3970
+ var _a, _b, _c;
3971
+ await gtSource.getView();
3972
+ try {
3973
+ const gtImage = (_b = (_a = gtSource.sourceImagery_) == null ? void 0 : _a[0]) == null ? void 0 : _b[0];
3974
+ const tagValue = (_c = gtImage == null ? void 0 : gtImage.fileDirectory) == null ? void 0 : _c.GDAL_NODATA;
3975
+ return tagValue !== void 0 ? parseFloat(tagValue) : fallback;
3976
+ } catch (error) {
3977
+ console.warn(
3978
+ "Failed to read GDAL_NODATA tag from GeoTIFF source; falling back to configured noDataValue.",
3979
+ error
3980
+ );
3981
+ return fallback;
3982
+ }
3983
+ }
3984
+ function computeMinMax(pixels, noDataValue) {
3985
+ let min = Infinity;
3986
+ let max = -Infinity;
3987
+ for (let i = 0; i < pixels.length; i++) {
3988
+ const val = pixels[i];
3989
+ if (!Number.isNaN(val) && val !== noDataValue) {
3990
+ if (val < min) min = val;
3991
+ if (val > max) max = val;
3992
+ }
3993
+ }
3994
+ return { min, max };
3995
+ }
3996
+ async function getMinMax(gtSource, noDataValue) {
3997
+ await gtSource.getView();
3998
+ const gtImage = gtSource.sourceImagery_[0][0];
3999
+ const rasterData = await gtImage.readRasters({ samples: [0] });
4000
+ return computeMinMax(rasterData[0], noDataValue);
4001
+ }
4002
+ function buildStopsFromColors(colors, min, max) {
4003
+ const steps = colors.length;
4004
+ const delta = (max - min) / (steps - 1);
4005
+ const stops = new Array(steps * 2);
4006
+ const dataVals = [];
4007
+ for (let i = 0; i < steps; i++) {
4008
+ stops[i * 2] = min + i * delta;
4009
+ stops[i * 2 + 1] = colors[i];
4010
+ dataVals.push((min + i * delta).toExponential(2));
4011
+ }
4012
+ const legendValues = [];
4013
+ for (let i = colors.length - 1; i > 0; i--) {
4014
+ const curVal = parseFloat(dataVals[i]);
4015
+ if (curVal >= min && curVal <= max) {
4016
+ legendValues.push({ value: dataVals[i], rgb: colors[i] });
4017
+ }
4018
+ }
4019
+ return { stops, legendValues };
4020
+ }
4021
+ async function buildColorStops(colorMapName, min, max, steps, reverse) {
4022
+ const { default: colormap } = await import("./colormap.EECGBITI.js");
4023
+ const colors = colormap({
4024
+ colormap: colorMapName,
4025
+ nshades: steps,
4026
+ format: "rgba"
4027
+ });
4028
+ if (reverse) {
4029
+ colors.reverse();
4030
+ }
4031
+ return buildStopsFromColors(colors, min, max);
4032
+ }
4033
+ async function buildGeoTiffLayer(config) {
4034
+ const {
4035
+ url,
4036
+ bands = [1],
4037
+ noDataValue,
4038
+ opacity,
4039
+ colorMapName = "viridis",
4040
+ colorSteps = 72,
4041
+ reverseColors = false
4042
+ } = config;
4043
+ const { default: GeoTIFF } = await import("./GeoTIFF.CENKOG7R.js");
4044
+ const gtSource = new GeoTIFF({
4045
+ sources: [{ url, bands, nodata: noDataValue }],
4046
+ // Enable wrapping so the GeoTIFF is always visible when scrolling
4047
+ wrapX: true,
4048
+ interpolate: false,
4049
+ normalize: false
4050
+ });
4051
+ const layer = new WebGLTile_default({ source: gtSource });
4052
+ if (opacity !== void 0) {
4053
+ layer.setOpacity(opacity);
4054
+ }
4055
+ const resolvedNoDataValue = await getNoDataValue(gtSource, noDataValue);
4056
+ const { min, max } = await getMinMax(gtSource, resolvedNoDataValue);
4057
+ const { stops: colorStops, legendValues } = await buildColorStops(
4058
+ colorMapName,
4059
+ min,
4060
+ max,
4061
+ colorSteps,
4062
+ reverseColors
4063
+ );
4064
+ layer.setStyle({
4065
+ color: [
4066
+ "case",
4067
+ ["==", ["band", 2], 0],
4068
+ [0, 0, 0, 0],
4069
+ ["interpolate", ["linear"], ["band", 1], ...colorStops]
4070
+ ]
4071
+ });
4072
+ const view = await gtSource.getView();
4073
+ return {
4074
+ layer,
4075
+ extent: view.extent,
4076
+ projection: view.projection,
4077
+ min,
4078
+ max,
4079
+ colorStops,
4080
+ legendValues
4081
+ };
4082
+ }
4083
+
4084
+ export {
4085
+ WebGLTile_default,
4086
+ computeMinMax,
4087
+ buildStopsFromColors,
4088
+ buildGeoTiffLayer
4089
+ };