@sjcrh/proteinpaint-client 2.204.0 → 2.205.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (924) hide show
  1. package/dist/2dmaf-ZQ7ACPAD.js +1367 -0
  2. package/dist/AggMatrixInput-EACGUIQA.js +277 -0
  3. package/dist/AggregateMatrix-TC5DTSYN.js +41 -0
  4. package/dist/AppHeader-PHI6US5B.js +830 -0
  5. package/dist/BoxPlot-QWKK3IJ7.js +1211 -0
  6. package/dist/CorrelationVolcano-QJJN7FVP.js +614 -0
  7. package/dist/Cuminc-6F2C5C4E.js +1219 -0
  8. package/dist/DE-HRJH6ZQL.js +89 -0
  9. package/dist/DE-HRJH6ZQL.js.map +7 -0
  10. package/dist/DEinput-T3MPAYPH.js +499 -0
  11. package/dist/DEinput-T3MPAYPH.js.map +7 -0
  12. package/dist/DM-PEG4ED2X.js +90 -0
  13. package/dist/DM-PEG4ED2X.js.map +7 -0
  14. package/dist/DifferentialAnalysis-XGXHWGPI.js +237 -0
  15. package/dist/Disco-7SRTTB3X.js +3389 -0
  16. package/dist/Disco.UI-CKKZ5MMK.js +243 -0
  17. package/dist/DmrPlot-N4CT4J2I.js +637 -0
  18. package/dist/GB-NVCLPRWN.js +1391 -0
  19. package/dist/GSEA-UZUNJG7Z.js +851 -0
  20. package/dist/GeneExpInput-3MDN2CAW.js +362 -0
  21. package/dist/Geomap-ZUF2PE5A.js +84 -0
  22. package/dist/HicApp-OIJT5TFU.js +2245 -0
  23. package/dist/IDCViewer-ZSH2E57L.js +10812 -0
  24. package/dist/NumBinaryEditor-74ZPGT7L.js +279 -0
  25. package/dist/NumBinaryEditor.unit.spec-T2I66SO5.js +312 -0
  26. package/dist/NumContEditor-M2GARZXM.js +105 -0
  27. package/dist/NumContEditor.unit.spec-G2QBBNH7.js +164 -0
  28. package/dist/NumCustomBinEditor-P44G67KS.js +33 -0
  29. package/dist/NumCustomBinEditor.unit.spec-AZHJN3V6.js +397 -0
  30. package/dist/NumDiscreteEditor-VOZ63LZY.js +170 -0
  31. package/dist/NumDiscreteEditor.unit.spec-CFSVPNBA.js +233 -0
  32. package/dist/NumRegularBinEditor-I6GJQR7W.js +33 -0
  33. package/dist/NumRegularBinEditor.unit.spec-IDJE7H6S.js +278 -0
  34. package/dist/NumSplineEditor-BCGWE52A.js +210 -0
  35. package/dist/NumSplineEditor.unit.spec-YQAL7L2E.js +224 -0
  36. package/dist/NumericDensity-P25W63RV.js +33 -0
  37. package/dist/NumericDensity.unit.spec-N7CQ5W5L.js +418 -0
  38. package/dist/NumericHandler-R7JWIFEO.js +34 -0
  39. package/dist/NumericHandler.unit.spec-LMGIAGZJ.js +214 -0
  40. package/dist/ProteomeInput-PRYKKF5E.js +388 -0
  41. package/dist/Regression-PSHH7ZXN.js +1416 -0
  42. package/dist/RunChart2-KJ2UWVCE.js +749 -0
  43. package/dist/SC-R6ZIJZ6F.js +1107 -0
  44. package/dist/Violin-GTQAUJ7B.js +1082 -0
  45. package/dist/Volcano-NER64J7W.js +1649 -0
  46. package/dist/Volcano-NER64J7W.js.map +7 -0
  47. package/dist/Wsi-GXNGL7O6.js +431 -0
  48. package/dist/adSandbox-SXSHVG4P.js +33 -0
  49. package/dist/animatedBubbleChart-Q4NEETEH.js +547 -0
  50. package/dist/app-MX4PL2QO.js +42 -0
  51. package/dist/app-R5CTEVAC.js +32 -0
  52. package/dist/app.js +14 -14
  53. package/dist/bam-45N3FEEM.js +876 -0
  54. package/dist/barchart-YCTKQJQX.js +42 -0
  55. package/dist/barchart2-252GS3CA.js +309 -0
  56. package/dist/block-CR75JHV3.js +6249 -0
  57. package/dist/block.init-U3JMED2E.js +33 -0
  58. package/dist/block.mds.expressionrank-TAN3BDPS.js +354 -0
  59. package/dist/block.mds.geneboxplot-EN344GEP.js +823 -0
  60. package/dist/block.mds.junction-RFVVJUTR.js +1539 -0
  61. package/dist/block.mds.svcnv-SSUMXEWD.js +6796 -0
  62. package/dist/block.svg-LRPGNFFI.js +159 -0
  63. package/dist/block.tk.aicheck-YY23FT2G.js +278 -0
  64. package/dist/block.tk.ase-JCGPFKFT.js +360 -0
  65. package/dist/block.tk.bam-NZDC4H7Y.js +1901 -0
  66. package/dist/block.tk.bedgraphdot-NCNZPZH6.js +379 -0
  67. package/dist/block.tk.bigwig.ui-Z7G6ZITU.js +206 -0
  68. package/dist/block.tk.hicstraw-VVDP4UF5.js +818 -0
  69. package/dist/block.tk.junction-L4YBPAHM.js +2358 -0
  70. package/dist/block.tk.junction.textmatrixui-6CMKKUB5.js +194 -0
  71. package/dist/block.tk.ld-VCP2R5UO.js +94 -0
  72. package/dist/block.tk.menu-ZJYGMEDX.js +1024 -0
  73. package/dist/block.tk.pgv-M5WNUIVS.js +938 -0
  74. package/dist/brainImaging-JGECJHZO.js +515 -0
  75. package/dist/brainRegions-NTEAXNZJ.js +234 -0
  76. package/dist/brainRegions-NTEAXNZJ.js.map +7 -0
  77. package/dist/bubbleHeatmap-7DQNWBQ2.js +378 -0
  78. package/dist/cellTypeBubbleHeatmap-LAE7U3RF.js +278 -0
  79. package/dist/chunk-2AQT3ZWL.js +626 -0
  80. package/dist/chunk-2GLNPB5J.js +203 -0
  81. package/dist/chunk-2O4CS3EZ.js +274 -0
  82. package/dist/chunk-2Z4ZSINZ.js +323 -0
  83. package/dist/chunk-2Z4ZSINZ.js.map +7 -0
  84. package/dist/chunk-3MFFZRH3.js +6360 -0
  85. package/dist/chunk-3PHXBY3Z.js +1275 -0
  86. package/dist/chunk-3PHXBY3Z.js.map +7 -0
  87. package/dist/chunk-4AQQ3BXD.js +70 -0
  88. package/dist/chunk-4PPZYVWZ.js +281 -0
  89. package/dist/chunk-4WEA7HHH.js +26 -0
  90. package/dist/chunk-57NYHASA.js +38 -0
  91. package/dist/chunk-5AAAH4OZ.js +141 -0
  92. package/dist/chunk-5BCNVZIW.js +480 -0
  93. package/dist/chunk-6JBQLOJW.js +1339 -0
  94. package/dist/chunk-756KZF5Y.js +158 -0
  95. package/dist/chunk-ABTO5QSB.js +276 -0
  96. package/dist/chunk-ALEZQQOK.js +299 -0
  97. package/dist/chunk-APK7TUJX.js +102 -0
  98. package/dist/chunk-AQAFURQM.js +59 -0
  99. package/dist/chunk-CZ5QLVWK.js +49 -0
  100. package/dist/chunk-D2MZT7CC.js +176 -0
  101. package/dist/chunk-DE3F7FAP.js +34 -0
  102. package/dist/chunk-DF3IMIR2.js +464 -0
  103. package/dist/chunk-E4WIMTK4.js +446 -0
  104. package/dist/chunk-E7TJXNIL.js +42 -0
  105. package/dist/chunk-G3JNTWCX.js +103 -0
  106. package/dist/chunk-GN2IIC6U.js +160 -0
  107. package/dist/chunk-GRI74AXV.js +294 -0
  108. package/dist/chunk-IAE3KWN5.js +550 -0
  109. package/dist/chunk-IB4NE4SI.js +397 -0
  110. package/dist/chunk-IK2BO37K.js +1608 -0
  111. package/dist/chunk-IK2BO37K.js.map +7 -0
  112. package/dist/chunk-IS4VLUEX.js +382 -0
  113. package/dist/chunk-J2DICGKC.js +194 -0
  114. package/dist/chunk-J7JDCNLU.js +24141 -0
  115. package/dist/chunk-J7JDCNLU.js.map +7 -0
  116. package/dist/chunk-JBUEQ4E6.js +263 -0
  117. package/dist/chunk-JIDJBM2R.js +2676 -0
  118. package/dist/chunk-JNVWSFNC.js +54 -0
  119. package/dist/chunk-JYOIO5UY.js +2133 -0
  120. package/dist/chunk-JYOIO5UY.js.map +7 -0
  121. package/dist/chunk-KAFDQKN7.js +1720 -0
  122. package/dist/chunk-L743GRJE.js +783 -0
  123. package/dist/chunk-L743GRJE.js.map +7 -0
  124. package/dist/chunk-LGOTIL62.js +54 -0
  125. package/dist/chunk-LHP7RXET.js +243 -0
  126. package/dist/chunk-LK2GHBUH.js +123 -0
  127. package/dist/chunk-MAVDQAZE.js +518 -0
  128. package/dist/chunk-MKT4OJ3G.js +102 -0
  129. package/dist/chunk-N635HDJ4.js +178 -0
  130. package/dist/chunk-N635HDJ4.js.map +7 -0
  131. package/dist/chunk-NFAE6VNU.js +2327 -0
  132. package/dist/chunk-NG7K5KYO.js +56 -0
  133. package/dist/chunk-NXVUL3EY.js +2853 -0
  134. package/dist/chunk-NXVUL3EY.js.map +7 -0
  135. package/dist/chunk-ODMLC5FN.js +55 -0
  136. package/dist/chunk-OJ4TDGPQ.js +339 -0
  137. package/dist/chunk-OXLBPSJ6.js +379 -0
  138. package/dist/chunk-P5GRGXH4.js +98 -0
  139. package/dist/chunk-POWG4MPT.js +31 -0
  140. package/dist/chunk-Q25DABNW.js +217 -0
  141. package/dist/chunk-QHJGWCH3.js +4311 -0
  142. package/dist/chunk-QHJGWCH3.js.map +7 -0
  143. package/dist/chunk-R5OIIFSF.js +197 -0
  144. package/dist/chunk-RJFCT67B.js +2784 -0
  145. package/dist/chunk-RN4BOWRH.js +402 -0
  146. package/dist/chunk-RZFJ6K77.js +302 -0
  147. package/dist/chunk-S5UN4VIQ.js +272 -0
  148. package/dist/chunk-SDMNZJ7X.js +50 -0
  149. package/dist/chunk-SWZAHJYP.js +170 -0
  150. package/dist/chunk-SY63UUF7.js +562 -0
  151. package/dist/chunk-T46FA72N.js +119 -0
  152. package/dist/chunk-TBPVP3KZ.js +1986 -0
  153. package/dist/chunk-TBPVP3KZ.js.map +7 -0
  154. package/dist/chunk-VIBK253J.js +134 -0
  155. package/dist/chunk-WTAPOH2W.js +22699 -0
  156. package/dist/chunk-WTAPOH2W.js.map +7 -0
  157. package/dist/chunk-XKL2D2NN.js +240 -0
  158. package/dist/chunk-XXJT7DSL.js +677 -0
  159. package/dist/chunk-YHA3AYAM.js +5071 -0
  160. package/dist/chunk-YN5NY3D3.js +339 -0
  161. package/dist/chunk-YX6FIREB.js +14 -0
  162. package/dist/chunk-ZXU4ALLZ.js +129 -0
  163. package/dist/cohort-75FUW3UO.js +70 -0
  164. package/dist/condition-VW43Q6ZE.js +327 -0
  165. package/dist/controls-HOP2AFHD.js +34 -0
  166. package/dist/controls.config-CMIFSKQE.js +34 -0
  167. package/dist/correlation-PN7BS5OR.js +95 -0
  168. package/dist/customdata.inputui-ZBZX63PS.js +284 -0
  169. package/dist/dataDownload-LGA4LAUF.js +329 -0
  170. package/dist/databrowser.ui-IQRDVL66.js +425 -0
  171. package/dist/dictionary-BPWD77LJ.js +113 -0
  172. package/dist/dnaMethylation-A3XPPBBB.js +33 -0
  173. package/dist/dnaMethylation.integration.spec-554ITDQC.js +198 -0
  174. package/dist/dofetch-FQ42AX7C.js +48 -0
  175. package/dist/e2pca-F3GWG7WZ.js +344 -0
  176. package/dist/ep-QAVN472H.js +1249 -0
  177. package/dist/expclust.gdc.spec-DQNX7FTL.js +302 -0
  178. package/dist/facet-DH7OOZTJ.js +519 -0
  179. package/dist/gb-OCXOLAMD.js +81 -0
  180. package/dist/geneExpClustering-DWYRZGTS.js +244 -0
  181. package/dist/geneExpression-2NKSKZR6.js +33 -0
  182. package/dist/geneExpression-BGFR3KQE.js +310 -0
  183. package/dist/geneExpression.unit.spec-63EKKMET.js +99 -0
  184. package/dist/geneORA-BED6XL4D.js +273 -0
  185. package/dist/geneRanking-UB5RCQNP.js +548 -0
  186. package/dist/geneVariant-WJEONTTY.js +286 -0
  187. package/dist/geneVariant-Y4C2FPJK.js +36 -0
  188. package/dist/geneVariant.integration.spec-VFYLC47N.js +388 -0
  189. package/dist/genefusion.ui-P3NBIMLE.js +303 -0
  190. package/dist/geneset-O22RQAED.js +203 -0
  191. package/dist/genomeBrowser.spec-MM7WZUGI.js +276 -0
  192. package/dist/grin2-3YBIRKUT.js +70 -0
  193. package/dist/grin2-O637DNDS.js +1137 -0
  194. package/dist/hierCluster-3X3BQVNE.js +59 -0
  195. package/dist/hierCluster-7P7M75TU.js +55 -0
  196. package/dist/hierCluster.config-XFUOLLDK.js +36 -0
  197. package/dist/hierCluster.integration.spec-HKYGSDDG.js +483 -0
  198. package/dist/hierCluster.interactivity-JUZSWCM7.js +49 -0
  199. package/dist/hierCluster.renderers-NGPPAYFM.js +19 -0
  200. package/dist/imagePlot-LKGAFJO7.js +156 -0
  201. package/dist/importPlot-SRWQA2FH.js +8 -0
  202. package/dist/isoformExpression-RYIZQIVX.js +35 -0
  203. package/dist/isoformExpression.unit.spec-DP4ECITF.js +237 -0
  204. package/dist/junction-D7QQ3YSG.js +36 -0
  205. package/dist/junction.customTerm-ZEVNCVU7.js +16 -0
  206. package/dist/junction.unit.spec-6MAKIB3R.js +182 -0
  207. package/dist/launch.adhoc-FAHRZFYG.js +37 -0
  208. package/dist/leftlabel.sample-PDZLWLJ4.js +258 -0
  209. package/dist/lollipop-VWGJUHNX.js +166 -0
  210. package/dist/maf-W52H44WK.js +455 -0
  211. package/dist/maftimeline-5JV3HZLE.js +587 -0
  212. package/dist/matrix-CEVGKXSK.js +54 -0
  213. package/dist/matrix-EXNYXYLK.js +59 -0
  214. package/dist/matrix.cells-DVPWSLJW.js +26 -0
  215. package/dist/matrix.config-RLSTWDXC.js +37 -0
  216. package/dist/matrix.data-Z6GUACVZ.js +23 -0
  217. package/dist/matrix.groups-3ZSTUWRK.js +26 -0
  218. package/dist/matrix.integration.spec-4U2R3UB2.js +3160 -0
  219. package/dist/matrix.interactivity-DJZFQ7DN.js +37 -0
  220. package/dist/matrix.layout-RQJ6VB4P.js +39 -0
  221. package/dist/matrix.legend-YQ36NWKW.js +20 -0
  222. package/dist/matrix.renderers-MWDFI6HW.js +34 -0
  223. package/dist/matrix.serieses-LTC4RLYD.js +19 -0
  224. package/dist/matrix.sort-5VFYLABY.js +26 -0
  225. package/dist/matrix.sort.unit.spec-2RUEKUT4.js +468 -0
  226. package/dist/matrix.sorterUi-EEMYZLPI.js +16 -0
  227. package/dist/matrix.sorterUi.unit.spec-ZXGSPRFZ.js +338 -0
  228. package/dist/matrix.unit.spec-HTF6UV4L.js +150 -0
  229. package/dist/mavb-GGQRDCO6.js +727 -0
  230. package/dist/mds.fimo-YKV5OIYV.js +513 -0
  231. package/dist/mds.samplescatterplot-RQOEW2AW.js +1545 -0
  232. package/dist/mds.survivalplot-TN636DED.js +477 -0
  233. package/dist/multivalue-MDQY64EH.js +83 -0
  234. package/dist/numericDictTermCluster-E73TJCLI.js +63 -0
  235. package/dist/oncomatrix-AENXQMLL.js +290 -0
  236. package/dist/oncomatrix.spec-UD6U462U.js +443 -0
  237. package/dist/plot.2dvaf-XMRV6KEG.js +372 -0
  238. package/dist/plot.app-A6JKLYQQ.js +36 -0
  239. package/dist/plot.barplot-UIX7LVWR.js +97 -0
  240. package/dist/plot.boxplot-DIFWVLMA.js +146 -0
  241. package/dist/plot.brainImaging-ZRPVE2UK.js +51 -0
  242. package/dist/plot.disco-I56MT3PC.js +99 -0
  243. package/dist/plot.ssgq-FCKFSZTV.js +134 -0
  244. package/dist/plot.vaf2cov-E5C7RJ7Z.js +253 -0
  245. package/dist/polar2-SKVBB4FD.js +232 -0
  246. package/dist/profileForms-5B3MTUNP.js +941 -0
  247. package/dist/profilePlot-MCYCGEWT.js +49 -0
  248. package/dist/proteinView-5X55JWVL.js +1562 -0
  249. package/dist/proteomeCohortCompare-WZBMBLFD.js +780 -0
  250. package/dist/pseudbulk.unit.spec-Q4YTIPH7.js +86 -0
  251. package/dist/pseudobulk-3UIWCCCQ.js +35 -0
  252. package/dist/qualitative-6TJRXZFV.js +38 -0
  253. package/dist/radar2-6X4XW5IZ.js +327 -0
  254. package/dist/radarFacility2-UVPXWPV5.js +335 -0
  255. package/dist/rememberedGvQ.unit.spec-GVRFRVSO.js +211 -0
  256. package/dist/render-G7V6R4PV.js +33 -0
  257. package/dist/report-O7D46EKQ.js +217 -0
  258. package/dist/sampleView-6Y3OOOMW.js +43 -0
  259. package/dist/samplelst-JRVC4GYC.js +106 -0
  260. package/dist/samplematrix-VP5RQVRH.js +2193 -0
  261. package/dist/sc-BPHVEP6N.js +81 -0
  262. package/dist/scatter-2YYRZCSW.js +88 -0
  263. package/dist/scatter-Y4BIG2PW.js +880 -0
  264. package/dist/selectGenomeWithTklst-2BVZU5SW.js +129 -0
  265. package/dist/singleCellCellType-XBGCSIQT.js +33 -0
  266. package/dist/singleCellCellType.unit.spec-T4GFRLVZ.js +154 -0
  267. package/dist/singleCellGeneExpression-5ZPWLSVW.js +33 -0
  268. package/dist/singleCellGeneExpression.unit.spec-4O5UBUDU.js +148 -0
  269. package/dist/singleCellPlot-CZLQBGVU.js +49 -0
  270. package/dist/singlecell-IIUYX7OG.js +1566 -0
  271. package/dist/singlecell-O3P5BLWT.js +81 -0
  272. package/dist/snp-ZCYBF3ZQ.js +33 -0
  273. package/dist/snp.unit.spec-TAGD2DRL.js +171 -0
  274. package/dist/snplocus-TL25OOPE.js +203 -0
  275. package/dist/spliceevent.a53ss.diagram-I7J4PQZT.js +146 -0
  276. package/dist/spliceevent.exonskip.diagram-SB4454HB.js +278 -0
  277. package/dist/spliceevent.noeventdiagram-FOSDNYLH.js +455 -0
  278. package/dist/ssGSEA-WANB2X5L.js +33 -0
  279. package/dist/ssGSEA.unit.spec-4XXWU4XV.js +83 -0
  280. package/dist/stattable-FNTJLVNB.js +117 -0
  281. package/dist/studyCatalog-7KEOFLO2.js +378 -0
  282. package/dist/summarizeCnvGeneexp-P4AFZMKD.js +158 -0
  283. package/dist/summarizeGeneexpSurvival-YL2J7F4R.js +105 -0
  284. package/dist/summarizeMutationCnv-BHBHST5F.js +159 -0
  285. package/dist/summarizeMutationDiagnosis-Z7ZHTV27.js +35 -0
  286. package/dist/summarizeMutationSurvival-PZ4TYHT7.js +99 -0
  287. package/dist/summary-ZMNPO65S.js +42 -0
  288. package/dist/summary.integration.spec-DPJR2ZBE.js +409 -0
  289. package/dist/summaryInput-6JUFJZ5P.js +242 -0
  290. package/dist/sunburst-OWAUI3HC.js +278 -0
  291. package/dist/survival-6JPKG3VA.js +53 -0
  292. package/dist/survival-7EXICNK7.js +1248 -0
  293. package/dist/survival-7EXICNK7.js.map +7 -0
  294. package/dist/survival.integration.spec-A6NUJLL6.js +613 -0
  295. package/dist/svgraph-34IKFHUS.js +1382 -0
  296. package/dist/svmr-4XNPSVVQ.js +3837 -0
  297. package/dist/table-LPZATFLC.js +197 -0
  298. package/dist/termCollection-DYY5FXU5.js +252 -0
  299. package/dist/termCollection-WOAUFFIC.js +33 -0
  300. package/dist/termCollection.unit.spec-WTICTZ7H.js +299 -0
  301. package/dist/termCollectionFractionSelection-K5HPDEFP.js +42 -0
  302. package/dist/termCollectionFractionSelection.unit.spec-D7DG2HOI.js +188 -0
  303. package/dist/tk-DD2LWVGM.js +1121 -0
  304. package/dist/tk-NV7NBLT6.js +41 -0
  305. package/dist/tp.ui-B5J3UUVB.js +1454 -0
  306. package/dist/tvs.dt-XLKQT64T.js +34 -0
  307. package/dist/tvs.dtcnv.categorical-XIC3RH2D.js +35 -0
  308. package/dist/tvs.dtcnv.continuous-OA2K4LHF.js +67 -0
  309. package/dist/tvs.dtfusion-ZGNKALZB.js +35 -0
  310. package/dist/tvs.dtitd-6QSG4E34.js +35 -0
  311. package/dist/tvs.dtsnvindel-5CXXOGPH.js +35 -0
  312. package/dist/tvs.dtsv-QYYEYUD3.js +35 -0
  313. package/dist/tvs.samplelst-X77ODFFR.js +98 -0
  314. package/dist/tvs.termCollection-VXROWAPS.js +124 -0
  315. package/dist/vocabulary-DKWYTZRC.js +36 -0
  316. package/dist/wsi.direct-C3HQEC2V.js +8184 -0
  317. package/dist/wsi.direct-C3HQEC2V.js.map +7 -0
  318. package/package.json +3 -3
  319. package/dist/2dmaf-JIY57FG6.js +0 -1367
  320. package/dist/AIProjectAdmin-DGTBIE6E.js +0 -952
  321. package/dist/AIProjectAdmin-DGTBIE6E.js.map +0 -7
  322. package/dist/AggMatrixInput-FH6WRTLP.js +0 -277
  323. package/dist/AggregateMatrix-MGEX5AVF.js +0 -41
  324. package/dist/AppHeader-FFOQFH55.js +0 -830
  325. package/dist/BoxPlot-KCY4JVRX.js +0 -1211
  326. package/dist/CorrelationVolcano-E5URKQSM.js +0 -614
  327. package/dist/Cuminc-CBPMCKIC.js +0 -1219
  328. package/dist/DE-VANPWKZI.js +0 -88
  329. package/dist/DE-VANPWKZI.js.map +0 -7
  330. package/dist/DEinput-MONPHDB2.js +0 -405
  331. package/dist/DEinput-MONPHDB2.js.map +0 -7
  332. package/dist/DifferentialAnalysis-XRBS4PZI.js +0 -237
  333. package/dist/Disco-V2VJIDWG.js +0 -3389
  334. package/dist/Disco.UI-OEF5JXBU.js +0 -243
  335. package/dist/DmrPlot-KZUWJWBD.js +0 -637
  336. package/dist/GB-IYTEMMU7.js +0 -1391
  337. package/dist/GSEA-QB62B5KB.js +0 -851
  338. package/dist/GeneExpInput-CXX7SXMQ.js +0 -362
  339. package/dist/Geomap-QNHSCN4N.js +0 -84
  340. package/dist/HicApp-UIULZYYJ.js +0 -2245
  341. package/dist/IDCViewer-B2JENGZZ.js +0 -10812
  342. package/dist/NumBinaryEditor-JOU2J23M.js +0 -279
  343. package/dist/NumBinaryEditor.unit.spec-UXZBBVWL.js +0 -312
  344. package/dist/NumContEditor-BJGP4PVS.js +0 -105
  345. package/dist/NumContEditor.unit.spec-HEXOYIXC.js +0 -164
  346. package/dist/NumCustomBinEditor-HDRTVWNK.js +0 -33
  347. package/dist/NumCustomBinEditor.unit.spec-MN6QZ3ZB.js +0 -397
  348. package/dist/NumDiscreteEditor-JUBR45IJ.js +0 -170
  349. package/dist/NumDiscreteEditor.unit.spec-SDK2LR5B.js +0 -233
  350. package/dist/NumRegularBinEditor-AQPRZ3MI.js +0 -33
  351. package/dist/NumRegularBinEditor.unit.spec-GM3SFB2N.js +0 -278
  352. package/dist/NumSplineEditor-LYLROEGE.js +0 -210
  353. package/dist/NumSplineEditor.unit.spec-3Q2HP6IB.js +0 -224
  354. package/dist/NumericDensity-3ZCDZORO.js +0 -33
  355. package/dist/NumericDensity.unit.spec-MNIAR2PR.js +0 -418
  356. package/dist/NumericHandler-MUNEB5IS.js +0 -34
  357. package/dist/NumericHandler.unit.spec-KPWG2T27.js +0 -214
  358. package/dist/ProteomeInput-NEUHQ2G4.js +0 -388
  359. package/dist/Regression-C75T5LOY.js +0 -1416
  360. package/dist/RunChart2-CMQ2BBSJ.js +0 -749
  361. package/dist/SC-HYK26DXI.js +0 -1107
  362. package/dist/Violin-J5Z3NKMU.js +0 -1082
  363. package/dist/Volcano-VZGOJFM7.js +0 -1573
  364. package/dist/Volcano-VZGOJFM7.js.map +0 -7
  365. package/dist/WSIViewer-EEKHINZU.js +0 -18892
  366. package/dist/WSIViewer-EEKHINZU.js.map +0 -7
  367. package/dist/Wsi-ZP36MKK7.js +0 -431
  368. package/dist/WsiSamplesPlot-6G3U7U5L.js +0 -160
  369. package/dist/WsiSamplesPlot-6G3U7U5L.js.map +0 -7
  370. package/dist/adSandbox-W4THMDUI.js +0 -33
  371. package/dist/animatedBubbleChart-2IVR2WC3.js +0 -547
  372. package/dist/app-LAIPU5IO.js +0 -42
  373. package/dist/app-WMRDJINC.js +0 -32
  374. package/dist/bam-44WCWB5P.js +0 -876
  375. package/dist/barchart-P6XKCJRF.js +0 -42
  376. package/dist/barchart2-5NTYCQYN.js +0 -309
  377. package/dist/block-VEOD6CP4.js +0 -6249
  378. package/dist/block.init-RCPDUYAV.js +0 -33
  379. package/dist/block.mds.expressionrank-KALPK27B.js +0 -354
  380. package/dist/block.mds.geneboxplot-ZASU25BG.js +0 -823
  381. package/dist/block.mds.junction-DCVGVSYG.js +0 -1539
  382. package/dist/block.mds.svcnv-CEGYMRSE.js +0 -6796
  383. package/dist/block.svg-AW4E7NSS.js +0 -159
  384. package/dist/block.tk.aicheck-4ZPFLI5I.js +0 -278
  385. package/dist/block.tk.ase-F3VMNBE3.js +0 -360
  386. package/dist/block.tk.bam-3VDSEMVO.js +0 -1901
  387. package/dist/block.tk.bedgraphdot-3F6AMWFD.js +0 -379
  388. package/dist/block.tk.bigwig.ui-QO334QC3.js +0 -206
  389. package/dist/block.tk.hicstraw-VA7GNOOD.js +0 -818
  390. package/dist/block.tk.junction-7WIZ63R7.js +0 -2358
  391. package/dist/block.tk.junction.textmatrixui-ZHSVODGI.js +0 -194
  392. package/dist/block.tk.ld-JME4SP6A.js +0 -94
  393. package/dist/block.tk.menu-7BFQTH3Q.js +0 -1024
  394. package/dist/block.tk.pgv-C2N7UFYT.js +0 -938
  395. package/dist/brainImaging-6XFUKFZE.js +0 -515
  396. package/dist/brainRegions-SEMS7V4O.js +0 -216
  397. package/dist/brainRegions-SEMS7V4O.js.map +0 -7
  398. package/dist/bubbleHeatmap-YO4232WO.js +0 -378
  399. package/dist/cellTypeBubbleHeatmap-GM4BGCQ3.js +0 -278
  400. package/dist/chunk-2YDQC5BV.js +0 -562
  401. package/dist/chunk-3QMXNK7G.js +0 -379
  402. package/dist/chunk-4C2N2BQC.js +0 -6360
  403. package/dist/chunk-4Q46RDNU.js +0 -34
  404. package/dist/chunk-4YEDSMFX.js +0 -123
  405. package/dist/chunk-56HEUYYM.js +0 -2891
  406. package/dist/chunk-56HEUYYM.js.map +0 -7
  407. package/dist/chunk-5VMEMA4O.js +0 -158
  408. package/dist/chunk-66BJC6ZX.js +0 -217
  409. package/dist/chunk-6RN4RVKF.js +0 -480
  410. package/dist/chunk-6SKLD7JU.js +0 -59
  411. package/dist/chunk-7C45EYL6.js +0 -274
  412. package/dist/chunk-7RX5UEF3.js +0 -24193
  413. package/dist/chunk-7RX5UEF3.js.map +0 -7
  414. package/dist/chunk-AAM7HHPU.js +0 -103
  415. package/dist/chunk-AFMD6226.js +0 -240
  416. package/dist/chunk-AK3SW3VT.js +0 -176
  417. package/dist/chunk-BBYVVPEO.js +0 -1271
  418. package/dist/chunk-BBYVVPEO.js.map +0 -7
  419. package/dist/chunk-BMVRYEN2.js +0 -397
  420. package/dist/chunk-BZYTL2EU.js +0 -294
  421. package/dist/chunk-CLOHFGFX.js +0 -14
  422. package/dist/chunk-DAJT3XVZ.js +0 -31
  423. package/dist/chunk-DKPV7GCZ.js +0 -7966
  424. package/dist/chunk-DKPV7GCZ.js.map +0 -7
  425. package/dist/chunk-DMT6S5HJ.js +0 -5071
  426. package/dist/chunk-DO4SLQNP.js +0 -194
  427. package/dist/chunk-DUGOFIQS.js +0 -464
  428. package/dist/chunk-E3O6ZEWQ.js +0 -129
  429. package/dist/chunk-EJ3SSI5J.js +0 -382
  430. package/dist/chunk-FSDY4QVA.js +0 -272
  431. package/dist/chunk-FUEJFIQX.js +0 -203
  432. package/dist/chunk-FUSTNOQZ.js +0 -2130
  433. package/dist/chunk-FUSTNOQZ.js.map +0 -7
  434. package/dist/chunk-GAW2EETX.js +0 -281
  435. package/dist/chunk-GF6CKFXE.js +0 -1720
  436. package/dist/chunk-GI3RVOO4.js +0 -339
  437. package/dist/chunk-GQ6T62VJ.js +0 -141
  438. package/dist/chunk-GTMHDSOQ.js +0 -550
  439. package/dist/chunk-H555QBYP.js +0 -243
  440. package/dist/chunk-HKQDZKSF.js +0 -119
  441. package/dist/chunk-HLZVDBAI.js +0 -1985
  442. package/dist/chunk-HLZVDBAI.js.map +0 -7
  443. package/dist/chunk-HWMZ2OHD.js +0 -49
  444. package/dist/chunk-JG6SE6YU.js +0 -1339
  445. package/dist/chunk-JSVLKCIQ.js +0 -160
  446. package/dist/chunk-JVRGY6IU.js +0 -54
  447. package/dist/chunk-JXUFZZRJ.js +0 -626
  448. package/dist/chunk-K5YG7MVJ.js +0 -2676
  449. package/dist/chunk-KAUMP3RR.js +0 -56
  450. package/dist/chunk-KLGNLUXR.js +0 -518
  451. package/dist/chunk-KWLBPOPE.js +0 -38
  452. package/dist/chunk-L42F5J5C.js +0 -185
  453. package/dist/chunk-L42F5J5C.js.map +0 -7
  454. package/dist/chunk-LXTBOUBG.js +0 -677
  455. package/dist/chunk-MCRWA655.js +0 -98
  456. package/dist/chunk-NGBQL4CM.js +0 -54
  457. package/dist/chunk-OKUFTLFL.js +0 -4297
  458. package/dist/chunk-OKUFTLFL.js.map +0 -7
  459. package/dist/chunk-ONXYJWY6.js +0 -102
  460. package/dist/chunk-OYHID2D7.js +0 -50
  461. package/dist/chunk-PT5JDHPR.js +0 -42
  462. package/dist/chunk-PZZIDJIB.js +0 -806
  463. package/dist/chunk-PZZIDJIB.js.map +0 -7
  464. package/dist/chunk-S5SOLLGM.js +0 -1654
  465. package/dist/chunk-S5SOLLGM.js.map +0 -7
  466. package/dist/chunk-S6XG74R4.js +0 -70
  467. package/dist/chunk-TAEU6SPJ.js +0 -197
  468. package/dist/chunk-UBZRZ3PS.js +0 -102
  469. package/dist/chunk-VHDVTQFR.js +0 -2784
  470. package/dist/chunk-VRY7WSS6.js +0 -170
  471. package/dist/chunk-VSPUFGDX.js +0 -339
  472. package/dist/chunk-VVDFRJVN.js +0 -306
  473. package/dist/chunk-VVDFRJVN.js.map +0 -7
  474. package/dist/chunk-WFOC4W5A.js +0 -55
  475. package/dist/chunk-WVPFLPWB.js +0 -402
  476. package/dist/chunk-WZUUWGEU.js +0 -22834
  477. package/dist/chunk-WZUUWGEU.js.map +0 -7
  478. package/dist/chunk-X7IAKV5Z.js +0 -276
  479. package/dist/chunk-XHOL37O6.js +0 -299
  480. package/dist/chunk-XJGPL2JZ.js +0 -39
  481. package/dist/chunk-XJGPL2JZ.js.map +0 -7
  482. package/dist/chunk-XPB2GP3C.js +0 -2327
  483. package/dist/chunk-XPVU5AMT.js +0 -263
  484. package/dist/chunk-YLWSTPPL.js +0 -302
  485. package/dist/chunk-YZVWOQBP.js +0 -134
  486. package/dist/chunk-ZB3RP5QP.js +0 -446
  487. package/dist/chunk-ZU47ERPU.js +0 -26
  488. package/dist/cohort-ZTT2PSQA.js +0 -70
  489. package/dist/condition-L5DXIAJT.js +0 -327
  490. package/dist/controls-ROZP2O7A.js +0 -34
  491. package/dist/controls.config-YQKGHMIP.js +0 -34
  492. package/dist/correlation-6AKRIQXN.js +0 -95
  493. package/dist/customdata.inputui-DD3OFHUS.js +0 -284
  494. package/dist/dataDownload-VHHSLSZV.js +0 -329
  495. package/dist/databrowser.ui-RLYJOEWQ.js +0 -425
  496. package/dist/dictionary-IMOOQHIH.js +0 -113
  497. package/dist/dnaMethylation-T6XUIOJF.js +0 -33
  498. package/dist/dnaMethylation.integration.spec-NRJOIDRD.js +0 -198
  499. package/dist/dofetch-MLAEV3A2.js +0 -48
  500. package/dist/e2pca-F3TGJOMW.js +0 -344
  501. package/dist/ep-UAF6OL2Y.js +0 -1249
  502. package/dist/expclust.gdc.spec-GHH3JQ65.js +0 -302
  503. package/dist/facet-MB4C7GII.js +0 -519
  504. package/dist/gb-C5YSAFWP.js +0 -81
  505. package/dist/geneExpClustering-3BRSI5BR.js +0 -244
  506. package/dist/geneExpression-K3IZLSYC.js +0 -310
  507. package/dist/geneExpression-SIAPRA3E.js +0 -33
  508. package/dist/geneExpression.unit.spec-I66QVNT5.js +0 -99
  509. package/dist/geneORA-SLM3SNNS.js +0 -273
  510. package/dist/geneRanking-4EFYOR6A.js +0 -548
  511. package/dist/geneVariant-O347F2OY.js +0 -286
  512. package/dist/geneVariant-Z3BUIBLS.js +0 -36
  513. package/dist/geneVariant.integration.spec-ZZ65EYEL.js +0 -388
  514. package/dist/genefusion.ui-TK6UKPDR.js +0 -303
  515. package/dist/geneset-MVXSEOKZ.js +0 -203
  516. package/dist/genomeBrowser.spec-QDB4Z2L6.js +0 -276
  517. package/dist/grin2-DCU6PLPU.js +0 -70
  518. package/dist/grin2-P6Z45MCJ.js +0 -1137
  519. package/dist/hierCluster-3H47NLKS.js +0 -55
  520. package/dist/hierCluster-JG6VXTCV.js +0 -59
  521. package/dist/hierCluster.config-IP6I7RTS.js +0 -36
  522. package/dist/hierCluster.integration.spec-7PUNHRRS.js +0 -483
  523. package/dist/hierCluster.interactivity-FIDVRACV.js +0 -49
  524. package/dist/hierCluster.renderers-QMJWUPAI.js +0 -19
  525. package/dist/imagePlot-CXYKBCWS.js +0 -156
  526. package/dist/importPlot-Z4A54RXH.js +0 -8
  527. package/dist/isoformExpression-DMDV2PZY.js +0 -35
  528. package/dist/isoformExpression.unit.spec-W2LIYOXS.js +0 -237
  529. package/dist/junction-R5GMEO7Z.js +0 -36
  530. package/dist/junction.customTerm-AI44GNFV.js +0 -16
  531. package/dist/junction.unit.spec-SCRCANOC.js +0 -182
  532. package/dist/launch.adhoc-THLTYZJT.js +0 -37
  533. package/dist/leftlabel.sample-GKQXEY4J.js +0 -258
  534. package/dist/lollipop-2TW6GGPY.js +0 -166
  535. package/dist/maf-A4PVW5V2.js +0 -455
  536. package/dist/maftimeline-QMX3HOAU.js +0 -587
  537. package/dist/matrix-BGRYRU3T.js +0 -54
  538. package/dist/matrix-GPXTUVCQ.js +0 -59
  539. package/dist/matrix.cells-C6OY7F5T.js +0 -26
  540. package/dist/matrix.config-Z5ZGHXDV.js +0 -37
  541. package/dist/matrix.data-WB26I3TF.js +0 -23
  542. package/dist/matrix.groups-C2V2CV4A.js +0 -26
  543. package/dist/matrix.integration.spec-3COAXQBV.js +0 -3160
  544. package/dist/matrix.interactivity-NGHIQR3A.js +0 -37
  545. package/dist/matrix.layout-NYIOESGN.js +0 -39
  546. package/dist/matrix.legend-Q5HHWP5Q.js +0 -20
  547. package/dist/matrix.renderers-GLXZARIP.js +0 -34
  548. package/dist/matrix.serieses-LDQEPXPD.js +0 -19
  549. package/dist/matrix.sort-44TQNRIX.js +0 -26
  550. package/dist/matrix.sort.unit.spec-T3BDWJ3Z.js +0 -468
  551. package/dist/matrix.sorterUi-6Y4YBQYL.js +0 -16
  552. package/dist/matrix.sorterUi.unit.spec-NHUYNMNU.js +0 -338
  553. package/dist/matrix.unit.spec-C7IRIBN6.js +0 -150
  554. package/dist/mavb-E37LI73X.js +0 -727
  555. package/dist/mds.fimo-YTGX7VEN.js +0 -513
  556. package/dist/mds.samplescatterplot-FFGGJSI3.js +0 -1545
  557. package/dist/mds.survivalplot-NCWRXXV4.js +0 -477
  558. package/dist/multivalue-N7A2PU5K.js +0 -83
  559. package/dist/numericDictTermCluster-AKQKRBQH.js +0 -63
  560. package/dist/oncomatrix-QPVGACMF.js +0 -290
  561. package/dist/oncomatrix.spec-6L2NDN2G.js +0 -443
  562. package/dist/plot.2dvaf-6TLON77B.js +0 -372
  563. package/dist/plot.app-VM273TXU.js +0 -36
  564. package/dist/plot.barplot-IQTZURHK.js +0 -97
  565. package/dist/plot.boxplot-WEXB6HII.js +0 -146
  566. package/dist/plot.brainImaging-REGSSBHV.js +0 -51
  567. package/dist/plot.disco-F25Z3FQL.js +0 -99
  568. package/dist/plot.ssgq-CRRK26RS.js +0 -134
  569. package/dist/plot.vaf2cov-WCNPZKXK.js +0 -253
  570. package/dist/plot.wsi-6OAPT5BA.js +0 -36
  571. package/dist/plot.wsi-6OAPT5BA.js.map +0 -7
  572. package/dist/polar2-MH5GPXHJ.js +0 -232
  573. package/dist/profileForms-2YX2OYDI.js +0 -941
  574. package/dist/profilePlot-FUTMZ2PP.js +0 -49
  575. package/dist/proteinView-6Z4ALZW2.js +0 -1562
  576. package/dist/proteomeCohortCompare-6GLFOYI5.js +0 -780
  577. package/dist/pseudbulk.unit.spec-S7FDL3IX.js +0 -86
  578. package/dist/pseudobulk-A3LB23N2.js +0 -35
  579. package/dist/qualitative-5VJRMF4S.js +0 -38
  580. package/dist/radar2-2SJX4ZXN.js +0 -327
  581. package/dist/radarFacility2-7FPO34JS.js +0 -335
  582. package/dist/rememberedGvQ.unit.spec-WOQVPQ75.js +0 -211
  583. package/dist/render-ZLA2RRBP.js +0 -33
  584. package/dist/report-VCE6RILD.js +0 -217
  585. package/dist/sampleView-QYTX4OLI.js +0 -43
  586. package/dist/samplelst-7NGH3SUM.js +0 -106
  587. package/dist/samplematrix-SNAR6IBB.js +0 -2193
  588. package/dist/sc-2JETYAI4.js +0 -81
  589. package/dist/scatter-D7VZOBEE.js +0 -880
  590. package/dist/scatter-GHBQM2RR.js +0 -88
  591. package/dist/selectGenomeWithTklst-BD4GMGX3.js +0 -129
  592. package/dist/singleCellCellType-XHLOJVVC.js +0 -33
  593. package/dist/singleCellCellType.unit.spec-LCLR3IOD.js +0 -154
  594. package/dist/singleCellGeneExpression-JRBONI5C.js +0 -33
  595. package/dist/singleCellGeneExpression.unit.spec-Z2KSVCIG.js +0 -148
  596. package/dist/singleCellPlot-4462CQHF.js +0 -49
  597. package/dist/singlecell-CDUQ6MTO.js +0 -81
  598. package/dist/singlecell-SO3B5KJ7.js +0 -1566
  599. package/dist/snp-YE2MXKJO.js +0 -33
  600. package/dist/snp.unit.spec-MT57TGGQ.js +0 -171
  601. package/dist/snplocus-RSNKWY63.js +0 -203
  602. package/dist/spliceevent.a53ss.diagram-6N6YGYV7.js +0 -146
  603. package/dist/spliceevent.exonskip.diagram-LMNUS4XV.js +0 -278
  604. package/dist/spliceevent.noeventdiagram-LTBH4YD5.js +0 -455
  605. package/dist/ssGSEA-DPK4PDM2.js +0 -33
  606. package/dist/ssGSEA.unit.spec-K2SA7ME7.js +0 -83
  607. package/dist/stattable-PR47XT4F.js +0 -117
  608. package/dist/studyCatalog-GMUWIUL4.js +0 -378
  609. package/dist/summarizeCnvGeneexp-YZEMDLES.js +0 -158
  610. package/dist/summarizeGeneexpSurvival-3TXV6ZNI.js +0 -105
  611. package/dist/summarizeMutationCnv-EBWSEHWJ.js +0 -159
  612. package/dist/summarizeMutationDiagnosis-FXA25W3O.js +0 -35
  613. package/dist/summarizeMutationSurvival-MR4AOMNS.js +0 -99
  614. package/dist/summary-4C6LGTMF.js +0 -42
  615. package/dist/summary.integration.spec-Y6JLH7NH.js +0 -409
  616. package/dist/summaryInput-NWT2DXWU.js +0 -242
  617. package/dist/sunburst-266MA7E2.js +0 -278
  618. package/dist/survival-CAZCIY2N.js +0 -53
  619. package/dist/survival-EILGNIY7.js +0 -1246
  620. package/dist/survival-EILGNIY7.js.map +0 -7
  621. package/dist/survival.integration.spec-34JJVLLI.js +0 -613
  622. package/dist/svgraph-OFUESREM.js +0 -1382
  623. package/dist/svmr-PVH42MY4.js +0 -3837
  624. package/dist/table-C2SICFZV.js +0 -197
  625. package/dist/termCollection-H4RL5WJG.js +0 -33
  626. package/dist/termCollection-TGYDI7NP.js +0 -252
  627. package/dist/termCollection.unit.spec-JSALS7GL.js +0 -299
  628. package/dist/termCollectionFractionSelection-YJVDNV4I.js +0 -42
  629. package/dist/termCollectionFractionSelection.unit.spec-4GM7P4ZW.js +0 -188
  630. package/dist/tk-RZCPSHJG.js +0 -1121
  631. package/dist/tk-SNTRA5CC.js +0 -41
  632. package/dist/tp.ui-2W4K3XH6.js +0 -1454
  633. package/dist/tvs.dt-GIPVC3R6.js +0 -34
  634. package/dist/tvs.dtcnv.categorical-TEYAS4OU.js +0 -35
  635. package/dist/tvs.dtcnv.continuous-VQRATYPZ.js +0 -67
  636. package/dist/tvs.dtfusion-P2KF5Z4H.js +0 -35
  637. package/dist/tvs.dtitd-TM6UROSH.js +0 -35
  638. package/dist/tvs.dtsnvindel-FZXC23NF.js +0 -35
  639. package/dist/tvs.dtsv-Y5QEJPYG.js +0 -35
  640. package/dist/tvs.samplelst-MLAFPFER.js +0 -98
  641. package/dist/tvs.termCollection-ZQQDKESH.js +0 -124
  642. package/dist/vocabulary-JRUZPHMG.js +0 -36
  643. package/dist/wsi.direct-6QYNXOBY.js +0 -244
  644. package/dist/wsi.direct-6QYNXOBY.js.map +0 -7
  645. /package/dist/{2dmaf-JIY57FG6.js.map → 2dmaf-ZQ7ACPAD.js.map} +0 -0
  646. /package/dist/{AggMatrixInput-FH6WRTLP.js.map → AggMatrixInput-EACGUIQA.js.map} +0 -0
  647. /package/dist/{AggregateMatrix-MGEX5AVF.js.map → AggregateMatrix-TC5DTSYN.js.map} +0 -0
  648. /package/dist/{AppHeader-FFOQFH55.js.map → AppHeader-PHI6US5B.js.map} +0 -0
  649. /package/dist/{BoxPlot-KCY4JVRX.js.map → BoxPlot-QWKK3IJ7.js.map} +0 -0
  650. /package/dist/{CorrelationVolcano-E5URKQSM.js.map → CorrelationVolcano-QJJN7FVP.js.map} +0 -0
  651. /package/dist/{Cuminc-CBPMCKIC.js.map → Cuminc-6F2C5C4E.js.map} +0 -0
  652. /package/dist/{DifferentialAnalysis-XRBS4PZI.js.map → DifferentialAnalysis-XGXHWGPI.js.map} +0 -0
  653. /package/dist/{Disco-V2VJIDWG.js.map → Disco-7SRTTB3X.js.map} +0 -0
  654. /package/dist/{Disco.UI-OEF5JXBU.js.map → Disco.UI-CKKZ5MMK.js.map} +0 -0
  655. /package/dist/{DmrPlot-KZUWJWBD.js.map → DmrPlot-N4CT4J2I.js.map} +0 -0
  656. /package/dist/{GB-IYTEMMU7.js.map → GB-NVCLPRWN.js.map} +0 -0
  657. /package/dist/{GSEA-QB62B5KB.js.map → GSEA-UZUNJG7Z.js.map} +0 -0
  658. /package/dist/{GeneExpInput-CXX7SXMQ.js.map → GeneExpInput-3MDN2CAW.js.map} +0 -0
  659. /package/dist/{Geomap-QNHSCN4N.js.map → Geomap-ZUF2PE5A.js.map} +0 -0
  660. /package/dist/{HicApp-UIULZYYJ.js.map → HicApp-OIJT5TFU.js.map} +0 -0
  661. /package/dist/{IDCViewer-B2JENGZZ.js.map → IDCViewer-ZSH2E57L.js.map} +0 -0
  662. /package/dist/{NumBinaryEditor-JOU2J23M.js.map → NumBinaryEditor-74ZPGT7L.js.map} +0 -0
  663. /package/dist/{NumBinaryEditor.unit.spec-UXZBBVWL.js.map → NumBinaryEditor.unit.spec-T2I66SO5.js.map} +0 -0
  664. /package/dist/{NumContEditor-BJGP4PVS.js.map → NumContEditor-M2GARZXM.js.map} +0 -0
  665. /package/dist/{NumContEditor.unit.spec-HEXOYIXC.js.map → NumContEditor.unit.spec-G2QBBNH7.js.map} +0 -0
  666. /package/dist/{NumCustomBinEditor-HDRTVWNK.js.map → NumCustomBinEditor-P44G67KS.js.map} +0 -0
  667. /package/dist/{NumCustomBinEditor.unit.spec-MN6QZ3ZB.js.map → NumCustomBinEditor.unit.spec-AZHJN3V6.js.map} +0 -0
  668. /package/dist/{NumDiscreteEditor-JUBR45IJ.js.map → NumDiscreteEditor-VOZ63LZY.js.map} +0 -0
  669. /package/dist/{NumDiscreteEditor.unit.spec-SDK2LR5B.js.map → NumDiscreteEditor.unit.spec-CFSVPNBA.js.map} +0 -0
  670. /package/dist/{NumRegularBinEditor-AQPRZ3MI.js.map → NumRegularBinEditor-I6GJQR7W.js.map} +0 -0
  671. /package/dist/{NumRegularBinEditor.unit.spec-GM3SFB2N.js.map → NumRegularBinEditor.unit.spec-IDJE7H6S.js.map} +0 -0
  672. /package/dist/{NumSplineEditor-LYLROEGE.js.map → NumSplineEditor-BCGWE52A.js.map} +0 -0
  673. /package/dist/{NumSplineEditor.unit.spec-3Q2HP6IB.js.map → NumSplineEditor.unit.spec-YQAL7L2E.js.map} +0 -0
  674. /package/dist/{NumericDensity-3ZCDZORO.js.map → NumericDensity-P25W63RV.js.map} +0 -0
  675. /package/dist/{NumericDensity.unit.spec-MNIAR2PR.js.map → NumericDensity.unit.spec-N7CQ5W5L.js.map} +0 -0
  676. /package/dist/{NumericHandler-MUNEB5IS.js.map → NumericHandler-R7JWIFEO.js.map} +0 -0
  677. /package/dist/{NumericHandler.unit.spec-KPWG2T27.js.map → NumericHandler.unit.spec-LMGIAGZJ.js.map} +0 -0
  678. /package/dist/{ProteomeInput-NEUHQ2G4.js.map → ProteomeInput-PRYKKF5E.js.map} +0 -0
  679. /package/dist/{Regression-C75T5LOY.js.map → Regression-PSHH7ZXN.js.map} +0 -0
  680. /package/dist/{RunChart2-CMQ2BBSJ.js.map → RunChart2-KJ2UWVCE.js.map} +0 -0
  681. /package/dist/{SC-HYK26DXI.js.map → SC-R6ZIJZ6F.js.map} +0 -0
  682. /package/dist/{Violin-J5Z3NKMU.js.map → Violin-GTQAUJ7B.js.map} +0 -0
  683. /package/dist/{Wsi-ZP36MKK7.js.map → Wsi-GXNGL7O6.js.map} +0 -0
  684. /package/dist/{adSandbox-W4THMDUI.js.map → adSandbox-SXSHVG4P.js.map} +0 -0
  685. /package/dist/{animatedBubbleChart-2IVR2WC3.js.map → animatedBubbleChart-Q4NEETEH.js.map} +0 -0
  686. /package/dist/{app-LAIPU5IO.js.map → app-MX4PL2QO.js.map} +0 -0
  687. /package/dist/{app-WMRDJINC.js.map → app-R5CTEVAC.js.map} +0 -0
  688. /package/dist/{bam-44WCWB5P.js.map → bam-45N3FEEM.js.map} +0 -0
  689. /package/dist/{barchart-P6XKCJRF.js.map → barchart-YCTKQJQX.js.map} +0 -0
  690. /package/dist/{barchart2-5NTYCQYN.js.map → barchart2-252GS3CA.js.map} +0 -0
  691. /package/dist/{block-VEOD6CP4.js.map → block-CR75JHV3.js.map} +0 -0
  692. /package/dist/{block.init-RCPDUYAV.js.map → block.init-U3JMED2E.js.map} +0 -0
  693. /package/dist/{block.mds.expressionrank-KALPK27B.js.map → block.mds.expressionrank-TAN3BDPS.js.map} +0 -0
  694. /package/dist/{block.mds.geneboxplot-ZASU25BG.js.map → block.mds.geneboxplot-EN344GEP.js.map} +0 -0
  695. /package/dist/{block.mds.junction-DCVGVSYG.js.map → block.mds.junction-RFVVJUTR.js.map} +0 -0
  696. /package/dist/{block.mds.svcnv-CEGYMRSE.js.map → block.mds.svcnv-SSUMXEWD.js.map} +0 -0
  697. /package/dist/{block.svg-AW4E7NSS.js.map → block.svg-LRPGNFFI.js.map} +0 -0
  698. /package/dist/{block.tk.aicheck-4ZPFLI5I.js.map → block.tk.aicheck-YY23FT2G.js.map} +0 -0
  699. /package/dist/{block.tk.ase-F3VMNBE3.js.map → block.tk.ase-JCGPFKFT.js.map} +0 -0
  700. /package/dist/{block.tk.bam-3VDSEMVO.js.map → block.tk.bam-NZDC4H7Y.js.map} +0 -0
  701. /package/dist/{block.tk.bedgraphdot-3F6AMWFD.js.map → block.tk.bedgraphdot-NCNZPZH6.js.map} +0 -0
  702. /package/dist/{block.tk.bigwig.ui-QO334QC3.js.map → block.tk.bigwig.ui-Z7G6ZITU.js.map} +0 -0
  703. /package/dist/{block.tk.hicstraw-VA7GNOOD.js.map → block.tk.hicstraw-VVDP4UF5.js.map} +0 -0
  704. /package/dist/{block.tk.junction-7WIZ63R7.js.map → block.tk.junction-L4YBPAHM.js.map} +0 -0
  705. /package/dist/{block.tk.junction.textmatrixui-ZHSVODGI.js.map → block.tk.junction.textmatrixui-6CMKKUB5.js.map} +0 -0
  706. /package/dist/{block.tk.ld-JME4SP6A.js.map → block.tk.ld-VCP2R5UO.js.map} +0 -0
  707. /package/dist/{block.tk.menu-7BFQTH3Q.js.map → block.tk.menu-ZJYGMEDX.js.map} +0 -0
  708. /package/dist/{block.tk.pgv-C2N7UFYT.js.map → block.tk.pgv-M5WNUIVS.js.map} +0 -0
  709. /package/dist/{brainImaging-6XFUKFZE.js.map → brainImaging-JGECJHZO.js.map} +0 -0
  710. /package/dist/{bubbleHeatmap-YO4232WO.js.map → bubbleHeatmap-7DQNWBQ2.js.map} +0 -0
  711. /package/dist/{cellTypeBubbleHeatmap-GM4BGCQ3.js.map → cellTypeBubbleHeatmap-LAE7U3RF.js.map} +0 -0
  712. /package/dist/{chunk-JXUFZZRJ.js.map → chunk-2AQT3ZWL.js.map} +0 -0
  713. /package/dist/{chunk-FUEJFIQX.js.map → chunk-2GLNPB5J.js.map} +0 -0
  714. /package/dist/{chunk-7C45EYL6.js.map → chunk-2O4CS3EZ.js.map} +0 -0
  715. /package/dist/{chunk-4C2N2BQC.js.map → chunk-3MFFZRH3.js.map} +0 -0
  716. /package/dist/{chunk-S6XG74R4.js.map → chunk-4AQQ3BXD.js.map} +0 -0
  717. /package/dist/{chunk-GAW2EETX.js.map → chunk-4PPZYVWZ.js.map} +0 -0
  718. /package/dist/{chunk-ZU47ERPU.js.map → chunk-4WEA7HHH.js.map} +0 -0
  719. /package/dist/{chunk-KWLBPOPE.js.map → chunk-57NYHASA.js.map} +0 -0
  720. /package/dist/{chunk-GQ6T62VJ.js.map → chunk-5AAAH4OZ.js.map} +0 -0
  721. /package/dist/{chunk-6RN4RVKF.js.map → chunk-5BCNVZIW.js.map} +0 -0
  722. /package/dist/{chunk-JG6SE6YU.js.map → chunk-6JBQLOJW.js.map} +0 -0
  723. /package/dist/{chunk-5VMEMA4O.js.map → chunk-756KZF5Y.js.map} +0 -0
  724. /package/dist/{chunk-X7IAKV5Z.js.map → chunk-ABTO5QSB.js.map} +0 -0
  725. /package/dist/{chunk-XHOL37O6.js.map → chunk-ALEZQQOK.js.map} +0 -0
  726. /package/dist/{chunk-UBZRZ3PS.js.map → chunk-APK7TUJX.js.map} +0 -0
  727. /package/dist/{chunk-6SKLD7JU.js.map → chunk-AQAFURQM.js.map} +0 -0
  728. /package/dist/{chunk-HWMZ2OHD.js.map → chunk-CZ5QLVWK.js.map} +0 -0
  729. /package/dist/{chunk-AK3SW3VT.js.map → chunk-D2MZT7CC.js.map} +0 -0
  730. /package/dist/{chunk-4Q46RDNU.js.map → chunk-DE3F7FAP.js.map} +0 -0
  731. /package/dist/{chunk-DUGOFIQS.js.map → chunk-DF3IMIR2.js.map} +0 -0
  732. /package/dist/{chunk-ZB3RP5QP.js.map → chunk-E4WIMTK4.js.map} +0 -0
  733. /package/dist/{chunk-PT5JDHPR.js.map → chunk-E7TJXNIL.js.map} +0 -0
  734. /package/dist/{chunk-AAM7HHPU.js.map → chunk-G3JNTWCX.js.map} +0 -0
  735. /package/dist/{chunk-JSVLKCIQ.js.map → chunk-GN2IIC6U.js.map} +0 -0
  736. /package/dist/{chunk-BZYTL2EU.js.map → chunk-GRI74AXV.js.map} +0 -0
  737. /package/dist/{chunk-GTMHDSOQ.js.map → chunk-IAE3KWN5.js.map} +0 -0
  738. /package/dist/{chunk-BMVRYEN2.js.map → chunk-IB4NE4SI.js.map} +0 -0
  739. /package/dist/{chunk-EJ3SSI5J.js.map → chunk-IS4VLUEX.js.map} +0 -0
  740. /package/dist/{chunk-DO4SLQNP.js.map → chunk-J2DICGKC.js.map} +0 -0
  741. /package/dist/{chunk-XPVU5AMT.js.map → chunk-JBUEQ4E6.js.map} +0 -0
  742. /package/dist/{chunk-K5YG7MVJ.js.map → chunk-JIDJBM2R.js.map} +0 -0
  743. /package/dist/{chunk-JVRGY6IU.js.map → chunk-JNVWSFNC.js.map} +0 -0
  744. /package/dist/{chunk-GF6CKFXE.js.map → chunk-KAFDQKN7.js.map} +0 -0
  745. /package/dist/{chunk-NGBQL4CM.js.map → chunk-LGOTIL62.js.map} +0 -0
  746. /package/dist/{chunk-H555QBYP.js.map → chunk-LHP7RXET.js.map} +0 -0
  747. /package/dist/{chunk-4YEDSMFX.js.map → chunk-LK2GHBUH.js.map} +0 -0
  748. /package/dist/{chunk-KLGNLUXR.js.map → chunk-MAVDQAZE.js.map} +0 -0
  749. /package/dist/{chunk-ONXYJWY6.js.map → chunk-MKT4OJ3G.js.map} +0 -0
  750. /package/dist/{chunk-XPB2GP3C.js.map → chunk-NFAE6VNU.js.map} +0 -0
  751. /package/dist/{chunk-KAUMP3RR.js.map → chunk-NG7K5KYO.js.map} +0 -0
  752. /package/dist/{chunk-WFOC4W5A.js.map → chunk-ODMLC5FN.js.map} +0 -0
  753. /package/dist/{chunk-GI3RVOO4.js.map → chunk-OJ4TDGPQ.js.map} +0 -0
  754. /package/dist/{chunk-3QMXNK7G.js.map → chunk-OXLBPSJ6.js.map} +0 -0
  755. /package/dist/{chunk-MCRWA655.js.map → chunk-P5GRGXH4.js.map} +0 -0
  756. /package/dist/{chunk-DAJT3XVZ.js.map → chunk-POWG4MPT.js.map} +0 -0
  757. /package/dist/{chunk-66BJC6ZX.js.map → chunk-Q25DABNW.js.map} +0 -0
  758. /package/dist/{chunk-TAEU6SPJ.js.map → chunk-R5OIIFSF.js.map} +0 -0
  759. /package/dist/{chunk-VHDVTQFR.js.map → chunk-RJFCT67B.js.map} +0 -0
  760. /package/dist/{chunk-WVPFLPWB.js.map → chunk-RN4BOWRH.js.map} +0 -0
  761. /package/dist/{chunk-YLWSTPPL.js.map → chunk-RZFJ6K77.js.map} +0 -0
  762. /package/dist/{chunk-FSDY4QVA.js.map → chunk-S5UN4VIQ.js.map} +0 -0
  763. /package/dist/{chunk-OYHID2D7.js.map → chunk-SDMNZJ7X.js.map} +0 -0
  764. /package/dist/{chunk-VRY7WSS6.js.map → chunk-SWZAHJYP.js.map} +0 -0
  765. /package/dist/{chunk-2YDQC5BV.js.map → chunk-SY63UUF7.js.map} +0 -0
  766. /package/dist/{chunk-HKQDZKSF.js.map → chunk-T46FA72N.js.map} +0 -0
  767. /package/dist/{chunk-YZVWOQBP.js.map → chunk-VIBK253J.js.map} +0 -0
  768. /package/dist/{chunk-AFMD6226.js.map → chunk-XKL2D2NN.js.map} +0 -0
  769. /package/dist/{chunk-LXTBOUBG.js.map → chunk-XXJT7DSL.js.map} +0 -0
  770. /package/dist/{chunk-DMT6S5HJ.js.map → chunk-YHA3AYAM.js.map} +0 -0
  771. /package/dist/{chunk-VSPUFGDX.js.map → chunk-YN5NY3D3.js.map} +0 -0
  772. /package/dist/{chunk-CLOHFGFX.js.map → chunk-YX6FIREB.js.map} +0 -0
  773. /package/dist/{chunk-E3O6ZEWQ.js.map → chunk-ZXU4ALLZ.js.map} +0 -0
  774. /package/dist/{cohort-ZTT2PSQA.js.map → cohort-75FUW3UO.js.map} +0 -0
  775. /package/dist/{condition-L5DXIAJT.js.map → condition-VW43Q6ZE.js.map} +0 -0
  776. /package/dist/{controls-ROZP2O7A.js.map → controls-HOP2AFHD.js.map} +0 -0
  777. /package/dist/{controls.config-YQKGHMIP.js.map → controls.config-CMIFSKQE.js.map} +0 -0
  778. /package/dist/{correlation-6AKRIQXN.js.map → correlation-PN7BS5OR.js.map} +0 -0
  779. /package/dist/{customdata.inputui-DD3OFHUS.js.map → customdata.inputui-ZBZX63PS.js.map} +0 -0
  780. /package/dist/{dataDownload-VHHSLSZV.js.map → dataDownload-LGA4LAUF.js.map} +0 -0
  781. /package/dist/{databrowser.ui-RLYJOEWQ.js.map → databrowser.ui-IQRDVL66.js.map} +0 -0
  782. /package/dist/{dictionary-IMOOQHIH.js.map → dictionary-BPWD77LJ.js.map} +0 -0
  783. /package/dist/{dnaMethylation-T6XUIOJF.js.map → dnaMethylation-A3XPPBBB.js.map} +0 -0
  784. /package/dist/{dnaMethylation.integration.spec-NRJOIDRD.js.map → dnaMethylation.integration.spec-554ITDQC.js.map} +0 -0
  785. /package/dist/{dofetch-MLAEV3A2.js.map → dofetch-FQ42AX7C.js.map} +0 -0
  786. /package/dist/{e2pca-F3TGJOMW.js.map → e2pca-F3GWG7WZ.js.map} +0 -0
  787. /package/dist/{ep-UAF6OL2Y.js.map → ep-QAVN472H.js.map} +0 -0
  788. /package/dist/{expclust.gdc.spec-GHH3JQ65.js.map → expclust.gdc.spec-DQNX7FTL.js.map} +0 -0
  789. /package/dist/{facet-MB4C7GII.js.map → facet-DH7OOZTJ.js.map} +0 -0
  790. /package/dist/{gb-C5YSAFWP.js.map → gb-OCXOLAMD.js.map} +0 -0
  791. /package/dist/{geneExpClustering-3BRSI5BR.js.map → geneExpClustering-DWYRZGTS.js.map} +0 -0
  792. /package/dist/{geneExpression-SIAPRA3E.js.map → geneExpression-2NKSKZR6.js.map} +0 -0
  793. /package/dist/{geneExpression-K3IZLSYC.js.map → geneExpression-BGFR3KQE.js.map} +0 -0
  794. /package/dist/{geneExpression.unit.spec-I66QVNT5.js.map → geneExpression.unit.spec-63EKKMET.js.map} +0 -0
  795. /package/dist/{geneORA-SLM3SNNS.js.map → geneORA-BED6XL4D.js.map} +0 -0
  796. /package/dist/{geneRanking-4EFYOR6A.js.map → geneRanking-UB5RCQNP.js.map} +0 -0
  797. /package/dist/{geneVariant-O347F2OY.js.map → geneVariant-WJEONTTY.js.map} +0 -0
  798. /package/dist/{geneVariant-Z3BUIBLS.js.map → geneVariant-Y4C2FPJK.js.map} +0 -0
  799. /package/dist/{geneVariant.integration.spec-ZZ65EYEL.js.map → geneVariant.integration.spec-VFYLC47N.js.map} +0 -0
  800. /package/dist/{genefusion.ui-TK6UKPDR.js.map → genefusion.ui-P3NBIMLE.js.map} +0 -0
  801. /package/dist/{geneset-MVXSEOKZ.js.map → geneset-O22RQAED.js.map} +0 -0
  802. /package/dist/{genomeBrowser.spec-QDB4Z2L6.js.map → genomeBrowser.spec-MM7WZUGI.js.map} +0 -0
  803. /package/dist/{grin2-DCU6PLPU.js.map → grin2-3YBIRKUT.js.map} +0 -0
  804. /package/dist/{grin2-P6Z45MCJ.js.map → grin2-O637DNDS.js.map} +0 -0
  805. /package/dist/{hierCluster-3H47NLKS.js.map → hierCluster-3X3BQVNE.js.map} +0 -0
  806. /package/dist/{hierCluster-JG6VXTCV.js.map → hierCluster-7P7M75TU.js.map} +0 -0
  807. /package/dist/{hierCluster.config-IP6I7RTS.js.map → hierCluster.config-XFUOLLDK.js.map} +0 -0
  808. /package/dist/{hierCluster.integration.spec-7PUNHRRS.js.map → hierCluster.integration.spec-HKYGSDDG.js.map} +0 -0
  809. /package/dist/{hierCluster.interactivity-FIDVRACV.js.map → hierCluster.interactivity-JUZSWCM7.js.map} +0 -0
  810. /package/dist/{hierCluster.renderers-QMJWUPAI.js.map → hierCluster.renderers-NGPPAYFM.js.map} +0 -0
  811. /package/dist/{imagePlot-CXYKBCWS.js.map → imagePlot-LKGAFJO7.js.map} +0 -0
  812. /package/dist/{importPlot-Z4A54RXH.js.map → importPlot-SRWQA2FH.js.map} +0 -0
  813. /package/dist/{isoformExpression-DMDV2PZY.js.map → isoformExpression-RYIZQIVX.js.map} +0 -0
  814. /package/dist/{isoformExpression.unit.spec-W2LIYOXS.js.map → isoformExpression.unit.spec-DP4ECITF.js.map} +0 -0
  815. /package/dist/{junction-R5GMEO7Z.js.map → junction-D7QQ3YSG.js.map} +0 -0
  816. /package/dist/{junction.customTerm-AI44GNFV.js.map → junction.customTerm-ZEVNCVU7.js.map} +0 -0
  817. /package/dist/{junction.unit.spec-SCRCANOC.js.map → junction.unit.spec-6MAKIB3R.js.map} +0 -0
  818. /package/dist/{launch.adhoc-THLTYZJT.js.map → launch.adhoc-FAHRZFYG.js.map} +0 -0
  819. /package/dist/{leftlabel.sample-GKQXEY4J.js.map → leftlabel.sample-PDZLWLJ4.js.map} +0 -0
  820. /package/dist/{lollipop-2TW6GGPY.js.map → lollipop-VWGJUHNX.js.map} +0 -0
  821. /package/dist/{maf-A4PVW5V2.js.map → maf-W52H44WK.js.map} +0 -0
  822. /package/dist/{maftimeline-QMX3HOAU.js.map → maftimeline-5JV3HZLE.js.map} +0 -0
  823. /package/dist/{matrix-BGRYRU3T.js.map → matrix-CEVGKXSK.js.map} +0 -0
  824. /package/dist/{matrix-GPXTUVCQ.js.map → matrix-EXNYXYLK.js.map} +0 -0
  825. /package/dist/{matrix.cells-C6OY7F5T.js.map → matrix.cells-DVPWSLJW.js.map} +0 -0
  826. /package/dist/{matrix.config-Z5ZGHXDV.js.map → matrix.config-RLSTWDXC.js.map} +0 -0
  827. /package/dist/{matrix.data-WB26I3TF.js.map → matrix.data-Z6GUACVZ.js.map} +0 -0
  828. /package/dist/{matrix.groups-C2V2CV4A.js.map → matrix.groups-3ZSTUWRK.js.map} +0 -0
  829. /package/dist/{matrix.integration.spec-3COAXQBV.js.map → matrix.integration.spec-4U2R3UB2.js.map} +0 -0
  830. /package/dist/{matrix.interactivity-NGHIQR3A.js.map → matrix.interactivity-DJZFQ7DN.js.map} +0 -0
  831. /package/dist/{matrix.layout-NYIOESGN.js.map → matrix.layout-RQJ6VB4P.js.map} +0 -0
  832. /package/dist/{matrix.legend-Q5HHWP5Q.js.map → matrix.legend-YQ36NWKW.js.map} +0 -0
  833. /package/dist/{matrix.renderers-GLXZARIP.js.map → matrix.renderers-MWDFI6HW.js.map} +0 -0
  834. /package/dist/{matrix.serieses-LDQEPXPD.js.map → matrix.serieses-LTC4RLYD.js.map} +0 -0
  835. /package/dist/{matrix.sort-44TQNRIX.js.map → matrix.sort-5VFYLABY.js.map} +0 -0
  836. /package/dist/{matrix.sort.unit.spec-T3BDWJ3Z.js.map → matrix.sort.unit.spec-2RUEKUT4.js.map} +0 -0
  837. /package/dist/{matrix.sorterUi-6Y4YBQYL.js.map → matrix.sorterUi-EEMYZLPI.js.map} +0 -0
  838. /package/dist/{matrix.sorterUi.unit.spec-NHUYNMNU.js.map → matrix.sorterUi.unit.spec-ZXGSPRFZ.js.map} +0 -0
  839. /package/dist/{matrix.unit.spec-C7IRIBN6.js.map → matrix.unit.spec-HTF6UV4L.js.map} +0 -0
  840. /package/dist/{mavb-E37LI73X.js.map → mavb-GGQRDCO6.js.map} +0 -0
  841. /package/dist/{mds.fimo-YTGX7VEN.js.map → mds.fimo-YKV5OIYV.js.map} +0 -0
  842. /package/dist/{mds.samplescatterplot-FFGGJSI3.js.map → mds.samplescatterplot-RQOEW2AW.js.map} +0 -0
  843. /package/dist/{mds.survivalplot-NCWRXXV4.js.map → mds.survivalplot-TN636DED.js.map} +0 -0
  844. /package/dist/{multivalue-N7A2PU5K.js.map → multivalue-MDQY64EH.js.map} +0 -0
  845. /package/dist/{numericDictTermCluster-AKQKRBQH.js.map → numericDictTermCluster-E73TJCLI.js.map} +0 -0
  846. /package/dist/{oncomatrix-QPVGACMF.js.map → oncomatrix-AENXQMLL.js.map} +0 -0
  847. /package/dist/{oncomatrix.spec-6L2NDN2G.js.map → oncomatrix.spec-UD6U462U.js.map} +0 -0
  848. /package/dist/{plot.2dvaf-6TLON77B.js.map → plot.2dvaf-XMRV6KEG.js.map} +0 -0
  849. /package/dist/{plot.app-VM273TXU.js.map → plot.app-A6JKLYQQ.js.map} +0 -0
  850. /package/dist/{plot.barplot-IQTZURHK.js.map → plot.barplot-UIX7LVWR.js.map} +0 -0
  851. /package/dist/{plot.boxplot-WEXB6HII.js.map → plot.boxplot-DIFWVLMA.js.map} +0 -0
  852. /package/dist/{plot.brainImaging-REGSSBHV.js.map → plot.brainImaging-ZRPVE2UK.js.map} +0 -0
  853. /package/dist/{plot.disco-F25Z3FQL.js.map → plot.disco-I56MT3PC.js.map} +0 -0
  854. /package/dist/{plot.ssgq-CRRK26RS.js.map → plot.ssgq-FCKFSZTV.js.map} +0 -0
  855. /package/dist/{plot.vaf2cov-WCNPZKXK.js.map → plot.vaf2cov-E5C7RJ7Z.js.map} +0 -0
  856. /package/dist/{polar2-MH5GPXHJ.js.map → polar2-SKVBB4FD.js.map} +0 -0
  857. /package/dist/{profileForms-2YX2OYDI.js.map → profileForms-5B3MTUNP.js.map} +0 -0
  858. /package/dist/{profilePlot-FUTMZ2PP.js.map → profilePlot-MCYCGEWT.js.map} +0 -0
  859. /package/dist/{proteinView-6Z4ALZW2.js.map → proteinView-5X55JWVL.js.map} +0 -0
  860. /package/dist/{proteomeCohortCompare-6GLFOYI5.js.map → proteomeCohortCompare-WZBMBLFD.js.map} +0 -0
  861. /package/dist/{pseudbulk.unit.spec-S7FDL3IX.js.map → pseudbulk.unit.spec-Q4YTIPH7.js.map} +0 -0
  862. /package/dist/{pseudobulk-A3LB23N2.js.map → pseudobulk-3UIWCCCQ.js.map} +0 -0
  863. /package/dist/{qualitative-5VJRMF4S.js.map → qualitative-6TJRXZFV.js.map} +0 -0
  864. /package/dist/{radar2-2SJX4ZXN.js.map → radar2-6X4XW5IZ.js.map} +0 -0
  865. /package/dist/{radarFacility2-7FPO34JS.js.map → radarFacility2-UVPXWPV5.js.map} +0 -0
  866. /package/dist/{rememberedGvQ.unit.spec-WOQVPQ75.js.map → rememberedGvQ.unit.spec-GVRFRVSO.js.map} +0 -0
  867. /package/dist/{render-ZLA2RRBP.js.map → render-G7V6R4PV.js.map} +0 -0
  868. /package/dist/{report-VCE6RILD.js.map → report-O7D46EKQ.js.map} +0 -0
  869. /package/dist/{sampleView-QYTX4OLI.js.map → sampleView-6Y3OOOMW.js.map} +0 -0
  870. /package/dist/{samplelst-7NGH3SUM.js.map → samplelst-JRVC4GYC.js.map} +0 -0
  871. /package/dist/{samplematrix-SNAR6IBB.js.map → samplematrix-VP5RQVRH.js.map} +0 -0
  872. /package/dist/{sc-2JETYAI4.js.map → sc-BPHVEP6N.js.map} +0 -0
  873. /package/dist/{scatter-GHBQM2RR.js.map → scatter-2YYRZCSW.js.map} +0 -0
  874. /package/dist/{scatter-D7VZOBEE.js.map → scatter-Y4BIG2PW.js.map} +0 -0
  875. /package/dist/{selectGenomeWithTklst-BD4GMGX3.js.map → selectGenomeWithTklst-2BVZU5SW.js.map} +0 -0
  876. /package/dist/{singleCellCellType-XHLOJVVC.js.map → singleCellCellType-XBGCSIQT.js.map} +0 -0
  877. /package/dist/{singleCellCellType.unit.spec-LCLR3IOD.js.map → singleCellCellType.unit.spec-T4GFRLVZ.js.map} +0 -0
  878. /package/dist/{singleCellGeneExpression-JRBONI5C.js.map → singleCellGeneExpression-5ZPWLSVW.js.map} +0 -0
  879. /package/dist/{singleCellGeneExpression.unit.spec-Z2KSVCIG.js.map → singleCellGeneExpression.unit.spec-4O5UBUDU.js.map} +0 -0
  880. /package/dist/{singleCellPlot-4462CQHF.js.map → singleCellPlot-CZLQBGVU.js.map} +0 -0
  881. /package/dist/{singlecell-SO3B5KJ7.js.map → singlecell-IIUYX7OG.js.map} +0 -0
  882. /package/dist/{singlecell-CDUQ6MTO.js.map → singlecell-O3P5BLWT.js.map} +0 -0
  883. /package/dist/{snp-YE2MXKJO.js.map → snp-ZCYBF3ZQ.js.map} +0 -0
  884. /package/dist/{snp.unit.spec-MT57TGGQ.js.map → snp.unit.spec-TAGD2DRL.js.map} +0 -0
  885. /package/dist/{snplocus-RSNKWY63.js.map → snplocus-TL25OOPE.js.map} +0 -0
  886. /package/dist/{spliceevent.a53ss.diagram-6N6YGYV7.js.map → spliceevent.a53ss.diagram-I7J4PQZT.js.map} +0 -0
  887. /package/dist/{spliceevent.exonskip.diagram-LMNUS4XV.js.map → spliceevent.exonskip.diagram-SB4454HB.js.map} +0 -0
  888. /package/dist/{spliceevent.noeventdiagram-LTBH4YD5.js.map → spliceevent.noeventdiagram-FOSDNYLH.js.map} +0 -0
  889. /package/dist/{ssGSEA-DPK4PDM2.js.map → ssGSEA-WANB2X5L.js.map} +0 -0
  890. /package/dist/{ssGSEA.unit.spec-K2SA7ME7.js.map → ssGSEA.unit.spec-4XXWU4XV.js.map} +0 -0
  891. /package/dist/{stattable-PR47XT4F.js.map → stattable-FNTJLVNB.js.map} +0 -0
  892. /package/dist/{studyCatalog-GMUWIUL4.js.map → studyCatalog-7KEOFLO2.js.map} +0 -0
  893. /package/dist/{summarizeCnvGeneexp-YZEMDLES.js.map → summarizeCnvGeneexp-P4AFZMKD.js.map} +0 -0
  894. /package/dist/{summarizeGeneexpSurvival-3TXV6ZNI.js.map → summarizeGeneexpSurvival-YL2J7F4R.js.map} +0 -0
  895. /package/dist/{summarizeMutationCnv-EBWSEHWJ.js.map → summarizeMutationCnv-BHBHST5F.js.map} +0 -0
  896. /package/dist/{summarizeMutationDiagnosis-FXA25W3O.js.map → summarizeMutationDiagnosis-Z7ZHTV27.js.map} +0 -0
  897. /package/dist/{summarizeMutationSurvival-MR4AOMNS.js.map → summarizeMutationSurvival-PZ4TYHT7.js.map} +0 -0
  898. /package/dist/{summary-4C6LGTMF.js.map → summary-ZMNPO65S.js.map} +0 -0
  899. /package/dist/{summary.integration.spec-Y6JLH7NH.js.map → summary.integration.spec-DPJR2ZBE.js.map} +0 -0
  900. /package/dist/{summaryInput-NWT2DXWU.js.map → summaryInput-6JUFJZ5P.js.map} +0 -0
  901. /package/dist/{sunburst-266MA7E2.js.map → sunburst-OWAUI3HC.js.map} +0 -0
  902. /package/dist/{survival-CAZCIY2N.js.map → survival-6JPKG3VA.js.map} +0 -0
  903. /package/dist/{survival.integration.spec-34JJVLLI.js.map → survival.integration.spec-A6NUJLL6.js.map} +0 -0
  904. /package/dist/{svgraph-OFUESREM.js.map → svgraph-34IKFHUS.js.map} +0 -0
  905. /package/dist/{svmr-PVH42MY4.js.map → svmr-4XNPSVVQ.js.map} +0 -0
  906. /package/dist/{table-C2SICFZV.js.map → table-LPZATFLC.js.map} +0 -0
  907. /package/dist/{termCollection-TGYDI7NP.js.map → termCollection-DYY5FXU5.js.map} +0 -0
  908. /package/dist/{termCollection-H4RL5WJG.js.map → termCollection-WOAUFFIC.js.map} +0 -0
  909. /package/dist/{termCollection.unit.spec-JSALS7GL.js.map → termCollection.unit.spec-WTICTZ7H.js.map} +0 -0
  910. /package/dist/{termCollectionFractionSelection-YJVDNV4I.js.map → termCollectionFractionSelection-K5HPDEFP.js.map} +0 -0
  911. /package/dist/{termCollectionFractionSelection.unit.spec-4GM7P4ZW.js.map → termCollectionFractionSelection.unit.spec-D7DG2HOI.js.map} +0 -0
  912. /package/dist/{tk-RZCPSHJG.js.map → tk-DD2LWVGM.js.map} +0 -0
  913. /package/dist/{tk-SNTRA5CC.js.map → tk-NV7NBLT6.js.map} +0 -0
  914. /package/dist/{tp.ui-2W4K3XH6.js.map → tp.ui-B5J3UUVB.js.map} +0 -0
  915. /package/dist/{tvs.dt-GIPVC3R6.js.map → tvs.dt-XLKQT64T.js.map} +0 -0
  916. /package/dist/{tvs.dtcnv.categorical-TEYAS4OU.js.map → tvs.dtcnv.categorical-XIC3RH2D.js.map} +0 -0
  917. /package/dist/{tvs.dtcnv.continuous-VQRATYPZ.js.map → tvs.dtcnv.continuous-OA2K4LHF.js.map} +0 -0
  918. /package/dist/{tvs.dtfusion-P2KF5Z4H.js.map → tvs.dtfusion-ZGNKALZB.js.map} +0 -0
  919. /package/dist/{tvs.dtitd-TM6UROSH.js.map → tvs.dtitd-6QSG4E34.js.map} +0 -0
  920. /package/dist/{tvs.dtsnvindel-FZXC23NF.js.map → tvs.dtsnvindel-5CXXOGPH.js.map} +0 -0
  921. /package/dist/{tvs.dtsv-Y5QEJPYG.js.map → tvs.dtsv-QYYEYUD3.js.map} +0 -0
  922. /package/dist/{tvs.samplelst-MLAFPFER.js.map → tvs.samplelst-X77ODFFR.js.map} +0 -0
  923. /package/dist/{tvs.termCollection-ZQQDKESH.js.map → tvs.termCollection-VXROWAPS.js.map} +0 -0
  924. /package/dist/{vocabulary-JRUZPHMG.js.map → vocabulary-DKWYTZRC.js.map} +0 -0
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../plots/wsiviewer/interactions/WSIViewerInteractions.ts", "../../node_modules/ol/Overlay.js", "../plots/wsiviewer/viewModel/SessionWSImage.ts", "../plots/wsiviewer/viewModel/ViewModel.ts", "../plots/wsiviewer/viewModel/ViewModelProvider.ts", "../plots/wsiviewer/view/DownloadCSVButtonRenderer.ts", "../plots/wsiviewer/defaults.ts", "../../node_modules/ol-ext/dist/ol-ext.css", "../plots/wsiviewer/view/WSIAnnotationsRenderer.ts", "../plots/wsiviewer/view/ThumbnailRenderer.ts", "../../node_modules/ol/control/OverviewMap.js", "../../node_modules/ol/control/FullScreen.js", "../../node_modules/ol/renderer/canvas/VectorTileLayer.js", "../../node_modules/ol/layer/VectorTile.js", "../../node_modules/ol/renderer/canvas/ImageLayer.js", "../../node_modules/ol/layer/BaseImage.js", "../../node_modules/ol/layer/Image.js", "../../node_modules/ol/vec/mat4.js", "../../node_modules/ol/webgl.js", "../../node_modules/ol/webgl/Buffer.js", "../../node_modules/ol/webgl/ContextEventType.js", "../../node_modules/ol/webgl/PostProcessingPass.js", "../../node_modules/ol/webgl/Helper.js", "../../node_modules/ol/renderer/webgl/Layer.js", "../../node_modules/ol/renderer/webgl/TileLayerBase.js", "../../node_modules/ol/renderer/webgl/TileLayer.js", "../../node_modules/ol/webgl/PaletteTexture.js", "../../node_modules/ol/expr/gpu.js", "../../node_modules/ol/style/flat.js", "../../node_modules/ol/render/webgl/bufferUtil.js", "../../node_modules/ol/render/webgl/compileUtil.js", "../../node_modules/ol/render/webgl/ShaderBuilder.js", "../../node_modules/ol/render/webgl/MixedGeometryBatch.js", "../../node_modules/ol/worker/webgl.js", "../../node_modules/ol/render/webgl/constants.js", "../../node_modules/ol/render/webgl/encodeUtil.js", "../../node_modules/ol/render/webgl/renderinstructions.js", "../../node_modules/ol/render/webgl/style.js", "../../node_modules/ol/render/webgl/VectorStyleRenderer.js", "../../node_modules/ol/webgl/RenderTarget.js", "../../node_modules/ol/renderer/webgl/worldUtil.js", "../../node_modules/ol/renderer/webgl/VectorLayer.js", "../../node_modules/ol/layer/Heatmap.js", "../../node_modules/ol-ext/util/input/Base.js", "../../node_modules/ol-ext/util/input/Checkbox.js", "../../node_modules/ol-ext/util/input/Switch.js", "../../node_modules/ol-ext/util/input/Radio.js", "../../node_modules/ol-ext/util/element.js", "../../node_modules/ol-ext/control/LayerSwitcher.js", "../../node_modules/ol/control/MousePosition.js", "../plots/wsiviewer/view/MapRenderer.ts", "../plots/wsiviewer/view/MetadataRenderer.ts", "../plots/wsiviewer/view/LegendRenderer.ts", "../plots/wsiviewer/view/ModelTrainerRenderer.ts", "../plots/wsiviewer/view/SkipFlagCheckRenderer.ts", "../plots/wsiviewer/WSIViewer.ts"],
4
- "sourcesContent": ["import type OLMap from 'ol/Map.js'\nimport { debounce } from 'debounce'\nimport { clearServerDataCache, dofetch3 } from '#common/dofetch'\nimport VectorLayer from 'ol/layer/Vector'\nimport type VectorSource from 'ol/source/Vector'\nimport { Feature } from 'ol'\nimport { Polygon } from 'ol/geom'\nimport type { Geometry } from 'ol/geom'\nimport { Fill, Stroke, Style } from 'ol/style'\nimport type Settings from '#plots/wsiviewer/Settings.ts'\nimport {\n\tFlagStatus,\n\tcreateSelectionID,\n\tSelectionPrefixes,\n\tFeaturePrefixes,\n\tcheckSelectionType,\n\tcreateFeatureID,\n\ttype FlagStatusValues\n} from '#types'\nimport type {\n\tSaveWSIAnnotationRequest,\n\tSaveWSIAnnotationResponse,\n\tDeleteWSITileSelectionRequest,\n\tDeleteWSITileSelectionResponse,\n\tTileSelection,\n\tProvokingActions\n} from '#types'\nimport { SessionWSImage } from '#plots/wsiviewer/viewModel/SessionWSImage.ts'\nimport { createDimSquareFeature, createStarFeature } from '#plots/wsiviewer/viewModel/ViewModelProvider.ts'\nimport { DownloadCSVButtonRenderer } from '../view/DownloadCSVButtonRenderer'\n\nexport class WSIViewerInteractions {\n\tthumbnailClickListener: (index: number) => void\n\tzoomInEffectListener: (\n\t\tactiveImageExtent: unknown,\n\t\tzoomInPoints: [number, number][],\n\t\tmap: OLMap,\n\t\tactivePatchColor: string\n\t) => void\n\tviewerClickListener: (coordinateX: number, coordinateY: number, sessionWSImage: SessionWSImage, map: OLMap) => void\n\tsetKeyDownListener: (\n\t\tholder: any,\n\t\tsessionWSImage: SessionWSImage,\n\t\tmap: OLMap,\n\t\taiProjectID: number,\n\t\tshortcuts?: string[],\n\t\tdownloadCSVRenderer?: DownloadCSVButtonRenderer\n\t) => void\n\n\tonRetrainModelClicked: (genome: string, dslabel: string, projectId: string) => void\n\ttoggleLoadingDiv: (show: boolean) => void\n\ttoggleThumbnails: (start: number, doneRendering?: boolean) => void\n\ttoggleSpinner: (spin: boolean) => void\n\tconstructor(wsiApp: any, opts: any) {\n\t\tthis.thumbnailClickListener = (index: number) => {\n\t\t\twsiApp.app.dispatch({\n\t\t\t\ttype: 'plot_edit',\n\t\t\t\tid: opts.id,\n\t\t\t\tconfig: {\n\t\t\t\t\tsettings: {\n\t\t\t\t\t\tactiveAnnotation: 0,\n\t\t\t\t\t\tsessionsTileSelection: [],\n\t\t\t\t\t\tdisplayedImageIndex: index,\n\t\t\t\t\t\trenderWSIViewer: true,\n\t\t\t\t\t\tisChangingImages: true\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})\n\t\t}\n\n\t\tthis.zoomInEffectListener = (\n\t\t\tactiveImageExtent: unknown,\n\t\t\tzoomInPoints: [number, number][],\n\t\t\tmap: OLMap,\n\t\t\tactivePatchColor: string\n\t\t) => {\n\t\t\tconst state = wsiApp.app.getState()\n\t\t\tconst settings: Settings = state.plots.find(p => p.id === wsiApp.id).settings\n\n\t\t\tif (!zoomInPoints || zoomInPoints.length == 0) return\n\n\t\t\tsetTimeout(() => {\n\t\t\t\tif (!activeImageExtent) return\n\n\t\t\t\tconst imageHeight = activeImageExtent[3]\n\n\t\t\t\t//Calculate the center of the annotation\n\t\t\t\tconst xyAvg = zoomInPoints\n\t\t\t\t\t.reduce(\n\t\t\t\t\t\t(acc, [x, y]) => {\n\t\t\t\t\t\t\tacc[0] += x\n\t\t\t\t\t\t\t/** Zoomify tile coordinates start top-left but OpenLayers start bottom-left.\n\t\t\t\t\t\t\t * This flips the feature coordinates to match OpenLayers coordinates.*/\n\t\t\t\t\t\t\tconst invertedY = imageHeight - y\n\t\t\t\t\t\t\tacc[1] += invertedY\n\t\t\t\t\t\t\treturn acc\n\t\t\t\t\t\t},\n\t\t\t\t\t\t[0, 0]\n\t\t\t\t\t)\n\t\t\t\t\t.map(sum => sum / zoomInPoints.length)\n\n\t\t\t\tconst view = map.getView()\n\t\t\t\tview.animate({\n\t\t\t\t\tcenter: xyAvg,\n\t\t\t\t\tzoom: settings.defaultZoom,\n\t\t\t\t\tduration: settings.animationTime\n\t\t\t\t})\n\n\t\t\t\t//On zooming to a new annotation, add a border around the annotation\n\t\t\t\tconst vectorLayer = map\n\t\t\t\t\t.getLayers()\n\t\t\t\t\t.getArray()\n\t\t\t\t\t.find(l => l instanceof VectorLayer)!\n\n\t\t\t\tconst zoomCoordinates = [zoomInPoints[0][0], imageHeight - zoomInPoints[0][1]] as [number, number]\n\t\t\t\tthis.addActiveBorder(vectorLayer as VectorLayer, zoomCoordinates, activePatchColor, settings.tileSize)\n\t\t\t}, settings.animationDelay)\n\t\t}\n\n\t\tthis.setKeyDownListener = (\n\t\t\tholder: any,\n\t\t\tsessionWSImage: SessionWSImage,\n\t\t\tmap: OLMap,\n\t\t\taiProjectID: number,\n\t\t\tshortcuts: string[] = [],\n\t\t\tdownloadCSVRenderer: DownloadCSVButtonRenderer = new DownloadCSVButtonRenderer()\n\t\t) => {\n\t\t\tconst state = wsiApp.app.getState()\n\t\t\tconst settings: Settings = state.plots.find(p => p.id === wsiApp.id).settings\n\n\t\t\t// Add keydown listener to the holder\n\t\t\tholder.attr('tabindex', 0)\n\t\t\tholder.node()?.focus()\n\n\t\t\tconst tileSelections = SessionWSImage.getTileSelections(sessionWSImage, settings) || []\n\n\t\t\tholder.on('keydown', async (event: KeyboardEvent) => {\n\t\t\t\tlet currentIndex = settings.activeAnnotation\n\n\t\t\t\tevent.preventDefault()\n\t\t\t\tevent.stopPropagation()\n\t\t\t\tconst idx = currentIndex\n\t\t\t\tif (event.key == '.') {\n\t\t\t\t\t//Do not react if at the last annotation\n\t\t\t\t\tif (currentIndex == tileSelections.length) {\n\t\t\t\t\t\tcurrentIndex = 0\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcurrentIndex += 1\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (event.key == ',') {\n\t\t\t\t\t//Do not react if at the starting annotation\n\t\t\t\t\tif (currentIndex === 0) {\n\t\t\t\t\t\t// If at the starting tileselection, find the the most recent Annotation by checking for timestamp property\n\t\t\t\t\t\tcurrentIndex = tileSelections.findIndex(\n\t\t\t\t\t\t\tts => checkSelectionType(ts, SelectionPrefixes.Annotation) || ts.flag !== FlagStatus.Normal\n\t\t\t\t\t\t)\n\t\t\t\t\t\tif (currentIndex === -1) {\n\t\t\t\t\t\t\tcurrentIndex = 0\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcurrentIndex -= 1\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (idx !== currentIndex) {\n\t\t\t\t\t//When the index changes, scroll to the new annotation\n\t\t\t\t\t//Timeout for when user presses arrows multiple times.\n\t\t\t\t\tconst d = debounce(async () => {\n\t\t\t\t\t\twsiApp.app.dispatch({\n\t\t\t\t\t\t\ttype: 'plot_edit',\n\t\t\t\t\t\t\tid: wsiApp.id,\n\t\t\t\t\t\t\tconfig: {\n\t\t\t\t\t\t\t\tsettings: {\n\t\t\t\t\t\t\t\t\trenderWSIViewer: false,\n\t\t\t\t\t\t\t\t\tactiveAnnotation: currentIndex\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t})\n\t\t\t\t\t}, 500)\n\t\t\t\t\td()\n\t\t\t\t}\n\n\t\t\t\t// TODO handle this better\n\t\t\t\tconst vectorLayer = map\n\t\t\t\t\t.getLayers()\n\t\t\t\t\t.getArray()\n\t\t\t\t\t.find(l => l instanceof VectorLayer)!\n\n\t\t\t\tif (event.key == 'Backspace') {\n\t\t\t\t\t//Delete\n\t\t\t\t\tconst classID: number | undefined = sessionWSImage?.classes?.find(\n\t\t\t\t\t\tc => c.label === tileSelections[currentIndex].class\n\t\t\t\t\t)?.id\n\t\t\t\t\tawait this.deleteAnnotation(wsiApp, vectorLayer!, sessionWSImage, currentIndex, classID)\n\t\t\t\t}\n\t\t\t\tif (event.key.toLowerCase() === 'r') {\n\t\t\t\t\tthis.toggleLoadingDiv(true)\n\t\t\t\t\tawait this.onRetrainModelClicked(\n\t\t\t\t\t\tstate.genome || state.vocab.genome,\n\t\t\t\t\t\tstate.dslabel || state.vocab.dslabel,\n\t\t\t\t\t\tstate.aiProjectID\n\t\t\t\t\t)\n\t\t\t\t}\n\t\t\t\tif (event.key.toLowerCase() === 'x') {\n\t\t\t\t\tif (!sessionWSImage) return\n\t\t\t\t\tdownloadCSVRenderer.downloadAllAsCsv(sessionWSImage)\n\t\t\t\t}\n\t\t\t\tif (['f', 's'].includes(event.key.toLowerCase()) && !settings.isSavingAnnotation) {\n\t\t\t\t\twsiApp.app.dispatch({\n\t\t\t\t\t\ttype: 'plot_edit',\n\t\t\t\t\t\tid: wsiApp.id,\n\t\t\t\t\t\tconfig: {\n\t\t\t\t\t\t\tsettings: {\n\t\t\t\t\t\t\t\tisSavingAnnotation: true,\n\t\t\t\t\t\t\t\tchangeTrigger: Date.now(),\n\t\t\t\t\t\t\t\trenderWSIViewer: false\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t})\n\t\t\t\t\ttry {\n\t\t\t\t\t\tconst defaultColor = 'black'\n\t\t\t\t\t\tconst tileSelection = tileSelections[currentIndex]\n\t\t\t\t\t\tconst isAnnotation = checkSelectionType(tileSelection, SelectionPrefixes.Annotation)\n\t\t\t\t\t\tconst justTileSelection = checkSelectionType(tileSelection, SelectionPrefixes.TileSelection)\n\t\t\t\t\t\tconst matchingClass = sessionWSImage?.classes?.find(c => c.label === tileSelection.class)\n\t\t\t\t\t\tconst classColor: string = matchingClass ? matchingClass.color : defaultColor\n\t\t\t\t\t\tlet newFlag: FlagStatusValues | null = null\n\t\t\t\t\t\tlet provokingAction: ProvokingActions | null = null\n\t\t\t\t\t\tif (event.key.toLowerCase() === 'f') {\n\t\t\t\t\t\t\tprovokingAction = 'flagging'\n\t\t\t\t\t\t\tnewFlag = tileSelection.flag === FlagStatus.Flagged ? FlagStatus.Normal : FlagStatus.Flagged\n\t\t\t\t\t\t} else if (!justTileSelection && event.key.toLowerCase() === 's') {\n\t\t\t\t\t\t\tprovokingAction = 'skipping'\n\t\t\t\t\t\t\tnewFlag = tileSelection.flag === FlagStatus.Skipped ? FlagStatus.Normal : FlagStatus.Skipped\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (newFlag === null || provokingAction === null) throw new Error(\"Couldn't identify new flag to save.\")\n\n\t\t\t\t\t\tconst source: VectorSource<Feature<Geometry>> | null = vectorLayer.getSource()\n\t\t\t\t\t\ttileSelection.flag = newFlag\n\t\t\t\t\t\tconst oldStar = source?.getFeatureById(createFeatureID(FeaturePrefixes.Star, tileSelection.zoomCoordinates))\n\t\t\t\t\t\tif (oldStar) {\n\t\t\t\t\t\t\tsource?.removeFeature(oldStar)\n\t\t\t\t\t\t}\n\t\t\t\t\t\tconst oldSquare = source?.getFeatureById(\n\t\t\t\t\t\t\tcreateFeatureID(FeaturePrefixes.Square, tileSelection.zoomCoordinates)\n\t\t\t\t\t\t)\n\t\t\t\t\t\tif (oldSquare) {\n\t\t\t\t\t\t\tsource?.removeFeature(oldSquare)\n\t\t\t\t\t\t}\n\t\t\t\t\t\tconst annotationBorderFeat = source?.getFeatureById(\n\t\t\t\t\t\t\tcreateFeatureID(FeaturePrefixes.Border, tileSelection.zoomCoordinates)\n\t\t\t\t\t\t)\n\t\t\t\t\t\tif (annotationBorderFeat) {\n\t\t\t\t\t\t\tsource?.removeFeature(annotationBorderFeat)\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (newFlag === FlagStatus.Flagged) {\n\t\t\t\t\t\t\tconst newStar = createStarFeature(\n\t\t\t\t\t\t\t\tsettings.tileSize || 512,\n\t\t\t\t\t\t\t\t[tileSelection.zoomCoordinates[0], -tileSelection.zoomCoordinates[1]],\n\t\t\t\t\t\t\t\ttileSelection.zoomCoordinates,\n\t\t\t\t\t\t\t\t'yellow',\n\t\t\t\t\t\t\t\tclassColor\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\tthis.addAnnotation(vectorLayer!, tileSelections, currentIndex, classColor, settings)\n\t\t\t\t\t\t\tsource?.addFeature(newStar)\n\t\t\t\t\t\t} else if (newFlag === FlagStatus.Skipped) {\n\t\t\t\t\t\t\tconst newDim = createDimSquareFeature(\n\t\t\t\t\t\t\t\ttileSelection.zoomCoordinates,\n\t\t\t\t\t\t\t\t[tileSelection.zoomCoordinates[0], -tileSelection.zoomCoordinates[1]],\n\t\t\t\t\t\t\t\tsettings.tileSize || 512,\n\t\t\t\t\t\t\t\tclassColor\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\tsource?.addFeature(newDim)\n\t\t\t\t\t\t} else if (isAnnotation) {\n\t\t\t\t\t\t\tthis.addAnnotation(vectorLayer!, tileSelections, currentIndex, classColor, settings)\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (justTileSelection) {\n\t\t\t\t\t\t\tSessionWSImage.removeTileSelection(tileSelection, sessionWSImage)\n\t\t\t\t\t\t\ttileSelection.timestamp = new Date().toISOString()\n\t\t\t\t\t\t\tlet sessionsTileSelection: TileSelection[] = sessionWSImage.sessionsTileSelections ?? []\n\t\t\t\t\t\t\tsessionsTileSelection = [tileSelection, ...sessionsTileSelection]\n\t\t\t\t\t\t\twsiApp.app.dispatch({\n\t\t\t\t\t\t\t\ttype: 'plot_edit',\n\t\t\t\t\t\t\t\tid: wsiApp.id,\n\t\t\t\t\t\t\t\tconfig: {\n\t\t\t\t\t\t\t\t\tsettings: {\n\t\t\t\t\t\t\t\t\t\trenderWSIViewer: false,\n\t\t\t\t\t\t\t\t\t\tchangeTrigger: Date.now(),\n\t\t\t\t\t\t\t\t\t\tactiveAnnotation: SessionWSImage.calculateNewActiveIndex(\n\t\t\t\t\t\t\t\t\t\t\tcurrentIndex,\n\t\t\t\t\t\t\t\t\t\t\tsessionWSImage,\n\t\t\t\t\t\t\t\t\t\t\tprovokingAction,\n\t\t\t\t\t\t\t\t\t\t\tsettings\n\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\trenderAnnotationTable: true,\n\t\t\t\t\t\t\t\t\t\tsessionsTileSelection: sessionsTileSelection,\n\t\t\t\t\t\t\t\t\t\tisSavingAnnotation: false\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\treturn\n\t\t\t\t\t\t} else if (matchingClass) {\n\t\t\t\t\t\t\tawait this.saveAndFinalizeAnnotation(\n\t\t\t\t\t\t\t\twsiApp,\n\t\t\t\t\t\t\t\tsessionWSImage,\n\t\t\t\t\t\t\t\ttileSelection,\n\t\t\t\t\t\t\t\tmatchingClass.id,\n\t\t\t\t\t\t\t\taiProjectID,\n\t\t\t\t\t\t\t\tcurrentIndex\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (error: any) {\n\t\t\t\t\t\tconsole.trace(\"Couldn't successfully flag tile:\", error)\n\t\t\t\t\t}\n\n\t\t\t\t\twsiApp.app.dispatch({\n\t\t\t\t\t\ttype: 'plot_edit',\n\t\t\t\t\t\tid: wsiApp.id,\n\t\t\t\t\t\tconfig: {\n\t\t\t\t\t\t\tsettings: {\n\t\t\t\t\t\t\t\tisSavingAnnotation: false,\n\t\t\t\t\t\t\t\tchangeTrigger: Date.now(),\n\t\t\t\t\t\t\t\trenderWSIViewer: false\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t})\n\t\t\t\t\treturn\n\t\t\t\t}\n\n\t\t\t\t// New Enter key branch: check for prediction uncertainty and save annotation\n\t\t\t\tif (event.key === 'Enter') {\n\t\t\t\t\t// Only proceed if this selection has a prediction uncertainty\n\t\t\t\t\tif (!checkSelectionType(tileSelections[currentIndex], SelectionPrefixes.Prediction)) {\n\t\t\t\t\t\treturn\n\t\t\t\t\t}\n\t\t\t\t\tconst predictions = sessionWSImage?.predictions\n\t\t\t\t\tif (!predictions || !predictions[currentIndex]) return\n\n\t\t\t\t\t// Find class by prediction label\n\t\t\t\t\tconst matchingClass = sessionWSImage?.classes?.find(c => c.label === predictions[currentIndex].class)\n\n\t\t\t\t\tif (!matchingClass) {\n\t\t\t\t\t\t// Nothing to annotate against\n\t\t\t\t\t\treturn\n\t\t\t\t\t}\n\n\t\t\t\t\t// Draw annotation visually\n\t\t\t\t\tthis.addAnnotation(vectorLayer!, tileSelections, currentIndex, matchingClass.color, settings)\n\n\t\t\t\t\tconst selectedClassId = matchingClass.id\n\t\t\t\t\tconst tileSelection = tileSelections[currentIndex]\n\t\t\t\t\ttileSelection.id = createSelectionID(SelectionPrefixes.Annotation, tileSelection.zoomCoordinates)\n\t\t\t\t\t// Persist and finalize via helper\n\t\t\t\t\tawait this.saveAndFinalizeAnnotation(\n\t\t\t\t\t\twsiApp,\n\t\t\t\t\t\tsessionWSImage,\n\t\t\t\t\t\ttileSelections[currentIndex],\n\t\t\t\t\t\tselectedClassId,\n\t\t\t\t\t\taiProjectID,\n\t\t\t\t\t\tcurrentIndex\n\t\t\t\t\t)\n\t\t\t\t\treturn\n\t\t\t\t}\n\n\t\t\t\tif (shortcuts.includes(event.code) && !settings.isSavingAnnotation) {\n\t\t\t\t\t// Resolve class either by key_shortcut\n\t\t\t\t\tconst matchingClass = sessionWSImage?.classes?.find(c => c.key_shortcut === event.code)\n\n\t\t\t\t\tif (!matchingClass) return\n\t\t\t\t\t// TODO: Issue where if you press shortcuts too fast, annotation table doesnt get updated with correct class\n\t\t\t\t\t//My guess is that if you press this fast enough, saveAnnotation doesnt update fast enough\n\t\t\t\t\twsiApp.app.dispatch({\n\t\t\t\t\t\ttype: 'plot_edit',\n\t\t\t\t\t\tid: wsiApp.id,\n\t\t\t\t\t\tconfig: {\n\t\t\t\t\t\t\tsettings: {\n\t\t\t\t\t\t\t\tisSavingAnnotation: true,\n\t\t\t\t\t\t\t\tchangeTrigger: Date.now(),\n\t\t\t\t\t\t\t\trenderWSIViewer: false\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t})\n\t\t\t\t\tthis.toggleSpinner(true)\n\t\t\t\t\t// Visual add\n\t\t\t\t\tthis.addAnnotation(vectorLayer!, tileSelections, currentIndex, matchingClass.color, settings)\n\n\t\t\t\t\tconst selectedClassId = matchingClass.id\n\t\t\t\t\tconst tileSelection = tileSelections[currentIndex]\n\t\t\t\t\ttileSelection.id = createSelectionID(SelectionPrefixes.Annotation, tileSelection.zoomCoordinates)\n\t\t\t\t\ttileSelection.flag = FlagStatus.Normal\n\t\t\t\t\tconst source: VectorSource<Feature<Geometry>> | null = vectorLayer.getSource()\n\t\t\t\t\tconst oldStar = source?.getFeatureById(createFeatureID(FeaturePrefixes.Star, tileSelection.zoomCoordinates))\n\t\t\t\t\tif (oldStar) {\n\t\t\t\t\t\tsource?.removeFeature(oldStar)\n\t\t\t\t\t}\n\t\t\t\t\t// Persist and finalize via helper\n\t\t\t\t\tawait this.saveAndFinalizeAnnotation(\n\t\t\t\t\t\twsiApp,\n\t\t\t\t\t\tsessionWSImage,\n\t\t\t\t\t\ttileSelection,\n\t\t\t\t\t\tselectedClassId,\n\t\t\t\t\t\taiProjectID,\n\t\t\t\t\t\tcurrentIndex\n\t\t\t\t\t)\n\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t})\n\t\t}\n\n\t\tthis.viewerClickListener = (\n\t\t\tcoordinateX: number,\n\t\t\tcoordinateY: number,\n\t\t\tsessionWSImage: SessionWSImage,\n\t\t\tmap: OLMap\n\t\t) => {\n\t\t\tconst state = wsiApp.app.getState()\n\t\t\tconst settings: Settings = state.plots.find(p => p.id === wsiApp.id).settings\n\t\t\tconst sessionsTileSelection = settings.sessionsTileSelection\n\n\t\t\tsessionWSImage.sessionsTileSelections = sessionsTileSelection\n\n\t\t\tconst tileSelections = SessionWSImage.getUnfilteredTileSelections(sessionWSImage)\n\n\t\t\t// Check if click falls inside an existing annotation\n\t\t\tconst selectedTileSelection = tileSelections.find(tileSelection => {\n\t\t\t\tconst [x0, y0] = tileSelection.zoomCoordinates\n\t\t\t\tconst x1 = x0 + settings.tileSize\n\t\t\t\tconst y1 = y0 + settings.tileSize\n\t\t\t\treturn coordinateX >= x0 && coordinateX < x1 && coordinateY >= y0 && coordinateY < y1\n\t\t\t})\n\t\t\t// Need to have solution for clicking on skipped tiles. Maybe show skipped or just dont move and show warning\n\t\t\tif (selectedTileSelection !== undefined) {\n\t\t\t\tconst isSkipped = selectedTileSelection.flag === FlagStatus.Skipped\n\t\t\t\tconst isFlagged = selectedTileSelection.flag === FlagStatus.Flagged\n\t\t\t\tif (isSkipped && !settings.renderSkipped) {\n\t\t\t\t\tconst newSettings = {\n\t\t\t\t\t\trenderWSIViewer: false,\n\t\t\t\t\t\trenderAnnotationTable: true,\n\t\t\t\t\t\trenderSkipped: true,\n\t\t\t\t\t\trenderOnlyFlagged: false,\n\t\t\t\t\t\tchangeTrigger: Date.now(),\n\t\t\t\t\t\tactiveAnnotation: 0,\n\t\t\t\t\t\tsessionsTileSelection: [...sessionsTileSelection]\n\t\t\t\t\t} as Settings\n\t\t\t\t\tconst tilesWithSkipped = SessionWSImage.getTileSelections(sessionWSImage, newSettings) || []\n\t\t\t\t\tconst newIndex = tilesWithSkipped.findIndex(ts => ts.id === selectedTileSelection.id)\n\t\t\t\t\twsiApp.app.dispatch({\n\t\t\t\t\t\ttype: 'plot_edit',\n\t\t\t\t\t\tid: wsiApp.id,\n\t\t\t\t\t\tconfig: {\n\t\t\t\t\t\t\tsettings: { ...newSettings, activeAnnotation: newIndex !== -1 ? newIndex : 0 }\n\t\t\t\t\t\t}\n\t\t\t\t\t})\n\t\t\t\t} else if (!isFlagged && settings.renderOnlyFlagged) {\n\t\t\t\t\tconst newSettings = {\n\t\t\t\t\t\trenderWSIViewer: false,\n\t\t\t\t\t\trenderAnnotationTable: true,\n\t\t\t\t\t\trenderOnlyFlagged: false,\n\t\t\t\t\t\tchangeTrigger: Date.now(),\n\t\t\t\t\t\tactiveAnnotation: 0,\n\t\t\t\t\t\tsessionsTileSelection: [...sessionsTileSelection]\n\t\t\t\t\t} as Settings\n\t\t\t\t\tconst tileSelections = SessionWSImage.getTileSelections(sessionWSImage, newSettings) || []\n\t\t\t\t\tconst newIndex = tileSelections.findIndex(ts => ts.id === selectedTileSelection.id)\n\n\t\t\t\t\twsiApp.app.dispatch({\n\t\t\t\t\t\ttype: 'plot_edit',\n\t\t\t\t\t\tid: wsiApp.id,\n\t\t\t\t\t\tconfig: {\n\t\t\t\t\t\t\tsettings: { ...newSettings, activeAnnotation: newIndex !== -1 ? newIndex : 0 }\n\t\t\t\t\t\t}\n\t\t\t\t\t})\n\t\t\t\t} else {\n\t\t\t\t\tconst nextIndex = SessionWSImage.getTileSelections(sessionWSImage, settings).findIndex(\n\t\t\t\t\t\tts => ts.id === selectedTileSelection.id\n\t\t\t\t\t)\n\t\t\t\t\twsiApp.app.dispatch({\n\t\t\t\t\t\ttype: 'plot_edit',\n\t\t\t\t\t\tid: wsiApp.id,\n\t\t\t\t\t\tconfig: {\n\t\t\t\t\t\t\tsettings: {\n\t\t\t\t\t\t\t\trenderWSIViewer: false,\n\t\t\t\t\t\t\t\trenderAnnotationTable: true,\n\t\t\t\t\t\t\t\tchangeTrigger: Date.now(),\n\t\t\t\t\t\t\t\tactiveAnnotation: nextIndex !== -1 ? nextIndex : 0,\n\t\t\t\t\t\t\t\tsessionsTileSelection: [...sessionsTileSelection]\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t})\n\t\t\t\t}\n\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\t// Create new tile section\n\t\t\tconst newTileSelection: TileSelection = {\n\t\t\t\tzoomCoordinates: [coordinateX, coordinateY],\n\t\t\t\tclass: '',\n\t\t\t\tflag: FlagStatus.Normal,\n\t\t\t\tid: createSelectionID(SelectionPrefixes.TileSelection, [coordinateX, coordinateY]),\n\t\t\t\ttimestamp: new Date().toISOString()\n\t\t\t}\n\n\t\t\tconst vectorLayer = map\n\t\t\t\t.getLayers()\n\t\t\t\t.getArray()\n\t\t\t\t.find(l => l instanceof VectorLayer)!\n\n\t\t\tconst source: VectorSource<Feature<Geometry>> | null = vectorLayer.getSource()\n\n\t\t\tconst topLeft: [number, number] = [coordinateX, -coordinateY]\n\t\t\tconst borderFeature = this.createBorderFeature(\n\t\t\t\ttopLeft,\n\t\t\t\tsettings.tileSize,\n\t\t\t\t30,\n\t\t\t\tsettings.selectedPatchBorderColor,\n\t\t\t\tcreateFeatureID(FeaturePrefixes.PredBorder, newTileSelection.zoomCoordinates)\n\t\t\t)\n\t\t\t//Add border feature\n\n\t\t\tsource?.addFeature(borderFeature)\n\n\t\t\twsiApp.app.dispatch({\n\t\t\t\ttype: 'plot_edit',\n\t\t\t\tid: wsiApp.id,\n\t\t\t\tconfig: {\n\t\t\t\t\tsettings: {\n\t\t\t\t\t\trenderWSIViewer: false,\n\t\t\t\t\t\trenderAnnotationTable: true,\n\t\t\t\t\t\tactiveAnnotation: 0,\n\t\t\t\t\t\tchangeTrigger: Date.now(),\n\t\t\t\t\t\tsessionsTileSelection: [newTileSelection, ...sessionsTileSelection]\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})\n\t\t}\n\n\t\tthis.onRetrainModelClicked = async (genome: string, dslabel: string, projectId: string) => {\n\t\t\ttry {\n\t\t\t\tawait dofetch3('/aiProjectTrainModel', {\n\t\t\t\t\tbody: {\n\t\t\t\t\t\tgenome,\n\t\t\t\t\t\tdslabel,\n\t\t\t\t\t\tprojectId\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t\tclearServerDataCache()\n\n\t\t\t\twsiApp.app.dispatch({\n\t\t\t\t\ttype: 'plot_edit',\n\t\t\t\t\tid: opts.id,\n\t\t\t\t\tconfig: {\n\t\t\t\t\t\tsettings: {\n\t\t\t\t\t\t\trenderWSIViewer: true,\n\t\t\t\t\t\t\trenderAnnotationTable: true,\n\t\t\t\t\t\t\tchangeTrigger: Date.now()\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t} catch (e: any) {\n\t\t\t\tthis.toggleLoadingDiv(false)\n\t\t\t\twsiApp.app.printError('Error retraining model: ' + (e.message || e))\n\t\t\t}\n\t\t}\n\n\t\tthis.toggleLoadingDiv = (show: boolean) => {\n\t\t\tif (show) {\n\t\t\t\twsiApp.dom.loadingDiv.selectAll('*').remove()\n\t\t\t\twsiApp.dom.loadingDiv\n\t\t\t\t\t.style('display', 'block')\n\t\t\t\t\t.append('div')\n\t\t\t\t\t.style('position', 'relative')\n\t\t\t\t\t.style('top', '50%')\n\t\t\t\t\t.append('span')\n\t\t\t\t\t.attr('class', 'sjpp-spinner')\n\n\t\t\t\twsiApp.dom.mapHolder.style('display', 'none')\n\t\t\t\twsiApp.dom.annotationsHolder.style('display', 'none')\n\t\t\t\twsiApp.dom.legendHolder.style('display', 'none')\n\t\t\t} else {\n\t\t\t\twsiApp.dom.loadingDiv.style('display', 'none')\n\t\t\t\twsiApp.dom.mapHolder.style('display', 'block')\n\t\t\t\twsiApp.dom.annotationsHolder.style('display', 'inline-block')\n\t\t\t\twsiApp.dom.legendHolder.style('display', 'inline-block')\n\t\t\t}\n\t\t}\n\n\t\tthis.toggleThumbnails = (start: number, doneRendering: boolean = false) => {\n\t\t\tif (doneRendering) {\n\t\t\t\twsiApp.app.save({\n\t\t\t\t\ttype: 'plot_edit',\n\t\t\t\t\tid: opts.id,\n\t\t\t\t\tconfig: {\n\t\t\t\t\t\tsettings: {\n\t\t\t\t\t\t\tisChangingImages: false\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\twsiApp.app.dispatch({\n\t\t\t\ttype: 'plot_edit',\n\t\t\t\tid: opts.id,\n\t\t\t\tconfig: {\n\t\t\t\t\tsettings: {\n\t\t\t\t\t\tthumbnailRangeStart: start,\n\t\t\t\t\t\tdisplayedImageIndex: start,\n\t\t\t\t\t\trenderWSIViewer: true,\n\t\t\t\t\t\tisChangingImages: true\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})\n\t\t}\n\t\tthis.toggleSpinner = (spin: boolean) => {\n\t\t\tif (spin) {\n\t\t\t\twsiApp.dom.holder.selectAll('*').style('cursor', 'wait')\n\t\t\t} else {\n\t\t\t\twsiApp.dom.holder.selectAll('*').style('cursor', 'default')\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate addAnnotation(\n\t\tvectorLayer: VectorLayer,\n\t\ttileSelections: TileSelection[],\n\t\tcurrentIndex: number,\n\t\tcolor: any,\n\t\tsettings: Settings\n\t) {\n\t\tconst source: VectorSource<Feature<Geometry>> | null = vectorLayer.getSource()\n\t\tconst tileSelection = tileSelections[currentIndex]\n\t\t//Remove any previous feature with the same ID\n\t\tconst feature = source?.getFeatureById(createFeatureID(FeaturePrefixes.Square, tileSelection.zoomCoordinates))\n\t\tif (feature) {\n\t\t\tsource?.removeFeature(feature)\n\t\t}\n\n\t\tconst topLeft: [number, number] = [tileSelection.zoomCoordinates[0], -tileSelection.zoomCoordinates[1]]\n\n\t\tconst squareCoords = [\n\t\t\t[\n\t\t\t\ttopLeft,\n\t\t\t\t[topLeft[0] + settings.tileSize, topLeft[1]],\n\t\t\t\t[topLeft[0] + settings.tileSize, topLeft[1] - settings.tileSize],\n\t\t\t\t[topLeft[0], topLeft[1] - settings.tileSize]\n\t\t\t]\n\t\t]\n\t\tconst square = new Feature({\n\t\t\tgeometry: new Polygon([squareCoords[0]]),\n\t\t\tproperties: {\n\t\t\t\tisLocked: false\n\t\t\t}\n\t\t})\n\n\t\tsquare.setId(createFeatureID(FeaturePrefixes.Square, tileSelection.zoomCoordinates))\n\n\t\tsquare.setStyle(\n\t\t\tnew Style({\n\t\t\t\tfill: new Fill({ color: color }),\n\t\t\t\tstroke: new Stroke({ color: color, width: 2 })\n\t\t\t})\n\t\t)\n\t\tsource?.addFeature(square)\n\n\t\tthis.addAnnotationBorder(\n\t\t\tsource,\n\t\t\ttopLeft,\n\t\t\ttileSelection.zoomCoordinates,\n\t\t\tsettings.annotatedPatchBorderColor,\n\t\t\tsettings.tileSize\n\t\t)\n\t}\n\n\tprivate async deleteAnnotation(\n\t\twsiApp: any,\n\t\tvectorLayer: VectorLayer<any, any>,\n\t\tsessionWSImage: SessionWSImage,\n\t\tcurrentIndex: number,\n\t\tclassID: number | undefined\n\t) {\n\t\tconst state = wsiApp.app.getState()\n\t\tconst settings: Settings = state.plots.find(p => p.id === wsiApp.id).settings\n\t\tconst tileSelections: TileSelection[] = SessionWSImage.getTileSelections(sessionWSImage, settings)\n\t\tconst tileSelection = tileSelections[currentIndex]\n\t\tif (!tileSelection) {\n\t\t\tconsole.warn('deleteAnnotation called with no tileSelection for currentIndex', {\n\t\t\t\tcurrentIndex,\n\t\t\t\ttileSelectionsLength: tileSelections.length\n\t\t\t})\n\t\t\treturn\n\t\t}\n\t\tconst source: VectorSource<Feature<Geometry>> | null = vectorLayer.getSource()\n\n\t\t//Remove annotated square\n\t\tconst annotationFeature = source?.getFeatureById(\n\t\t\tcreateFeatureID(FeaturePrefixes.Square, tileSelection.zoomCoordinates)\n\t\t)\n\t\tif (annotationFeature) {\n\t\t\tsource?.removeFeature(annotationFeature)\n\t\t}\n\t\t// Remove active border\n\t\tconst activeBorderFeature = source?.getFeatureById('active-border')\n\t\tif (activeBorderFeature) {\n\t\t\tsource?.removeFeature(activeBorderFeature)\n\t\t}\n\t\t// Remove prediction border\n\t\tconst predictionBorderFeature = source?.getFeatureById(\n\t\t\tcreateFeatureID(FeaturePrefixes.PredBorder, tileSelection.zoomCoordinates)\n\t\t)\n\t\tif (predictionBorderFeature) {\n\t\t\tsource?.removeFeature(predictionBorderFeature)\n\t\t}\n\n\t\t// Remove annotation border\n\t\tconst annotationBorderFeat = source?.getFeatureById(\n\t\t\tcreateFeatureID(FeaturePrefixes.Border, tileSelection.zoomCoordinates)\n\t\t)\n\t\tif (annotationBorderFeat) {\n\t\t\tsource?.removeFeature(annotationBorderFeat)\n\t\t}\n\n\t\tconst starFeat = source?.getFeatureById(createFeatureID(FeaturePrefixes.Star, tileSelection.zoomCoordinates))\n\t\tif (starFeat) {\n\t\t\tsource?.removeFeature(starFeat)\n\t\t}\n\t\tconst nextIndex = SessionWSImage.calculateNewActiveIndex(currentIndex, sessionWSImage, 'delete', settings)\n\t\tif (SessionWSImage.isSessionTileSelection(tileSelection, sessionWSImage)) {\n\t\t\tconst sessionsTileSelection = SessionWSImage.removeTileSelection(tileSelection, sessionWSImage)\n\t\t\twsiApp.app.dispatch({\n\t\t\t\ttype: 'plot_edit',\n\t\t\t\tid: wsiApp.id,\n\t\t\t\tconfig: {\n\t\t\t\t\tsettings: {\n\t\t\t\t\t\trenderWSIViewer: false,\n\t\t\t\t\t\trenderAnnotationTable: true,\n\t\t\t\t\t\tactiveAnnotation: nextIndex,\n\t\t\t\t\t\tchangeTrigger: Date.now(),\n\t\t\t\t\t\tsessionsTileSelection: sessionsTileSelection\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})\n\t\t\treturn\n\t\t}\n\t\tif (classID === undefined) {\n\t\t\tconsole.warn('deleteAnnotation called but classID is undefined for tileSelection', {\n\t\t\t\ttileSelection\n\t\t\t})\n\t\t\treturn\n\t\t}\n\t\tconst prediction = tileSelections[currentIndex]\n\t\tprediction.flag = FlagStatus.Deleted\n\t\tconst body: DeleteWSITileSelectionRequest = {\n\t\t\tgenome: state.vocab.genome,\n\t\t\tdslabel: state.vocab.dslabel,\n\t\t\tprojectId: state.aiProjectID,\n\t\t\tclassID: classID,\n\t\t\ttileSelection: tileSelections[currentIndex],\n\t\t\twsimage: sessionWSImage.filename\n\t\t}\n\n\t\ttry {\n\t\t\tconst response: DeleteWSITileSelectionResponse = await dofetch3('deleteWSITileSelection', {\n\t\t\t\tmethod: 'DELETE',\n\t\t\t\tbody\n\t\t\t})\n\t\t\tif (response.status === 'error' && response.error === 'logout') {\n\t\t\t\twsiApp.app.dispatch({\n\t\t\t\t\ttype: 'plot_edit',\n\t\t\t\t\tid: wsiApp.id,\n\t\t\t\t\tconfig: {\n\t\t\t\t\t\tsettings: {\n\t\t\t\t\t\t\tloggedOut: true\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t\treturn\n\t\t\t}\n\t\t} catch (e: any) {\n\t\t\tconsole.error('Error in deleteWSITileSelection request:', e.message || e)\n\t\t}\n\t\t// TODO find another way to clear server cache\n\t\tclearServerDataCache()\n\t\tconst sessionsTileSelection: TileSelection[] = sessionWSImage.sessionsTileSelections ?? []\n\t\twsiApp.app.dispatch({\n\t\t\ttype: 'plot_edit',\n\t\t\tid: wsiApp.id,\n\t\t\tconfig: {\n\t\t\t\tsettings: {\n\t\t\t\t\trenderWSIViewer: false,\n\t\t\t\t\trenderAnnotationTable: true,\n\t\t\t\t\tactiveAnnotation: nextIndex,\n\t\t\t\t\tchangeTrigger: Date.now(),\n\t\t\t\t\tsessionsTileSelection: sessionsTileSelection\n\t\t\t\t}\n\t\t\t}\n\t\t})\n\t}\n\n\tprivate addActiveBorder(vectorLayer: VectorLayer, zoomCoordinates: [number, number], color: any, tileSize: number) {\n\t\tconst source: VectorSource<Feature<Geometry>> | null = vectorLayer.getSource()\n\n\t\t// Remove any previous border\n\t\tconst existingFeature = source?.getFeatureById('active-border')\n\t\tif (existingFeature) {\n\t\t\tsource?.removeFeature(existingFeature)\n\t\t}\n\n\t\tconst feature = this.createBorderFeature(zoomCoordinates, tileSize, 50, color, 'active-border')\n\t\tsource?.addFeature(feature)\n\t}\n\n\tprivate addAnnotationBorder(source, topLeft, zoomCoordinates: [number, number], color: string, tileSize: number) {\n\t\tconst existingFeature = source?.getFeatureById(createFeatureID(FeaturePrefixes.PredBorder, zoomCoordinates))\n\t\tif (existingFeature) {\n\t\t\tsource?.removeFeature(existingFeature)\n\t\t}\n\t\tconst annotatedBorderFeat = this.createBorderFeature(\n\t\t\ttopLeft,\n\t\t\ttileSize,\n\t\t\t15,\n\t\t\tcolor,\n\t\t\tcreateFeatureID(FeaturePrefixes.Border, zoomCoordinates)\n\t\t)\n\t\tsource?.addFeature(annotatedBorderFeat)\n\t}\n\n\tprivate createBorderFeature(\n\t\ttopLeft: [number, number],\n\t\ttileSize: number,\n\t\tborderWidth: number,\n\t\tcolor: any,\n\t\tfeatureId?: string\n\t): Feature<Geometry> {\n\t\tconst borderCoords = [\n\t\t\t[\n\t\t\t\ttopLeft,\n\t\t\t\t[topLeft[0] + tileSize, topLeft[1]],\n\t\t\t\t[topLeft[0] + tileSize, topLeft[1] - tileSize],\n\t\t\t\t[topLeft[0], topLeft[1] - tileSize],\n\t\t\t\ttopLeft\n\t\t\t],\n\t\t\t[\n\t\t\t\t[topLeft[0] + borderWidth, topLeft[1] - borderWidth],\n\t\t\t\t[topLeft[0] + tileSize - borderWidth, topLeft[1] - borderWidth],\n\t\t\t\t[topLeft[0] + tileSize - borderWidth, topLeft[1] - tileSize + borderWidth],\n\t\t\t\t[topLeft[0] + borderWidth, topLeft[1] - tileSize + borderWidth],\n\t\t\t\t[topLeft[0] + borderWidth, topLeft[1] - borderWidth]\n\t\t\t]\n\t\t]\n\n\t\tconst feature = new Feature({\n\t\t\tgeometry: new Polygon(borderCoords),\n\t\t\tproperties: {\n\t\t\t\tisLocked: false\n\t\t\t}\n\t\t})\n\n\t\tif (featureId) {\n\t\t\tfeature.setId(featureId)\n\t\t}\n\n\t\tfeature.setStyle(\n\t\t\tnew Style({\n\t\t\t\tfill: new Fill({ color }),\n\t\t\t\tstroke: new Stroke({ color, width: 2 })\n\t\t\t})\n\t\t)\n\n\t\treturn feature\n\t}\n\n\tprivate async saveAndFinalizeAnnotation(\n\t\twsiApp: any,\n\t\tsessionWSImage: SessionWSImage,\n\t\ttileSelection: TileSelection,\n\t\tselectedClassId: number | undefined,\n\t\taiProjectID: number,\n\t\tcurrentIndex: number\n\t) {\n\t\tconst state = wsiApp.app.getState()\n\t\tconst body: SaveWSIAnnotationRequest = {\n\t\t\tgenome: state.vocab.genome,\n\t\t\tdslabel: state.vocab.dslabel,\n\t\t\ttileSelection: tileSelection,\n\t\t\tclassId: selectedClassId!,\n\t\t\tprojectId: aiProjectID,\n\t\t\twsimage: sessionWSImage.filename\n\t\t}\n\t\ttry {\n\t\t\t// TODO add UI rollback\n\t\t\tconst response: SaveWSIAnnotationResponse = await dofetch3('saveWSIAnnotation', { method: 'POST', body })\n\t\t\t// TODO find another way to clear server cache\n\t\t\tif (response.status === 'error' && response.error === 'logout') {\n\t\t\t\twsiApp.app.dispatch({\n\t\t\t\t\ttype: 'plot_edit',\n\t\t\t\t\tid: wsiApp.id,\n\t\t\t\t\tconfig: {\n\t\t\t\t\t\tsettings: {\n\t\t\t\t\t\t\tloggedOut: true\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t\treturn\n\t\t\t}\n\t\t\tclearServerDataCache()\n\t\t} catch (e) {\n\t\t\tconsole.error('Error in saveWSIAnnotation request:', e)\n\t\t}\n\n\t\tSessionWSImage.removeTileSelection(tileSelection, sessionWSImage)\n\t\tconst provokingAction =\n\t\t\ttileSelection.flag === FlagStatus.Flagged\n\t\t\t\t? 'flagging'\n\t\t\t\t: tileSelection.flag === FlagStatus.Skipped\n\t\t\t\t? 'skipping'\n\t\t\t\t: 'annotation'\n\t\tconst sessionsTileSelection: TileSelection[] = sessionWSImage.sessionsTileSelections ?? []\n\t\t// Should only move to next annotation if save is successful, I think save and delete routes should be bool promises\n\t\twsiApp.app.dispatch({\n\t\t\ttype: 'plot_edit',\n\t\t\tid: wsiApp.id,\n\t\t\tconfig: {\n\t\t\t\tsettings: {\n\t\t\t\t\trenderWSIViewer: false,\n\t\t\t\t\trenderAnnotationTable: true,\n\t\t\t\t\tchangeTrigger: Date.now(),\n\t\t\t\t\tactiveAnnotation: SessionWSImage.calculateNewActiveIndex(\n\t\t\t\t\t\tcurrentIndex,\n\t\t\t\t\t\tsessionWSImage,\n\t\t\t\t\t\tprovokingAction,\n\t\t\t\t\t\tstate.plots.find(p => p.id === wsiApp.id).settings\n\t\t\t\t\t),\n\t\t\t\t\tisSavingAnnotation: false,\n\t\t\t\t\tsessionsTileSelection: sessionsTileSelection\n\t\t\t\t}\n\t\t\t}\n\t\t})\n\t}\n}\n", "/**\n * @module ol/Overlay\n */\nimport MapEventType from './MapEventType.js';\nimport BaseObject from './Object.js';\nimport {CLASS_SELECTABLE} from './css.js';\nimport {outerHeight, outerWidth, removeChildren} from './dom.js';\nimport {listen, unlistenByKey} from './events.js';\nimport {containsExtent} from './extent.js';\n\n/**\n * @typedef {'bottom-left' | 'bottom-center' | 'bottom-right' | 'center-left' | 'center-center' | 'center-right' | 'top-left' | 'top-center' | 'top-right'} Positioning\n * The overlay position: `'bottom-left'`, `'bottom-center'`, `'bottom-right'`,\n * `'center-left'`, `'center-center'`, `'center-right'`, `'top-left'`,\n * `'top-center'`, or `'top-right'`.\n */\n\n/**\n * @typedef {Object} Options\n * @property {number|string} [id] Set the overlay id. The overlay id can be used\n * with the {@link module:ol/Map~Map#getOverlayById} method.\n * @property {HTMLElement} [element] The overlay element.\n * @property {Array<number>} [offset=[0, 0]] Offsets in pixels used when positioning\n * the overlay. The first element in the\n * array is the horizontal offset. A positive value shifts the overlay right.\n * The second element in the array is the vertical offset. A positive value\n * shifts the overlay down.\n * @property {import(\"./coordinate.js\").Coordinate} [position] The overlay position\n * in map projection.\n * @property {Positioning} [positioning='top-left'] Defines how\n * the overlay is actually positioned with respect to its `position` property.\n * Possible values are `'bottom-left'`, `'bottom-center'`, `'bottom-right'`,\n * `'center-left'`, `'center-center'`, `'center-right'`, `'top-left'`,\n * `'top-center'`, and `'top-right'`.\n * @property {boolean} [stopEvent=true] Whether event propagation to the map\n * viewport should be stopped. If `true` the overlay is placed in the same\n * container as that of the controls (CSS class name\n * `ol-overlaycontainer-stopevent`); if `false` it is placed in the container\n * with CSS class name specified by the `className` property.\n * @property {boolean} [insertFirst=true] Whether the overlay is inserted first\n * in the overlay container, or appended. If the overlay is placed in the same\n * container as that of the controls (see the `stopEvent` option) you will\n * probably set `insertFirst` to `true` so the overlay is displayed below the\n * controls.\n * @property {PanIntoViewOptions|boolean} [autoPan=false] Pan the map when calling\n * `setPosition`, so that the overlay is entirely visible in the current viewport.\n * @property {string} [className='ol-overlay-container ol-selectable'] CSS class\n * name.\n */\n\n/**\n * @typedef {Object} PanOptions\n * @property {number} [duration=1000] The duration of the animation in\n * milliseconds.\n * @property {function(number):number} [easing] The easing function to use. Can\n * be one from {@link module:ol/easing} or a custom function.\n * Default is {@link module:ol/easing.inAndOut}.\n */\n\n/**\n * @typedef {Object} PanIntoViewOptions\n * @property {PanOptions} [animation={}] The animation parameters for the pan\n * @property {number} [margin=20] The margin (in pixels) between the\n * overlay and the borders of the map when panning into view.\n */\n\n/**\n * @enum {string}\n * @protected\n */\nconst Property = {\n ELEMENT: 'element',\n MAP: 'map',\n OFFSET: 'offset',\n POSITION: 'position',\n POSITIONING: 'positioning',\n};\n\n/**\n * @typedef {import(\"./ObjectEventType\").Types|'change:element'|'change:map'|'change:offset'|'change:position'|\n * 'change:positioning'} OverlayObjectEventTypes\n */\n\n/***\n * @template Return\n * @typedef {import(\"./Observable\").OnSignature<import(\"./Observable\").EventTypes, import(\"./events/Event.js\").default, Return> &\n * import(\"./Observable\").OnSignature<OverlayObjectEventTypes, import(\"./Object\").ObjectEvent, Return> &\n * import(\"./Observable\").CombinedOnSignature<import(\"./Observable\").EventTypes|OverlayObjectEventTypes, Return>} OverlayOnSignature\n */\n\n/**\n * @classdesc\n * An element to be displayed over the map and attached to a single map\n * location. Like {@link module:ol/control/Control~Control}, Overlays are\n * visible widgets. Unlike Controls, they are not in a fixed position on the\n * screen, but are tied to a geographical coordinate, so panning the map will\n * move an Overlay but not a Control.\n *\n * Example:\n *\n * import Overlay from 'ol/Overlay.js';\n *\n * // ...\n * const popup = new Overlay({\n * element: document.getElementById('popup'),\n * });\n * popup.setPosition(coordinate);\n * map.addOverlay(popup);\n *\n * @api\n */\nclass Overlay extends BaseObject {\n /**\n * @param {Options} options Overlay options.\n */\n constructor(options) {\n super();\n\n /***\n * @type {OverlayOnSignature<import(\"./events\").EventsKey>}\n */\n this.on;\n\n /***\n * @type {OverlayOnSignature<import(\"./events\").EventsKey>}\n */\n this.once;\n\n /***\n * @type {OverlayOnSignature<void>}\n */\n this.un;\n\n /**\n * @protected\n * @type {Options}\n */\n this.options = options;\n\n /**\n * @protected\n * @type {number|string|undefined}\n */\n this.id = options.id;\n\n /**\n * @protected\n * @type {boolean}\n */\n this.insertFirst =\n options.insertFirst !== undefined ? options.insertFirst : true;\n\n /**\n * @protected\n * @type {boolean}\n */\n this.stopEvent = options.stopEvent !== undefined ? options.stopEvent : true;\n\n /**\n * @protected\n * @type {HTMLElement}\n */\n this.element = document.createElement('div');\n this.element.className =\n options.className !== undefined\n ? options.className\n : 'ol-overlay-container ' + CLASS_SELECTABLE;\n this.element.style.position = 'absolute';\n this.element.style.pointerEvents = 'auto';\n\n /**\n * @protected\n * @type {PanIntoViewOptions|undefined}\n */\n this.autoPan = options.autoPan === true ? {} : options.autoPan || undefined;\n\n /**\n * @protected\n * @type {{transform_: string,\n * visible: boolean}}\n */\n this.rendered = {\n transform_: '',\n visible: true,\n };\n\n /**\n * @protected\n * @type {?import(\"./events.js\").EventsKey}\n */\n this.mapPostrenderListenerKey = null;\n\n this.addChangeListener(Property.ELEMENT, this.handleElementChanged);\n this.addChangeListener(Property.MAP, this.handleMapChanged);\n this.addChangeListener(Property.OFFSET, this.handleOffsetChanged);\n this.addChangeListener(Property.POSITION, this.handlePositionChanged);\n this.addChangeListener(Property.POSITIONING, this.handlePositioningChanged);\n\n if (options.element !== undefined) {\n this.setElement(options.element);\n }\n\n this.setOffset(options.offset !== undefined ? options.offset : [0, 0]);\n\n this.setPositioning(options.positioning || 'top-left');\n\n if (options.position !== undefined) {\n this.setPosition(options.position);\n }\n }\n\n /**\n * Get the DOM element of this overlay.\n * @return {HTMLElement|undefined} The Element containing the overlay.\n * @observable\n * @api\n */\n getElement() {\n return /** @type {HTMLElement|undefined} */ (this.get(Property.ELEMENT));\n }\n\n /**\n * Get the overlay identifier which is set on constructor.\n * @return {number|string|undefined} Id.\n * @api\n */\n getId() {\n return this.id;\n }\n\n /**\n * Get the map associated with this overlay.\n * @return {import(\"./Map.js\").default|null} The map that the\n * overlay is part of.\n * @observable\n * @api\n */\n getMap() {\n return /** @type {import(\"./Map.js\").default|null} */ (\n this.get(Property.MAP) || null\n );\n }\n\n /**\n * Get the offset of this overlay.\n * @return {Array<number>} The offset.\n * @observable\n * @api\n */\n getOffset() {\n return /** @type {Array<number>} */ (this.get(Property.OFFSET));\n }\n\n /**\n * Get the current position of this overlay.\n * @return {import(\"./coordinate.js\").Coordinate|undefined} The spatial point that the overlay is\n * anchored at.\n * @observable\n * @api\n */\n getPosition() {\n return /** @type {import(\"./coordinate.js\").Coordinate|undefined} */ (\n this.get(Property.POSITION)\n );\n }\n\n /**\n * Get the current positioning of this overlay.\n * @return {Positioning} How the overlay is positioned\n * relative to its point on the map.\n * @observable\n * @api\n */\n getPositioning() {\n return /** @type {Positioning} */ (this.get(Property.POSITIONING));\n }\n\n /**\n * @protected\n */\n handleElementChanged() {\n removeChildren(this.element);\n const element = this.getElement();\n if (element) {\n this.element.appendChild(element);\n }\n }\n\n /**\n * @protected\n */\n handleMapChanged() {\n if (this.mapPostrenderListenerKey) {\n this.element?.remove();\n unlistenByKey(this.mapPostrenderListenerKey);\n this.mapPostrenderListenerKey = null;\n }\n const map = this.getMap();\n if (map) {\n this.mapPostrenderListenerKey = listen(\n map,\n MapEventType.POSTRENDER,\n this.render,\n this,\n );\n this.updatePixelPosition();\n const container = this.stopEvent\n ? map.getOverlayContainerStopEvent()\n : map.getOverlayContainer();\n if (this.insertFirst) {\n container.insertBefore(this.element, container.childNodes[0] || null);\n } else {\n container.appendChild(this.element);\n }\n this.performAutoPan();\n }\n }\n\n /**\n * @protected\n */\n render() {\n this.updatePixelPosition();\n }\n\n /**\n * @protected\n */\n handleOffsetChanged() {\n this.updatePixelPosition();\n }\n\n /**\n * @protected\n */\n handlePositionChanged() {\n this.updatePixelPosition();\n this.performAutoPan();\n }\n\n /**\n * @protected\n */\n handlePositioningChanged() {\n this.updatePixelPosition();\n }\n\n /**\n * Set the DOM element to be associated with this overlay.\n * @param {HTMLElement|undefined} element The Element containing the overlay.\n * @observable\n * @api\n */\n setElement(element) {\n this.set(Property.ELEMENT, element);\n }\n\n /**\n * Set the map to be associated with this overlay.\n * @param {import(\"./Map.js\").default|null} map The map that the\n * overlay is part of. Pass `null` to just remove the overlay from the current map.\n * @observable\n * @api\n */\n setMap(map) {\n this.set(Property.MAP, map);\n }\n\n /**\n * Set the offset for this overlay.\n * @param {Array<number>} offset Offset.\n * @observable\n * @api\n */\n setOffset(offset) {\n this.set(Property.OFFSET, offset);\n }\n\n /**\n * Set the position for this overlay. If the position is `undefined` the\n * overlay is hidden.\n * @param {import(\"./coordinate.js\").Coordinate|undefined} position The spatial point that the overlay\n * is anchored at.\n * @observable\n * @api\n */\n setPosition(position) {\n this.set(Property.POSITION, position);\n }\n\n /**\n * Pan the map so that the overlay is entirely visible in the current viewport\n * (if necessary) using the configured autoPan parameters\n * @protected\n */\n performAutoPan() {\n if (this.autoPan) {\n this.panIntoView(this.autoPan);\n }\n }\n\n /**\n * Pan the map so that the overlay is entirely visible in the current viewport\n * (if necessary).\n * @param {PanIntoViewOptions} [panIntoViewOptions] Options for the pan action\n * @api\n */\n panIntoView(panIntoViewOptions) {\n const map = this.getMap();\n\n if (!map || !map.getTargetElement() || !this.get(Property.POSITION)) {\n return;\n }\n\n const mapRect = this.getRect(map.getTargetElement(), map.getSize());\n const element = this.getElement();\n const overlayRect = this.getRect(element, [\n outerWidth(element),\n outerHeight(element),\n ]);\n\n panIntoViewOptions = panIntoViewOptions || {};\n\n const myMargin =\n panIntoViewOptions.margin === undefined ? 20 : panIntoViewOptions.margin;\n if (!containsExtent(mapRect, overlayRect)) {\n // the overlay is not completely inside the viewport, so pan the map\n const offsetLeft = overlayRect[0] - mapRect[0];\n const offsetRight = mapRect[2] - overlayRect[2];\n const offsetTop = overlayRect[1] - mapRect[1];\n const offsetBottom = mapRect[3] - overlayRect[3];\n\n const delta = [0, 0];\n if (offsetLeft < 0) {\n // move map to the left\n delta[0] = offsetLeft - myMargin;\n } else if (offsetRight < 0) {\n // move map to the right\n delta[0] = Math.abs(offsetRight) + myMargin;\n }\n if (offsetTop < 0) {\n // move map up\n delta[1] = offsetTop - myMargin;\n } else if (offsetBottom < 0) {\n // move map down\n delta[1] = Math.abs(offsetBottom) + myMargin;\n }\n\n if (delta[0] !== 0 || delta[1] !== 0) {\n const center = /** @type {import(\"./coordinate.js\").Coordinate} */ (\n map.getView().getCenterInternal()\n );\n const centerPx = map.getPixelFromCoordinateInternal(center);\n if (!centerPx) {\n return;\n }\n const newCenterPx = [centerPx[0] + delta[0], centerPx[1] + delta[1]];\n\n const panOptions = panIntoViewOptions.animation || {};\n map.getView().animateInternal({\n center: map.getCoordinateFromPixelInternal(newCenterPx),\n duration: panOptions.duration,\n easing: panOptions.easing,\n });\n }\n }\n }\n\n /**\n * Get the extent of an element relative to the document\n * @param {HTMLElement} element The element.\n * @param {import(\"./size.js\").Size} size The size of the element.\n * @return {import(\"./extent.js\").Extent} The extent.\n * @protected\n */\n getRect(element, size) {\n const box = element.getBoundingClientRect();\n const offsetX = box.left + window.pageXOffset;\n const offsetY = box.top + window.pageYOffset;\n return [offsetX, offsetY, offsetX + size[0], offsetY + size[1]];\n }\n\n /**\n * Set the positioning for this overlay.\n * @param {Positioning} positioning how the overlay is\n * positioned relative to its point on the map.\n * @observable\n * @api\n */\n setPositioning(positioning) {\n this.set(Property.POSITIONING, positioning);\n }\n\n /**\n * Modify the visibility of the element.\n * @param {boolean} visible Element visibility.\n * @protected\n */\n setVisible(visible) {\n if (this.rendered.visible !== visible) {\n this.element.style.display = visible ? '' : 'none';\n this.rendered.visible = visible;\n }\n }\n\n /**\n * Update pixel position.\n * @protected\n */\n updatePixelPosition() {\n const map = this.getMap();\n const position = this.getPosition();\n if (!map || !map.isRendered() || !position) {\n this.setVisible(false);\n return;\n }\n\n const pixel = map.getPixelFromCoordinate(position);\n const mapSize = map.getSize();\n this.updateRenderedPosition(pixel, mapSize);\n }\n\n /**\n * @param {import(\"./pixel.js\").Pixel} pixel The pixel location.\n * @param {import(\"./size.js\").Size|undefined} mapSize The map size.\n * @protected\n */\n updateRenderedPosition(pixel, mapSize) {\n const style = this.element.style;\n const offset = this.getOffset();\n\n const positioning = this.getPositioning();\n\n this.setVisible(true);\n\n const x = `${pixel[0] + offset[0]}px`;\n const y = `${pixel[1] + offset[1]}px`;\n let posX = '0%';\n let posY = '0%';\n if (\n positioning == 'bottom-right' ||\n positioning == 'center-right' ||\n positioning == 'top-right'\n ) {\n posX = '-100%';\n } else if (\n positioning == 'bottom-center' ||\n positioning == 'center-center' ||\n positioning == 'top-center'\n ) {\n posX = '-50%';\n }\n if (\n positioning == 'bottom-left' ||\n positioning == 'bottom-center' ||\n positioning == 'bottom-right'\n ) {\n posY = '-100%';\n } else if (\n positioning == 'center-left' ||\n positioning == 'center-center' ||\n positioning == 'center-right'\n ) {\n posY = '-50%';\n }\n const transform = `translate(${posX}, ${posY}) translate(${x}, ${y})`;\n if (this.rendered.transform_ != transform) {\n this.rendered.transform_ = transform;\n style.transform = transform;\n }\n }\n\n /**\n * returns the options this Overlay has been created with\n * @return {Options} overlay options\n */\n getOptions() {\n return this.options;\n }\n}\n\nexport default Overlay;\n", "import type { Annotation, Prediction, TileSelection } from '#types'\nimport {\n\tWSImage,\n\tSelectionPrefixes,\n\tcheckSelectionType,\n\tFlagStatusMessages,\n\tFlagStatus,\n\ttype ProvokingActions\n} from '#types'\nimport type Settings from '#plots/wsiviewer/Settings.ts'\n\nexport class SessionWSImage extends WSImage {\n\tsessionsTileSelections?: TileSelection[]\n\n\tconstructor(ws: WSImage, sessionsTileSelections?: TileSelection[]) {\n\t\tsuper(ws.filename)\n\t\t// copy common properties from provided WSImage\n\t\tthis.id = ws.id\n\t\tthis.metadata = ws.metadata\n\t\tthis.predictionLayers = ws.predictionLayers\n\t\tthis.annotations = ws.annotations || []\n\t\tthis.classes = ws.classes\n\t\tthis.uncertainty = ws.uncertainty\n\t\tthis.activePatchColor = ws.activePatchColor\n\t\tthis.tileSize = ws.tileSize\n\t\tthis.predictions = ws.predictions\n\t\tthis.sessionsTileSelections = sessionsTileSelections\n\t}\n\tpublic static getNextTileID(sessionWSImage: SessionWSImage, settings: Settings, currentIndex: number): string {\n\t\tconst allSelections = SessionWSImage.getTileSelections(sessionWSImage, settings) || []\n\t\tif (allSelections.length < 2) return ''\n\t\tconst nextID: string =\n\t\t\tcurrentIndex === allSelections.length - 1 ? allSelections[0].id : allSelections[currentIndex + 1].id\n\t\treturn nextID\n\t}\n\n\tpublic static findTileIndexByID(tileID: string, sessionWSImage: SessionWSImage, settings: Settings): number {\n\t\tconst allSelections = SessionWSImage.getTileSelections(sessionWSImage, settings) || []\n\t\tconst foundIndex = allSelections.findIndex(ts => ts.id === tileID)\n\t\tif (foundIndex === -1) return 0\n\t\treturn foundIndex\n\t}\n\n\tpublic static calculateNewActiveIndex(\n\t\tcurrentIndex: number,\n\t\tsessionWSImage: SessionWSImage,\n\t\tprovokingAction: ProvokingActions,\n\t\tsettings: Settings\n\t): number {\n\t\t// Note here that these calculations will have to change if tileselection sorting change. This calulation is assuming that\n\t\t// All flagged/skipped/annotated items are collected together, sorted by descending timestamp (newest first), and\n\t\t// put in the back half of the table, with sessiontilesections and predictions up front\n\t\tconst tileSelections = SessionWSImage.getTileSelections(sessionWSImage, settings)\n\t\tlet action = provokingAction as string\n\t\tif ('flagging' === provokingAction) {\n\t\t\taction = provokingAction + (settings.renderOnlyFlagged ? 'WithCheck' : 'WithoutCheck')\n\t\t} else if ('skipping' === provokingAction) {\n\t\t\taction = provokingAction + (settings.renderSkipped ? 'WithCheck' : 'WithoutCheck')\n\t\t}\n\t\tconst isLastIndex = currentIndex >= tileSelections.length - 1\n\t\tlet secondHalfIndex = tileSelections.findIndex(\n\t\t\tts => checkSelectionType(ts, SelectionPrefixes.Annotation) || ts.flag !== FlagStatus.Normal\n\t\t)\n\t\tif (secondHalfIndex === -1) secondHalfIndex = tileSelections.length\n\t\tconst inFirstHalf = currentIndex < secondHalfIndex\n\t\tswitch (action) {\n\t\t\tcase 'annotation':\n\t\t\tcase 'skippingWithCheck':\n\t\t\tcase 'flaggingWithoutCheck':\n\t\t\t\treturn inFirstHalf || isLastIndex ? currentIndex : currentIndex + 1\n\t\t\tcase 'delete':\n\t\t\tcase 'skippingWithoutCheck':\n\t\t\tcase 'flaggingWithCheck':\n\t\t\t\treturn isLastIndex ? Math.max(0, currentIndex - 1) : currentIndex\n\t\t\tdefault:\n\t\t\t\treturn 0\n\t\t}\n\t}\n\n\tpublic static removeTileSelection(tileSelection: TileSelection, sessionWSImage: SessionWSImage): TileSelection[] {\n\t\tif (!sessionWSImage.sessionsTileSelections) return []\n\t\tsessionWSImage.sessionsTileSelections = sessionWSImage.sessionsTileSelections.filter(\n\t\t\t(ts: TileSelection) => tileSelection.id !== ts.id\n\t\t)\n\t\treturn sessionWSImage.sessionsTileSelections\n\t}\n\n\tpublic static getTileSelections(sessionWSImage: SessionWSImage, settings: Settings): TileSelection[] {\n\t\tconst allTileSelections = SessionWSImage.getUnfilteredTileSelections(sessionWSImage)\n\t\tif (allTileSelections.length === 0) return []\n\t\tconst [selections, flagged_selections] = partition(\n\t\t\tallTileSelections.filter(ts => checkSelectionType(ts, SelectionPrefixes.TileSelection)) || [],\n\t\t\tts => ts.flag === FlagStatus.Normal\n\t\t)\n\t\tconst [preds, flagged_preds] = partition(\n\t\t\tallTileSelections.filter(ts => checkSelectionType(ts, SelectionPrefixes.Prediction)) || [],\n\t\t\tts => ts.flag === FlagStatus.Normal\n\t\t) as [Prediction[], Prediction[]]\n\t\tconst [annotations, flagged_annotations] = partition(\n\t\t\tallTileSelections.filter(ts => checkSelectionType(ts, SelectionPrefixes.Annotation)) || [],\n\t\t\tts => ts.flag === FlagStatus.Normal\n\t\t) as [Annotation[], Annotation[]]\n\n\t\tconst flagged_and_annotated = [...flagged_selections, ...flagged_preds, ...flagged_annotations, ...annotations]\n\t\tconst desired_arrays = [selections, preds, flagged_and_annotated]\n\t\tfor (const array of desired_arrays) {\n\t\t\tarray.sort((a, b) => b.timestamp.localeCompare(a.timestamp))\n\t\t}\n\t\tconst filtered_arrays = desired_arrays.flat().filter(ts => {\n\t\t\tif (ts.flag === FlagStatus.Skipped && !settings.renderSkipped) return false\n\t\t\tif (ts.flag !== FlagStatus.Flagged && settings.renderOnlyFlagged) return false\n\t\t\tif (ts.flag === FlagStatus.Deleted) return false\n\t\t\treturn true\n\t\t})\n\t\treturn filtered_arrays\n\t}\n\n\tpublic static getUnfilteredTileSelections(sessionWSImage: SessionWSImage): TileSelection[] {\n\t\tconst selections = sessionWSImage.sessionsTileSelections || []\n\t\tconst preds = sessionWSImage.predictions || []\n\t\tconst annotations = sessionWSImage.annotations || []\n\t\treturn [...selections, ...preds, ...annotations]\n\t}\n\n\tpublic static getTilesTableRows(\n\t\tsessionWSImage: SessionWSImage,\n\t\tselectedTileIndex: number,\n\t\tsettings: Settings\n\t): any[] {\n\t\tlet row_index = 0\n\t\tconst incrementIndex = () => {\n\t\t\trow_index++\n\t\t}\n\t\tconst selectedColor = '#fcfc8b'\n\n\t\tconst selectionRows: any[] = SessionWSImage.getTileSelections(sessionWSImage, settings)\n\t\t\t.map(tileSelection => {\n\t\t\t\tconst color = sessionWSImage.classes?.find(c => c.label === tileSelection.class)?.color\n\t\t\t\tconst firstCell: any = { value: row_index }\n\t\t\t\tfirstCell.origBackground = row_index === selectedTileIndex ? selectedColor : ''\n\t\t\t\tconst isPrediction = checkSelectionType(tileSelection, SelectionPrefixes.Prediction)\n\t\t\t\tconst isAnnotation = checkSelectionType(tileSelection, SelectionPrefixes.Annotation)\n\t\t\t\tconst annotationLabel = isAnnotation ? tileSelection.class : ''\n\t\t\t\tconst squareHTML =\n\t\t\t\t\tcolor === undefined\n\t\t\t\t\t\t? ''\n\t\t\t\t\t\t: `<span style=\"display:inline-block;width:12px;height:18px;background-color:${color};border:grey 1px solid;\"></span>`\n\t\t\t\tincrementIndex()\n\t\t\t\treturn [\n\t\t\t\t\tfirstCell,\n\t\t\t\t\t{ value: tileSelection.zoomCoordinates },\n\t\t\t\t\t{ value: isPrediction ? (tileSelection as Prediction).uncertainty : 0 },\n\t\t\t\t\t{ value: isPrediction && FlagStatus.Normal === tileSelection.flag ? tileSelection.class : '' },\n\t\t\t\t\t{ html: squareHTML },\n\t\t\t\t\t{\n\t\t\t\t\t\tvalue: `${\n\t\t\t\t\t\t\tFlagStatus.Normal === tileSelection.flag ? annotationLabel : FlagStatusMessages[tileSelection.flag]\n\t\t\t\t\t\t}`\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t})\n\t\t\t.filter((annotation, _) => annotation.length > 0)\n\n\t\treturn selectionRows\n\t}\n\n\tpublic static isSessionTileSelection(tileSelection: TileSelection, sessionWSImage: SessionWSImage): boolean {\n\t\treturn sessionWSImage.sessionsTileSelections?.map(ts => ts.id).includes(tileSelection.id) ?? false\n\t}\n}\nfunction partition(\n\tarray: TileSelection[],\n\tcallback: (element: TileSelection) => boolean\n): [TileSelection[], TileSelection[]] {\n\tconst trueList: TileSelection[] = []\n\tconst falseList: TileSelection[] = []\n\n\tarray.forEach(element => {\n\t\tif (callback(element)) {\n\t\t\ttrueList.push(element)\n\t\t} else {\n\t\t\tfalseList.push(element)\n\t\t}\n\t})\n\n\treturn [trueList, falseList]\n}\n", "import type { WSImage } from '@sjcrh/proteinpaint-types'\nimport type { WSImageLayers } from '#plots/wsiviewer/viewModel/WSImageLayers.ts'\nimport type { TableCell } from '#dom'\nimport { SessionWSImage } from '#plots/wsiviewer/viewModel/SessionWSImage.ts'\nimport type { ImageViewData } from '#plots/wsiviewer/viewModel/ImageViewData.ts'\nimport type Settings from '#plots/wsiviewer/Settings.ts'\n\nexport class ViewModel {\n\tpublic sampleWSImages: SessionWSImage[]\n\tpublic wsimageLayers: Array<WSImageLayers | null>\n\tpublic wsimageLayersLoadError: string | undefined\n\tpublic selectedTileIndex: number\n\n\timageViewData: (index: number) => ImageViewData\n\n\tconstructor(\n\t\tsampleWSImages: WSImage[],\n\t\twsimageLayers: Array<WSImageLayers | null>,\n\t\twsimageLayersLoadError: string | undefined,\n\t\tsettings: Settings\n\t) {\n\t\t// Convert incoming WSImage[] into SessionWSImage[]\n\t\tthis.sampleWSImages = (sampleWSImages || []).map(ws => new SessionWSImage(ws))\n\n\t\tif (this.sampleWSImages[settings.displayedImageIndex]) {\n\t\t\tthis.sampleWSImages[settings.displayedImageIndex].sessionsTileSelections = settings.sessionsTileSelection\n\t\t}\n\t\tthis.selectedTileIndex = settings.activeAnnotation\n\t\tthis.wsimageLayers = wsimageLayers\n\t\tthis.wsimageLayersLoadError = wsimageLayersLoadError\n\t\tthis.imageViewData = index => this.getImageViewData(index, settings)\n\t}\n\n\tpublic getImageViewData(index: number, settings: Settings): ImageViewData {\n\t\tconst imageViewData: ImageViewData = {}\n\t\tconst imageData = this.sampleWSImages[index]\n\t\tthis.setAnnonationsTableData(imageViewData, imageData, settings)\n\t\tthis.setClassData(imageViewData, imageData)\n\t\tif (imageData?.uncertainty) {\n\t\t\timageViewData.uncertainty = imageData?.uncertainty\n\t\t}\n\t\tconst layer = this.wsimageLayers[index]\n\t\tif (layer) {\n\t\t\tconst metadata = layer.wsimage.get('metadata')\n\t\t\tif (metadata) imageViewData.metadata = metadata\n\t\t}\n\n\t\tif (imageData.activePatchColor) imageViewData.activePatchColor = imageData.activePatchColor\n\n\t\treturn imageViewData\n\t}\n\n\tpublic getInitialZoomInCoordinate(settings: Settings) {\n\t\tconst image = this.sampleWSImages[settings.displayedImageIndex]\n\t\treturn SessionWSImage.getTileSelections(image, settings)\n\t\t\t.map(a => a.zoomCoordinates)\n\t\t\t.slice(settings.activeAnnotation, settings.activeAnnotation + 1)\n\t}\n\n\tprivate setAnnonationsTableData(imageViewData: ImageViewData, imageData: SessionWSImage, settings: Settings) {\n\t\tconst mergedRows: any[] = SessionWSImage.getTilesTableRows(imageData, this.selectedTileIndex, settings)\n\n\t\tconst columns = [\n\t\t\t{ label: 'Index', sortable: true, align: 'center' },\n\t\t\t{ label: 'Coordinates' },\n\t\t\t{ label: 'Uncertainty', sortable: true },\n\t\t\t{ label: 'Model-Predicted Class', sortable: true },\n\t\t\t{ label: '', align: 'center' }, //Show the color next to the class\n\t\t\t{ label: 'Annotated Class', sortable: true }\n\t\t]\n\n\t\timageViewData.tilesTable = {\n\t\t\trows: mergedRows,\n\t\t\tcolumns: columns\n\t\t}\n\t}\n\n\tprivate setClassData(imageViewData: ImageViewData, imageData: WSImage) {\n\t\tif (!imageData?.classes?.length) return\n\n\t\t// Note: 'Enter' is no longer included in shortcuts since it is now handled separately in the interaction code.\n\t\tconst shortcuts: string[] = []\n\t\tconst classRows: TableCell[][] = []\n\n\t\tfor (const c of imageData.classes) {\n\t\t\tclassRows.push([\n\t\t\t\t{ value: c.label },\n\t\t\t\t{\n\t\t\t\t\thtml: `<span style=\"display:inline-block;width:20px;height:20px;background-color:${c.color};border:grey 1px solid;\"></span>`\n\t\t\t\t},\n\t\t\t\t{ value: c.key_shortcut.replace('Key', '').replace('Digit', '') }\n\t\t\t])\n\t\t\tshortcuts.push(c.key_shortcut)\n\t\t}\n\t\tconst columns = [{ label: 'Class' }, { label: 'Color', align: 'center' }, { label: 'Shortcut', align: 'center' }]\n\n\t\timageViewData.classesTable = {\n\t\t\trows: classRows,\n\t\t\tcolumns: columns\n\t\t}\n\t\timageViewData.shortcuts = shortcuts\n\t}\n}\n", "import { dofetch3, getSavedToken } from '#common/dofetch'\nimport { ViewModel } from '#plots/wsiviewer/viewModel/ViewModel.ts'\nimport type { WSImageLayers } from '#plots/wsiviewer/viewModel/WSImageLayers.ts'\nimport Zoomify from 'ol/source/Zoomify'\nimport TileLayer from 'ol/layer/Tile'\nimport VectorLayer from 'ol/layer/Vector'\nimport VectorSource from 'ol/source/Vector'\nimport type {\n\tAiProjectSelectedWSImagesRequest,\n\tAiProjectSelectedWSImagesResponse,\n\tSampleWSImagesResponse,\n\tWSImage,\n\tWSImagesRequest,\n\tWSImagesResponse\n} from '#types'\nimport { FeaturePrefixes, createFeatureID, FlagStatus } from '#types'\nimport type { ImageTile } from 'ol'\nimport { Feature } from 'ol'\nimport type { Geometry } from 'ol/geom'\nimport { Polygon } from 'ol/geom'\nimport { Fill, Stroke, Style } from 'ol/style'\nimport type Settings from '#plots/wsiviewer/Settings.ts'\nimport type { LoadFunction } from 'ol/Tile'\n\nexport class ViewModelProvider {\n\tconstructor() {}\n\n\tasync provide(\n\t\tgenome: string,\n\t\tdslabel: string,\n\t\tsampleId: string,\n\t\tsettings: Settings,\n\t\taiProjectID: number | undefined = undefined,\n\t\taiWSIMageFiles: Array<string> | undefined\n\t): Promise<ViewModel> {\n\t\tlet wsimageLayers: Array<WSImageLayers | null> = []\n\t\tlet wsimageLayersLoadError: string | undefined = undefined\n\t\tlet wsImages: WSImage[] = []\n\n\t\tif (sampleId) {\n\t\t\ttry {\n\t\t\t\tconst data: SampleWSImagesResponse = await this.getSampleWSImages(genome, dslabel, sampleId)\n\t\t\t\twsImages = data.sampleWSImages\n\t\t\t\twsimageLayers = await this.getWSImageLayers(\n\t\t\t\t\tgenome,\n\t\t\t\t\tdslabel,\n\t\t\t\t\tdata.sampleWSImages,\n\t\t\t\t\tsampleId,\n\t\t\t\t\tundefined,\n\t\t\t\t\tsettings.annotatedPatchBorderColor,\n\t\t\t\t\tsettings.thumbnailRangeStart,\n\t\t\t\t\tsettings.numDisplayedThumbnails,\n\t\t\t\t\tsettings.displayedImageIndex\n\t\t\t\t)\n\t\t\t} catch (e: any) {\n\t\t\t\twsimageLayersLoadError = `Error loading image layers for sample ${sampleId}: ${e.message || e}`\n\t\t\t}\n\t\t} else {\n\t\t\tconst data: AiProjectSelectedWSImagesResponse = await this.aiProjectImages(\n\t\t\t\tgenome,\n\t\t\t\tdslabel,\n\t\t\t\taiProjectID!,\n\t\t\t\taiWSIMageFiles!\n\t\t\t)\n\t\t\twsImages = data.wsimages\n\t\t\twsimageLayers = await this.getWSImageLayers(\n\t\t\t\tgenome,\n\t\t\t\tdslabel,\n\t\t\t\tdata.wsimages,\n\t\t\t\tundefined,\n\t\t\t\taiProjectID!,\n\t\t\t\tsettings.annotatedPatchBorderColor,\n\t\t\t\tsettings.thumbnailRangeStart,\n\t\t\t\tsettings.numDisplayedThumbnails,\n\t\t\t\tsettings.displayedImageIndex\n\t\t\t)\n\t\t}\n\n\t\treturn new ViewModel(wsImages, wsimageLayers, wsimageLayersLoadError, settings)\n\t}\n\n\tpublic async getSampleWSImages(genome: string, dslabel: string, sample_id: string): Promise<SampleWSImagesResponse> {\n\t\treturn await dofetch3('samplewsimages', {\n\t\t\tbody: {\n\t\t\t\tgenome: genome,\n\t\t\t\tdslabel: dslabel,\n\t\t\t\tsample_id: sample_id\n\t\t\t}\n\t\t})\n\t}\n\n\tprivate async createAuthenticatedPreviewUrl(url: string, token: string): Promise<string> {\n\t\tconst response = await fetch(url, {\n\t\t\theaders: { Authorization: `Bearer ${token}` }\n\t\t})\n\n\t\tif (!response.ok) {\n\t\t\tthrow new Error(`Failed to load preview image: ${response.status} ${response.statusText}`)\n\t\t}\n\n\t\tconst blob = await response.blob()\n\t\treturn URL.createObjectURL(blob)\n\t}\n\n\tprivate async getWSImageLayers(\n\t\tgenome: string,\n\t\tdslabel: string,\n\t\twsimages: WSImage[],\n\t\tsampleId: string | undefined,\n\t\taiProjectID: number | undefined,\n\t\tannotatedPatchBorderColor: string,\n\t\tthumbnailRangeStart: number,\n\t\tnumDisplayedThumbnails: number,\n\t\tdisplayedImageIndex: number\n\t): Promise<Array<WSImageLayers | null>> {\n\t\tconst layers: Array<WSImageLayers | null> = Array.from({ length: wsimages.length }, () => null)\n\n\t\t// Calculate the range of thumbnails to load\n\t\tconst startIndex = thumbnailRangeStart\n\t\tconst endIndex = Math.min(thumbnailRangeStart + numDisplayedThumbnails, wsimages.length)\n\n\t\t// Determine which indices need to be loaded\n\t\tconst indicesToLoad = new Set<number>()\n\n\t\t// Load layers for visible thumbnail range\n\t\tfor (let i = startIndex; i < endIndex; i++) {\n\t\t\tindicesToLoad.add(i)\n\t\t}\n\n\t\t// Always load the currently displayed image if not in range\n\t\tindicesToLoad.add(displayedImageIndex)\n\n\t\tconst host = (sessionStorage.getItem('hostURL') || (window as any).testHost || '').replace(/\\/+$/, '')\n\n\t\t// Load layers for the determined indices\n\t\tfor (const i of indicesToLoad) {\n\t\t\tconst wsimage = wsimages[i].filename\n\t\t\tconst authToken = btoa(getSavedToken(dslabel) || '')\n\t\t\tconst body: WSImagesRequest = {\n\t\t\t\tgenome: genome,\n\t\t\t\tdslabel: dslabel,\n\t\t\t\tsampleId: sampleId,\n\t\t\t\twsimage: wsimages[i].filename,\n\t\t\t\taiProjectId: aiProjectID\n\t\t\t}\n\n\t\t\tconst data: WSImagesResponse = await dofetch3('wsimages', { body })\n\n\t\t\tif (data.status === 'error') {\n\t\t\t\tthrow new Error(`${data.error}`)\n\t\t\t}\n\n\t\t\tconst imgWidth = data.slide_dimensions[0]\n\t\t\tconst imgHeight = data.slide_dimensions[1]\n\n\t\t\tconst mpp = data.mpp // microns per pixel\n\n\t\t\tlet queryParams = `wsi_image=${wsimage}&dslabel=${dslabel}&genome=${genome}`\n\t\t\tif (sampleId) {\n\t\t\t\tqueryParams += `&sample_id=${sampleId}`\n\t\t\t} else if (aiProjectID) {\n\t\t\t\tqueryParams += `&ai_project_id=${aiProjectID}`\n\t\t\t}\n\n\t\t\tconst zoomifyUrl = `${host}/tileserver/layer/slide/${data.wsiSessionId}/zoomify/{TileGroup}/{z}-{x}-{y}@1x.jpg?${queryParams}`\n\n\t\t\tconst source = new Zoomify({\n\t\t\t\turl: zoomifyUrl,\n\t\t\t\tsize: [imgWidth, imgHeight],\n\t\t\t\tcrossOrigin: 'anonymous',\n\t\t\t\tzDirection: -1\n\t\t\t})\n\n\t\t\tsource.setTileLoadFunction(this.createAuthenticatedTileLoader(authToken))\n\n\t\t\tconst previewUrl = `${host}/tileserver/layer/slide/${data.wsiSessionId}/zoomify/TileGroup0/0-0-0@1x.jpg?${queryParams}`\n\t\t\tconst authenticatedPreviewUrl = await this.createAuthenticatedPreviewUrl(previewUrl, authToken)\n\n\t\t\tconst options = {\n\t\t\t\tpreview: authenticatedPreviewUrl,\n\t\t\t\tmetadata: wsimages[i].metadata,\n\t\t\t\tsource: source,\n\t\t\t\tbaseLayer: true,\n\t\t\t\ttitle: 'Slide',\n\t\t\t\tname: wsimage.replace(/(\\.\\w{3,4})$/i, '') //remove file extension\n\t\t\t}\n\t\t\tconst layer = new TileLayer(options)\n\n\t\t\tconst wsiImageLayers: WSImageLayers = {\n\t\t\t\twsimage: layer,\n\t\t\t\tmpp: mpp\n\t\t\t}\n\n\t\t\tif (data.overlays) {\n\t\t\t\tfor (const overlay of data.overlays) {\n\t\t\t\t\tlet predictionQueryParams = `wsi_image=${wsimage}&dslabel=${dslabel}&genome=${genome}`\n\t\t\t\t\tif (sampleId) {\n\t\t\t\t\t\tpredictionQueryParams += `&sample_id=${sampleId}`\n\t\t\t\t\t} else if (aiProjectID) {\n\t\t\t\t\t\tpredictionQueryParams += `&ai_project_id=${aiProjectID}`\n\t\t\t\t\t}\n\n\t\t\t\t\tconst zoomifyOverlayLatUrl = `${host}/tileserver/layer/${overlay.layerNumber}/${data.wsiSessionId}/zoomify/{TileGroup}/{z}-{x}-{y}@1x.jpg?${predictionQueryParams}`\n\n\t\t\t\t\tconst sourceOverlay = new Zoomify({\n\t\t\t\t\t\turl: zoomifyOverlayLatUrl,\n\t\t\t\t\t\tsize: [imgWidth, imgHeight],\n\t\t\t\t\t\tcrossOrigin: 'anonymous',\n\t\t\t\t\t\tzDirection: -1 // Ensure we get a tile with the screen resolution or higher\n\t\t\t\t\t})\n\n\t\t\t\t\tsourceOverlay.setTileLoadFunction(this.createAuthenticatedTileLoader(authToken))\n\n\t\t\t\t\tconst previewOverlayUrl = `${host}/tileserver/layer/${overlay.layerNumber}/${data.wsiSessionId}/zoomify/TileGroup0/0-0-0@1x.jpg?${predictionQueryParams}`\n\t\t\t\t\tconst authenticatedOverlayPreviewUrl = await this.createAuthenticatedPreviewUrl(previewOverlayUrl, authToken)\n\n\t\t\t\t\tconst optionsOverlay = {\n\t\t\t\t\t\tpreview: authenticatedOverlayPreviewUrl,\n\t\t\t\t\t\tmetadata: wsimages[i].metadata,\n\t\t\t\t\t\tsource: sourceOverlay,\n\t\t\t\t\t\ttitle: overlay.predictionOverlayType,\n\t\t\t\t\t\tvisible: false\n\t\t\t\t\t}\n\n\t\t\t\t\tif (wsiImageLayers.overlays) {\n\t\t\t\t\t\twsiImageLayers.overlays.push(new TileLayer(optionsOverlay))\n\t\t\t\t\t} else {\n\t\t\t\t\t\twsiImageLayers.overlays = [new TileLayer(optionsOverlay)]\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tconst annotations = wsimages[i].annotations ?? []\n\t\t\tconst predictions = wsimages[i].predictions ?? []\n\t\t\tconst sourceAnnotations = new VectorSource()\n\t\t\tconst tileSize = wsimages[i].tileSize ?? 512\n\t\t\tfor (const annotation of annotations) {\n\t\t\t\t// flip Y as in your original code\n\t\t\t\tconst topLeft: [number, number] = [annotation.zoomCoordinates[0], -annotation.zoomCoordinates[1]]\n\n\t\t\t\tconst color = this.getClassColor(wsimages[i], annotation.class)\n\t\t\t\tconst featureId = createFeatureID(FeaturePrefixes.Square, annotation.zoomCoordinates)\n\t\t\t\tlet squareFeature: Feature<Geometry>\n\t\t\t\tif (annotation.flag !== FlagStatus.Skipped) {\n\t\t\t\t\tsquareFeature = this.createSquareFeature(topLeft, tileSize, color, featureId)\n\t\t\t\t} else {\n\t\t\t\t\tsquareFeature = createDimSquareFeature(annotation.zoomCoordinates, topLeft, tileSize, color)\n\t\t\t\t}\n\t\t\t\tsourceAnnotations.addFeature(squareFeature)\n\n\t\t\t\tconst borderFeature = this.createBorderFeature(\n\t\t\t\t\ttopLeft,\n\t\t\t\t\ttileSize,\n\t\t\t\t\t15,\n\t\t\t\t\tannotatedPatchBorderColor,\n\t\t\t\t\tcreateFeatureID(FeaturePrefixes.Border, annotation.zoomCoordinates)\n\t\t\t\t)\n\t\t\t\tsourceAnnotations.addFeature(borderFeature)\n\n\t\t\t\tif (annotation.flag === FlagStatus.Flagged) {\n\t\t\t\t\tconst starFeature = createStarFeature(tileSize, topLeft, annotation.zoomCoordinates, 'yellow', color)\n\t\t\t\t\tsourceAnnotations.addFeature(starFeature)\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfor (const pred of predictions) {\n\t\t\t\t// flip Y as in your original code\n\t\t\t\tconst topLeft: [number, number] = [pred.zoomCoordinates[0], -pred.zoomCoordinates[1]]\n\n\t\t\t\tconst color = this.getClassColor(wsimages[i], pred.class) ?? 'black'\n\t\t\t\tconst featureId = createFeatureID(FeaturePrefixes.Square, pred.zoomCoordinates)\n\t\t\t\tlet squareFeature: Feature<Geometry> | null = null\n\t\t\t\tif (pred.flag == FlagStatus.Flagged) {\n\t\t\t\t\tsquareFeature = this.createSquareFeature(topLeft, tileSize, color, featureId)\n\t\t\t\t\tconst starFeature = createStarFeature(tileSize, topLeft, pred.zoomCoordinates, 'yellow', color)\n\t\t\t\t\tsourceAnnotations.addFeature(starFeature)\n\t\t\t\t} else if (pred.flag === FlagStatus.Skipped) {\n\t\t\t\t\tsquareFeature = createDimSquareFeature(pred.zoomCoordinates, topLeft, tileSize, color)\n\t\t\t\t}\n\t\t\t\tif (squareFeature !== null) {\n\t\t\t\t\tsourceAnnotations.addFeature(squareFeature)\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tconst vectorLayer = new VectorLayer({\n\t\t\t\tsource: sourceAnnotations,\n\t\t\t\tproperties: { title: 'Annotations' }\n\t\t\t})\n\n\t\t\tif (wsiImageLayers.overlays) {\n\t\t\t\twsiImageLayers.overlays.push(vectorLayer)\n\t\t\t} else {\n\t\t\t\twsiImageLayers.overlays = [vectorLayer]\n\t\t\t}\n\t\t\tlayers[i] = wsiImageLayers\n\t\t}\n\t\treturn layers\n\t}\n\n\tprivate async aiProjectImages(\n\t\tgenome: string,\n\t\tdslabel: string,\n\t\taiProjectID: number,\n\t\taiProjectFiles: Array<string>\n\t): Promise<AiProjectSelectedWSImagesResponse> {\n\t\tconst body: AiProjectSelectedWSImagesRequest = {\n\t\t\tgenome: genome,\n\t\t\tdslabel: dslabel,\n\t\t\tprojectId: aiProjectID,\n\t\t\twsimagesFilenames: aiProjectFiles\n\t\t}\n\t\treturn await dofetch3('aiProjectSelectedWSImages', {\n\t\t\tbody: body\n\t\t})\n\t}\n\n\t//TODO: This should be centralized with interaction code\n\tprivate createSquareFeature(\n\t\ttopLeft: [number, number],\n\t\ttileSize: number,\n\t\tcolor: any,\n\t\tfeatureId?: string\n\t): Feature<Geometry> {\n\t\tconst squareCoords = [\n\t\t\t[\n\t\t\t\ttopLeft,\n\t\t\t\t[topLeft[0] + tileSize, topLeft[1]],\n\t\t\t\t[topLeft[0] + tileSize, topLeft[1] - tileSize],\n\t\t\t\t[topLeft[0], topLeft[1] - tileSize],\n\t\t\t\ttopLeft\n\t\t\t]\n\t\t]\n\n\t\tconst feature = new Feature({\n\t\t\tgeometry: new Polygon(squareCoords),\n\t\t\tproperties: {\n\t\t\t\tisLocked: false\n\t\t\t}\n\t\t})\n\n\t\tif (featureId) {\n\t\t\tfeature.setId(featureId)\n\t\t}\n\n\t\tfeature.setStyle(\n\t\t\tnew Style({\n\t\t\t\tfill: new Fill({ color }),\n\t\t\t\tstroke: new Stroke({ color, width: 2 })\n\t\t\t})\n\t\t)\n\n\t\treturn feature\n\t}\n\n\t//TODO: This should be centralized with interaction code\n\tprivate createBorderFeature(\n\t\ttopLeft: [number, number],\n\t\ttileSize: number,\n\t\tborderWidth: number,\n\t\tcolor: any,\n\t\tfeatureId?: string\n\t): Feature<Geometry> {\n\t\tconst borderCoords = [\n\t\t\t[\n\t\t\t\ttopLeft,\n\t\t\t\t[topLeft[0] + tileSize, topLeft[1]],\n\t\t\t\t[topLeft[0] + tileSize, topLeft[1] - tileSize],\n\t\t\t\t[topLeft[0], topLeft[1] - tileSize],\n\t\t\t\ttopLeft\n\t\t\t],\n\t\t\t[\n\t\t\t\t[topLeft[0] + borderWidth, topLeft[1] - borderWidth],\n\t\t\t\t[topLeft[0] + tileSize - borderWidth, topLeft[1] - borderWidth],\n\t\t\t\t[topLeft[0] + tileSize - borderWidth, topLeft[1] - tileSize + borderWidth],\n\t\t\t\t[topLeft[0] + borderWidth, topLeft[1] - tileSize + borderWidth],\n\t\t\t\t[topLeft[0] + borderWidth, topLeft[1] - borderWidth]\n\t\t\t]\n\t\t]\n\n\t\tconst feature = new Feature({\n\t\t\tgeometry: new Polygon(borderCoords),\n\t\t\tproperties: {\n\t\t\t\tisLocked: false\n\t\t\t}\n\t\t})\n\n\t\tif (featureId) {\n\t\t\tfeature.setId(featureId)\n\t\t}\n\n\t\tfeature.setStyle(\n\t\t\tnew Style({\n\t\t\t\tfill: new Fill({ color }),\n\t\t\t\tstroke: new Stroke({ color, width: 2 })\n\t\t\t})\n\t\t)\n\n\t\treturn feature\n\t}\n\n\tprivate getClassColor(wsImage: WSImage, annotationClass: string): string {\n\t\treturn wsImage.classes?.find(wsiCLass => String(wsiCLass.label) === annotationClass)?.color ?? '#FFFFFF' // TODO get the default color from settings\n\t}\n\n\tprivate createAuthenticatedTileLoader(token: string): LoadFunction {\n\t\treturn (tile, src) => {\n\t\t\tconst imageTile = tile as ImageTile\n\t\t\tconst img = imageTile.getImage() as HTMLImageElement\n\n\t\t\tfetch(src, {\n\t\t\t\theaders: { Authorization: `Bearer ${token}` }\n\t\t\t})\n\t\t\t\t.then(r => r.blob())\n\t\t\t\t.then(blob => {\n\t\t\t\t\tconst url = URL.createObjectURL(blob)\n\t\t\t\t\timg.onload = () => URL.revokeObjectURL(url)\n\t\t\t\t\timg.src = url\n\t\t\t\t})\n\t\t}\n\t}\n}\n/**\n NOTE: If you provide a VectorSource the starFeature will be added to it instead of just created \n */\nexport function createStarFeature(\n\ttileSize: number,\n\tstarCenter: [number, number],\n\tannotationCoords: [number, number],\n\tfillColor: string = 'yellow',\n\toutlineColor: any = 'yellow',\n\tfeatureSource: VectorSource<Feature<Geometry>> | null = null\n): Feature<Polygon> {\n\t// Source - https://stackoverflow.com/a/70960369\n\t// Posted by enxaneta\n\t// Retrieved 2026-04-21, License - CC BY-SA 4.0\n\tconst starCoords: [number, number][][] = [[]]\n\tlet n = 0 //a counter\n\tconst starRadiusOuter = 110\n\tconst starRadiusInner = 55\n\tconst starOffset = tileSize / 4\n\tconst step = Math.PI / 5 //since the star has 5 points you will need to calculate the position of a point every 36degs i.e Math.PI/5;\n\n\t//a for loop to calculate the position of the points for the star\n\tfor (let a = Math.PI / 2; a > (-3 * Math.PI) / 2; a -= step) {\n\t\t//The point will be either on the outer circle or on the inner one\n\t\tconst r = n % 2 == 0 ? starRadiusOuter : starRadiusInner\n\t\tconst x = starCenter[0] + starOffset + r * Math.cos(a)\n\t\tconst y = starCenter[1] - starOffset + r * Math.sin(a)\n\t\tstarCoords[0].push([x, y])\n\t\tn++\n\t}\n\n\tconst starFeature = new Feature({\n\t\tgeometry: new Polygon(starCoords),\n\t\tproperties: {\n\t\t\tisLocked: false\n\t\t}\n\t})\n\n\tstarFeature.setId(createFeatureID(FeaturePrefixes.Star, annotationCoords))\n\n\tstarFeature.setStyle(\n\t\tnew Style({\n\t\t\tzIndex: 1000,\n\t\t\tfill: new Fill({ color: fillColor }),\n\t\t\tstroke: new Stroke({ color: outlineColor, width: 2 })\n\t\t})\n\t)\n\tif (featureSource) {\n\t\tconst oldFeature = featureSource.getFeatureById(createFeatureID(FeaturePrefixes.Star, annotationCoords))\n\t\tif (oldFeature) {\n\t\t\tfeatureSource.removeFeature(oldFeature)\n\t\t}\n\t\tfeatureSource.addFeature(starFeature)\n\t}\n\n\treturn starFeature\n}\n\n/**\n NOTE: If you provide a VectorSource the starFeature will be added to it instead of just created \n This function also defaults to using hexcode for color\n */\nexport function createDimSquareFeature(\n\tannotationCoords: [number, number],\n\ttopLeft: [number, number],\n\ttileSize: number,\n\tcolor: string,\n\tfeatureSource: VectorSource<Feature<Geometry>> | null = null,\n\tuseHex: boolean = true\n): Feature<Geometry> {\n\tconst squareCoords = [\n\t\t[\n\t\t\ttopLeft,\n\t\t\t[topLeft[0] + tileSize, topLeft[1]],\n\t\t\t[topLeft[0] + tileSize, topLeft[1] - tileSize],\n\t\t\t[topLeft[0], topLeft[1] - tileSize],\n\t\t\ttopLeft\n\t\t]\n\t]\n\n\tconst dimFeature = new Feature({\n\t\tgeometry: new Polygon(squareCoords),\n\t\tproperties: {\n\t\t\tisLocked: false\n\t\t}\n\t})\n\n\tdimFeature.setId(createFeatureID(FeaturePrefixes.Square, annotationCoords))\n\tfunction hexToRgb(hex: string): number[] {\n\t\thex = hex.replace(/^#/, '')\n\n\t\tconst r = parseInt(hex.substring(0, 2), 16)\n\t\tconst g = parseInt(hex.substring(2, 4), 16)\n\t\tconst b = parseInt(hex.substring(4, 6), 16)\n\n\t\treturn [r, g, b]\n\t}\n\tdimFeature.setStyle(\n\t\tnew Style({\n\t\t\tfill: new Fill({ color: useHex ? [...hexToRgb(color), 0.4] : color }),\n\t\t\tstroke: new Stroke({ color, width: 2 })\n\t\t})\n\t)\n\n\tif (featureSource) {\n\t\tconst oldFeature = featureSource.getFeatureById(createFeatureID(FeaturePrefixes.Square, annotationCoords))\n\t\tif (oldFeature) {\n\t\t\tfeatureSource.removeFeature(oldFeature)\n\t\t}\n\t\tfeatureSource.addFeature(dimFeature)\n\t}\n\treturn dimFeature\n}\n", "import type { SessionWSImage } from '#plots/wsiviewer/viewModel/SessionWSImage.ts'\nimport type { Annotation } from '@sjcrh/proteinpaint-types'\nimport { buildAnnotationsCsv } from '#plots/wsiviewer/interactions/annotationsCsv.ts'\n\nexport class DownloadCSVButtonRenderer {\n\tconstructor() {}\n\n\trender(holder: any, sessionWSImage: SessionWSImage | undefined) {\n\t\tif (!holder) return\n\t\t// create button (styling similar to other controls)\n\t\tconst btn = holder\n\t\t\t.append('div')\n\t\t\t.style('margin', '20px 0 0 0')\n\t\t\t.append('button')\n\t\t\t.attr('type', 'submit')\n\t\t\t.style('font-size', '1.25em')\n\t\t\t.style('padding', '10px 25px')\n\t\t\t.style('border-radius', '20px')\n\t\t\t.style('border', '1px solid black')\n\t\t\t.style('background-color', 'transparent')\n\t\t\t.style('margin', '0 10px')\n\t\t\t.text('Export Annotations')\n\t\tbtn.on('click', () => {\n\t\t\tif (!sessionWSImage) {\n\t\t\t\t// nothing to export\n\t\t\t\treturn\n\t\t\t}\n\t\t\tthis.downloadAllAsCsv(sessionWSImage)\n\t\t})\n\t}\n\n\tpublic downloadAllAsCsv(sessionWSImage: SessionWSImage) {\n\t\tconst annotations: Annotation[] = (sessionWSImage.annotations || []) as Annotation[]\n\n\t\tif (!Array.isArray(annotations) || annotations.length === 0) {\n\t\t\tconst fileBase = ((sessionWSImage as any).filename || 'annotations').toString().replace(/\\.\\w+$/, '')\n\t\t\tconst filename = `${fileBase}_annotations.csv`\n\t\t\tthis.triggerDownload(filename, '')\n\t\t\treturn\n\t\t}\n\n\t\t// use shared CSV builder; prefer session filename for every row\n\t\tconst fileNameForRow = (sessionWSImage as any).filename ?? ''\n\t\tconst csv = buildAnnotationsCsv(annotations as any[], fileNameForRow)\n\n\t\tconst fileBase = ((sessionWSImage as any).filename || 'annotations').toString().replace(/\\.\\w+$/, '')\n\t\tconst filename = `${fileBase}_annotations.csv`\n\t\tthis.triggerDownload(filename, csv)\n\t}\n\n\tprivate triggerDownload(filename: string, content: string) {\n\t\tconst blob = new Blob([content], { type: 'text/csv;charset=utf-8;' })\n\t\tconst url = URL.createObjectURL(blob)\n\t\tconst a = document.createElement('a')\n\t\ta.href = url\n\t\ta.download = filename\n\t\tdocument.body.appendChild(a)\n\t\ta.click()\n\t\ta.remove()\n\t\tURL.revokeObjectURL(url)\n\t}\n}\n", "import type Settings from './Settings'\nimport { copyMerge } from '#rx'\n\nexport default function wsiViewerDefaults(overrides = {}): Settings {\n\tconst defaults: Settings = {\n\t\tdisplayedImageIndex: 0,\n\t\timageWidth: '47vw',\n\t\timageHeight: '25vw',\n\t\tactiveThumbnailBorderStyle: '2px solid red',\n\t\tnonActiveThumbnailBorderStyle: '2px solid black',\n\t\tthumbnailWidth: '60px',\n\t\tthumbnailHeight: '80px',\n\t\tisChangingImages: false,\n\t\tnumDisplayedThumbnails: 10,\n\t\tthumbnailRangeStart: 0,\n\t\ticonDimensions: 20, //20px\n\t\trenderWSIViewer: true,\n\t\trenderAnnotationTable: false,\n\t\tselectedPatchBorderColor: '#FFA500',\n\t\t/** Border color for annotated patches */\n\t\tannotatedPatchBorderColor: '#D3D3D3',\n\t\ttileSize: 512, // 512px\n\t\tactiveAnnotation: 0,\n\t\tsessionsTileSelection: [],\n\t\tchangeTrigger: 0,\n\t\tisSavingAnnotation: false,\n\t\tanimationTime: 700,\n\t\tanimationDelay: 200,\n\t\tdefaultZoom: 5,\n\t\trenderOnlyFlagged: false,\n\t\trenderSkipped: false,\n\t\tloggedOut: false\n\t}\n\treturn copyMerge(defaults, overrides)\n}\n", "\n const styles = new CSSStyleSheet();\n styles.replaceSync(`.ol-control i {\n cursor: default;\n}\n\n/* Bar style */\n.ol-control.ol-bar {\n left: 50%;\n min-height: 1em;\n min-width: 1em;\n position: absolute;\n top: 0.5em;\n transform: translate(-50%,0);\n -webkit-transform: translate(-50%,0);\n white-space: nowrap;\n}\n\n/* Hide subbar when not inserted in a parent bar */\n.ol-control.ol-toggle .ol-option-bar {\n display: none;\n}\n\n/* Default position for controls */\n.ol-control.ol-bar .ol-bar {\n position: static;\n}\n.ol-control.ol-bar .ol-control {\n position: relative;\n top: auto;\n left:auto;\n right:auto;\n bottom: auto;\n display: inline-block;\n vertical-align: middle;\n background-color: transparent;\n padding: 0;\n margin: 0;\n transform: none;\n -webkit-transform: none;\n}\n.ol-control.ol-bar .ol-bar {\n position: static;\n}\n.ol-control.ol-bar .ol-control button {\n margin:2px 1px;\n outline: none;\n}\n\n/* Positionning */\n.ol-control.ol-bar.ol-left {\n left: 0.5em;\n top: 50%;\n -webkit-transform: translate(0px, -50%);\n transform: translate(0px, -50%);\n}\n.ol-control.ol-bar.ol-left .ol-control {\n display: block;\n}\n\n.ol-control.ol-bar.ol-right {\n left: auto;\n right: 0.5em;\n top: 50%;\n -webkit-transform: translate(0px, -50%);\n transform: translate(0px, -50%);\n}\n.ol-control.ol-bar.ol-right .ol-control {\n display: block;\n}\n\n.ol-control.ol-bar.ol-bottom {\n top: auto;\n bottom: 0.5em;\n}\n\n.ol-control.ol-bar.ol-top.ol-left,\n.ol-control.ol-bar.ol-top.ol-right {\n top: 4.5em;\n -webkit-transform:none;\n transform:none;\n}\n.ol-touch .ol-control.ol-bar.ol-top.ol-left,\n.ol-touch .ol-control.ol-bar.ol-top.ol-right {\n top: 5.5em;\n}\n.ol-control.ol-bar.ol-bottom.ol-left,\n.ol-control.ol-bar.ol-bottom.ol-right {\n top: auto;\n bottom: 0.5em;\n -webkit-transform:none;\n transform:none;\n}\n\n/* Group buttons */\n.ol-control.ol-bar.ol-group {\n margin: 1px 1px 1px 0;\n}\n.ol-control.ol-bar.ol-right .ol-group,\n.ol-control.ol-bar.ol-left .ol-group {\n margin: 1px 1px 0 1px;\n}\n\n.ol-control.ol-bar.ol-group button {\n border-radius:0;\n margin: 0 0 0 1px;\n}\n.ol-control.ol-bar.ol-right.ol-group button,\n.ol-control.ol-bar.ol-left.ol-group button,\n.ol-control.ol-bar.ol-right .ol-group button,\n.ol-control.ol-bar.ol-left .ol-group button {\n margin: 0 0 1px 0;\n}\n.ol-control.ol-bar.ol-group .ol-control:first-child > button {\n border-radius: 5px 0 0 5px;\n}\n.ol-control.ol-bar.ol-group .ol-control:last-child > button {\n border-radius: 0 5px 5px 0;\n}\n.ol-control.ol-bar.ol-left.ol-group .ol-control:first-child > button,\n.ol-control.ol-bar.ol-right.ol-group .ol-control:first-child > button,\n.ol-control.ol-bar.ol-left .ol-group .ol-control:first-child > button,\n.ol-control.ol-bar.ol-right .ol-group .ol-control:first-child > button {\n border-radius: 5px 5px 0 0;\n}\n.ol-control.ol-bar.ol-left.ol-group .ol-control:last-child > button,\n.ol-control.ol-bar.ol-right.ol-group .ol-control:last-child > button,\n.ol-control.ol-bar.ol-left .ol-group .ol-control:last-child > button,\n.ol-control.ol-bar.ol-right .ol-group .ol-control:last-child > button {\n border-radius: 0 0 5px 5px;\n}\n\n/* */\n.ol-control.ol-bar .ol-rotate {\n opacity:1;\n visibility: visible;\n}\n.ol-control.ol-bar .ol-rotate button {\n display: block\n}\n\n/* Active buttons */\n.ol-control.ol-bar .ol-toggle.ol-active > button,\n.ol-control.ol-bar .ol-toggle.ol-active button:hover {\n background-color: #00AAFF;\n color: #fff;\n}\n.ol-control.ol-toggle button:disabled {\n background-color: #ccc;\n}\n\n/* Subbar toolbar */\n.ol-control.ol-bar .ol-control.ol-option-bar {\n display: none;\n position:absolute;\n top:100%;\n left:0;\n margin: 5px 0;\n border-radius: 0;\n background-color: rgba(255,255,255, 0.8);\n /* border: 1px solid rgba(0, 60, 136, 0.5); */\n -webkit-box-shadow: 0 0 0 1px rgba(0, 60, 136, 0.5), 1px 1px 2px rgba(0, 0, 0, 0.5);\n box-shadow: 0 0 0 1px rgba(0, 60, 136, 0.5), 1px 1px 2px rgba(0, 0, 0, 0.5);\n}\n\n.ol-control.ol-bar .ol-option-bar:before {\n content: \"\";\n border: 0.5em solid transparent;\n border-color: transparent transparent rgba(0, 60, 136, 0.5);\n position: absolute;\n bottom: 100%;\n left: 0.3em;\n pointer-events: none;\n}\n\n.ol-control.ol-bar .ol-option-bar .ol-control {\n display: table-cell;\n}\n.ol-control.ol-bar .ol-control .ol-bar\n{\tdisplay: none;\n}\n.ol-control.ol-bar .ol-control.ol-active > .ol-option-bar {\n display: block;\n}\n\n.ol-control.ol-bar .ol-control.ol-collapsed ul {\n display: none;\n}\n\n.ol-control.ol-bar .ol-control.ol-text-button > div:hover,\n.ol-control.ol-bar .ol-control.ol-text-button > div {\n background-color: transparent;\n color: rgba(0, 60, 136, 0.5);\n width: auto;\n min-width: 1.375em;\n margin: 0;\n}\n\n.ol-control.ol-bar .ol-control.ol-text-button {\n font-size:0.9em;\n border-left: 1px solid rgba(0, 60, 136, 0.8);\n border-radius: 0;\n}\n.ol-control.ol-bar .ol-control.ol-text-button:first-child {\n border-left:0;\n}\n.ol-control.ol-bar .ol-control.ol-text-button > div {\n padding: .11em 0.3em;\n font-weight: normal;\n font-size: 1.14em;\n font-family: Arial,Helvetica,sans-serif;\n}\n.ol-control.ol-bar .ol-control.ol-text-button div:hover {\n color: rgba(0, 60, 136, 1);\n}\n\n.ol-control.ol-bar.ol-bottom .ol-option-bar {\n top: auto;\n bottom: 100%;\n}\n.ol-control.ol-bar.ol-bottom .ol-option-bar:before {\n border-color: rgba(0, 60, 136, 0.5) transparent transparent ;\n bottom: auto;\n top: 100%;\n}\n\n.ol-control.ol-bar.ol-left .ol-option-bar {\n left:100%;\n top: 0;\n bottom: auto;\n margin: 0 5px;\n}\n.ol-control.ol-bar.ol-left .ol-option-bar:before {\n border-color: transparent rgba(0, 60, 136, 0.5) transparent transparent;\n bottom: auto;\n right: 100%;\n left: auto;\n top: 0.3em;\n}\n.ol-control.ol-bar.ol-right .ol-option-bar {\n right:100%;\n left:auto;\n top: 0;\n bottom: auto;\n margin: 0 5px;\n}\n.ol-control.ol-bar.ol-right .ol-option-bar:before {\n border-color: transparent transparent transparent rgba(0, 60, 136, 0.5);\n bottom: auto;\n left: 100%;\n top: 0.3em;\n}\n\n.ol-control.ol-bar.ol-left .ol-option-bar .ol-option-bar,\n.ol-control.ol-bar.ol-right .ol-option-bar .ol-option-bar {\n top: 100%;\n bottom: auto;\n left: 0.3em;\n right: auto;\n margin: 5px 0;\n}\n.ol-control.ol-bar.ol-right .ol-option-bar .ol-option-bar {\n right: 0.3em;\n left: auto;\n}\n.ol-control.ol-bar.ol-left .ol-option-bar .ol-option-bar:before,\n.ol-control.ol-bar.ol-right .ol-option-bar .ol-option-bar:before {\n border-color: transparent transparent rgba(0, 60, 136, 0.5);\n bottom: 100%;\n top: auto;\n left: 0.3em;\n right: auto;\n}\n.ol-control.ol-bar.ol-right .ol-option-bar .ol-option-bar:before {\n right: 0.3em;\n left: auto;\n}\n\n.ol-control-title {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n}\n\n.ol-center-position {\n position: absolute;\n bottom: 0;\n left: 50%;\n -webkit-transform: translateX(-50%);\n transform: translateX(-50%);\n background-color: rgba(255,255,255,.8);\n padding: .1em 1em;\n}\n\n.ol-compassctrl {\n display: none;\n top: 1em;\n left: auto;\n right: 1em;\n}\n.ol-compassctrl.ol-visible {\n display: block!important;\n}\n.ol-ext-dialog {\n position: fixed;\n top: -100%;\n left: 0;\n width: 150%;\n height: 100%;\n opacity: 0;\n background-color: rgba(0,0,0,.5);\n z-index: 1000;\n pointer-events: none!important;\n -webkit-transition: opacity .2s, top 0s .2s;\n transition: opacity .2s, top 0s .2s;\n}\n.ol-ext-dialog.ol-visible {\n opacity: 1;\n top: 0;\n pointer-events: all!important;\n -webkit-transition: opacity .2s, top 0s;\n transition: opacity .2s, top 0s;\n}\n\n.ol-viewport .ol-ext-dialog {\n position: absolute;\n}\n.ol-ext-dialog > form > h2 {\n margin: 0 .5em .5em 0;\n display: none;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.ol-ext-dialog > form.ol-title > h2 {\n display: block;\n}\n.ol-ext-dialog > form {\n position: absolute;\n top: 0;\n left: 33.33%;\n min-width: 5em;\n max-width: 60%;\n min-height: 3em;\n max-height: 100%;\n background-color: #fff;\n border: 1px solid #333;\n -webkit-box-shadow: 3px 3px 4px rgba(0,0,0, 0.5);\n box-shadow: 3px 3px 4px rgba(0,0,0, 0.5);\n -webkit-transform: translate(-50%, -30%);\n transform: translate(-50%, -30%);\n -webkit-transition: top .2s, -webkit-transform .2s;\n transition: top .2s, -webkit-transform .2s;\n transition: top .2s, transform .2s;\n transition: top .2s, transform .2s, -webkit-transform .2s;\n padding: 1em;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n overflow-x: hidden;\n overflow-y: auto;\n}\ndialog.ol-ext-dialog > form {\n left: 50%;\n width: -webkit-max-content;\n width: -moz-max-content;\n width: max-content;\n max-width: 90%;\n}\n\n.ol-ext-dialog > form.ol-closebox {\n padding-top: 1.5em;\n}\n.ol-ext-dialog > form.ol-title {\n padding-top: 1em;\n}\n.ol-ext-dialog > form.ol-button {\n padding-bottom: .5em;\n}\n\n.ol-ext-dialog.ol-zoom > form {\n top: 30%;\n -webkit-transform: translate(-50%, -30%) scale(0);\n transform: translate(-50%, -30%) scale(0);\n}\n.ol-ext-dialog.ol-visible > form {\n top: 30%;\n}\n.ol-ext-dialog.ol-zoom.ol-visible > form {\n -webkit-transform: translate(-50%, -30%) scale(1);\n transform: translate(-50%, -30%) scale(1);\n}\n\n.ol-ext-dialog > form .ol-content {\n overflow-x: hidden;\n overflow-y: auto;\n}\n\n.ol-ext-dialog > form .ol-closebox {\n position: absolute;\n top: .5em;\n right: .5em;\n width: 1em;\n height: 1em;\n cursor: pointer;\n display: none;\n}\n.ol-ext-dialog > form.ol-closebox .ol-closebox {\n display: block;\n}\n.ol-ext-dialog > form .ol-closebox:before,\n.ol-ext-dialog > form .ol-closebox:after {\n content: \"\";\n position: absolute;\n background-color: currentColor;\n top: 50%;\n left: 50%;\n width: 1em;\n height: .1em;\n border-radius: .1em;\n -webkit-transform: translate(-50%, -50%) rotate(45deg);\n transform: translate(-50%, -50%) rotate(45deg);\n}\n.ol-ext-dialog > form .ol-closebox:before {\n -webkit-transform: translate(-50%, -50%) rotate(-45deg);\n transform: translate(-50%, -50%) rotate(-45deg);\n}\n\n.ol-ext-dialog > form .ol-buttons {\n text-align: right;\n overflow-x: hidden;\n}\n.ol-ext-dialog > form .ol-buttons input {\n margin-top: .5em;\n padding: .5em;\n background: none;\n border: 0;\n font-size: 1em;\n color: rgba(0,60,136,1);\n cursor: pointer;\n border-radius: .25em;\n} \n.ol-ext-dialog > form .ol-buttons input:hover {\n background-color: rgba(0,60,136,.1);\n}\n.ol-ext-dialog > form .ol-buttons input[type=submit] {\n font-weight: bold;\n}\n\n.ol-ext-dialog .ol-progress-message {\n font-size: .9em;\n text-align: center;\n padding-bottom: .5em;\n}\n.ol-ext-dialog .ol-progress-bar {\n border: 1px solid #369;\n width: 20em;\n height: 1em;\n max-width: 100%;\n padding: 2px;\n margin: .5em auto 0;\n overflow: hidden;\n}\n.ol-ext-dialog .ol-progress-bar > div {\n background: #369;\n height: 100%;\n width: 50%;\n -webkit-transition: width .3s;\n transition: width .3s;\n}\n.ol-ext-dialog .ol-progress-bar > div.notransition {\n -webkit-transition: unset;\n transition: unset;\n}\n\n/* full screen */\n.ol-ext-dialog.ol-fullscreen-dialog form {\n top: 1em;\n -webkit-transform: none;\n transform: none;\n left: 1em;\n bottom: 1em;\n right: 1em;\n max-width: calc(66.6% - 2em);\n text-align: center;\n background: transparent;\n -webkit-box-shadow: none;\n box-shadow: none;\n border: none;\n color: #fff;\n}\n.ol-ext-dialog.ol-fullscreen-dialog form .ol-closebox {\n top: 0;\n right: 0;\n font-size: 2em;\n}\n.ol-ext-dialog.ol-fullscreen-dialog .ol-closebox:before,\n.ol-ext-dialog.ol-fullscreen-dialog .ol-closebox:after {\n border: .1em solid currentColor;\n}\n.ol-ext-dialog.ol-fullscreen-dialog img,\n.ol-ext-dialog.ol-fullscreen-dialog video {\n max-width: 100%;\n}\n\n/* Fullscreen dialog */\nbody > .ol-ext-dialog .ol-content {\n max-height: calc(100vh - 10em);\n}\n\nbody > .ol-ext-dialog > form {\n overflow: visible;\n}\n.ol-editbar .ol-button button {\n position: relative;\n display: inline-block;\n font-style: normal;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n vertical-align: middle;\n}\n.ol-editbar .ol-button button:before, \n.ol-editbar .ol-button button:after {\n content: \"\";\n border-width: 0;\n position: absolute;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n background-color: currentColor;\n}\n.ol-editbar .ol-button button:focus {\n outline: none;\n}\n\n.ol-editbar .ol-selection > button:before {\n width: .6em;\n height: 1em;\n background-color: transparent;\n border: .5em solid currentColor;\n border-width: 0 .25em .65em;\n border-color: currentColor transparent;\n -webkit-box-shadow:0 0.6em 0 -0.23em;\n box-shadow:0 0.6em 0 -0.23em;\n top: .35em;\n left: .5em;\n -webkit-transform: translate(-50%, -50%) rotate(-30deg);\n transform: translate(-50%, -50%) rotate(-30deg);\n}\n.ol-editbar .ol-selection0 > button:after {\n width: .28em;\n height: .6em;\n background-color: transparent;\n border: .5em solid currentColor;\n border-width: 0 .05em .7em;\n border-color: currentColor transparent;\n top: .5em;\n left: .7em;\n -webkit-transform: rotate(-45deg);\n transform: rotate(-45deg);\n}\n\n.ol-editbar .ol-delete button:after,\n.ol-editbar .ol-delete button:before {\n width: 1em;\n height: .2em;\n top: 50%;\n left: 50%;\n -webkit-transform: translate(-50%, -50%) rotate(45deg);\n transform: translate(-50%, -50%) rotate(45deg);\n}\n.ol-editbar .ol-delete button:after {\n -webkit-transform: translate(-50%, -50%) rotate(-45deg);\n transform: translate(-50%, -50%) rotate(-45deg);\n}\n\n.ol-editbar .ol-info button:before {\n width: .25em;\n height: .6em;\n border-radius: .03em;\n top: .47em;\n left: 50%;\n -webkit-transform: translateX(-50%);\n transform: translateX(-50%);\n}\n.ol-editbar .ol-info button:after {\n width: .25em;\n height: .2em;\n border-radius: .03em;\n -webkit-box-shadow: -0.1em 0.35em, -0.1em 0.82em, 0.1em 0.82em;\n box-shadow: -0.1em 0.35em, -0.1em 0.82em, 0.1em 0.82em;\n top: .12em;\n left: 50%;\n -webkit-transform: translateX(-50%);\n transform: translateX(-50%);\n}\n\n.ol-editbar .ol-drawpoint button:before {\n width: .7em;\n height: .7em;\n border-radius: 50%;\n border: .15em solid currentColor;\n background-color: transparent;\n top: .2em;\n left: 50%;\n -webkit-transform: translateX(-50%);\n transform: translateX(-50%);\n}\n.ol-editbar .ol-drawpoint button:after {\n width: .4em;\n height: .4em;\n border: .15em solid currentColor;\n border-color: currentColor transparent;\n border-width: .4em .2em 0;\n background-color: transparent;\n top: .8em;\n left: 50%;\n -webkit-transform: translateX(-50%);\n transform: translateX(-50%);\n}\n\n.ol-editbar .ol-drawline > button:before,\n.ol-editbar .ol-drawpolygon > button:before,\n.ol-editbar .ol-drawhole > button:before {\n width: .8em;\n height: .8em;\n border: .13em solid currentColor;\n background-color: transparent;\n border-width: .2em .13em .09em;\n top: .2em;\n left: .25em;\n -webkit-transform: rotate(10deg) perspective(1em) rotateX(40deg);\n transform: rotate(10deg) perspective(1em) rotateX(40deg);\n}\n.ol-editbar .ol-drawline > button:before {\n border-bottom: 0;\n}\n.ol-editbar .ol-drawline > button:after,\n.ol-editbar .ol-drawhole > button:after,\n.ol-editbar .ol-drawpolygon > button:after {\n width: .3em;\n height: .3em;\n top: 0.2em;\n left: .25em;\n -webkit-box-shadow: -0.2em 0.55em, 0.6em 0.1em, 0.65em 0.7em;\n box-shadow: -0.2em 0.55em, 0.6em 0.1em, 0.65em 0.7em;\n}\n.ol-editbar .ol-drawhole > button:after {\n -webkit-box-shadow: -0.2em 0.55em, 0.6em 0.1em, 0.65em 0.7em, 0.25em 0.35em;\n box-shadow: -0.2em 0.55em, 0.6em 0.1em, 0.65em 0.7em, 0.25em 0.35em;\n}\n\n\n.ol-editbar .ol-offset > button i,\n.ol-editbar .ol-transform > button i {\n position: absolute;\n width: .9em;\n height: .9em;\n overflow: hidden;\n top: 50%;\n left: 50%;\n -webkit-transform: translate(-50%, -50%);\n transform: translate(-50%, -50%);\n}\n.ol-editbar .ol-offset > button i{\n width: .8em;\n height: .8em;\n}\n\n.ol-editbar .ol-offset > button i:before,\n.ol-editbar .ol-transform > button i:before,\n.ol-editbar .ol-transform > button i:after {\n content: \"\";\n height: 1em;\n top: 50%;\n left: 50%;\n -webkit-transform: translate(-50%, -50%) rotate(45deg);\n transform: translate(-50%, -50%) rotate(45deg);\n -webkit-box-shadow: 0.5em 0 0 0.1em, -0.5em 0 0 0.1em;\n box-shadow: 0.5em 0 0 0.1em, -0.5em 0 0 0.1em;\n width: .1em;\n position: absolute;\n background-color: currentColor;\n}\n.ol-editbar .ol-offset > button i:before{\n -webkit-box-shadow: 0.45em 0 0 0.1em, -0.45em 0 0 0.1em;\n box-shadow: 0.45em 0 0 0.1em, -0.45em 0 0 0.1em;\n}\n.ol-editbar .ol-transform > button i:after {\n -webkit-transform: translate(-50%, -50%) rotate(-45deg);\n transform: translate(-50%, -50%) rotate(-45deg);\n}\n\n.ol-editbar .ol-split > button:before {\n width: .3em;\n height: .3em;\n top: .81em;\n left: .75em;\n border-radius: 50%;\n -webkit-box-shadow: 0.1em -0.4em, -0.15em -0.25em;\n box-shadow: 0.1em -0.4em, -0.15em -0.25em;\n}\n.ol-editbar .ol-split > button:after {\n width: .8em;\n height: .8em;\n top: .15em;\n left: -.1em;\n border: .1em solid currentColor;\n border-width: 0 .2em .2em 0;\n background-color: transparent;\n border-radius: .1em;\n -webkit-transform: rotate(20deg) scaleY(.6) rotate(-45deg);\n transform: rotate(20deg) scaleY(.6) rotate(-45deg);\n}\n\n.ol-editbar .ol-drawregular > button:before {\n width: .9em;\n height: .9em;\n top: 50%;\n left: 50%;\n border: .1em solid currentColor;\n background-color: transparent;\n -webkit-transform: translate(-50%, -50%);\n transform: translate(-50%, -50%);\n}\n.ol-editbar .ol-drawregular .ol-bar .ol-text-button > div > div > div {\n border: .5em solid currentColor;\n border-color: transparent currentColor;\n display: inline-block;\n cursor: pointer;\n vertical-align: text-bottom;\n}\n.ol-editbar .ol-drawregular .ol-bar:before,\n.ol-control.ol-bar.ol-editbar .ol-drawregular .ol-bar {\n left: 50%;\n -webkit-transform: translateX(-50%);\n transform: translateX(-50%);\n}\n.ol-editbar .ol-drawregular .ol-bar .ol-text-button {\n min-width: 6em;\n text-align: center;\n}\n.ol-editbar .ol-drawregular .ol-bar .ol-text-button > div > div > div:first-child {\n border-width: .5em .5em .5em 0;\n margin: 0 .5em 0 0;\n}\n.ol-editbar .ol-drawregular .ol-bar .ol-text-button > div > div > div:last-child {\n border-width: .5em 0 .5em .5em;\n margin: 0 0 0 .5em;\n}\n\n.ol-feature-list {\n position: relative;\n}\n.ol-control.ol-feature-list {\n position: absolute;\n bottom: 0;\n left: 0;\n width: 100%;\n}\n.ol-control.ol-feature-list > button:before {\n content: \"\";\n position: absolute;\n width: 60%;\n height: 50%;\n top: 50%;\n left: 50%;\n -webkit-transform: translate(-50%, -50%);\n transform: translate(-50%, -50%);\n -webkit-box-shadow: inset 0 2.5px;\n box-shadow: inset 0 2.5px; \n background-image: -webkit-gradient(linear, left top, right top, from(currentColor), to(transparent)); \n background-image: linear-gradient(90deg, currentColor, transparent);\n}\n\n.ol-control.ol-feature-list.ol-collapsed {\n bottom: .5em;\n left: .5em;\n width: auto;\n}\n.ol-feature-list .ol-content {\n background-color: #f4f6f8;\n clear: both;\n}\n.ol-feature-list.ol-collapsed .ol-content > * {\n display: none;\n}\n.ol-feature-list .ol-header {\n position: relative;\n overflow: hidden;\n}\n.ol-feature-list.ol-collapsed .ol-header {\n display: block;\n}\n\n.ol-control.ol-feature-list > button,\n.ol-control.ol-feature-list.ol-collapsed .ol-content {\n display: none;\n}\n.ol-control.ol-feature-list.ol-collapsed > button {\n display: block;\n}\n\n.ol-feature-list .ol-sizer {\n width: 100%;\n height: 1px;\n cursor: row-resize;\n background-color: #ccc;\n position: relative;\n border: 1px solid #f4f6f8;\n border-width: 1px 0;\n}\n.ol-feature-list.ol-bottom .ol-sizer {\n position: absolute;\n bottom: 0;\n}\n.ol-feature-list .ol-sizer:before {\n content: \"\";\n width: 1.5em;\n height: 4px;\n background-color: #ddd;\n position: absolute;\n top: 50%;\n left: 50%;\n -webkit-transform: translate(-50%, -50%);\n transform: translate(-50%, -50%);\n z-index: 1;\n border: 3px solid transparent;\n border-width: 3px 1.5em;\n -webkit-box-shadow: inset 0 -1px #aaa, inset 0 1px #aaa;\n box-shadow: inset 0 -1px #aaa, inset 0 1px #aaa;\n border-radius: 2px;\n}\n.ol-feature-list .ol-sizer:hover:before {\n background-color: #ccc;\n}\n\n.ol-feature-list .ol-content .ol-header p {\n display: inline-block;\n margin: 0.1em .25em;\n vertical-align: middle;\n white-space: nowrap;\n width: calc(100% - 2em);\n text-overflow: ellipsis;\n overflow: hidden;\n}\n.ol-feature-list .ol-content .ol-header .ol-buttons {\n position: absolute;\n right: 0;\n top: 50%;\n -webkit-transform: translateY(-50%);\n transform: translateY(-50%);\n}\n\n.ol-feature-list .ol-content .ol-header button {\n position: relative;\n border: 0;\n background: transparent;\n vertical-align: middle;\n width: 1em;\n height: 1em;\n margin: 0 .2em;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n}\n.ol-feature-list .ol-content .ol-header button.ol-closebox:before,\n.ol-feature-list .ol-content .ol-header button.ol-closebox:after {\n content: \"\";\n position: absolute;\n left: 50%;\n top: 50%;\n -webkit-transform: translate(-50%, -50%) rotate(45deg);\n transform: translate(-50%, -50%) rotate(45deg);\n background: currentColor;\n width: .1em;\n height: 1em;\n display: block;\n font-style: normal;\n}\n.ol-feature-list .ol-content .ol-header button.ol-closebox:after {\n -webkit-transform: translate(-50%, -50%) rotate(-45deg);\n transform: translate(-50%, -50%) rotate(-45deg);\n}\n\n.ol-feature-list.ol-collapsed .ol-content .ol-header button.ol-closebox {\n border: 1px solid currentColor;\n}\n.ol-feature-list.ol-collapsed .ol-content .ol-header button.ol-closebox:before {\n -webkit-transform: translate(-50%, -50%) rotate(90deg);\n transform: translate(-50%, -50%) rotate(90deg);\n}\n.ol-feature-list.ol-collapsed .ol-content .ol-header button.ol-closebox:after {\n display: none;\n}\n\n.ol-feature-list .ol-scroll-container {\n overflow: auto;\n height: 10em;\n min-height: 3em;\n}\n.ol-feature-list .ol-scroll-container:focus {\n outline: unset;\n}\n\n.ol-feature-list table {\n background-color: #fff;\n border-collapse: collapse;\n white-space: nowrap;\n position: relative;\n}\n.ol-feature-list table thead {\n background-color: #f4f6f8;\n position: -webkit-sticky;\n position: sticky;\n top: 0;\n overflow: hidden;\n}\n/* Fixed height */\n.ol-feature-list table tr {\n height: 1.4em;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n}\n.ol-feature-list table tbody tr:hover {\n background-color: #eee;\n cursor: pointer;\n}\n\n.ol-feature-list table tbody tr.ol-selected {\n background-color: #eee;\n}\n\n.ol-feature-list table td {\n border: 0 solid #ddd;\n border-width: 0 0 1px 1px;\n overflow: hidden;\n width: 100px;\n}\n.ol-feature-list table td.number {\n text-align: right;\n}\n.ol-feature-list table td.undefined {\n text-align: center;\n background-color: #fafafa;\n}\n.ol-feature-list table tr:hover td,\n.ol-feature-list table .ol-selected td {\n background-color: transparent;\n}\n.ol-feature-list thead td {\n position: relative;\n}\n.ol-feature-list thead td.sort {\n padding-right: 1.5em;\n}\n\n.ol-feature-list thead td p {\n margin: 0;\n display: inline-block;\n}\n.ol-feature-list table td button {\n position: absolute;\n width: 1.2em;\n height: 1.4em;\n top: 0;\n right: 0;\n margin: .1em 0;\n padding: 0;\n background-color: transparent;\n border: 0;\n}\n.ol-feature-list thead td button.sort:before {\n content: '\u21C5';\n font-style: normal;\n font-weight: normal;\n cursor: pointer;\n font-size: 1em;\n line-height: 1em;\n}\n.ol-feature-list thead td button.sortup:before {\n content: '\u21A7';\n}\n.ol-feature-list thead td button.sortdown:before {\n content: '\u21A5';\n}\n\n.ol-gauge {\n top: 0.5em;\n left: 50%;\n -webkit-transform: translateX(-50%);\n transform: translateX(-50%);\n background-color: rgba(255,255,255,.5);\n padding: 0.1em 0.5em;\n}\n\n.ol-gauge > * {\n display: inline-block;\n vertical-align: middle;\n}\n.ol-gauge > span {\n margin: 0 0.5em 0 0;\n}\n.ol-gauge > div {\n display: inline-block;\n width: 200px;\n border: 1px solid rgba(0,60,136,.5);\n border-radius: 3px;\n padding:1px;\n}\n.ol-gauge button {\n height: 0.8em;\n margin:0;\n max-width:100%;\n}\n\n.ol-control.ol-bookmark {\n top: 0.5em;\n left: 3em;\n background-color: rgba(255,255,255,.5);\n}\n.ol-control.ol-bookmark button {\n position: relative;\n}\n.ol-control.ol-bookmark > button::before {\n content: \"\";\n position: absolute;\n border-width: 10px 5px 4px;\n border-style: solid;\n border-color: currentColor;\n border-bottom-color: transparent;\n top: 50%;\n left: 50%;\n -webkit-transform: translate(-50%, -50%);\n transform: translate(-50%, -50%);\n height: 0;\n}\n\n\n.ol-control.ol-bookmark > div {\n display: block;\n min-width: 5em;\n}\n.ol-control.ol-bookmark.ol-collapsed > div {\n display: none;\n}\n.ol-control.ol-bookmark input {\n font-size: 0.9em;\n margin: 0 0.5em 0.5em;\n padding: 0 0.5em;\n}\n.ol-control.ol-bookmark ul {\n margin: 0 0 0.5em;\n padding: 0;\n list-style: none;\n min-width: 10em;\n}\n.ol-control.ol-bookmark li {\n color: rgba(0,60,136,0.8);\n font-size: 0.9em;\n padding: 0 0.2em 0 0.5em;\n cursor: default;\n clear:both;\n}\n\n.ol-control.ol-bookmark li:hover {\n background-color: rgba(0,60,136,.5);\n color: #fff;\n}\n\n.ol-control.ol-bookmark > div button {\n width: 1em;\n height: 0.8em;\n float: right;\n background-color: transparent;\n cursor: pointer;\n border-radius: 0;\n}\n.ol-control.ol-bookmark > div button:before {\n content: \"\u0002A2F\";\n color: #936;\n font-size: 1.2em;\n line-height: 1em;\n border-radius: 0;\n position: absolute;\n top: 50%;\n left: 50%;\n -webkit-transform: translate(-50%, -50%);\n transform: translate(-50%, -50%);\n}\n\n.ol-bookmark ul li button,\n.ol-bookmark input {\n display: none;\n}\n.ol-bookmark.ol-editable ul li button,\n.ol-bookmark.ol-editable input {\n display: block;\n}\n\n\n.ol-control.ol-geobt {\n top: auto;\n left: auto;\n right: .5em;\n bottom: 3em;\n}\n.ol-touch .ol-control.ol-geobt {\n bottom: 3.5em;\n}\n.ol-control.ol-geobt button:before {\n content: \"\";\n position: absolute;\n background: transparent;\n top: 50%;\n left: 50%;\n -webkit-transform: translate(-50%, -50%);\n transform: translate(-50%, -50%);\n border: .16em solid currentColor;\n width: .4em;\n height: .4em;\n border-radius: 50%;\n}\n.ol-control.ol-geobt button:after {\n content: \"\";\n position: absolute;\n width: .2em;\n height: .2em;\n background: transparent;\n top: 50%;\n left: 50%;\n -webkit-transform: translate(-50%, -50%);\n transform: translate(-50%, -50%);\n -webkit-box-shadow: .42em 0, -.42em 0, 0 .42em, 0 -.42em;\n box-shadow: .42em 0, -.42em 0, 0 .42em, 0 -.42em;\n}\n\n.ol-control.ol-bar.ol-geobar .ol-control {\n\tdisplay: inline-block;\n\tvertical-align: middle;\n}\n\n.ol-control.ol-bar.ol-geobar .ol-bar {\n display: none;\n}\n.ol-bar.ol-geobar.ol-active .ol-bar {\n display: inline-block;\n}\n\n.ol-bar.ol-geobar .geolocBt button:before,\n.ol-bar.ol-geobar .geolocBt button:after {\n content: \"\";\n display: block;\n position: absolute;\n border: 1px solid transparent;\n border-width: 0.3em 0.8em 0 0.2em;\n border-color: currentColor transparent transparent;\n -webkit-transform: rotate(-30deg);\n transform: rotate(-30deg);\n top: .45em;\n left: 0.15em;\n font-size: 1.2em;\n}\n.ol-bar.ol-geobar .geolocBt button:after {\n border-width: 0 0.8em .3em 0.2em;\n border-color: transparent transparent currentColor;\n\t-webkit-transform: rotate(-61deg);\n\ttransform: rotate(-61deg);\n}\n\n.ol-bar.ol-geobar .startBt button:before {\n content: \"\";\n display: block;\n position: absolute;\n width: 1em;\n height: 1em;\n background-color: #800;\n border-radius: 50%;\n top: 50%;\n left: 50%;\n -webkit-transform: translate(-50%,-50%);\n transform: translate(-50%,-50%);\n}\n.ol-bar.ol-geobar .pauseBt button:before,\n.ol-bar.ol-geobar .pauseBt button:after {\n content: \"\";\n display: block;\n position: absolute;\n width: .25em;\n height: 1em;\n background-color: currentColor;\n top: 50%;\n left: 35%;\n -webkit-transform: translate(-50%,-50%);\n transform: translate(-50%,-50%);\n}\n.ol-bar.ol-geobar .pauseBt button:after {\n left: 65%;\n}\n\n.ol-control.ol-bar.ol-geobar .centerBt,\n.ol-control.ol-bar.ol-geobar .pauseBt,\n.ol-bar.ol-geobar.pauseTrack .startBt,\n.ol-bar.ol-geobar.centerTrack .startBt,\n.ol-bar.ol-geobar.centerTrack.pauseTrack .pauseBt,\n.ol-bar.ol-geobar.centerTrack .pauseBt {\n display: none;\n}\n.ol-bar.ol-geobar.pauseTrack .pauseBt,\n.ol-bar.ol-geobar.centerTrack .centerBt{\n display: inline-block;\n}\n\n.ol-control.ol-globe\n{\tposition: absolute;\n\tleft: 0.5em;\n\tbottom: 0.5em;\n\tborder-radius: 50%;\n\topacity: 0.7;\n\ttransform: scale(0.5);\n\ttransform-origin: 0 100%;\n\t-webkit-transform: scale(0.5);\n\t-webkit-transform-origin: 0 100%;\n}\n.ol-control.ol-globe:hover\n{\topacity: 0.9;\n}\n\n.ol-control.ol-globe .panel\n{\tdisplay:block;\n\twidth:170px;\n\theight:170px;\n\tbackground-color:#fff;\n\tcursor: pointer;\n\tborder-radius: 50%;\n\toverflow: hidden;\n\t-webkit-box-shadow: 0 0 10px 5px rgba(255, 255, 255, 0.5);\n\t box-shadow: 0 0 10px 5px rgba(255, 255, 255, 0.5);\n}\n.ol-control.ol-globe .panel .ol-viewport\n{\tborder-radius: 50%;\n}\n\n.ol-control.ol-globe .ol-pointer\n{\tdisplay: block;\n\tbackground-color: #fff;\n\twidth:10px;\n\theight: 10px;\n\tborder:10px solid red;\n\tposition: absolute;\n\ttop: 50%;\n\tleft:50%;\n\ttransform: translate(-15px, -40px);\n\t-webkit-transform: translate(-15px, -40px);\n\tborder-radius: 50%;\n\tz-index:1;\n\ttransition: opacity 0.15s, top 0s, left 0s;\n\t-webkit-transition: opacity 0.15s, top 0s, left 0s;\n}\n.ol-control.ol-globe .ol-pointer.hidden\n{\topacity:0;\n\ttransition: opacity 0.15s, top 3s, left 5s;\n\t-webkit-transition: opacity 0.15s, top 3s, left 5s;\n}\n\n.ol-control.ol-globe .ol-pointer::before\n{\tborder-radius: 50%;\n\t-webkit-box-shadow: 6px 6px 10px 5px #000;\n\t box-shadow: 6px 6px 10px 5px #000;\n\tcontent: \"\";\n\tdisplay: block;\n\theight: 0;\n\tleft: 0;\n\tposition: absolute;\n\ttop: 23px;\n\twidth: 0;\n}\n.ol-control.ol-globe .ol-pointer::after\n{\tcontent:\"\";\n\twidth:0;\n\theight:0;\n\tdisplay: block;\n\tposition: absolute;\n\tborder-width: 20px 10px 0;\n\tborder-color: red transparent;\n\tborder-style: solid;\n\tleft: -50%;\n\ttop: 100%;\n}\n\n.ol-control.ol-globe .panel::before {\n border-radius: 50%;\n -webkit-box-shadow: -20px -20px 80px 2px rgba(0, 0, 0, 0.7) inset;\n box-shadow: -20px -20px 80px 2px rgba(0, 0, 0, 0.7) inset;\n content: \"\";\n display: block;\n height: 100%;\n left: 0;\n position: absolute;\n top: 0;\n width: 100%;\n z-index: 1;\n}\n.ol-control.ol-globe .panel::after {\n border-radius: 50%;\n -webkit-box-shadow: 0 0 20px 7px rgba(255, 255, 255, 1);\n box-shadow: 0 0 20px 7px rgba(255, 255, 255, 1);\n content: \"\";\n display: block;\n height: 0;\n left: 23%;\n position: absolute;\n top: 20%;\n -webkit-transform: rotate(-40deg);\n transform: rotate(-40deg);\n width: 20%;\n z-index: 1;\n}\n\n\n.ol-control.ol-globe.ol-collapsed .panel\n{\tdisplay:none;\n}\n\n.ol-control-top.ol-globe\n{\tbottom: auto;\n\ttop: 5em;\n\ttransform-origin: 0 0;\n\t-webkit-transform-origin: 0 0;\n}\n.ol-control-right.ol-globe\n{\tleft: auto;\n\tright: 0.5em;\n\ttransform-origin: 100% 100%;\n\t-webkit-transform-origin: 100% 100%;\n}\n.ol-control-right.ol-control-top.ol-globe\n{\tleft: auto;\n\tright: 0.5em;\n\ttransform-origin: 100% 0;\n\t-webkit-transform-origin: 100% 0;\n}\n\n.ol-gridreference\n{\tbackground: #fff;\n\tborder: 1px solid #000;\n\toverflow: auto;\n\tmax-height: 100%;\n\ttop:0;\n\tright:0;\n}\n.ol-gridreference input\n{\twidth:100%;\n}\n.ol-gridreference ul\n{\tmargin:0;\n\tpadding:0;\n\tlist-style: none;\n} \n.ol-gridreference li\n{\tpadding: 0 0.5em;\n\tcursor: pointer;\n}\n.ol-gridreference ul li:hover \n{\tbackground-color: #ccc;\n}\n.ol-gridreference li.ol-title,\n.ol-gridreference li.ol-title:hover\n{\tbackground:rgba(0,60,136,.5);\n\tcolor:#fff;\n\tcursor:default;\n}\n.ol-gridreference ul li .ol-ref\n{\tmargin-left: 0.5em;\n}\n.ol-gridreference ul li .ol-ref:before\n{\tcontent:\"(\";\n}\n.ol-gridreference ul li .ol-ref:after\n{\tcontent:\")\";\n}\n\n.ol-control.ol-imageline {\n bottom:0;\n left: 0;\n right: 0;\n padding: 0;\n overflow: visible;\n -webkit-transition: .3s;\n transition: .3s;\n border-radius: 0;\n}\n.ol-control.ol-imageline.ol-collapsed {\n -webkit-transform: translateY(100%);\n transform: translateY(100%);\n}\n.ol-imageline > div {\n height: 4em;\n position: relative;\n white-space: nowrap;\n scroll-behavior: smooth;\n overflow: hidden;\n width: 100%;\n}\n.ol-imageline > div.ol-move {\n scroll-behavior: unset;\n}\n\n.ol-control.ol-imageline button {\n position: absolute;\n top: -1em;\n -webkit-transform: translateY(-100%);\n transform: translateY(-100%);\n margin: .65em;\n -webkit-box-shadow: 0 0 0 0.15em rgba(255,255,255,.4);\n box-shadow: 0 0 0 0.15em rgba(255,255,255,.4);\n}\n.ol-control.ol-imageline button:before {\n content: '';\n position: absolute;\n -webkit-transform: translate(-50%, -50%) rotate(135deg);\n transform: translate(-50%, -50%) rotate(135deg);\n top: 40%;\n left: 50%;\n width: .4em;\n height: .4em;\n border: .1em solid currentColor;\n border-width: .15em .15em 0 0;\n}\n.ol-control.ol-imageline.ol-collapsed button:before {\n top: 60%;\n -webkit-transform: translate(-50%, -50%) rotate(-45deg);\n transform: translate(-50%, -50%) rotate(-45deg);\n}\n\n.ol-imageline,\n.ol-imageline:hover {\n background-color: rgba(0,0,0,.75);\n}\n\n.ol-imageline.ol-arrow:after,\n.ol-imageline.ol-arrow:before {\n content: \"\";\n position: absolute;\n top: 50%;\n left: .2em;\n border-color: #fff #000;\n border-width: 1em .6em 1em 0;\n border-style: solid;\n -webkit-transform: translateY(-50%);\n transform: translateY(-50%);\n z-index: 1;\n opacity: .8;\n pointer-events: none;\n -webkit-box-shadow: -0.6em 0 0 1em #fff;\n box-shadow: -0.6em 0 0 1em #fff;\n}\n.ol-imageline.ol-arrow:after {\n border-width: 1em 0 1em .6em;\n left: auto;\n right: .2em;\n -webkit-box-shadow: 0.6em 0 0 1em #fff;\n box-shadow: 0.6em 0 0 1em #fff;\n}\n.ol-imageline.ol-scroll0.ol-arrow:before {\n display: none;\n}\n.ol-imageline.ol-scroll1.ol-arrow:after {\n display: none;\n}\n\n\n.ol-imageline .ol-image {\n position: relative;\n height: 100%;\n display: inline-block;\n cursor: pointer;\n}\n.ol-imageline img {\n max-height: 100%;\n border: .25em solid transparent;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n opacity: 0;\n -webkit-transition: 1s;\n transition: 1s;\n}\n.ol-imageline img.ol-loaded {\n opacity:1;\n}\n\n.ol-imageline .ol-image.select {\n background-color: #fff;\n}\n.ol-imageline .ol-image span {\n position: absolute;\n width: 125%;\n max-height: 2.4em;\n left: 50%;\n bottom: 0;\n display: none;\n color: #fff;\n background-color: rgba(0,0,0,.5);\n font-size: .8em;\n overflow: hidden;\n white-space: normal;\n text-align: center;\n line-height: 1.2em;\n -webkit-transform: translateX(-50%) scaleX(.8);\n transform: translateX(-50%) scaleX(.8);\n}\n/*\n.ol-imageline .ol-image.select span,\n*/\n.ol-imageline .ol-image:hover span {\n display: block;\n}\n\n.ol-control.ol-routing.ol-isochrone .ol-method-time,\n.ol-control.ol-routing.ol-isochrone .ol-method-distance,\n.ol-control.ol-routing.ol-isochrone > button {\n position: relative;\n}\n.ol-control.ol-routing.ol-isochrone .ol-method-time:before,\n.ol-control.ol-routing.ol-isochrone > button:before {\n content: '';\n position: absolute;\n top: 50%;\n left: 50%;\n -webkit-transform: translate(-50%, -50%);\n transform: translate(-50%, -50%);\n border: .1em solid currentColor;\n width: .8em;\n height: .8em;\n border-radius: 50%;\n -webkit-box-shadow: 0 -0.5em 0 -0.35em, 0.4em -0.35em 0 -0.35em;\n box-shadow: 0 -0.5em 0 -0.35em, 0.4em -0.35em 0 -0.35em;\n clip: unset;\n}\n.ol-control.ol-routing.ol-isochrone .ol-method-time:after,\n.ol-control.ol-routing.ol-isochrone > button:after {\n content: '';\n position: absolute;\n top: 50%;\n left: 50%;\n -webkit-transform: translate(-50%, -50%) rotate(-60deg);\n transform: translate(-50%, -50%) rotate(-60deg);\n border-radius: 50%;\n border: .3em solid transparent;\n border-right-color: currentColor;\n -webkit-box-shadow: none;\n box-shadow: none;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n clip: unset;\n}\n\n.ol-control.ol-routing.ol-isochrone .ol-method-distance:before {\n content: '';\n position: absolute;\n top: 50%;\n left: 50%;\n -webkit-transform: translate(-50%, -50%) rotate(-30deg);\n transform: translate(-50%, -50%) rotate(-30deg);\n width: 1em;\n height: .5em;\n border: .1em solid currentColor;\n -webkit-box-sizing: border-box;\n box-sizing: border-box\n}\n.ol-control.ol-routing.ol-isochrone .ol-method-distance:after {\n content: '';\n position: absolute;\n width: .1em;\n height: .15em;\n top: 50%;\n left: 50%;\n -webkit-transform: translate(-50%, -50%) rotate(-30deg);\n transform: translate(-50%, -50%) rotate(-30deg);\n -webkit-box-shadow: inset 0 -0.15em, 0 0.1em, 0.25em 0.1em, -0.25em 0.1em;\n box-shadow: inset 0 -0.15em, 0 0.1em, 0.25em 0.1em, -0.25em 0.1em;\n}\n\n.ol-control.ol-routing.ol-isochrone .ol-direction-direct:before,\n.ol-control.ol-routing.ol-isochrone .ol-direction-reverse:before {\n content: '';\n position: absolute;\n top: 50%;\n left: 30%;\n -webkit-transform: translate(-50%, -50%);\n transform: translate(-50%, -50%);\n width: .3em;\n height: .3em;\n border-radius: 50%;\n border: .1em solid currentColor;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n -webkit-box-shadow: 0.25em 0 0 -0.05em;\n box-shadow: 0.25em 0 0 -0.05em;\n}\n.ol-control.ol-routing.ol-isochrone .ol-direction-direct:after,\n.ol-control.ol-routing.ol-isochrone .ol-direction-reverse:after {\n content: '';\n position: absolute;\n top: 50%;\n left: 70%;\n -webkit-transform: translate(-50%, -50%);\n transform: translate(-50%, -50%);\n border: .4em solid transparent;\n border-width: .4em 0 .4em .4em;\n border-color: transparent currentColor;\n}\n.ol-control.ol-routing.ol-isochrone .ol-direction-reverse:after {\n border-width: .4em .4em .4em 0;\n}\n\n.ol-control.ol-isochrone.ol-collapsed .content {\n display: none;\n}\n.ol-control.ol-isochrone input[type=\"number\"] {\n width: 3em;\n text-align: right;\n margin: 0 .1em;\n}\n.ol-control.ol-isochrone .ol-distance input[type=\"number\"] {\n width: 5em;\n}\n\n.ol-isochrone .ol-time,\n.ol-isochrone .ol-distance {\n display: none;\n}\n.ol-isochrone .ol-time.selected,\n.ol-isochrone .ol-distance.selected {\n display: block;\n}\n\n.ol-control.ol-layerswitcher-popup {\n position: absolute;\n right: 0.5em;\n text-align: left;\n top: 3em;\n}\n.ol-control.ol-layerswitcher-popup .panel {\n clear:both;\n background:#fff;\n}\n\n.ol-layerswitcher-popup .panel {\n list-style: none;\n padding: 0.25em;\n margin:0;\n overflow: hidden;\n}\n\n.ol-layerswitcher-popup .panel ul {\n list-style: none;\n padding: 0 0 0 20px;\n overflow: hidden;\n}\n\n.ol-layerswitcher-popup.ol-collapsed .panel {\n display:none;\n}\n.ol-layerswitcher-popup.ol-forceopen .panel {\n display:block;\n}\n\n.ol-layerswitcher-popup button {\n background-color: white;\n background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAACE1BMVEX///8A//8AgICA//8AVVVAQID///8rVVVJtttgv98nTmJ2xNgkW1ttyNsmWWZmzNZYxM4gWGgeU2JmzNNr0N1Rwc0eU2VXxdEhV2JqytQeVmMhVmNoydUfVGUgVGQfVGQfVmVqy9hqy9dWw9AfVWRpydVry9YhVmMgVGNUw9BrytchVWRexdGw294gVWQgVmUhVWPd4N6HoaZsy9cfVmQgVGRrytZsy9cgVWQgVWMgVWRsy9YfVWNsy9YgVWVty9YgVWVry9UgVWRsy9Zsy9UfVWRsy9YgVWVty9YgVWRty9Vsy9aM09sgVWRTws/AzM0gVWRtzNYgVWRuy9Zsy9cgVWRGcHxty9bb5ORbxdEgVWRty9bn6OZTws9mydRfxtLX3Nva5eRix9NFcXxOd4JPeINQeIMiVmVUws9Vws9Vw9BXw9BYxNBaxNBbxNBcxdJexdElWWgmWmhjyNRlx9IqXGtoipNpytVqytVryNNrytZsjZUuX210k5t1y9R2zNR3y9V4lp57zth9zdaAnKOGoaeK0NiNpquV09mesrag1tuitbmj1tuj19uktrqr2d2svcCu2d2xwMO63N+7x8nA3uDC3uDFz9DK4eHL4eLN4eIyYnDX5OM5Z3Tb397e4uDf4uHf5uXi5ePi5+Xj5+Xk5+Xm5+Xm6OY6aHXQ19fT4+NfhI1Ww89gx9Nhx9Nsy9ZWw9Dpj2abAAAAWnRSTlMAAQICAwQEBgcIDQ0ODhQZGiAiIyYpKywvNTs+QklPUlNUWWJjaGt0dnd+hIWFh4mNjZCSm6CpsbW2t7nDzNDT1dje5efr7PHy9PT29/j4+Pn5+vr8/f39/f6DPtKwAAABTklEQVR4Xr3QVWPbMBSAUTVFZmZmhhSXMjNvkhwqMzMzMzPDeD+xASvObKePPa+ffHVl8PlsnE0+qPpBuQjVJjno6pZpSKXYl7/bZyFaQxhf98hHDKEppwdWIW1frFnrxSOWHFfWesSEWC6R/P4zOFrix3TzDFLlXRTR8c0fEEJ1/itpo7SVO9Jdr1DVxZ0USyjZsEY5vZfiiAC0UoTGOrm9PZLuRl8X+Dq1HQtoFbJZbv61i+Poblh/97TC7n0neCcK0ETNUrz1/xPHf+DNAW9Ac6t8O8WH3Vp98f5lCaYKAOFZMLyHL4Y0fe319idMNgMMp+zWVSybUed/+/h7I4wRAG1W6XDy4XmjR9HnzvDRZXUAYDFOhC1S/Hh+fIXxen+eO+AKqbs+wAo30zDTDvDxKoJN88sjUzDFAvBzEUGFsnADoIvAJzoh2BZ8sner+Ke/vwECuQAAAABJRU5ErkJggg==\");\n background-position: center;\n background-repeat: no-repeat;\n float: right;\n height: 38px;\n width: 38px;\n}\n\n.ol-layerswitcher-popup li {\n color:#369;\n padding:0.25em 1em;\n font-family:\"Trebuchet MS\",Helvetica,sans-serif;\n cursor:pointer;\n}\n.ol-layerswitcher-popup li.ol-header {\n display: none;\n}\n.ol-layerswitcher-popup li.select,\n.ol-layerswitcher-popup li.ol-visible {\n background:rgba(0, 60, 136, 0.7);\n color:#fff;\n}\n.ol-layerswitcher-popup li:hover {\n background:rgba(0, 60, 136, 0.9);\n color:#fff;\n}\n\n.ol-control.ol-layerswitcher.ol-layer-shop {\n height: calc(100% - 4em);\n max-height: unset;\n max-width: 16em;\n background-color: transparent;\n pointer-events: none!important;\n overflow: visible;\n}\n.ol-control.ol-layerswitcher > * {\n pointer-events: auto;\n}\n\n.ol-control.ol-layer-shop > button,\n.ol-control.ol-layer-shop .panel-container {\n -webkit-box-shadow: 0 0 0 3px rgba(255,255,255,.5);\n box-shadow: 0 0 0 3px rgba(255,255,255,.5);\n}\n.ol-control.ol-layerswitcher.ol-layer-shop .panel-container {\n overflow-y: scroll;\n max-height: calc(100% - 6.5em);\n border: 2px solid #369;\n border-width: 2px 0;\n padding: 0;\n}\n.ol-control.ol-layer-shop .panel {\n padding: 0;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n margin: .25em .5em;\n}\n.ol-control.ol-layerswitcher.ol-layer-shop .panel-container.ol-scrolldiv {\n overflow: hidden;\n}\n.ol-control.ol-layer-shop .ol-scroll {\n background-color: rgba(0,0,0,.3);\n opacity: .5;\n}\n.ol-layerswitcher.ol-layer-shop ul.panel li.ol-header {\n display: none;\n}\n.ol-layerswitcher.ol-layer-shop ul.panel li {\n margin-right: 0;\n padding-right: 0;\n}\n.ol-layerswitcher.ol-layer-shop .layerup {\n height: 1.5em;\n width: 1.4em;\n margin: 0;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n border-radius: 3px;\n background-color: transparent;\n color: rgba(0,60,136,1);\n}\n.ol-layerswitcher.ol-layer-shop .layerup:hover {\n background-color: rgba(0,60,136,.3);\n}\n.ol-layerswitcher.ol-layer-shop .layerup:before {\n top: 50%;\n left: 50%;\n -webkit-transform: translate(-50%, -50%);\n transform: translate(-50%, -50%);\n border: 0;\n background-color: currentColor;\n width: 1em;\n height: 2px;\n -webkit-box-shadow: 0 -4px, 0 4px;\n box-shadow: 0 -4px, 0 4px;\n}\n.ol-layerswitcher.ol-layer-shop .layerup:after {\n content: unset;\n}\n\n.ol-control.ol-layer-shop .ol-title-bar {\n background-color: rgba(255,255,255,.5);\n font-size: .9em;\n height: calc(2.8em - 4px);\n max-width: 14.6em;\n padding: .7em .5em;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n text-align: right;\n -webkit-transform: scaleY(1.1);\n transform: scaleY(1.1);\n -webkit-transition: width 0s, -webkit-transform .1s;\n transition: width 0s, -webkit-transform .1s;\n transition: transform .1s, width 0s;\n transition: transform .1s, width 0s, -webkit-transform .1s;\n -webkit-transform-origin: 100% 0;\n transform-origin: 100% 0;\n}\n.ol-control.ol-layer-shop:hover .ol-title-bar {\n background-color: rgba(255,255,255,.7);\n}\n.ol-control.ol-layer-shop.ol-collapsed .ol-title-bar {\n max-width: 10em;\n -webkit-transform: scale(.9, 1.1);\n transform: scale(.9, 1.1);\n}\n.ol-control.ol-layer-shop.ol-forceopen .ol-title-bar {\n max-width: 14.6em;\n -webkit-transform: scaleY(1.1);\n transform: scaleY(1.1);\n}\n\n.ol-control.ol-layer-shop .ol-bar {\n position: relative;\n height: 1.75em;\n clear: both;\n -webkit-box-shadow: 0 0 0 3px rgba(255,255,255,.5);\n box-shadow: 0 0 0 3px rgba(255,255,255,.5);\n background-color: #fff;\n text-align: right;\n z-index: 10;\n}\n.ol-control.ol-layer-shop.ol-collapsed .ol-scroll,\n.ol-control.ol-layer-shop.ol-collapsed .ol-bar {\n border-width: 2px 0 0;\n display: none;\n}\n.ol-control.ol-layer-shop.ol-forceopen .ol-scroll,\n.ol-control.ol-layer-shop.ol-forceopen .ol-bar {\n display: block;\n}\n.ol-control.ol-layer-shop .ol-bar > * {\n font-size: .9em;\n display: inline-block;\n vertical-align: middle;\n margin-top: .25em;\n background-color: transparent;\n}\n\n.ol-layer-shop .ol-bar .ol-button,\n.ol-touch .ol-layer-shop .ol-bar .ol-button {\n position: relative;\n top: unset;\n left: unset;\n bottom: unset;\n right: unset;\n margin: 0;\n}\n.ol-layer-shop .ol-bar button {\n background-color: #fff;\n color: rgba(0,60,136,1)\n}\n.ol-layer-shop .ol-bar button:hover {\n background-color: rgba(0,60,136,.2);\n}\n\n/* Touch device */\n.ol-touch .ol-layerswitcher.ol-layer-shop > button {\n font-size: 1.7em;\n}\n.ol-touch .ol-layer-shop .ol-bar {\n height: 2em;\n}\n.ol-touch .ol-layer-shop .ol-control button {\n font-size: 1.4em;\n}\n.ol-touch .ol-control.ol-layer-shop .panel {\n max-height: calc(100% - 7em);\n}\n.ol-touch .ol-control.ol-layer-shop .panel label {\n height: 1.8em;\n}\n.ol-touch .ol-control.ol-layer-shop .panel label span {\n margin-left: .5em;\n padding-top: .25em;\n}\n.ol-touch .ol-control.ol-layer-shop .panel label:before,\n.ol-touch .ol-control.ol-layer-shop .panel label:after {\n font-size: 1.3em;\n z-index: 1;\n}\n\n.ol-control.ol-layerswitcher {\n position: absolute;\n right: 0.5em;\n text-align: left;\n top: 3em;\n max-height: calc(100% - 6em);\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n overflow: hidden;\n}\n.ol-control.ol-layerswitcher .ol-switchertopdiv,\n.ol-control.ol-layerswitcher .ol-switcherbottomdiv {\n display: block\n}\n.ol-control.ol-layerswitcher.ol-collapsed .ol-switchertopdiv,\n.ol-control.ol-layerswitcher.ol-collapsed .ol-switcherbottomdiv {\n display: none;\n}\n.ol-layerswitcher.ol-forceopen.ol-collapsed .ol-switchertopdiv,\n.ol-layerswitcher.ol-forceopen.ol-collapsed .ol-switcherbottomdiv {\n display: block;\n}\n\n.ol-control.ol-layerswitcher .ol-switchertopdiv,\n.ol-control.ol-layerswitcher .ol-switcherbottomdiv {\n position: absolute;\n top:0;\n left:0;\n right:0;\n height: 45px;\n background: #fff; \n z-index:2;\n opacity:1;\n cursor: pointer;\n border-top:2px solid transparent;\n border-bottom:2px solid #369;\n margin:0 2px;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n}\n.ol-control.ol-layerswitcher .ol-switcherbottomdiv {\n top: auto;\n bottom: 0;\n height: 2em;\n border-top:2px solid #369;\n border-bottom:2px solid transparent;\n}\n.ol-control.ol-layerswitcher .ol-switchertopdiv:before,\n.ol-control.ol-layerswitcher .ol-switcherbottomdiv:before {\n content:\"\";\n position: absolute;\n left:50%;\n top:50%;\n border:10px solid transparent;\n width:0;\n height:0;\n transform: translate(-50%, -50%);\n -webkit-transform: translate(-50%, -50%);\n opacity:0.8;\n}\n\n.ol-control.ol-layerswitcher .ol-switchertopdiv:hover:before,\n.ol-control.ol-layerswitcher .ol-switcherbottomdiv:hover:before {\n opacity:1;\n}\n.ol-control.ol-layerswitcher .ol-switchertopdiv:before {\n border-bottom-color: #369;\n border-top: 0;\n}\n.ol-control.ol-layerswitcher .ol-switcherbottomdiv:before {\n border-top-color: #369;\n border-bottom: 0;\n}\n\n.ol-control.ol-layerswitcher .panel-container {\n background-color: #fff;\n border-radius: 0 0 2px 2px;\n clear: both;\n display: block; /* display:block to show panel on over */\n padding: 0.5em 0.5em 0;\n}\n\n.ol-layerswitcher .panel {\n list-style: none;\n padding: 0;\n margin: 0;\n overflow: hidden;\n font-family: Tahoma,Geneva,sans-serif;\n font-size:0.9em;\n -webkit-transition: top 0.3s;\n transition: top 0.3s;\n position: relative;\n top:0;\n}\n\n.ol-layerswitcher .panel ul {\n list-style: none;\n padding: 0 0 0 20px;\n overflow: hidden;\n clear: both;\n}\n\n/** Customize checkbox\n*/\n.ol-layerswitcher input[type=\"radio\"],\n.ol-layerswitcher input[type=\"checkbox\"] {\n width: 0;\n height: 0;\n opacity: 0;\n position: absolute;\n}\n\n.ol-layerswitcher .panel li {\n -weblit-transition: -webkit-transform 0.2s linear;\n -webkit-transition: -webkit-transform 0.2s linear;\n transition: -webkit-transform 0.2s linear;\n transition: transform 0.2s linear;\n transition: transform 0.2s linear, -webkit-transform 0.2s linear;\n clear: both;\n display: block;\n border:1px solid transparent;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n}\n.ol-layerswitcher .panel li.ol-layer-select {\n background-color: rgba(0,60,136,.2);\n margin: 0 -.5em;\n padding: 0 .5em\n}\n/* drag and drop */\n.ol-layerswitcher .panel li.drag {\n opacity: 0.5;\n transform:scale(0.8);\n -webkit-transform:scale(0.8);\n}\n.ol-dragover {\n background:rgba(51,102,153,0.5);\n opacity:0.8;\n}\n.ol-layerswitcher .panel li.forbidden,\n.forbidden .ol-layerswitcher-buttons div,\n.forbidden .layerswitcher-opacity div {\n background:rgba(255,0,0,0.5);\n color:#f00!important;\n}\n\n/* cursor management */\n.ol-layerswitcher.drag,\n.ol-layerswitcher.drag * {\n cursor:not-allowed!important;\n cursor:no-drop!important;\n}\n.ol-layerswitcher.drag .panel li.dropover,\n.ol-layerswitcher.drag .panel li.dropover * {\n cursor: pointer!important;\n cursor: n-resize!important;\n cursor: ns-resize!important;\n cursor: -webkit-grab!important;\n cursor: grab!important;\n cursor: -webkit-grabbing!important;\n cursor: grabbing!important;\n}\n\n.ol-layerswitcher .panel li.dropover {\n background: rgba(51, 102, 153, 0.5);\n}\n\n.ol-layerswitcher .panel li label {\n display: inline-block;\n height: 1.4em;\n max-width: 12em;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n padding: 0 0 0 1.7em;\n position: relative;\n}\n\n.ol-layerswitcher .panel li label span {\n display: inline-block;\n width: 100%;\n height: 100%;\n overflow: hidden;\n text-overflow: ellipsis;\n padding-right: .2em;\n}\n.ol-layerswitcher [type=\"radio\"] + label:before,\n.ol-layerswitcher [type=\"checkbox\"] + label:before,\n.ol-layerswitcher [type=\"radio\"]:checked + label:after,\n.ol-layerswitcher [type=\"checkbox\"]:checked + label:after {\n content: '';\n position: absolute;\n left: 0.1em; top: 0.1em;\n width: 1.2em; height: 1.2em; \n border: 2px solid #369;\n background: #fff;\n -webkit-box-sizing:border-box;\n box-sizing:border-box;\n}\n\n.ol-layerswitcher li:has(> div.li-content > .ol-visibility:focus) {\n border-color: #369;\n -webkit-box-shadow: inset 0 0 0 1px #369;\n box-shadow: inset 0 0 0 1px #369;\n}\n\n.ol-layerswitcher [type=\"radio\"] + label:before,\n.ol-layerswitcher [type=\"radio\"] + label:after {\n border-radius: 50%;\n}\n\n.ol-layerswitcher [type=\"radio\"]:checked + label:after {\n background: #369 none repeat scroll 0 0;\n margin: 0.3em;\n width: 0.6em;\n height: 0.6em;\n}\n\n.ol-layerswitcher [type=\"checkbox\"]:checked + label:after {\n background: transparent;\n border-width: 0 3px 3px 0;\n border-style: solid;\n border-color: #369;\n width: 0.7em;\n height: 1em;\n -webkit-transform: rotate(45deg);\n transform: rotate(45deg);\n left: 0.55em;\n top: -0.05em;\n -webkit-box-shadow: 1px 0px 1px 1px #fff;\n box-shadow: 1px 0px 1px 1px #fff;\n}\n\n.ol-layerswitcher .panel li.ol-layer-hidden {\n opacity: 0.6;\n}\n\n.ol-layerswitcher.ol-collapsed .panel-container {\n display:none;\n}\n.ol-layerswitcher.ol-forceopen .panel-container {\n display:block;\n}\n\n.ol-control.ol-layerswitcher .ol-counter {\n display: none;\n position: absolute;\n right: 0.3em;\n top: 0;\n z-index: 22;\n line-height: 1.5em;\n text-align: left;\n font-size: 0.65em;\n}\n.ol-control.ol-layerswitcher.ol-counter .ol-counter {\n display: block;\n}\n.ol-control.ol-layer-shop .ol-counter {\n -webkit-transform: translate(50%, -50%);\n transform: translate(50%, -50%);\n background: #fff;\n line-height: 1.5em;\n width: 1.5em;\n text-align: center;\n border-radius: 50%;\n -webkit-box-shadow: 0.5px 0.5px 2px currentColor;\n box-shadow: 0.5px 0.5px 2px currentColor;\n}\n\n.ol-layerswitcher-image > button,\n.ol-layerswitcher > button {\n background-color: white;\n float: right;\n z-index: 10;\n position: relative;\n font-size: 1.7em;\n}\n.ol-touch .ol-layerswitcher-image > button,\n.ol-touch .ol-layerswitcher > button {\n font-size: 2.5em;\n}\n.ol-layerswitcher-image > button:before,\n.ol-layerswitcher-image > button:after,\n.ol-layerswitcher > button:before,\n.ol-layerswitcher > button:after {\n content: \"\";\n position:absolute;\n width: .75em;\n height: .75em;\n border-radius: 0.15em;\n -webkit-transform: scaleY(.8) rotate(45deg);\n transform: scaleY(.8) rotate(45deg);\n}\n.ol-layerswitcher-image > button:before,\n.ol-layerswitcher > button:before {\n background: #e2e4e1;\n top: .32em;\n left: .34em;\n -webkit-box-shadow: 0.1em 0.1em #325158;\n box-shadow: 0.1em 0.1em #325158;\n}\n.ol-layerswitcher-image > button:after,\n.ol-layerswitcher > button:after {\n top: .22em;\n left: .34em;\n background: #83bcc5;\n background-image: radial-gradient( circle at .85em .6em, #70b3be 0, #70b3be .65em, #83bcc5 .65em);\n}\n.ol-layerswitcher-buttons {\n display:block;\n float: right;\n text-align:right;\n}\n.ol-layerswitcher-buttons > div {\n display: inline-block;\n position: relative;\n cursor: pointer;\n height:1em;\n width:1em;\n margin:2px;\n line-height: 1em;\n text-align: center;\n background: #369;\n vertical-align: middle;\n color: #fff;\n}\n\n.ol-layerswitcher .panel li > div {\n display: inline-block;\n position: relative;\n}\n\n/* line break */\n.ol-layerswitcher .ol-separator {\n display:block;\n width:0;\n height:0;\n padding:0;\n margin:0;\n}\n\n.ol-layerswitcher .layerup {\n float: right;\n height:2.5em;\n background-color: #369;\n opacity: 0.5;\n cursor: move;\n cursor: ns-resize;\n}\n\n.ol-layerswitcher .layerup:before,\n.ol-layerswitcher .layerup:after {\n border-color: #fff transparent;\n border-style: solid;\n border-width: 0.4em 0.4em 0;\n content: \"\";\n height: 0;\n position: absolute;\n bottom: 3px;\n left: 0.1em;\n width: 0;\n}\n.ol-layerswitcher .layerup:after {\n border-width: 0 0.4em 0.4em;\n top:3px;\n bottom: auto;\n}\n\n.ol-layerswitcher .layerInfo {\n background: #369;\n border-radius: 100%;\n}\n.ol-layerswitcher .layerInfo:before {\n color: #fff;\n content: \"i\";\n display: block;\n font-size: 0.8em;\n font-weight: bold;\n text-align: center;\n width: 1.25em;\n position:absolute;\n left: 0;\n top: 0;\n}\n\n.ol-layerswitcher .layerTrash {\n background: #369;\n}\n.ol-layerswitcher .layerTrash:before {\n color: #fff;\n content: \"\u0000d7\";\n font-size:1em;\n top: 50%;\n left: 0;\n right: 0;\n text-align: center;\n line-height: 1em;\n margin: -0.5em 0;\n position: absolute;\n}\n\n.ol-layerswitcher .layerExtent {\n background: #369;\n}\n.ol-layerswitcher .layerExtent:before {\n border-right: 1px solid #fff;\n border-bottom: 1px solid #fff;\n content: \"\";\n display: block;\n position: absolute;\n left: 6px;\n right: 2px;\n top: 6px;\n bottom: 3px;\n}\n.ol-layerswitcher .layerExtent:after {\n border-left: 1px solid #fff;\n border-top: 1px solid #fff;\n content: \"\";\n display: block;\n position: absolute;\n bottom: 6px;\n left: 2px;\n right: 6px;\n top: 3px;\n}\n\n.ol-layerswitcher .expend-layers,\n.ol-layerswitcher .collapse-layers {\n margin: 0 2px;\n background-color: transparent;\n}\n.ol-layerswitcher .expend-layers:before,\n.ol-layerswitcher .collapse-layers:before {\n content:\"\";\n position:absolute;\n top:50%;\n left:0;\n margin-top:-2px;\n height:4px;\n width:100%;\n background:#369;\n}\n.ol-layerswitcher .expend-layers:after {\n content:\"\";\n position:absolute;\n left:50%;\n top:0;\n margin-left:-2px;\n width:4px;\n height:100%;\n background:#369;\n}\n/*\n.ol-layerswitcher .collapse-layers:before {\n content:\"\";\n position:absolute;\n border:0.5em solid #369;\n border-color: #369 transparent transparent;\n margin-top:0.25em;\n}\n.ol-layerswitcher .expend-layers:before {\n content:\"\";\n position:absolute;\n border:0.5em solid #369;\n border-color: transparent transparent transparent #369 ;\n margin-left:0.25em;\n}\n*/\n\n.ol-layerswitcher .layerswitcher-opacity {\n position:relative;\n border: 1px solid #369;\n height: 3px;\n width: 120px;\n margin:5px 1em 10px 7px;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n border-radius: 3px;\n background: #69c;\n background: -webkit-gradient(linear, left top, right top, from(rgba(0,60,136,0)), to(rgba(0,60,136,0.6)));\n background: linear-gradient(to right, rgba(0,60,136,0), rgba(0,60,136,0.6));\n cursor: pointer;\n -webkit-box-shadow: 1px 1px 1px rgba(0,0,0,0.5);\n box-shadow: 1px 1px 1px rgba(0,0,0,0.5);\n}\n\n.ol-layerswitcher .layerswitcher-opacity .layerswitcher-opacity-cursor,\n.ol-layerswitcher .layerswitcher-opacity .layerswitcher-opacity-cursor:before {\n position: absolute;\n width: 20px;\n height: 20px;\n top: 50%;\n left: 50%;\n background: rgba(0,60,136,0.5);\n border-radius: 50%;\n -webkit-transform: translate(-50%, -50%);\n transform: translate(-50%, -50%);\n z-index: 1;\n}\n.ol-layerswitcher .layerswitcher-opacity .layerswitcher-opacity-cursor:before {\n content: \"\";\n position: absolute;\n width: 50%;\n height: 50%;\n}\n.ol-touch .ol-layerswitcher .layerswitcher-opacity .layerswitcher-opacity-cursor {\n width: 26px;\n height: 26px;\n}\n\n.ol-layerswitcher .layerswitcher-opacity-label { \n display:none;\n position: absolute;\n right: -2.5em;\n bottom: 5px;\n font-size: 0.8em;\n}\n.ol-layerswitcher .layerswitcher-opacity-label::after {\n content:\"%\";\n}\n\n.ol-layerswitcher .layerswitcher-progress {\n display:block;\n margin:-4px 1em 2px 7px;\n width: 120px;\n}\n.ol-layerswitcher .layerswitcher-progress div {\n background-color: #369;\n height:2px;\n display:block;\n width:0;\n}\n\n.ol-control.ol-layerswitcher-image {\n position: absolute;\n right: 0.5em;\n text-align: left;\n top: 1em;\n transition: all 0.2s ease 0s;\n -webkit-transition: all 0.2s ease 0s;\n}\n.ol-control.ol-layerswitcher-image.ol-collapsed {\n top:3em;\n -webkit-transition: none;\n transition: none;\n}\n\n.ol-layerswitcher-image .panel {\n list-style: none;\n padding: 0.25em;\n margin:0;\n overflow: hidden;\n}\n\n.ol-layerswitcher-image .panel ul {\n list-style: none;\n padding: 0 0 0 20px;\n overflow: hidden;\n}\n\n.ol-layerswitcher-image.ol-collapsed .panel {\n display:none;\n}\n.ol-layerswitcher-image.ol-forceopen .panel {\n display:block;\n clear:both;\n}\n\n.ol-layerswitcher-image button {\n float: right;\n display:none;\n}\n\n.ol-layerswitcher-image.ol-collapsed button {\n display:block;\n position:relative;\n}\n\n.ol-layerswitcher-image li {\n border-radius: 4px;\n border: 3px solid transparent;\n -webkit-box-shadow: 1px 1px 4px rgba(0, 0, 0, 0.5);\n box-shadow: 1px 1px 4px rgba(0, 0, 0, 0.5);\n display: inline-block;\n width: 64px;\n height: 64px;\n margin:2px;\n position: relative;\n background-color: #fff;\n overflow: hidden;\n vertical-align: middle;\n cursor:pointer;\n}\n.ol-layerswitcher-image li.ol-layer-hidden {\n opacity: 0.5;\n border-color:#555;\n}\n.ol-layerswitcher-image li.ol-header {\n display: none;\n}\n\n.ol-layerswitcher-image li img {\n position:absolute;\n max-width:100%;\n}\n.ol-layerswitcher-image li.select,\n.ol-layerswitcher-image li.ol-visible {\n border: 3px solid red;\n}\n\n.ol-layerswitcher-image li p {\n display:none;\n}\n.ol-layerswitcher-image li:hover p {\n background-color: rgba(0, 0, 0, 0.5);\n color: #fff;\n bottom: 0;\n display: block;\n left: 0;\n margin: 0;\n overflow: hidden;\n position: absolute;\n right: 0;\n text-align: center;\n height:1.2em;\n font-family:Verdana, Geneva, sans-serif;\n font-size:0.8em;\n}\n.ol-control.ol-legend {\n bottom: .5em;\n left: .5em;\n z-index: 1;\n max-height: 90%;\n max-width: 90%;\n overflow-x: hidden;\n overflow-y: auto;\n background-color: rgba(255,255,255,.6);\n}\n.ol-control.ol-legend:hover {\n background-color: rgba(255,255,255,.8);\n}\n.ol-control.ol-legend.ol-empty,\n.ol-control.ol-legend.ol-collapsed {\n overflow: hidden;\n}\n.ol-control.ol-legend button {\n position: relative;\n display: none;\n}\n.ol-control.ol-legend.ol-empty button,\n.ol-control.ol-legend.ol-collapsed button {\n display: block;\n}\n.ol-control.ol-legend.ol-uncollapsible button {\n display: none;\n}\n\n.ol-control.ol-legend > ul,\n.ol-control.ol-legend > canvas {\n margin: 2px;\n}\n\n.ol-control.ol-legend button.ol-closebox {\n display: block;\n position: absolute;\n top: 0;\n right: 0;\n background: none;\n cursor: pointer;\n z-index: 1;\n}\n.ol-control.ol-legend.ol-empty button.ol-closebox,\n.ol-control.ol-legend.ol-uncollapsible button.ol-closebox,\n.ol-control.ol-legend.ol-collapsed button.ol-closebox {\n display: none;\n}\n.ol-control.ol-legend button.ol-closebox:before {\n content: \"\\D7\";\n background: none;\n color: rgba(0,60,136,.5);\n font-size: 1.3em;\n}\n.ol-control.ol-legend button.ol-closebox:hover:before {\n color: rgba(0,60,136,1);\n}\n.ol-control.ol-legend .ol-legendImg {\n display: block;\n}\n.ol-control.ol-legend.ol-empty .ol-legendImg,\n.ol-control.ol-legend.ol-collapsed .ol-legendImg {\n display: none;\n}\n.ol-control.ol-legend.ol-uncollapsible .ol-legendImg {\n display: block;\n}\n\n.ol-control.ol-legend > button:first-child:before,\n.ol-control.ol-legend > button:first-child:after {\n content: \"\";\n position: absolute;\n top: .25em;\n left: .2em;\n width: .2em;\n height: .2em;\n background-color: currentColor;\n -webkit-box-shadow: 0 0.35em, 0 0.7em;\n box-shadow: 0 0.35em, 0 0.7em;\n}\n.ol-control.ol-legend button:first-child:after {\n top: .27em;\n left: .55em;\n height: .15em;\n width: .6em;\n}\n\nul.ol-legend {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n margin: 0;\n padding: 0;\n list-style: none;\n}\n.ol-control.ol-legend.ol-empty ul,\n.ol-control.ol-legend.ol-collapsed ul {\n display: none;\n}\n.ol-control.ol-legend.ol-uncollapsible ul {\n display: block;\n}\nul.ol-legend li.ol-title {\n text-align: center;\n font-weight: bold;\n}\nul.ol-legend li.ol-title > div:first-child {\n width: 0!important;\n}\nul.ol-legend li {\n overflow: hidden;\n padding: 0;\n white-space: nowrap;\n}\nul.ol-legend li div {\n display: inline-block;\n vertical-align: top;\n}\n\n.ol-control.ol-legend .ol-legend {\n display: inline-block;\n}\n.ol-control.ol-legend.ol-empty .ol-legend,\n.ol-control.ol-legend.ol-collapsed .ol-legend {\n display: none;\n}\n.ol-control.ol-legend.ol-empty button {\n opacity: .4;\n}\n.ol-control.ol-mapzone {\n position: absolute;\n right: 0.5em;\n text-align: left;\n top: .5em;\n max-height: calc(100% - 6em);\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n overflow: hidden;\n}\n\n.ol-control.ol-mapzone.ol-collapsed {\n top: 3em;\n}\n\n.ol-control.ol-mapzone button {\n position: relative;\n float: right;\n margin-top: 2.5em;\n}\n.ol-touch .ol-control.ol-mapzone button {\n margin-top: 1.67em;\n}\n.ol-control.ol-mapzone.ol-collapsed button {\n margin-top: 0;\n}\n\n.ol-control.ol-mapzone button i {\n border: .1em solid currentColor;\n border-radius: 50%;\n width: .9em;\n height: .9em; \n overflow: hidden;\n position: absolute;\n top: 50%;\n left: 50%;\n -webkit-transform: translate(-50%, -50%);\n transform: translate(-50%, -50%);\n}\n.ol-control.ol-mapzone button i:before {\n content: \"\";\n background-color: currentColor;\n width: 0.4em;\n height: .4em;\n position: absolute;\n left: .5em;\n top: 0.3em;\n border-radius: 50%;\n -webkit-box-shadow: .05em .3em 0 -.051em currentColor,\n \t-.05em -.35em 0 -.1em currentColor,\n \t-.5em -.35em 0 0em currentColor,\n \t-.65em .1em 0 -.03em currentColor,\n \t-.65em -.05em 0 -.05em currentColor;\n box-shadow: .05em .3em 0 -.051em currentColor,\n \t-.05em -.35em 0 -.1em currentColor,\n \t-.5em -.35em 0 0em currentColor,\n \t-.65em .1em 0 -.03em currentColor,\n \t-.65em -.05em 0 -.05em currentColor\n}\n\n.ol-mapzone > div {\n position: relative;\n display: inline-block;\n width: 5em;\n height: 5em;\n margin: 0 .2em 0 0;\n}\n.ol-mapzone > div:focus {\n -webkit-box-shadow: 0 0 0 0.2em #369;\n box-shadow: 0 0 0 0.2em #369;\n}\n.ol-control.ol-mapzone.ol-collapsed > div {\n display: none;\n}\n.ol-mapzone > div p {\n margin: 0;\n position: absolute;\n bottom: 0;\n /* background: rgba(255,255,255,.5); */\n color: #fff;\n font-weight: bold;\n text-align: center;\n width: 160%;\n overflow: hidden;\n font-family: 'Lucida Grande',Verdana,Geneva,Lucida,Arial,Helvetica,sans-serif;\n -webkit-transform: scaleX(.625);\n transform: scaleX(.625);\n -webkit-transform-origin: 0 0;\n transform-origin: 0 0;\n cursor: default;\n}\n\n.ol-notification {\n width: 150%;\n bottom: 0;\n border: 0;\n background: none;\n margin: 0;\n padding: 0;\n}\n.ol-notification > div,\n.ol-notification > div:hover {\n position: absolute;\n background-color: rgba(0,0,0,.8);\n color: #fff;\n bottom: 0;\n left: 33.33%;\n max-width: calc(66% - 4em);\n min-width: 5em;\n max-height: 5em;\n min-height: 1em;\n border-radius: 4px 4px 0 0;\n padding: .2em .5em;\n text-align: center;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n -webkit-transform: translateX(-50%);\n transform: translateX(-50%);\n -webkit-transition: .3s;\n transition: .3s;\n opacity: 1;\n}\n.ol-notification.ol-collapsed > div {\n bottom: -5em;\n opacity: 0;\n}\n\n.ol-notification a {\n color: #9cf;\n cursor: pointer;\n}\n\n.ol-notification .ol-close,\n.ol-notification .ol-close:hover {\n padding-right: 1.5em;\n}\n\n.ol-notification .closeBox {\n position: absolute;\n top: 0;\n right: 0.3em;\n}\n.ol-notification .closeBox:before {\n content: '\u0000d7';\n}\n.ol-overlay {\n position: absolute;\n top: 0;\n left: 0;\n width:100%;\n height: 100%;\n background-color: rgba(0,0,0,0.4);\n padding: 1em;\n color: #fff;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n z-index: 1;\n opacity: 0;\n display: none;\n cursor: default;\n overflow: hidden;\n -webkit-transition: all 0.5s;\n transition: all 0.5s;\n pointer-events: none;\n z-index: 9;\n}\n\n.ol-overlay.slide-up {\n transform: translateY(100%);\n -webkit-transform: translateY(100%);\n}\n.ol-overlay.slide-down {\n -webkit-transform: translateY(-100%);\n transform: translateY(-100%);\n}\n.ol-overlay.slide-left\n{\t-webkit-transform: translateX(-100%);\n transform: translateX(-100%);\n}\n.ol-overlay.slide-right {\n -webkit-transform: translateX(100%);\n transform: translateX(100%);\n}\n.ol-overlay.zoom {\n top: 50%;\n left: 50%;\n opacity:0.5;\n -webkit-transform: translate(-50%,-50%) scale(0);\n transform: translate(-50%,-50%) scale(0);\n}\n.ol-overlay.zoomout {\n -webkit-transform: scale(3);\n transform: scale(3);\n}\n.ol-overlay.zoomrotate {\n top: 50%;\n left: 50%;\n opacity:0.5;\n -webkit-transform: translate(-50%,-50%) scale(0) rotate(360deg);\n transform: translate(-50%,-50%) scale(0) rotate(360deg);\n}\n.ol-overlay.stretch {\n top: 50%;\n left: 50%;\n opacity:0.5;\n -webkit-transform: translate(-50%,-50%) scaleX(0);\n transform: translate(-50%,-50%) scaleX(0) ;\n}\n.ol-overlay.stretchy {\n top: 50%;\n left: 50%;\n opacity:0.5;\n -webkit-transform: translate(-50%,-50%) scaleY(0);\n transform: translate(-50%,-50%) scaleY(0) ;\n}\n.ol-overlay.wipe {\n opacity: 1;\n /* clip: must be set programmatically */\n /* clip-path: use % but not crossplatform (IE) */\n}\n.ol-overlay.flip {\n -webkit-transform: perspective(600px) rotateY(180deg);\n transform: perspective(600px) rotateY(180deg);\n}\n.ol-overlay.card {\n opacity: 0.5;\n -webkit-transform: translate(-80%, 100%) rotate(-0.5turn);\n transform: translate(-80%, 100%) rotate(-0.5turn);\n}\n.ol-overlay.book {\n -webkit-transform: perspective(600px) rotateY(-180deg) scaleX(0.6);\n transform: perspective(600px) rotateY(-180deg) scaleX(0.6) ;\n -webkit-transform-origin: 10% 50%;\n transform-origin: 10% 50%;\n}\n.ol-overlay.book.visible {\n -webkit-transform-origin: 10% 50%;\n transform-origin: 10% 50%;\n}\n\n.ol-overlay.ol-visible {\n opacity:1;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n -webkit-transform: none;\n transform: none;\n pointer-events: all; \n}\n\n.ol-overlay .ol-closebox {\n position: absolute;\n top: 1em;\n right: 1em;\n width: 1em;\n height: 1em;\n cursor: pointer;\n z-index:1;\n}\n.ol-overlay .ol-closebox:before {\n content: \"\u00BCc\";\n display: block;\n text-align: center;\n vertical-align: middle;\n}\n\n.ol-overlay .ol-fullscreen-image {\n position: absolute;\n top: 0;\n left: 0;\n bottom: 0;\n right: 0;\n}\n.ol-overlay .ol-fullscreen-image img {\n position: absolute;\n max-width: 100%;\n max-height: 100%;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n padding: 1em;\n top: 50%;\n left: 50%;\n -webkit-transform: translate(-50%, -50%);\n transform: translate(-50%, -50%);\n}\n.ol-overlay .ol-fullscreen-image.ol-has-title img {\n padding-bottom: 3em;\n}\n.ol-overlay .ol-fullscreen-image p {\n background-color: rgba(0,0,0,.5);\n padding: .5em;\n position: absolute;\n left: 0;\n right: 0;\n bottom: 0;\n margin: 0;\n text-align: center;\n}\n.ol-control.ol-overview\n{\tposition: absolute;\n\tleft: 0.5em;\n\ttext-align: left;\n\tbottom: 0.5em;\n}\n\n.ol-control.ol-overview .panel\n{\tdisplay:block;\n\twidth:150px;\n\theight:150px;\n\tmargin:2px;\n\tbackground-color:#fff;\n\tborder:1px solid #369;\n\tcursor: pointer;\n}\n\n.ol-overview:not(.ol-collapsed) button\n{\tposition:absolute;\n\tbottom:2px;\n\tleft:2px;\n\tz-index:2;\n}\n\n.ol-control.ol-overview.ol-collapsed .panel\n{\tdisplay:none;\n}\n\n.ol-overview.ol-collapsed button:before\n{\tcontent:'\u0000bb';\n}\n.ol-overview button:before\n{\tcontent:'\u0000ab';\n}\n\n\n.ol-control-right.ol-overview\n{\tleft: auto;\n\tright: 0.5em;\n}\n.ol-control-right.ol-overview:not(.ol-collapsed) button\n{\tleft:auto;\n\tright:2px;\n}\n.ol-control-right.ol-overview.ol-collapsed button:before\n{\tcontent:'\u0000ab';\n}\n.ol-control-right.ol-overview button:before\n{\tcontent:'\u0000bb';\n}\n\n.ol-control-top.ol-overview\n{\tbottom: auto;\n\ttop: 5em;\n}\n.ol-control-top.ol-overview:not(.ol-collapsed) button\n{\tbottom:auto;\n\ttop:2px;\n}\n\n.ol-permalink {\n position: absolute;\n top:0.5em;\n right: 2.5em;\n}\n.ol-touch .ol-permalink {\n right: 3em;\n}\n\n.ol-permalink button i {\n position: absolute;\n width: 1em;\n height: 1em;\n display: block;\n top: 50%;\n left: 50%;\n -webkit-transform: translate(-50%, -50%);\n transform: translate(-50%, -50%);\n}\n.ol-permalink button i:before {\n content: '\u001197';\n position: absolute;\n border: 1px solid currentColor;\n left: 0;\n top: 0;\n width: 0.3em;\n height: 1em;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n border-width: 1px 0 0 1px;\n padding: 0 0.2em;\n}\n.ol-permalink button i:after {\n content: '';\n position: absolute;\n border: 1px solid currentColor;\n right: 0;\n bottom: 0;\n width: 1em;\n height: 0.3em;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n border-width: 0 1px 1px 0;\n padding: 0.2em;\n}\n.ol-control.ol-print {\n top:.5em;\n left: 3em;\n}\n.ol-control.ol-print button:before {\n content: \"\";\n width: .9em;\n height: .35em;\n position: absolute;\n left: 50%;\n top: 50%;\n -webkit-transform: translateX(-50%);\n transform: translateX(-50%);\n -webkit-box-shadow: inset 0 0 0 0.1em, inset 0.55em 0, 0 0.2em 0 -0.1em;\n box-shadow: inset 0 0 0 0.1em, inset 0.55em 0, 0 0.2em 0 -0.1em;\n}\n.ol-control.ol-print button:after {\n content: \"\";\n width: .7em;\n height: .6em;\n position: absolute;\n left: 50%;\n top: 25%;\n -webkit-transform: translateX(-50%);\n transform: translateX(-50%);\n -webkit-box-shadow: inset 0 0 0 0.15em;\n box-shadow: inset 0 0 0 0.15em;\n}\n.ol-ext-print-dialog {\n width: 100%;\n height: 100%;\n}\n.ol-ext-print-dialog > form .ol-closebox {\n right: auto;\n left: 16.5em;\n z-index: 1;\n color: #999;\n}\n.ol-ext-print-dialog .ol-content[data-status=\"printing\"] {\n opacity: .5;\n}\n.ol-ext-print-dialog .ol-content .ol-error {\n display: none;\n background: #b00;\n color: yellow;\n text-align: center;\n padding: 1em .5em;\n font-weight: bold;\n margin: 0 -1em;\n}\n.ol-ext-print-dialog .ol-content[data-status=\"error\"] .ol-error {\n display: block;\n}\n\n.ol-ext-print-dialog > form,\n.ol-ext-print-dialog.ol-visible > form {\n -webkit-transition: none;\n transition: none;\n top: 1em;\n left: 1em;\n bottom: 1em;\n right: 1em;\n -webkit-transform: none;\n transform: none;\n max-width: 100%;\n max-height: 100%;\n background-color: #eee;\n padding: 0;\n width: unset;\n}\n.ol-ext-print-dialog .ol-print-map {\n position: absolute;\n top: 0;\n bottom: 0;\n right: 0;\n width: calc(100% - 18em);\n overflow: hidden;\n}\n.ol-ext-print-dialog .ol-print-map .ol-page {\n position: absolute;\n left: 50%;\n top: 50%;\n background: #fff;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n}\n.ol-ext-print-dialog .ol-print-map .ol-page.margin {\n -webkit-box-sizing: content-box;\n box-sizing: content-box;\n}\n.ol-ext-print-dialog .ol-map {\n width: 100%;\n height: 100%;\n}\n.ol-ext-print-dialog .ol-print-map .ol-control {\n display: none!important;\n}\n\n.ol-ext-print-dialog .ol-print-param {\n position: absolute;\n overflow-x: hidden;\n top: 0;\n bottom: 0;\n left: 0;\n width: 18em;\n background-color: #fff;\n padding: 1em;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n}\n\n.ol-ext-print-dialog .ol-print-param h2 {\n display: block;\n color: rgba(0,60,136,.7);\n font-size: 1.1em;\n}\n.ol-ext-print-dialog .ol-print-param ul {\n padding: 0;\n list-style: none;\n}\n.ol-ext-print-dialog .ol-print-param li {\n position: relative;\n margin: .5em 0;\n font-size: .9em;\n}\n.ol-ext-print-dialog .ol-print-param li.hidden {\n display: none;\n}\n.ol-ext-print-dialog .ol-print-param label {\n width: 8em;\n display: inline-block;\n vertical-align: middle;\n}\n\n.ol-ext-print-dialog select {\n outline: none;\n vertical-align: middle;\n}\n\n.ol-ext-print-dialog .ol-orientation {\n text-align: center;\n}\n.ol-ext-print-dialog .ol-orientation label {\n position: relative;\n width: 7em;\n cursor: pointer;\n}\n.ol-ext-print-dialog .ol-orientation input {\n position: absolute;\n opacity: 0;\n width: 0;\n height: 0;\n}\n.ol-ext-print-dialog .ol-orientation span {\n position: relative;\n width: 80%;\n display: block;\n padding: 3.5em 0 .2em;\n}\n.ol-ext-print-dialog .ol-orientation span:before {\n content: \"\";\n position: absolute;\n width: 2em;\n height: 2.6em;\n bottom: 1.5em;\n left: 50%;\n -webkit-transform: translateX(-50%);\n transform: translateX(-50%);\n color: #333;\n background-color: currentColor;\n border: 1px solid currentColor;\n border-radius: 0 1em 0 0;\n opacity: .5;\n overflow: hidden;\n -webkit-box-shadow: inset 1.3em -1.91em #ddd;\n box-shadow: inset 1.3em -1.91em #ddd;\n}\n\n.ol-ext-print-dialog .ol-orientation .landscape span:before {\n width: 2.6em;\n height: 2em;\n margin: .2em 0;\n -webkit-box-shadow: inset 1.91em -1.3em #ddd;\n box-shadow: inset 1.91em -1.3em #ddd;\n}\n.ol-ext-print-dialog .ol-orientation input:checked + span {\n opacity: 1;\n -webkit-box-shadow: 0 0 .2em rgba(0,0,0,.5);\n box-shadow: 0 0 .2em rgba(0,0,0,.5);\n}\n\n.ol-ext-print-dialog .ol-ext-toggle-switch span {\n position: absolute;\n right: -2em;\n top: 50%;\n -webkit-transform: translateY(-50%);\n transform: translateY(-50%);\n}\n\n.ol-print-title input[type=text] {\n margin-top: .5em;\n width: calc(100% - 6em);\n margin-left: 6em;\n}\n\n.ol-ext-print-dialog .ol-size option:first-child {\n font-style: italic;\n}\n\n.ol-ext-print-dialog .ol-saveas,\n.ol-ext-print-dialog .ol-savelegend {\n text-align: center;\n}\n.ol-ext-print-dialog .ol-saveas select,\n.ol-ext-print-dialog .ol-savelegend select {\n background-color: rgba(0,60,136,.7);\n color: #fff;\n padding: .5em;\n margin: 1em 0 0;\n font-size: 1em;\n border: 0;\n font-weight: bold;\n max-width: 12em;\n}\n.ol-ext-print-dialog .ol-saveas select option,\n.ol-ext-print-dialog .ol-savelegend select option {\n background-color: #fff;\n color: #666;\n}\n.ol-ext-print-dialog .ol-savelegend select {\n margin-top: 0;\n}\n\n.ol-ext-print-dialog .ol-ext-buttons {\n text-align: right;\n border-top: 1px solid #ccc;\n padding: .8em .5em;\n margin: 0 -1em;\n}\n.ol-ext-print-dialog button {\n font-size: 1em;\n margin: 0 .2em;\n border: 1px solid #999;\n background: none;\n padding: .3em 1em;\n color: #333;\n}\n.ol-ext-print-dialog button[type=\"submit\"] {\n background-color: rgba(0,60,136,.7);\n color: #fff;\n font-weight: bold;\n}\n\n.ol-ext-print-dialog .ol-clipboard-copy {\n position: absolute;\n pointer-events: none;\n top: 0;\n background-color: rgba(0,0,0,.5);\n color: #fff;\n padding: .5em 1em;\n border-radius: 1em;\n left: 50%;\n -webkit-transform: translateX(-50%);\n transform: translateX(-50%);\n width: -webkit-fit-content;\n width: -moz-fit-content;\n width: fit-content;\n -webkit-transition: 0s;\n transition: 0s;\n opacity: 0;\n}\n.ol-ext-print-dialog .ol-clipboard-copy.visible {\n -webkit-animation: 1s ol-clipboard-copy;\n animation: 1s ol-clipboard-copy;\n}\n.ol-ext-print-dialog .ol-print-map .ol-control.ol-canvas-control {\n display: block!important;\n}\n.ol-ext-print-dialog .ol-print-map .ol-control.ol-print-compass {\n display: block!important;\n}\n.ol-ext-print-dialog .ol-print-map .ol-control.olext-print-compass {\n top: 0;\n right: 0;\n width: 60px;\n height: 60px;\n margin: 20px;\n}\n\n/* Focus */\n.ol-ext-print-dialog .ol-orientation input:focus-visible + span,\n.ol-ext-print-dialog select:focus-visible {\n outline: 2px solid #000;\n}\n\n@-webkit-keyframes ol-clipboard-copy { \n 0% { opacity: 0; top: 0; }\n 80% { opacity: 1; top: -3em; }\n 100% { opacity: 0; top: -3em; } \n}\n\n@keyframes ol-clipboard-copy { \n 0% { opacity: 0; top: 0; }\n 80% { opacity: 1; top: -3em; }\n 100% { opacity: 0; top: -3em; } \n}\n\n@media print {\n body.ol-print-document {\n margin: 0!important;\n padding: 0!important;\n }\n body.ol-print-document > * {\n display: none!important;\n }\n body.ol-print-document > .ol-ext-print-dialog {\n display: block!important;\n }\n body.ol-print-document > .ol-ext-print-dialog .ol-content {\n max-height: unset!important;\n max-width: unset!important;\n width: unset!important;\n height: unset!important;\n }\n .ol-ext-print-dialog > form,\n .ol-ext-print-dialog {\n position: unset;\n -webkit-box-shadow: none;\n box-shadow: none;\n background: none!important;\n border: 0;\n }\n .ol-ext-print-dialog > form > *,\n .ol-ext-print-dialog .ol-print-param {\n display: none!important;\n background: none;\n } \n .ol-ext-print-dialog .ol-content {\n display: block!important;\n border: 0;\n background: none;\n }\n .ol-ext-print-dialog .ol-print-map {\n position: unset; \n background: none;\n width: auto;\n overflow: visible;\n }\n .ol-ext-print-dialog .ol-print-map .ol-page {\n -webkit-transform: none!important;\n transform: none!important;\n -webkit-box-shadow: none!important;\n box-shadow: none!important;\n position: unset;\n }\n}\n\n@media (max-width: 25em) {\n .ol-ext-print-dialog .ol-print-param {\n width: 13em;\n }\n .ol-ext-print-dialog .ol-print-map {\n width: calc(100% - 13em);\n }\n .ol-ext-print-dialog .ol-print-param .ol-print-title input[type=\"text\"] {\n width: 100%;\n margin: 0;\n }\n}\n.ol-ext-print-dialog2x .ol-map,\n.ol-ext-print-dialog2x .ol-map2 {\n width: 100%;\n height: 50%;\n}\n.ol-ext-print-dialog2x[data-orientation=\"landscape\"] .ol-map,\n.ol-ext-print-dialog2x[data-orientation=\"landscape\"] .ol-map2 {\n display: inline-block;\n width: 50%;\n height: 100%;\n}\n\n.ol-ext-print-dialog2x[data-clip-map] .ol-map,\n.ol-ext-print-dialog2x[data-swipe-orientation] .ol-map {\n width: 100%!important;\n height: 100%!important;\n}\n.ol-ext-print-dialog2x[data-clip-map] .ol-map2,\n.ol-ext-print-dialog2x[data-swipe-orientation] .ol-map2 {\n width: 100%!important;\n height: 100%!important;\n position: relative!important;\n left: 0;\n top: -100%;\n}\n.ol-profile {\n position: relative;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n.ol-control.ol-profile {\n position: absolute;\n top: 0.5em;\n right: 3em;\n text-align: right;\n overflow: hidden;\n}\n.ol-profile .ol-zoom-out {\n position: absolute;\n top: 10px;\n right: 10px;\n width: 1em;\n height: 1em;\n padding: 0;\n border: 1px solid #000;\n border-radius: 2px;\n cursor: pointer;\n}\n.ol-profile .ol-zoom-out:before {\n content: '';\n height: 2px;\n width: 60%;\n background: currentColor;\n position: absolute;\n left: 50%;\n top: 50%;\n -webkit-transform: translate(-50%, -50%);\n transform: translate(-50%, -50%);\n}\n\n.ol-profile .ol-inner {\n position: relative;\n padding: 0.5em;\n font-size: 0.8em;\n}\n.ol-control.ol-profile .ol-inner {\n display: block;\n background-color: rgba(255,255,255,0.7);\n margin: 2.3em 2px 2px;\n}\n.ol-control.ol-profile.ol-collapsed .ol-inner {\n display: none;\n}\n\n.ol-profile canvas {\n display: block;\n}\n.ol-profile button {\n display: block;\n position: absolute;\n right: 0;\n overflow: hidden;\n}\n.ol-profile button i {\n position: absolute;\n left: 50%;\n top: 50%;\n -webkit-transform: translate(-50%, -50%);\n transform: translate(-50%, -50%);\n width: 1em;\n height: 1em;\n overflow: hidden;\n}\n.ol-profile button i:before,\n.ol-profile button i:after {\n content: \"\";\n position: absolute;\n display: block;\n background-color: currentColor;\n width: 1em;\n height: .9em;\n -webkit-transform: scaleX(.8) translate(-.25em, .5em) rotate(45deg);\n transform: scaleX(.8) translate(-.25em, .5em) rotate(45deg);\n}\n.ol-profile button i:after {\n -webkit-transform: scaleX(.8) translate(.35em, .7em) rotate(45deg);\n transform: scaleX(.8) translate(.35em, .7em) rotate(45deg);\n}\n\n.ol-profile.ol-collapsed button {\n position: static;\n}\n\n.ol-profile .ol-profilebar,\n.ol-profile .ol-profilecursor {\n position:absolute;\n pointer-events: none;\n width: 1px;\n display: none;\n}\n.ol-profile .ol-profilecursor {\n width: 0;\n height: 0;\n}\n.ol-profile .ol-profilecursor:before {\n content:\"\";\n pointer-events: none;\n display: block;\n margin: -2px;\n width:5px;\n height:5px;\n}\n.ol-profile .ol-profilebar,\n.ol-profile .ol-profilecursor:before {\n background: red;\n}\n\n.ol-profile table {\n text-align: center;\n border-collapse: collapse; \n width: 100%;\n margin-top: 0.5em;\n}\n.ol-profile table tr {\n border-top: 1px solid rgba(0,0,0,.25);\n margin: 0.1em 0;\n}\n.ol-profile table td {\n padding: 2px;\n}\n\n.ol-profile table span {\n display: block;\n}\n.ol-profile table span.elevationGain,\n.ol-profile table span.elevationLoss {\n display: inline-block;\n}\n.ol-profilepopup {\n background-color: rgba(255, 255, 255, 0.5);\n margin: 0.5em;\n padding: 0 0.5em;\n position: absolute;\n top:-1em;\n white-space: nowrap;\n}\n.ol-profilepopup.ol-left {\n right:0;\n}\n\n.ol-profile table .track-info {\n display: table-row;\n}\n.ol-profile table .point-info {\n display: none;\n}\n.ol-profile .over table .track-info {\n display: none;\n}\n.ol-profile .over table .point-info {\n display: table-row;\n}\n\n.ol-profile p {\n text-align: center;\n margin:0;\n}\n\n.ol-control.ol-progress-bar {\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n padding: 0;\n pointer-events: none!important;\n background-color: transparent;\n}\n\n.ol-control.ol-progress-bar > .ol-bar {\n position: absolute;\n background-color: rgba(0,60,136,.5);\n left: 0;\n bottom: 0;\n height: .5em;\n width: 0;\n -webkit-transition: width .2s;\n transition: width .2s;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n}\n\n.ol-progress-bar > .ol-waiting {\n display: none;\n}\n\n.ol-viewport .ol-control.ol-progress-bar > .ol-waiting {\n position: absolute;\n top: 50%;\n left: 50%;\n -webkit-transform: translate(-50%, -50%);\n transform: translate(-50%, -50%);\n color: #fff;\n font-size: 2em;\n display: block;\n -webkit-animation: 1s linear infinite ol-progress-bar-blink;\n animation: 1s linear infinite ol-progress-bar-blink;\n}\n\n@-webkit-keyframes ol-progress-bar-blink {\n 0%, 30% {\n visibility: hidden;\n }\n 100% {\n visibility: visible;\n }\n}\n\n@keyframes ol-progress-bar-blink {\n 0%, 30% {\n visibility: hidden;\n }\n 100% {\n visibility: visible;\n }\n}\n\n.ol-control.ol-routing {\n top: 0.5em;\n left: 3em;\n max-height: 90%;\n overflow-y: auto;\n}\n.ol-touch .ol-control.ol-routing {\n left: 3.5em;\n}\n.ol-control.ol-routing.ol-searching {\n opacity: .5;\n}\n\n.ol-control.ol-routing .ol-car,\n.ol-control.ol-routing > button {\n position: relative;\n}\n.ol-control.ol-routing .ol-car:after,\n.ol-control.ol-routing > button:after {\n content: \"\";\n position: absolute;\n width: .78em;\n height: 0.6em;\n border-radius: 40% 50% 0 0 / 50% 70% 0 0;\n -webkit-box-shadow: inset 0 0 0 0.065em, -0.35em 0.14em 0 -0.09em, inset 0 -0.37em, inset -0.14em 0.005em;\n box-shadow: inset 0 0 0 0.065em, -0.35em 0.14em 0 -0.09em, inset 0 -0.37em, inset -0.14em 0.005em;\n clip: rect(0 1em .5em -1em);\n top: .35em;\n left: .4em;\n}\n.ol-control.ol-routing .ol-car:before,\n.ol-control.ol-routing > button:before {\n content: \"\";\n position: absolute;\n width: .28em;\n height: .28em;\n border-radius: 50%;\n -webkit-box-shadow: inset 0 0 0 1em, 0.65em 0;\n box-shadow: inset 0 0 0 1em, 0.65em 0;\n top: 0.73em;\n left: .20em;\n}\n.ol-control.ol-routing .ol-pedestrian:after {\n content: \"\";\n position: absolute;\n width: .3em;\n height: .4em;\n top: .25em;\n left: 50%;\n -webkit-transform: translateX(-50%);\n transform: translateX(-50%);\n -webkit-box-shadow: inset 0.3em 0, 0.1em 0.5em 0 -0.1em, -0.1em 0.5em 0 -0.1em, 0.25em 0.1em 0 -0.1em, -0.25em 0.1em 0 -0.1em;\n box-shadow: inset 0.3em 0, 0.1em 0.5em 0 -0.1em, -0.1em 0.5em 0 -0.1em, 0.25em 0.1em 0 -0.1em, -0.25em 0.1em 0 -0.1em;\n border-top: .2em solid transparent;\n}\n.ol-control.ol-routing .ol-pedestrian:before {\n content: \"\";\n position: absolute;\n width: .3em;\n height: .3em;\n top: .1em;\n left: 50%;\n -webkit-transform: translateX(-50%);\n transform: translateX(-50%);\n border-radius: 50%;\n background-color: currentColor;\n}\n\n.ol-control.ol-routing .content {\n margin: .5em;\n}\n\n.ol-control.ol-routing.ol-collapsed .content {\n display: none;\n}\n\n.ol-routing .ol-search.ol-collapsed ul {\n\tdisplay: none;\n}\n.ol-routing .ol-search ul .copy {\n display: none;\n}\n.ol-routing .ol-search ul.history {\n /* display: none; */\n}\n.ol-routing .content .search-input > div > * {\n display: inline-block;\n vertical-align: top;\n}\n.ol-routing .ol-result ul {\n list-style: none;\n display: block;\n}\n.ol-routing .ol-result li {\n position: relative;\n min-height: 1.65em;\n}\n.ol-routing .ol-result li i {\n display: block;\n font-size: .8em;\n font-weight: bold;\n}\n\n.ol-routing .ol-result li:before {\n content: \"\";\n border: 5px solid transparent;\n position: absolute;\n left: -1.75em;\n border-bottom-color: #369;\n border-width: .6em .4em .6em;\n -webkit-transform-origin: 50% 125%;\n transform-origin: 50% 125%;\n -webkit-box-shadow: 0 0.65em 0 -0.25em #369;\n box-shadow: 0 0.65em 0 -0.25em #369;\n top: -.8em;\n}\n.ol-routing .ol-result li:after {\n content: \"\";\n position: absolute;\n width: 0.25em;\n height: .6em;\n left: -1.5em;\n background: #369;\n top: .6em;\n border-radius: 0.1em;\n}\n.ol-routing .ol-result li.R:before {\n -webkit-transform: rotate(90deg);\n transform: rotate(90deg);\n}\n.ol-routing .ol-result li.FR:before {\n -webkit-transform: rotate(45deg);\n transform: rotate(45deg);\n}\n.ol-routing .ol-result li.L:before {\n -webkit-transform: rotate(-90deg);\n transform: rotate(-90deg);\n}\n.ol-routing .ol-result li.FL:before {\n -webkit-transform: rotate(-45deg);\n transform: rotate(-45deg);\n}\n\n.ol-routing .content > i {\n vertical-align: middle;\n margin: 0 .3em 0 .1em;\n font-style: normal;\n}\n.ol-routing .ol-button,\n.ol-routing .ol-button:focus,\n.ol-routing .ol-pedestrian,\n.ol-routing .ol-car {\n font-size: 1.1em;\n position: relative;\n display: inline-block;\n width: 1.4em;\n height: 1.4em;\n color: rgba(0,60,136,1);\n background-color: transparent;\n margin: 0 .1em;\n opacity: .5;\n vertical-align: middle;\n outline: none;\n cursor: pointer;\n}\n.ol-routing .ol-constraints {\n display: block;\n}\n\n.ol-routing .ol-button:hover,\n.ol-routing .ol-button.selected,\n.ol-routing i.selected {\n opacity: 1;\n background: transparent;\n}\n.ol-routing .ol-method {\n display: block;\n}\n\n\n.ol-control.ol-routing {\n background-color: rgba(255,255,255,.25);\n}\n.ol-control.ol-routing:hover {\n background-color: rgba(255,255,255,.75);\n}\n\n.search-input > div > button:before {\n content: '\u0000b1';\n}\n.ol-viewport .ol-scale {\n\tleft: .5em;\n\tbottom: 2.5em;\n\ttext-align: center;\n\t-webkit-transform: scaleX(.8);\n\t-webkit-transform-origin: 0 0;\n\ttransform: scaleX(.8);\n\ttransform-origin: 0 0;\n\tbackground-color: rgba(255, 255, 255, 0.75);\n}\n.ol-viewport .ol-scale input {\n\tbackground: none;\n border: 0;\n width: 8em;\n text-align: center;\n}\n\n.ol-search{\n top: 0.5em;\n left: 3em;\n}\n.ol-touch .ol-search {\n left: 3.5em;\n}\n.ol-search button {\n top: 2px;\n left: 2px;\n float: left;\n}\n.ol-control.ol-search > button:before {\n content: \"\";\n position: absolute;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: .7em;\n height: .7em;\n background-color: transparent;\n border: .12em solid currentColor;\n border-radius: 100%;\n top: .35em;\n left: .35em;\n}\n.ol-control.ol-search > button:after {\n content: \"\";\n position: absolute;\n top: 1.1em;\n left: .95em;\n width: .45em;\n height: .15em;\n background-color: currentColor;\n border-radius: .05em;\n -webkit-transform: rotate(45deg);\n transform: rotate(45deg);\n -webkit-box-shadow: -0.18em 0 0 -0.03em;\n box-shadow: -0.18em 0 0 -0.03em;\n}\n\n.ol-search button.ol-revers {\n float: none;\n background-image: none;\n display: inline-block;\n vertical-align: bottom;\n position: relative;\n top: 0;\n left: 0;\n}\n.ol-search.ol-revers button.ol-revers {\n background-color: rgba(0,136,60,.5)\n}\n\n.ol-control.ol-search.ol-collapsed button.ol-revers {\n display: none;\n}\n.ol-search button.ol-revers:before {\n content: \"\";\n border: .1em solid currentColor;\n position: absolute;\n left: 50%;\n top: 50%;\n -webkit-transform: translate(-50%,-50%);\n transform: translate(-50%,-50%);\n border-radius: 50%;\n width: .55em;\n height: .55em;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n}\n.ol-search button.ol-revers:after {\n content: \"\";\n position: absolute;\n left: 50%;\n top: 50%;\n -webkit-transform: translate(-50%,-50%);\n transform: translate(-50%,-50%);\n width: .2em;\n height: .2em;\n background-color: transparent;\n -webkit-box-shadow: .35em 0 currentColor, 0 .35em currentColor, -.35em 0 currentColor, 0 -.35em currentColor;\n box-shadow: .35em 0 currentColor, 0 .35em currentColor, -.35em 0 currentColor, 0 -.35em currentColor;\n}\n\n.ol-search input {\n display: inline-block;\n border: 0;\n margin: 1px 1px 1px 2px;\n font-size: 1.14em;\n padding-left: 0.3em;\n height: 1.375em;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n -webkit-transition: all 0.1s;\n transition: all 0.1s;\n}\n.ol-touch .ol-search input,\n.ol-touch .ol-search ul {\n font-size: 1.5em;\n}\n.ol-search.ol-revers > ul,\n.ol-control.ol-search.ol-collapsed > * {\n display: none;\n}\n.ol-control.ol-search.ol-collapsed > button {\n display: block;\n}\n\n.ol-search ul {\n list-style: none;\n padding: 0;\n margin: 0;\n display: block;\n clear: both;\n cursor: pointer;\n max-width: 17em;\n overflow-x: hidden;\n z-index: 1;\n background: #fff;\n}\n/*\n.ol-control.ol-search ul {\n position: absolute;\n box-shadow: 5px 5px 5px rgba(0,0,0,0.5);\n}\n*/\n.ol-search ul li {\n padding: 0.1em 0.5em;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.ol-search ul li.select,\n.ol-search ul li:hover {\n background-color: rgba(0,60,136,.5);\n color: #fff;\n}\n.ol-search ul li img {\n float: left;\n max-height: 2em;\n}\n.ol-search li.copy {\n background: rgba(0,0,0,.5);\n color: #fff;\n}\n.ol-search li.copy a {\n color: #fff;\n text-decoration: none;\n}\n\n.ol-search.searching:before {\n content: '';\n position: absolute;\n height: 3px;\n left: 0;\n top: 1.6em;\n -webkit-animation: ol-pulse .5s infinite alternate linear;\n animation: ol-pulse .5s infinite alternate linear;\n background: red;\n z-index: 2;\n}\n\n@-webkit-keyframes ol-pulse {\n 0% { left:0; right: 95%; }\n 50% {\tleft: 30%; right: 30%; }\n 100% {\tleft: 95%; right: 0; }\n}\n\n@keyframes ol-pulse {\n 0% { left:0; right: 95%; }\n 50% {\tleft: 30%; right: 30%; }\n 100% {\tleft: 95%; right: 0; }\n}\n\n\n.ol-control.ol-search.IGNF-parcelle {\n background-color: rgba(255,255,255,.7);\n padding-bottom: .2em;\n}\n.ol-search.IGNF-parcelle input {\n width: 14.5em;\n}\n.ol-search.IGNF-parcelle input:-moz-read-only {\n background: #ccc;\n opacity: .8;\n}\n.ol-search.IGNF-parcelle input:read-only {\n background: #ccc;\n opacity: .8;\n}\n.ol-search.IGNF-parcelle.ol-collapsed-list > ul.autocomplete {\n display: none;\n}\n\n.ol-search.IGNF-parcelle label {\n display: block;\n clear: both;\n}\n\n.ol-search.IGNF-parcelle > div input {\n text-align: right;\n}\n.ol-search.IGNF-parcelle > div input,\n.ol-search.IGNF-parcelle > div label {\n width: 4em;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n display: inline-block;\n margin: .1em;\n font-size: 1em;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.ol-search.IGNF-parcelle > div label {\n letter-spacing: -0.04em;\n}\n.ol-search.IGNF-parcelle ul.autocomplete-page {\n margin-top:.5em;\n width:100%;\n text-align: center;\n display: none;\n}\n.ol-search.IGNF-parcelle.ol-collapsed-list ul.autocomplete-parcelle,\n.ol-search.IGNF-parcelle.ol-collapsed-list ul.autocomplete-page {\n display: block;\n}\n.ol-search.IGNF-parcelle.ol-collapsed ul.autocomplete-page,\n.ol-search.IGNF-parcelle.ol-collapsed ul.autocomplete-parcelle,\n.ol-search.IGNF-parcelle ul.autocomplete-parcelle {\n display: none;\n}\n.ol-search.IGNF-parcelle ul.autocomplete-page li {\n display: inline-block;\n color: #fff;\n background: rgba(0,60,136,.5);\n border-radius: 50%;\n width: 1.3em;\n height: 1.3em;\n padding: .1em;\n margin: 0 .1em;\n}\n.ol-search.IGNF-parcelle ul.autocomplete-page li.selected {\n background: rgba(0,60,136,1);\n}\n\n/* GPS */\n.ol-searchgps input.search,\n.ol-searchcoord input.search {\n display: none;\n}\n.ol-control.ol-searchgps > button:first-child,\n.ol-control.ol-searchcoord > button:first-child {\n background-image: none;\n}\n.ol-control.ol-searchgps > button:first-child:before,\n.ol-control.ol-searchcoord > button:first-child:before {\n content: \"x/y\";\n position: unset;\n display: block;\n -webkit-transform: scaleX(.8);\n transform: scaleX(.8);\n border: unset;\n border-radius: 0;\n width: auto;\n height: auto;\n}\n.ol-control.ol-searchgps > button:first-child:after,\n.ol-control.ol-searchcoord > button:first-child:after {\n content: unset;\n}\n.ol-control.ol-searchgps .ol-latitude,\n.ol-control.ol-searchgps .ol-longitude,\n.ol-control.ol-searchcoord .ol-latitude,\n.ol-control.ol-searchcoord .ol-longitude {\n clear: both;\n}\n.ol-control.ol-searchgps .ol-latitude label,\n.ol-control.ol-searchgps .ol-longitude label,\n.ol-control.ol-searchcoord .ol-latitude label,\n.ol-control.ol-searchcoord .ol-longitude label {\n width: 5.5em;\n display: inline-block;\n text-align: right;\n -webkit-transform: scaleX(.8);\n transform: scaleX(.8);\n margin: 0 -.8em 0 0;\n -webkit-transform-origin: 0 0;\n transform-origin: 0 0;\n}\n.ol-control.ol-searchcoord .ol-latitude label,\n.ol-control.ol-searchcoord .ol-longitude label {\n width: 2em;\n margin: 0;\n}\n.ol-control.ol-searchgps .ol-latitude input,\n.ol-control.ol-searchgps .ol-longitude input {\n max-width: 10em;\n}\n\n.ol-control.ol-searchgps .ol-ext-toggle-switch {\n cursor: pointer;\n float: right;\n margin: .5em;\n font-size: .9em;\n}\n\n.ol-searchgps .ol-decimal{\n display: inline-block;\n margin-right: .7em;\n}\n.ol-searchgps .ol-dms,\n.ol-searchgps.ol-dms .ol-decimal {\n display: none;\n width: 3em;\n text-align: right;\n}\n.ol-searchgps.ol-dms .ol-dms {\n display: inline-block;\n}\n\n.ol-searchgps span.ol-dms {\n width: .5em;\n text-align: left;\n}\n.ol-searchgps.ol-control.ol-collapsed button.ol-geoloc,\n.ol-searchgps.ol-control.ol-collapsed button.ol-centerloc,\n.ol-searchcoord.ol-control.ol-collapsed button.ol-centerloc,\n.ol-searchcoord.ol-control.ol-collapsed button.ol-geoloc {\n display: none;\n}\n.ol-searchgps button.ol-geoloc,\n.ol-searchgps button.ol-centerloc,\n.ol-searchcoord button.ol-centerloc,\n.ol-searchcoord button.ol-geoloc {\n top: 0;\n float: right;\n margin-right: 3px;\n background-image: none;\n position: relative;\n}\n.ol-searchgps button.ol-geoloc:before,\n.ol-searchcoord button.ol-geoloc:before {\n content:\"\";\n position: absolute;\n left: 50%;\n top: 50%;\n width: .6em;\n height: .6em;\n border: .1em solid currentColor;\n border-radius: 50%;\n -webkit-transform: translate(-50%,-50%);\n transform: translate(-50%,-50%);\n}\n.ol-searchgps button.ol-geoloc:after,\n.ol-searchcoord button.ol-geoloc:after {\n content:\"\";\n position: absolute;\n left: 50%;\n top: 50%;\n width: .2em;\n height: .2em;\n background-color: transparent;\n -webkit-transform: translate(-50%,-50%);\n transform: translate(-50%,-50%);\n -webkit-box-shadow:\n .45em 0 currentColor, -.45em 0 currentColor, 0 -.45em currentColor, 0 .45em currentColor,\n .25em 0 currentColor, -.25em 0 currentColor, 0 -.25em currentColor, 0 .25em currentColor;\n box-shadow:\n .45em 0 currentColor, -.45em 0 currentColor, 0 -.45em currentColor, 0 .45em currentColor,\n .25em 0 currentColor, -.25em 0 currentColor, 0 -.25em currentColor, 0 .25em currentColor;\n}\n\n.ol-searchgps button.ol-centerloc:before,\n.ol-searchcoord button.ol-centerloc:before {\n content: \"\uD83D\uDCCD\";\n border: 0;\n width: auto;\n height: auto;\n padding: 0;\n top: 50%;\n left: 50%;\n -webkit-transform: translate(-50%, -50%);\n transform: translate(-50%, -50%);\n}\n.ol-searchgps button.ol-centerloc:after,\n.ol-searchcoord button.ol-centerloc:after {\n display: none;\n}\n.ol-control.ol-select {\n top: .5em;\n left: 3em;\n background-color: rgba(255,255,255,.5);\n}\n.ol-control.ol-select:hover {\n background-color: rgba(255,255,255,.7);\n}\n.ol-touch .ol-control.ol-select {\n left: 3.5em;\n}\n.ol-control.ol-select > button:before {\n content: \"A\";\n font-size: .6em;\n font-weight: normal;\n position: absolute;\n -webkit-box-sizing: content-box;\n box-sizing: content-box;\n width: 1em;\n height: 1em;\n background-color: transparent;\n border: .2em solid currentColor;\n border-radius: 100%;\n top: .5em;\n left: .5em;\n line-height: 1em;\n text-align: center;\n}\n.ol-control.ol-select > button:after {\n content: \"\";\n position: absolute;\n top: 1.15em;\n left: 1em;\n width: .45em;\n height: .15em;\n background-color: currentColor;\n border-radius: .05em;\n -webkit-transform: rotate(45deg);\n transform: rotate(45deg);\n -webkit-box-shadow: -0.18em 0 0 -0.03em;\n box-shadow: -0.18em 0 0 -0.03em;\n}\n.ol-select > div button {\n width: auto;\n padding: 0 .5em;\n float: right;\n font-weight: normal;\n height: 1.2em;\n line-height: 1.2em;\n}\n.ol-select .ol-delete {\n width: 1.5em;\n height: 1em;\n vertical-align: middle;\n display: inline-block;\n position: relative;\n cursor: pointer;\n}\n.ol-select .ol-delete:before {\n content:'\u0000d7';\n position: absolute;\n top: 50%;\n left: 50%;\n -webkit-transform: translate(-50%, -50%);\n transform: translate(-50%, -50%);\n width: 100%;\n text-align: center;\n font-weight: bold;\n}\n.ol-control.ol-select input {\n font-size: 1em;\n}\n.ol-control.ol-select select {\n font-size: 1em;\n max-width: 10em;\n}\n.ol-control.ol-select select option.ol-default {\n color: #999;\n font-style: italic;\n}\n.ol-control.ol-select > div {\n display: block;\n margin: .25em;\n}\n.ol-control.ol-select.ol-collapsed > div {\n display: none;\n}\n\n.ol-control.ol-select.ol-select-check {\n max-width: 20em;\n}\n.ol-control.ol-select label.ol-ext-check {\n margin-right: 1em;\n}\n.ol-control.ol-select label.ol-ext-toggle-switch span {\n font-size: 1.1em;\n}\n\n.ol-select ul {\n list-style: none;\n margin: 0;\n padding: 0;\n}\n.ol-control.ol-select input[type=\"search\"],\n.ol-control.ol-select input[type=\"text\"] {\n width: 8em;\n}\n\n.ol-select .ol-autocomplete {\n display: inline;\n}\n.ol-select .ol-autocomplete ul {\n position: absolute;\n display: block;\n background: #fff;\n border: 1px solid #999;\n min-width: 10em;\n font-size: .85em;\n}\n.ol-select .ol-autocomplete ul li {\n padding: 0 .5em;\n}\n.ol-select .ol-autocomplete ul li:hover {\n color: #fff;\n background: rgba(0,60,136,.5);\n}\n.ol-select ul.ol-hidden {\n display: none;\n}\n\n.ol-select-multi li > div:hover,\n.ol-select-multi li > div.ol-control.ol-select {\n position: relative;\n top: unset;\n left: unset;\n background: transparent;\n}\n.ol-select-multi li > div > button,\n.ol-select-multi li > div .ol-ok {\n display: none;\n}\n.ol-select-multi li .ol-control.ol-select.ol-collapsed > div,\n.ol-select-multi li > div > div {\n display: block;\n}\n\n.ol-control.ol-status {\n top: 0;\n left: 0;\n background: rgba(0,0,0,.2);\n color: #fff;\n font-size: .9em;\n padding: .3em 3em;\n border-radius: 0;\n width: 100%;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n pointer-events: none!important;\n display: none;\n}\n.ol-control.ol-status.ol-visible {\n display: initial;\n}\n.ol-control.ol-status.ol-bottom {\n top: auto;\n bottom: 0;\n}\n.ol-control.ol-status.ol-left {\n top: 0;\n bottom: 0;\n padding: .3em .5em .3em 3em;\n width: auto;\n}\n.ol-control.ol-status.ol-right {\n top: 0;\n bottom: 0;\n left: auto;\n right: 0;\n padding: .3em 3em .3em .5em;\n width: auto;\n}\n.ol-control.ol-status.ol-center {\n top: 50%;\n -webkit-transform: translateY(-50%);\n transform: translateY(-50%);\n}\n\n.ol-control.ol-storymap {\n top: .5em;\n left: .5em;\n bottom: .5em;\n max-width: 35%;\n border-radius: .5em;\n position: absolute;\n height: auto;\n background-color: rgba(255,255,255,.5);\n}\n.ol-storymap {\n overflow: hidden;\n padding: 0;\n height: 100%;\n position: relative;\n}\n.ol-storymap > div {\n overflow: hidden;\n padding: 0;\n height: 100%;\n position: relative;\n scroll-behavior: smooth;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n.ol-storymap >div.ol-move {\n scroll-behavior: unset;\n}\n\n.ol-control.ol-storymap .chapter {\n position: relative;\n padding: .5em;\n overflow: hidden;\n}\n.ol-control.ol-storymap .chapter:last-child {\n margin-bottom: 100%;\n}\n.ol-storymap .chapter {\n cursor: pointer;\n opacity: .4;\n}\n.ol-storymap .chapter.ol-select {\n cursor: default;\n opacity: 1;\n background-color: rgba(255,255,255,.8);\n}\n\n.ol-storymap .ol-scroll-top,\n.ol-storymap .ol-scroll-next {\n position: relative;\n min-height: 1.7em;\n color: rgba(0,60,136,.5);\n text-align: center;\n cursor: pointer;\n}\n.ol-storymap .ol-scroll-next span {\n padding-bottom: 1.4em;\n display: block;\n}\n.ol-storymap .ol-scroll-top span {\n padding-top: 1.4em;\n display: block;\n}\n\n.ol-storymap .ol-scroll-top:before,\n.ol-storymap .ol-scroll-next:before {\n content: \"\";\n border: .3em solid currentColor;\n border-radius: .3em;\n border-color: transparent currentColor currentColor transparent;\n width: .8em;\n height: .8em;\n display: block;\n position: absolute;\n left: 50%;\n -webkit-transform: translateX(-50%) rotate(45deg);\n transform: translateX(-50%) rotate(45deg);\n -webkit-animation: ol-bounce-bottom 0.35s linear infinite alternate;\n animation: ol-bounce-bottom 0.35s linear infinite alternate;\n pointer-events: none;\n}\n.ol-storymap .ol-scroll-top:before {\n border-color: currentColor transparent transparent currentColor;\n -webkit-animation: ol-bounce-top 0.35s linear infinite alternate;\n animation: ol-bounce-top 0.35s linear infinite alternate;\n}\n\n@-webkit-keyframes ol-bounce-top{\n from {top: -.2em;}\n to {top: .5em;}\n}\n\n@keyframes ol-bounce-top{\n from {top: -.2em;}\n to {top: .5em;}\n}\n@-webkit-keyframes ol-bounce-bottom{\n from {bottom: -.2em;}\n to {bottom: .5em;}\n}\n@keyframes ol-bounce-bottom{\n from {bottom: -.2em;}\n to {bottom: .5em;}\n}\n\n.ol-storymap img[data-title] {\n cursor: pointer;\n}\n\n/* scrollLine / scrollbox */\n.ol-storymap.scrollLine,\n.ol-storymap.scrollBox {\n top: 0;\n bottom: 0;\n background-color: transparent;\n border-radius: 0;\n max-width: 40%;\n}\n.ol-storymap.scrollLine .chapter,\n.ol-storymap.scrollBox .chapter {\n background-color: #fff;\n margin: 100% 0;\n}\n.ol-storymap.scrollLine .chapter:first-child,\n.ol-storymap.scrollBox .chapter:first-child {\n margin-top: 3em;\n}\n.ol-storymap.scrollLine .chapter.ol-select,\n.ol-storymap.scrollLine .chapter,\n.ol-storymap.scrollBox .chapter.ol-select,\n.ol-storymap.scrollBox .chapter {\n opacity: 1;\n}\n\n.ol-storymap.scrollLine .ol-scrolldiv,\n.ol-storymap.scrollBox .ol-scrolldiv {\n padding-right: 30px;\n}\n.ol-storymap.scrollLine:before,\n.ol-storymap.scrollBox:before {\n content: \"\";\n position: absolute;\n width: 2px;\n height: 100%;\n top: 0;\n bottom: 0;\n right: 14px;\n background-color: #fff;\n}\n\n.ol-storymap.scrollLine .ol-scroll,\n.ol-storymap.scrollBox .ol-scroll {\n display: block!important;\n padding: 0;\n width: 1px;\n opacity: 1!important;\n right: 15px;\n overflow: visible;\n -webkit-transition: none;\n transition: none;\n}\n.ol-storymap.scrollLine .ol-scroll > div {\n background-color: transparent;\n overflow: visible;\n left: 50%;\n -webkit-transform: translateX(-50%);\n transform: translateX(-50%);\n -webkit-box-shadow: unset;\n box-shadow: unset;\n}\n.ol-storymap.scrollLine .ol-scroll > div:before {\n content: \"\";\n position: absolute;\n width: 10px;\n height: 10px;\n border-radius: 50%;\n background-color: #0af;\n border: 2px solid #fff;\n left: 50%;\n top: 50%;\n -webkit-transform: translate(-50%, -50%);\n transform: translate(-50%, -50%);\n}\n\n.ol-storymap.scrollBox .ol-scroll > div {\n display: none;\n}\n.ol-storymap.scrollBox .chapter:after {\n content: \"\";\n width: 20px;\n height: 20px;\n position: absolute;\n top: Min(30%, 5em);\n right: -24.5px;\n -webkit-box-shadow: 0 0 0 2px #fff, inset 0 0 0 15px #0af;\n box-shadow: 0 0 0 2px #fff, inset 0 0 0 15px #0af; \n border-radius: 50%;\n border: 5px solid transparent;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n z-index: 1;\n}\n\n.ol-swipe {\n position: absolute;\n top: 50%;\n left: 50%;\n -webkit-transform: translate(-50%, -50%);\n transform: translate(-50%, -50%);\n -ms-touch-action: none;\n touch-action: none;\n}\n\n.ol-swipe:before {\n content: \"\";\n position: absolute;\n top: -5000px;\n bottom: -5000px;\n left: 50%;\n width: 4px;\n background: #fff;\n z-index:-1;\n -webkit-transform: translate(-2px, 0);\n transform: translate(-2px, 0);\n}\n.ol-swipe.horizontal:before {\n left: -5000px;\n right: -5000px;\n top: 50%;\n bottom: auto;\n width: auto;\n height: 4px;\n}\n\n.ol-swipe,\n.ol-swipe button {\n cursor: ew-resize;\n}\n.ol-swipe.horizontal,\n.ol-swipe.horizontal button {\n cursor: ns-resize;\n}\n\n.ol-swipe:after,\n.ol-swipe button:before,\n.ol-swipe button:after {\n content: \"\";\n position: absolute;\n top: 25%;\n bottom: 25%;\n left: 50%;\n width: 2px;\n background: currentColor;\n transform: translate(-1px, 0);\n -webkit-transform: translate(-1px, 0);\n}\n.ol-swipe button:after {\n -webkit-transform: translateX(4px);\n transform: translateX(4px);\n}\n.ol-swipe button:before {\n -webkit-transform: translateX(-6px);\n transform: translateX(-6px);\n}\n\n.ol-control.ol-timeline {\n bottom: 0;\n left: 0;\n right: 0;\n -webkit-transition: .3s;\n transition: .3s;\n background-color: rgba(255,255,255,.4);\n}\n.ol-control.ol-timeline.ol-collapsed {\n -webkit-transform: translateY(100%);\n transform: translateY(100%);\n}\n.ol-timeline {\n overflow: hidden;\n padding: 2px 0 0;\n}\n.ol-timeline .ol-scroll {\n overflow: hidden;\n padding: 0;\n scroll-behavior: smooth;\n line-height: 1em;\n height: 6em;\n padding: 0 50%;\n}\n.ol-timeline .ol-scroll.ol-move {\n scroll-behavior: unset;\n}\n\n.ol-timeline.ol-hasbutton .ol-scroll {\n margin-left: 1.5em;\n padding: 0 calc(50% - .75em);\n}\n.ol-timeline .ol-buttons {\n display: none;\n position: absolute;\n top: 0;\n background: rgba(255,255,255,.5);\n width: 1.5em;\n bottom: 0;\n left: 0;\n z-index: 10;\n}\n.ol-timeline.ol-hasbutton .ol-buttons {\n display: block;\n}\n.ol-timeline .ol-buttons button {\n font-size: 1em;\n margin: 1px;\n position: relative;\n}\n.ol-timeline .ol-buttons .ol-zoom-in:before,\n.ol-timeline .ol-buttons .ol-zoom-out:before {\n content: \"+\";\n position: absolute;\n top: 50%;\n left: 50%;\n -webkit-transform: translate(-50%, -50%);\n transform: translate(-50%, -50%);\n}\n.ol-timeline .ol-buttons .ol-zoom-out:before{\n content: '\u2212';\n}\n\n.ol-timeline .ol-scroll > div {\n height: 100%;\n position: relative;\n}\n\n.ol-timeline .ol-scroll .ol-times {\n background: rgba(255,255,255,.5);\n height: 1em;\n bottom: 0;\n position: absolute;\n left: -1000px;\n right: -1000px;\n}\n.ol-timeline .ol-scroll .ol-time {\n position: absolute;\n font-size: .7em;\n color: #999;\n bottom: 0;\n -webkit-transform: translateX(-50%);\n transform: translateX(-50%);\n}\n.ol-timeline .ol-scroll .ol-time.ol-year {\n color: #666;\n z-index: 1;\n}\n.ol-timeline .ol-scroll .ol-time:before {\n content: \"\";\n position: absolute;\n bottom: 1.2em;\n left: 50%;\n height: 500px;\n border-left: 1px solid currentColor;\n}\n\n.ol-timeline .ol-scroll .ol-features {\n position: absolute;\n top: 0;\n bottom: 1em;\n left: -200px;\n right: -1000px;\n margin: 0 0 0 200px;\n overflow: hidden;\n}\n\n.ol-timeline .ol-scroll .ol-feature {\n position: absolute;\n font-size: .7em;\n color: #999;\n top: 0;\n background: #fff;\n max-width: 3em;\n max-height: 2.4em;\n min-height: 1em;\n line-height: 1.2em;\n border: 1px solid #ccc;\n overflow: hidden;\n padding: 0 .5em 0 0;\n -webkit-transition: all .3s;\n transition: all .3s;\n cursor: pointer;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n}\n\n.ol-timeline.ol-zoomhover .ol-scroll .ol-feature:hover,\n.ol-timeline.ol-zoomhover .ol-scroll .ol-feature.ol-select {\n z-index: 1;\n -webkit-transform: scale(1.2);\n transform: scale(1.2);\n background: #eee;\n /* max-width: 14em!important; */\n}\n\n/* Center */\n.ol-timeline .ol-center-date {\n display: none;\n position: absolute;\n left: 50%;\n height: 100%;\n width: 2px;\n bottom: 0;\n z-index: 2;\n pointer-events: none;\n -webkit-transform: translateX(-50%);\n transform: translateX(-50%);\n background-color: #f00;\n opacity: .4;\n}\n.ol-timeline.ol-hasbutton .ol-center-date {\n left: calc(50% + .75em);\n}\n\n/* Show center */ \n.ol-timeline.ol-pointer .ol-center-date {\n display: block;\n}\n.ol-timeline.ol-pointer .ol-center-date:before, \n.ol-timeline.ol-pointer .ol-center-date:after {\n content: '';\n border: 0.3em solid transparent;\n border-width: .3em .25em;\n position: absolute;\n left: 50%;\n -webkit-transform: translateX(-50%);\n transform: translateX(-50%);\n}\n.ol-timeline.ol-pointer .ol-center-date:before {\n border-top-color: #f00;\n top: 0;\n}\n.ol-timeline.ol-pointer .ol-center-date:after {\n border-bottom-color: #f00;\n bottom: 0\n}\n\n/* show interval */\n.ol-timeline.ol-interval .ol-center-date {\n display: block;\n background-color: transparent;\n border: 0 solid #000;\n border-width: 0 10000px;\n -webkit-box-sizing: content-box;\n box-sizing: content-box;\n opacity: .2;\n}\n.ol-control.ol-videorec {\n top: 0;\n left: 50%;\n -webkit-transform: translateX(-50%);\n transform: translateX(-50%);\n white-space: nowrap;\n}\n\n.ol-control.ol-videorec button {\n position: relative;\n display: inline-block;\n vertical-align: middle;\n}\n\n.ol-control.ol-videorec button:before {\n content: \"\";\n position: absolute;\n top: 50%;\n left: 50%;\n width: .8em;\n height: .8em;\n -webkit-transform: translate(-50%, -50%);\n transform: translate(-50%, -50%);\n background-color: currentColor;\n}\n.ol-control.ol-videorec button.ol-start:before {\n width: .9em;\n height: .9em;\n border-radius: 50%;\n background-color: #c00;\n}\n.ol-control.ol-videorec button.ol-pause:before {\n width: .2em;\n background-color: transparent;\n -webkit-box-shadow: -.2em 0, .2em 0;\n box-shadow: -.2em 0, .2em 0;\n}\n.ol-control.ol-videorec button.ol-resume:before {\n border-style: solid;\n background: transparent;\n width: auto;\n border-width: .4em 0 .4em .6em;\n border-color: transparent transparent transparent currentColor;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n}\n\n.ol-control.ol-videorec button.ol-stop,\n.ol-control.ol-videorec button.ol-pause,\n.ol-control.ol-videorec button.ol-resume,\n.ol-control.ol-videorec[data-state=\"rec\"] .ol-start,\n.ol-control.ol-videorec[data-state=\"pause\"] .ol-start {\n display: none;\n}\n.ol-control.ol-videorec[data-state=\"rec\"] .ol-stop,\n.ol-control.ol-videorec[data-state=\"pause\"] .ol-stop,\n.ol-control.ol-videorec[data-state=\"rec\"] .ol-pause,\n.ol-control.ol-videorec[data-state=\"pause\"] .ol-resume {\n display: inline-block;\n}\n\n.ol-control.ol-wmscapabilities {\n top: .5em;\n right: 2.5em;\n}\n.ol-touch .ol-control.ol-wmscapabilities {\n right: 3em;\n}\n.ol-control.ol-wmscapabilities.ol-hidden {\n display: none;\n}\n.ol-control.ol-wmscapabilities button:before {\n content: \"+\";\n position: absolute;\n top: calc(50% - .35em);\n left: 50%;\n -webkit-transform: translate(-50%, -50%);\n transform: translate(-50%, -50%);\n}\n.ol-control.ol-wmscapabilities button:after {\n content: \"\";\n width: .75em;\n height: .75em;\n position: absolute;\n background: transparent;\n top: calc(50% - .05em);\n left: 50%;\n -webkit-transform: scaleY(.6) translate(-50%, -50%) rotate(45deg);\n transform: scaleY(.6) translate(-50%, -50%) rotate(45deg);\n -webkit-box-shadow: inset -.18em -.18em currentColor, -.4em .1em 0 -.25em currentColor, .1em -.35em 0 -.25em currentColor, .15em .15em currentColor;\n box-shadow: inset -.18em -.18em currentColor, -.4em .1em 0 -.25em currentColor, .1em -.35em 0 -.25em currentColor, .15em .15em currentColor;\n border-radius: .1em 0;\n border: .15em solid transparent;\n border-width: 0 .15em .15em 0;\n}\n\n.ol-wmscapabilities .ol-searching {\n opacity: .5;\n}\n.ol-wmscapabilities .ol-searching .ol-url:after{\n content: \"\";\n width: .7em;\n height: .7em;\n background-color: currentColor;\n position: absolute;\n top: 6em;\n border-radius: 50%;\n display: block;\n left: calc(50% - .35em);\n -webkit-box-shadow: 0 1em currentColor, 0 -1em currentColor, 1em 0 currentColor, -1em 0 currentColor;\n box-shadow: 0 1em currentColor, 0 -1em currentColor, 1em 0 currentColor, -1em 0 currentColor;\n -webkit-animation:ol-wmscapabilities-rotate 2s linear infinite;\n animation:ol-wmscapabilities-rotate 2s linear infinite;\n}\n@-webkit-keyframes ol-wmscapabilities-rotate { \n 100% { -webkit-transform:rotate(360deg); transform:rotate(360deg); } \n}\n@keyframes ol-wmscapabilities-rotate { \n 100% { -webkit-transform:rotate(360deg); transform:rotate(360deg); } \n}\n\n.ol-wmscapabilities .ol-url input {\n width: calc(100% - 10em);\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n min-width: Min(100%, 20em);\n}\n.ol-wmscapabilities .ol-url select {\n width: 2em;\n height: 100%;\n padding: 1px;\n}\n.ol-wmscapabilities .ol-url button {\n width: 7.5em;\n margin-left: .5em;\n}\n.ol-wmscapabilities .ol-result {\n display: none;\n margin-top: .5em;\n}\n.ol-wmscapabilities .ol-result.ol-visible {\n display: block;\n}\n\n.ol-wmscapabilities .ol-select-list {\n position: relative;\n border: 1px solid #369;\n overflow-x: hidden;\n width: calc(100% - 120px);\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n max-height: 14.5em;\n border-radius: 0;\n font-size: 1em;\n}\n.ol-wmscapabilities .ol-select-list option {\n padding: 0.1em .5em 0;\n cursor: pointer;\n width: 100%;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n text-overflow: ellipsis;\n overflow: hidden;\n}\n.ol-wmscapabilities .ol-select-list .level-1 {\n padding-left: 1em;\n}\n.ol-wmscapabilities .ol-select-list .level-2 {\n padding-left: 1.5em;\n}\n.ol-wmscapabilities .ol-select-list .level-3 {\n padding-left: 2em;\n}\n.ol-wmscapabilities .ol-select-list .level-4 {\n padding-left: 2.5em;\n}\n.ol-wmscapabilities .ol-select-list .level-5 {\n padding-left: 3em;\n}\n\n.ol-wmscapabilities .ol-select-list .ol-info {\n font-style: italic;\n}\n.ol-wmscapabilities .ol-select-list .ol-title {\n background-color: rgba(0,60,136,.1);\n}\n.ol-wmscapabilities .ol-select-list option:hover {\n background-color: rgba(0,60,136,.5);\n color: #fff;\n}\n.ol-wmscapabilities .ol-select-list .selected {\n background-color: rgba(0,60,136,.7);\n color: #fff;\n}\n\n.ol-wmscapabilities .ol-preview {\n width: 100px;\n float: right;\n background: rgba(0,60,136,.1);\n color: #666;\n padding: 0 5px 5px;\n text-align: center;\n margin-left: 10px;\n}\n.ol-wmscapabilities .ol-preview.tainted {\n width: 100px;\n float: right;\n background: rgba(136,0,60,.1);\n color: #666;\n padding: 0 5px 5px;\n text-align: center;\n margin-left: 10px;\n}\n.ol-wmscapabilities .ol-preview img {\n width: 100%;\n display: block;\n background: #fff;\n}\n.ol-wmscapabilities .ol-legend {\n max-width: 100%;\n display: none;\n}\n.ol-wmscapabilities .ol-legend.visible {\n display: block;\n}\n.ol-wmscapabilities .ol-buttons {\n clear: both;\n text-align: right;\n}\n.ol-wmscapabilities .ol-data p {\n margin: 0;\n}\n.ol-wmscapabilities .ol-data p.ol-title {\n font-weight: bold;\n margin: 1em 0 .5em;\n}\n.ol-wmscapabilities .ol-error {\n color: #800;\n}\n\n.ol-wmscapabilities ul.ol-wmsform {\n display: none;\n list-style: none;\n padding: 0;\n}\n.ol-wmscapabilities ul.ol-wmsform.visible {\n display: block;\n}\n.ol-wmscapabilities .ol-wmsform label {\n display: inline-block;\n text-align: right;\n width: calc(40% - .5em);\n margin-right: .5em;\n}\n.ol-wmscapabilities .ol-wmsform input {\n display: inline-block;\n width: 60%;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n}\n.ol-wmscapabilities .ol-wmsform input[type=\"checkbox\"] {\n width: auto;\n}\n.ol-wmscapabilities .ol-wmsform button {\n float: right;\n margin: 1em 0;\n}\n\n.ol-wmscapabilities ul.ol-wmsform li[data-param=\"extent\"] input {\n width: calc(60% - 2em);\n}\n.ol-wmscapabilities ul.ol-wmsform li[data-param=\"extent\"] button {\n position: relative;\n width: 2em;\n height: 1.6em;\n margin: 0;\n vertical-align: middle;\n color: #444;\n}\n.ol-wmscapabilities ul.ol-wmsform li[data-param=\"extent\"] button:before,\n.ol-wmscapabilities ul.ol-wmsform li[data-param=\"extent\"] button:after {\n content: \"\";\n position: absolute;\n width: .25em;\n height: .9em;\n border: .1em solid currentColor;\n top: 50%;\n left: 50%;\n -webkit-transform: translate(-50%, -50%) skewY(-15deg);\n transform: translate(-50%, -50%) skewY(-15deg);\n}\n.ol-wmscapabilities ul.ol-wmsform li[data-param=\"extent\"] button:after {\n -webkit-transform: translateX(.4em) translate(-50%, -50%) skewY(15deg);\n transform: translateX(.4em) translate(-50%, -50%) skewY(15deg);\n -webkit-box-shadow: -0.8em 0.25em;\n box-shadow: -0.8em 0.25em;\n}\n\n.ol-ext-dialog.ol-wmscapabilities form {\n width: 600px;\n min-height: 15em;\n top: 15%;\n -webkit-transform: translate(-50%, -15%);\n transform: translate(-50%, -15%);\n}\n.ol-ext-dialog.ol-wmscapabilities .ol-content {\n max-height: calc(100vh - 6em);\n}\n\n.ol-ext-dialog.ol-wmtscapabilities [data-param=\"map\"] {\n display: none;\n}\n.ol-ext-dialog [data-param=\"style\"] {\n display: none;\n}\n.ol-ext-dialog.ol-wmtscapabilities [data-param=\"style\"] {\n display: list-item;\n}\n.ol-ext-dialog.ol-wmtscapabilities [data-param=\"proj\"],\n.ol-ext-dialog.ol-wmtscapabilities [data-param=\"version\"] {\n opacity: .6;\n pointer-events: none;\n}\n\n.ol-ext-dialog.ol-wmscapabilities button.ol-wmsform {\n width: 1.8em;\n text-align: center;\n}\n.ol-ext-dialog.ol-wmscapabilities button.ol-wmsform:before {\n content: \"+\";\n}\n.ol-ext-dialog.ol-wmscapabilities .ol-form button.ol-wmsform:before {\n content: \"-\";\n}\n\n.ol-ext-dialog.ol-wmscapabilities .ol-form button.ol-load,\n.ol-ext-dialog.ol-wmscapabilities .ol-form .ol-legend {\n display: none;\n}\n.ol-ext-dialog.ol-wmscapabilities .ol-form ul.ol-wmsform {\n display: block;\n clear: both;\n}\n.ol-target-overlay .ol-target \n{\tborder: 1px solid transparent;\n\t-webkit-box-shadow: 0 0 1px 1px #fff;\n\t box-shadow: 0 0 1px 1px #fff;\n\tdisplay: block;\n\theight: 20px;\n\twidth: 0;\n}\n\n.ol-target-overlay .ol-target:after,\n.ol-target-overlay .ol-target:before\n{\tcontent:\"\";\n\tborder: 1px solid #369;\n\t-webkit-box-shadow: 0 0 1px 1px #fff;\n\t box-shadow: 0 0 1px 1px #fff;\n\tdisplay: block;\n\twidth: 20px;\n\theight: 0;\n\tposition:absolute;\n\ttop:10px;\n\tleft:-10px;\n}\n.ol-target-overlay .ol-target:after\n{\t-webkit-box-shadow: none;\tbox-shadow: none;\n\theight: 20px;\n\twidth: 0;\n\ttop:0px;\n\tleft:0px;\n}\n\n.ol-overlaycontainer .ol-touch-cursor {\n /* human fingertips are typically 16x20 mm = 45x57 pixels\n source: http://touchlab.mit.edu/publications/2003_009.pdf\n */\n width: 56px;\n height: 56px;\n margin: 6px;\n border-radius: 50%;\n cursor: pointer;\n background: rgba(255,255,255,.4);\n -webkit-box-shadow: inset 0 0 0 5px #369;\n box-shadow: inset 0 0 0 5px #369;\n}\n\n.ol-overlaycontainer .ol-touch-cursor:after {\n content: \"\";\n position: absolute;\n top: 0;\n left: 0;\n width: 50%;\n height: 50%;\n background: radial-gradient(circle at 100% 100%, transparent, transparent 70%, #369 70%, #369);\n -webkit-transform-origin: 100% 100%;\n transform-origin: 100% 100%;\n}\n.ol-overlaycontainer .ol-touch-cursor-center {\n margin-top: 16px;\n margin-left: -28px;\n}\n.ol-overlaycontainer .ol-touch-cursor-center:after {\n -webkit-transform: rotate(45deg);\n transform: rotate(45deg);\n}\n.ol-overlaycontainer .ol-touch-cursor-right {\n margin-left: -62px;\n}\n.ol-overlaycontainer .ol-touch-cursor-right:after {\n -webkit-transform: rotate(90deg);\n transform: rotate(90deg);\n}\n\n.ol-overlaycontainer .ol-touch-cursor .ol-button {\n position: absolute;\n color: #369;\n height: 55%;\n width: 55%;\n border-radius: 50%;\n cursor: pointer;\n background: rgba(255,255,255,.4);\n -webkit-box-shadow: inset 0 0 0 3px currentColor;\n box-shadow: inset 0 0 0 3px currentColor;\n top: 50%;\n left: 50%;\n -webkit-transform: translate(-50%, -50%) scale(0);\n transform: translate(-50%, -50%) scale(0);\n -webkit-transition: all .5s, opacity 0s, background 0s;\n transition: all .5s, opacity 0s, background 0s;\n overflow: hidden;\n}\n.ol-overlaycontainer .ol-touch-cursor.active.disable .ol-button {\n opacity: .8;\n background: rgba(51, 102, 153, .2);\n}\n.ol-overlaycontainer .ol-touch-cursor.active .ol-button {\n -webkit-transform: translate(-50%, -50%) scale(1);\n transform: translate(-50%, -50%) scale(1);\n}\n.ol-overlaycontainer .ol-touch-cursor.active .ol-button-0 {\n top: -18%;\n left: 118%;\n}\n.ol-overlaycontainer .ol-touch-cursor.active .ol-button-1 {\n top: 50%;\n left: 140%;\n}\n.ol-overlaycontainer .ol-touch-cursor.active .ol-button-2 {\n top: 120%;\n left: 120%;\n}\n.ol-overlaycontainer .ol-touch-cursor.active .ol-button-3 {\n top: 140%;\n left: 50%;\n}\n.ol-overlaycontainer .ol-touch-cursor.active .ol-button-4 {\n top: 118%;\n left: -18%;\n}\n/* extra buttons */\n.ol-overlaycontainer .ol-touch-cursor.active .ol-button-5 {\n top: 50%;\n left: -40%;\n}\n.ol-overlaycontainer .ol-touch-cursor.active .ol-button-6 {\n top: -18%;\n left: -18%;\n}\n.ol-overlaycontainer .ol-touch-cursor.active .ol-button-7 {\n top: -40%;\n left: 50%;\n}\n\n.ol-overlaycontainer .ol-touch-cursor .ol-button:before {\n content: \"\";\n width: 1.5em;\n height: 1em;\n position: absolute;\n top: 50%;\n left: 50%;\n -webkit-transform: translate(-50%, -50%);\n transform: translate(-50%, -50%);\n line-height: 1em;\n text-align: center;\n}\n.ol-overlaycontainer .ol-touch-cursor .ol-button.ol-button-add:before,\n.ol-overlaycontainer .ol-touch-cursor .ol-button.ol-button-remove:before {\n content: \"\u2212\";\n line-height: .95em;\n font-size: 1.375em;\n font-weight: bold;\n}\n.ol-overlaycontainer .ol-touch-cursor .ol-button.ol-button-add:before {\n content: \"+\";\n}\n.ol-overlaycontainer .ol-touch-cursor .ol-button.ol-button-x:before {\n content: \"\u0000D7\";\n font-size: 1.2em;\n font-weight: bold;\n}\n.ol-overlaycontainer .ol-touch-cursor .ol-button.ol-button-move:before {\n content: \"\u00BA5\";\n font-size: 1.2em;\n}\n.ol-overlaycontainer .ol-touch-cursor .ol-button.ol-button-check:before {\n content: \"\u00B93\";\n font-weight: bold;\n}\n\n.ol-overlaycontainer .ol-touch-cursor.nodrawing .ol-button.ol-button-x,\n.ol-overlaycontainer .ol-touch-cursor.nodrawing .ol-button.ol-button-remove,\n.ol-overlaycontainer .ol-touch-cursor.nodrawing .ol-button.ol-button-check {\n opacity: .8;\n background: rgba(51, 102, 153, .2);\n}\n\n.ol-overlaycontainer .ol-touch-cursor .ol-button > div {\n position: absolute;\n top: 50%;\n left: 50%;\n -webkit-transform: translate(-50%, -50%);\n transform: translate(-50%, -50%);\n}\n\n.ol-overlaycontainer .ol-touch-cursor .ol-button-type:before {\n content: \"\u0011CE\";\n font-weight: bold;\n}\n\n\n\n/* remove outline on focus */\n.mapboxgl-canvas:focus {\n outline: none;\n}\n.ol-perspective-map {\n position: absolute;\n left: 50%;\n top: 50%;\n width: 200%;\n height: 200%;\n -webkit-transform: translate(-50%, -50%);\n transform: translate(-50%, -50%);\n}\n.ol-perspective-map .ol-layer {\n z-index: -1!important; /* bug using Chrome ? */\n}\n.ol-perspective-map .ol-layers {\n -webkit-transform: translateY(0) perspective(200px) rotateX(0deg) scaleY(1);\n transform: translateY(0) perspective(200px) rotateX(0deg) scaleY(1);\n}\n\n.ol-perspective-map .ol-overlaycontainer,\n.ol-perspective-map .ol-overlaycontainer-stopevent {\n width: 50%!important;\n height: 50%!important;\n top: 50%;\n left: 50%;\n -webkit-transform: translate(-50%, -50%);\n transform: translate(-50%, -50%);\n}\n\n.ol-overlay-container .ol-magnify \n{\tbackground: rgba(0,0,0, 0.5);\n\tborder:3px solid #369;\n\tborder-radius: 50%;\n\theight: 150px;\n\twidth: 150px;\n\toverflow: hidden;\n\t-webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.5);\n\t box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.5);\n\tposition:relative;\n\tz-index:0;\n}\n\n.ol-overlay-container .ol-magnify:before \n{\tborder-radius: 50%;\n\t-webkit-box-shadow: 0 0 40px 2px rgba(0, 0, 0, 0.25) inset;\n\t box-shadow: 0 0 40px 2px rgba(0, 0, 0, 0.25) inset;\n\tcontent: \"\";\n\tdisplay: block;\n\theight: 100%;\n\tleft: 0;\n\tposition: absolute;\n\ttop: 0;\n\twidth: 100%;\n\tz-index: 1;\n}\n\n.ol-overlay-container .ol-magnify:after \n{\n\tborder-radius: 50%;\n\t-webkit-box-shadow: 0 0 20px 7px rgba(255, 255, 255, 1);\n\t box-shadow: 0 0 20px 7px rgba(255, 255, 255, 1);\n\tcontent: \"\";\n\tdisplay: block;\n\theight: 0;\n\tleft: 23%;\n\tposition: absolute;\n\ttop: 20%;\n\twidth: 20%;\n\tz-index: 1;\n\ttransform: rotate(-40deg);\n\t-webkit-transform: rotate(-40deg);\n}\n/** popup animation using visible class\n*/\n.ol-popup.anim {\n visibility: hidden;\n}\n\n.ol-popup.anim.visible {\n visibility: visible;\n}\n/** No transform when visible \n*/\n.ol-popup.anim.visible > div {\n visibility: visible;\n -webkit-transform: none;\n transform: none;\n -webkit-animation: ol-popup_bounce 0.4s ease 1;\n animation: ol-popup_bounce 0.4s ease 1;\n}\n\n@-webkit-keyframes ol-popup_bounce {\n from { -webkit-transform: scale(0); transform: scale(0); }\n 50% { -webkit-transform: scale(1.1); transform: scale(1.1) }\n 80% { -webkit-transform: scale(0.95); transform: scale(0.95) }\n to { -webkit-transform: scale(1); transform: scale(1); }\n}\n\n@keyframes ol-popup_bounce {\n from { -webkit-transform: scale(0); transform: scale(0); }\n 50% { -webkit-transform: scale(1.1); transform: scale(1.1) }\n 80% { -webkit-transform: scale(0.95); transform: scale(0.95) }\n to { -webkit-transform: scale(1); transform: scale(1); }\n}\n\n/** Transform Origin */\n.ol-popup.anim.ol-popup-bottom.ol-popup-left > div {\n -webkit-transform-origin:0 100%;\n transform-origin:0 100%;\n}\n.ol-popup.anim.ol-popup-bottom.ol-popup-right > div {\n -webkit-transform-origin:100% 100%;\n transform-origin:100% 100%;\n}\n.ol-popup.anim.ol-popup-bottom.ol-popup-center > div {\n -webkit-transform-origin:50% 100%;\n transform-origin:50% 100%;\n}\n.ol-popup.anim.ol-popup-top.ol-popup-left > div {\n -webkit-transform-origin:0 0;\n transform-origin:0 0;\n}\n.ol-popup.anim.ol-popup-top.ol-popup-right > div {\n -webkit-transform-origin:100% 0;\n transform-origin:100% 0;\n}\n.ol-popup.anim.ol-popup-top.ol-popup-center > div {\n -webkit-transform-origin:50% 0;\n transform-origin:50% 0;\n}\n.ol-popup.anim.ol-popup-middle.ol-popup-left > div {\n -webkit-transform-origin:0 50%;\n transform-origin:0 50%;\n}\n.ol-popup.anim.ol-popup-middle.ol-popup-right > div {\n -webkit-transform-origin:100% 50%;\n transform-origin:100% 50%;\n}\n\n.ol-overlaycontainer-stopevent {\n /* BOUG ol6.1 to enable DragOverlay interaction \n position: initial!important;\n */\n}\n\n/** ol.popup */\n.ol-popup {\n font-size:0.9em;\n -webkit-user-select: none; \n -moz-user-select: none; \n -ms-user-select: none; \n user-select: none;\n}\n.ol-popup .ol-popup-content {\n overflow:hidden;\n cursor: default;\n padding: 0.25em 0.5em;\n}\n.ol-popup.hasclosebox .ol-popup-content {\n margin-right: 1.7em;\n}\n.ol-popup .ol-popup-content:after {\n clear: both;\n content: \"\";\n display: block;\n font-size: 0;\n height: 0;\n}\n\n/** Anchor position */\n.ol-popup .anchor {\n display: block;\n width: 0px;\n height: 0px;\n background:red;\n position: absolute;\n margin: -11px 22px;\n pointer-events: none;\n}\n.ol-popup .anchor:after,\n.ol-popup .anchor:before {\n position:absolute;\n}\n.ol-popup-right .anchor:after,\n.ol-popup-right .anchor:before {\n right:0;\n}\n.ol-popup-top .anchor { top:0; }\n.ol-popup-bottom .anchor { bottom:0; }\n.ol-popup-right .anchor { right:0; }\n.ol-popup-left .anchor { left:0; }\n.ol-popup-center .anchor { \n left:50%; \n margin-left: 0!important;\n}\n.ol-popup-middle .anchor { \n top:50%; \n margin-top: 0!important;\n}\n.ol-popup-center.ol-popup-middle .anchor { \n display:none; \n}\n\n/** Fixed popup */\n.ol-popup.ol-fixed {\n margin: 0!important;\n top: .5em!important;\n right: .5em!important;\n left: auto!important;\n bottom: auto!important;\n -webkit-transform: none!important;\n transform: none!important;\n}\n.ol-popup.ol-fixed .anchor {\n display: none;\n}\n.ol-popup.ol-fixed.anim > div {\n -webkit-animation: none;\n animation: none;\n}\n\n.ol-popup .ol-fix {\n width: 1em;\n height: .9em;\n background: #fff;\n position: relative;\n float: right;\n margin: .2em;\n cursor: pointer;\n}\n.ol-popup .ol-fix:before {\n content: \"\";\n width: .8em;\n height: .7em;\n display: block;\n border: .1em solid #666;\n border-right-width: 0.1em;\n border-right-width: .3em;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n margin: .1em;\n}\n\n/** Add a shadow to the popup */\n.ol-popup.shadow {\n -webkit-box-shadow: 2px 2px 2px 2px rgba(0,0,0,0.5);\n box-shadow: 2px 2px 2px 2px rgba(0,0,0,0.5);\n}\n\n/** Close box */\n.ol-popup .closeBox {\n background-color: rgba(0, 60, 136, 0.5);\n color: #fff;\n border: 0;\n border-radius: 2px;\n cursor: pointer;\n float: right;\n font-size: 0.9em;\n font-weight: 700;\n width: 1.4em;\n height: 1.4em;\n margin: 5px 5px 0 0;\n padding: 0;\n position: relative;\n display:none;\n}\n.ol-popup.hasclosebox .closeBox {\n display:block;\n}\n\n.ol-popup .closeBox:hover {\n background-color: rgba(0, 60, 136, 0.7);\n}\n/* the X */\n.ol-popup .closeBox:after {\n content: \"\u0000d7\";\n font-size:1.5em;\n top: 50%;\n left: 0;\n right: 0;\n width: 100%;\n text-align: center;\n line-height: 1em;\n margin: -0.5em 0;\n position: absolute;\n}\n\n/** Modify touch poup */\n.ol-popup.modifytouch {\n background-color: #eee;\n}\n.ol-popup.modifytouch .ol-popup-content {\t\n padding: 0 0.25em;\n font-size: 0.85em;\n white-space: nowrap;\n}\n.ol-popup.modifytouch .ol-popup-content a {\n text-decoration: none;\n}\n\n/** Tool tips popup*/\n.ol-popup.tooltips {\n background-color: #ffa;\n}\n.ol-popup.tooltips .ol-popup-content{\n padding: 0 0.25em;\n font-size: 0.85em;\n white-space: nowrap;\n}\n\n/** Default popup */\n.ol-popup.default > div {\n background-color: #fff;\n border:1px solid #69f;\n border-radius: 5px;\n}\n.ol-popup.default {\n margin: -11px 0;\n -webkit-transform: translate(0, -22px);\n transform: translate(0, -22px);\n}\n.ol-popup-top.ol-popup.default {\n margin: 11px 0;\n -webkit-transform: none;\n transform: none;\n}\n.ol-popup-left.default {\n margin: -11px -22px;\n -webkit-transform: translate(0, -22px);\n transform: translate(0, -22px);\n}\n.ol-popup-top.ol-popup-left.default {\n margin: 11px -22px;\n -webkit-transform: none;\n transform: none;\n}\n.ol-popup-right.default {\n margin: -11px 22px;\n -webkit-transform: translate(44px, -22px);\n transform: translate(44px, -22px);\n}\n.ol-popup-top.ol-popup-right.default {\n margin: 11px 22px;\n -webkit-transform: translate(44px, 0);\n transform: translate(44px, 0);\n}\n.ol-popup-middle.default {\n margin:0 10px;\n -webkit-transform: none;\n transform: none;\n}\n.ol-popup-middle.ol-popup-right.default {\n margin:0 -10px;\n -webkit-transform: translate(-20px, 0);\n transform: translate(-20px, 0);\n}\n\n.ol-popup.default .anchor {\n color: #69f;\n}\n.ol-popup.default .anchor:after,\n.ol-popup.default .anchor:before {\n content:\"\";\n border-color: currentColor transparent;\n border-style: solid;\n border-width: 11px;\n margin: 0 -11px;\n}\n.ol-popup.default .anchor:after {\n border-color: #fff transparent;\n border-width: 11px;\n margin: 2px -11px;\n}\n\n.ol-popup-top.default .anchor:before,\n.ol-popup-top.default .anchor:after {\n border-top:0;\n top:0;\n}\n\n.ol-popup-bottom.default .anchor:before,\n.ol-popup-bottom.default .anchor:after {\n border-bottom:0;\n bottom:0;\n}\n\n.ol-popup-middle.default .anchor:before {\n margin: -11px -33px;\n border-color: transparent currentColor;\n}\n.ol-popup-middle.default .anchor:after {\n margin: -11px -31px;\n border-color: transparent #fff;\n}\n.ol-popup-middle.ol-popup-left.default .anchor:before,\n.ol-popup-middle.ol-popup-left.default .anchor:after {\n border-left:0;\n}\n.ol-popup-middle.ol-popup-right.default .anchor:before,\n.ol-popup-middle.ol-popup-right.default .anchor:after {\n border-right:0;\n}\n\n/** Placemark popup */\n.ol-popup.placemark {\n color: #c00;\n margin: -.65em 0;\n -webkit-transform: translate(0, -1.3em);\n transform: translate(0, -1.3em);\n}\n.ol-popup.placemark > div {\n position: relative;\n font-size: 15px;\t\n background-color: #fff;\n border: 0;\n -webkit-box-shadow: inset 0 0 0 0.45em;\n box-shadow: inset 0 0 0 0.45em;\n width: 2em;\n height: 2em;\n border-radius: 50%;\n min-width: unset;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n}\n.ol-popup.placemark .ol-popup-content {\n overflow: hidden;\n cursor: default;\n text-align: center;\n padding: .25em 0;\n width: 1em;\n height: 1em;\n position: absolute;\n top: 50%;\n left: 50%;\n -webkit-transform: translate(-50%, -50%);\n transform: translate(-50%, -50%);\n line-height: 1em;\n}\n.ol-popup.placemark .anchor {\n margin: 0;\n}\n\n.ol-popup.placemark .anchor:before {\n content: \"\";\n margin: -.5em -.5em;\n background: transparent;\n width: 1em;\n height: .5em;\n border-radius: 50%;\n -webkit-box-shadow: 0 1em 0.5em rgba(0,0,0,.5);\n box-shadow: 0 1em 0.5em rgba(0,0,0,.5);\n}\n.ol-popup.placemark .anchor:after {\n content: \"\";\n border-color: currentColor transparent;\n border-style: solid;\n border-width: 1em .7em 0;\n margin: -.75em -.7em;\n bottom:0;\n}\n\n/** Placemark Shield */\n.ol-popup.placemark.shield > div {\n border-radius: .2em;\n}\n\n.ol-popup.placemark.shield .anchor:after {\n border-width: .8em 1em 0;\n margin: -.7em -1em;\n}\n\n/** Placemark Blazon */\n.ol-popup.placemark.blazon > div {\n border-radius: .2em;\n}\n\n/** Placemark Needle/Pushpin */\n.ol-popup.placemark.pushpin {\t\n margin: -2.2em 0;\n -webkit-transform: translate(0, -4em);\n transform: translate(0, -4em);\n}\n.ol-popup.placemark.pushpin > div {\t\n border-radius: 0;\n background: transparent!important;\n -webkit-box-shadow: inset 2em 0 currentColor;\n box-shadow: inset 2em 0 currentColor;\n width: 1.1em;\n}\n.ol-popup.placemark.pushpin > div:before {\n content: \"\";\n width: 1.3em;\n height: 1.5em;\n border-style: solid;\n position: absolute;\n left: 50%;\n top: 50%;\n -webkit-transform: translate(-50%,-50%);\n transform: translate(-50%,-50%);\n border-color: currentColor transparent;\n border-width: .3em .5em .5em;\n pointer-events: none;\n}\n\n.ol-popup.placemark.needle {\t\n margin: -2em 0;\n -webkit-transform: translate(0, -4em);\n transform: translate(0, -4em);\n}\n.ol-popup.placemark.pushpin .anchor,\n.ol-popup.placemark.needle .anchor {\n margin: -1.2em;\n}\n.ol-popup.placemark.pushpin .anchor:after,\n.ol-popup.placemark.needle .anchor:after {\n border-style: solid;\n border-width: 2em .15em 0;\n margin: -.55em -0.2em;\n width: .1em;\n}\n.ol-popup.placemark.pushpin .anchor:before,\n.ol-popup.placemark.needle .anchor:before {\n margin: -.75em -.5em;\n}\n\n/** Placemark Flag */\n.ol-popup.placemark.flagv {\n margin: -2em 1em;\n -webkit-transform: translate(0, -4em);\n transform: translate(0, -4em);\n}\n.ol-popup.placemark.flagv > div {\n border-radius: 0;\n -webkit-box-shadow: none;\n box-shadow: none;\n background-color: transparent;\n}\n.ol-popup.placemark.flagv > div:before {\n content: \"\";\n border: 1em solid transparent;\n position: absolute;\n border-left: 2em solid currentColor;\n pointer-events: none;\n}\n.ol-popup.placemark.flagv .anchor {\n margin: -1.4em;\n}\n\n.ol-popup.placemark.flag {\t\n margin: -2em 1em;\n -webkit-transform: translate(0, -4em);\n transform: translate(0, -4em);\n}\n.ol-popup.placemark.flag > div {\t\n border-radius: 0;\n -webkit-transform-origin: 0% 150%!important;\n transform-origin: 0% 150%!important;\n}\n.ol-popup.placemark.flag .anchor {\n margin: -1.4em;\n}\n.ol-popup.placemark.flagv .anchor:after, \n.ol-popup.placemark.flag .anchor:after {\n border-style: solid;\n border-width: 2em .15em 0;\n margin: -.55em -1em;\n width: .1em;\n}\n.ol-popup.placemark.flagv .anchor:before,\n.ol-popup.placemark.flag .anchor:before {\n margin: -.75em -1.25em;\n}\n\n.ol-popup.placemark.flag.finish {\n margin: -2em 1em;\n}\n.ol-popup.placemark.flag.finish > div {\n background-image: \n linear-gradient(45deg, currentColor 25%, transparent 25%, transparent 75%, currentColor 75%, currentColor), \n linear-gradient(45deg, currentColor 25%, transparent 25%, transparent 75%, currentColor 75%, currentColor);\n background-size: 1em 1em;\n background-position: .5em 0, 0 .5em;\n -webkit-box-shadow: inset 0 0 0 .25em;\n box-shadow: inset 0 0 0 .25em;\n}\n\n/** Black popup */\n.ol-popup.black .closeBox {\n background-color: rgba(0,0,0, 0.5);\n border-radius: 5px;\n color: #f80;\n}\n.ol-popup.black .closeBox:hover {\n background-color: rgba(0,0,0, 0.7);\n color:#da2;\n}\n\n.ol-popup.black {\n margin: -20px 0;\n -webkit-transform: translate(0, -40px);\n transform: translate(0, -40px);\n}\n.ol-popup.black > div{\n background-color: rgba(0,0,0,0.6);\n border-radius: 5px;\n color:#fff;\n}\n.ol-popup-top.ol-popup.black {\n margin: 20px 0;\n -webkit-transform: none;\n transform: none;\n}\n.ol-popup-left.black {\n margin: -20px -22px;\n -webkit-transform: translate(0, -40px);\n transform: translate(0, -40px);\n}\n.ol-popup-top.ol-popup-left.black {\n margin: 20px -22px;\n -webkit-transform: none;\n transform: none;\n}\n.ol-popup-right.black {\n margin: -20px 22px;\n -webkit-transform: translate(44px, -40px);\n transform: translate(44px, -40px);\n}\n.ol-popup-top.ol-popup-right.black {\n margin: 20px 22px;\n -webkit-transform: translate(44px, 0);\n transform: translate(44px, 0);\n}\n.ol-popup-middle.black {\n margin: 0 11px;\n -webkit-transform: none;\n transform: none;\n}\n.ol-popup-left.ol-popup-middle.black {\n -webkit-transform: none;\n transform: none;\n}\n.ol-popup-right.ol-popup-middle.black {\n margin:0 -11px;\n -webkit-transform: translate(-22px, 0);\n transform: translate(-22px, 0);\n}\n\n.ol-popup.black .anchor {\n margin: -20px 11px;\n color: rgba(0,0,0,0.6);\n} \n.ol-popup.black .anchor:before {\n content:\"\";\n border-color: currentColor transparent;\n border-style: solid;\n border-width: 20px 11px;\n}\n\n.ol-popup-top.black .anchor:before {\n border-top:0;\n top:0;\n}\n\n.ol-popup-bottom.black .anchor:before {\n border-bottom:0;\n bottom:0;\n}\n\n.ol-popup-middle.black .anchor:before {\n margin: -20px -22px;\n border-color: transparent currentColor;\n}\n.ol-popup-middle.ol-popup-left.black .anchor:before {\n border-left:0;\n}\n.ol-popup-middle.ol-popup-right.black .anchor:before {\n border-right:0;\n}\n\n.ol-popup-center.black .anchor:before {\n margin: 0 -10px;\n}\n\n\n/** Green tips popup */\n.ol-popup.tips .closeBox {\n background-color: #f00;\n border-radius: 50%;\n color: #fff;\n width:1.2em;\n height:1.2em;\n}\n.ol-popup.tips .closeBox:hover {\n background-color: #f40;\n}\n\n.ol-popup.tips {\n margin: -20px 0;\n -webkit-transform: translate(0,-40px);\n transform: translate(0,-40px);\n}\n.ol-popup.tips > div {\n background-color: #cea;\n border: 5px solid #ad7;\n border-radius: 5px;\n color:#333;\n}\n.ol-popup-top.ol-popup.tips {\n margin: 20px 0;\n -webkit-transform: none;\n transform: none;\n}\n.ol-popup-left.tips {\n margin: -20px -22px;\n -webkit-transform: translate(0,-40px);\n transform: translate(0,-40px);\n}\n.ol-popup-top.ol-popup-left.tips {\n margin: 20px -22px;\n -webkit-transform: none;\n transform: none;\n}\n.ol-popup-right.tips {\n margin: -20px 22px;\n -webkit-transform: translate(44px,-40px);\n transform: translate(44px,-40px);\n}\n.ol-popup-top.ol-popup-right.tips {\n margin: 20px 22px;\n -webkit-transform: translate(44px,0);\n transform: translate(44px,0);\n}\n.ol-popup-middle.tips {\n margin:0;\n -webkit-transform: none;\n transform: none;\n}\n.ol-popup-left.ol-popup-middle.tips {\n margin: 0 22px;\n -webkit-transform: none;\n transform: none;\n}\n.ol-popup-right.ol-popup-middle.tips {\n margin: 0 -22px;\n -webkit-transform: translate(-44px,0);\n transform: translate(-44px,0);\n}\n\n.ol-popup.tips .anchor {\n margin: -18px 22px;\n color: #ad7;\n} \n.ol-popup.tips .anchor:before {\n content:\"\";\n border-color: currentColor transparent;\n border-style: solid;\n border-width: 20px 11px;\n}\n\n.ol-popup-top.tips .anchor:before {\n border-top:0;\n top:0;\n}\n.ol-popup-bottom.tips .anchor:before {\n border-bottom:0;\n bottom:0;\n}\n.ol-popup-center.tips .anchor:before {\n border-width: 20px 6px;\n margin: 0 -6px;\n}\n.ol-popup-left.tips .anchor:before {\n border-left:0;\n margin-left:0;\n}\n.ol-popup-right.tips .anchor:before {\n border-right:0;\n margin-right:0;\n}\n\n.ol-popup-middle.tips .anchor:before {\n margin: -6px -41px;\n border-color: transparent currentColor;\n border-width:6px 20px;\n}\n.ol-popup-middle.ol-popup-left.tips .anchor:before {\n border-left:0;\n}\n.ol-popup-middle.ol-popup-right.tips .anchor:before {\n border-right:0;\n}\n\n/** Warning popup */\n.ol-popup.warning .closeBox {\n background-color: #f00;\n border-radius: 50%;\n color: #fff;\n font-size: 0.83em;\n}\n.ol-popup.warning .closeBox:hover {\n background-color: #f40;\n}\n\n.ol-popup.warning {\n background-color: #fd0;\n border-radius: 3px;\n border:4px dashed #f00;\n margin:20px 0;\n color:#900;\n margin: -28px 10px;\n -webkit-transform: translate(0, -56px);\n transform: translate(0, -56px);\n}\n.ol-popup-top.ol-popup.warning {\n margin: 28px 10px;\n -webkit-transform: none;\n transform: none;\n}\n.ol-popup-left.warning {\n margin: -28px -22px;\n -webkit-transform: translate(0, -56px);\n transform: translate(0, -56px);\n}\n.ol-popup-top.ol-popup-left.warning {\n margin: 28px -22px;\n -webkit-transform: none;\n transform: none;\n}\n.ol-popup-right.warning {\n margin: -28px 22px;\n -webkit-transform: translate(44px, -56px);\n transform: translate(44px, -56px);\n}\n.ol-popup-top.ol-popup-right.warning {\n margin: 28px 22px;\n -webkit-transform: translate(44px, 0);\n transform: translate(44px, 0);\n}\n.ol-popup-middle.warning {\n margin:0;\n -webkit-transform: none;\n transform: none;\n}\n.ol-popup-left.ol-popup-middle.warning {\n margin:0 22px;\n -webkit-transform: none;\n transform: none;\n}\n.ol-popup-right.ol-popup-middle.warning {\n margin:0 -22px;\n -webkit-transform: translate(-44px, 0);\n transform: translate(-44px, 0);\n}\n\n.ol-popup.warning .anchor {\n margin: -33px 7px;\n} \n.ol-popup.warning .anchor:before {\n content:\"\";\n border-color: #f00 transparent;\n border-style: solid;\n border-width: 30px 11px;\n}\n\n.ol-popup-top.warning .anchor:before {\n border-top:0;\n top:0;\n}\n.ol-popup-bottom.warning .anchor:before {\n border-bottom:0;\n bottom:0;\n}\n\n.ol-popup-center.warning .anchor:before {\n margin: 0 -21px;\n}\n.ol-popup-middle.warning .anchor:before {\n margin: -10px -33px;\n border-color: transparent #f00;\n border-width:10px 22px;\n}\n.ol-popup-middle.ol-popup-left.warning .anchor:before {\n border-left:0;\n}\n.ol-popup-middle.ol-popup-right.warning .anchor:before {\n border-right:0;\n}\n\n.ol-popup .ol-popupfeature table {\n width: 100%;\n}\n.ol-popup .ol-popupfeature table td {\n max-width: 25em;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.ol-popup .ol-popupfeature table td img {\n max-width: 100px;\n max-height: 100px;\n}\n.ol-popup .ol-popupfeature tr:nth-child(2n+1) {\n background-color: #eee;\n}\n.ol-popup .ol-popupfeature .ol-zoombt {\n border: 0;\n width: 2em;\n height: 2em;\n display: inline-block;\n color: rgba(0,60,136,.5);\n position: relative;\n background: transparent;\n outline: none;\n}\n.ol-popup .ol-popupfeature .ol-zoombt:before {\n content: \"\";\n position: absolute;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 1em;\n height: 1em;\n background-color: transparent;\n border: .17em solid currentColor;\n border-radius: 100%;\n top: .3em;\n left: .3em;\n}\n.ol-popup .ol-popupfeature .ol-zoombt:after {\n content: \"\";\n position: absolute;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n top: 1.35em;\n left: 1.15em;\n border-width: .1em .3em;\n border-style: solid;\n border-radius: .03em;\n -webkit-transform: rotate(45deg);\n transform: rotate(45deg);\n -webkit-box-shadow: -0.2em 0 0 -0.04em;\n box-shadow: -0.2em 0 0 -0.04em;\n}\n\n.ol-popup .ol-popupfeature .ol-count{\n float: right;\n margin: .25em 0;\n}\n.ol-popup .ol-popupfeature .ol-prev,\n.ol-popup .ol-popupfeature .ol-next {\n border-style: solid;\n border-color: transparent rgba(0,60,136,.5);\n border-width: .5em 0 .5em .5em;\n display: inline-block;\n vertical-align: bottom;\n margin: 0 .5em;\n cursor: pointer;\n}\n.ol-popup .ol-popupfeature .ol-prev{\n border-width: .5em .5em .5em 0;\n}\n\n.ol-popup.tooltips.black {\n background-color: transparent;\n}\n.ol-popup.tooltips.black > div {\n -webkit-transform: scaleY(1.3);\n transform: scaleY(1.3);\n padding: .2em .5em;\n background-color: rgba(0,0,0, 0.5);\n}\n.ol-popup-middle.tooltips.black .anchor:before {\n border-width: 5px 10px;\n margin: -5px -21px;\n}\n\n.ol-popup-center.ol-popup-middle { \n margin: 0;\n}\n\n.ol-popup-top.ol-popup-left.ol-fixPopup,\n.ol-popup-top.ol-popup-right.ol-fixPopup,\n.ol-popup.ol-fixPopup {\n margin: 0;\n}\n\n.ol-miniscroll {\n position: relative;\n}\n.ol-miniscroll:hover .ol-scroll {\n opacity: .5;\n -webkit-transition: opacity 1s;\n transition: opacity 1s;\n}\n.ol-miniscroll .ol-scroll {\n -ms-touch-action: none;\n touch-action: none;\n position: absolute;\n right: 0px;\n width: 9px;\n height: auto;\n max-height: 100%;\n opacity: 0;\n border-radius: 9px;\n -webkit-transition: opacity 1s .5s;\n transition: opacity 1s .5s;\n overflow: hidden;\n z-index: 1;\n}\n.ol-miniscroll .ol-scroll > div {\n -ms-touch-action: none;\n touch-action: none;\n position: absolute;\n top: 0;\n right: 0px;\n width: 9px;\n height: 9px;\n -webkit-box-shadow: inset 10px 0 currentColor;\n box-shadow: inset 10px 0 currentColor;\n border-radius: 9px / 12px;\n border: 2px solid transparent;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n cursor: pointer;\n}\n.ol-miniscroll .ol-scroll.ol-100pc {\n opacity: 0;\n}\n\n.ol-viewport canvas.ol-fixedoverlay {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n}\n/* Toggle Switch */\n.ol-ext-toggle-switch {\n cursor: pointer;\n position: relative;\n}\n.ol-ext-toggle-switch input[type=\"radio\"],\n.ol-ext-toggle-switch input[type=\"checkbox\"] {\n /* display: none; */\n opacity: 0;\n width: 0;\n height: 0;\n margin: 0;\n padding: 0;\n display: inline-block;\n}\n.ol-ext-toggle-switch span {\n color: rgba(0,60,136,.5);\n position: relative;\n cursor: pointer;\n background-color: #ccc;\n -webkit-transition: .4s, background-color 0s, border-color 0s, -webkit-box-shadow 0s;\n transition: .4s, background-color 0s, border-color 0s, -webkit-box-shadow 0s;\n transition: .4s, background-color 0s, border-color 0s, box-shadow 0s;\n transition: .4s, background-color 0s, border-color 0s, box-shadow 0s, -webkit-box-shadow 0s;\n width: 1.6em;\n height: 1em;\n display: inline-block;\n border-radius: 1em;\n font-size: 1.3em;\n vertical-align: middle;\n margin: -.15em .2em .15em;\n}\n.ol-ext-toggle-switch span:before {\n position: absolute;\n content: \"\";\n height: 1em;\n width: 1em;\n left: 0;\n top: 50%;\n background-color: #fff;\n -webkit-transition: .4s;\n transition: .4s;\n border-radius: 1em;\n display: block;\n -webkit-transform: translateY(-50%);\n transform: translateY(-50%);\n border: 2px solid #ccc;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n}\n.ol-ext-toggle-switch:hover span {\n background-color: #999;\n}\n.ol-ext-toggle-switch:hover span:before {\n border-color: #999;\n}\n\n.ol-ext-toggle-switch input:checked + span {\n background-color: currentColor;\n}\n.ol-ext-toggle-switch input:checked + span:before {\n -webkit-transform: translate(.6em,-50%);\n transform: translate(.6em,-50%);\n border-color: currentColor;\n}\n\n/* Check/radio buttons */\n.ol-ext-check {\n position: relative;\n display: inline-block;\n}\n.ol-ext-check input {\n position: absolute;\n opacity: 0;\n cursor: pointer;\n height: 0;\n width: 0;\n margin: 0;\n padding: 0;\n display: inline-block;\n}\n.ol-ext-check span {\n color: rgba(0,60,136,.5);\n position: relative;\n display: inline-block;\n width: 1em;\n height: 1em;\n margin: -.1em .5em .1em;\n background-color: #ccc;\n vertical-align: middle;\n}\n.ol-ext-check:hover span {\n background-color: #999;\n}\n.ol-ext-checkbox input:checked ~ span {\n background-color: currentColor;\n}\n.ol-ext-checkbox input:checked ~ span:before {\n content: \"\";\n position: absolute;\n width: .5em;\n height: .8em;\n top: 50%;\n left: 50%;\n -webkit-transform: translateY(-.1em) translate(-50%, -50%) rotate(45deg);\n transform: translateY(-.1em) translate(-50%, -50%) rotate(45deg);\n -webkit-box-shadow: inset -0.2em -0.2em #fff;\n box-shadow: inset -0.2em -0.2em #fff;\n}\n\n.ol-ext-radio span {\n width: 1.1em;\n height: 1.1em;\n border-radius: 50%;\n}\n.ol-ext-radio:hover input:checked ~ span {\n background-color: #ccc;\n}\n.ol-ext-radio input:checked ~ span:before {\n content: \"\";\n position: absolute;\n width: 50%;\n height: 50%;\n top: 50%;\n left: 50%;\n -webkit-transform: translate(-50%, -50%);\n transform: translate(-50%, -50%);\n border-radius: 50%;\n background-color: currentColor;\n}\n\n/* focus */\n.ol-ext-toggle-switch input:focus-visible + span {\n -webkit-box-shadow: inset 0 0 0 1px #fff, 0 0 0 1.8px rgba(0,0,0,.8);\n box-shadow: inset 0 0 0 1px #fff, 0 0 0 1.8px rgba(0,0,0,.8);\n}\n.ol-ext-check input:focus-visible + span {\n -webkit-box-shadow: inset 0 0 0 1px #fff, 0 0 0 1.8px rgba(0,0,0,.8);\n box-shadow: inset 0 0 0 1px #fff, 0 0 0 1.8px rgba(0,0,0,.8);\n}\n.ol-collection-list {\n margin: 0;\n padding: 0;\n list-style: none;\n}\n.ol-collection-list li {\n position: relative;\n padding: 0 2em 0 1em;\n}\n.ol-collection-list li:hover {\n background-color: rgba(0,60,136,.2);\n}\n.ol-collection-list li.ol-select {\n background-color: rgba(0,60,136,.5);\n color: #fff;\n}\n\n.ol-collection-list li .ol-order {\n position: absolute;\n -ms-touch-action: none;\n touch-action: none;\n right: 0;\n top: 50%;\n -webkit-transform: translateY(-50%);\n transform: translateY(-50%);\n width: 2em;\n height: 100%;\n cursor: n-resize;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n.ol-collection-list li .ol-order:before {\n content: '';\n position: absolute;\n top: 50%;\n left: 50%;\n -webkit-transform: translate(-50%, -50%);\n transform: translate(-50%, -50%);\n width: 18px;\n height: 2px;\n background-color: currentColor;\n -webkit-box-shadow: 0 5px, 0 -5px;\n box-shadow: 0 5px, 0 -5px;\n border-radius: 2px;\n}\n\n/* Accessibility */\n.ol-collection-list li > input.ol-input-focus {\n width: 0;\n height: 0;\n opacity: 0;\n position: absolute;\n z-index: -1;\n}\n.ol-collection-list li:has(> input.ol-input-focus:focus) {\n outline: 2px solid #369;\n}\n\n.ol-ext-colorpicker.ol-popup {\n width: 2em;\n height: 1.5em;\n background-color: transparent;\n background-image: \n linear-gradient(45deg, #aaa 25%, transparent 25%, transparent 75%, #aaa 75%), \n linear-gradient(45deg, #aaa 25%, transparent 25%, transparent 75%, #aaa 75%);\n background-size: 10px 10px;\n background-position: 0 -1px, 5px 4px;\n}\n\n.ol-ext-colorpicker .ol-tabbar {\n background-color: #eee;\n border-bottom: 1px solid #999;\n display: none;\n}\n.ol-ext-colorpicker.ol-tab .ol-tabbar {\n display: block;\n}\n\n.ol-ext-colorpicker .ol-tabbar > div {\n display: inline-block;\n background-color: #fff;\n padding: 0 .5em;\n border: 1px solid #999;\n border-radius: 2px 2px 0 0;\n position: relative;\n top: 1px;\n cursor: pointer;\n}\n.ol-ext-colorpicker .ol-tabbar > div:nth-child(1) {\n border-bottom-color: #fff;\n}\n.ol-ext-colorpicker.ol-picker-tab .ol-tabbar > div:nth-child(1) {\n border-bottom-color: #999;\n}\n.ol-ext-colorpicker.ol-picker-tab .ol-tabbar > div:nth-child(2) {\n border-bottom-color: #fff;\n}\n\n.ol-ext-colorpicker.ol-popup.ol-tab .ol-popup {\n width: 180px;\n}\n.ol-ext-colorpicker.ol-tab .ol-palette {\n margin: 0 10px;\n}\n.ol-ext-colorpicker.ol-tab .ol-container {\n display: none;\n}\n.ol-ext-colorpicker.ol-tab.ol-picker-tab .ol-container {\n display: block;\n}\n.ol-ext-colorpicker.ol-tab.ol-picker-tab .ol-palette {\n display: none;\n}\n\n.ol-ext-colorpicker.ol-popup .ol-popup {\n width: 340px;\n}\n\n.ol-ext-colorpicker.ol-popup .ol-vignet {\n content: \"\";\n position: absolute;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n border: 0;\n background-color: currentColor;\n pointer-events: none;\n}\n\n.ol-ext-colorpicker .ol-container {\n position: relative;\n display: inline-block;\n vertical-align: top;\n}\n.ol-ext-colorpicker .ol-cursor {\n pointer-events: none;\n}\n\n.ol-ext-colorpicker .ol-picker {\n position: relative;\n cursor: crosshair;\n width: 150px;\n height: 150px;\n border: 5px solid #fff;\n background-color: currentColor;\n background-image: -webkit-gradient(linear, left top, left bottom, from(0), color-stop(#000), to(transparent)),\n -webkit-gradient(linear, left top, right top, from(#fff), to(transparent));\n background-image: linear-gradient(0, #000, transparent),\n linear-gradient(90deg, #fff, transparent);\n}\n.ol-ext-colorpicker .ol-picker .ol-cursor {\n position: absolute;\n left: 50%;\n top: 50%;\n border: 1px solid rgba(0,0,0,.7);\n -webkit-box-shadow: 0 0 0 1px rgba(255,255,255,.7);\n box-shadow: 0 0 0 1px rgba(255,255,255,.7);\n -webkit-transform: translate(-50%, -50%);\n transform: translate(-50%, -50%);\n width: 10px;\n height: 10px;\n border-radius: 50%;\n}\n\n.ol-ext-colorpicker .ol-slider {\n position: relative;\n cursor: crosshair;\n background-color: #fff;\n height: 10px;\n width: 150px;\n margin: 5px 0 10px;\n border: 5px solid #fff;\n border-width: 0 5px;\n background-image: \n linear-gradient(45deg, #aaa 25%, transparent 25%, transparent 75%, #aaa 75%), \n linear-gradient(45deg, #aaa 25%, transparent 25%, transparent 75%, #aaa 75%);\n background-size: 10px 10px;\n background-position: 0 -1px, 5px 4px;\n}\n.ol-ext-colorpicker .ol-slider > div {\n width: 100%;\n height: 100%;\n background-image: linear-gradient(45deg, transparent, #fff);\n pointer-events: none;\n}\n.ol-ext-colorpicker .ol-slider .ol-cursor {\n position: absolute;\n width: 4px;\n height: 12px;\n border: 1px solid #000;\n top: 50%;\n left: 0;\n background: transparent;\n -webkit-transform: translate(-50%, -50%);\n transform: translate(-50%, -50%);\n}\n.ol-ext-colorpicker .ol-tint {\n position: absolute;\n cursor: crosshair;\n width: 10px;\n height: 150px;\n border: 5px solid #fff;\n border-width: 5px 0;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n top: 0;\n right: 5px;\n background-image: -webkit-gradient(linear, left top, left bottom, from(0), color-stop(#f00), color-stop(#f0f), color-stop(#00f), color-stop(#0ff), color-stop(#0f0), color-stop(#ff0), to(#f00));\n background-image: linear-gradient(0, #f00, #f0f, #00f, #0ff, #0f0, #ff0, #f00)\n}\n.ol-ext-colorpicker .ol-tint .ol-cursor {\n position: absolute;\n top: 0;\n left: 50%;\n border: 1px solid #000;\n height: 4px;\n width: 12px;\n -webkit-transform: translate(-50%, -50%);\n transform: translate(-50%, -50%);\n}\n\n.ol-ext-colorpicker .ol-clear {\n position: absolute;\n border: 2px solid #999;\n right: 4px;\n top: 163px;\n width: 10px;\n height: 10px;\n}\n.ol-ext-colorpicker .ol-clear:before,\n.ol-ext-colorpicker .ol-clear:after {\n content: \"\";\n position: absolute;\n width: 15px;\n height: 2px;\n background-color: #999;\n top: 50%;\n left: 50%;\n -webkit-transform: translate(-50%, -50%) rotate(45deg);\n transform: translate(-50%, -50%) rotate(45deg);\n}\n.ol-ext-colorpicker .ol-clear:after {\n -webkit-transform: translate(-50%, -50%) rotate(-45deg);\n transform: translate(-50%, -50%) rotate(-45deg);\n}\n\n.ol-ext-colorpicker.ol-nopacity .ol-slider,\n.ol-ext-colorpicker.ol-nopacity .ol-clear {\n display: none;\n}\n.ol-ext-colorpicker.ol-nopacity .ol-alpha {\n display: none;\n}\n\n.ol-ext-colorpicker .ol-rgb {\n position: relative;\n padding: 5px;\n width: 170px;\n display: none;\n}\n.ol-ext-colorpicker .ol-rgb input {\n width: 25%;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n padding: 0 0 0 2px;\n border: 1px solid #999;\n border-radius: 2px;\n font-size: 13px;\n}\n.ol-ext-colorpicker .ol-rgb input:nth-child(1) {\n\tbackground-color: rgba(255,0,0,.1);\n}\n.ol-ext-colorpicker .ol-rgb input:nth-child(2) {\n\tbackground-color: rgba(0,255,0,.1);\n}\n.ol-ext-colorpicker .ol-rgb input:nth-child(3) {\n\tbackground-color: rgba(0,0,255,.12);\n}\n\n.ol-ext-colorpicker button,\n.ol-ext-colorpicker .ol-txt-color {\n font-size: 13px;\n margin: 0 5px 5px;\n text-align: center;\n width: 170px;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n padding: 0;\n border: 1px solid #999;\n border-radius: 2px;\n display: block;\n}\n.ol-ext-colorpicker .ol-txtcolor {\n width: 170px;\n margin: 0 5px;\n}\n.ol-ext-colorpicker .ol-txtcolor input.ol-txt-color {\n width: 100%;\n margin: 0;\n}\n.ol-ext-colorpicker.eyedropper .ol-txtcolor input.ol-txt-color {\n width: calc(100% - 2em);\n display: inline-block;\n margin: 0;\n height: 2em;\n}\n.ol-ext-colorpicker button {\n background-color: #eee;\n}\n.ol-ext-colorpicker button:hover {\n background-color: #e9e9e9;\n}\n.ol-ext-colorpicker button.ol-eyedropper {\n position: relative;\n width: 2em;\n height: 2em;\n display: inline-block;\n margin: 0;\n vertical-align: middle;\n}\n.ol-ext-colorpicker button.ol-eyedropper::before {\n content: \"\";\n position: absolute;\n width: 100%;\n height: 100%;\n -webkit-mask-image: url(\"data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20width='24'%20height='24'%3e%3cpath%20d='m18.203%203.676%202.121%202.121a1%201%200%200%201%200%201.414l-2.828%202.829%201.767%201.768-1.414%201.414-1.414-1.414L7.243%2021H3v-4.243l9.192-9.192-1.414-1.414%201.414-1.414%201.768%201.767%202.829-2.828a1%201%200%200%201%201.414%200Zm-4.596%205.303-8.564%208.564%201.414%201.414%208.564-8.564-1.414-1.414Z'/%3e%3c/svg%3e\");\n mask-image: url(\"data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20width='24'%20height='24'%3e%3cpath%20d='m18.203%203.676%202.121%202.121a1%201%200%200%201%200%201.414l-2.828%202.829%201.767%201.768-1.414%201.414-1.414-1.414L7.243%2021H3v-4.243l9.192-9.192-1.414-1.414%201.414-1.414%201.768%201.767%202.829-2.828a1%201%200%200%201%201.414%200Zm-4.596%205.303-8.564%208.564%201.414%201.414%208.564-8.564-1.414-1.414Z'/%3e%3c/svg%3e\");\n -webkit-mask-size: 100% 100%;\n mask-size: 100% 100%;\n background-color: #999;\n top: 0;\n left: 0;\n}\n\n.ol-ext-colorpicker .ol-txt-color.ol-error {\n background-color: rgba(255,0,0,.2);\n}\n\n.ol-ext-colorpicker .ol-palette {\n padding: 2px;\n display: inline-block;\n width: 152px;\n}\n.ol-ext-colorpicker .ol-palette > div {\n width: 15px;\n height: 15px;\n display: inline-block;\n background-image: \n linear-gradient(45deg, #aaa 25%, transparent 25%, transparent 75%, #aaa 75%), \n linear-gradient(45deg, #aaa 25%, transparent 25%, transparent 75%, #aaa 75%);\n background-size: 10px 10px;\n background-position: 0 0, 5px 5px;\n margin: 2px;\n -webkit-box-shadow: 0 0 2px 0px #666;\n box-shadow: 0 0 2px 0px #666;\n border-radius: 1px;\n cursor: pointer;\n position: relative;\n}\n.ol-ext-colorpicker .ol-palette > div:before {\n content: \"\";\n position: absolute;\n background-color: currentColor;\n width: 100%;\n height: 100%;\n}\n.ol-ext-colorpicker .ol-palette > div.ol-select:after {\n content: \"\";\n position: absolute;\n width: 6px;\n height: 12px;\n -webkit-box-shadow: 1px 1px #fff, 2px 2px #000;\n box-shadow: 1px 1px #fff, 2px 2px #000;\n top: 30%;\n left: 50%;\n -webkit-transform: translate(-50%, -50%) rotate(45deg);\n transform: translate(-50%, -50%) rotate(45deg);\n}\n.ol-ext-colorpicker .ol-palette > div:hover {\n -webkit-box-shadow: 0 0 2px 1px #d90;\n box-shadow: 0 0 2px 1px #d90;\n}\n.ol-ext-colorpicker .ol-palette hr {\n margin: 0;\n}\n\n.ol-input-hidden {\n position: absolute;\n width: 0;\n height: 0;\n opacity: 0;\n padding: 0;\n margin: 0;\n display: block;\n}\n\n.ol-input-popup {\n display: inline-block;\n position: relative;\n}\n.ol-input-popup .ol-popup {\n position: absolute;\n -webkit-box-shadow: 1px 1px 3px 1px #999;\n box-shadow: 1px 1px 3px 1px #999;\n background-color: #fff;\n z-index: 1;\n display: none;\n left: -5px;\n padding: 0;\n margin: 0;\n list-style: none;\n white-space: nowrap;\n}\n.ol-input-popup.ol-hover:hover .ol-popup,\n.ol-input-popup.ol-focus .ol-popup {\n display: block;\n}\n.ol-input-popup.ol-right .ol-popup {\n left: auto;\n right: -5px;\n}\n.ol-input-popup.ol-middle .ol-popup {\n top: 50%;\n -webkit-transform: translateY(-50%);\n transform: translateY(-50%);\n}\n\n.ol-input-popup .ol-popup li {\n position: relative;\n padding: 10px 5px;\n}\n\n.ol-input-popup li:hover {\n background-color: #ccc;\n}\n.ol-input-popup li.ol-selected {\n background-color: #ccc;\n}\n\n.ol-input-popup.ol-fixed:hover .ol-popup,\n.ol-input-popup.ol-fixed .ol-popup {\n position: relative;\n left: 0;\n -webkit-box-shadow: unset;\n box-shadow: unset;\n background-color: transparent;\n display: inline-block;\n vertical-align: middle;\n}\n.ol-input-popup.ol-fixed.ol-left .ol-popup {\n float: left;\n}\n\n.ol-input-popup > div {\n position: relative;\n display: inline-block;\n vertical-align: middle;\n border-radius: 2px;\n border: 1px solid #999;\n padding: 3px 20px 3px 10px\n}\n.ol-input-popup > div:before {\n position: absolute;\n content: \"\";\n right: 5px;\n top: 50%;\n border: 5px solid transparent;\n border-top: 5px solid #999;\n}\n\n.ol-ext-popup-input {\n display: inline-block;\n vertical-align: top;\n}\n.ol-ext-popup-input.ol-popup {\n position: relative;\n width: 2em;\n height: 1.5em;\n display: inline-block;\n border: 3px solid #fff;\n border-right-width: 1em;\n -webkit-box-shadow: 0 0 2px 1px #666;\n box-shadow: 0 0 2px 1px #666;\n border-radius: 2px;\n -webkit-box-sizing: content-box;\n box-sizing: content-box;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n vertical-align: middle;\n}\n.ol-ext-popup-input.ol-popup:after {\n content: \"\";\n position: absolute;\n border: .5em solid #aaa;\n border-width: .5em .3em 0;\n border-color: #999 transparent;\n right: -.8em;\n top: 50%;\n -webkit-transform: translateY(-50%);\n transform: translateY(-50%);\n pointer-events: none;\n}\n\n.ol-ext-popup-input * {\n -webkit-box-sizing: content-box;\n box-sizing: content-box;\n}\n\n.ol-ext-popup-input.ol-popup .ol-popup {\n position: absolute;\n top: 100%;\n min-width: 3em;\n min-height: 3em;\n left: 0;\n -webkit-box-shadow: 1px 1px 3px 1px #999;\n box-shadow: 1px 1px 3px 1px #999;\n display: block;\n background-color: #fff;\n display: none;\n z-index: 1;\n}\n.ol-ext-popup-input.ol-popup .ol-popup.ol-visible {\n display: block;\n}\n\n.ol-ext-popup-input.ol-popup-fixed .ol-popup {\n position: fixed;\n top: auto;\n left: auto;\n}\n\n.ol-input-popup.ol-size li {\n display: table-cell;\n height: 100%;\n padding: 5px;\n vertical-align: middle;\n}\n\n.ol-input-popup.ol-size li > * {\n background-color: #369;\n border-radius: 50%;\n vertical-align: middle;\n width: 1em;\n height: 1em;\n}\n\n.ol-input-popup.ol-size li > .ol-option-0 {\n position: relative;\n width: 1em;\n height: 1em;\n border: 2px solid currentColor;\n color: #aaa;\n background-color: transparent;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n}\n.ol-input-popup.ol-size li > *:before {\n position: absolute;\n left: 50%;\n top: 50%;\n -webkit-transform: translate(-50%, -50%);\n transform: translate(-50%, -50%);\n}\n.ol-input-popup.ol-size li > .ol-option-0:before {\n content: \"\";\n width: 1em;\n height: 2px;\n background-color: #aaa;\n -webkit-transform: translate(-50%, -50%) rotate(-45deg);\n transform: translate(-50%, -50%) rotate(-45deg);\n}\n\n.ol-input-slider {\n display: inline-block;\n position: relative;\n}\n.ol-input-slider .ol-popup {\n position: absolute;\n -webkit-box-shadow: 1px 1px 3px 1px #999;\n box-shadow: 1px 1px 3px 1px #999;\n background-color: #fff;\n z-index: 1;\n display: none;\n left: -5px;\n}\n.ol-input-slider.ol-right .ol-popup {\n left: auto;\n right: -5px;\n}\n.ol-input-slider.ol-hover:hover .ol-popup,\n.ol-input-slider.ol-focus .ol-popup {\n display: block;\n white-space: nowrap;\n}\n.ol-input-slider.ol-hover:hover .ol-popup > *,\n.ol-input-slider.ol-focus .ol-popup > * {\n display: inline-block;\n vertical-align: middle;\n}\n.ol-input-slider.ol-hover:hover .ol-popup > .ol-before,\n.ol-input-slider.ol-focus .ol-popup > .ol-before {\n margin-left: 10px;\n}\n.ol-input-slider.ol-hover:hover .ol-popup > .ol-after,\n.ol-input-slider.ol-focus .ol-popup > .ol-after {\n margin-right: 10px;\n}\n.ol-input-slider .ol-slider {\n display: inline-block;\n vertical-align: middle;\n position: relative;\n width: 100px;\n height: 3px;\n border: 0 solid transparent;\n border-width: 10px 15px;\n -webkit-box-shadow: inset 0 0 0 1px #999;\n box-shadow: inset 0 0 0 1px #999;\n -webkit-box-sizing: content-box;\n box-sizing: content-box;\n cursor: pointer;\n}\n\n.ol-input-slider .ol-slider > .ol-cursor {\n position: absolute;\n width: 5px;\n height: 10px;\n top: 50%;\n -webkit-transform: translate(-50%, -50%);\n transform: translate(-50%, -50%);\n background-color: #999;\n pointer-events: none;\n}\n.ol-input-range .ol-slider {\n cursor: default;\n width: 150px;\n}\n.ol-input-range .ol-slider > .ol-cursor {\n pointer-events: all;\n cursor: pointer;\n width: 10px;\n border-radius: 50%;\n background-color: rgb(0,60,136);\n}\n.ol-input-range.ol-moving .ol-slider > .ol-cursor {\n pointer-events: none;\n}\n.ol-input-range .ol-slider > .ol-back {\n position: absolute;\n top: 50%;\n -webkit-transform: translateY(-50%);\n transform: translateY(-50%);\n left: 30%;\n right: 20%;\n height: 100%;\n background-color: rgb(0,60,136);\n pointer-events: none;\n}\n\n.ol-input-slider.ol-fixed:hover .ol-popup,\n.ol-input-slider.ol-fixed .ol-popup {\n position: relative;\n left: 0;\n -webkit-box-shadow: unset;\n box-shadow: unset;\n background-color: transparent;\n display: inline-block;\n vertical-align: middle;\n}\n.ol-input-slider.ol-fixed.ol-left .ol-popup {\n float: left;\n}\n\n/* Grow */\n.ol-input-slider.ol-size .ol-slider {\n height: auto;\n -webkit-box-shadow: none;\n box-shadow: none;\n}\n.ol-input-slider.ol-size .ol-slider .ol-back {\n width: 0;\n color: #aaa;\n border: 0 solid transparent;\n border-width: 0 0 20px 100px;\n border-color: currentColor transparent;\n pointer-events: none;\n}\n\n.ol-input-slider.ol-size .ol-slider > .ol-cursor {\n width: 2px;\n height: calc(100% + 4px);\n border-width: 5px 3px;\n border-style: solid;\n border-color: #f00 transparent;\n -o-border-image: initial;\n border-image: initial;\n background-color: transparent;\n -webkit-box-shadow: inset 3px 0px #f00;\n box-shadow: inset 3px 0px #f00;\n}\n\n.ol-input-popup.ol-width li {\n padding: 5px;\n}\n\n\n.ol-input-popup.ol-width li > * {\n background-color: #369;\n width: 100px;\n height: 1em;\n}\n\n.ol-input-popup.ol-width li > .ol-option-0 {\n position: relative;\n height: 1px;\n background-image: linear-gradient(90deg,#aaa 2px, transparent 2px);\n background-color: transparent;\n background-size: 4px;\n}\n`);\n document.adoptedStyleSheets.push(styles);\n ", "import { renderTable } from '#dom'\nimport type { WSIViewerInteractions } from '../interactions/WSIViewerInteractions'\nimport type { ImageViewData } from '#plots/wsiviewer/viewModel/ImageViewData.ts'\nimport type Settings from '#plots/wsiviewer/Settings.ts'\n\nexport class WSIAnnotationsRenderer {\n\tsettings: Settings\n\tinteractions: WSIViewerInteractions\n\twsiApp: any\n\n\tconstructor(wsiApp: any, settings: Settings, wsiinteractions: WSIViewerInteractions) {\n\t\tthis.wsiApp = wsiApp\n\t\tthis.settings = settings\n\t\tthis.interactions = wsiinteractions\n\t}\n\n\trender(holder: any, imageViewData: ImageViewData) {\n\t\tholder.select('div[id=\"annotations-table\"]').remove()\n\t\tif (!imageViewData.tilesTable) return\n\t\tconst selectedColor = '#fcfc8b'\n\t\tconst selectedRowId = 'selected-annotation-row'\n\t\trenderTable({\n\t\t\tcolumns: imageViewData.tilesTable.columns,\n\t\t\trows: imageViewData.tilesTable.rows,\n\t\t\tdiv: holder\n\t\t\t\t.append('div')\n\t\t\t\t.attr('id', 'annotations-table')\n\t\t\t\t.style('margins', '20px')\n\t\t\t\t.style('display', 'inline-block'),\n\t\t\theader: { allowSort: true },\n\t\t\tshowLines: false,\n\t\t\thoverEffects: (tr, row) => {\n\t\t\t\tconst selectedIdx = this.settings.activeAnnotation\n\t\t\t\tconst rowIdx = row[0].value as number\n\t\t\t\tconst isSelected = selectedIdx === rowIdx\n\t\t\t\tconst origColor = tr.style('background-color') || 'transparent'\n\t\t\t\t//Show selected row in yellow on render\n\t\t\t\ttr.style('background-color', isSelected ? selectedColor : origColor)\n\t\t\t\tif (isSelected) {\n\t\t\t\t\ttr.attr('id', selectedRowId)\n\t\t\t\t}\n\t\t\t\ttr.style('outline', 'none') //Remove the default outline on click\n\n\t\t\t\ttr.on('click', () => {\n\t\t\t\t\tthis.wsiApp.app.dispatch({\n\t\t\t\t\t\ttype: 'plot_edit',\n\t\t\t\t\t\tid: this.wsiApp.id,\n\t\t\t\t\t\tconfig: {\n\t\t\t\t\t\t\tsettings: {\n\t\t\t\t\t\t\t\trenderWSIViewer: false,\n\t\t\t\t\t\t\t\trenderAnnotationTable: true,\n\t\t\t\t\t\t\t\tactiveAnnotation: rowIdx\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t})\n\t\t\t\t})\n\t\t\t}\n\t\t})\n\n\t\t// Ensure the selected row is visible after the table is rendered.\n\t\t// Use requestAnimationFrame to run after DOM paint.\n\t\tconst selectedIdx = this.settings.activeAnnotation\n\t\tif (Number.isInteger(selectedIdx)) {\n\t\t\tconst tableDiv = holder.select('div#annotations-table')\n\t\t\tif (!tableDiv.empty()) {\n\t\t\t\trequestAnimationFrame(() => {\n\t\t\t\t\tconst container = tableDiv.node() as HTMLElement | null\n\t\t\t\t\tif (!container) return\n\t\t\t\t\tconst rows = Array.from(container.querySelectorAll('tr'))\n\t\t\t\t\tfor (const tr of rows) {\n\t\t\t\t\t\tconst firstTd = tr.querySelector('td:first-child')\n\t\t\t\t\t\tif (!firstTd) continue\n\t\t\t\t\t\tconst idx = Number.parseInt(firstTd.textContent?.trim() ?? '', 10)\n\t\t\t\t\t\tif (Number.isNaN(idx)) continue\n\t\t\t\t\t\tif (idx === selectedIdx) {\n\t\t\t\t\t\t\t// scrollIntoView to ensure the selected row is visible\n\t\t\t\t\t\t\t;(tr as HTMLElement).scrollIntoView({ block: 'nearest', inline: 'nearest' })\n\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t}\n\t\t}\n\n\t\treturn holder\n\t}\n}\n", "import type TileLayer from 'ol/layer/Tile'\nimport type Zoomify from 'ol/source/Zoomify'\nimport type Settings from '#plots/wsiviewer/Settings.ts'\nimport type { WSIViewerInteractions } from '#plots/wsiviewer/interactions/WSIViewerInteractions.ts'\nimport { icons, Menu } from '#dom'\n\nexport class ThumbnailRenderer {\n\tconstructor() {}\n\n\tpublic render(\n\t\tholder: any,\n\t\tthumbnailsContainer: any,\n\t\tlayers: Array<TileLayer<Zoomify> | null>,\n\t\tsetting: Settings,\n\t\twsiViewerInteractions: WSIViewerInteractions,\n\t\tnumTotalFiles: number\n\t) {\n\t\tif (!thumbnailsContainer) {\n\t\t\t// First-time initialization\n\t\t\tthumbnailsContainer = holder\n\t\t\t\t.append('div')\n\t\t\t\t.attr('id', 'thumbnails')\n\t\t\t\t.style('display', 'none') // Initially hidden\n\t\t\t\t.attr('data-testid', 'sjpp-thumbnails')\n\t\t\t\t.style('width', '600px')\n\t\t\t\t.style('height', '80px')\n\t\t\t\t.style('display', 'flex')\n\t\t\t\t.style('margin-left', '20px')\n\t\t\t\t.style('margin-bottom', '20px')\n\n\t\t\t// Placeholder for left arrow, if needed\n\t\t\tconst leftIconHolder = thumbnailsContainer.append('div').style('display', 'flex').style('align-items', 'center')\n\t\t\t//To show truncated names in tooltip on hover\n\t\t\tconst tooltip = new Menu()\n\n\t\t\t// Calculate the range of thumbnails to display\n\t\t\tconst startIndex = setting.thumbnailRangeStart\n\t\t\tconst endIndex = Math.min(setting.thumbnailRangeStart + setting.numDisplayedThumbnails, layers.length)\n\n\t\t\tfor (let i = startIndex; i < endIndex; i++) {\n\t\t\t\tconst layer = layers[i]\n\t\t\t\tif (!layer) continue // Skip unloaded layers\n\t\t\t\tconst isActive = i === setting.displayedImageIndex\n\t\t\t\tconst thumbnail = thumbnailsContainer\n\t\t\t\t\t.append('div')\n\t\t\t\t\t.attr('id', `thumbnail${i}`)\n\t\t\t\t\t.style('width', setting.thumbnailWidth)\n\t\t\t\t\t.style('height', setting.thumbnailHeight)\n\t\t\t\t\t.style('margin', '0 5px')\n\t\t\t\t\t.style('display', 'flex')\n\t\t\t\t\t.style('flex-direction', 'column')\n\t\t\t\t\t.style('height', 'auto')\n\t\t\t\t\t.style('align-items', 'center')\n\t\t\t\t\t.style('justify-content', 'center')\n\t\t\t\t\t.style('border', isActive ? setting.activeThumbnailBorderStyle : setting.nonActiveThumbnailBorderStyle)\n\t\t\t\t\t.on('click', () => {\n\t\t\t\t\t\twsiViewerInteractions.thumbnailClickListener(i)\n\t\t\t\t\t})\n\n\t\t\t\tthumbnail\n\t\t\t\t\t.append('img')\n\t\t\t\t\t.attr('src', layer.get('preview'))\n\t\t\t\t\t.attr('alt', `Thumbnail ${i}`)\n\t\t\t\t\t.style('max-width', '100%')\n\t\t\t\t\t.style('height', '60px')\n\t\t\t\t\t.style('object-fit', 'cover')\n\n\t\t\t\t// If necessary, truncate long names\n\t\t\t\t// show full name on hover\n\t\t\t\tconst imageName = layer.get('name') || ''\n\t\t\t\tlet name = imageName\n\t\t\t\tif (imageName.length > 9) {\n\t\t\t\t\tname = imageName.substring(0, 6) + '...'\n\t\t\t\t\tthumbnail.on('mouseover', () => {\n\t\t\t\t\t\ttooltip.clear().showunder(thumbnail.node())\n\t\t\t\t\t\ttooltip.d.append('div').style('padding', '5px').text(imageName)\n\t\t\t\t\t})\n\t\t\t\t\tthumbnail.on('mouseout', () => {\n\t\t\t\t\t\ttooltip.clear().hide()\n\t\t\t\t\t})\n\t\t\t\t}\n\n\t\t\t\tthumbnail.append('span').style('font-size', '0.85em').style('text-wrap', 'wrap').text(name)\n\t\t\t}\n\n\t\t\t//Placeholder for right arrow, if needed\n\t\t\tconst rightIconHolder = thumbnailsContainer.append('div').style('display', 'flex').style('align-items', 'center')\n\n\t\t\t/** Only show display arrows (i.e. prev/next buttons) when\n\t\t\t * the num of thumbnails exceeds the num that can be displayed*/\n\t\t\tif (numTotalFiles > setting.numDisplayedThumbnails) {\n\t\t\t\ticons['left'](leftIconHolder, {\n\t\t\t\t\twidth: setting.iconDimensions,\n\t\t\t\t\theight: setting.iconDimensions,\n\t\t\t\t\tdisabled: setting.thumbnailRangeStart === 0,\n\t\t\t\t\thandler: () => {\n\t\t\t\t\t\twsiViewerInteractions.toggleThumbnails(this.newStart(setting, numTotalFiles, true))\n\t\t\t\t\t}\n\t\t\t\t})\n\n\t\t\t\ticons['right'](rightIconHolder, {\n\t\t\t\t\twidth: setting.iconDimensions,\n\t\t\t\t\theight: setting.iconDimensions,\n\t\t\t\t\tdisabled: setting.thumbnailRangeStart + setting.numDisplayedThumbnails >= numTotalFiles,\n\t\t\t\t\thandler: () => {\n\t\t\t\t\t\twsiViewerInteractions.toggleThumbnails(this.newStart(setting, numTotalFiles))\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t}\n\t\t} else {\n\t\t\t// Update borders only for visible thumbnails\n\t\t\tconst startIndex = setting.thumbnailRangeStart\n\t\t\tconst endIndex = Math.min(setting.thumbnailRangeStart + setting.numDisplayedThumbnails, layers.length)\n\n\t\t\tfor (let i = startIndex; i < endIndex; i++) {\n\t\t\t\tconst isActive = i === setting.displayedImageIndex\n\t\t\t\tholder\n\t\t\t\t\t.select(`#thumbnail${i}`)\n\t\t\t\t\t.style('border', isActive ? setting.activeThumbnailBorderStyle : setting.nonActiveThumbnailBorderStyle)\n\t\t\t}\n\t\t}\n\t\treturn thumbnailsContainer\n\t}\n\n\tprivate newStart(setting, numTotalFiles, isLeft = false) {\n\t\tif (isLeft) {\n\t\t\treturn Math.max(0, setting.thumbnailRangeStart - setting.numDisplayedThumbnails)\n\t\t} else {\n\t\t\treturn Math.min(\n\t\t\t\tnumTotalFiles - setting.numDisplayedThumbnails,\n\t\t\t\tsetting.thumbnailRangeStart + setting.numDisplayedThumbnails\n\t\t\t)\n\t\t}\n\t}\n}\n", "/**\n * @module ol/control/OverviewMap\n */\nimport Collection from '../Collection.js';\nimport Map from '../Map.js';\nimport MapEventType from '../MapEventType.js';\nimport MapProperty from '../MapProperty.js';\nimport ObjectEventType from '../ObjectEventType.js';\nimport Overlay from '../Overlay.js';\nimport View from '../View.js';\nimport ViewProperty from '../ViewProperty.js';\nimport {CLASS_COLLAPSED, CLASS_CONTROL, CLASS_UNSELECTABLE} from '../css.js';\nimport {replaceNode} from '../dom.js';\nimport EventType from '../events/EventType.js';\nimport {listen, listenOnce} from '../events.js';\nimport {\n containsExtent,\n equals as equalsExtent,\n getBottomRight,\n getTopLeft,\n scaleFromCenter,\n} from '../extent.js';\nimport {fromExtent as polygonFromExtent} from '../geom/Polygon.js';\nimport Control from './Control.js';\n\n/**\n * Maximum width and/or height extent ratio that determines when the overview\n * map should be zoomed out.\n * @type {number}\n */\nconst MAX_RATIO = 0.75;\n\n/**\n * Minimum width and/or height extent ratio that determines when the overview\n * map should be zoomed in.\n * @type {number}\n */\nconst MIN_RATIO = 0.1;\n\n/**\n * @typedef {Object} Options\n * @property {string} [className='ol-overviewmap'] CSS class name.\n * @property {boolean} [collapsed=true] Whether the control should start collapsed or not (expanded).\n * @property {string|HTMLElement} [collapseLabel='\u2039'] Text label to use for the\n * expanded overviewmap button. Instead of text, also an element (e.g. a `span` element) can be used.\n * @property {boolean} [collapsible=true] Whether the control can be collapsed or not.\n * @property {string|HTMLElement} [label='\u203A'] Text label to use for the collapsed\n * overviewmap button. Instead of text, also an element (e.g. a `span` element) can be used.\n * @property {Array<import(\"../layer/Base.js\").default>|import(\"../Collection.js\").default<import(\"../layer/Base.js\").default>} [layers]\n * Layers for the overview map.\n * @property {function(import(\"../MapEvent.js\").default):void} [render] Function called when the control\n * should be re-rendered. This is called in a `requestAnimationFrame` callback.\n * @property {boolean} [rotateWithView=false] Whether the control view should rotate with the main map view.\n * @property {HTMLElement|string} [target] Specify a target if you want the control\n * to be rendered outside of the map's viewport.\n * @property {string} [tipLabel='Overview map'] Text label to use for the button tip.\n * @property {View} [view] Custom view for the overview map (should use same projection as main map). If not provided,\n * a default view with the same projection as the main map will be used.\n */\n\n/**\n * Create a new control with a map acting as an overview map for another\n * defined map.\n *\n * @api\n */\nclass OverviewMap extends Control {\n /**\n * @param {Options} [options] OverviewMap options.\n */\n constructor(options) {\n options = options ? options : {};\n\n super({\n element: document.createElement('div'),\n render: options.render,\n target: options.target,\n });\n\n /**\n * @private\n */\n this.boundHandleRotationChanged_ = this.handleRotationChanged_.bind(this);\n\n /**\n * @type {boolean}\n * @private\n */\n this.collapsed_ =\n options.collapsed !== undefined ? options.collapsed : true;\n\n /**\n * @private\n * @type {boolean}\n */\n this.collapsible_ =\n options.collapsible !== undefined ? options.collapsible : true;\n\n if (!this.collapsible_) {\n this.collapsed_ = false;\n }\n\n /**\n * @private\n * @type {boolean}\n */\n this.rotateWithView_ =\n options.rotateWithView !== undefined ? options.rotateWithView : false;\n\n /**\n * @private\n * @type {import(\"../extent.js\").Extent|undefined}\n */\n this.viewExtent_ = undefined;\n\n const className =\n options.className !== undefined ? options.className : 'ol-overviewmap';\n\n const tipLabel =\n options.tipLabel !== undefined ? options.tipLabel : 'Overview map';\n\n const collapseLabel =\n options.collapseLabel !== undefined ? options.collapseLabel : '\\u2039';\n\n if (typeof collapseLabel === 'string') {\n /**\n * @private\n * @type {HTMLElement}\n */\n this.collapseLabel_ = document.createElement('span');\n this.collapseLabel_.textContent = collapseLabel;\n } else {\n this.collapseLabel_ = collapseLabel;\n }\n\n const label = options.label !== undefined ? options.label : '\\u203A';\n\n if (typeof label === 'string') {\n /**\n * @private\n * @type {HTMLElement}\n */\n this.label_ = document.createElement('span');\n this.label_.textContent = label;\n } else {\n this.label_ = label;\n }\n\n const activeLabel =\n this.collapsible_ && !this.collapsed_ ? this.collapseLabel_ : this.label_;\n const button = document.createElement('button');\n button.setAttribute('type', 'button');\n button.title = tipLabel;\n button.appendChild(activeLabel);\n\n button.addEventListener(\n EventType.CLICK,\n this.handleClick_.bind(this),\n false,\n );\n\n /**\n * @type {HTMLElement}\n * @private\n */\n this.ovmapDiv_ = document.createElement('div');\n this.ovmapDiv_.className = 'ol-overviewmap-map';\n\n /**\n * Explicitly given view to be used instead of a view derived from the main map.\n * @type {View}\n * @private\n */\n this.view_ = options.view;\n\n const ovmap = new Map({\n view: options.view,\n controls: new Collection(),\n interactions: new Collection(),\n });\n\n /**\n * @type {Map}\n * @private\n */\n this.ovmap_ = ovmap;\n\n if (options.layers) {\n options.layers.forEach(function (layer) {\n ovmap.addLayer(layer);\n });\n }\n\n const box = document.createElement('div');\n box.className = 'ol-overviewmap-box';\n box.style.boxSizing = 'border-box';\n\n /**\n * @type {import(\"../Overlay.js\").default}\n * @private\n */\n this.boxOverlay_ = new Overlay({\n position: [0, 0],\n positioning: 'center-center',\n element: box,\n });\n this.ovmap_.addOverlay(this.boxOverlay_);\n\n const cssClasses =\n className +\n ' ' +\n CLASS_UNSELECTABLE +\n ' ' +\n CLASS_CONTROL +\n (this.collapsed_ && this.collapsible_ ? ' ' + CLASS_COLLAPSED : '') +\n (this.collapsible_ ? '' : ' ol-uncollapsible');\n const element = this.element;\n element.className = cssClasses;\n element.appendChild(this.ovmapDiv_);\n element.appendChild(button);\n\n /* Interactive map */\n\n const overlay = this.boxOverlay_;\n const overlayBox = this.boxOverlay_.getElement();\n\n /* Functions definition */\n\n const computeDesiredMousePosition = (mousePosition) => {\n return {\n clientX: mousePosition.clientX,\n clientY: mousePosition.clientY,\n };\n };\n\n const move = function (event) {\n const position = /** @type {?} */ (computeDesiredMousePosition(event));\n const coordinates = ovmap.getEventCoordinate(\n /** @type {MouseEvent} */ (position),\n );\n\n overlay.setPosition(coordinates);\n };\n\n const endMoving = (event) => {\n const coordinates = ovmap.getEventCoordinateInternal(event);\n\n const map = this.getMap();\n\n map.getView().setCenterInternal(coordinates);\n\n const ownerDocument = map.getOwnerDocument();\n ownerDocument.removeEventListener('pointermove', move);\n ownerDocument.removeEventListener('pointerup', endMoving);\n };\n\n /* Binding */\n\n this.ovmapDiv_.addEventListener('pointerdown', (event) => {\n const ownerDocument = this.getMap().getOwnerDocument();\n if (event.target === overlayBox) {\n ownerDocument.addEventListener('pointermove', move);\n }\n ownerDocument.addEventListener('pointerup', endMoving);\n });\n }\n\n /**\n * Remove the control from its current map and attach it to the new map.\n * Pass `null` to just remove the control from the current map.\n * Subclasses may set up event handlers to get notified about changes to\n * the map here.\n * @param {import(\"../Map.js\").default|null} map Map.\n * @api\n * @override\n */\n setMap(map) {\n const oldMap = this.getMap();\n if (map === oldMap) {\n return;\n }\n if (oldMap) {\n const oldView = oldMap.getView();\n if (oldView) {\n this.unbindView_(oldView);\n }\n this.ovmap_.setTarget(null);\n }\n super.setMap(map);\n\n if (map) {\n this.ovmap_.setTarget(this.ovmapDiv_);\n this.listenerKeys.push(\n listen(\n map,\n ObjectEventType.PROPERTYCHANGE,\n this.handleMapPropertyChange_,\n this,\n ),\n );\n\n const view = map.getView();\n if (view) {\n this.bindView_(view);\n }\n\n if (!this.ovmap_.isRendered()) {\n this.updateBoxAfterOvmapIsRendered_();\n }\n }\n }\n\n /**\n * Handle map property changes. This only deals with changes to the map's view.\n * @param {import(\"../Object.js\").ObjectEvent} event The propertychange event.\n * @private\n */\n handleMapPropertyChange_(event) {\n if (event.key === MapProperty.VIEW) {\n const oldView = /** @type {import(\"../View.js\").default} */ (\n event.oldValue\n );\n if (oldView) {\n this.unbindView_(oldView);\n }\n const newView = this.getMap().getView();\n this.bindView_(newView);\n } else if (\n !this.ovmap_.isRendered() &&\n (event.key === MapProperty.TARGET || event.key === MapProperty.SIZE)\n ) {\n this.ovmap_.updateSize();\n }\n }\n\n /**\n * Register listeners for view property changes.\n * @param {import(\"../View.js\").default} view The view.\n * @private\n */\n bindView_(view) {\n if (!this.view_) {\n // Unless an explicit view definition was given, derive default from whatever main map uses.\n const newView = new View({\n projection: view.getProjection(),\n });\n this.ovmap_.setView(newView);\n }\n\n view.addChangeListener(\n ViewProperty.ROTATION,\n this.boundHandleRotationChanged_,\n );\n // Sync once with the new view\n this.handleRotationChanged_();\n\n if (view.isDef()) {\n this.ovmap_.updateSize();\n this.resetExtent_();\n }\n }\n\n /**\n * Unregister listeners for view property changes.\n * @param {import(\"../View.js\").default} view The view.\n * @private\n */\n unbindView_(view) {\n view.removeChangeListener(\n ViewProperty.ROTATION,\n this.boundHandleRotationChanged_,\n );\n }\n\n /**\n * Handle rotation changes to the main map.\n * @private\n */\n handleRotationChanged_() {\n if (this.rotateWithView_) {\n this.ovmap_.getView().setRotation(this.getMap().getView().getRotation());\n }\n }\n\n /**\n * Reset the overview map extent if the box size (width or\n * height) is less than the size of the overview map size times minRatio\n * or is greater than the size of the overview size times maxRatio.\n *\n * If the map extent was not reset, the box size can fits in the defined\n * ratio sizes. This method then checks if is contained inside the overview\n * map current extent. If not, recenter the overview map to the current\n * main map center location.\n * @private\n */\n validateExtent_() {\n const map = this.getMap();\n const ovmap = this.ovmap_;\n\n if (!map.isRendered() || !ovmap.isRendered()) {\n return;\n }\n\n const mapSize = /** @type {import(\"../size.js\").Size} */ (map.getSize());\n\n const view = map.getView();\n const extent = view.calculateExtentInternal(mapSize);\n\n if (this.viewExtent_ && equalsExtent(extent, this.viewExtent_)) {\n // repeats of the same extent may indicate constraint conflicts leading to an endless cycle\n return;\n }\n this.viewExtent_ = extent;\n\n const ovmapSize = /** @type {import(\"../size.js\").Size} */ (\n ovmap.getSize()\n );\n\n const ovview = ovmap.getView();\n const ovextent = ovview.calculateExtentInternal(ovmapSize);\n\n const topLeftPixel = ovmap.getPixelFromCoordinateInternal(\n getTopLeft(extent),\n );\n const bottomRightPixel = ovmap.getPixelFromCoordinateInternal(\n getBottomRight(extent),\n );\n\n const boxWidth = Math.abs(topLeftPixel[0] - bottomRightPixel[0]);\n const boxHeight = Math.abs(topLeftPixel[1] - bottomRightPixel[1]);\n\n const ovmapWidth = ovmapSize[0];\n const ovmapHeight = ovmapSize[1];\n\n if (\n boxWidth < ovmapWidth * MIN_RATIO ||\n boxHeight < ovmapHeight * MIN_RATIO ||\n boxWidth > ovmapWidth * MAX_RATIO ||\n boxHeight > ovmapHeight * MAX_RATIO\n ) {\n this.resetExtent_();\n } else if (!containsExtent(ovextent, extent)) {\n this.recenter_();\n }\n }\n\n /**\n * Reset the overview map extent to half calculated min and max ratio times\n * the extent of the main map.\n * @private\n */\n resetExtent_() {\n if (MAX_RATIO === 0 || MIN_RATIO === 0) {\n return;\n }\n\n const map = this.getMap();\n const ovmap = this.ovmap_;\n\n const mapSize = /** @type {import(\"../size.js\").Size} */ (map.getSize());\n\n const view = map.getView();\n const extent = view.calculateExtentInternal(mapSize);\n\n const ovview = ovmap.getView();\n\n // get how many times the current map overview could hold different\n // box sizes using the min and max ratio, pick the step in the middle used\n // to calculate the extent from the main map to set it to the overview map,\n const steps = Math.log(MAX_RATIO / MIN_RATIO) / Math.LN2;\n const ratio = 1 / (Math.pow(2, steps / 2) * MIN_RATIO);\n scaleFromCenter(extent, ratio);\n ovview.fitInternal(polygonFromExtent(extent));\n }\n\n /**\n * Set the center of the overview map to the map center without changing its\n * resolution.\n * @private\n */\n recenter_() {\n const map = this.getMap();\n const ovmap = this.ovmap_;\n\n const view = map.getView();\n\n const ovview = ovmap.getView();\n\n ovview.setCenterInternal(view.getCenterInternal());\n }\n\n /**\n * Update the box using the main map extent\n * @private\n */\n updateBox_() {\n const map = this.getMap();\n const ovmap = this.ovmap_;\n\n if (!map.isRendered() || !ovmap.isRendered()) {\n return;\n }\n\n const mapSize = /** @type {import(\"../size.js\").Size} */ (map.getSize());\n\n const view = map.getView();\n\n const ovview = ovmap.getView();\n\n const rotation = this.rotateWithView_ ? 0 : -view.getRotation();\n\n const overlay = this.boxOverlay_;\n const box = this.boxOverlay_.getElement();\n const center = view.getCenter();\n const resolution = view.getResolution();\n const ovresolution = ovview.getResolution();\n const width = (mapSize[0] * resolution) / ovresolution;\n const height = (mapSize[1] * resolution) / ovresolution;\n\n // set position using center coordinates\n overlay.setPosition(center);\n\n // set box size calculated from map extent size and overview map resolution\n if (box) {\n box.style.width = width + 'px';\n box.style.height = height + 'px';\n const transform = 'rotate(' + rotation + 'rad)';\n box.style.transform = transform;\n }\n }\n\n /**\n * @private\n */\n updateBoxAfterOvmapIsRendered_() {\n if (this.ovmapPostrenderKey_) {\n return;\n }\n this.ovmapPostrenderKey_ = listenOnce(\n this.ovmap_,\n MapEventType.POSTRENDER,\n (event) => {\n delete this.ovmapPostrenderKey_;\n this.updateBox_();\n },\n );\n }\n\n /**\n * @param {MouseEvent} event The event to handle\n * @private\n */\n handleClick_(event) {\n event.preventDefault();\n this.handleToggle_();\n }\n\n /**\n * @private\n */\n handleToggle_() {\n this.element.classList.toggle(CLASS_COLLAPSED);\n if (this.collapsed_) {\n replaceNode(this.collapseLabel_, this.label_);\n } else {\n replaceNode(this.label_, this.collapseLabel_);\n }\n this.collapsed_ = !this.collapsed_;\n\n // manage overview map if it had not been rendered before and control\n // is expanded\n const ovmap = this.ovmap_;\n if (!this.collapsed_) {\n if (ovmap.isRendered()) {\n this.viewExtent_ = undefined;\n ovmap.render();\n return;\n }\n ovmap.updateSize();\n this.resetExtent_();\n this.updateBoxAfterOvmapIsRendered_();\n }\n }\n\n /**\n * Return `true` if the overview map is collapsible, `false` otherwise.\n * @return {boolean} True if the widget is collapsible.\n * @api\n */\n getCollapsible() {\n return this.collapsible_;\n }\n\n /**\n * Set whether the overview map should be collapsible.\n * @param {boolean} collapsible True if the widget is collapsible.\n * @api\n */\n setCollapsible(collapsible) {\n if (this.collapsible_ === collapsible) {\n return;\n }\n this.collapsible_ = collapsible;\n this.element.classList.toggle('ol-uncollapsible');\n if (!collapsible && this.collapsed_) {\n this.handleToggle_();\n }\n }\n\n /**\n * Collapse or expand the overview map according to the passed parameter. Will\n * not do anything if the overview map isn't collapsible or if the current\n * collapsed state is already the one requested.\n * @param {boolean} collapsed True if the widget is collapsed.\n * @api\n */\n setCollapsed(collapsed) {\n if (!this.collapsible_ || this.collapsed_ === collapsed) {\n return;\n }\n this.handleToggle_();\n }\n\n /**\n * Determine if the overview map is collapsed.\n * @return {boolean} The overview map is collapsed.\n * @api\n */\n getCollapsed() {\n return this.collapsed_;\n }\n\n /**\n * Return `true` if the overview map view can rotate, `false` otherwise.\n * @return {boolean} True if the control view can rotate.\n * @api\n */\n getRotateWithView() {\n return this.rotateWithView_;\n }\n\n /**\n * Set whether the overview map view should rotate with the main map view.\n * @param {boolean} rotateWithView True if the control view should rotate.\n * @api\n */\n setRotateWithView(rotateWithView) {\n if (this.rotateWithView_ === rotateWithView) {\n return;\n }\n this.rotateWithView_ = rotateWithView;\n if (this.getMap().getView().getRotation() !== 0) {\n if (this.rotateWithView_) {\n this.handleRotationChanged_();\n } else {\n this.ovmap_.getView().setRotation(0);\n }\n this.viewExtent_ = undefined;\n this.validateExtent_();\n this.updateBox_();\n }\n }\n\n /**\n * Return the overview map.\n * @return {import(\"../Map.js\").default} Overview map.\n * @api\n */\n getOverviewMap() {\n return this.ovmap_;\n }\n\n /**\n * Update the overview map element.\n * @param {import(\"../MapEvent.js\").default} mapEvent Map event.\n * @override\n */\n render(mapEvent) {\n this.validateExtent_();\n this.updateBox_();\n }\n}\n\nexport default OverviewMap;\n", "/**\n * @module ol/control/FullScreen\n */\nimport MapProperty from '../MapProperty.js';\nimport {CLASS_CONTROL, CLASS_UNSELECTABLE, CLASS_UNSUPPORTED} from '../css.js';\nimport {replaceNode} from '../dom.js';\nimport EventType from '../events/EventType.js';\nimport {listen, unlistenByKey} from '../events.js';\nimport Control from './Control.js';\n\nconst events = ['fullscreenchange', 'webkitfullscreenchange'];\n\n/**\n * @enum {string}\n */\nconst FullScreenEventType = {\n /**\n * Triggered after the map entered fullscreen.\n * @event FullScreenEventType#enterfullscreen\n * @api\n */\n ENTERFULLSCREEN: 'enterfullscreen',\n\n /**\n * Triggered after the map leave fullscreen.\n * @event FullScreenEventType#leavefullscreen\n * @api\n */\n LEAVEFULLSCREEN: 'leavefullscreen',\n};\n\n/***\n * @template Return\n * @typedef {import(\"../Observable\").OnSignature<import(\"../Observable\").EventTypes|\n * 'enterfullscreen'|'leavefullscreen', import(\"../events/Event.js\").default, Return> &\n * import(\"../Observable\").OnSignature<import(\"../ObjectEventType\").Types, import(\"../Object\").ObjectEvent, Return> &\n * import(\"../Observable\").CombinedOnSignature<import(\"../Observable\").EventTypes|\n * 'enterfullscreen'|'leavefullscreen'|import(\"../ObjectEventType\").Types, Return>} FullScreenOnSignature\n */\n\n/**\n * @typedef {Object} Options\n * @property {string} [className='ol-full-screen'] CSS class name.\n * @property {string|Text|HTMLElement} [label='\\u2922'] Text label to use for the button.\n * Instead of text, also an element (e.g. a `span` element) can be used.\n * @property {string|Text|HTMLElement} [labelActive='\\u00d7'] Text label to use for the\n * button when full-screen is active.\n * Instead of text, also an element (e.g. a `span` element) can be used.\n * @property {string} [activeClassName=className + '-true'] CSS class name for the button\n * when full-screen is active.\n * @property {string} [inactiveClassName=className + '-false'] CSS class name for the button\n * when full-screen is inactive.\n * @property {string} [tipLabel='Toggle full-screen'] Text label to use for the button tip.\n * @property {boolean} [keys=false] Full keyboard access.\n * @property {HTMLElement|string} [target] Specify a target if you want the\n * control to be rendered outside of the map's viewport.\n * @property {HTMLElement|string} [source] The element to be displayed\n * fullscreen. When not provided, the element containing the map viewport will\n * be displayed fullscreen.\n */\n\n/**\n * @classdesc\n * Provides a button that when clicked fills up the full screen with the map.\n * The full screen source element is by default the element containing the map viewport unless\n * overridden by providing the `source` option. In which case, the dom\n * element introduced using this parameter will be displayed in full screen.\n *\n * When in full screen mode, a close button is shown to exit full screen mode.\n * The [Fullscreen API](https://www.w3.org/TR/fullscreen/) is used to\n * toggle the map in full screen mode.\n *\n * @fires FullScreenEventType#enterfullscreen\n * @fires FullScreenEventType#leavefullscreen\n * @api\n */\nclass FullScreen extends Control {\n /**\n * @param {Options} [options] Options.\n */\n constructor(options) {\n options = options ? options : {};\n\n super({\n element: document.createElement('div'),\n target: options.target,\n });\n\n /***\n * @type {FullScreenOnSignature<import(\"../events\").EventsKey>}\n */\n this.on;\n\n /***\n * @type {FullScreenOnSignature<import(\"../events\").EventsKey>}\n */\n this.once;\n\n /***\n * @type {FullScreenOnSignature<void>}\n */\n this.un;\n\n /**\n * @private\n * @type {boolean}\n */\n this.keys_ = options.keys !== undefined ? options.keys : false;\n\n /**\n * @private\n * @type {HTMLElement|string|undefined}\n */\n this.source_ = options.source;\n\n /**\n * @type {boolean}\n * @private\n */\n this.isInFullscreen_ = false;\n\n /**\n * @private\n */\n this.boundHandleMapTargetChange_ = this.handleMapTargetChange_.bind(this);\n\n /**\n * @private\n * @type {string}\n */\n this.cssClassName_ =\n options.className !== undefined ? options.className : 'ol-full-screen';\n\n /**\n * @private\n * @type {Array<import(\"../events.js\").EventsKey>}\n */\n this.documentListeners_ = [];\n\n /**\n * @private\n * @type {Array<string>}\n */\n this.activeClassName_ =\n options.activeClassName !== undefined\n ? options.activeClassName.split(' ')\n : [this.cssClassName_ + '-true'];\n\n /**\n * @private\n * @type {Array<string>}\n */\n this.inactiveClassName_ =\n options.inactiveClassName !== undefined\n ? options.inactiveClassName.split(' ')\n : [this.cssClassName_ + '-false'];\n\n const label = options.label !== undefined ? options.label : '\\u2922';\n\n /**\n * @private\n * @type {Text|HTMLElement}\n */\n this.labelNode_ =\n typeof label === 'string' ? document.createTextNode(label) : label;\n\n const labelActive =\n options.labelActive !== undefined ? options.labelActive : '\\u00d7';\n\n /**\n * @private\n * @type {Text|HTMLElement}\n */\n this.labelActiveNode_ =\n typeof labelActive === 'string'\n ? document.createTextNode(labelActive)\n : labelActive;\n\n const tipLabel = options.tipLabel ? options.tipLabel : 'Toggle full-screen';\n\n /**\n * @private\n * @type {HTMLElement}\n */\n this.button_ = document.createElement('button');\n this.button_.title = tipLabel;\n this.button_.setAttribute('type', 'button');\n this.button_.appendChild(this.labelNode_);\n this.button_.addEventListener(\n EventType.CLICK,\n this.handleClick_.bind(this),\n false,\n );\n this.setClassName_(this.button_, this.isInFullscreen_);\n\n this.element.className = `${this.cssClassName_} ${CLASS_UNSELECTABLE} ${CLASS_CONTROL}`;\n this.element.appendChild(this.button_);\n }\n\n /**\n * @param {MouseEvent} event The event to handle\n * @private\n */\n handleClick_(event) {\n event.preventDefault();\n this.handleFullScreen_();\n }\n\n /**\n * @private\n */\n handleFullScreen_() {\n const map = this.getMap();\n if (!map) {\n return;\n }\n const doc = map.getOwnerDocument();\n if (!isFullScreenSupported(doc)) {\n return;\n }\n if (isFullScreen(doc)) {\n exitFullScreen(doc);\n } else {\n let element;\n if (this.source_) {\n element =\n typeof this.source_ === 'string'\n ? doc.getElementById(this.source_)\n : this.source_;\n } else {\n element = map.getTargetElement();\n }\n if (this.keys_) {\n requestFullScreenWithKeys(element);\n } else {\n requestFullScreen(element);\n }\n }\n }\n\n /**\n * @private\n */\n handleFullScreenChange_() {\n const map = this.getMap();\n if (!map) {\n return;\n }\n const wasInFullscreen = this.isInFullscreen_;\n this.isInFullscreen_ = isFullScreen(map.getOwnerDocument());\n if (wasInFullscreen !== this.isInFullscreen_) {\n this.setClassName_(this.button_, this.isInFullscreen_);\n if (this.isInFullscreen_) {\n replaceNode(this.labelActiveNode_, this.labelNode_);\n this.dispatchEvent(FullScreenEventType.ENTERFULLSCREEN);\n } else {\n replaceNode(this.labelNode_, this.labelActiveNode_);\n this.dispatchEvent(FullScreenEventType.LEAVEFULLSCREEN);\n }\n map.updateSize();\n }\n }\n\n /**\n * @param {HTMLElement} element Target element\n * @param {boolean} fullscreen True if fullscreen class name should be active\n * @private\n */\n setClassName_(element, fullscreen) {\n if (fullscreen) {\n element.classList.remove(...this.inactiveClassName_);\n element.classList.add(...this.activeClassName_);\n } else {\n element.classList.remove(...this.activeClassName_);\n element.classList.add(...this.inactiveClassName_);\n }\n }\n\n /**\n * Remove the control from its current map and attach it to the new map.\n * Pass `null` to just remove the control from the current map.\n * Subclasses may set up event handlers to get notified about changes to\n * the map here.\n * @param {import(\"../Map.js\").default|null} map Map.\n * @api\n * @override\n */\n setMap(map) {\n const oldMap = this.getMap();\n if (oldMap) {\n oldMap.removeChangeListener(\n MapProperty.TARGET,\n this.boundHandleMapTargetChange_,\n );\n }\n\n super.setMap(map);\n\n this.handleMapTargetChange_();\n if (map) {\n map.addChangeListener(\n MapProperty.TARGET,\n this.boundHandleMapTargetChange_,\n );\n }\n }\n\n /**\n * @private\n */\n handleMapTargetChange_() {\n const listeners = this.documentListeners_;\n for (let i = 0, ii = listeners.length; i < ii; ++i) {\n unlistenByKey(listeners[i]);\n }\n listeners.length = 0;\n\n const map = this.getMap();\n if (map) {\n const doc = map.getOwnerDocument();\n if (isFullScreenSupported(doc)) {\n this.element.classList.remove(CLASS_UNSUPPORTED);\n } else {\n this.element.classList.add(CLASS_UNSUPPORTED);\n }\n\n for (let i = 0, ii = events.length; i < ii; ++i) {\n listeners.push(\n listen(doc, events[i], this.handleFullScreenChange_, this),\n );\n }\n this.handleFullScreenChange_();\n }\n }\n}\n\n/**\n * @param {Document} doc The root document to check.\n * @return {boolean} Fullscreen is supported by the current platform.\n */\nfunction isFullScreenSupported(doc) {\n const body = doc.body;\n return !!(\n body['webkitRequestFullscreen'] ||\n (body.requestFullscreen && doc.fullscreenEnabled)\n );\n}\n\n/**\n * @param {Document} doc The root document to check.\n * @return {boolean} Element is currently in fullscreen.\n */\nfunction isFullScreen(doc) {\n return !!(doc['webkitIsFullScreen'] || doc.fullscreenElement);\n}\n\n/**\n * Request to fullscreen an element.\n * @param {HTMLElement} element Element to request fullscreen\n */\nfunction requestFullScreen(element) {\n if (element.requestFullscreen) {\n element.requestFullscreen();\n } else if (element['webkitRequestFullscreen']) {\n element['webkitRequestFullscreen']();\n }\n}\n\n/**\n * Request to fullscreen an element with keyboard input.\n * @param {HTMLElement} element Element to request fullscreen\n */\nfunction requestFullScreenWithKeys(element) {\n if (element['webkitRequestFullscreen']) {\n element['webkitRequestFullscreen']();\n } else {\n requestFullScreen(element);\n }\n}\n\n/**\n * Exit fullscreen.\n * @param {Document} doc The document to exit fullscren from\n */\nfunction exitFullScreen(doc) {\n if (doc.exitFullscreen) {\n doc.exitFullscreen();\n } else if (doc['webkitExitFullscreen']) {\n doc['webkitExitFullscreen']();\n }\n}\n\nexport default FullScreen;\n", "/**\n * @module ol/renderer/canvas/VectorTileLayer\n */\nimport TileState from '../../TileState.js';\nimport ViewHint from '../../ViewHint.js';\nimport {ascending} from '../../array.js';\nimport {wrapX} from '../../coordinate.js';\nimport {\n boundingExtent,\n buffer,\n containsExtent,\n equals,\n getIntersection,\n getTopLeft,\n intersects,\n} from '../../extent.js';\nimport {equivalent, getTransform, transformExtent} from '../../proj.js';\nimport CanvasBuilderGroup from '../../render/canvas/BuilderGroup.js';\nimport CanvasExecutorGroup, {\n DECLUTTER,\n} from '../../render/canvas/ExecutorGroup.js';\nimport ZIndexContext from '../../render/canvas/ZIndexContext.js';\nimport {\n HIT_DETECT_RESOLUTION,\n createHitDetectionImageData,\n hitDetect,\n} from '../../render/canvas/hitdetect.js';\nimport {toSize} from '../../size.js';\nimport {\n apply as applyTransform,\n create as createTransform,\n multiply,\n reset as resetTransform,\n scale,\n scale as scaleTransform,\n translate as translateTransform,\n} from '../../transform.js';\nimport {getUid} from '../../util.js';\nimport {\n getSquaredTolerance as getSquaredRenderTolerance,\n renderFeature,\n} from '../vector.js';\nimport CanvasTileLayerRenderer from './TileLayer.js';\n\n/**\n * @type {!Object<string, Array<import(\"../../render/canvas.js\").BuilderType>>}\n */\nconst IMAGE_REPLAYS = {\n 'image': ['Polygon', 'Circle', 'LineString', 'Image', 'Text'],\n 'hybrid': ['Polygon', 'LineString'],\n 'vector': [],\n};\n\n/**\n * @type {!Object<string, Array<import(\"../../render/canvas.js\").BuilderType>>}\n */\nconst VECTOR_REPLAYS = {\n 'hybrid': ['Image', 'Text', 'Default'],\n 'vector': ['Polygon', 'Circle', 'LineString', 'Image', 'Text', 'Default'],\n};\n\n/**\n * @classdesc\n * Canvas renderer for vector tile layers.\n * @api\n * @extends {CanvasTileLayerRenderer<import(\"../../layer/VectorTile.js\").default<import('../../source/VectorTile.js').default<import('../../Feature.js').FeatureLike>>>}\n */\nclass CanvasVectorTileLayerRenderer extends CanvasTileLayerRenderer {\n /**\n * @param {import(\"../../layer/VectorTile.js\").default} layer VectorTile layer.\n * @param {import(\"./TileLayer.js\").Options} options Options.\n */\n constructor(layer, options) {\n super(layer, options);\n\n /** @private */\n this.boundHandleStyleImageChange_ = this.handleStyleImageChange_.bind(this);\n\n /**\n * @private\n * @type {number}\n */\n this.renderedLayerRevision_;\n\n /**\n * @private\n * @type {import(\"../../transform\").Transform}\n */\n this.renderedPixelToCoordinateTransform_ = null;\n\n /**\n * @private\n * @type {number}\n */\n this.renderedRotation_;\n\n /**\n * @private\n * @type {number}\n */\n this.renderedOpacity_ = 1;\n\n /**\n * @private\n * @type {import(\"../../transform.js\").Transform}\n */\n this.tmpTransform_ = createTransform();\n\n /**\n * @private\n * @type {Array<ZIndexContext>}\n */\n this.tileClipContexts_ = null;\n }\n\n /**\n * Determine whether tiles for next extent should be enqueued for rendering.\n * @return {boolean} Rendering tiles for next extent is supported.\n * @override\n */\n enqueueTilesForNextExtent() {\n return this.getLayer().getRenderMode() !== 'vector';\n }\n\n /**\n * @param {import(\"../../VectorRenderTile.js\").default} tile Tile.\n * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n * @param {number} x Left of the tile.\n * @param {number} y Top of the tile.\n * @param {number} w Width of the tile.\n * @param {number} h Height of the tile.\n * @param {number} gutter Tile gutter.\n * @param {boolean} transition Apply an alpha transition.\n * @override\n */\n drawTile(tile, frameState, x, y, w, h, gutter, transition) {\n this.updateExecutorGroup_(\n tile,\n frameState.pixelRatio,\n frameState.viewState.projection,\n );\n if (this.tileImageNeedsRender_(tile)) {\n this.renderTileImage_(tile, frameState);\n }\n super.drawTile(tile, frameState, x, y, w, h, gutter, transition);\n }\n\n /**\n * @param {number} z Tile coordinate z.\n * @param {number} x Tile coordinate x.\n * @param {number} y Tile coordinate y.\n * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n * @return {import(\"../../Tile.js\").default|null} Tile (or null if outside source extent).\n * @override\n */\n getTile(z, x, y, frameState) {\n const tile = /** @type {import(\"../../VectorRenderTile.js\").default} */ (\n this.getOrCreateTile(z, x, y, frameState)\n );\n if (!tile) {\n return null;\n }\n\n const viewState = frameState.viewState;\n const resolution = viewState.resolution;\n const viewHints = frameState.viewHints;\n const source = this.getLayer().getSource();\n const tileGrid = source.getTileGridForProjection(viewState.projection);\n const hifi = !(\n viewHints[ViewHint.ANIMATING] || viewHints[ViewHint.INTERACTING]\n );\n const withinTileResolutionRange =\n tileGrid.getZForResolution(resolution, source.zDirection) === z;\n if (hifi && withinTileResolutionRange) {\n tile.wantedResolution = resolution;\n } else if (!tile.wantedResolution) {\n tile.wantedResolution = tileGrid.getResolution(z);\n }\n\n return tile;\n }\n\n /**\n * Determine whether render should be called.\n * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n * @return {boolean} Layer is ready to be rendered.\n * @override\n */\n prepareFrame(frameState) {\n const layerRevision = this.getLayer().getRevision();\n if (this.renderedLayerRevision_ !== layerRevision) {\n this.renderedLayerRevision_ = layerRevision;\n this.renderedTiles.length = 0;\n }\n return super.prepareFrame(frameState);\n }\n\n /**\n * @param {import(\"../../VectorRenderTile.js\").default} tile Tile.\n * @param {number} pixelRatio Pixel ratio.\n * @param {import(\"../../proj/Projection.js\").default} projection Projection.\n * @private\n */\n updateExecutorGroup_(tile, pixelRatio, projection) {\n const layer = /** @type {import(\"../../layer/VectorTile.js\").default} */ (\n this.getLayer()\n );\n const revision = layer.getRevision();\n const renderOrder = layer.getRenderOrder() || null;\n\n const resolution = tile.wantedResolution;\n const builderState = tile.getReplayState(layer);\n if (\n !builderState.dirty &&\n builderState.renderedResolution === resolution &&\n builderState.renderedRevision == revision &&\n builderState.renderedPixelRatio === pixelRatio &&\n builderState.renderedRenderOrder == renderOrder\n ) {\n return;\n }\n\n const source = layer.getSource();\n const declutter = !!layer.getDeclutter();\n const sourceTileGrid = source.getTileGrid();\n const tileGrid = source.getTileGridForProjection(projection);\n const tileExtent = tileGrid.getTileCoordExtent(tile.wrappedTileCoord);\n\n const sourceTiles = source.getSourceTiles(pixelRatio, projection, tile);\n const layerUid = getUid(layer);\n delete tile.hitDetectionImageData[layerUid];\n tile.executorGroups[layerUid] = [];\n builderState.dirty = false;\n for (let t = 0, tt = sourceTiles.length; t < tt; ++t) {\n const sourceTile = sourceTiles[t];\n if (sourceTile.getState() != TileState.LOADED) {\n continue;\n }\n const sourceProjection = source.getProjection();\n const sourceTileCoord = sourceTile.tileCoord;\n let sourceTileExtent = sourceTileGrid.getTileCoordExtent(sourceTileCoord);\n if (\n projection &&\n sourceProjection &&\n !equivalent(projection, sourceProjection)\n ) {\n sourceTileExtent = transformExtent(\n sourceTileExtent,\n sourceProjection,\n projection,\n 32,\n );\n }\n\n const sharedExtent = getIntersection(tileExtent, sourceTileExtent);\n const builderExtent = buffer(\n sharedExtent,\n layer.getRenderBuffer() * resolution,\n this.tempExtent,\n );\n const bufferedExtent = equals(sourceTileExtent, sharedExtent)\n ? null\n : builderExtent;\n const builderGroup = new CanvasBuilderGroup(\n 0,\n sharedExtent,\n resolution,\n pixelRatio,\n );\n const squaredTolerance = getSquaredRenderTolerance(\n resolution,\n pixelRatio,\n );\n\n /**\n * @param {import(\"../../Feature.js\").FeatureLike} feature Feature.\n * @param {number} [index] Render order index.\n * @this {CanvasVectorTileLayerRenderer}\n */\n const render = function (feature, index) {\n let styles;\n const styleFunction =\n feature.getStyleFunction() || layer.getStyleFunction();\n if (styleFunction) {\n styles = styleFunction(feature, resolution);\n }\n if (styles) {\n const dirty = this.renderFeature(\n feature,\n squaredTolerance,\n styles,\n builderGroup,\n declutter,\n index,\n );\n builderState.dirty = builderState.dirty || dirty;\n }\n };\n\n const features = sourceTile.getFeatures();\n if (renderOrder && renderOrder !== builderState.renderedRenderOrder) {\n features.sort(renderOrder);\n }\n for (let i = 0, ii = features.length; i < ii; ++i) {\n let feature = features[i];\n if (\n projection &&\n sourceTile.projection &&\n !equivalent(projection, sourceTile.projection)\n ) {\n feature = feature.clone();\n feature\n .getGeometry()\n .applyTransform(getTransform(sourceTile.projection, projection));\n }\n if (\n !bufferedExtent ||\n intersects(bufferedExtent, feature.getGeometry().getExtent())\n ) {\n render.call(this, feature, i);\n }\n }\n const executorGroupInstructions = builderGroup.finish();\n // no need to clip when the render tile is covered by a single source tile\n const replayExtent =\n layer.getRenderMode() !== 'vector' &&\n declutter &&\n sourceTiles.length === 1\n ? null\n : sharedExtent;\n const renderingReplayGroup = new CanvasExecutorGroup(\n replayExtent,\n resolution,\n pixelRatio,\n source.getOverlaps(),\n executorGroupInstructions,\n layer.getRenderBuffer(),\n true,\n );\n tile.executorGroups[layerUid].push(renderingReplayGroup);\n }\n builderState.renderedRevision = revision;\n builderState.renderedPixelRatio = pixelRatio;\n builderState.renderedRenderOrder = renderOrder;\n builderState.renderedResolution = resolution;\n }\n\n /**\n * @param {import(\"../../coordinate.js\").Coordinate} coordinate Coordinate.\n * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n * @param {number} hitTolerance Hit tolerance in pixels.\n * @param {import(\"../vector.js\").FeatureCallback<T>} callback Feature callback.\n * @param {Array<import(\"../Map.js\").HitMatch<T>>} matches The hit detected matches with tolerance.\n * @return {T|undefined} Callback result.\n * @template T\n * @override\n */\n forEachFeatureAtCoordinate(\n coordinate,\n frameState,\n hitTolerance,\n callback,\n matches,\n ) {\n const resolution = frameState.viewState.resolution;\n const rotation = frameState.viewState.rotation;\n hitTolerance = hitTolerance == undefined ? 0 : hitTolerance;\n const layer = this.getLayer();\n const source = layer.getSource();\n const tileGrid = source.getTileGridForProjection(\n frameState.viewState.projection,\n );\n\n const hitExtent = boundingExtent([coordinate]);\n buffer(hitExtent, resolution * hitTolerance, hitExtent);\n\n /** @type {!Object<string, import(\"../Map.js\").HitMatch<T>|true>} */\n const features = {};\n\n /**\n * @param {import(\"../../Feature.js\").FeatureLike} feature Feature.\n * @param {import(\"../../geom/SimpleGeometry.js\").default} geometry Geometry.\n * @param {number} distanceSq The squared distance to the click position.\n * @return {T|undefined} Callback result.\n */\n const featureCallback = function (feature, geometry, distanceSq) {\n let key = feature.getId();\n if (key === undefined) {\n key = getUid(feature);\n }\n const match = features[key];\n if (!match) {\n if (distanceSq === 0) {\n features[key] = true;\n return callback(feature, layer, geometry);\n }\n matches.push(\n (features[key] = {\n feature: feature,\n layer: layer,\n geometry: geometry,\n distanceSq: distanceSq,\n callback: callback,\n }),\n );\n } else if (match !== true && distanceSq < match.distanceSq) {\n if (distanceSq === 0) {\n features[key] = true;\n matches.splice(matches.lastIndexOf(match), 1);\n return callback(feature, layer, geometry);\n }\n match.geometry = geometry;\n match.distanceSq = distanceSq;\n }\n return undefined;\n };\n\n const renderedTiles =\n /** @type {Array<import(\"../../VectorRenderTile.js\").default>} */ (\n this.renderedTiles\n );\n const layerUid = getUid(layer);\n const declutter = layer.getDeclutter();\n const declutteredFeatures = declutter\n ? frameState.declutter?.[declutter]?.all().map((item) => item.value)\n : null;\n let found;\n foundFeature: for (let i = 0, ii = renderedTiles.length; i < ii; ++i) {\n const tile = renderedTiles[i];\n const tileExtent = tileGrid.getTileCoordExtent(tile.wrappedTileCoord);\n if (!intersects(tileExtent, hitExtent)) {\n continue;\n }\n\n const executorGroups = tile.executorGroups[layerUid];\n for (let t = 0, tt = executorGroups.length; t < tt; ++t) {\n found = executorGroups[t].forEachFeatureAtCoordinate(\n coordinate,\n resolution,\n rotation,\n hitTolerance,\n featureCallback,\n declutteredFeatures,\n );\n if (found) {\n break foundFeature;\n }\n }\n }\n return found;\n }\n\n /**\n * Asynchronous layer level hit detection.\n * @param {import(\"../../pixel.js\").Pixel} pixel Pixel.\n * @return {Promise<Array<import(\"../../Feature.js\").FeatureLike>>} Promise that resolves with an array of features.\n * @override\n */\n getFeatures(pixel) {\n if (this.renderedTiles.length === 0) {\n return Promise.resolve([]);\n }\n return new Promise((resolve, reject) => {\n const layer = this.getLayer();\n const source = layer.getSource();\n const projection = this.renderedProjection;\n const projectionExtent = projection.getExtent();\n const resolution = this.renderedResolution;\n const tileGrid = source.getTileGridForProjection(projection);\n const coordinate = applyTransform(\n this.renderedPixelToCoordinateTransform_,\n pixel.slice(),\n );\n const tileCoordString = tileGrid\n .getTileCoordForCoordAndResolution(coordinate, resolution)\n .toString();\n const tile =\n /** @type {Array<import(\"../../VectorRenderTile.js\").default>} */ (\n this.renderedTiles\n ).find(\n (tile) =>\n tile.tileCoord.toString() === tileCoordString &&\n tile.getState() === TileState.LOADED,\n );\n if (!tile || tile.loadingSourceTiles > 0) {\n resolve([]);\n return;\n }\n if (\n source.getWrapX() &&\n projection.canWrapX() &&\n !containsExtent(\n projectionExtent,\n tileGrid.getTileCoordExtent(tile.tileCoord),\n )\n ) {\n wrapX(coordinate, projection);\n }\n const layerUid = getUid(layer);\n const extent = tileGrid.getTileCoordExtent(tile.wrappedTileCoord);\n const corner = getTopLeft(extent);\n const tilePixel = [\n (coordinate[0] - corner[0]) / resolution,\n (corner[1] - coordinate[1]) / resolution,\n ];\n const features = tile\n .getSourceTiles()\n .reduce(\n (accumulator, sourceTile) =>\n accumulator.concat(sourceTile.getFeatures()),\n /** @type {Array<import(\"../../Feature.js\").FeatureLike>} */ ([]),\n );\n let hitDetectionImageData = tile.hitDetectionImageData[layerUid];\n if (!hitDetectionImageData) {\n const tileSize = toSize(\n tileGrid.getTileSize(\n tileGrid.getZForResolution(resolution, source.zDirection),\n ),\n );\n const rotation = this.renderedRotation_;\n const transforms = [\n this.getRenderTransform(\n tileGrid.getTileCoordCenter(tile.wrappedTileCoord),\n resolution,\n 0,\n HIT_DETECT_RESOLUTION,\n tileSize[0] * HIT_DETECT_RESOLUTION,\n tileSize[1] * HIT_DETECT_RESOLUTION,\n 0,\n ),\n ];\n hitDetectionImageData = createHitDetectionImageData(\n tileSize,\n transforms,\n features,\n layer.getStyleFunction(),\n tileGrid.getTileCoordExtent(tile.wrappedTileCoord),\n tile.getReplayState(layer).renderedResolution,\n rotation,\n );\n tile.hitDetectionImageData[layerUid] = hitDetectionImageData;\n }\n resolve(hitDetect(tilePixel, features, hitDetectionImageData));\n });\n }\n\n /**\n * @param {import(\"../../extent.js\").Extent} extent Extent.\n * @return {Array<import('../../Feature.js').FeatureLike>} Features.\n */\n getFeaturesInExtent(extent) {\n /** @type {Array<import('../../Feature.js').FeatureLike>} */\n const features = [];\n const tileCache = this.getTileCache();\n if (tileCache.getCount() === 0) {\n return features;\n }\n const source = this.getLayer().getSource();\n const tileGrid = source.getTileGridForProjection(\n this.frameState.viewState.projection,\n );\n const z = tileGrid.getZForResolution(this.renderedResolution);\n /** @type {Object<string, true>} */\n const visitedSourceTiles = {};\n tileCache.forEach((tile) => {\n if (tile.tileCoord[0] !== z || tile.getState() !== TileState.LOADED) {\n return;\n }\n const sourceTiles = tile.getSourceTiles();\n for (let i = 0, ii = sourceTiles.length; i < ii; ++i) {\n const sourceTile = sourceTiles[i];\n const key = sourceTile.getKey();\n if (key in visitedSourceTiles) {\n continue;\n }\n visitedSourceTiles[key] = true;\n const tileCoord = sourceTile.tileCoord;\n if (intersects(extent, tileGrid.getTileCoordExtent(tileCoord))) {\n const tileFeatures = sourceTile.getFeatures();\n if (tileFeatures) {\n for (let j = 0, jj = tileFeatures.length; j < jj; ++j) {\n const candidate = tileFeatures[j];\n const geometry = candidate.getGeometry();\n if (intersects(extent, geometry.getExtent())) {\n features.push(candidate);\n }\n }\n }\n }\n }\n });\n return features;\n }\n\n /**\n * Perform action necessary to get the layer rendered after new fonts have loaded\n * @override\n */\n handleFontsChanged() {\n const layer = this.getLayer();\n if (layer.getVisible() && this.renderedLayerRevision_ !== undefined) {\n layer.changed();\n }\n }\n\n /**\n * Handle changes in image style state.\n * @param {import(\"../../events/Event.js\").default} event Image style change event.\n * @private\n */\n handleStyleImageChange_(event) {\n this.renderIfReadyAndVisible();\n }\n\n /**\n * Render declutter items for this layer\n * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n * @param {import(\"../../layer/Layer.js\").State} layerState Layer state.\n */\n renderDeclutter(frameState, layerState) {\n const context = this.context;\n const alpha = context.globalAlpha;\n context.globalAlpha = layerState.opacity;\n const viewHints = frameState.viewHints;\n const hifi = !(\n viewHints[ViewHint.ANIMATING] || viewHints[ViewHint.INTERACTING]\n );\n const scaledCanvasSize = [\n this.context.canvas.width,\n this.context.canvas.height,\n ];\n const declutter = this.getLayer().getDeclutter();\n const declutterTree = declutter\n ? frameState.declutter?.[declutter]\n : undefined;\n const layerUid = getUid(this.getLayer());\n const tiles =\n /** @type {Array<import(\"../../VectorRenderTile.js\").default>} */ (\n this.renderedTiles\n );\n for (let i = 0, ii = tiles.length; i < ii; ++i) {\n const tile = tiles[i];\n const executorGroups = tile.executorGroups[layerUid];\n if (executorGroups) {\n for (let j = executorGroups.length - 1; j >= 0; --j) {\n executorGroups[j].execute(\n this.context,\n scaledCanvasSize,\n this.getTileRenderTransform(tile, frameState),\n frameState.viewState.rotation,\n hifi,\n DECLUTTER,\n declutterTree,\n );\n }\n }\n }\n context.globalAlpha = alpha;\n }\n\n /**\n * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n * @override\n */\n renderDeferredInternal(frameState) {\n const tiles =\n /** @type {Array<import(\"../../VectorRenderTile.js\").default>} */ (\n this.renderedTiles\n );\n const layerUid = getUid(this.getLayer());\n const executorGroups = tiles.reduce((acc, tile, index) => {\n tile.executorGroups[layerUid].forEach((executorGroup) =>\n acc.push({\n executorGroup,\n index,\n }),\n );\n return acc;\n }, /** @type {Array<{executorGroup: CanvasExecutorGroup, index: number}>} */ ([]));\n\n const executorGroupZIndexContexts = executorGroups.map(({executorGroup}) =>\n executorGroup.getDeferredZIndexContexts(),\n );\n /** @type {Object<number, true>} */\n const usedZIndices = {};\n for (let i = 0, ii = executorGroups.length; i < ii; ++i) {\n const executorGroupZindexContext =\n executorGroups[i].executorGroup.getDeferredZIndexContexts();\n for (const key in executorGroupZindexContext) {\n usedZIndices[key] = true;\n }\n }\n const zIndexKeys = Object.keys(usedZIndices).map(Number).sort(ascending);\n zIndexKeys.forEach((zIndex) => {\n executorGroupZIndexContexts.forEach((zIndexContexts, i) => {\n if (!zIndexContexts[zIndex]) {\n return;\n }\n zIndexContexts[zIndex].forEach((zIndexContext) => {\n const {executorGroup, index} = executorGroups[i];\n const context = executorGroup.getRenderedContext();\n const alpha = context.globalAlpha;\n context.globalAlpha = this.renderedOpacity_;\n const tileClipContext = this.tileClipContexts_[index];\n if (tileClipContext) {\n tileClipContext.draw(context);\n }\n zIndexContext.draw(context);\n if (tileClipContext) {\n context.restore();\n }\n context.globalAlpha = alpha;\n zIndexContext.clear();\n });\n zIndexContexts[zIndex].length = 0;\n });\n });\n }\n\n /**\n * @param {import(\"../../VectorRenderTile.js\").default} tile The tile\n * @param {import('../../Map.js').FrameState} frameState Current frame state\n * @return {import('../../transform.js').Transform} Transform to use to render this tile\n */\n getTileRenderTransform(tile, frameState) {\n const pixelRatio = frameState.pixelRatio;\n const viewState = frameState.viewState;\n const center = viewState.center;\n const resolution = viewState.resolution;\n const rotation = viewState.rotation;\n const size = frameState.size;\n const width = Math.round(size[0] * pixelRatio);\n const height = Math.round(size[1] * pixelRatio);\n\n const source = this.getLayer().getSource();\n const tileGrid = source.getTileGridForProjection(\n frameState.viewState.projection,\n );\n const tileCoord = tile.tileCoord;\n const tileExtent = tileGrid.getTileCoordExtent(tile.wrappedTileCoord);\n const worldOffset =\n tileGrid.getTileCoordExtent(tileCoord, this.tempExtent)[0] -\n tileExtent[0];\n const transform = multiply(\n scale(this.inversePixelTransform.slice(), 1 / pixelRatio, 1 / pixelRatio),\n this.getRenderTransform(\n center,\n resolution,\n rotation,\n pixelRatio,\n width,\n height,\n worldOffset,\n ),\n );\n return transform;\n }\n\n /**\n * Render the vectors for this layer.\n * @param {CanvasRenderingContext2D|OffscreenCanvasRenderingContext2D} context Target context.\n * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n * @override\n */\n postRender(context, frameState) {\n const viewHints = frameState.viewHints;\n const hifi = !(\n viewHints[ViewHint.ANIMATING] || viewHints[ViewHint.INTERACTING]\n );\n\n this.renderedPixelToCoordinateTransform_ =\n frameState.pixelToCoordinateTransform.slice();\n this.renderedRotation_ = frameState.viewState.rotation;\n this.renderedOpacity_ =\n frameState.layerStatesArray[frameState.layerIndex].opacity;\n\n const layer = /** @type {import(\"../../layer/VectorTile.js\").default} */ (\n this.getLayer()\n );\n const renderMode = layer.getRenderMode();\n const alpha = context.globalAlpha;\n context.globalAlpha = this.renderedOpacity_;\n const declutter = layer.getDeclutter();\n const replayTypes = declutter\n ? VECTOR_REPLAYS[renderMode].filter((type) => !DECLUTTER.includes(type))\n : VECTOR_REPLAYS[renderMode];\n const viewState = frameState.viewState;\n const rotation = viewState.rotation;\n const tileSource = layer.getSource();\n const tileGrid = tileSource.getTileGridForProjection(viewState.projection);\n const z = tileGrid.getZForResolution(\n viewState.resolution,\n tileSource.zDirection,\n );\n\n const tiles =\n /** @type {Array<import(\"../../VectorRenderTile.js\").default>} */ (\n this.renderedTiles\n );\n const clips = [];\n const clipZs = [];\n const tileClipContexts = [];\n const layerUid = getUid(layer);\n let ready = true;\n for (let i = tiles.length - 1; i >= 0; --i) {\n const tile = tiles[i];\n ready = ready && !tile.getReplayState(layer).dirty;\n const executorGroups = tile.executorGroups[layerUid].filter((group) =>\n group.hasExecutors(replayTypes),\n );\n if (executorGroups.length === 0) {\n continue;\n }\n const transform = this.getTileRenderTransform(tile, frameState);\n const currentZ = tile.tileCoord[0];\n let contextSaved = false;\n // Clip mask for regions in this tile that already filled by a higher z tile\n const currentClip = executorGroups[0].getClipCoords(transform);\n let clipContext = context;\n let tileClipContext;\n if (currentClip) {\n tileClipContext = new ZIndexContext();\n clipContext = tileClipContext.getContext();\n for (let j = 0, jj = clips.length; j < jj; ++j) {\n if (z !== currentZ && currentZ < clipZs[j]) {\n const clip = clips[j];\n if (\n intersects(\n [\n currentClip[0],\n currentClip[3],\n currentClip[4],\n currentClip[7],\n ],\n [clip[0], clip[3], clip[4], clip[7]],\n )\n ) {\n if (!contextSaved) {\n clipContext.save();\n contextSaved = true;\n }\n clipContext.beginPath();\n // counter-clockwise (outer ring) for current tile\n clipContext.moveTo(currentClip[0], currentClip[1]);\n clipContext.lineTo(currentClip[2], currentClip[3]);\n clipContext.lineTo(currentClip[4], currentClip[5]);\n clipContext.lineTo(currentClip[6], currentClip[7]);\n // clockwise (inner ring) for higher z tile\n clipContext.moveTo(clip[6], clip[7]);\n clipContext.lineTo(clip[4], clip[5]);\n clipContext.lineTo(clip[2], clip[3]);\n clipContext.lineTo(clip[0], clip[1]);\n clipContext.clip();\n }\n }\n }\n clips.push(currentClip);\n clipZs.push(currentZ);\n }\n for (let t = 0, tt = executorGroups.length; t < tt; ++t) {\n const executorGroup = executorGroups[t];\n executorGroup.execute(\n context,\n [context.canvas.width, context.canvas.height],\n transform,\n rotation,\n hifi,\n replayTypes,\n frameState.declutter?.[declutter],\n );\n }\n if (contextSaved) {\n if (clipContext === context) {\n clipContext.restore();\n } else {\n tileClipContexts[i] = tileClipContext;\n }\n }\n }\n context.globalAlpha = alpha;\n this.ready = ready;\n this.tileClipContexts_ = tileClipContexts;\n if (!frameState.declutter) {\n this.renderDeferredInternal(frameState);\n }\n\n super.postRender(context, frameState);\n }\n\n /**\n * @param {import(\"../../Feature.js\").FeatureLike} feature Feature.\n * @param {number} squaredTolerance Squared tolerance.\n * @param {import(\"../../style/Style.js\").default|Array<import(\"../../style/Style.js\").default>} styles The style or array of styles.\n * @param {import(\"../../render/canvas/BuilderGroup.js\").default} builderGroup Replay group.\n * @param {boolean} [declutter] Enable decluttering.\n * @param {number} [index] Render order index.\n * @return {boolean} `true` if an image is loading.\n */\n renderFeature(\n feature,\n squaredTolerance,\n styles,\n builderGroup,\n declutter,\n index,\n ) {\n if (!styles) {\n return false;\n }\n let loading = false;\n if (Array.isArray(styles)) {\n for (let i = 0, ii = styles.length; i < ii; ++i) {\n loading =\n renderFeature(\n builderGroup,\n feature,\n styles[i],\n squaredTolerance,\n this.boundHandleStyleImageChange_,\n undefined,\n declutter,\n index,\n ) || loading;\n }\n } else {\n loading = renderFeature(\n builderGroup,\n feature,\n styles,\n squaredTolerance,\n this.boundHandleStyleImageChange_,\n undefined,\n declutter,\n index,\n );\n }\n return loading;\n }\n\n /**\n * @param {import(\"../../VectorRenderTile.js\").default} tile Tile.\n * @return {boolean} A new tile image was rendered.\n * @private\n */\n tileImageNeedsRender_(tile) {\n const layer = /** @type {import(\"../../layer/VectorTile.js\").default} */ (\n this.getLayer()\n );\n if (layer.getRenderMode() === 'vector') {\n return false;\n }\n const replayState = tile.getReplayState(layer);\n const revision = layer.getRevision();\n const resolution = tile.wantedResolution;\n const tileImageNeedsRender =\n replayState.renderedTileResolution !== resolution ||\n replayState.renderedTileRevision !== revision;\n return tileImageNeedsRender;\n }\n\n /**\n * @param {import(\"../../VectorRenderTile.js\").default} tile Tile.\n * @param {import(\"../../Map\").FrameState} frameState Frame state.\n * @private\n */\n renderTileImage_(tile, frameState) {\n const layer = /** @type {import(\"../../layer/VectorTile.js\").default} */ (\n this.getLayer()\n );\n const replayState = tile.getReplayState(layer);\n const revision = layer.getRevision();\n const executorGroups = tile.executorGroups[getUid(layer)];\n replayState.renderedTileRevision = revision;\n\n const tileCoord = tile.wrappedTileCoord;\n const z = tileCoord[0];\n const source = layer.getSource();\n let pixelRatio = frameState.pixelRatio;\n const viewState = frameState.viewState;\n const projection = viewState.projection;\n const tileGrid = source.getTileGridForProjection(projection);\n const tileResolution = tileGrid.getResolution(tile.tileCoord[0]);\n const renderPixelRatio =\n (frameState.pixelRatio / tile.wantedResolution) * tileResolution;\n const resolution = tileGrid.getResolution(z);\n const context = tile.getContext();\n\n // Increase tile size when overzooming for low pixel ratio, to avoid blurry tiles\n pixelRatio = Math.round(\n Math.max(pixelRatio, renderPixelRatio / pixelRatio),\n );\n const size = source.getTilePixelSize(z, pixelRatio, projection);\n context.canvas.width = size[0];\n context.canvas.height = size[1];\n const renderScale = pixelRatio / renderPixelRatio;\n if (renderScale !== 1) {\n const canvasTransform = resetTransform(this.tmpTransform_);\n scaleTransform(canvasTransform, renderScale, renderScale);\n context.setTransform.apply(context, canvasTransform);\n }\n const tileExtent = tileGrid.getTileCoordExtent(tileCoord, this.tempExtent);\n const pixelScale = renderPixelRatio / resolution;\n const transform = resetTransform(this.tmpTransform_);\n scaleTransform(transform, pixelScale, -pixelScale);\n translateTransform(transform, -tileExtent[0], -tileExtent[3]);\n for (let i = 0, ii = executorGroups.length; i < ii; ++i) {\n const executorGroup = executorGroups[i];\n executorGroup.execute(\n context,\n [\n context.canvas.width * renderScale,\n context.canvas.height * renderScale,\n ],\n transform,\n 0,\n true,\n IMAGE_REPLAYS[layer.getRenderMode()],\n null,\n );\n }\n replayState.renderedTileResolution = tile.wantedResolution;\n }\n}\n\nexport default CanvasVectorTileLayerRenderer;\n", "/**\n * @module ol/layer/VectorTile\n */\nimport {assert} from '../asserts.js';\nimport CanvasVectorTileLayerRenderer from '../renderer/canvas/VectorTileLayer.js';\nimport BaseVectorLayer from './BaseVector.js';\nimport TileProperty from './TileProperty.js';\n\n/***\n * @template Return\n * @typedef {import(\"../Observable\").OnSignature<import(\"../Observable\").EventTypes, import(\"../events/Event.js\").default, Return> &\n * import(\"../Observable\").OnSignature<import(\"./Base\").BaseLayerObjectEventTypes|\n * import(\"./Layer.js\").LayerEventType|'change:preload'|'change:useInterimTilesOnError', import(\"../Object\").ObjectEvent, Return> &\n * import(\"../Observable\").OnSignature<import(\"../render/EventType\").LayerRenderEventTypes, import(\"../render/Event\").default, Return> &\n * import(\"../Observable\").CombinedOnSignature<import(\"../Observable\").EventTypes|import(\"./Base\").BaseLayerObjectEventTypes|\n * import(\"./Layer.js\").LayerEventType|'change:preload'|'change:useInterimTilesOnError'|import(\"../render/EventType\").LayerRenderEventTypes, Return>} VectorTileLayerOnSignature\n */\n\n/**\n * @typedef {'hybrid' | 'vector'} VectorTileRenderType\n */\n\n/***\n * @template T\n * @typedef {T extends import(\"../source/VectorTile.js\").default<infer U extends import(\"../Feature.js\").FeatureLike> ? U : never} ExtractedFeatureType\n */\n\n/**\n * @template {import(\"../source/VectorTile.js\").default<FeatureType>} [VectorTileSourceType=import(\"../source/VectorTile.js\").default<*>]\n * @template {import(\"../Feature\").FeatureLike} [FeatureType=ExtractedFeatureType<VectorTileSourceType>]\n * @typedef {Object} Options\n * @property {string} [className='ol-layer'] A CSS class name to set to the layer element.\n * @property {number} [opacity=1] Opacity (0, 1).\n * @property {boolean} [visible=true] Visibility.\n * @property {import(\"../extent.js\").Extent} [extent] The bounding extent for layer rendering. The layer will not be\n * rendered outside of this extent.\n * @property {number} [zIndex] The z-index for layer rendering. At rendering time, the layers\n * will be ordered, first by Z-index and then by position. When `undefined`, a `zIndex` of 0 is assumed\n * for layers that are added to the map's `layers` collection, or `Infinity` when the layer's `setMap()`\n * method was used.\n * @property {number} [minResolution] The minimum resolution (inclusive) at which this layer will be\n * visible.\n * @property {number} [maxResolution] The maximum resolution (exclusive) below which this layer will\n * be visible.\n * @property {number} [minZoom] The minimum view zoom level (exclusive) above which this layer will be\n * visible.\n * @property {number} [maxZoom] The maximum view zoom level (inclusive) at which this layer will\n * be visible.\n * @property {import(\"../render.js\").OrderFunction} [renderOrder] Render order. Function to be used when sorting\n * features before rendering. By default features are drawn in the order that they are created. Use\n * `null` to avoid the sort, but get an undefined draw order.\n * @property {number} [renderBuffer=100] The buffer in pixels around the tile extent used by the\n * renderer when getting features from the vector tile for the rendering or hit-detection.\n * Recommended value: Vector tiles are usually generated with a buffer, so this value should match\n * the largest possible buffer of the used tiles. It should be at least the size of the largest\n * point symbol or line width.\n * @property {VectorTileRenderType} [renderMode='hybrid'] Render mode for vector tiles:\n * `'hybrid'`: Polygon and line elements are rendered as images, so pixels are scaled during zoom\n * animations. Point symbols and texts are accurately rendered as vectors and can stay upright on\n * rotated views, but get lifted above all polygon and line elements.\n * `'vector'`: Everything is rendered as vectors and the original render order is maintained. Use\n * this mode for improved performance and visual epxerience on vector tile layers with not too many\n * rendered features (e.g. for highlighting a subset of features of another layer with the same\n * source).\n * @property {VectorTileSourceType} [source] Source.\n * @property {import(\"../Map.js\").default} [map] Sets the layer as overlay on a map. The map will not manage\n * this layer in its layers collection, and the layer will be rendered on top. This is useful for\n * temporary layers. The standard way to add a layer to a map and have it managed by the map is to\n * use [map.addLayer()]{@link import(\"../Map.js\").default#addLayer}.\n * @property {boolean|string|number} [declutter=false] Declutter images and text. Any truthy value will enable\n * decluttering. Within a layer, a feature rendered before another has higher priority. All layers with the\n * same `declutter` value will be decluttered together. The priority is determined by the drawing order of the\n * layers with the same `declutter` value. Higher in the layer stack means higher priority. To declutter distinct\n * layers or groups of layers separately, use different truthy values for `declutter`.\n * @property {import(\"../style/Style.js\").StyleLike|import(\"../style/flat.js\").FlatStyleLike|null} [style] Layer\n * style. When set to `null`, only\n * features that have their own style will be rendered. See {@link module:ol/style/Style~Style} for the default style\n * which will be used if this is not set.\n * @property {import(\"./Base.js\").BackgroundColor} [background] Background color for the layer. If not specified, no\n * background will be rendered.\n * @property {boolean} [updateWhileAnimating=false] When set to `true`, feature batches will be\n * recreated during animations. This means that no vectors will be shown clipped, but the setting\n * will have a performance impact for large amounts of vector data. When set to `false`, batches\n * will be recreated when no animation is active.\n * @property {boolean} [updateWhileInteracting=false] When set to `true`, feature batches will be\n * recreated during interactions. See also `updateWhileAnimating`.\n * @property {number} [preload=0] Preload. Load low-resolution tiles up to `preload` levels. `0`\n * means no preloading.\n * @property {boolean} [useInterimTilesOnError=true] Deprecated. Use interim tiles on error.\n * @property {Object<string, *>} [properties] Arbitrary observable properties. Can be accessed with `#get()` and `#set()`.\n * @property {number} [cacheSize=0] The internal tile cache size. If too small, this will auto-grow to hold\n * two zoom levels worth of tiles.\n */\n\n/**\n * @classdesc\n * Layer for vector tile data that is rendered client-side.\n * Note that any property set in the options is set as a {@link module:ol/Object~BaseObject}\n * property on the layer object; for example, setting `title: 'My Title'` in the\n * options means that `title` is observable, and has get/set accessors.\n *\n * @template {import(\"../source/VectorTile.js\").default<FeatureType>} [VectorTileSourceType=import(\"../source/VectorTile.js\").default<*>]\n * @template {import(\"../Feature.js\").FeatureLike} [FeatureType=ExtractedFeatureType<VectorTileSourceType>]\n * @extends {BaseVectorLayer<FeatureType, VectorTileSourceType, CanvasVectorTileLayerRenderer>}\n * @api\n */\nclass VectorTileLayer extends BaseVectorLayer {\n /**\n * @param {Options<VectorTileSourceType, FeatureType>} [options] Options.\n */\n constructor(options) {\n options = options ? options : {};\n\n const baseOptions = Object.assign({}, options);\n delete baseOptions.preload;\n const cacheSize = options.cacheSize === undefined ? 0 : options.cacheSize;\n delete options.cacheSize;\n delete baseOptions.useInterimTilesOnError;\n\n super(baseOptions);\n\n /***\n * @type {VectorTileLayerOnSignature<import(\"../events\").EventsKey>}\n */\n this.on;\n\n /***\n * @type {VectorTileLayerOnSignature<import(\"../events\").EventsKey>}\n */\n this.once;\n\n /***\n * @type {VectorTileLayerOnSignature<void>}\n */\n this.un;\n\n /**\n * @type {number|undefined}\n * @private\n */\n this.cacheSize_ = cacheSize;\n\n const renderMode = options.renderMode || 'hybrid';\n assert(\n renderMode == 'hybrid' || renderMode == 'vector',\n \"`renderMode` must be `'hybrid'` or `'vector'`\",\n );\n\n /**\n * @private\n * @type {VectorTileRenderType}\n */\n this.renderMode_ = renderMode;\n\n this.setPreload(options.preload ? options.preload : 0);\n this.setUseInterimTilesOnError(\n options.useInterimTilesOnError !== undefined\n ? options.useInterimTilesOnError\n : true,\n );\n\n /**\n * @return {import(\"./Base.js\").BackgroundColor} Background color.\n * @function\n * @api\n */\n this.getBackground;\n\n /**\n * @param {import(\"./Base.js\").BackgroundColor} background Background color.\n * @function\n * @api\n */\n this.setBackground;\n }\n\n /**\n * @override\n */\n createRenderer() {\n return new CanvasVectorTileLayerRenderer(this, {\n cacheSize: this.cacheSize_,\n });\n }\n\n /**\n * Get the topmost feature that intersects the given pixel on the viewport. Returns a promise\n * that resolves with an array of features. The array will either contain the topmost feature\n * when a hit was detected, or it will be empty.\n *\n * The hit detection algorithm used for this method is optimized for performance, but is less\n * accurate than the one used in [map.getFeaturesAtPixel()]{@link import(\"../Map.js\").default#getFeaturesAtPixel}.\n * Text is not considered, and icons are only represented by their bounding box instead of the exact\n * image.\n *\n * @param {import(\"../pixel.js\").Pixel} pixel Pixel.\n * @return {Promise<Array<import(\"../Feature\").FeatureLike>>} Promise that resolves with an array of features.\n * @api\n * @override\n */\n getFeatures(pixel) {\n return super.getFeatures(pixel);\n }\n\n /**\n * Get features whose bounding box intersects the provided extent. Only features for cached\n * tiles for the last rendered zoom level are available in the source. So this method is only\n * suitable for requesting tiles for extents that are currently rendered.\n *\n * Features are returned in random tile order and as they are included in the tiles. This means\n * they can be clipped, duplicated across tiles, and simplified to the render resolution.\n *\n * @param {import(\"../extent.js\").Extent} extent Extent.\n * @return {Array<FeatureType>} Features.\n * @api\n */\n getFeaturesInExtent(extent) {\n return /** @type {Array<FeatureType>} */ (\n /** @type {*} */ (this.getRenderer().getFeaturesInExtent(extent))\n );\n }\n\n /**\n * @return {VectorTileRenderType} The render mode.\n */\n getRenderMode() {\n return this.renderMode_;\n }\n\n /**\n * Return the level as number to which we will preload tiles up to.\n * @return {number} The level to preload tiles up to.\n * @observable\n * @api\n */\n getPreload() {\n return /** @type {number} */ (this.get(TileProperty.PRELOAD));\n }\n\n /**\n * Deprecated. Whether we use interim tiles on error.\n * @return {boolean} Use interim tiles on error.\n * @observable\n * @api\n */\n getUseInterimTilesOnError() {\n return /** @type {boolean} */ (\n this.get(TileProperty.USE_INTERIM_TILES_ON_ERROR)\n );\n }\n\n /**\n * Set the level as number to which we will preload tiles up to.\n * @param {number} preload The level to preload tiles up to.\n * @observable\n * @api\n */\n setPreload(preload) {\n this.set(TileProperty.PRELOAD, preload);\n }\n\n /**\n * Deprecated. Set whether we use interim tiles on error.\n * @param {boolean} useInterimTilesOnError Use interim tiles on error.\n * @observable\n * @api\n */\n setUseInterimTilesOnError(useInterimTilesOnError) {\n this.set(TileProperty.USE_INTERIM_TILES_ON_ERROR, useInterimTilesOnError);\n }\n}\n\nexport default VectorTileLayer;\n", "/**\n * @module ol/renderer/canvas/ImageLayer\n */\nimport ImageState from '../../ImageState.js';\nimport ViewHint from '../../ViewHint.js';\nimport {\n containsCoordinate,\n containsExtent,\n getHeight,\n getIntersection,\n getWidth,\n intersects as intersectsExtent,\n isEmpty,\n} from '../../extent.js';\nimport {fromUserExtent} from '../../proj.js';\nimport {\n apply as applyTransform,\n compose as composeTransform,\n} from '../../transform.js';\nimport CanvasLayerRenderer from './Layer.js';\n\n/**\n * @classdesc\n * Canvas renderer for image layers.\n * @api\n */\nclass CanvasImageLayerRenderer extends CanvasLayerRenderer {\n /**\n * @param {import(\"../../layer/Image.js\").default} imageLayer Image layer.\n */\n constructor(imageLayer) {\n super(imageLayer);\n\n /**\n * @protected\n * @type {?import(\"../../Image.js\").default}\n */\n this.image = null;\n\n /**\n * @private\n * @type {number}\n */\n this.renderedSourceRevision_ = 0;\n }\n\n /**\n * @return {import('../../DataTile.js').ImageLike} Image.\n */\n getImage() {\n return !this.image ? null : this.image.getImage();\n }\n\n /**\n * Determine whether render should be called.\n * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n * @return {boolean} Layer is ready to be rendered.\n * @override\n */\n prepareFrame(frameState) {\n const layerState = frameState.layerStatesArray[frameState.layerIndex];\n const pixelRatio = frameState.pixelRatio;\n const viewState = frameState.viewState;\n const viewResolution = viewState.resolution;\n\n const imageSource = this.getLayer().getSource();\n\n const hints = frameState.viewHints;\n\n let renderedExtent = frameState.extent;\n if (layerState.extent !== undefined) {\n renderedExtent = getIntersection(\n renderedExtent,\n fromUserExtent(layerState.extent, viewState.projection),\n );\n }\n\n if (\n !hints[ViewHint.ANIMATING] &&\n !hints[ViewHint.INTERACTING] &&\n !isEmpty(renderedExtent)\n ) {\n if (imageSource) {\n if (\n !this.getLayer().rendered &&\n this.renderedSourceRevision_ !== imageSource.getRevision()\n ) {\n this.image = null;\n }\n this.renderedSourceRevision_ = imageSource.getRevision();\n\n const projection = viewState.projection;\n const image = imageSource.getImage(\n renderedExtent,\n viewResolution,\n pixelRatio,\n projection,\n );\n if (image) {\n if (this.loadImage(image)) {\n this.image = image;\n } else if (image.getState() === ImageState.EMPTY) {\n this.image = null;\n }\n }\n } else {\n this.image = null;\n }\n }\n\n return !!this.image;\n }\n\n /**\n * @param {import(\"../../pixel.js\").Pixel} pixel Pixel.\n * @return {Uint8ClampedArray} Data at the pixel location.\n * @override\n */\n getData(pixel) {\n const frameState = this.frameState;\n if (!frameState) {\n return null;\n }\n\n const layer = this.getLayer();\n const coordinate = applyTransform(\n frameState.pixelToCoordinateTransform,\n pixel.slice(),\n );\n\n const layerExtent = layer.getExtent();\n if (layerExtent) {\n if (!containsCoordinate(layerExtent, coordinate)) {\n return null;\n }\n }\n\n const imageExtent = this.image.getExtent();\n const img = this.image.getImage();\n\n const imageMapWidth = getWidth(imageExtent);\n const col = Math.floor(\n img.width * ((coordinate[0] - imageExtent[0]) / imageMapWidth),\n );\n if (col < 0 || col >= img.width) {\n return null;\n }\n\n const imageMapHeight = getHeight(imageExtent);\n const row = Math.floor(\n img.height * ((imageExtent[3] - coordinate[1]) / imageMapHeight),\n );\n if (row < 0 || row >= img.height) {\n return null;\n }\n\n return this.getImageData(img, col, row);\n }\n\n /**\n * Render the layer.\n * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n * @param {HTMLElement} target Target that may be used to render content to.\n * @return {HTMLElement} The rendered element.\n * @override\n */\n renderFrame(frameState, target) {\n const image = this.image;\n const imageExtent = image.getExtent();\n const imageResolution = image.getResolution();\n const [imageResolutionX, imageResolutionY] = Array.isArray(imageResolution)\n ? imageResolution\n : [imageResolution, imageResolution];\n const imagePixelRatio = image.getPixelRatio();\n const layerState = frameState.layerStatesArray[frameState.layerIndex];\n const pixelRatio = frameState.pixelRatio;\n const viewState = frameState.viewState;\n const viewCenter = viewState.center;\n const viewResolution = viewState.resolution;\n const scaleX =\n (pixelRatio * imageResolutionX) / (viewResolution * imagePixelRatio);\n const scaleY =\n (pixelRatio * imageResolutionY) / (viewResolution * imagePixelRatio);\n\n this.prepareContainer(frameState, target);\n\n // desired dimensions of the canvas in pixels\n const width = this.context.canvas.width;\n const height = this.context.canvas.height;\n\n const context = this.getRenderContext(frameState);\n\n // clipped rendering if layer extent is set\n let clipped = false;\n let render = true;\n if (layerState.extent) {\n const layerExtent = fromUserExtent(\n layerState.extent,\n viewState.projection,\n );\n render = intersectsExtent(layerExtent, frameState.extent);\n clipped = render && !containsExtent(layerExtent, frameState.extent);\n if (clipped) {\n this.clipUnrotated(context, frameState, layerExtent);\n }\n }\n\n const img = image.getImage();\n\n const transform = composeTransform(\n this.tempTransform,\n width / 2,\n height / 2,\n scaleX,\n scaleY,\n 0,\n (imagePixelRatio * (imageExtent[0] - viewCenter[0])) / imageResolutionX,\n (imagePixelRatio * (viewCenter[1] - imageExtent[3])) / imageResolutionY,\n );\n\n this.renderedResolution = (imageResolutionY * pixelRatio) / imagePixelRatio;\n\n const dw = img.width * transform[0];\n const dh = img.height * transform[3];\n\n if (!this.getLayer().getSource().getInterpolate()) {\n context.imageSmoothingEnabled = false;\n }\n\n this.preRender(context, frameState);\n if (render && dw >= 0.5 && dh >= 0.5) {\n const dx = transform[4];\n const dy = transform[5];\n const opacity = layerState.opacity;\n if (opacity !== 1) {\n context.save();\n context.globalAlpha = opacity;\n }\n context.drawImage(img, 0, 0, +img.width, +img.height, dx, dy, dw, dh);\n if (opacity !== 1) {\n context.restore();\n }\n }\n this.postRender(this.context, frameState);\n\n if (clipped) {\n context.restore();\n }\n context.imageSmoothingEnabled = true;\n return this.container;\n }\n}\n\nexport default CanvasImageLayerRenderer;\n", "/**\n * @module ol/layer/BaseImage\n */\nimport Layer from './Layer.js';\n\n/**\n * @template {import(\"../source/Image.js\").default} ImageSourceType\n * @typedef {Object} Options\n * @property {string} [className='ol-layer'] A CSS class name to set to the layer element.\n * @property {number} [opacity=1] Opacity (0, 1).\n * @property {boolean} [visible=true] Visibility.\n * @property {import(\"../extent.js\").Extent} [extent] The bounding extent for layer rendering. The layer will not be\n * rendered outside of this extent.\n * @property {number} [zIndex] The z-index for layer rendering. At rendering time, the layers\n * will be ordered, first by Z-index and then by position. When `undefined`, a `zIndex` of 0 is assumed\n * for layers that are added to the map's `layers` collection, or `Infinity` when the layer's `setMap()`\n * method was used.\n * @property {number} [minResolution] The minimum resolution (inclusive) at which this layer will be\n * visible.\n * @property {number} [maxResolution] The maximum resolution (exclusive) below which this layer will\n * be visible.\n * @property {number} [minZoom] The minimum view zoom level (exclusive) above which this layer will be\n * visible.\n * @property {number} [maxZoom] The maximum view zoom level (inclusive) at which this layer will\n * be visible.\n * @property {import(\"../Map.js\").default} [map] Sets the layer as overlay on a map. The map will not manage\n * this layer in its layers collection, and the layer will be rendered on top. This is useful for\n * temporary layers. The standard way to add a layer to a map and have it managed by the map is to\n * use {@link import(\"../Map.js\").default#addLayer map.addLayer()}.\n * @property {ImageSourceType} [source] Source for this layer.\n * @property {Object<string, *>} [properties] Arbitrary observable properties. Can be accessed with `#get()` and `#set()`.\n */\n\n/**\n * @classdesc\n * Server-rendered images that are available for arbitrary extents and\n * resolutions.\n * Note that any property set in the options is set as a {@link module:ol/Object~BaseObject}\n * property on the layer object; for example, setting `title: 'My Title'` in the\n * options means that `title` is observable, and has get/set accessors.\n *\n * @template {import(\"../source/Image.js\").default} ImageSourceType\n * @template {import(\"../renderer/Layer.js\").default} RendererType\n * @extends {Layer<ImageSourceType, RendererType>}\n * @api\n */\nclass BaseImageLayer extends Layer {\n /**\n * @param {Options<ImageSourceType>} [options] Layer options.\n */\n constructor(options) {\n options = options ? options : {};\n super(options);\n }\n}\n\nexport default BaseImageLayer;\n", "/**\n * @module ol/layer/Image\n */\nimport CanvasImageLayerRenderer from '../renderer/canvas/ImageLayer.js';\nimport BaseImageLayer from './BaseImage.js';\n\n/**\n * @classdesc\n * Server-rendered images that are available for arbitrary extents and\n * resolutions.\n * Note that any property set in the options is set as a {@link module:ol/Object~BaseObject}\n * property on the layer object; for example, setting `title: 'My Title'` in the\n * options means that `title` is observable, and has get/set accessors.\n *\n * @template {import(\"../source/Image.js\").default} ImageSourceType\n * @extends {BaseImageLayer<ImageSourceType, CanvasImageLayerRenderer>}\n * @api\n */\nclass ImageLayer extends BaseImageLayer {\n /**\n * @param {import(\"./BaseImage.js\").Options<ImageSourceType>} [options] Layer options.\n */\n constructor(options) {\n super(options);\n }\n\n /**\n * @override\n */\n createRenderer() {\n return new CanvasImageLayerRenderer(this);\n }\n\n /**\n * Get data for a pixel location. A four element RGBA array will be returned. For requests outside the\n * layer extent, `null` will be returned. Data for an image can only be retrieved if the\n * source's `crossOrigin` property is set.\n *\n * ```js\n * // display layer data on every pointer move\n * map.on('pointermove', (event) => {\n * console.log(layer.getData(event.pixel));\n * });\n * ```\n * @param {import(\"../pixel\").Pixel} pixel Pixel.\n * @return {Uint8ClampedArray|Uint8Array|Float32Array|DataView|null} Pixel data.\n * @api\n * @override\n */\n getData(pixel) {\n return super.getData(pixel);\n }\n}\n\nexport default ImageLayer;\n", "/**\n * @module ol/vec/mat4\n */\n\n/** @typedef {Array<number>} Mat4 */\n\n/**\n * @return {Mat4} \"4x4 matrix representing a 3D identity transform.\"\n */\nexport function create() {\n return [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1];\n}\n\n/**\n * @param {Mat4} mat4 Flattened 4x4 matrix receiving the result.\n * @param {import(\"../transform.js\").Transform} transform Transformation matrix.\n * @return {Mat4} \"2D transformation matrix as flattened 4x4 matrix.\"\n */\nexport function fromTransform(mat4, transform) {\n mat4[0] = transform[0];\n mat4[1] = transform[1];\n mat4[4] = transform[2];\n mat4[5] = transform[3];\n mat4[12] = transform[4];\n mat4[13] = transform[5];\n return mat4;\n}\n\n/**\n * Generates a orthogonal projection matrix with the given bounds\n *\n * @param {number} left Left bound of the frustum\n * @param {number} right Right bound of the frustum\n * @param {number} bottom Bottom bound of the frustum\n * @param {number} top Top bound of the frustum\n * @param {number} near Near bound of the frustum\n * @param {number} far Far bound of the frustum\n * @param {Mat4} [out] mat4 frustum matrix will be written into\n * @return {Mat4} out\n */\nexport function orthographic(left, right, bottom, top, near, far, out) {\n out = out ?? create();\n const lr = 1 / (left - right),\n bt = 1 / (bottom - top),\n nf = 1 / (near - far);\n out[0] = -2 * lr;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 0;\n out[5] = -2 * bt;\n out[6] = 0;\n out[7] = 0;\n out[8] = 0;\n out[9] = 0;\n out[10] = 2 * nf;\n out[11] = 0;\n out[12] = (left + right) * lr;\n out[13] = (top + bottom) * bt;\n out[14] = (far + near) * nf;\n out[15] = 1;\n return out;\n}\n\n/**\n * Scales the mat4 by the dimensions in the given vec3\n *\n * @param {Mat4} m The matrix to scale.\n * @param {number} x How much to scale in the x direction.\n * @param {number} y How much to scale in the y direction.\n * @param {number} z How much to scale in the z direction.\n * @param {Mat4} [out] The matrix to write to.\n * @return {Mat4} out\n */\nexport function scale(m, x, y, z, out) {\n out = out ?? create();\n out[0] = m[0] * x;\n out[1] = m[1] * x;\n out[2] = m[2] * x;\n out[3] = m[3] * x;\n out[4] = m[4] * y;\n out[5] = m[5] * y;\n out[6] = m[6] * y;\n out[7] = m[7] * y;\n out[8] = m[8] * z;\n out[9] = m[9] * z;\n out[10] = m[10] * z;\n out[11] = m[11] * z;\n out[12] = m[12];\n out[13] = m[13];\n out[14] = m[14];\n out[15] = m[15];\n return out;\n}\n\n/**\n * Translate a matrix.\n *\n * @param {Mat4} m the matrix to translate\n * @param {number} x How much to translate in the x direction.\n * @param {number} y How much to translate in the y direction.\n * @param {number} z How much to translate in the z direction.\n * @param {Mat4} [out] the receiving matrix\n * @return {Mat4} out\n */\nexport function translate(m, x, y, z, out) {\n out = out ?? create();\n let a00, a01, a02, a03, a10, a11, a12, a13, a20, a21, a22, a23;\n\n if (m === out) {\n out[12] = m[0] * x + m[4] * y + m[8] * z + m[12];\n out[13] = m[1] * x + m[5] * y + m[9] * z + m[13];\n out[14] = m[2] * x + m[6] * y + m[10] * z + m[14];\n out[15] = m[3] * x + m[7] * y + m[11] * z + m[15];\n } else {\n a00 = m[0];\n a01 = m[1];\n a02 = m[2];\n a03 = m[3];\n a10 = m[4];\n a11 = m[5];\n a12 = m[6];\n a13 = m[7];\n a20 = m[8];\n a21 = m[9];\n a22 = m[10];\n a23 = m[11];\n\n out[0] = a00;\n out[1] = a01;\n out[2] = a02;\n out[3] = a03;\n out[4] = a10;\n out[5] = a11;\n out[6] = a12;\n out[7] = a13;\n out[8] = a20;\n out[9] = a21;\n out[10] = a22;\n out[11] = a23;\n\n out[12] = a00 * x + a10 * y + a20 * z + m[12];\n out[13] = a01 * x + a11 * y + a21 * z + m[13];\n out[14] = a02 * x + a12 * y + a22 * z + m[14];\n out[15] = a03 * x + a13 * y + a23 * z + m[15];\n }\n\n return out;\n}\n\n/**\n * @param {number} x x translation.\n * @param {number} y y translation.\n * @param {number} z z translation.\n * @param {Mat4} [out] optional matrix to store result\n * @return {Mat4} out\n */\nexport function translation(x, y, z, out) {\n out = out ?? create();\n\n out[0] = 1;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 0;\n out[5] = 1;\n out[6] = 0;\n out[7] = 0;\n out[8] = 0;\n out[9] = 0;\n out[10] = 1;\n out[11] = 0;\n out[12] = x;\n out[13] = y;\n out[14] = z;\n out[15] = 1;\n\n return out;\n}\n", "/**\n * @module ol/webgl\n */\n\nimport {SAFARI_BUG_237906} from './has.js';\n\n/**\n * Constants taken from goog.webgl\n */\n\n/**\n * Used by {@link module:ol/webgl/Helper~WebGLHelper} for buffers containing vertices data, such as\n * position, color, texture coordinate, etc. These vertices are then referenced by an index buffer\n * to be drawn on screen (see {@link module:ol/webgl.ELEMENT_ARRAY_BUFFER}).\n * @const\n * @type {number}\n * @api\n */\nexport const ARRAY_BUFFER = 0x8892;\n\n/**\n * Used by {@link module:ol/webgl/Helper~WebGLHelper} for buffers containing indices data.\n * Index buffers are essentially lists of references to vertices defined in a vertex buffer\n * (see {@link module:ol/webgl.ARRAY_BUFFER}), and define the primitives (triangles) to be drawn.\n * @const\n * @type {number}\n * @api\n */\nexport const ELEMENT_ARRAY_BUFFER = 0x8893;\n\n/**\n * Used by {link module:ol/webgl/Buffer~WebGLArrayBuffer}.\n * @const\n * @type {number}\n * @api\n */\nexport const STREAM_DRAW = 0x88e0;\n\n/**\n * Used by {link module:ol/webgl/Buffer~WebGLArrayBuffer}.\n * @const\n * @type {number}\n * @api\n */\nexport const STATIC_DRAW = 0x88e4;\n\n/**\n * Used by {link module:ol/webgl/Buffer~WebGLArrayBuffer}.\n * @const\n * @type {number}\n * @api\n */\nexport const DYNAMIC_DRAW = 0x88e8;\n\n/**\n * @const\n * @type {number}\n */\nexport const UNSIGNED_BYTE = 0x1401;\n\n/**\n * @const\n * @type {number}\n */\nexport const UNSIGNED_SHORT = 0x1403;\n\n/**\n * @const\n * @type {number}\n */\nexport const UNSIGNED_INT = 0x1405;\n\n/**\n * @const\n * @type {number}\n */\nexport const FLOAT = 0x1406;\n\n/**\n end of goog.webgl constants\n */\n\n/**\n * @const\n * @type {Array<string>}\n */\nconst CONTEXT_IDS = ['experimental-webgl', 'webgl', 'webkit-3d', 'moz-webgl'];\n\n/**\n * @param {HTMLCanvasElement} canvas Canvas.\n * @param {Object} [attributes] Attributes.\n * @return {WebGLRenderingContext|null} WebGL rendering context.\n */\nexport function getContext(canvas, attributes) {\n attributes = Object.assign(\n {\n preserveDrawingBuffer: true,\n antialias: SAFARI_BUG_237906 ? false : true, // https://bugs.webkit.org/show_bug.cgi?id=237906\n },\n attributes,\n );\n const ii = CONTEXT_IDS.length;\n for (let i = 0; i < ii; ++i) {\n try {\n const context = canvas.getContext(CONTEXT_IDS[i], attributes);\n if (context) {\n return /** @type {!WebGLRenderingContext} */ (context);\n }\n } catch {\n // pass\n }\n }\n return null;\n}\n\n/**\n * @type {Array<string>|null}\n */\nlet supportedExtensions = null;\n\n/**\n * @return {Array<string>|null} List of supported WebGL extensions.\n */\nexport function getSupportedExtensions() {\n if (!supportedExtensions) {\n const canvas = document.createElement('canvas');\n const gl = getContext(canvas);\n if (gl) {\n supportedExtensions = gl.getSupportedExtensions();\n }\n }\n return supportedExtensions;\n}\n", "/**\n * @module ol/webgl/Buffer\n */\nimport {assert} from '../asserts.js';\nimport {\n ARRAY_BUFFER,\n DYNAMIC_DRAW,\n ELEMENT_ARRAY_BUFFER,\n STATIC_DRAW,\n STREAM_DRAW,\n} from '../webgl.js';\n\n/**\n * Used to describe the intended usage for the data: `STATIC_DRAW`, `STREAM_DRAW`\n * or `DYNAMIC_DRAW`.\n * @enum {number}\n */\nexport const BufferUsage = {\n STATIC_DRAW: STATIC_DRAW,\n STREAM_DRAW: STREAM_DRAW,\n DYNAMIC_DRAW: DYNAMIC_DRAW,\n};\n\n/**\n * @classdesc\n * Object used to store an array of data as well as usage information for that data.\n * Stores typed arrays internally, either Float32Array or Uint16/32Array depending on\n * the buffer type (ARRAY_BUFFER or ELEMENT_ARRAY_BUFFER) and available extensions.\n *\n * To populate the array, you can either use:\n * A size using `#ofSize(buffer)`\n * An `ArrayBuffer` object using `#fromArrayBuffer(buffer)`\n * A plain array using `#fromArray(array)`\n *\n * Note:\n * See the documentation of [WebGLRenderingContext.bufferData](https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext/bufferData)\n * for more info on buffer usage.\n */\nclass WebGLArrayBuffer {\n /**\n * @param {number} type Buffer type, either ARRAY_BUFFER or ELEMENT_ARRAY_BUFFER.\n * @param {number} [usage] Intended usage, either `STATIC_DRAW`, `STREAM_DRAW` or `DYNAMIC_DRAW`.\n * Default is `STATIC_DRAW`.\n */\n constructor(type, usage) {\n /**\n * @private\n * @type {Float32Array|Uint32Array|null}\n */\n this.array_ = null;\n\n /**\n * @private\n * @type {number}\n */\n this.type_ = type;\n\n assert(\n type === ARRAY_BUFFER || type === ELEMENT_ARRAY_BUFFER,\n 'A `WebGLArrayBuffer` must either be of type `ELEMENT_ARRAY_BUFFER` or `ARRAY_BUFFER`',\n );\n\n /**\n * @private\n * @type {number}\n */\n this.usage_ = usage !== undefined ? usage : BufferUsage.STATIC_DRAW;\n }\n\n /**\n * Populates the buffer with an array of the given size (all values will be zeroes).\n * @param {number} size Array size\n * @return {WebGLArrayBuffer} This\n */\n ofSize(size) {\n this.array_ = new (getArrayClassForType(this.type_))(size);\n return this;\n }\n\n /**\n * Populates the buffer with an array of the given size.\n * @param {Array<number>} array Numerical array\n * @return {WebGLArrayBuffer} This\n */\n fromArray(array) {\n this.array_ = getArrayClassForType(this.type_).from(array);\n return this;\n }\n\n /**\n * Populates the buffer with a raw binary array buffer.\n * @param {ArrayBuffer} buffer Raw binary buffer to populate the array with. Note that this buffer must have been\n * initialized for the same typed array class.\n * @return {WebGLArrayBuffer} This\n */\n fromArrayBuffer(buffer) {\n this.array_ = new (getArrayClassForType(this.type_))(buffer);\n return this;\n }\n\n /**\n * @return {number} Buffer type.\n */\n getType() {\n return this.type_;\n }\n\n /**\n * Will return null if the buffer was not initialized\n * @return {Float32Array|Uint32Array|null} Array.\n */\n getArray() {\n return this.array_;\n }\n\n /**\n * @param {Float32Array|Uint32Array} array Array.\n */\n setArray(array) {\n const ArrayType = getArrayClassForType(this.type_);\n if (!(array instanceof ArrayType)) {\n throw new Error(`Expected ${ArrayType}`);\n }\n this.array_ = array;\n }\n\n /**\n * @return {number} Usage.\n */\n getUsage() {\n return this.usage_;\n }\n\n /**\n * Will return 0 if the buffer is not initialized\n * @return {number} Array size\n */\n getSize() {\n return this.array_ ? this.array_.length : 0;\n }\n}\n\n/**\n * Returns a typed array constructor based on the given buffer type\n * @param {number} type Buffer type, either ARRAY_BUFFER or ELEMENT_ARRAY_BUFFER.\n * @return {Float32ArrayConstructor|Uint32ArrayConstructor} The typed array class to use for this buffer.\n */\nexport function getArrayClassForType(type) {\n switch (type) {\n case ARRAY_BUFFER:\n return Float32Array;\n case ELEMENT_ARRAY_BUFFER:\n return Uint32Array;\n default:\n return Float32Array;\n }\n}\n\nexport default WebGLArrayBuffer;\n", "/**\n * @module ol/webgl/ContextEventType\n */\n\n/**\n * @enum {string}\n */\nexport default {\n LOST: 'webglcontextlost',\n RESTORED: 'webglcontextrestored',\n};\n", "/**\n * @module ol/webgl/PostProcessingPass\n */\n\nimport {getUid} from '../util.js';\n\nconst DEFAULT_VERTEX_SHADER = `\n precision mediump float;\n\n attribute vec2 a_position;\n varying vec2 v_texCoord;\n varying vec2 v_screenCoord;\n\n uniform vec2 u_screenSize;\n\n void main() {\n v_texCoord = a_position * 0.5 + 0.5;\n v_screenCoord = v_texCoord * u_screenSize;\n gl_Position = vec4(a_position, 0.0, 1.0);\n }\n`;\n\nconst DEFAULT_FRAGMENT_SHADER = `\n precision mediump float;\n\n uniform sampler2D u_image;\n uniform float u_opacity;\n\n varying vec2 v_texCoord;\n\n void main() {\n gl_FragColor = texture2D(u_image, v_texCoord) * u_opacity;\n }\n`;\n\n/**\n * @typedef {Object} Options\n * @property {WebGLRenderingContext} webGlContext WebGL context; mandatory.\n * @property {number} [scaleRatio] Scale ratio; if < 1, the post process will render to a texture smaller than\n * the main canvas that will then be sampled up (useful for saving resource on blur steps).\n * @property {string} [vertexShader] Vertex shader source\n * @property {string} [fragmentShader] Fragment shader source\n * @property {Object<string,import(\"./Helper\").UniformValue>} [uniforms] Uniform definitions for the post process step\n */\n\n/**\n * @typedef {Object} UniformInternalDescription\n * @property {import(\"./Helper\").UniformValue} value Value\n * @property {WebGLUniformLocation} location Location\n * @property {WebGLTexture} [texture] Texture\n * @private\n */\n\n/**\n * @classdesc\n * This class is used to define Post Processing passes with custom shaders and uniforms.\n * This is used internally by {@link module:ol/webgl/Helper~WebGLHelper}.\n *\n * Please note that the final output on the DOM canvas is expected to have premultiplied alpha, which means that\n * a pixel which is 100% red with an opacity of 50% must have a color of (r=0.5, g=0, b=0, a=0.5).\n * Failing to provide pixel colors with premultiplied alpha will result in render anomalies.\n *\n * The default post-processing pass does *not* multiply color values with alpha value, it expects color values to be\n * premultiplied.\n *\n * Default shaders are shown hereafter:\n *\n * Vertex shader:\n *\n * ```\n * precision mediump float;\n *\n * attribute vec2 a_position;\n * varying vec2 v_texCoord;\n * varying vec2 v_screenCoord;\n *\n * uniform vec2 u_screenSize;\n *\n * void main() {\n * v_texCoord = a_position * 0.5 + 0.5;\n * v_screenCoord = v_texCoord * u_screenSize;\n * gl_Position = vec4(a_position, 0.0, 1.0);\n * }\n * ```\n *\n * Fragment shader:\n *\n * ```\n * precision mediump float;\n *\n * uniform sampler2D u_image;\n * uniform float u_opacity;\n *\n * varying vec2 v_texCoord;\n *\n * void main() {\n * gl_FragColor = texture2D(u_image, v_texCoord) * u_opacity;\n * }\n * ```\n */\nclass WebGLPostProcessingPass {\n /**\n * @param {Options} options Options.\n */\n constructor(options) {\n /**\n * @private\n */\n this.gl_ = options.webGlContext;\n const gl = this.gl_;\n\n /**\n * @private\n */\n this.scaleRatio_ = options.scaleRatio || 1;\n\n /**\n * @type {WebGLTexture}\n * @private\n */\n this.renderTargetTexture_ = gl.createTexture();\n\n /**\n * @type {import('../size.js').Size|null}\n * @private\n */\n this.renderTargetTextureSize_ = null;\n\n /**\n * @private\n */\n this.frameBuffer_ = gl.createFramebuffer();\n /**\n * @private\n */\n this.depthBuffer_ = gl.createRenderbuffer();\n\n // compile the program for the frame buffer\n // TODO: make compilation errors show up\n const vertexShader = gl.createShader(gl.VERTEX_SHADER);\n gl.shaderSource(\n vertexShader,\n options.vertexShader || DEFAULT_VERTEX_SHADER,\n );\n gl.compileShader(vertexShader);\n const fragmentShader = gl.createShader(gl.FRAGMENT_SHADER);\n gl.shaderSource(\n fragmentShader,\n options.fragmentShader || DEFAULT_FRAGMENT_SHADER,\n );\n gl.compileShader(fragmentShader);\n /**\n * @private\n */\n this.renderTargetProgram_ = gl.createProgram();\n gl.attachShader(this.renderTargetProgram_, vertexShader);\n gl.attachShader(this.renderTargetProgram_, fragmentShader);\n gl.linkProgram(this.renderTargetProgram_);\n\n // bind the vertices buffer for the frame buffer\n /**\n * @private\n */\n this.renderTargetVerticesBuffer_ = gl.createBuffer();\n const verticesArray = [-1, -1, 1, -1, -1, 1, 1, -1, 1, 1, -1, 1];\n gl.bindBuffer(gl.ARRAY_BUFFER, this.renderTargetVerticesBuffer_);\n gl.bufferData(\n gl.ARRAY_BUFFER,\n new Float32Array(verticesArray),\n gl.STATIC_DRAW,\n );\n\n /**\n * @private\n */\n this.renderTargetAttribLocation_ = gl.getAttribLocation(\n this.renderTargetProgram_,\n 'a_position',\n );\n /**\n * @private\n */\n this.renderTargetUniformLocation_ = gl.getUniformLocation(\n this.renderTargetProgram_,\n 'u_screenSize',\n );\n /**\n * @private\n */\n this.renderTargetOpacityLocation_ = gl.getUniformLocation(\n this.renderTargetProgram_,\n 'u_opacity',\n );\n /**\n * @private\n */\n this.renderTargetTextureLocation_ = gl.getUniformLocation(\n this.renderTargetProgram_,\n 'u_image',\n );\n\n /**\n * Holds info about custom uniforms used in the post processing pass\n * @type {Array<UniformInternalDescription>}\n * @private\n */\n this.uniforms_ = [];\n options.uniforms &&\n Object.keys(options.uniforms).forEach((name) => {\n this.uniforms_.push({\n value: options.uniforms[name],\n location: gl.getUniformLocation(this.renderTargetProgram_, name),\n });\n });\n }\n\n getRenderTargetTexture() {\n return this.renderTargetTexture_;\n }\n\n /**\n * Get the WebGL rendering context\n * @return {WebGLRenderingContext} The rendering context.\n */\n getGL() {\n return this.gl_;\n }\n\n /**\n * Initialize the render target texture of the post process, make sure it is at the\n * right size and bind it as a render target for the next draw calls.\n * The last step to be initialized will be the one where the primitives are rendered.\n * @param {import(\"../Map.js\").FrameState} frameState current frame state\n */\n init(frameState) {\n const gl = this.getGL();\n const textureSize = [\n gl.drawingBufferWidth * this.scaleRatio_,\n gl.drawingBufferHeight * this.scaleRatio_,\n ];\n\n // rendering goes to my buffer\n gl.bindFramebuffer(gl.FRAMEBUFFER, this.getFrameBuffer());\n gl.bindRenderbuffer(gl.RENDERBUFFER, this.getDepthBuffer());\n gl.viewport(0, 0, textureSize[0], textureSize[1]);\n\n // if size has changed: adjust canvas & render target texture\n if (\n !this.renderTargetTextureSize_ ||\n this.renderTargetTextureSize_[0] !== textureSize[0] ||\n this.renderTargetTextureSize_[1] !== textureSize[1]\n ) {\n this.renderTargetTextureSize_ = textureSize;\n\n // create a new texture\n const level = 0;\n const internalFormat = gl.RGBA;\n const border = 0;\n const format = gl.RGBA;\n const type = gl.UNSIGNED_BYTE;\n const data = null;\n gl.bindTexture(gl.TEXTURE_2D, this.renderTargetTexture_);\n gl.texImage2D(\n gl.TEXTURE_2D,\n level,\n internalFormat,\n textureSize[0],\n textureSize[1],\n border,\n format,\n type,\n data,\n );\n\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);\n\n // bind the texture to the framebuffer\n gl.framebufferTexture2D(\n gl.FRAMEBUFFER,\n gl.COLOR_ATTACHMENT0,\n gl.TEXTURE_2D,\n this.renderTargetTexture_,\n 0,\n );\n\n gl.renderbufferStorage(\n gl.RENDERBUFFER,\n gl.DEPTH_COMPONENT16,\n textureSize[0],\n textureSize[1],\n );\n gl.framebufferRenderbuffer(\n gl.FRAMEBUFFER,\n gl.DEPTH_ATTACHMENT,\n gl.RENDERBUFFER,\n this.depthBuffer_,\n );\n }\n }\n\n /**\n * Render to the next postprocessing pass (or to the canvas if final pass).\n * @param {import(\"../Map.js\").FrameState} frameState current frame state\n * @param {WebGLPostProcessingPass} [nextPass] Next pass, optional\n * @param {function(WebGLRenderingContext, import(\"../Map.js\").FrameState):void} [preCompose] Called before composing.\n * @param {function(WebGLRenderingContext, import(\"../Map.js\").FrameState):void} [postCompose] Called before composing.\n */\n apply(frameState, nextPass, preCompose, postCompose) {\n const gl = this.getGL();\n const size = frameState.size;\n\n gl.bindFramebuffer(\n gl.FRAMEBUFFER,\n nextPass ? nextPass.getFrameBuffer() : null,\n );\n gl.activeTexture(gl.TEXTURE0);\n gl.bindTexture(gl.TEXTURE_2D, this.renderTargetTexture_);\n\n if (!nextPass) {\n // clear the canvas if we are the first to render to it\n // and preserveDrawingBuffer is true\n const canvasId = getUid(gl.canvas);\n if (!frameState.renderTargets[canvasId]) {\n const attributes = gl.getContextAttributes();\n if (attributes && attributes.preserveDrawingBuffer) {\n gl.clearColor(0.0, 0.0, 0.0, 0.0);\n gl.clearDepth(1.0);\n gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);\n }\n\n frameState.renderTargets[canvasId] = true;\n }\n }\n\n gl.disable(gl.DEPTH_TEST);\n gl.enable(gl.BLEND);\n gl.blendFunc(gl.ONE, gl.ONE_MINUS_SRC_ALPHA);\n gl.viewport(0, 0, gl.drawingBufferWidth, gl.drawingBufferHeight);\n\n gl.bindBuffer(gl.ARRAY_BUFFER, this.renderTargetVerticesBuffer_);\n\n gl.useProgram(this.renderTargetProgram_);\n gl.enableVertexAttribArray(this.renderTargetAttribLocation_);\n gl.vertexAttribPointer(\n this.renderTargetAttribLocation_,\n 2,\n gl.FLOAT,\n false,\n 0,\n 0,\n );\n gl.uniform2f(this.renderTargetUniformLocation_, size[0], size[1]);\n gl.uniform1i(this.renderTargetTextureLocation_, 0);\n\n const opacity = frameState.layerStatesArray[frameState.layerIndex].opacity;\n gl.uniform1f(this.renderTargetOpacityLocation_, opacity);\n\n this.applyUniforms(frameState);\n\n if (preCompose) {\n preCompose(gl, frameState);\n }\n gl.drawArrays(gl.TRIANGLES, 0, 6);\n if (postCompose) {\n postCompose(gl, frameState);\n }\n }\n\n /**\n * @return {WebGLFramebuffer} Frame buffer\n */\n getFrameBuffer() {\n return this.frameBuffer_;\n }\n\n /**\n * @return {WebGLRenderbuffer} Depth buffer\n */\n getDepthBuffer() {\n return this.depthBuffer_;\n }\n\n /**\n * Sets the custom uniforms based on what was given in the constructor.\n * @param {import(\"../Map.js\").FrameState} frameState Frame state.\n * @private\n */\n applyUniforms(frameState) {\n const gl = this.getGL();\n\n let value;\n let textureSlot = 1;\n this.uniforms_.forEach(function (uniform) {\n value =\n typeof uniform.value === 'function'\n ? uniform.value(frameState)\n : uniform.value;\n\n // apply value based on type\n if (value instanceof HTMLCanvasElement || value instanceof ImageData) {\n // create a texture & put data\n if (!uniform.texture) {\n uniform.texture = gl.createTexture();\n }\n gl.activeTexture(gl[`TEXTURE${textureSlot}`]);\n gl.bindTexture(gl.TEXTURE_2D, uniform.texture);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);\n\n if (value instanceof ImageData) {\n gl.texImage2D(\n gl.TEXTURE_2D,\n 0,\n gl.RGBA,\n gl.RGBA,\n value.width,\n value.height,\n 0,\n gl.UNSIGNED_BYTE,\n new Uint8Array(value.data),\n );\n } else {\n gl.texImage2D(\n gl.TEXTURE_2D,\n 0,\n gl.RGBA,\n gl.RGBA,\n gl.UNSIGNED_BYTE,\n value,\n );\n }\n\n // fill texture slots\n gl.uniform1i(uniform.location, textureSlot++);\n } else if (Array.isArray(value)) {\n switch (value.length) {\n case 2:\n gl.uniform2f(uniform.location, value[0], value[1]);\n return;\n case 3:\n gl.uniform3f(uniform.location, value[0], value[1], value[2]);\n return;\n case 4:\n gl.uniform4f(\n uniform.location,\n value[0],\n value[1],\n value[2],\n value[3],\n );\n return;\n default:\n return;\n }\n } else if (typeof value === 'number') {\n gl.uniform1f(uniform.location, value);\n }\n });\n }\n}\n\nexport default WebGLPostProcessingPass;\n", "/**\n * @module ol/webgl/Helper\n */\nimport Disposable from '../Disposable.js';\nimport {assert} from '../asserts.js';\nimport {clear} from '../obj.js';\nimport {\n compose as composeTransform,\n create as createTransform,\n} from '../transform.js';\nimport {getUid} from '../util.js';\nimport {create, fromTransform} from '../vec/mat4.js';\nimport ContextEventType from '../webgl/ContextEventType.js';\nimport {\n FLOAT,\n UNSIGNED_BYTE,\n UNSIGNED_INT,\n UNSIGNED_SHORT,\n getContext,\n} from '../webgl.js';\nimport WebGLPostProcessingPass from './PostProcessingPass.js';\n\n/**\n * @typedef {Object} BufferCacheEntry\n * @property {import(\"./Buffer.js\").default} buffer Buffer.\n * @property {WebGLBuffer} webGlBuffer WebGlBuffer.\n */\n\n/**\n * Shader types, either `FRAGMENT_SHADER` or `VERTEX_SHADER`.\n * @enum {number}\n */\nexport const ShaderType = {\n FRAGMENT_SHADER: 0x8b30,\n VERTEX_SHADER: 0x8b31,\n};\n\n/**\n * Names of uniforms made available to all shaders.\n * Please note: changing these *will* break custom shaders!\n * @enum {string}\n */\nexport const DefaultUniform = {\n PROJECTION_MATRIX: 'u_projectionMatrix',\n SCREEN_TO_WORLD_MATRIX: 'u_screenToWorldMatrix',\n TIME: 'u_time',\n ZOOM: 'u_zoom',\n RESOLUTION: 'u_resolution',\n ROTATION: 'u_rotation',\n VIEWPORT_SIZE_PX: 'u_viewportSizePx',\n PIXEL_RATIO: 'u_pixelRatio',\n HIT_DETECTION: 'u_hitDetection',\n};\n\n/**\n * Attribute types, either `UNSIGNED_BYTE`, `UNSIGNED_SHORT`, `UNSIGNED_INT` or `FLOAT`\n * Note: an attribute stored in a `Float32Array` should be of type `FLOAT`.\n * @enum {number}\n */\nexport const AttributeType = {\n UNSIGNED_BYTE: UNSIGNED_BYTE,\n UNSIGNED_SHORT: UNSIGNED_SHORT,\n UNSIGNED_INT: UNSIGNED_INT,\n FLOAT: FLOAT,\n};\n\n/**\n * Description of an attribute in a buffer\n * @typedef {Object} AttributeDescription\n * @property {string|null} name Attribute name to use in shaders; if null, this attribute will not be enabled and is simply used as padding in the buffers\n * @property {number} size Number of components per attributes\n * @property {AttributeType} [type] Attribute type, i.e. number of bytes used to store the value. This is\n * determined by the class of typed array which the buffer uses (eg. `Float32Array` for a `FLOAT` attribute).\n * Default is `FLOAT`.\n */\n\n/**\n * @typedef {number|Array<number>|HTMLCanvasElement|HTMLImageElement|ImageData|WebGLTexture|import(\"../transform\").Transform} UniformLiteralValue\n */\n\n/**\n * Uniform value can be a number, array of numbers (2 to 4), canvas element or a callback returning\n * one of the previous types.\n * @typedef {UniformLiteralValue|function(import(\"../Map.js\").FrameState):UniformLiteralValue} UniformValue\n */\n\n/**\n * @typedef {Object} PostProcessesOptions\n * @property {number} [scaleRatio] Scale ratio; if < 1, the post process will render to a texture smaller than\n * the main canvas which will then be sampled up (useful for saving resource on blur steps).\n * @property {string} [vertexShader] Vertex shader source\n * @property {string} [fragmentShader] Fragment shader source\n * @property {Object<string,UniformValue>} [uniforms] Uniform definitions for the post process step\n */\n\n/**\n * @typedef {Object} Options\n * @property {Object<string,UniformValue>} [uniforms] Uniform definitions; property names must match the uniform\n * names in the provided or default shaders.\n * @property {Array<PostProcessesOptions>} [postProcesses] Post-processes definitions\n * @property {string} [canvasCacheKey] The cache key for the canvas.\n */\n\n/**\n * @typedef {Object} UniformInternalDescription\n * @property {string} name Name\n * @property {UniformValue} [value] Value\n * @property {UniformValue} [prevValue] The previous value.\n * @property {WebGLTexture} [texture] Texture\n * @private\n */\n\n/**\n * @typedef {Object} CanvasCacheItem\n * @property {WebGLRenderingContext} context The context of this canvas.\n * @property {number} users The count of users of this canvas.\n */\n\n/**\n * @type {Object<string,CanvasCacheItem>}\n */\nconst canvasCache = {};\n\n/**\n * @param {string} key The cache key for the canvas.\n * @return {string} The shared cache key.\n */\nfunction getSharedCanvasCacheKey(key) {\n return 'shared/' + key;\n}\n\nlet uniqueCanvasCacheKeyCount = 0;\n\n/**\n * @return {string} The unique cache key.\n */\nfunction getUniqueCanvasCacheKey() {\n const key = 'unique/' + uniqueCanvasCacheKeyCount;\n uniqueCanvasCacheKeyCount += 1;\n return key;\n}\n\n/**\n * @param {string} key The cache key for the canvas.\n * @return {WebGLRenderingContext} The canvas.\n */\nfunction getOrCreateContext(key) {\n let cacheItem = canvasCache[key];\n if (!cacheItem) {\n const canvas = document.createElement('canvas');\n canvas.width = 1;\n canvas.height = 1;\n canvas.style.position = 'absolute';\n canvas.style.left = '0';\n const context = getContext(canvas);\n cacheItem = {users: 0, context};\n canvasCache[key] = cacheItem;\n }\n\n cacheItem.users += 1;\n return cacheItem.context;\n}\n\n/**\n * @param {string} key The cache key for the canvas.\n */\nfunction releaseCanvas(key) {\n const cacheItem = canvasCache[key];\n if (!cacheItem) {\n return;\n }\n\n cacheItem.users -= 1;\n if (cacheItem.users > 0) {\n return;\n }\n\n const gl = cacheItem.context;\n const extension = gl.getExtension('WEBGL_lose_context');\n if (extension) {\n extension.loseContext();\n }\n const canvas = gl.canvas;\n canvas.width = 1;\n canvas.height = 1;\n\n delete canvasCache[key];\n}\n\n/**\n * @classdesc\n * This class is intended to provide low-level functions related to WebGL rendering, so that accessing\n * directly the WebGL API should not be required anymore.\n *\n * Several operations are handled by the `WebGLHelper` class:\n *\n * ### Define custom shaders and uniforms\n *\n * Shaders* are low-level programs executed on the GPU and written in GLSL. There are two types of shaders:\n *\n * Vertex shaders are used to manipulate the position and attribute of *vertices* of rendered primitives (ie. corners of a square).\n * Outputs are:\n *\n * `gl_Position`: position of the vertex in screen space\n *\n * Varyings usually prefixed with `v_` are passed on to the fragment shader\n *\n * Fragment shaders are used to control the actual color of the pixels drawn on screen. Their only output is `gl_FragColor`.\n *\n * Both shaders can take *uniforms* or *attributes* as input. Attributes are explained later. Uniforms are common, read-only values that\n * can be changed at every frame and can be of type float, arrays of float or images.\n *\n * Shaders must be compiled and assembled into a program like so:\n * ```js\n * // here we simply create two shaders and assemble them in a program which is then used\n * // for subsequent rendering calls; note how a frameState is required to set up a program,\n * // as several default uniforms are computed from it (projection matrix, zoom level, etc.)\n * const vertexShader = new WebGLVertex(VERTEX_SHADER);\n * const fragmentShader = new WebGLFragment(FRAGMENT_SHADER);\n * const program = this.context.getProgram(fragmentShader, vertexShader);\n * helper.useProgram(this.program, frameState);\n * ```\n *\n * Uniforms are defined using the `uniforms` option and can either be explicit values or callbacks taking the frame state as argument.\n * You can also change their value along the way like so:\n * ```js\n * helper.setUniformFloatValue('u_value', valueAsNumber);\n * ```\n *\n * ### Defining post processing passes\n *\n * Post processing* describes the act of rendering primitives to a texture, and then rendering this texture to the final canvas\n * while applying special effects in screen space.\n * Typical uses are: blurring, color manipulation, depth of field, filtering...\n *\n * The `WebGLHelper` class offers the possibility to define post processes at creation time using the `postProcesses` option.\n * A post process step accepts the following options:\n *\n * `fragmentShader` and `vertexShader`: text literals in GLSL language that will be compiled and used in the post processing step.\n * `uniforms`: uniforms can be defined for the post processing steps just like for the main render.\n * `scaleRatio`: allows using an intermediate texture smaller or higher than the final canvas in the post processing step.\n * This is typically used in blur steps to reduce the performance overhead by using an already downsampled texture as input.\n *\n * The {@link module:ol/webgl/PostProcessingPass~WebGLPostProcessingPass} class is used internally, refer to its documentation for more info.\n *\n * ### Binding WebGL buffers and flushing data into them\n *\n * Data that must be passed to the GPU has to be transferred using {@link module:ol/webgl/Buffer~WebGLArrayBuffer} objects.\n * A buffer has to be created only once, but must be bound every time the buffer content will be used for rendering.\n * This is done using {@link bindBuffer}.\n * When the buffer's array content has changed, the new data has to be flushed to the GPU memory; this is done using\n * {@link flushBufferData}. Note: this operation is expensive and should be done as infrequently as possible.\n *\n * When binding an array buffer, a `target` parameter must be given: it should be either {@link module:ol/webgl.ARRAY_BUFFER}\n * (if the buffer contains vertices data) or {@link module:ol/webgl.ELEMENT_ARRAY_BUFFER} (if the buffer contains indices data).\n *\n * Examples below:\n * ```js\n * // at initialization phase\n * const verticesBuffer = new WebGLArrayBuffer([], DYNAMIC_DRAW);\n * const indicesBuffer = new WebGLArrayBuffer([], DYNAMIC_DRAW);\n *\n * // when array values have changed\n * helper.flushBufferData(ARRAY_BUFFER, this.verticesBuffer);\n * helper.flushBufferData(ELEMENT_ARRAY_BUFFER, this.indicesBuffer);\n *\n * // at rendering phase\n * helper.bindBuffer(ARRAY_BUFFER, this.verticesBuffer);\n * helper.bindBuffer(ELEMENT_ARRAY_BUFFER, this.indicesBuffer);\n * ```\n *\n * ### Specifying attributes\n *\n * The GPU only receives the data as arrays of numbers. These numbers must be handled differently depending on what it describes (position, texture coordinate...).\n * Attributes are used to specify these uses. Specify the attribute names with\n * {@link module:ol/webgl/Helper~WebGLHelper#enableAttributes} (see code snippet below).\n *\n * Please note that you will have to specify the type and offset of the attributes in the data array. You can refer to the documentation of [WebGLRenderingContext.vertexAttribPointer](https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext/vertexAttribPointer) for more explanation.\n * ```js\n * // here we indicate that the data array has the following structure:\n * // [posX, posY, offsetX, offsetY, texCoordU, texCoordV, posX, posY, ...]\n * helper.enableAttributes([\n * {\n * name: 'a_position',\n * size: 2\n * },\n * {\n * name: 'a_offset',\n * size: 2\n * },\n * {\n * name: 'a_texCoord',\n * size: 2\n * }\n * ])\n * ```\n *\n * ### Rendering primitives\n *\n * Once all the steps above have been achieved, rendering primitives to the screen is done using {@link prepareDraw}, {@link drawElements} and {@link finalizeDraw}.\n * ```js\n * // frame preparation step\n * helper.prepareDraw(frameState);\n *\n * // call this for every data array that has to be rendered on screen\n * helper.drawElements(0, this.indicesBuffer.getArray().length);\n *\n * // finalize the rendering by applying post processes\n * helper.finalizeDraw(frameState);\n * ```\n *\n * For an example usage of this class, refer to {@link module:ol/renderer/webgl/PointsLayer~WebGLPointsLayerRenderer}.\n */\nclass WebGLHelper extends Disposable {\n /**\n * @param {Options} [options] Options.\n */\n constructor(options) {\n super();\n options = options || {};\n\n /** @private */\n this.boundHandleWebGLContextLost_ = this.handleWebGLContextLost.bind(this);\n\n /** @private */\n this.boundHandleWebGLContextRestored_ =\n this.handleWebGLContextRestored.bind(this);\n\n /**\n * @private\n * @type {string}\n */\n this.canvasCacheKey_ = options.canvasCacheKey\n ? getSharedCanvasCacheKey(options.canvasCacheKey)\n : getUniqueCanvasCacheKey();\n\n /**\n * @private\n * @type {WebGLRenderingContext}\n */\n this.gl_ = getOrCreateContext(this.canvasCacheKey_);\n\n /**\n * @private\n * @type {!Object<string, BufferCacheEntry>}\n */\n this.bufferCache_ = {};\n\n /**\n * @private\n * @type {Object<string, Object>}\n */\n this.extensionCache_ = {};\n\n /**\n * @private\n * @type {WebGLProgram}\n */\n this.currentProgram_ = null;\n\n /**\n * @private\n * @type {boolean}\n */\n this.needsToBeRecreated_ = false;\n\n const canvas = this.gl_.canvas;\n\n canvas.addEventListener(\n ContextEventType.LOST,\n this.boundHandleWebGLContextLost_,\n );\n canvas.addEventListener(\n ContextEventType.RESTORED,\n this.boundHandleWebGLContextRestored_,\n );\n\n /**\n * @private\n * @type {import(\"../transform.js\").Transform}\n */\n this.offsetRotateMatrix_ = createTransform();\n\n /**\n * @private\n * @type {import(\"../transform.js\").Transform}\n */\n this.offsetScaleMatrix_ = createTransform();\n\n /**\n * @private\n * @type {Array<number>}\n */\n this.tmpMat4_ = create();\n\n /**\n * @private\n * @type {Object<string, Object<string, WebGLUniformLocation>>}\n */\n this.uniformLocationsByProgram_ = {};\n\n /**\n * @private\n * @type {Object<string, Object<string, number>>}\n */\n this.attribLocationsByProgram_ = {};\n\n /**\n * Holds info about custom uniforms used in the post processing pass.\n * If the uniform is a texture, the WebGL Texture object will be stored here.\n * @type {Array<UniformInternalDescription>}\n * @private\n */\n this.uniforms_ = [];\n if (options.uniforms) {\n this.setUniforms(options.uniforms);\n }\n\n /**\n * An array of PostProcessingPass objects is kept in this variable, built from the steps provided in the\n * options. If no post process was given, a default one is used (so as not to have to make an exception to\n * the frame buffer logic).\n * @type {Array<WebGLPostProcessingPass>}\n * @private\n */\n this.postProcessPasses_ = options.postProcesses\n ? options.postProcesses.map(\n (options) =>\n new WebGLPostProcessingPass({\n webGlContext: this.gl_,\n scaleRatio: options.scaleRatio,\n vertexShader: options.vertexShader,\n fragmentShader: options.fragmentShader,\n uniforms: options.uniforms,\n }),\n )\n : [new WebGLPostProcessingPass({webGlContext: this.gl_})];\n\n /**\n * @type {string|null}\n * @private\n */\n this.shaderCompileErrors_ = null;\n\n /**\n * @type {number}\n * @private\n */\n this.startTime_ = Date.now();\n\n /**\n * @type {number}\n * @private\n */\n this.maxAttributeCount_ = this.gl_.getParameter(\n this.gl_.MAX_VERTEX_ATTRIBS,\n );\n }\n\n /**\n * @param {Object<string, UniformValue>} uniforms Uniform definitions.\n */\n setUniforms(uniforms) {\n this.uniforms_ = [];\n this.addUniforms(uniforms);\n }\n\n /**\n * @param {Object<string, UniformValue>} uniforms Uniform definitions.\n */\n addUniforms(uniforms) {\n for (const name in uniforms) {\n this.uniforms_.push({\n name: name,\n value: uniforms[name],\n });\n }\n }\n\n /**\n * @param {string} canvasCacheKey The canvas cache key.\n * @return {boolean} The provided key matches the one this helper was constructed with.\n */\n canvasCacheKeyMatches(canvasCacheKey) {\n return this.canvasCacheKey_ === getSharedCanvasCacheKey(canvasCacheKey);\n }\n\n /**\n * Get a WebGL extension. If the extension is not supported, null is returned.\n * Extensions are cached after they are enabled for the first time.\n * @param {string} name The extension name.\n * @return {Object|null} The extension or null if not supported.\n */\n getExtension(name) {\n if (name in this.extensionCache_) {\n return this.extensionCache_[name];\n }\n const extension = this.gl_.getExtension(name);\n this.extensionCache_[name] = extension;\n return extension;\n }\n\n /**\n * Will throw if the extension is not available\n * @return {ANGLE_instanced_arrays} Extension\n */\n getInstancedRenderingExtension_() {\n const ext = this.getExtension('ANGLE_instanced_arrays');\n assert(\n !!ext,\n \"WebGL extension 'ANGLE_instanced_arrays' is required for vector rendering\",\n );\n return ext;\n }\n\n /**\n * Just bind the buffer if it's in the cache. Otherwise create\n * the WebGL buffer, bind it, populate it, and add an entry to\n * the cache.\n * @param {import(\"./Buffer\").default} buffer Buffer.\n */\n bindBuffer(buffer) {\n const gl = this.gl_;\n const bufferKey = getUid(buffer);\n let bufferCache = this.bufferCache_[bufferKey];\n if (!bufferCache) {\n const webGlBuffer = gl.createBuffer();\n bufferCache = {\n buffer: buffer,\n webGlBuffer: webGlBuffer,\n };\n this.bufferCache_[bufferKey] = bufferCache;\n }\n gl.bindBuffer(buffer.getType(), bufferCache.webGlBuffer);\n }\n\n /**\n * Update the data contained in the buffer array; this is required for the\n * new data to be rendered\n * @param {import(\"./Buffer\").default} buffer Buffer.\n */\n flushBufferData(buffer) {\n const gl = this.gl_;\n this.bindBuffer(buffer);\n gl.bufferData(buffer.getType(), buffer.getArray(), buffer.getUsage());\n }\n\n /**\n * @param {import(\"./Buffer.js\").default} buf Buffer.\n */\n deleteBuffer(buf) {\n const bufferKey = getUid(buf);\n // Note: gl.deleteBuffer is not called here since we let WebGL garbage collect it automatically\n delete this.bufferCache_[bufferKey];\n }\n\n /**\n * Clean up.\n * @override\n */\n disposeInternal() {\n const canvas = this.gl_.canvas;\n canvas.removeEventListener(\n ContextEventType.LOST,\n this.boundHandleWebGLContextLost_,\n );\n canvas.removeEventListener(\n ContextEventType.RESTORED,\n this.boundHandleWebGLContextRestored_,\n );\n\n releaseCanvas(this.canvasCacheKey_);\n\n delete this.gl_;\n }\n\n /**\n * Clear the buffer & set the viewport to draw.\n * Post process passes will be initialized here, the first one being bound as a render target for\n * subsequent draw calls.\n * @param {import(\"../Map.js\").FrameState} frameState current frame state\n * @param {boolean} [disableAlphaBlend] If true, no alpha blending will happen.\n * @param {boolean} [enableDepth] If true, enables depth testing.\n */\n prepareDraw(frameState, disableAlphaBlend, enableDepth) {\n const gl = this.gl_;\n const canvas = this.getCanvas();\n const size = frameState.size;\n const pixelRatio = frameState.pixelRatio;\n\n if (\n canvas.width !== size[0] * pixelRatio ||\n canvas.height !== size[1] * pixelRatio\n ) {\n canvas.width = size[0] * pixelRatio;\n canvas.height = size[1] * pixelRatio;\n canvas.style.width = size[0] + 'px';\n canvas.style.height = size[1] + 'px';\n }\n\n // loop backwards in post processes list\n for (let i = this.postProcessPasses_.length - 1; i >= 0; i--) {\n this.postProcessPasses_[i].init(frameState);\n }\n\n gl.bindTexture(gl.TEXTURE_2D, null);\n\n gl.clearColor(0.0, 0.0, 0.0, 0.0);\n gl.depthRange(0.0, 1.0);\n gl.clearDepth(1.0);\n gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);\n\n gl.enable(gl.BLEND);\n gl.blendFunc(gl.ONE, disableAlphaBlend ? gl.ZERO : gl.ONE_MINUS_SRC_ALPHA);\n if (enableDepth) {\n gl.enable(gl.DEPTH_TEST);\n gl.depthFunc(gl.LEQUAL);\n } else {\n gl.disable(gl.DEPTH_TEST);\n }\n }\n\n /**\n * @param {WebGLFramebuffer|null} frameBuffer The frame buffer.\n * @param {WebGLTexture} [texture] The texture.\n */\n bindFrameBuffer(frameBuffer, texture) {\n const gl = this.getGL();\n gl.bindFramebuffer(gl.FRAMEBUFFER, frameBuffer);\n if (texture) {\n gl.framebufferTexture2D(\n gl.FRAMEBUFFER,\n gl.COLOR_ATTACHMENT0,\n gl.TEXTURE_2D,\n texture,\n 0,\n );\n }\n }\n\n /**\n * Bind the frame buffer from the initial render.\n */\n bindInitialFrameBuffer() {\n const gl = this.getGL();\n const frameBuffer = this.postProcessPasses_[0].getFrameBuffer();\n gl.bindFramebuffer(gl.FRAMEBUFFER, frameBuffer);\n const texture = this.postProcessPasses_[0].getRenderTargetTexture();\n gl.framebufferTexture2D(\n gl.FRAMEBUFFER,\n gl.COLOR_ATTACHMENT0,\n gl.TEXTURE_2D,\n texture,\n 0,\n );\n }\n\n /**\n * Prepare a program to use a texture.\n * @param {WebGLTexture} texture The texture.\n * @param {number} slot The texture slot.\n * @param {string} uniformName The corresponding uniform name.\n */\n bindTexture(texture, slot, uniformName) {\n const gl = this.gl_;\n gl.activeTexture(gl.TEXTURE0 + slot);\n gl.bindTexture(gl.TEXTURE_2D, texture);\n gl.uniform1i(this.getUniformLocation(uniformName), slot);\n }\n\n /**\n * Set up an attribute array buffer for use in the vertex shader.\n * @param {import(\"./Buffer\").default} buffer The buffer.\n * @param {string} attributeName The attribute name.\n * @param {number} size The number of components per attribute vertex.\n */\n bindAttribute(buffer, attributeName, size) {\n const gl = this.getGL();\n this.bindBuffer(buffer);\n const index = this.getAttributeLocation(attributeName);\n gl.enableVertexAttribArray(index);\n gl.vertexAttribPointer(index, size, gl.FLOAT, false, 0, 0);\n }\n\n /**\n * Clear the render target & bind it for future draw operations.\n * This is similar to `prepareDraw`, only post processes will not be applied.\n * Note: the whole viewport will be drawn to the render target, regardless of its size.\n * @param {import(\"../Map.js\").FrameState} frameState current frame state\n * @param {import(\"./RenderTarget.js\").default} renderTarget Render target to draw to\n * @param {boolean} [disableAlphaBlend] If true, no alpha blending will happen.\n * @param {boolean} [enableDepth] If true, enables depth testing.\n */\n prepareDrawToRenderTarget(\n frameState,\n renderTarget,\n disableAlphaBlend,\n enableDepth,\n ) {\n const gl = this.gl_;\n const size = renderTarget.getSize();\n\n gl.bindFramebuffer(gl.FRAMEBUFFER, renderTarget.getFramebuffer());\n gl.bindRenderbuffer(gl.RENDERBUFFER, renderTarget.getDepthbuffer());\n gl.viewport(0, 0, size[0], size[1]);\n gl.bindTexture(gl.TEXTURE_2D, renderTarget.getTexture());\n gl.clearColor(0.0, 0.0, 0.0, 0.0);\n gl.depthRange(0.0, 1.0);\n gl.clearDepth(1.0);\n gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);\n gl.enable(gl.BLEND);\n gl.blendFunc(gl.ONE, disableAlphaBlend ? gl.ZERO : gl.ONE_MINUS_SRC_ALPHA);\n if (enableDepth) {\n gl.enable(gl.DEPTH_TEST);\n gl.depthFunc(gl.LEQUAL);\n } else {\n gl.disable(gl.DEPTH_TEST);\n }\n }\n\n /**\n * Execute a draw call based on the currently bound program, texture, buffers, attributes.\n * @param {number} start Start index.\n * @param {number} end End index.\n */\n drawElements(start, end) {\n const gl = this.gl_;\n this.getExtension('OES_element_index_uint');\n\n const elementType = gl.UNSIGNED_INT;\n const elementSize = 4;\n\n const numItems = end - start;\n const offsetInBytes = start * elementSize;\n gl.drawElements(gl.TRIANGLES, numItems, elementType, offsetInBytes);\n }\n\n /**\n * Execute a draw call similar to `drawElements`, but using instanced rendering.\n * Will have no effect if `enableAttributesInstanced` was not called for this rendering pass.\n * @param {number} start Start index.\n * @param {number} end End index.\n * @param {number} instanceCount The number of instances to render\n */\n drawElementsInstanced(start, end, instanceCount) {\n const gl = this.gl_;\n this.getExtension('OES_element_index_uint');\n const ext = this.getInstancedRenderingExtension_();\n\n const elementType = gl.UNSIGNED_INT;\n const elementSize = 4;\n\n const numItems = end - start;\n const offsetInBytes = start * elementSize;\n ext.drawElementsInstancedANGLE(\n gl.TRIANGLES,\n numItems,\n elementType,\n offsetInBytes,\n instanceCount,\n );\n\n // reset divisor values to avoid side effects\n for (let i = 0; i < this.maxAttributeCount_; i++) {\n ext.vertexAttribDivisorANGLE(i, 0);\n }\n }\n\n /**\n * Apply the successive post process passes which will eventually render to the actual canvas.\n * @param {import(\"../Map.js\").FrameState} frameState current frame state\n * @param {function(WebGLRenderingContext, import(\"../Map.js\").FrameState):void} [preCompose] Called before composing.\n * @param {function(WebGLRenderingContext, import(\"../Map.js\").FrameState):void} [postCompose] Called before composing.\n */\n finalizeDraw(frameState, preCompose, postCompose) {\n // apply post processes using the next one as target\n for (let i = 0, ii = this.postProcessPasses_.length; i < ii; i++) {\n if (i === ii - 1) {\n this.postProcessPasses_[i].apply(\n frameState,\n null,\n preCompose,\n postCompose,\n );\n } else {\n this.postProcessPasses_[i].apply(\n frameState,\n this.postProcessPasses_[i + 1],\n );\n }\n }\n }\n\n /**\n * @return {HTMLCanvasElement} Canvas.\n */\n getCanvas() {\n return /** @type {HTMLCanvasElement} */ (this.gl_.canvas);\n }\n\n /**\n * Get the WebGL rendering context\n * @return {WebGLRenderingContext} The rendering context.\n */\n getGL() {\n return this.gl_;\n }\n\n /**\n * Sets the default matrix uniforms for a given frame state. This is called internally in `prepareDraw`.\n * @param {import(\"../Map.js\").FrameState} frameState Frame state.\n */\n applyFrameState(frameState) {\n const size = frameState.size;\n const rotation = frameState.viewState.rotation;\n const pixelRatio = frameState.pixelRatio;\n\n this.setUniformFloatValue(\n DefaultUniform.TIME,\n (Date.now() - this.startTime_) * 0.001,\n );\n this.setUniformFloatValue(DefaultUniform.ZOOM, frameState.viewState.zoom);\n this.setUniformFloatValue(\n DefaultUniform.RESOLUTION,\n frameState.viewState.resolution,\n );\n this.setUniformFloatValue(DefaultUniform.PIXEL_RATIO, pixelRatio);\n this.setUniformFloatVec2(DefaultUniform.VIEWPORT_SIZE_PX, [\n size[0],\n size[1],\n ]);\n this.setUniformFloatValue(DefaultUniform.ROTATION, rotation);\n }\n\n /**\n * Sets the `u_hitDetection` uniform.\n * @param {boolean} enabled Whether to enable the hit detection code path\n */\n applyHitDetectionUniform(enabled) {\n const loc = this.getUniformLocation(DefaultUniform.HIT_DETECTION);\n this.getGL().uniform1i(loc, enabled ? 1 : 0);\n\n // hit detection uses a fixed pixel ratio\n if (enabled) {\n this.setUniformFloatValue(DefaultUniform.PIXEL_RATIO, 0.5);\n }\n }\n\n /**\n * Sets the custom uniforms based on what was given in the constructor. This is called internally in `prepareDraw`.\n * @param {import(\"../Map.js\").FrameState} frameState Frame state.\n */\n applyUniforms(frameState) {\n const gl = this.gl_;\n\n let value;\n let textureSlot = 0;\n this.uniforms_.forEach((uniform) => {\n value =\n typeof uniform.value === 'function'\n ? uniform.value(frameState)\n : uniform.value;\n\n // apply value based on type\n if (\n value instanceof HTMLCanvasElement ||\n value instanceof HTMLImageElement ||\n value instanceof ImageData ||\n value instanceof WebGLTexture\n ) {\n // create a texture & put data\n if (value instanceof WebGLTexture && !uniform.texture) {\n uniform.prevValue = undefined;\n uniform.texture = value;\n } else if (!uniform.texture) {\n uniform.prevValue = undefined;\n uniform.texture = gl.createTexture();\n }\n this.bindTexture(uniform.texture, textureSlot, uniform.name);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);\n\n const imageReady =\n !(value instanceof HTMLImageElement) ||\n /** @type {HTMLImageElement} */ (value).complete;\n if (\n !(value instanceof WebGLTexture) &&\n imageReady &&\n uniform.prevValue !== value\n ) {\n uniform.prevValue = value;\n gl.texImage2D(\n gl.TEXTURE_2D,\n 0,\n gl.RGBA,\n gl.RGBA,\n gl.UNSIGNED_BYTE,\n value,\n );\n }\n textureSlot++;\n } else if (Array.isArray(value) && value.length === 6) {\n this.setUniformMatrixValue(\n uniform.name,\n fromTransform(this.tmpMat4_, value),\n );\n } else if (Array.isArray(value) && value.length <= 4) {\n switch (value.length) {\n case 2:\n gl.uniform2f(\n this.getUniformLocation(uniform.name),\n value[0],\n value[1],\n );\n return;\n case 3:\n gl.uniform3f(\n this.getUniformLocation(uniform.name),\n value[0],\n value[1],\n value[2],\n );\n return;\n case 4:\n gl.uniform4f(\n this.getUniformLocation(uniform.name),\n value[0],\n value[1],\n value[2],\n value[3],\n );\n return;\n default:\n return;\n }\n } else if (typeof value === 'number') {\n gl.uniform1f(this.getUniformLocation(uniform.name), value);\n }\n });\n }\n\n /**\n * Set up a program for use. The program will be set as the current one. Then, the uniforms used\n * in the program will be set based on the current frame state and the helper configuration.\n * @param {WebGLProgram} program Program.\n * @param {import(\"../Map.js\").FrameState} [frameState] Frame state.\n */\n useProgram(program, frameState) {\n this.disableAllAttributes_();\n const gl = this.gl_;\n gl.useProgram(program);\n this.currentProgram_ = program;\n if (frameState) {\n this.applyFrameState(frameState);\n this.applyUniforms(frameState);\n }\n }\n\n /**\n * Will attempt to compile a vertex or fragment shader based on source\n * On error, the shader will be returned but\n * `gl.getShaderParameter(shader, gl.COMPILE_STATUS)` will return `true`\n * Use `gl.getShaderInfoLog(shader)` to have details\n * @param {string} source Shader source\n * @param {ShaderType} type VERTEX_SHADER or FRAGMENT_SHADER\n * @return {WebGLShader} Shader object\n */\n compileShader(source, type) {\n const gl = this.gl_;\n const shader = gl.createShader(type);\n gl.shaderSource(shader, source);\n gl.compileShader(shader);\n return shader;\n }\n\n /**\n * Create a program for a vertex and fragment shader. Throws if shader compilation fails.\n * @param {string} fragmentShaderSource Fragment shader source.\n * @param {string} vertexShaderSource Vertex shader source.\n * @return {WebGLProgram} Program\n */\n getProgram(fragmentShaderSource, vertexShaderSource) {\n const gl = this.gl_;\n\n const fragmentShader = this.compileShader(\n fragmentShaderSource,\n gl.FRAGMENT_SHADER,\n );\n\n const vertexShader = this.compileShader(\n vertexShaderSource,\n gl.VERTEX_SHADER,\n );\n\n const program = gl.createProgram();\n gl.attachShader(program, fragmentShader);\n gl.attachShader(program, vertexShader);\n gl.linkProgram(program);\n\n if (!gl.getShaderParameter(fragmentShader, gl.COMPILE_STATUS)) {\n const message = `Fragment shader compilation failed: ${gl.getShaderInfoLog(\n fragmentShader,\n )}`;\n throw new Error(message);\n }\n gl.deleteShader(fragmentShader);\n\n if (!gl.getShaderParameter(vertexShader, gl.COMPILE_STATUS)) {\n const message = `Vertex shader compilation failed: ${gl.getShaderInfoLog(\n vertexShader,\n )}`;\n throw new Error(message);\n }\n gl.deleteShader(vertexShader);\n\n if (!gl.getProgramParameter(program, gl.LINK_STATUS)) {\n const message = `GL program linking failed: ${gl.getProgramInfoLog(\n program,\n )}`;\n throw new Error(message);\n }\n\n return program;\n }\n\n /**\n * Will get the location from the shader or the cache\n * @param {string} name Uniform name\n * @return {WebGLUniformLocation} uniformLocation\n */\n getUniformLocation(name) {\n const programUid = getUid(this.currentProgram_);\n if (this.uniformLocationsByProgram_[programUid] === undefined) {\n this.uniformLocationsByProgram_[programUid] = {};\n }\n if (this.uniformLocationsByProgram_[programUid][name] === undefined) {\n this.uniformLocationsByProgram_[programUid][name] =\n this.gl_.getUniformLocation(this.currentProgram_, name);\n }\n return this.uniformLocationsByProgram_[programUid][name];\n }\n\n /**\n * Will get the location from the shader or the cache\n * @param {string} name Attribute name\n * @return {number} attribLocation\n */\n getAttributeLocation(name) {\n const programUid = getUid(this.currentProgram_);\n if (this.attribLocationsByProgram_[programUid] === undefined) {\n this.attribLocationsByProgram_[programUid] = {};\n }\n if (this.attribLocationsByProgram_[programUid][name] === undefined) {\n this.attribLocationsByProgram_[programUid][name] =\n this.gl_.getAttribLocation(this.currentProgram_, name);\n }\n return this.attribLocationsByProgram_[programUid][name];\n }\n\n /**\n * Sets the given transform to apply the rotation/translation/scaling of the given frame state.\n * The resulting transform can be used to convert world space coordinates to view coordinates in the [-1, 1] range.\n * @param {import(\"../Map.js\").FrameState} frameState Frame state.\n * @param {import(\"../transform\").Transform} transform Transform to update.\n * @return {import(\"../transform\").Transform} The updated transform object.\n */\n makeProjectionTransform(frameState, transform) {\n const size = frameState.size;\n const rotation = frameState.viewState.rotation;\n const resolution = frameState.viewState.resolution;\n const center = frameState.viewState.center;\n composeTransform(\n transform,\n 0,\n 0,\n 2 / (resolution * size[0]),\n 2 / (resolution * size[1]),\n -rotation,\n -center[0],\n -center[1],\n );\n return transform;\n }\n\n /**\n * Give a value for a standard float uniform\n * @param {string} uniform Uniform name\n * @param {number} value Value\n */\n setUniformFloatValue(uniform, value) {\n this.gl_.uniform1f(this.getUniformLocation(uniform), value);\n }\n\n /**\n * Give a value for a vec2 uniform\n * @param {string} uniform Uniform name\n * @param {Array<number>} value Array of length 4.\n */\n setUniformFloatVec2(uniform, value) {\n this.gl_.uniform2fv(this.getUniformLocation(uniform), value);\n }\n\n /**\n * Give a value for a vec4 uniform\n * @param {string} uniform Uniform name\n * @param {Array<number>} value Array of length 4.\n */\n setUniformFloatVec4(uniform, value) {\n this.gl_.uniform4fv(this.getUniformLocation(uniform), value);\n }\n\n /**\n * Give a value for a standard matrix4 uniform\n * @param {string} uniform Uniform name\n * @param {Array<number>} value Matrix value\n */\n setUniformMatrixValue(uniform, value) {\n this.gl_.uniformMatrix4fv(this.getUniformLocation(uniform), false, value);\n }\n\n /**\n * Disable all vertex attributes.\n * @private\n */\n disableAllAttributes_() {\n for (let i = 0; i < this.maxAttributeCount_; i++) {\n this.gl_.disableVertexAttribArray(i);\n }\n }\n\n /**\n * Will set the currently bound buffer to an attribute of the shader program. Used by `#enableAttributes`\n * internally.\n * @param {string} attribName Attribute name\n * @param {number} size Number of components per attributes\n * @param {number} type UNSIGNED_INT, UNSIGNED_BYTE, UNSIGNED_SHORT or FLOAT\n * @param {number} stride Stride in bytes (0 means attribs are packed)\n * @param {number} offset Offset in bytes\n * @param {boolean} instanced Whether the attribute is used for instanced rendering\n * @private\n */\n enableAttributeArray_(attribName, size, type, stride, offset, instanced) {\n const location = this.getAttributeLocation(attribName);\n // the attribute has not been found in the shaders or is not used; do not enable it\n if (location < 0) {\n return;\n }\n this.gl_.enableVertexAttribArray(location);\n this.gl_.vertexAttribPointer(location, size, type, false, stride, offset);\n if (instanced) {\n // note: this is reset to 0 after drawElementsInstanced is called\n this.getInstancedRenderingExtension_().vertexAttribDivisorANGLE(\n location,\n 1,\n );\n }\n }\n\n /**\n * @private\n * @param {Array<AttributeDescription>} attributes Ordered list of attributes to read from the buffer\n * @param {boolean} instanced Whether the attributes are instanced.\n */\n enableAttributes_(attributes, instanced) {\n const stride = computeAttributesStride(attributes);\n let offset = 0;\n for (let i = 0; i < attributes.length; i++) {\n const attr = attributes[i];\n // if a name is not given, simply skip this slot in the buffer\n if (attr.name) {\n this.enableAttributeArray_(\n attr.name,\n attr.size,\n attr.type || FLOAT,\n stride,\n offset,\n instanced,\n );\n }\n offset += attr.size * getByteSizeFromType(attr.type);\n }\n }\n\n /**\n * Will enable the following attributes to be read from the currently bound buffer,\n * i.e. tell the GPU where to read the different attributes in the buffer. An error in the\n * size/type/order of attributes will most likely break the rendering and throw a WebGL exception.\n * @param {Array<AttributeDescription>} attributes Ordered list of attributes to read from the buffer\n */\n enableAttributes(attributes) {\n this.enableAttributes_(attributes, false);\n }\n\n /**\n * Will enable these attributes as instanced, meaning that they will only be read\n * once per instance instead of per vertex.\n * @param {Array<AttributeDescription>} attributes Ordered list of attributes to read from the buffer\n */\n enableAttributesInstanced(attributes) {\n this.enableAttributes_(attributes, true);\n }\n\n /**\n * WebGL context was lost\n * @param {WebGLContextEvent} event The context loss event.\n * @private\n */\n handleWebGLContextLost(event) {\n clear(this.bufferCache_);\n this.currentProgram_ = null;\n\n event.preventDefault();\n }\n\n /**\n * WebGL context was restored\n * @private\n */\n handleWebGLContextRestored() {\n this.needsToBeRecreated_ = true;\n }\n\n /**\n * Returns whether this helper needs to be recreated, as the context was lost and then restored.\n * @return {boolean} Whether this helper needs to be recreated.\n */\n needsToBeRecreated() {\n return this.needsToBeRecreated_;\n }\n\n /**\n * Will create or reuse a given webgl texture and apply the given size. If no image data\n * specified, the texture will be empty, otherwise image data will be used and the `size`\n * parameter will be ignored. If a Uint8Array is provided for data, a size must also be provided.\n * Note: wrap parameters are set to clamp to edge, min filter is set to linear.\n * @param {Array<number>} size Expected size of the texture\n * @param {ImageData|HTMLImageElement|HTMLCanvasElement|Uint8Array|null} data Image data/object to bind to the texture\n * @param {WebGLTexture} [texture] Existing texture to reuse\n * @param {boolean} [nearest] Use gl.NEAREST for min/mag filter.\n * @return {WebGLTexture} The generated texture\n */\n createTexture(size, data, texture, nearest) {\n const gl = this.gl_;\n texture = texture || gl.createTexture();\n const filter = nearest ? gl.NEAREST : gl.LINEAR;\n\n gl.bindTexture(gl.TEXTURE_2D, texture);\n\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, filter);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, filter);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);\n\n const level = 0;\n const internalFormat = gl.RGBA;\n const border = 0;\n const format = gl.RGBA;\n const type = gl.UNSIGNED_BYTE;\n\n if (data instanceof Uint8Array) {\n gl.texImage2D(\n gl.TEXTURE_2D,\n level,\n internalFormat,\n size[0],\n size[1],\n border,\n format,\n type,\n data,\n );\n } else if (data) {\n gl.texImage2D(gl.TEXTURE_2D, level, internalFormat, format, type, data);\n } else {\n gl.texImage2D(\n gl.TEXTURE_2D,\n level,\n internalFormat,\n size[0],\n size[1],\n border,\n format,\n type,\n null,\n );\n }\n return texture;\n }\n}\n\n/**\n * Compute a stride in bytes based on a list of attributes\n * @param {Array<AttributeDescription>} attributes Ordered list of attributes\n * @return {number} Stride, ie amount of values for each vertex in the vertex buffer\n */\nexport function computeAttributesStride(attributes) {\n let stride = 0;\n for (let i = 0; i < attributes.length; i++) {\n const attr = attributes[i];\n stride += attr.size * getByteSizeFromType(attr.type);\n }\n return stride;\n}\n\n/**\n * Computes the size in byte of an attribute type.\n * @param {AttributeType} type Attribute type\n * @return {number} The size in bytes\n */\nfunction getByteSizeFromType(type) {\n switch (type) {\n case AttributeType.UNSIGNED_BYTE:\n return Uint8Array.BYTES_PER_ELEMENT;\n case AttributeType.UNSIGNED_SHORT:\n return Uint16Array.BYTES_PER_ELEMENT;\n case AttributeType.UNSIGNED_INT:\n return Uint32Array.BYTES_PER_ELEMENT;\n case AttributeType.FLOAT:\n default:\n return Float32Array.BYTES_PER_ELEMENT;\n }\n}\n\nexport default WebGLHelper;\n", "/**\n * @module ol/renderer/webgl/Layer\n */\nimport LayerProperty from '../../layer/Property.js';\nimport RenderEvent from '../../render/Event.js';\nimport RenderEventType from '../../render/EventType.js';\nimport {\n compose as composeTransform,\n create as createTransform,\n} from '../../transform.js';\nimport WebGLHelper from '../../webgl/Helper.js';\nimport LayerRenderer from '../Layer.js';\n\n/**\n * @typedef {Object} PostProcessesOptions\n * @property {number} [scaleRatio] Scale ratio; if < 1, the post process will render to a texture smaller than\n * the main canvas that will then be sampled up (useful for saving resource on blur steps).\n * @property {string} [vertexShader] Vertex shader source\n * @property {string} [fragmentShader] Fragment shader source\n * @property {Object<string,import(\"../../webgl/Helper\").UniformValue>} [uniforms] Uniform definitions for the post process step\n */\n\n/**\n * @typedef {Object} Options\n * @property {Object<string,import(\"../../webgl/Helper\").UniformValue>} [uniforms] Uniform definitions for the post process steps\n * @property {Array<PostProcessesOptions>} [postProcesses] Post-processes definitions\n */\n\n/**\n * @classdesc\n * Base WebGL renderer class.\n * Holds all logic related to data manipulation & some common rendering logic\n * @template {import(\"../../layer/Layer.js\").default} LayerType\n * @extends {LayerRenderer<LayerType>}\n */\nclass WebGLLayerRenderer extends LayerRenderer {\n /**\n * @param {LayerType} layer Layer.\n * @param {Options} [options] Options.\n */\n constructor(layer, options) {\n super(layer);\n\n options = options || {};\n\n /**\n * The transform for viewport CSS pixels to rendered pixels. This transform is only\n * set before dispatching rendering events.\n * @private\n * @type {import(\"../../transform.js\").Transform}\n */\n this.inversePixelTransform_ = createTransform();\n\n /**\n * @private\n */\n this.postProcesses_ = options.postProcesses;\n\n /**\n * @private\n */\n this.uniforms_ = options.uniforms;\n\n /**\n * @type {WebGLHelper}\n * @protected\n */\n this.helper;\n\n this.onMapChanged_ = () => {\n this.clearCache();\n this.removeHelper();\n };\n\n layer.addChangeListener(LayerProperty.MAP, this.onMapChanged_);\n\n this.dispatchPreComposeEvent = this.dispatchPreComposeEvent.bind(this);\n this.dispatchPostComposeEvent = this.dispatchPostComposeEvent.bind(this);\n }\n\n /**\n * @param {WebGLRenderingContext} context The WebGL rendering context.\n * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n * @protected\n */\n dispatchPreComposeEvent(context, frameState) {\n const layer = this.getLayer();\n if (layer.hasListener(RenderEventType.PRECOMPOSE)) {\n const event = new RenderEvent(\n RenderEventType.PRECOMPOSE,\n undefined,\n frameState,\n context,\n );\n layer.dispatchEvent(event);\n }\n }\n\n /**\n * @param {WebGLRenderingContext} context The WebGL rendering context.\n * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n * @protected\n */\n dispatchPostComposeEvent(context, frameState) {\n const layer = this.getLayer();\n if (layer.hasListener(RenderEventType.POSTCOMPOSE)) {\n const event = new RenderEvent(\n RenderEventType.POSTCOMPOSE,\n undefined,\n frameState,\n context,\n );\n layer.dispatchEvent(event);\n }\n }\n\n /**\n * Reset options (only handles uniforms).\n * @param {Options} options Options.\n */\n reset(options) {\n this.uniforms_ = options.uniforms;\n if (this.helper) {\n this.helper.setUniforms(this.uniforms_);\n }\n }\n\n /**\n * @protected\n */\n removeHelper() {\n if (this.helper) {\n this.helper.dispose();\n delete this.helper;\n }\n }\n\n /**\n * Determine whether renderFrame should be called.\n * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n * @return {boolean} Layer is ready to be rendered.\n * @override\n */\n prepareFrame(frameState) {\n if (this.getLayer().getRenderSource()) {\n let incrementGroup = true;\n let groupNumber = -1;\n let className;\n for (let i = 0, ii = frameState.layerStatesArray.length; i < ii; i++) {\n const layer = frameState.layerStatesArray[i].layer;\n const renderer = layer.getRenderer();\n if (!(renderer instanceof WebGLLayerRenderer)) {\n incrementGroup = true;\n continue;\n }\n const layerClassName = layer.getClassName();\n if (incrementGroup || layerClassName !== className) {\n groupNumber += 1;\n incrementGroup = false;\n }\n className = layerClassName;\n if (renderer === this) {\n break;\n }\n }\n\n const canvasCacheKey =\n 'map/' + frameState.mapId + '/group/' + groupNumber;\n\n if (\n !this.helper ||\n !this.helper.canvasCacheKeyMatches(canvasCacheKey) ||\n this.helper.needsToBeRecreated()\n ) {\n this.removeHelper();\n\n this.helper = new WebGLHelper({\n postProcesses: this.postProcesses_,\n uniforms: this.uniforms_,\n canvasCacheKey: canvasCacheKey,\n });\n\n if (className) {\n this.helper.getCanvas().className = className;\n }\n\n this.afterHelperCreated();\n }\n }\n\n return this.prepareFrameInternal(frameState);\n }\n\n /**\n * @protected\n */\n afterHelperCreated() {}\n\n /**\n * Determine whether renderFrame should be called.\n * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n * @return {boolean} Layer is ready to be rendered.\n * @protected\n */\n prepareFrameInternal(frameState) {\n return true;\n }\n\n /**\n * @protected\n */\n clearCache() {}\n\n /**\n * Clean up.\n * @override\n */\n disposeInternal() {\n this.clearCache();\n this.removeHelper();\n this.getLayer()?.removeChangeListener(\n LayerProperty.MAP,\n this.onMapChanged_,\n );\n super.disposeInternal();\n }\n\n /**\n * @param {import(\"../../render/EventType.js\").default} type Event type.\n * @param {WebGLRenderingContext} context The rendering context.\n * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n * @private\n */\n dispatchRenderEvent_(type, context, frameState) {\n const layer = this.getLayer();\n if (layer.hasListener(type)) {\n composeTransform(\n this.inversePixelTransform_,\n 0,\n 0,\n frameState.pixelRatio,\n -frameState.pixelRatio,\n 0,\n 0,\n -frameState.size[1],\n );\n\n const event = new RenderEvent(\n type,\n this.inversePixelTransform_,\n frameState,\n context,\n );\n layer.dispatchEvent(event);\n }\n }\n\n /**\n * @param {WebGLRenderingContext} context The rendering context.\n * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n * @protected\n */\n preRender(context, frameState) {\n this.dispatchRenderEvent_(RenderEventType.PRERENDER, context, frameState);\n }\n\n /**\n * @param {WebGLRenderingContext} context The rendering context.\n * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n * @protected\n */\n postRender(context, frameState) {\n this.dispatchRenderEvent_(RenderEventType.POSTRENDER, context, frameState);\n }\n}\n\nexport default WebGLLayerRenderer;\n", "/**\n * @module ol/renderer/webgl/TileLayerBase\n */\nimport TileRange from '../../TileRange.js';\nimport TileState from '../../TileState.js';\nimport {descending} from '../../array.js';\nimport {getIntersection, getRotatedViewport, isEmpty} from '../../extent.js';\nimport {fromUserExtent} from '../../proj.js';\nimport {toSize} from '../../size.js';\nimport LRUCache from '../../structs/LRUCache.js';\nimport {\n createOrUpdate as createTileCoord,\n getKey as getTileCoordKey,\n} from '../../tilecoord.js';\nimport {\n create as createTransform,\n reset as resetTransform,\n rotate as rotateTransform,\n scale as scaleTransform,\n translate as translateTransform,\n} from '../../transform.js';\nimport {abstract, getUid} from '../../util.js';\nimport {create as createMat4} from '../../vec/mat4.js';\nimport WebGLLayerRenderer from './Layer.js';\n\nexport const Uniforms = {\n TILE_TRANSFORM: 'u_tileTransform',\n TRANSITION_ALPHA: 'u_transitionAlpha',\n DEPTH: 'u_depth',\n RENDER_EXTENT: 'u_renderExtent', // intersection of layer, source, and view extent\n PATTERN_ORIGIN: 'u_patternOrigin',\n RESOLUTION: 'u_resolution',\n ZOOM: 'u_zoom',\n GLOBAL_ALPHA: 'u_globalAlpha',\n PROJECTION_MATRIX: 'u_projectionMatrix',\n SCREEN_TO_WORLD_MATRIX: 'u_screenToWorldMatrix',\n};\n\n/**\n * Transform a zoom level into a depth value; zoom level zero has a depth value of 0.5, and increasing values\n * have a depth trending towards 0\n * @param {number} z A zoom level.\n * @return {number} A depth value.\n */\nfunction depthForZ(z) {\n return 1 / (z + 2);\n}\n\n/**\n * @typedef {import(\"../../webgl/BaseTileRepresentation.js\").default<import(\"../../Tile.js\").default>} AbstractTileRepresentation\n */\n/**\n * @typedef {Object} TileRepresentationLookup\n * @property {Set<string>} tileIds The set of tile ids in the lookup.\n * @property {Object<number, Set<AbstractTileRepresentation>>} representationsByZ Tile representations by zoom level.\n */\n\n/**\n * @return {TileRepresentationLookup} A new tile representation lookup.\n */\nexport function newTileRepresentationLookup() {\n return {tileIds: new Set(), representationsByZ: {}};\n}\n\n/**\n * Check if a tile is already in the tile representation lookup.\n * @param {TileRepresentationLookup} tileRepresentationLookup Lookup of tile representations by zoom level.\n * @param {import(\"../../Tile.js\").default} tile A tile.\n * @return {boolean} The tile is already in the lookup.\n */\nfunction lookupHasTile(tileRepresentationLookup, tile) {\n return tileRepresentationLookup.tileIds.has(getUid(tile));\n}\n\n/**\n * Add a tile representation to the lookup.\n * @param {TileRepresentationLookup} tileRepresentationLookup Lookup of tile representations by zoom level.\n * @param {AbstractTileRepresentation} tileRepresentation A tile representation.\n * @param {number} z The zoom level.\n */\nfunction addTileRepresentationToLookup(\n tileRepresentationLookup,\n tileRepresentation,\n z,\n) {\n const representationsByZ = tileRepresentationLookup.representationsByZ;\n if (!(z in representationsByZ)) {\n representationsByZ[z] = new Set();\n }\n representationsByZ[z].add(tileRepresentation);\n tileRepresentationLookup.tileIds.add(getUid(tileRepresentation.tile));\n}\n\n/**\n * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n * @param {import(\"../../extent.js\").Extent} extent The frame extent.\n * @return {import(\"../../extent.js\").Extent} Frame extent intersected with layer extents.\n */\nfunction getRenderExtent(frameState, extent) {\n const layerState = frameState.layerStatesArray[frameState.layerIndex];\n if (layerState.extent) {\n extent = getIntersection(\n extent,\n fromUserExtent(layerState.extent, frameState.viewState.projection),\n );\n }\n const source = /** @type {import(\"../../source/Tile.js\").default} */ (\n layerState.layer.getRenderSource()\n );\n if (!source.getWrapX()) {\n const gridExtent = source\n .getTileGridForProjection(frameState.viewState.projection)\n .getExtent();\n if (gridExtent) {\n extent = getIntersection(extent, gridExtent);\n }\n }\n return extent;\n}\n\n/**\n * @param {import(\"../../source/Tile.js\").default} source The source.\n * @param {import('../../tilecoord.js').TileCoord} tileCoord The tile coordinate.\n * @return {string} The cache key.\n */\nexport function getCacheKey(source, tileCoord) {\n return `${getUid(source)},${source.getKey()},${getTileCoordKey(tileCoord)}`;\n}\n\n/**\n * @typedef {Object} Options\n * @property {Object<string, import(\"../../webgl/Helper\").UniformValue>} [uniforms] Additional uniforms\n * made available to shaders.\n * @property {number} [cacheSize=512] The tile representation cache size.\n * @property {Array<import('./Layer.js').PostProcessesOptions>} [postProcesses] Post-processes definitions.\n */\n\n/**\n * @typedef {import(\"../../layer/BaseTile.js\").default} BaseLayerType\n */\n\n/**\n * @classdesc\n * Base WebGL renderer for tile layers.\n * @template {BaseLayerType} LayerType\n * @template {import(\"../../Tile.js\").default} TileType\n * @template {import(\"../../webgl/BaseTileRepresentation.js\").default<TileType>} TileRepresentation\n * @extends {WebGLLayerRenderer<LayerType>}\n */\nclass WebGLBaseTileLayerRenderer extends WebGLLayerRenderer {\n /**\n * @param {LayerType} tileLayer Tile layer.\n * @param {Options} options Options.\n */\n constructor(tileLayer, options) {\n super(tileLayer, {\n uniforms: options.uniforms,\n postProcesses: options.postProcesses,\n });\n\n /**\n * The last call to `renderFrame` was completed with all tiles loaded\n * @type {boolean}\n */\n this.renderComplete = false;\n\n /**\n * This transform converts representation coordinates to screen coordinates.\n * @type {import(\"../../transform.js\").Transform}\n * @private\n */\n this.tileTransform_ = createTransform();\n\n /**\n * @type {Array<number>}\n * @protected\n */\n this.tempMat4 = createMat4();\n\n /**\n * @type {import(\"../../TileRange.js\").default}\n * @private\n */\n this.tempTileRange_ = new TileRange(0, 0, 0, 0);\n\n /**\n * @type {import(\"../../tilecoord.js\").TileCoord}\n * @private\n */\n this.tempTileCoord_ = createTileCoord(0, 0, 0);\n\n /**\n * @type {import(\"../../size.js\").Size}\n * @private\n */\n this.tempSize_ = [0, 0];\n\n const cacheSize = options.cacheSize !== undefined ? options.cacheSize : 512;\n /**\n * @type {import(\"../../structs/LRUCache.js\").default<TileRepresentation>}\n * @protected\n */\n this.tileRepresentationCache = new LRUCache(cacheSize);\n\n /**\n * @protected\n * @type {import(\"../../Map.js\").FrameState|null}\n */\n this.frameState = null;\n\n /**\n * @private\n * @type {import(\"../../proj/Projection.js\").default}\n */\n this.renderedProjection_ = undefined;\n }\n\n /**\n * @param {Options} options Options.\n * @override\n */\n reset(options) {\n super.reset({\n uniforms: options.uniforms,\n });\n }\n\n /**\n * Determine whether renderFrame should be called.\n * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n * @return {boolean} Layer is ready to be rendered.\n * @override\n */\n prepareFrameInternal(frameState) {\n if (!this.renderedProjection_) {\n this.renderedProjection_ = frameState.viewState.projection;\n } else if (frameState.viewState.projection !== this.renderedProjection_) {\n this.clearCache();\n this.renderedProjection_ = frameState.viewState.projection;\n }\n\n const layer = this.getLayer();\n const source = layer.getRenderSource();\n if (!source) {\n return false;\n }\n\n if (isEmpty(getRenderExtent(frameState, frameState.extent))) {\n return false;\n }\n return source.getState() === 'ready';\n }\n\n /**\n * @abstract\n * @param {import(\"../../webgl/BaseTileRepresentation.js\").TileRepresentationOptions<TileType>} options tile representation options\n * @return {TileRepresentation} A new tile representation\n * @protected\n */\n createTileRepresentation(options) {\n return abstract();\n }\n\n /**\n * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n * @param {import(\"../../extent.js\").Extent} extent The extent to be rendered.\n * @param {number} initialZ The zoom level.\n * @param {TileRepresentationLookup} tileRepresentationLookup The zoom level.\n * @param {number} preload Number of additional levels to load.\n */\n enqueueTiles(\n frameState,\n extent,\n initialZ,\n tileRepresentationLookup,\n preload,\n ) {\n const viewState = frameState.viewState;\n const tileLayer = this.getLayer();\n const tileSource = tileLayer.getRenderSource();\n const tileGrid = tileSource.getTileGridForProjection(viewState.projection);\n const gutter = tileSource.getGutterForProjection(viewState.projection);\n\n const tileSourceKey = getUid(tileSource);\n if (!(tileSourceKey in frameState.wantedTiles)) {\n frameState.wantedTiles[tileSourceKey] = {};\n }\n\n const wantedTiles = frameState.wantedTiles[tileSourceKey];\n const tileRepresentationCache = this.tileRepresentationCache;\n\n const map = tileLayer.getMapInternal();\n const minZ = Math.max(\n initialZ - preload,\n tileGrid.getMinZoom(),\n tileGrid.getZForResolution(\n Math.min(\n tileLayer.getMaxResolution(),\n map\n ? map\n .getView()\n .getResolutionForZoom(Math.max(tileLayer.getMinZoom(), 0))\n : tileGrid.getResolution(0),\n ),\n tileSource.zDirection,\n ),\n );\n const rotation = viewState.rotation;\n const viewport = rotation\n ? getRotatedViewport(\n viewState.center,\n viewState.resolution,\n rotation,\n frameState.size,\n )\n : undefined;\n for (let z = initialZ; z >= minZ; --z) {\n const tileRange = tileGrid.getTileRangeForExtentAndZ(\n extent,\n z,\n this.tempTileRange_,\n );\n\n const tileResolution = tileGrid.getResolution(z);\n\n for (let x = tileRange.minX; x <= tileRange.maxX; ++x) {\n for (let y = tileRange.minY; y <= tileRange.maxY; ++y) {\n if (\n rotation &&\n !tileGrid.tileCoordIntersectsViewport([z, x, y], viewport)\n ) {\n continue;\n }\n const tileCoord = createTileCoord(z, x, y, this.tempTileCoord_);\n const cacheKey = getCacheKey(tileSource, tileCoord);\n\n /** @type {TileRepresentation} */\n let tileRepresentation;\n\n /** @type {TileType} */\n let tile;\n\n if (tileRepresentationCache.containsKey(cacheKey)) {\n tileRepresentation = tileRepresentationCache.get(cacheKey);\n tile = tileRepresentation.tile;\n }\n if (\n !tileRepresentation ||\n tileRepresentation.tile.key !== tileSource.getKey()\n ) {\n tile = tileSource.getTile(\n z,\n x,\n y,\n frameState.pixelRatio,\n viewState.projection,\n );\n if (!tile) {\n continue;\n }\n }\n\n if (lookupHasTile(tileRepresentationLookup, tile)) {\n continue;\n }\n\n if (!tileRepresentation) {\n tileRepresentation = this.createTileRepresentation({\n tile: tile,\n grid: tileGrid,\n helper: this.helper,\n gutter: gutter,\n });\n tileRepresentationCache.set(cacheKey, tileRepresentation);\n } else {\n tileRepresentation.setTile(tile);\n }\n\n addTileRepresentationToLookup(\n tileRepresentationLookup,\n tileRepresentation,\n z,\n );\n\n const tileQueueKey = tile.getKey();\n wantedTiles[tileQueueKey] = true;\n\n if (tile.getState() === TileState.IDLE) {\n if (!frameState.tileQueue.isKeyQueued(tileQueueKey)) {\n frameState.tileQueue.enqueue([\n tile,\n tileSourceKey,\n tileGrid.getTileCoordCenter(tileCoord),\n tileResolution,\n ]);\n }\n }\n }\n }\n }\n }\n\n /**\n * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n * @param {boolean} tilesWithAlpha True if at least one of the rendered tiles has alpha\n * @protected\n */\n beforeTilesRender(frameState, tilesWithAlpha) {\n this.helper.prepareDraw(this.frameState, !tilesWithAlpha, true);\n }\n\n /**\n * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n * @return {boolean} If returns false, tile mask rendering will be skipped\n * @protected\n */\n beforeTilesMaskRender(frameState) {\n return false;\n }\n\n /**\n * @param {TileRepresentation} tileRepresentation Tile representation\n * @param {import(\"../../transform.js\").Transform} tileTransform Tile transform\n * @param {import(\"../../Map.js\").FrameState} frameState Frame state\n * @param {import(\"../../extent.js\").Extent} renderExtent Render extent\n * @param {number} tileResolution Tile resolution\n * @param {import(\"../../size.js\").Size} tileSize Tile size\n * @param {import(\"../../coordinate.js\").Coordinate} tileOrigin Tile origin\n * @param {import(\"../../extent.js\").Extent} tileExtent tile Extent\n * @param {number} depth Depth\n * @param {number} gutter Gutter\n * @param {number} alpha Alpha\n * @protected\n */\n renderTile(\n tileRepresentation,\n tileTransform,\n frameState,\n renderExtent,\n tileResolution,\n tileSize,\n tileOrigin,\n tileExtent,\n depth,\n gutter,\n alpha,\n ) {}\n\n /**\n * @param {TileRepresentation} tileRepresentation Tile representation\n * @param {number} tileZ Tile Z\n * @param {import(\"../../extent.js\").Extent} extent Render extent\n * @param {number} depth Depth\n * @protected\n */\n renderTileMask(tileRepresentation, tileZ, extent, depth) {}\n\n drawTile_(\n frameState,\n tileRepresentation,\n tileZ,\n gutter,\n extent,\n alphaLookup,\n tileGrid,\n ) {\n if (!tileRepresentation.ready) {\n return;\n }\n const tile = tileRepresentation.tile;\n const tileCoord = tile.tileCoord;\n const tileCoordKey = getTileCoordKey(tileCoord);\n const alpha = tileCoordKey in alphaLookup ? alphaLookup[tileCoordKey] : 1;\n\n const tileResolution = tileGrid.getResolution(tileZ);\n const tileSize = toSize(tileGrid.getTileSize(tileZ), this.tempSize_);\n const tileOrigin = tileGrid.getOrigin(tileZ);\n const tileExtent = tileGrid.getTileCoordExtent(tileCoord);\n // tiles with alpha are rendered last to allow blending\n const depth = alpha < 1 ? -1 : depthForZ(tileZ);\n if (alpha < 1) {\n frameState.animate = true;\n }\n\n const viewState = frameState.viewState;\n const centerX = viewState.center[0];\n const centerY = viewState.center[1];\n\n const tileWidthWithGutter = tileSize[0] + 2 * gutter;\n const tileHeightWithGutter = tileSize[1] + 2 * gutter;\n\n const aspectRatio = tileWidthWithGutter / tileHeightWithGutter;\n\n const centerI = (centerX - tileOrigin[0]) / (tileSize[0] * tileResolution);\n const centerJ = (tileOrigin[1] - centerY) / (tileSize[1] * tileResolution);\n\n const tileScale = viewState.resolution / tileResolution;\n\n const tileCenterI = tileCoord[1];\n const tileCenterJ = tileCoord[2];\n\n resetTransform(this.tileTransform_);\n scaleTransform(\n this.tileTransform_,\n 2 / ((frameState.size[0] * tileScale) / tileWidthWithGutter),\n -2 / ((frameState.size[1] * tileScale) / tileWidthWithGutter),\n );\n rotateTransform(this.tileTransform_, viewState.rotation);\n scaleTransform(this.tileTransform_, 1, 1 / aspectRatio);\n translateTransform(\n this.tileTransform_,\n (tileSize[0] * (tileCenterI - centerI) - gutter) / tileWidthWithGutter,\n (tileSize[1] * (tileCenterJ - centerJ) - gutter) / tileHeightWithGutter,\n );\n\n this.renderTile(\n /** @type {TileRepresentation} */ (tileRepresentation),\n this.tileTransform_,\n frameState,\n extent,\n tileResolution,\n tileSize,\n tileOrigin,\n tileExtent,\n depth,\n gutter,\n alpha,\n );\n }\n\n /**\n * Render the layer.\n * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n * @return {HTMLElement} The rendered element.\n * @override\n */\n renderFrame(frameState) {\n this.frameState = frameState;\n this.renderComplete = true;\n const gl = this.helper.getGL();\n this.preRender(gl, frameState);\n\n const viewState = frameState.viewState;\n const tileLayer = this.getLayer();\n const tileSource = tileLayer.getRenderSource();\n const tileGrid = tileSource.getTileGridForProjection(viewState.projection);\n const gutter = tileSource.getGutterForProjection(viewState.projection);\n const extent = getRenderExtent(frameState, frameState.extent);\n const z = tileGrid.getZForResolution(\n viewState.resolution,\n tileSource.zDirection,\n );\n\n /**\n * @type {TileRepresentationLookup}\n */\n const tileRepresentationLookup = newTileRepresentationLookup();\n\n const preload = tileLayer.getPreload();\n if (frameState.nextExtent) {\n const targetZ = tileGrid.getZForResolution(\n viewState.nextResolution,\n tileSource.zDirection,\n );\n const nextExtent = getRenderExtent(frameState, frameState.nextExtent);\n this.enqueueTiles(\n frameState,\n nextExtent,\n targetZ,\n tileRepresentationLookup,\n preload,\n );\n }\n\n this.enqueueTiles(frameState, extent, z, tileRepresentationLookup, 0);\n if (preload > 0) {\n setTimeout(() => {\n this.enqueueTiles(\n frameState,\n extent,\n z - 1,\n tileRepresentationLookup,\n preload - 1,\n );\n }, 0);\n }\n\n /**\n * A lookup of alpha values for tiles at the target rendering resolution\n * for tiles that are in transition. If a tile coord key is absent from\n * this lookup, the tile should be rendered at alpha 1.\n * @type {Object<string, number>}\n */\n const alphaLookup = {};\n\n let blend = false;\n const representationsByZ = tileRepresentationLookup.representationsByZ;\n\n // look for cached tiles to use if a target tile is not ready\n if (z in representationsByZ) {\n const uid = getUid(this);\n const time = frameState.time;\n for (const tileRepresentation of representationsByZ[z]) {\n const tile = tileRepresentation.tile;\n if (tile.getState() === TileState.EMPTY) {\n continue;\n }\n const tileCoord = tile.tileCoord;\n\n if (tileRepresentation.ready) {\n const alpha = tile.getAlpha(uid, time);\n if (alpha === 1) {\n // no need to look for alt tiles\n tile.endTransition(uid);\n continue;\n }\n blend = true;\n const tileCoordKey = getTileCoordKey(tileCoord);\n alphaLookup[tileCoordKey] = alpha;\n }\n this.renderComplete = false;\n\n // first look for child tiles (at z + 1)\n const coveredByChildren = this.findAltTiles_(\n tileGrid,\n tileCoord,\n z + 1,\n tileRepresentationLookup,\n );\n\n if (coveredByChildren) {\n continue;\n }\n\n // next look for parent tiles\n const minZoom = tileGrid.getMinZoom();\n for (let parentZ = z - 1; parentZ >= minZoom; --parentZ) {\n const coveredByParent = this.findAltTiles_(\n tileGrid,\n tileCoord,\n parentZ,\n tileRepresentationLookup,\n );\n\n if (coveredByParent) {\n break;\n }\n }\n }\n }\n\n const zs = Object.keys(representationsByZ).map(Number).sort(descending);\n\n const renderTileMask = this.beforeTilesMaskRender(frameState);\n\n if (renderTileMask) {\n for (let j = 0, jj = zs.length; j < jj; ++j) {\n const tileZ = zs[j];\n for (const tileRepresentation of representationsByZ[tileZ]) {\n const tileCoord = tileRepresentation.tile.tileCoord;\n const tileCoordKey = getTileCoordKey(tileCoord);\n // do not render the tile mask if alpha < 1\n if (tileCoordKey in alphaLookup) {\n continue;\n }\n const tileExtent = tileGrid.getTileCoordExtent(tileCoord);\n this.renderTileMask(\n /** @type {TileRepresentation} */ (tileRepresentation),\n tileZ,\n tileExtent,\n depthForZ(tileZ),\n );\n }\n }\n }\n\n this.beforeTilesRender(frameState, blend);\n\n for (let j = 0, jj = zs.length; j < jj; ++j) {\n const tileZ = zs[j];\n for (const tileRepresentation of representationsByZ[tileZ]) {\n const tileCoord = tileRepresentation.tile.tileCoord;\n const tileCoordKey = getTileCoordKey(tileCoord);\n if (tileCoordKey in alphaLookup) {\n continue;\n }\n\n this.drawTile_(\n frameState,\n tileRepresentation,\n tileZ,\n gutter,\n extent,\n alphaLookup,\n tileGrid,\n );\n }\n }\n\n if (z in representationsByZ) {\n for (const tileRepresentation of representationsByZ[z]) {\n const tileCoord = tileRepresentation.tile.tileCoord;\n const tileCoordKey = getTileCoordKey(tileCoord);\n if (tileCoordKey in alphaLookup) {\n this.drawTile_(\n frameState,\n tileRepresentation,\n z,\n gutter,\n extent,\n alphaLookup,\n tileGrid,\n );\n }\n }\n }\n\n this.beforeFinalize(frameState);\n this.helper.finalizeDraw(\n frameState,\n this.dispatchPreComposeEvent,\n this.dispatchPostComposeEvent,\n );\n\n const canvas = this.helper.getCanvas();\n\n const tileRepresentationCache = this.tileRepresentationCache;\n tileRepresentationCache.expireCache();\n\n this.postRender(gl, frameState);\n return canvas;\n }\n\n /**\n * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n * @protected\n */\n beforeFinalize(frameState) {\n return;\n }\n\n /**\n * Look for tiles covering the provided tile coordinate at an alternate\n * zoom level. Loaded tiles will be added to the provided tile representation lookup.\n * @param {import(\"../../tilegrid/TileGrid.js\").default} tileGrid The tile grid.\n * @param {import(\"../../tilecoord.js\").TileCoord} tileCoord The target tile coordinate.\n * @param {number} altZ The alternate zoom level.\n * @param {TileRepresentationLookup} tileRepresentationLookup Lookup of\n * tile representations by zoom level.\n * @return {boolean} The tile coordinate is covered by loaded tiles at the alternate zoom level.\n * @private\n */\n findAltTiles_(tileGrid, tileCoord, altZ, tileRepresentationLookup) {\n const tileRange = tileGrid.getTileRangeForTileCoordAndZ(\n tileCoord,\n altZ,\n this.tempTileRange_,\n );\n\n if (!tileRange) {\n return false;\n }\n\n let covered = true;\n const tileRepresentationCache = this.tileRepresentationCache;\n const source = this.getLayer().getRenderSource();\n for (let x = tileRange.minX; x <= tileRange.maxX; ++x) {\n for (let y = tileRange.minY; y <= tileRange.maxY; ++y) {\n const cacheKey = getCacheKey(source, [altZ, x, y]);\n let loaded = false;\n if (tileRepresentationCache.containsKey(cacheKey)) {\n const tileRepresentation = tileRepresentationCache.get(cacheKey);\n if (\n tileRepresentation.ready &&\n !lookupHasTile(tileRepresentationLookup, tileRepresentation.tile)\n ) {\n addTileRepresentationToLookup(\n tileRepresentationLookup,\n tileRepresentation,\n altZ,\n );\n loaded = true;\n }\n }\n if (!loaded) {\n covered = false;\n }\n }\n }\n return covered;\n }\n\n /**\n * @override\n */\n clearCache() {\n super.clearCache();\n\n const tileRepresentationCache = this.tileRepresentationCache;\n tileRepresentationCache.forEach((tileRepresentation) =>\n tileRepresentation.dispose(),\n );\n tileRepresentationCache.clear();\n }\n\n /**\n * @override\n */\n afterHelperCreated() {\n super.afterHelperCreated();\n\n this.tileRepresentationCache.forEach((tileRepresentation) =>\n tileRepresentation.setHelper(this.helper),\n );\n }\n\n /**\n * Clean up.\n * @override\n */\n disposeInternal() {\n super.disposeInternal();\n delete this.frameState;\n }\n}\n\nexport default WebGLBaseTileLayerRenderer;\n", "/**\n * @module ol/renderer/webgl/TileLayer\n */\nimport TileState from '../../TileState.js';\nimport {\n boundingExtent,\n containsCoordinate,\n getIntersection,\n} from '../../extent.js';\nimport {fromUserExtent} from '../../proj.js';\nimport {toSize} from '../../size.js';\nimport {apply as applyTransform} from '../../transform.js';\nimport {fromTransform as mat4FromTransform} from '../../vec/mat4.js';\nimport WebGLArrayBuffer from '../../webgl/Buffer.js';\nimport {AttributeType} from '../../webgl/Helper.js';\nimport TileTexture from '../../webgl/TileTexture.js';\nimport {ELEMENT_ARRAY_BUFFER, STATIC_DRAW} from '../../webgl.js';\nimport WebGLBaseTileLayerRenderer, {\n Uniforms as BaseUniforms,\n getCacheKey,\n} from './TileLayerBase.js';\n\nexport const Uniforms = {\n ...BaseUniforms,\n TILE_TEXTURE_ARRAY: 'u_tileTextures',\n TEXTURE_PIXEL_WIDTH: 'u_texturePixelWidth',\n TEXTURE_PIXEL_HEIGHT: 'u_texturePixelHeight',\n TEXTURE_RESOLUTION: 'u_textureResolution', // map units per texture pixel\n TEXTURE_ORIGIN_X: 'u_textureOriginX', // map x coordinate of left edge of texture\n TEXTURE_ORIGIN_Y: 'u_textureOriginY', // map y coordinate of top edge of texture\n};\n\nexport const Attributes = {\n TEXTURE_COORD: 'a_textureCoord',\n};\n\n/**\n * @type {Array<import('../../webgl/Helper.js').AttributeDescription>}\n */\nconst attributeDescriptions = [\n {\n name: Attributes.TEXTURE_COORD,\n size: 2,\n type: AttributeType.FLOAT,\n },\n];\n\n/**\n * @typedef {Object} Options\n * @property {string} vertexShader Vertex shader source.\n * @property {string} fragmentShader Fragment shader source.\n * @property {Object<string, import(\"../../webgl/Helper\").UniformValue>} [uniforms] Additional uniforms\n * made available to shaders.\n * @property {Array<import(\"../../webgl/PaletteTexture.js\").default>} [paletteTextures] Palette textures.\n * @property {number} [cacheSize=512] The texture cache size.\n * @property {Array<import('./Layer.js').PostProcessesOptions>} [postProcesses] Post-processes definitions.\n */\n\n/**\n * @typedef {import(\"../../webgl/TileTexture.js\").TileType} TileTextureType\n */\n\n/**\n * @typedef {import(\"../../webgl/TileTexture.js\").default} TileTextureRepresentation\n */\n\n/**\n * @classdesc\n * WebGL renderer for tile layers.\n * @template {import(\"../../layer/WebGLTile.js\").default|import(\"../../layer/Flow.js\").default} LayerType\n * @extends {WebGLBaseTileLayerRenderer<LayerType, TileTextureType, TileTextureRepresentation>}\n * @api\n */\nclass WebGLTileLayerRenderer extends WebGLBaseTileLayerRenderer {\n /**\n * @param {LayerType} tileLayer Tile layer.\n * @param {Options} options Options.\n */\n constructor(tileLayer, options) {\n super(tileLayer, options);\n\n /**\n * @type {WebGLProgram}\n * @private\n */\n this.program_;\n\n /**\n * @private\n */\n this.vertexShader_ = options.vertexShader;\n\n /**\n * @private\n */\n this.fragmentShader_ = options.fragmentShader;\n\n /**\n * Tiles are rendered as a quad with the following structure:\n *\n * [P3]---------[P2]\n * |` |\n * | ` B |\n * | ` |\n * | ` |\n * | A ` |\n * | ` |\n * [P0]---------[P1]\n *\n * Triangle A: P0, P1, P3\n * Triangle B: P1, P2, P3\n *\n * @private\n */\n this.indices_ = new WebGLArrayBuffer(ELEMENT_ARRAY_BUFFER, STATIC_DRAW);\n this.indices_.fromArray([0, 1, 3, 1, 2, 3]);\n\n /**\n * @type {Array<import(\"../../webgl/PaletteTexture.js\").default>}\n * @private\n */\n this.paletteTextures_ = options.paletteTextures || [];\n }\n\n /**\n * @param {Options} options Options.\n * @override\n */\n reset(options) {\n super.reset(options);\n if (this.helper) {\n const gl = this.helper.getGL();\n for (const paletteTexture of this.paletteTextures_) {\n paletteTexture.delete(gl);\n }\n }\n\n this.vertexShader_ = options.vertexShader;\n this.fragmentShader_ = options.fragmentShader;\n this.paletteTextures_ = options.paletteTextures || [];\n\n if (this.helper) {\n this.program_ = this.helper.getProgram(\n this.fragmentShader_,\n this.vertexShader_,\n );\n const gl = this.helper.getGL();\n for (const paletteTexture of this.paletteTextures_) {\n // upload the texture data\n paletteTexture.getTexture(gl);\n }\n }\n }\n\n /**\n * @override\n */\n afterHelperCreated() {\n super.afterHelperCreated();\n\n const gl = this.helper.getGL();\n for (const paletteTexture of this.paletteTextures_) {\n // upload the texture data\n paletteTexture.getTexture(gl);\n }\n\n this.program_ = this.helper.getProgram(\n this.fragmentShader_,\n this.vertexShader_,\n );\n this.helper.flushBufferData(this.indices_);\n }\n\n /**\n * @override\n */\n removeHelper() {\n if (this.helper) {\n const gl = this.helper.getGL();\n for (const paletteTexture of this.paletteTextures_) {\n paletteTexture.delete(gl);\n }\n }\n\n super.removeHelper();\n }\n\n /**\n * @override\n */\n createTileRepresentation(options) {\n return new TileTexture(options);\n }\n\n /**\n * @override\n */\n beforeTilesRender(frameState, tilesWithAlpha) {\n super.beforeTilesRender(frameState, tilesWithAlpha);\n this.helper.useProgram(this.program_, frameState);\n }\n\n /**\n * @override\n */\n renderTile(\n tileTexture,\n tileTransform,\n frameState,\n renderExtent,\n tileResolution,\n tileSize,\n tileOrigin,\n tileExtent,\n depth,\n gutter,\n alpha,\n ) {\n const gl = this.helper.getGL();\n this.helper.bindBuffer(tileTexture.coords);\n this.helper.bindBuffer(this.indices_);\n this.helper.enableAttributes(attributeDescriptions);\n\n let textureSlot = 0;\n while (textureSlot < tileTexture.textures.length) {\n const uniformName = `${Uniforms.TILE_TEXTURE_ARRAY}[${textureSlot}]`;\n this.helper.bindTexture(\n tileTexture.textures[textureSlot],\n textureSlot,\n uniformName,\n );\n ++textureSlot;\n }\n\n for (\n let paletteIndex = 0;\n paletteIndex < this.paletteTextures_.length;\n ++paletteIndex\n ) {\n const paletteTexture = this.paletteTextures_[paletteIndex];\n const texture = paletteTexture.getTexture(gl);\n this.helper.bindTexture(texture, textureSlot, paletteTexture.name);\n ++textureSlot;\n }\n\n const viewState = frameState.viewState;\n\n const tileWidthWithGutter = tileSize[0] + 2 * gutter;\n const tileHeightWithGutter = tileSize[1] + 2 * gutter;\n\n const tile = tileTexture.tile;\n const tileCoord = tile.tileCoord;\n\n const tileCenterI = tileCoord[1];\n const tileCenterJ = tileCoord[2];\n\n this.helper.setUniformMatrixValue(\n Uniforms.TILE_TRANSFORM,\n mat4FromTransform(this.tempMat4, tileTransform),\n );\n\n this.helper.setUniformFloatValue(Uniforms.TRANSITION_ALPHA, alpha);\n this.helper.setUniformFloatValue(Uniforms.DEPTH, depth);\n\n let gutterExtent = renderExtent;\n if (gutter > 0) {\n gutterExtent = tileExtent;\n getIntersection(gutterExtent, renderExtent, gutterExtent);\n }\n this.helper.setUniformFloatVec4(Uniforms.RENDER_EXTENT, gutterExtent);\n\n this.helper.setUniformFloatValue(Uniforms.RESOLUTION, viewState.resolution);\n this.helper.setUniformFloatValue(Uniforms.ZOOM, viewState.zoom);\n\n this.helper.setUniformFloatValue(\n Uniforms.TEXTURE_PIXEL_WIDTH,\n tileWidthWithGutter,\n );\n this.helper.setUniformFloatValue(\n Uniforms.TEXTURE_PIXEL_HEIGHT,\n tileHeightWithGutter,\n );\n this.helper.setUniformFloatValue(\n Uniforms.TEXTURE_RESOLUTION,\n tileResolution,\n );\n this.helper.setUniformFloatValue(\n Uniforms.TEXTURE_ORIGIN_X,\n tileOrigin[0] +\n tileCenterI * tileSize[0] * tileResolution -\n gutter * tileResolution,\n );\n this.helper.setUniformFloatValue(\n Uniforms.TEXTURE_ORIGIN_Y,\n tileOrigin[1] -\n tileCenterJ * tileSize[1] * tileResolution +\n gutter * tileResolution,\n );\n\n this.helper.drawElements(0, this.indices_.getSize());\n }\n\n /**\n * @param {import(\"../../pixel.js\").Pixel} pixel Pixel.\n * @return {Uint8ClampedArray|Uint8Array|Float32Array|DataView} Data at the pixel location.\n * @override\n */\n getData(pixel) {\n const gl = this.helper.getGL();\n if (!gl) {\n return null;\n }\n\n const frameState = this.frameState;\n if (!frameState) {\n return null;\n }\n\n const layer = this.getLayer();\n const coordinate = applyTransform(\n frameState.pixelToCoordinateTransform,\n pixel.slice(),\n );\n\n const viewState = frameState.viewState;\n const layerExtent = layer.getExtent();\n if (layerExtent) {\n if (\n !containsCoordinate(\n fromUserExtent(layerExtent, viewState.projection),\n coordinate,\n )\n ) {\n return null;\n }\n }\n\n // determine last source suitable for rendering at coordinate\n const sources = layer.getSources(\n boundingExtent([coordinate]),\n viewState.resolution,\n );\n let i, source, tileGrid;\n for (i = sources.length - 1; i >= 0; --i) {\n source = sources[i];\n if (source.getState() === 'ready') {\n tileGrid = source.getTileGridForProjection(viewState.projection);\n if (source.getWrapX()) {\n break;\n }\n const gridExtent = tileGrid.getExtent();\n if (!gridExtent || containsCoordinate(gridExtent, coordinate)) {\n break;\n }\n }\n }\n if (i < 0) {\n return null;\n }\n\n const tileTextureCache = this.tileRepresentationCache;\n for (\n let z = tileGrid.getZForResolution(viewState.resolution);\n z >= tileGrid.getMinZoom();\n --z\n ) {\n const tileCoord = tileGrid.getTileCoordForCoordAndZ(coordinate, z);\n const cacheKey = getCacheKey(source, tileCoord);\n if (!tileTextureCache.containsKey(cacheKey)) {\n continue;\n }\n const tileTexture = tileTextureCache.get(cacheKey);\n const tile = tileTexture.tile;\n if (tile.getState() === TileState.EMPTY) {\n return null;\n }\n if (!tileTexture.loaded) {\n continue;\n }\n const tileOrigin = tileGrid.getOrigin(z);\n const tileSize = toSize(tileGrid.getTileSize(z));\n const tileResolution = tileGrid.getResolution(z);\n\n const col =\n (coordinate[0] - tileOrigin[0]) / tileResolution -\n tileCoord[1] * tileSize[0];\n\n const row =\n (tileOrigin[1] - coordinate[1]) / tileResolution -\n tileCoord[2] * tileSize[1];\n\n return tileTexture.getPixelData(col, row);\n }\n return null;\n }\n\n /**\n * Clean up.\n * @override\n */\n disposeInternal() {\n const helper = this.helper;\n if (helper) {\n const gl = helper.getGL();\n for (const paletteTexture of this.paletteTextures_) {\n paletteTexture.delete(gl);\n }\n this.paletteTextures_.length = 0;\n\n gl.deleteProgram(this.program_);\n delete this.program_;\n helper.deleteBuffer(this.indices_);\n }\n super.disposeInternal();\n delete this.indices_;\n }\n}\n\nexport default WebGLTileLayerRenderer;\n", "/**\n * @module ol/webgl/PaletteTexture\n */\n\nclass PaletteTexture {\n /**\n * @param {string} name The name of the texture.\n * @param {Uint8Array} data The texture data.\n */\n constructor(name, data) {\n this.name = name;\n this.data = data;\n\n /**\n * @type {WebGLTexture|null}\n * @private\n */\n this.texture_ = null;\n }\n\n /**\n * @param {WebGLRenderingContext} gl Rendering context.\n * @return {WebGLTexture} The texture.\n */\n getTexture(gl) {\n if (!this.texture_) {\n const texture = gl.createTexture();\n gl.bindTexture(gl.TEXTURE_2D, texture);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.NEAREST);\n gl.texImage2D(\n gl.TEXTURE_2D,\n 0,\n gl.RGBA,\n this.data.length / 4,\n 1,\n 0,\n gl.RGBA,\n gl.UNSIGNED_BYTE,\n this.data,\n );\n this.texture_ = texture;\n }\n return this.texture_;\n }\n\n /**\n * @param {WebGLRenderingContext} gl Rendering context.\n */\n delete(gl) {\n if (this.texture_) {\n gl.deleteTexture(this.texture_);\n }\n this.texture_ = null;\n }\n}\n\nexport default PaletteTexture;\n", "/**\n * @module ol/expr/gpu\n */\nimport {asArray} from '../color.js';\nimport {Uniforms} from '../renderer/webgl/TileLayer.js';\nimport {toSize} from '../size.js';\nimport PaletteTexture from '../webgl/PaletteTexture.js';\nimport {\n BooleanType,\n CallExpression,\n ColorType,\n NumberArrayType,\n NumberType,\n Ops,\n SizeType,\n StringType,\n isType,\n parse,\n typeName,\n} from './expression.js';\n\n/**\n * @param {string} operator Operator\n * @param {CompilationContext} context Compilation context\n * @return {string} A function name based on the operator, unique in the given context\n */\nfunction computeOperatorFunctionName(operator, context) {\n return `operator_${operator}_${Object.keys(context.functions).length}`;\n}\n\n/**\n * Will return the number as a float with a dot separator, which is required by GLSL.\n * @param {number} v Numerical value.\n * @return {string} The value as string.\n */\nexport function numberToGlsl(v) {\n const s = v.toString();\n return s.includes('.') ? s : s + '.0';\n}\n\n/**\n * Will return the number array as a float with a dot separator, concatenated with ', '.\n * @param {Array<number>} array Numerical values array.\n * @return {string} The array as a vector, e. g.: `vec3(1.0, 2.0, 3.0)`.\n */\nexport function arrayToGlsl(array) {\n if (array.length < 2 || array.length > 4) {\n throw new Error(\n '`formatArray` can only output `vec2`, `vec3` or `vec4` arrays.',\n );\n }\n return `vec${array.length}(${array.map(numberToGlsl).join(', ')})`;\n}\n\n/**\n * Will normalize and converts to string a `vec4` color array compatible with GLSL.\n * @param {string|import(\"../color.js\").Color} color Color either in string format or [r, g, b, a] array format,\n * with RGB components in the 0..255 range and the alpha component in the 0..1 range.\n * Note that the final array will always have 4 components.\n * @return {string} The color expressed in the `vec4(1.0, 1.0, 1.0, 1.0)` form.\n */\nexport function colorToGlsl(color) {\n const array = asArray(color);\n const alpha = array.length > 3 ? array[3] : 1;\n return arrayToGlsl([array[0] / 255, array[1] / 255, array[2] / 255, alpha]);\n}\n\n/**\n * Normalizes and converts a number or array toa `vec2` array compatible with GLSL.\n * @param {number|import('../size.js').Size} size Size.\n * @return {string} The color expressed in the `vec4(1.0, 1.0, 1.0, 1.0)` form.\n */\nexport function sizeToGlsl(size) {\n const array = toSize(size);\n return arrayToGlsl(array);\n}\n\n/** @type {Object<string, number>} */\nconst stringToFloatMap = {};\nlet stringToFloatCounter = 0;\n\n/**\n * Returns a stable equivalent number for the string literal.\n * @param {string} string String literal value\n * @return {number} Number equivalent\n */\nexport function getStringNumberEquivalent(string) {\n if (!(string in stringToFloatMap)) {\n stringToFloatMap[string] = stringToFloatCounter++;\n }\n return stringToFloatMap[string];\n}\n\n/**\n * Returns a stable equivalent number for the string literal, for use in shaders. This number is then\n * converted to be a GLSL-compatible string.\n * Note: with a float precision of `mediump`, the amount of unique strings supported is 16,777,216\n * @param {string} string String literal value\n * @return {string} GLSL-compatible string containing a number\n */\nexport function stringToGlsl(string) {\n return numberToGlsl(getStringNumberEquivalent(string));\n}\n\n/**\n * Get the uniform name given a variable name.\n * @param {string} variableName The variable name.\n * @return {string} The uniform name.\n */\nexport function uniformNameForVariable(variableName) {\n return 'u_var_' + variableName;\n}\n\n/**\n * @typedef {import('./expression.js').ParsingContext} ParsingContext\n */\n/**\n *\n * @typedef {import(\"./expression.js\").Expression} Expression\n */\n/**\n *\n * @typedef {import(\"./expression.js\").LiteralExpression} LiteralExpression\n */\n\n/**\n * @typedef {Object} CompilationContextProperty\n * @property {string} name Name\n * @property {number} type Resolved property type\n */\n\n/**\n * @typedef {Object} CompilationContextVariable\n * @property {string} name Name\n * @property {number} type Resolved variable type\n */\n\n/**\n * @typedef {Object} CompilationContext\n * @property {Object<string, CompilationContextProperty>} properties The values for properties used in 'get' expressions.\n * @property {Object<string, CompilationContextVariable>} variables The values for variables used in 'var' expressions.\n * @property {Object<string, string>} functions Lookup of functions used by the style.\n * @property {number} [bandCount] Number of bands per pixel.\n * @property {Array<PaletteTexture>} [paletteTextures] List of palettes used by the style.\n * @property {boolean} featureId Whether the feature ID is used in the expression\n * @property {boolean} geometryType Whether the geometry type is used in the expression\n */\n\n/**\n * @return {CompilationContext} A new compilation context.\n */\nexport function newCompilationContext() {\n return {\n variables: {},\n properties: {},\n functions: {},\n bandCount: 0,\n featureId: false,\n geometryType: false,\n };\n}\n\nconst GET_BAND_VALUE_FUNC = 'getBandValue';\n\nexport const PALETTE_TEXTURE_ARRAY = 'u_paletteTextures';\n\nexport const FEATURE_ID_PROPERTY_NAME = 'featureId';\nexport const GEOMETRY_TYPE_PROPERTY_NAME = 'geometryType';\n\n/**\n * The value `-9999999` will be used to indicate that a property on a feature is not defined, similar to a \"no data\" value.\n */\nexport const UNDEFINED_PROP_VALUE = -9999999;\n\n/**\n * @typedef {string} CompiledExpression\n */\n\n/**\n * @typedef {function(CompilationContext, CallExpression, number): string} Compiler\n * Third argument is the expected value types\n */\n\n/**\n * @param {import('./expression.js').EncodedExpression} encoded The encoded expression.\n * @param {number} type The expected type.\n * @param {import('./expression.js').ParsingContext} parsingContext The parsing context.\n * @param {CompilationContext} compilationContext An existing compilation context\n * @return {CompiledExpression} The compiled expression.\n */\nexport function buildExpression(\n encoded,\n type,\n parsingContext,\n compilationContext,\n) {\n const expression = parse(encoded, type, parsingContext);\n return compile(expression, type, compilationContext);\n}\n\n/**\n * @param {function(Array<CompiledExpression>, CompilationContext): string} output Function that takes in parsed arguments and returns a string\n * @return {function(CompilationContext, import(\"./expression.js\").CallExpression, number): string} Compiler for the call expression\n */\nfunction createCompiler(output) {\n return (context, expression, type) => {\n const length = expression.args.length;\n const args = new Array(length);\n for (let i = 0; i < length; ++i) {\n args[i] = compile(expression.args[i], type, context);\n }\n return output(args, context);\n };\n}\n\n/**\n * @type {Object<string, Compiler>}\n */\nconst compilers = {\n [Ops.Get]: (context, expression) => {\n const firstArg = /** @type {LiteralExpression} */ (expression.args[0]);\n const propName = /** @type {string} */ (firstArg.value);\n const isExisting = propName in context.properties;\n if (!isExisting) {\n context.properties[propName] = {\n name: propName,\n type: expression.type,\n };\n }\n let result = 'a_prop_' + propName;\n if (isType(expression.type, BooleanType)) {\n result = `(${result} > 0.0)`;\n }\n return result;\n },\n [Ops.Id]: (context) => {\n context.featureId = true;\n return 'a_' + FEATURE_ID_PROPERTY_NAME;\n },\n [Ops.GeometryType]: (context) => {\n context.geometryType = true;\n return 'a_' + GEOMETRY_TYPE_PROPERTY_NAME;\n },\n [Ops.LineMetric]: () => 'currentLineMetric', // this variable is assumed to always be present in shaders, default is 0.\n [Ops.Var]: (context, expression) => {\n const firstArg = /** @type {LiteralExpression} */ (expression.args[0]);\n const varName = /** @type {string} */ (firstArg.value);\n const isExisting = varName in context.variables;\n if (!isExisting) {\n context.variables[varName] = {\n name: varName,\n type: expression.type,\n };\n }\n let result = uniformNameForVariable(varName);\n if (isType(expression.type, BooleanType)) {\n result = `(${result} > 0.0)`;\n }\n return result;\n },\n [Ops.Has]: (context, expression) => {\n const firstArg = /** @type {LiteralExpression} */ (expression.args[0]);\n const propName = /** @type {string} */ (firstArg.value);\n const isExisting = propName in context.properties;\n if (!isExisting) {\n context.properties[propName] = {\n name: propName,\n type: expression.type,\n };\n }\n return `(a_prop_${propName} != ${numberToGlsl(UNDEFINED_PROP_VALUE)})`;\n },\n [Ops.Resolution]: () => 'u_resolution',\n [Ops.Zoom]: () => 'u_zoom',\n [Ops.Time]: () => 'u_time',\n [Ops.Any]: createCompiler((compiledArgs) => `(${compiledArgs.join(` || `)})`),\n [Ops.All]: createCompiler((compiledArgs) => `(${compiledArgs.join(` && `)})`),\n [Ops.Not]: createCompiler(([value]) => `(!${value})`),\n [Ops.Equal]: createCompiler(\n ([firstValue, secondValue]) => `(${firstValue} == ${secondValue})`,\n ),\n [Ops.NotEqual]: createCompiler(\n ([firstValue, secondValue]) => `(${firstValue} != ${secondValue})`,\n ),\n [Ops.GreaterThan]: createCompiler(\n ([firstValue, secondValue]) => `(${firstValue} > ${secondValue})`,\n ),\n [Ops.GreaterThanOrEqualTo]: createCompiler(\n ([firstValue, secondValue]) => `(${firstValue} >= ${secondValue})`,\n ),\n [Ops.LessThan]: createCompiler(\n ([firstValue, secondValue]) => `(${firstValue} < ${secondValue})`,\n ),\n [Ops.LessThanOrEqualTo]: createCompiler(\n ([firstValue, secondValue]) => `(${firstValue} <= ${secondValue})`,\n ),\n [Ops.Multiply]: createCompiler(\n (compiledArgs) => `(${compiledArgs.join(' * ')})`,\n ),\n [Ops.Divide]: createCompiler(\n ([firstValue, secondValue]) => `(${firstValue} / ${secondValue})`,\n ),\n [Ops.Add]: createCompiler((compiledArgs) => `(${compiledArgs.join(' + ')})`),\n [Ops.Subtract]: createCompiler(\n ([firstValue, secondValue]) => `(${firstValue} - ${secondValue})`,\n ),\n [Ops.Clamp]: createCompiler(\n ([value, min, max]) => `clamp(${value}, ${min}, ${max})`,\n ),\n [Ops.Mod]: createCompiler(([value, modulo]) => `mod(${value}, ${modulo})`),\n [Ops.Pow]: createCompiler(([value, power]) => `pow(${value}, ${power})`),\n [Ops.Abs]: createCompiler(([value]) => `abs(${value})`),\n [Ops.Floor]: createCompiler(([value]) => `floor(${value})`),\n [Ops.Ceil]: createCompiler(([value]) => `ceil(${value})`),\n [Ops.Round]: createCompiler(([value]) => `floor(${value} + 0.5)`),\n [Ops.Sin]: createCompiler(([value]) => `sin(${value})`),\n [Ops.Cos]: createCompiler(([value]) => `cos(${value})`),\n [Ops.Atan]: createCompiler(([firstValue, secondValue]) => {\n return secondValue !== undefined\n ? `atan(${firstValue}, ${secondValue})`\n : `atan(${firstValue})`;\n }),\n [Ops.Sqrt]: createCompiler(([value]) => `sqrt(${value})`),\n [Ops.Match]: createCompiler((compiledArgs) => {\n const input = compiledArgs[0];\n const fallback = compiledArgs[compiledArgs.length - 1];\n let result = null;\n for (let i = compiledArgs.length - 3; i >= 1; i -= 2) {\n const match = compiledArgs[i];\n const output = compiledArgs[i + 1];\n result = `(${input} == ${match} ? ${output} : ${result || fallback})`;\n }\n return result;\n }),\n [Ops.Between]: createCompiler(\n ([value, min, max]) => `(${value} >= ${min} && ${value} <= ${max})`,\n ),\n [Ops.Interpolate]: createCompiler(([exponent, input, ...compiledArgs]) => {\n let result = '';\n for (let i = 0; i < compiledArgs.length - 2; i += 2) {\n const stop1 = compiledArgs[i];\n const output1 = result || compiledArgs[i + 1];\n const stop2 = compiledArgs[i + 2];\n const output2 = compiledArgs[i + 3];\n let ratio;\n if (exponent === numberToGlsl(1)) {\n ratio = `(${input} - ${stop1}) / (${stop2} - ${stop1})`;\n } else {\n ratio = `(pow(${exponent}, (${input} - ${stop1})) - 1.0) / (pow(${exponent}, (${stop2} - ${stop1})) - 1.0)`;\n }\n result = `mix(${output1}, ${output2}, clamp(${ratio}, 0.0, 1.0))`;\n }\n return result;\n }),\n [Ops.Case]: createCompiler((compiledArgs) => {\n const fallback = compiledArgs[compiledArgs.length - 1];\n let result = null;\n for (let i = compiledArgs.length - 3; i >= 0; i -= 2) {\n const condition = compiledArgs[i];\n const output = compiledArgs[i + 1];\n result = `(${condition} ? ${output} : ${result || fallback})`;\n }\n return result;\n }),\n [Ops.In]: createCompiler(([needle, ...haystack], context) => {\n const funcName = computeOperatorFunctionName('in', context);\n const tests = [];\n for (let i = 0; i < haystack.length; i += 1) {\n tests.push(` if (inputValue == ${haystack[i]}) { return true; }`);\n }\n context.functions[funcName] = `bool ${funcName}(float inputValue) {\n${tests.join('\\n')}\n return false;\n}`;\n return `${funcName}(${needle})`;\n }),\n [Ops.Array]: createCompiler(\n (args) => `vec${args.length}(${args.join(', ')})`,\n ),\n [Ops.Color]: createCompiler((compiledArgs) => {\n if (compiledArgs.length === 1) {\n //grayscale\n return `vec4(vec3(${compiledArgs[0]} / 255.0), 1.0)`;\n }\n if (compiledArgs.length === 2) {\n //grayscale with alpha\n return `vec4(vec3(${compiledArgs[0]} / 255.0), ${compiledArgs[1]})`;\n }\n const rgb = compiledArgs.slice(0, 3).map((color) => `${color} / 255.0`);\n if (compiledArgs.length === 3) {\n return `vec4(${rgb.join(', ')}, 1.0)`;\n }\n const alpha = compiledArgs[3];\n return `vec4(${rgb.join(', ')}, ${alpha})`;\n }),\n [Ops.Band]: createCompiler(([band, xOffset, yOffset], context) => {\n if (!(GET_BAND_VALUE_FUNC in context.functions)) {\n let ifBlocks = '';\n const bandCount = context.bandCount || 1;\n for (let i = 0; i < bandCount; i++) {\n const colorIndex = Math.floor(i / 4);\n let bandIndex = i % 4;\n if (i === bandCount - 1 && bandIndex === 1) {\n // LUMINANCE_ALPHA - band 1 assigned to rgb and band 2 assigned to alpha\n bandIndex = 3;\n }\n const textureName = `${Uniforms.TILE_TEXTURE_ARRAY}[${colorIndex}]`;\n ifBlocks += ` if (band == ${i + 1}.0) {\n return texture2D(${textureName}, v_textureCoord + vec2(dx, dy))[${bandIndex}];\n }\n`;\n }\n\n context.functions[GET_BAND_VALUE_FUNC] =\n `float getBandValue(float band, float xOffset, float yOffset) {\n float dx = xOffset / ${Uniforms.TEXTURE_PIXEL_WIDTH};\n float dy = yOffset / ${Uniforms.TEXTURE_PIXEL_HEIGHT};\n${ifBlocks}\n}`;\n }\n\n return `${GET_BAND_VALUE_FUNC}(${band}, ${xOffset ?? '0.0'}, ${\n yOffset ?? '0.0'\n })`;\n }),\n [Ops.Palette]: (context, expression) => {\n const [index, ...colors] = expression.args;\n const numColors = colors.length;\n const palette = new Uint8Array(numColors * 4);\n for (let i = 0; i < colors.length; i++) {\n const parsedValue = /** @type {string | Array<number>} */ (\n /** @type {LiteralExpression} */ (colors[i]).value\n );\n const color = asArray(parsedValue);\n const offset = i * 4;\n palette[offset] = color[0];\n palette[offset + 1] = color[1];\n palette[offset + 2] = color[2];\n palette[offset + 3] = color[3] * 255;\n }\n if (!context.paletteTextures) {\n context.paletteTextures = [];\n }\n const paletteName = `${PALETTE_TEXTURE_ARRAY}[${context.paletteTextures.length}]`;\n const paletteTexture = new PaletteTexture(paletteName, palette);\n context.paletteTextures.push(paletteTexture);\n const compiledIndex = compile(index, NumberType, context);\n return `texture2D(${paletteName}, vec2((${compiledIndex} + 0.5) / ${numColors}.0, 0.5))`;\n },\n // TODO: unimplemented\n // Ops.Number\n // Ops.String\n // Ops.Coalesce\n // Ops.Concat\n // Ops.ToString\n};\n\n/**\n * @param {Expression} expression The expression.\n * @param {number} returnType The expected return type.\n * @param {CompilationContext} context The compilation context.\n * @return {CompiledExpression} The compiled expression\n */\nfunction compile(expression, returnType, context) {\n // operator\n if (expression instanceof CallExpression) {\n const compiler = compilers[expression.operator];\n if (compiler === undefined) {\n throw new Error(\n `No compiler defined for this operator: ${JSON.stringify(\n expression.operator,\n )}`,\n );\n }\n return compiler(context, expression, returnType);\n }\n\n if ((expression.type & NumberType) > 0) {\n return numberToGlsl(/** @type {number} */ (expression.value));\n }\n\n if ((expression.type & BooleanType) > 0) {\n return expression.value.toString();\n }\n\n if ((expression.type & StringType) > 0) {\n return stringToGlsl(expression.value.toString());\n }\n\n if ((expression.type & ColorType) > 0) {\n return colorToGlsl(\n /** @type {Array<number> | string} */ (expression.value),\n );\n }\n\n if ((expression.type & NumberArrayType) > 0) {\n return arrayToGlsl(/** @type {Array<number>} */ (expression.value));\n }\n\n if ((expression.type & SizeType) > 0) {\n return sizeToGlsl(\n /** @type {number|import('../size.js').Size} */ (expression.value),\n );\n }\n\n throw new Error(\n `Unexpected expression ${expression.value} (expected type ${typeName(\n returnType,\n )})`,\n );\n}\n", "/**\n * @module ol/style/flat\n */\n\n/**\n * @api\n * @fileoverview Vector layers can be styled with an object literal containing properties for\n * stroke, fill, image, and text styles. The types below can be composed into a single object.\n * For example, a style with both stroke and fill properties could look like this:\n *\n * const style = {\n * 'stroke-color': 'yellow',\n * 'stroke-width': 1.5,\n * 'fill-color': 'orange',\n * };\n *\n * See details about the available properties depending on what type of symbolizer should be applied:\n * {@link module:ol/style/flat~FlatStroke Stroke} - properties for applying a stroke to lines and polygons\n * {@link module:ol/style/flat~FlatFill Fill} - properties for filling polygons\n * {@link module:ol/style/flat~FlatText Text} - properties for labeling points, lines, and polygons\n * {@link module:ol/style/flat~FlatIcon Icon} - properties for rendering points with an icon\n * {@link module:ol/style/flat~FlatCircle Circle} - properties for rendering points with a circle\n * {@link module:ol/style/flat~FlatShape Shape} - properties for rendering points with a regular shape\n *\n * To conditionally apply styles based on a filter, a list of {@link module:ol/style/flat~Rule rules} can be used.\n * For example, to style points with a big orange circle if the population is greater than 1 million and\n * a smaller blue circle otherwise:\n *\n * const rules = [\n * {\n * filter: ['>', ['get', 'population'], 1_000_000],\n * style: {\n * 'circle-radius': 10,\n * 'circle-fill-color': 'red',\n * }\n * },\n * {\n * else: true,\n * style: {\n * 'circle-radius': 5,\n * 'circle-fill-color': 'blue',\n * },\n * },\n * ];\n */\n\n/**\n * A literal boolean (e.g. `true`) or an expression that evaluates to a boolean (e.g. `['>', ['get', 'population'], 1_000_000]`).\n *\n * @typedef {boolean|Array} BooleanExpression\n */\n\n/**\n * A literal string (e.g. `'hello'`) or an expression that evaluates to a string (e.g. `['get', 'greeting']`).\n *\n * @typedef {string|Array} StringExpression\n */\n\n/**\n * A literal number (e.g. `42`) or an expression that evaluates to a number (e.g. `['+', 40, 2]`).\n *\n * @typedef {number|Array} NumberExpression\n */\n\n/**\n * A CSS named color (e.g. `'blue'`), an array of 3 RGB values (e.g. `[0, 255, 0]`), an array of 4 RGBA values\n * (e.g. `[0, 255, 0, 0.5]`), or an expression that evaluates to one of these color types (e.g. `['get', 'color']`).\n *\n * @typedef {import(\"../color.js\").Color|string|Array} ColorExpression\n */\n\n/**\n * An array of numbers (e.g. `[1, 2, 3]`) or an expression that evaluates to the same (e.g. `['get', 'values']`).\n *\n * @typedef {Array<number>|Array} NumberArrayExpression\n */\n\n/**\n * An array of two numbers (e.g. `[10, 20]`) or an expression that evaluates to the same (e.g. `['get', 'size']`).\n *\n * @typedef {number|Array<number>|Array} SizeExpression\n */\n\n/**\n * For static styling, the [layer.setStyle()]{@link module:ol/layer/Vector~VectorLayer#setStyle} method\n * can be called with an object literal that has fill, stroke, text, icon, regular shape, and/or circle properties.\n * @api\n *\n * @typedef {FlatFill & FlatStroke & FlatText & FlatIcon & FlatShape & FlatCircle} FlatStyle\n */\n\n/**\n * A flat style literal or an array of the same.\n *\n * @typedef {FlatStyle|Array<FlatStyle>|Array<Rule>} FlatStyleLike\n */\n\n/**\n * Fill style properties applied to polygon features.\n *\n * @typedef {Object} FlatFill\n * @property {ColorExpression} [fill-color] The fill color. `'none'` means no fill and no hit detection (applies to Canvas only).\n * @property {StringExpression} [fill-pattern-src] Fill pattern image source URI. If `fill-color` is defined as well,\n * it will be used to tint this image. (Expressions only in Canvas)\n * @property {SizeExpression} [fill-pattern-size] Fill pattern image size in pixels.\n * Can be used together with `fill-pattern-offset` to define the sub-rectangle to use\n * from a fill pattern image sprite sheet.\n * @property {SizeExpression} [fill-pattern-offset=[0, 0]] Offset, which, together with the size and the offset origin, define the\n * sub-rectangle to use from the original fill pattern image.\n * @property {import(\"./Icon.js\").IconOrigin} [fill-pattern-offset-origin='top-left'] Origin of the offset: `bottom-left`, `bottom-right`,\n * `top-left` or `top-right`. (WebGL only)\n */\n\n/**\n * Stroke style properties applied to line strings and polygon boundaries. To apply a stroke, at least one of\n * `stroke-color` or `stroke-width` must be provided.\n *\n * @typedef {Object} FlatStroke\n * @property {ColorExpression} [stroke-color] The stroke color.\n * @property {NumberExpression} [stroke-width] Stroke pixel width.\n * @property {StringExpression} [stroke-line-cap='round'] Line cap style: `butt`, `round`, or `square`.\n * @property {StringExpression} [stroke-line-join='round'] Line join style: `bevel`, `round`, or `miter`.\n * @property {NumberArrayExpression} [stroke-line-dash] Line dash pattern.\n * @property {NumberExpression} [stroke-line-dash-offset=0] Line dash offset.\n * @property {NumberExpression} [stroke-miter-limit=10] Miter limit.\n * @property {NumberExpression} [stroke-offset] Stroke offset in pixel along the normal. A positive value offsets the line to the right,\n * relative to the direction of the line.\n * @property {string} [stroke-pattern-src] Stroke pattern image source URI. If `stroke-color` is defined as well,\n * it will be used to tint this image. (WebGL only)\n * @property {SizeExpression} [stroke-pattern-offset=[0, 0]] Offset, which, together with the size and the offset origin,\n * define the sub-rectangle to use from the original stroke pattern image. (WebGL only)\n * @property {import(\"./Icon.js\").IconOrigin} [stroke-pattern-offset-origin='top-left'] Origin of the offset: `bottom-left`, `bottom-right`,\n * `top-left` or `top-right`. (WebGL only)\n * @property {SizeExpression} [stroke-pattern-size] Stroke pattern image size in pixel. Can be used together with `stroke-pattern-offset` to define the\n * sub-rectangle to use from the origin (sprite) fill pattern image. (WebGL only)\n * @property {NumberExpression} [stroke-pattern-spacing] Spacing between each pattern occurrence in pixels; 0 if undefined. (WebGL only)\n * @property {NumberExpression} [stroke-pattern-start-offset] Stroke pattern offset in pixels at the start of the line. (WebGL only)\n * @property {NumberExpression} [z-index] The zIndex of the style.\n */\n\n/**\n * Label style properties applied to all features. At a minimum, a `text-value` must be provided.\n * Note: text style is currently not supported in WebGL layers\n *\n * @typedef {Object} FlatText\n * @property {StringExpression} [text-value] Text content (with `\\n` for line breaks).\n * @property {StringExpression} [text-font='10px sans-serif'] Font style as [CSS `font`](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/font) value.\n * @property {NumberExpression} [text-max-angle=Math.PI/4] When `text-placement` is set to `'line'`, allow a maximum angle between adjacent characters.\n * The expected value is in radians, and the default is 45\u00B0 (`Math.PI / 4`).\n * @property {NumberExpression} [text-offset-x=0] Horizontal text offset in pixels. A positive will shift the text right.\n * @property {NumberExpression} [text-offset-y=0] Vertical text offset in pixels. A positive will shift the text down.\n * @property {BooleanExpression} [text-overflow=false] For polygon labels or when `placement` is set to `'line'`, allow text to exceed\n * the width of the polygon at the label position or the length of the path that it follows.\n * @property {StringExpression} [text-placement='point'] Text placement.\n * @property {NumberExpression} [text-repeat] Repeat interval in pixels. When set, the text will be repeated at this interval. Only available when\n * `text-placement` is set to `'line'`. Overrides `text-align`.\n * @property {SizeExpression} [text-scale] Scale.\n * @property {BooleanExpression} [text-rotate-with-view=false] Whether to rotate the text with the view.\n * @property {NumberExpression} [text-rotation=0] Rotation in radians (positive rotation clockwise).\n * @property {StringExpression} [text-align] Text alignment. Possible values: `'left'`, `'right'`, `'center'`, `'end'` or `'start'`.\n * Default is `'center'` for `'text-placement': 'point'`. For `'text-placement': 'line'`, the default is to let the renderer choose a\n * placement where `text-max-angle` is not exceeded.\n * @property {StringExpression} [text-justify] Text justification within the text box.\n * If not set, text is justified towards the `textAlign` anchor.\n * Otherwise, use options `'left'`, `'center'`, or `'right'` to justify the text within the text box.\n * **Note:** `text-justify` is ignored for immediate rendering and also for `'text-placement': 'line'`.\n * @property {StringExpression} [text-baseline='middle'] Text base line. Possible values: `'bottom'`, `'top'`, `'middle'`, `'alphabetic'`,\n * `'hanging'`, `'ideographic'`.\n * @property {NumberArrayExpression} [text-padding=[0, 0, 0, 0]] Padding in pixels around the text for decluttering and background. The order of\n * values in the array is `[top, right, bottom, left]`.\n * @property {ColorExpression} [text-fill-color] The fill color. `'none'` means no fill and no hit detection.\n * @property {ColorExpression} [text-background-fill-color] The fill color. `'none'` means no fill and no hit detection.\n * @property {ColorExpression} [text-stroke-color] The stroke color.\n * @property {StringExpression} [text-stroke-line-cap='round'] Line cap style: `butt`, `round`, or `square`.\n * @property {StringExpression} [text-stroke-line-join='round'] Line join style: `bevel`, `round`, or `miter`.\n * @property {NumberArrayExpression} [text-stroke-line-dash] Line dash pattern.\n * @property {NumberExpression} [text-stroke-line-dash-offset=0] Line dash offset.\n * @property {NumberExpression} [text-stroke-miter-limit=10] Miter limit.\n * @property {NumberExpression} [text-stroke-width] Stroke pixel width.\n * @property {ColorExpression} [text-background-stroke-color] The stroke color.\n * @property {StringExpression} [text-background-stroke-line-cap='round'] Line cap style: `butt`, `round`, or `square`.\n * @property {StringExpression} [text-background-stroke-line-join='round'] Line join style: `bevel`, `round`, or `miter`.\n * @property {NumberArrayExpression} [text-background-stroke-line-dash] Line dash pattern.\n * @property {NumberExpression} [text-background-stroke-line-dash-offset=0] Line dash offset.\n * @property {NumberExpression} [text-background-stroke-miter-limit=10] Miter limit.\n * @property {NumberExpression} [text-background-stroke-width] Stroke pixel width.\n * @property {import(\"./Style.js\").DeclutterMode} [text-declutter-mode] Declutter mode\n * @property {NumberExpression} [z-index] The zIndex of the style.\n */\n\n/**\n * Icon style properties applied to point features. `icon-src` must be provided to render\n * points with an icon.\n *\n * @typedef {Object} FlatIcon\n * @property {string} [icon-src] Image source URI.\n * @property {NumberArrayExpression} [icon-anchor=[0.5, 0.5]] Anchor. Default value is the icon center.\n * @property {import(\"./Icon.js\").IconOrigin} [icon-anchor-origin='top-left'] Origin of the anchor: `bottom-left`, `bottom-right`,\n * `top-left` or `top-right`.\n * @property {import(\"./Icon.js\").IconAnchorUnits} [icon-anchor-x-units='fraction'] Units in which the anchor x value is\n * specified. A value of `'fraction'` indicates the x value is a fraction of the icon. A value of `'pixels'` indicates\n * the x value in pixels.\n * @property {import(\"./Icon.js\").IconAnchorUnits} [icon-anchor-y-units='fraction'] Units in which the anchor y value is\n * specified. A value of `'fraction'` indicates the y value is a fraction of the icon. A value of `'pixels'` indicates\n * the y value in pixels.\n * @property {ColorExpression} [icon-color] Color to tint the icon. If not specified,\n * the icon will be left as is.\n * @property {null|string} [icon-cross-origin] The `crossOrigin` attribute for loaded images. Note that you must provide a\n * `icon-cross-origin` value if you want to access pixel data with the Canvas renderer.\n * See https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image for more detail.\n * @property {SizeExpression} [icon-offset=[0, 0]] Offset, which, together with the size and the offset origin, define the\n * sub-rectangle to use from the original icon image.\n * @property {NumberArrayExpression} [icon-displacement=[0,0]] Displacement of the icon.\n * @property {import(\"./Icon.js\").IconOrigin} [icon-offset-origin='top-left'] Origin of the offset: `bottom-left`, `bottom-right`,\n * `top-left` or `top-right`.\n * @property {NumberExpression} [icon-opacity=1] Opacity of the icon.\n * @property {SizeExpression} [icon-scale=1] Scale.\n * @property {NumberExpression} [icon-width] Width of the icon. If not specified, the actual image width will be used. Cannot be combined\n * with `scale`. (Expressions only in WebGL)\n * @property {NumberExpression} [icon-height] Height of the icon. If not specified, the actual image height will be used. Cannot be combined\n * with `scale`. (Expressions only in WebGL)\n * @property {NumberExpression} [icon-rotation=0] Rotation in radians (positive rotation clockwise).\n * @property {BooleanExpression} [icon-rotate-with-view=false] Whether to rotate the icon with the view. (Expressions only supported in Canvas)\n * @property {SizeExpression} [icon-size] Icon size in pixel. Can be used together with `icon-offset` to define the\n * sub-rectangle to use from the origin (sprite) icon image. (Expressions only in WebGL)\n * @property {import(\"./Style.js\").DeclutterMode} [icon-declutter-mode] Declutter mode (Canvas only)\n * @property {NumberExpression} [z-index] The zIndex of the style. (Canvas only)\n */\n\n/**\n * Regular shape style properties for rendering point features. At least `shape-points` must be provided.\n *\n * @typedef {Object} FlatShape\n * @property {NumberExpression} [shape-points] Number of points for stars and regular polygons. In case of a polygon, the number of points\n * is the number of sides. (Expressions only in WebGL)\n * @property {ColorExpression} [shape-fill-color] The fill color. `'none'` means no fill and no hit detection.\n * @property {ColorExpression} [shape-stroke-color] The stroke color.\n * @property {NumberExpression} [shape-stroke-width] Stroke pixel width.\n * @property {StringExpression} [shape-stroke-line-cap='round'] Line cap style: `butt`, `round`, or `square`. (Canvas only)\n * @property {StringExpression} [shape-stroke-line-join='round'] Line join style: `bevel`, `round`, or `miter`. (Canvas only)\n * @property {NumberArrayExpression} [shape-stroke-line-dash] Line dash pattern. (Canvas only)\n * @property {NumberExpression} [shape-stroke-line-dash-offset=0] Line dash offset. (Canvas only)\n * @property {NumberExpression} [shape-stroke-miter-limit=10] Miter limit. (Canvas only)\n * @property {NumberExpression} [shape-radius] Radius of a regular polygon. (Expressions only in WebGL)\n * @property {NumberExpression} [shape-radius2] Second radius to make a star instead of a regular polygon. (Expressions only in WebGL)\n * @property {NumberExpression} [shape-angle=0] Shape's angle in radians. A value of 0 will have one of the shape's point facing up. (Expressions only in WebGL)\n * @property {NumberArrayExpression} [shape-displacement=[0,0]] Displacement of the shape\n * @property {NumberExpression} [shape-opacity] Shape opacity. (WebGL only)\n * @property {NumberExpression} [shape-rotation=0] Rotation in radians (positive rotation clockwise).\n * @property {BooleanExpression} [shape-rotate-with-view=false] Whether to rotate the shape with the view. (Expression only supported in Canvas)\n * @property {SizeExpression} [shape-scale=1] Scale. Unless two-dimensional scaling is required a better\n * result may be obtained with appropriate settings for `shape-radius` and `shape-radius2`.\n * @property {import(\"./Style.js\").DeclutterMode} [shape-declutter-mode] Declutter mode. (Canvas only)\n * @property {NumberExpression} [z-index] The zIndex of the style. (Canvas only)\n */\n\n/**\n * Circle style properties for rendering point features. At least `circle-radius` must be provided.\n *\n * @typedef {Object} FlatCircle\n * @property {NumberExpression} [circle-radius] Circle radius.\n * @property {ColorExpression} [circle-fill-color] The fill color. `'none'` means no fill and no hit detection.\n * @property {ColorExpression} [circle-stroke-color] The stroke color.\n * @property {NumberExpression} [circle-stroke-width] Stroke pixel width.\n * @property {StringExpression} [circle-stroke-line-cap='round'] Line cap style: `butt`, `round`, or `square`. (Canvas only)\n * @property {StringExpression} [circle-stroke-line-join='round'] Line join style: `bevel`, `round`, or `miter`. (Canvas only)\n * @property {NumberArrayExpression} [circle-stroke-line-dash] Line dash pattern. (Canvas only)\n * @property {NumberExpression} [circle-stroke-line-dash-offset=0] Line dash offset. (Canvas only)\n * @property {NumberExpression} [circle-stroke-miter-limit=10] Miter limit. (Canvas only)\n * @property {NumberArrayExpression} [circle-displacement=[0,0]] displacement\n * @property {SizeExpression} [circle-scale=1] Scale. A two-dimensional scale will produce an ellipse.\n * Unless two-dimensional scaling is required a better result may be obtained with an appropriate setting for `circle-radius`.\n * @property {NumberExpression} [circle-opacity] Circle opacity. (WebGL only)\n * @property {NumberExpression} [circle-rotation=0] Rotation in radians\n * (positive rotation clockwise, meaningful only when used in conjunction with a two-dimensional scale).\n * @property {BooleanExpression} [circle-rotate-with-view=false] Whether to rotate the shape with the view (Expression only supported in Canvas)\n * (meaningful only when used in conjunction with a two-dimensional scale).\n * @property {import(\"./Style.js\").DeclutterMode} [circle-declutter-mode] Declutter mode (Canvas only)\n * @property {NumberExpression} [z-index] The zIndex of the style. (Canvas only)\n */\n\n/**\n * These default style properties are applied when no other style is given.\n *\n * @typedef {Object} DefaultStyle\n * @property {string} fill-color `'rgba(255,255,255,0.4)'`\n * @property {string} stroke-color `'#3399CC'`\n * @property {number} stroke-width `1.25`\n * @property {number} circle-radius `5`\n * @property {string} circle-fill-color `'rgba(255,255,255,0.4)'`\n * @property {number} circle-stroke-width `1.25`\n * @property {string} circle-stroke-color `'#3399CC'`\n */\n\n/**\n * @return {DefaultStyle} The default flat style.\n */\nexport function createDefaultStyle() {\n return {\n 'fill-color': 'rgba(255,255,255,0.4)',\n 'stroke-color': '#3399CC',\n 'stroke-width': 1.25,\n 'circle-radius': 5,\n 'circle-fill-color': 'rgba(255,255,255,0.4)',\n 'circle-stroke-width': 1.25,\n 'circle-stroke-color': '#3399CC',\n };\n}\n\n/**\n * A rule is used to conditionally apply a style. If the rule's filter evaluates to true,\n * the style will be applied.\n *\n * @typedef {Object} Rule\n * @property {FlatStyle|Array<FlatStyle>} style The style to be applied if the filter matches.\n * @property {import(\"../expr/expression.js\").EncodedExpression} [filter] The filter used\n * to determine if a style applies. If no filter is included, the rule always applies\n * (unless it is an else rule).\n * @property {boolean} [else] If true, the rule applies only if no other previous rule applies.\n * If the else rule also has a filter, the rule will not apply if the filter does not match.\n */\n\n/**\n * Style variables are provided as an object. The variables can be read in a {@link import(\"../expr/expression.js\").ExpressionValue style expression}\n * using the `['var', 'varName']` operator.\n * Each variable must hold a literal value (not an expression).\n * @typedef {Object<string, number|Array<number>|string|boolean>} StyleVariables\n */\n", "/**\n * Utilities for filling WebGL buffers\n * @module ol/render/webgl/bufferUtil\n */\nimport earcut from 'earcut';\nimport {angleBetween} from '../../coordinate.js';\nimport {apply as applyTransform} from '../../transform.js';\n\nexport const LINESTRING_ANGLE_COSINE_CUTOFF = 0.985;\n\n/** @type {Array<number>} */\nconst tmpArray_ = [];\n\n/**\n * An object holding positions both in an index and a vertex buffer.\n * @typedef {Object} BufferPositions\n * @property {number} vertexAttributesPosition Position in the vertex buffer\n * @property {number} instanceAttributesPosition Position in the vertex buffer\n * @property {number} indicesPosition Position in the index buffer\n */\nconst bufferPositions_ = {\n vertexAttributesPosition: 0,\n instanceAttributesPosition: 0,\n indicesPosition: 0,\n};\n\n/**\n * Pushes a quad (two triangles) based on a point geometry\n * @param {Float32Array} instructions Array of render instructions for points.\n * @param {number} elementIndex Index from which render instructions will be read.\n * @param {Float32Array} instanceAttributesBuffer Buffer in the form of a typed array.\n * @param {number} customAttributesSize Amount of custom attributes for each element.\n * @param {BufferPositions} [bufferPositions] Buffer write positions; if not specified, positions will be set at 0.\n * @return {BufferPositions} New buffer positions where to write next\n * @property {number} vertexAttributesPosition New position in the vertex buffer where future writes should start.\n * @property {number} indicesPosition New position in the index buffer where future writes should start.\n * @private\n */\nexport function writePointFeatureToBuffers(\n instructions,\n elementIndex,\n instanceAttributesBuffer,\n customAttributesSize,\n bufferPositions,\n) {\n const x = instructions[elementIndex++];\n const y = instructions[elementIndex++];\n\n // read custom numerical attributes on the feature\n const customAttrs = tmpArray_;\n customAttrs.length = customAttributesSize;\n for (let i = 0; i < customAttrs.length; i++) {\n customAttrs[i] = instructions[elementIndex + i];\n }\n\n let instPos = bufferPositions\n ? bufferPositions.instanceAttributesPosition\n : 0;\n\n instanceAttributesBuffer[instPos++] = x;\n instanceAttributesBuffer[instPos++] = y;\n if (customAttrs.length) {\n instanceAttributesBuffer.set(customAttrs, instPos);\n instPos += customAttrs.length;\n }\n\n bufferPositions_.instanceAttributesPosition = instPos;\n return bufferPositions_;\n}\n\n/**\n * Pushes a single quad to form a line segment; also includes a computation for the join angles with previous and next\n * segment, in order to be able to offset the vertices correctly in the shader.\n * Join angles are between 0 and 2PI.\n * This also computes the length of the current segment and the sum of the join angle tangents in order\n * to store this information on each subsequent segment along the line. This is necessary to correctly render dashes\n * and symbols along the line.\n *\n * pB (before) pA (after)\n * X negative X\n * \\ offset /\n * \\ /\n * \\ join join /\n * \\ angle 0 angle 1 /\n * \\\u2190--- \u2190---/ positive\n * \\ \u2190-- \u2190-- / offset\n * \\ \u2191 \u2193 /\n * X\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500X\n * p0 p1\n *\n * @param {Float32Array} instructions Array of render instructions for lines.s\n * @param {number} segmentStartIndex Index of the segment start point from which render instructions will be read.\n * @param {number} segmentEndIndex Index of the segment end point from which render instructions will be read.\n * @param {number|null} beforeSegmentIndex Index of the point right before the segment (null if none, e.g this is a line start)\n * @param {number|null} afterSegmentIndex Index of the point right after the segment (null if none, e.g this is a line end)\n * @param {Array<number>} instanceAttributesArray Array containing instance attributes.\n * @param {Array<number>} customAttributes Array of custom attributes value\n * @param {import('../../transform.js').Transform} toWorldTransform Transform matrix used to obtain world coordinates from instructions\n * @param {number} currentLength Cumulated length of segments processed so far\n * @param {number} currentAngleTangentSum Cumulated tangents of the join angles processed so far\n * @return {{length: number, angle: number}} Cumulated length with the newly processed segment (in world units), new sum of the join angle tangents\n * @private\n */\nexport function writeLineSegmentToBuffers(\n instructions,\n segmentStartIndex,\n segmentEndIndex,\n beforeSegmentIndex,\n afterSegmentIndex,\n instanceAttributesArray,\n customAttributes,\n toWorldTransform,\n currentLength,\n currentAngleTangentSum,\n) {\n // The segment is composed of two positions called P0[x0, y0] and P1[x1, y1]\n // Depending on whether there are points before and after the segment, its final shape\n // will be different\n const p0 = [\n instructions[segmentStartIndex],\n instructions[segmentStartIndex + 1],\n ];\n const p1 = [instructions[segmentEndIndex], instructions[segmentEndIndex + 1]];\n\n const m0 = instructions[segmentStartIndex + 2];\n const m1 = instructions[segmentEndIndex + 2];\n\n // to compute join angles we need to reproject coordinates back in world units\n const p0world = applyTransform(toWorldTransform, [...p0]);\n const p1world = applyTransform(toWorldTransform, [...p1]);\n\n // a negative angle indicates a line cap\n let angle0 = -1;\n let angle1 = -1;\n let newAngleTangentSum = currentAngleTangentSum;\n\n const joinBefore = beforeSegmentIndex !== null;\n const joinAfter = afterSegmentIndex !== null;\n\n // add vertices and adapt offsets for P0 in case of join\n if (joinBefore) {\n // B for before\n const pB = [\n instructions[beforeSegmentIndex],\n instructions[beforeSegmentIndex + 1],\n ];\n const pBworld = applyTransform(toWorldTransform, [...pB]);\n angle0 = angleBetween(p0world, p1world, pBworld);\n\n // only add to the sum if the angle isn't too close to 0 or 2PI\n if (Math.cos(angle0) <= LINESTRING_ANGLE_COSINE_CUTOFF) {\n newAngleTangentSum += Math.tan((angle0 - Math.PI) / 2);\n }\n }\n // adapt offsets for P1 in case of join; add to angle sum\n if (joinAfter) {\n // A for after\n const pA = [\n instructions[afterSegmentIndex],\n instructions[afterSegmentIndex + 1],\n ];\n const pAworld = applyTransform(toWorldTransform, [...pA]);\n angle1 = angleBetween(p1world, p0world, pAworld);\n\n // only add to the sum if the angle isn't too close to 0 or 2PI\n if (Math.cos(angle1) <= LINESTRING_ANGLE_COSINE_CUTOFF) {\n newAngleTangentSum += Math.tan((Math.PI - angle1) / 2);\n }\n }\n\n const maxPrecision = Math.pow(2, 24);\n const distanceLow = currentLength % maxPrecision;\n const distanceHigh = Math.floor(currentLength / maxPrecision) * maxPrecision;\n\n instanceAttributesArray.push(\n p0[0],\n p0[1],\n m0,\n p1[0],\n p1[1],\n m1,\n angle0,\n angle1,\n distanceLow,\n distanceHigh,\n currentAngleTangentSum,\n );\n instanceAttributesArray.push(...customAttributes);\n\n return {\n length:\n currentLength +\n Math.sqrt(\n (p1world[0] - p0world[0]) * (p1world[0] - p0world[0]) +\n (p1world[1] - p0world[1]) * (p1world[1] - p0world[1]),\n ),\n angle: newAngleTangentSum,\n };\n}\n\n/**\n * Pushes several triangles to form a polygon, including holes\n * @param {Float32Array} instructions Array of render instructions for lines.\n * @param {number} polygonStartIndex Index of the polygon start point from which render instructions will be read.\n * @param {Array<number>} vertexArray Array containing vertices.\n * @param {Array<number>} indexArray Array containing indices.\n * @param {number} customAttributesSize Amount of custom attributes for each element.\n * @return {number} Next polygon instructions index\n * @private\n */\nexport function writePolygonTrianglesToBuffers(\n instructions,\n polygonStartIndex,\n vertexArray,\n indexArray,\n customAttributesSize,\n) {\n const instructionsPerVertex = 2; // x, y\n const attributesPerVertex = 2 + customAttributesSize;\n let instructionsIndex = polygonStartIndex;\n const customAttributes = instructions.slice(\n instructionsIndex,\n instructionsIndex + customAttributesSize,\n );\n instructionsIndex += customAttributesSize;\n const ringsCount = instructions[instructionsIndex++];\n let verticesCount = 0;\n const holes = new Array(ringsCount - 1);\n for (let i = 0; i < ringsCount; i++) {\n verticesCount += instructions[instructionsIndex++];\n if (i < ringsCount - 1) {\n holes[i] = verticesCount;\n }\n }\n const flatCoords = instructions.slice(\n instructionsIndex,\n instructionsIndex + verticesCount * instructionsPerVertex,\n );\n\n // pushing to vertices and indices!! this is where the magic happens\n const result = earcut(flatCoords, holes, instructionsPerVertex);\n for (let i = 0; i < result.length; i++) {\n indexArray.push(result[i] + vertexArray.length / attributesPerVertex);\n }\n for (let i = 0; i < flatCoords.length; i += 2) {\n vertexArray.push(flatCoords[i], flatCoords[i + 1], ...customAttributes);\n }\n\n return instructionsIndex + verticesCount * instructionsPerVertex;\n}\n", "/**\n * Utilities for compiling expressions and turning them into WebGL concepts\n * @module ol/render/webgl/compileUtil\n */\n\nimport {asArray} from '../../color.js';\nimport {\n ColorType,\n NumberArrayType,\n SizeType,\n newParsingContext,\n} from '../../expr/expression.js';\nimport {\n buildExpression,\n getStringNumberEquivalent,\n uniformNameForVariable,\n} from '../../expr/gpu.js';\n\n/**\n * Recursively parses a style expression and outputs a GLSL-compatible string. Takes in a compilation context that\n * will be read and modified during the parsing operation.\n * @param {import(\"../../expr/gpu.js\").CompilationContext} compilationContext Compilation context\n * @param {import(\"../../expr/expression.js\").EncodedExpression} value Value\n * @param {number} [expectedType] Expected final type (can be several types combined)\n * @return {string} GLSL-compatible output\n */\nexport function expressionToGlsl(compilationContext, value, expectedType) {\n const parsingContext = newParsingContext();\n return buildExpression(\n value,\n expectedType,\n parsingContext,\n compilationContext,\n );\n}\n\n/**\n * Packs all components of a color into a two-floats array\n * @param {import(\"../../color.js\").Color|string} color Color as array of numbers or string\n * @return {Array<number>} Vec2 array containing the color in compressed form\n */\nexport function packColor(color) {\n const array = asArray(color);\n const r = array[0] * 256;\n const g = array[1];\n const b = array[2] * 256;\n const a = Math.round(array[3] * 255);\n return [r + g, b + a];\n}\n\n/**\n * Unpacks a color from a packed color in two-floats array form\n * NOTE: this is only used for testing purposes\n * @param {Array<number>} packedColor Packed color generated by the `packColor` function\n * @return {Array<number>} Resulting unpacked color in array form with components in the range [0, 1]\n */\nexport function unpackColor(packedColor) {\n return [\n Math.min(Math.floor(packedColor[0] / 256.0) / 255.0, 1),\n Math.min((packedColor[0] % 256.0) / 255.0, 1),\n Math.min(Math.floor(packedColor[1] / 256.0) / 255.0, 1),\n Math.min((packedColor[1] % 256.0) / 255.0, 1),\n ];\n}\n\n/**\n * Equivalent of `unpackColor()` in GLSL\n * @type {string}\n */\nexport const UNPACK_COLOR_FN = `vec4 unpackColor(vec2 packedColor) {\n return vec4(\n min(floor(packedColor[0] / 256.0) / 255.0, 1.0),\n min(mod(packedColor[0], 256.0) / 255.0, 1.0),\n min(floor(packedColor[1] / 256.0) / 255.0, 1.0),\n min(mod(packedColor[1], 256.0) / 255.0, 1.0)\n );\n}`;\n\n/**\n * @param {number} type Value type\n * @return {1|2|3|4} The amount of components for this value\n */\nexport function getGlslSizeFromType(type) {\n if (type === ColorType || type === SizeType) {\n return 2;\n }\n if (type === NumberArrayType) {\n return 4;\n }\n return 1;\n}\n\n/**\n * @param {number} type Value type\n * @return {'float'|'vec2'|'vec3'|'vec4'} The corresponding GLSL type for this value\n */\nexport function getGlslTypeFromType(type) {\n const size = getGlslSizeFromType(type);\n if (size > 1) {\n return /** @type {'vec2'|'vec3'|'vec4'} */ (`vec${size}`);\n }\n return 'float';\n}\n\n/**\n * Applies the properties and variables collected in a compilation context to a ShaderBuilder instance:\n * properties will show up as attributes in shaders, and variables will show up as uniforms.\n * @param {import(\"./ShaderBuilder.js\").ShaderBuilder} builder Shader builder\n * @param {import(\"../../expr/gpu.js\").CompilationContext} context Compilation context\n */\nexport function applyContextToBuilder(builder, context) {\n // define one uniform per variable\n for (const varName in context.variables) {\n const variable = context.variables[varName];\n const uniformName = uniformNameForVariable(variable.name);\n let glslType = getGlslTypeFromType(variable.type);\n if (variable.type === ColorType) {\n // we're not packing colors when they're passed as uniforms\n glslType = 'vec4';\n }\n builder.addUniform(uniformName, glslType);\n }\n\n // for each feature attribute used in the fragment shader, define a varying that will be used to pass data\n // from the vertex to the fragment shader, as well as an attribute in the vertex shader (if not already present)\n for (const propName in context.properties) {\n const property = context.properties[propName];\n const glslType = getGlslTypeFromType(property.type);\n const attributeName = `a_prop_${property.name}`;\n if (property.type === ColorType) {\n builder.addAttribute(\n attributeName,\n glslType,\n `unpackColor(${attributeName})`,\n 'vec4',\n );\n } else {\n builder.addAttribute(attributeName, glslType);\n }\n }\n\n // add functions that were collected in the compilation contexts\n for (const functionName in context.functions) {\n builder.addVertexShaderFunction(context.functions[functionName]);\n builder.addFragmentShaderFunction(context.functions[functionName]);\n }\n}\n\n/**\n * Generates a set of uniforms from variables collected in a compilation context,\n * to be fed to a WebGLHelper instance\n * @param {import(\"../../expr/gpu.js\").CompilationContext} context Compilation context\n * @param {import('../../style/flat.js').StyleVariables} [variables] Style variables.\n * @return {Object<string,import(\"../../webgl/Helper\").UniformValue>} Uniforms\n */\nexport function generateUniformsFromContext(context, variables) {\n /** @type {Object<string,import(\"../../webgl/Helper\").UniformValue>} */\n const uniforms = {};\n\n // define one uniform per variable\n for (const varName in context.variables) {\n const variable = context.variables[varName];\n const uniformName = uniformNameForVariable(variable.name);\n\n uniforms[uniformName] = () => {\n const value = variables[variable.name];\n if (typeof value === 'number') {\n return value;\n }\n if (typeof value === 'boolean') {\n return value ? 1 : 0;\n }\n if (variable.type === ColorType) {\n const color = [...asArray(value || '#eee')];\n color[0] /= 255;\n color[1] /= 255;\n color[2] /= 255;\n color[3] ??= 1;\n return color;\n }\n if (typeof value === 'string') {\n return getStringNumberEquivalent(value);\n }\n return value;\n };\n }\n\n return uniforms;\n}\n\n/**\n * Generates a set of attributes from properties collected in a compilation context,\n * to be fed to a WebGLHelper instance\n * @param {import(\"../../expr/gpu.js\").CompilationContext} context Compilation context\n * @return {import('./VectorStyleRenderer.js').AttributeDefinitions} Attributes\n */\nexport function generateAttributesFromContext(context) {\n /**\n * @type {import('./VectorStyleRenderer.js').AttributeDefinitions}\n */\n const attributes = {};\n\n // Define attributes with their callback for each property used in the vertex shader\n for (const propName in context.properties) {\n const property = context.properties[propName];\n const callback = (feature) => {\n const value = feature.get(property.name);\n if (property.type === ColorType) {\n return packColor([...asArray(value || '#eee')]);\n }\n if (typeof value === 'string') {\n return getStringNumberEquivalent(value);\n }\n if (typeof value === 'boolean') {\n return value ? 1 : 0;\n }\n return value;\n };\n\n attributes[`prop_${property.name}`] = {\n size: getGlslSizeFromType(property.type),\n callback,\n };\n }\n return attributes;\n}\n", "/**\n * Class for generating shaders from literal style objects\n * @module ol/render/webgl/ShaderBuilder\n */\nimport {colorToGlsl, numberToGlsl, stringToGlsl} from '../../expr/gpu.js';\nimport {createDefaultStyle} from '../../style/flat.js';\nimport {LINESTRING_ANGLE_COSINE_CUTOFF} from './bufferUtil.js';\nimport {UNPACK_COLOR_FN} from './compileUtil.js';\n\nexport const COMMON_HEADER = `#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float;\n#endif\nuniform mat4 u_projectionMatrix;\nuniform mat4 u_screenToWorldMatrix;\nuniform vec2 u_viewportSizePx;\nuniform float u_pixelRatio;\nuniform float u_globalAlpha;\nuniform float u_time;\nuniform float u_zoom;\nuniform float u_resolution;\nuniform float u_rotation;\nuniform vec4 u_renderExtent;\nuniform vec2 u_patternOrigin;\nuniform float u_depth;\nuniform mediump int u_hitDetection;\n\nconst float PI = 3.141592653589793238;\nconst float TWO_PI = 2.0 * PI;\nfloat currentLineMetric = 0.; // an actual value will be used in the stroke shaders\n\n${UNPACK_COLOR_FN}\n`;\n\nconst DEFAULT_STYLE = createDefaultStyle();\n\n/**\n * @typedef {Object} AttributeDescription\n * @property {string} name Attribute name, as will be declared in the header of the vertex shader (including a_)\n * @property {string} type Attribute GLSL type, either `float`, `vec2`, `vec4`...\n * @property {string} varyingName Varying name, as will be declared in the header of both shaders (including v_)\n * @property {string} varyingType Varying type, either `float`, `vec2`, `vec4`...\n * @property {string} varyingExpression GLSL expression to assign to the varying in the vertex shader (e.g. `unpackColor(a_myAttr)`)\n */\n\n/**\n * @typedef {Object} UniformDescription\n * @property {string} name Uniform name, as will be declared in the header of the vertex shader (including u_)\n * @property {string} type Uniform GLSL type, either `float`, `vec2`, `vec4`...\n */\n\n/**\n * @classdesc\n * This class implements a classic builder pattern for generating many different types of shaders.\n * Methods can be chained, e. g.:\n *\n * ```js\n * const shader = new ShaderBuilder()\n * .addAttribute('a_width', 'float')\n * .addUniform('u_time', 'float)\n * .setColorExpression('...')\n * .setSymbolSizeExpression('...')\n * .getSymbolFragmentShader();\n * ```\n *\n * A note on [alpha premultiplication](https://en.wikipedia.org/wiki/Alpha_compositing#Straight_versus_premultiplied):\n * The ShaderBuilder class expects all colors to **not having been alpha-premultiplied!** This is because alpha\n * premultiplication is done at the end of each fragment shader.\n */\nexport class ShaderBuilder {\n constructor() {\n /**\n * Uniforms; these will be declared in the header (should include the type).\n * @type {Array<UniformDescription>}\n * @private\n */\n this.uniforms_ = [];\n\n /**\n * Attributes; these will be declared in the header (should include the type).\n * @type {Array<AttributeDescription>}\n * @private\n */\n this.attributes_ = [];\n\n /**\n * @type {boolean}\n * @private\n */\n this.hasSymbol_ = false;\n\n /**\n * @type {string}\n * @private\n */\n this.symbolSizeExpression_ = `vec2(${numberToGlsl(\n DEFAULT_STYLE['circle-radius'],\n )} + ${numberToGlsl(DEFAULT_STYLE['circle-stroke-width'] * 0.5)})`;\n\n /**\n * @type {string}\n * @private\n */\n this.symbolRotationExpression_ = '0.0';\n\n /**\n * @type {string}\n * @private\n */\n this.symbolOffsetExpression_ = 'vec2(0.0)';\n\n /**\n * @type {string}\n * @private\n */\n this.symbolColorExpression_ = colorToGlsl(\n /** @type {string} */ (DEFAULT_STYLE['circle-fill-color']),\n );\n\n /**\n * @type {string}\n * @private\n */\n this.texCoordExpression_ = 'vec4(0.0, 0.0, 1.0, 1.0)';\n\n /**\n * @type {string}\n * @private\n */\n this.discardExpression_ = 'false';\n\n /**\n * @type {boolean}\n * @private\n */\n this.symbolRotateWithView_ = false;\n\n /**\n * @type {boolean}\n * @private\n */\n this.hasStroke_ = false;\n\n /**\n * @type {string}\n * @private\n */\n this.strokeWidthExpression_ = numberToGlsl(DEFAULT_STYLE['stroke-width']);\n\n /**\n * @type {string}\n * @private\n */\n this.strokeColorExpression_ = colorToGlsl(\n /** @type {string} */ (DEFAULT_STYLE['stroke-color']),\n );\n\n /**\n * @private\n */\n this.strokeOffsetExpression_ = '0.';\n\n /**\n * @private\n */\n this.strokeCapExpression_ = stringToGlsl('round');\n\n /**\n * @private\n */\n this.strokeJoinExpression_ = stringToGlsl('round');\n\n /**\n * @private\n */\n this.strokeMiterLimitExpression_ = '10.';\n\n /**\n * @private\n */\n this.strokeDistanceFieldExpression_ = '-1000.';\n\n /**\n * @private\n * @type {string}\n */\n this.strokePatternLengthExpression_ = null;\n\n /**\n * @type {boolean}\n * @private\n */\n this.hasFill_ = false;\n\n /**\n * @type {string}\n * @private\n */\n this.fillColorExpression_ = colorToGlsl(\n /** @type {string} */ (DEFAULT_STYLE['fill-color']),\n );\n\n /**\n * @type {Array<string>}\n * @private\n */\n this.vertexShaderFunctions_ = [];\n\n /**\n * @type {Array<string>}\n * @private\n */\n this.fragmentShaderFunctions_ = [];\n }\n\n /**\n * Adds a uniform accessible in both fragment and vertex shaders.\n * The given name should include a type, such as `sampler2D u_texture`.\n * @param {string} name Uniform name, including the `u_` prefix\n * @param {'float'|'vec2'|'vec3'|'vec4'|'sampler2D'} type GLSL type\n * @return {ShaderBuilder} the builder object\n */\n addUniform(name, type) {\n this.uniforms_.push({\n name,\n type,\n });\n return this;\n }\n\n /**\n * Adds an attribute accessible in the vertex shader, read from the geometry buffer.\n * The given name should include a type, such as `vec2 a_position`.\n * Attributes will also be made available under the same name in fragment shaders.\n * @param {string} name Attribute name, including the `a_` prefix\n * @param {'float'|'vec2'|'vec3'|'vec4'} type GLSL type\n * @param {string} [varyingExpression] Expression which will be assigned to the varying in the vertex shader, and\n * passed on to the fragment shader.\n * @param {'float'|'vec2'|'vec3'|'vec4'} [varyingType] Type of the attribute after transformation;\n * e.g. `vec4` after unpacking color components\n * @return {ShaderBuilder} the builder object\n */\n addAttribute(name, type, varyingExpression, varyingType) {\n this.attributes_.push({\n name,\n type,\n varyingName: name.replace(/^a_/, 'v_'),\n varyingType: varyingType ?? type,\n varyingExpression: varyingExpression ?? name,\n });\n return this;\n }\n\n /**\n * Sets an expression to compute the size of the shape.\n * This expression can use all the uniforms and attributes available\n * in the vertex shader, and should evaluate to a `vec2` value.\n * @param {string} expression Size expression\n * @return {ShaderBuilder} the builder object\n */\n setSymbolSizeExpression(expression) {\n this.hasSymbol_ = true;\n this.symbolSizeExpression_ = expression;\n return this;\n }\n\n /**\n * @return {string} The current symbol size expression\n */\n getSymbolSizeExpression() {\n return this.symbolSizeExpression_;\n }\n\n /**\n * Sets an expression to compute the rotation of the shape.\n * This expression can use all the uniforms and attributes available\n * in the vertex shader, and should evaluate to a `float` value in radians.\n * @param {string} expression Size expression\n * @return {ShaderBuilder} the builder object\n */\n setSymbolRotationExpression(expression) {\n this.symbolRotationExpression_ = expression;\n return this;\n }\n\n /**\n * Sets an expression to compute the offset of the symbol from the point center.\n * This expression can use all the uniforms and attributes available\n * in the vertex shader, and should evaluate to a `vec2` value.\n * @param {string} expression Offset expression\n * @return {ShaderBuilder} the builder object\n */\n setSymbolOffsetExpression(expression) {\n this.symbolOffsetExpression_ = expression;\n return this;\n }\n\n /**\n * @return {string} The current symbol offset expression\n */\n getSymbolOffsetExpression() {\n return this.symbolOffsetExpression_;\n }\n\n /**\n * Sets an expression to compute the color of the shape.\n * This expression can use all the uniforms, varyings and attributes available\n * in the fragment shader, and should evaluate to a `vec4` value.\n * @param {string} expression Color expression\n * @return {ShaderBuilder} the builder object\n */\n setSymbolColorExpression(expression) {\n this.hasSymbol_ = true;\n this.symbolColorExpression_ = expression;\n return this;\n }\n\n /**\n * @return {string} The current symbol color expression\n */\n getSymbolColorExpression() {\n return this.symbolColorExpression_;\n }\n\n /**\n * Sets an expression to compute the texture coordinates of the vertices.\n * This expression can use all the uniforms and attributes available\n * in the vertex shader, and should evaluate to a `vec4` value.\n * @param {string} expression Texture coordinate expression\n * @return {ShaderBuilder} the builder object\n */\n setTextureCoordinateExpression(expression) {\n this.texCoordExpression_ = expression;\n return this;\n }\n\n /**\n * Sets an expression to determine whether a fragment (pixel) should be discarded,\n * i.e. not drawn at all.\n * This expression can use all the uniforms, varyings and attributes available\n * in the fragment shader, and should evaluate to a `bool` value (it will be\n * used in an `if` statement)\n * @param {string} expression Fragment discard expression\n * @return {ShaderBuilder} the builder object\n */\n setFragmentDiscardExpression(expression) {\n this.discardExpression_ = expression;\n return this;\n }\n\n /**\n * @return {string} The current fragment discard expression\n */\n getFragmentDiscardExpression() {\n return this.discardExpression_;\n }\n\n /**\n * Sets whether the symbols should rotate with the view or stay aligned with the map.\n * Note: will only be used for point geometry shaders.\n * @param {boolean} rotateWithView Rotate with view\n * @return {ShaderBuilder} the builder object\n */\n setSymbolRotateWithView(rotateWithView) {\n this.symbolRotateWithView_ = rotateWithView;\n return this;\n }\n\n /**\n * @param {string} expression Stroke width expression, returning value in pixels\n * @return {ShaderBuilder} the builder object\n */\n setStrokeWidthExpression(expression) {\n this.hasStroke_ = true;\n this.strokeWidthExpression_ = expression;\n return this;\n }\n\n /**\n * @param {string} expression Stroke color expression, evaluate to `vec4`: can rely on currentLengthPx and currentRadiusPx\n * @return {ShaderBuilder} the builder object\n */\n setStrokeColorExpression(expression) {\n this.hasStroke_ = true;\n this.strokeColorExpression_ = expression;\n return this;\n }\n\n /**\n * @return {string} The current stroke color expression\n */\n getStrokeColorExpression() {\n return this.strokeColorExpression_;\n }\n\n /**\n * @param {string} expression Stroke color expression, evaluate to `float`\n * @return {ShaderBuilder} the builder object\n */\n setStrokeOffsetExpression(expression) {\n this.strokeOffsetExpression_ = expression;\n return this;\n }\n\n /**\n * @param {string} expression Stroke line cap expression, evaluate to `float`\n * @return {ShaderBuilder} the builder object\n */\n setStrokeCapExpression(expression) {\n this.strokeCapExpression_ = expression;\n return this;\n }\n\n /**\n * @param {string} expression Stroke line join expression, evaluate to `float`\n * @return {ShaderBuilder} the builder object\n */\n setStrokeJoinExpression(expression) {\n this.strokeJoinExpression_ = expression;\n return this;\n }\n\n /**\n * @param {string} expression Stroke miter limit expression, evaluate to `float`\n * @return {ShaderBuilder} the builder object\n */\n setStrokeMiterLimitExpression(expression) {\n this.strokeMiterLimitExpression_ = expression;\n return this;\n }\n\n /**\n * @param {string} expression Stroke distance field expression, evaluate to `float`\n * This can override the default distance field; can rely on currentLengthPx and currentRadiusPx\n * @return {ShaderBuilder} the builder object\n */\n setStrokeDistanceFieldExpression(expression) {\n this.strokeDistanceFieldExpression_ = expression;\n return this;\n }\n\n /**\n * Defining a pattern length for a stroke lets us avoid having visual artifacts when\n * a linestring is very long and thus has very high \"distance\" attributes on its vertices.\n * If we apply a pattern or dash array to a stroke we know for certain that the full distance value\n * is not necessary and can be trimmed down using `mod(currentDistance, patternLength)`.\n * @param {string} expression Stroke expression that evaluates to a`float; value is expected to be\n * in pixels.\n * @return {ShaderBuilder} the builder object\n */\n setStrokePatternLengthExpression(expression) {\n this.strokePatternLengthExpression_ = expression;\n return this;\n }\n\n /**\n * @return {string} The current stroke pattern length expression.\n */\n getStrokePatternLengthExpression() {\n return this.strokePatternLengthExpression_;\n }\n\n /**\n * @param {string} expression Fill color expression, evaluate to `vec4`\n * @return {ShaderBuilder} the builder object\n */\n setFillColorExpression(expression) {\n this.hasFill_ = true;\n this.fillColorExpression_ = expression;\n return this;\n }\n\n /**\n * @return {string} The current fill color expression\n */\n getFillColorExpression() {\n return this.fillColorExpression_;\n }\n\n addVertexShaderFunction(code) {\n if (this.vertexShaderFunctions_.includes(code)) {\n return this;\n }\n this.vertexShaderFunctions_.push(code);\n return this;\n }\n addFragmentShaderFunction(code) {\n if (this.fragmentShaderFunctions_.includes(code)) {\n return this;\n }\n this.fragmentShaderFunctions_.push(code);\n return this;\n }\n\n /**\n * Generates a symbol vertex shader from the builder parameters\n * @return {string|null} The full shader as a string; null if no size or color specified\n */\n getSymbolVertexShader() {\n if (!this.hasSymbol_) {\n return null;\n }\n\n return `${COMMON_HEADER}\n${this.uniforms_.map((uniform) => `uniform ${uniform.type} ${uniform.name};`).join('\\n')}\nattribute vec2 a_position;\nattribute vec2 a_localPosition;\nattribute vec2 a_hitColor;\n\nvarying vec2 v_texCoord;\nvarying vec2 v_quadCoord;\nvarying vec4 v_hitColor;\nvarying vec2 v_centerPx;\nvarying float v_angle;\nvarying vec2 v_quadSizePx;\n\n${this.attributes_\n .map(\n (attribute) => `attribute ${attribute.type} ${attribute.name};\nvarying ${attribute.varyingType} ${attribute.varyingName};`,\n )\n .join('\\n')}\n${this.vertexShaderFunctions_.join('\\n')}\nvec2 pxToScreen(vec2 coordPx) {\n vec2 scaled = coordPx / u_viewportSizePx / 0.5;\n return scaled;\n}\n\nvec2 screenToPx(vec2 coordScreen) {\n return (coordScreen * 0.5 + 0.5) * u_viewportSizePx;\n}\n\nvoid main(void) {\n v_quadSizePx = ${this.symbolSizeExpression_};\n vec2 halfSizePx = v_quadSizePx * 0.5;\n vec2 centerOffsetPx = ${this.symbolOffsetExpression_};\n vec2 offsetPx = centerOffsetPx + a_localPosition * halfSizePx * vec2(1., -1.);\n float angle = ${this.symbolRotationExpression_}${this.symbolRotateWithView_ ? ' + u_rotation' : ''};\n float c = cos(-angle);\n float s = sin(-angle);\n offsetPx = vec2(c * offsetPx.x - s * offsetPx.y, s * offsetPx.x + c * offsetPx.y);\n vec4 center = u_projectionMatrix * vec4(a_position, 0.0, 1.0);\n gl_Position = center + vec4(pxToScreen(offsetPx), u_depth, 0.);\n vec4 texCoord = ${this.texCoordExpression_};\n float u = mix(texCoord.s, texCoord.p, a_localPosition.x * 0.5 + 0.5);\n float v = mix(texCoord.t, texCoord.q, a_localPosition.y * 0.5 + 0.5);\n v_texCoord = vec2(u, v);\n v_hitColor = unpackColor(a_hitColor);\n v_angle = angle;\n c = cos(-v_angle);\n s = sin(-v_angle);\n centerOffsetPx = vec2(c * centerOffsetPx.x - s * centerOffsetPx.y, s * centerOffsetPx.x + c * centerOffsetPx.y);\n v_centerPx = screenToPx(center.xy) + centerOffsetPx;\n${this.attributes_\n .map(\n (attribute) =>\n ` ${attribute.varyingName} = ${attribute.varyingExpression};`,\n )\n .join('\\n')}\n}`;\n }\n\n /**\n * Generates a symbol fragment shader from the builder parameters\n * @return {string|null} The full shader as a string; null if no size or color specified\n */\n getSymbolFragmentShader() {\n if (!this.hasSymbol_) {\n return null;\n }\n\n return `${COMMON_HEADER}\n${this.uniforms_.map((uniform) => `uniform ${uniform.type} ${uniform.name};`).join('\\n')}\nvarying vec2 v_texCoord;\nvarying vec4 v_hitColor;\nvarying vec2 v_centerPx;\nvarying float v_angle;\nvarying vec2 v_quadSizePx;\n${this.attributes_\n .map(\n (attribute) => `varying ${attribute.varyingType} ${attribute.varyingName};`,\n )\n .join('\\n')}\n${this.fragmentShaderFunctions_.join('\\n')}\n\nvoid main(void) {\n${this.attributes_\n .map(\n (attribute) =>\n ` ${attribute.varyingType} ${attribute.name} = ${attribute.varyingName}; // assign to original attribute name`,\n )\n .join('\\n')}\n if (${this.discardExpression_}) { discard; }\n vec2 coordsPx = gl_FragCoord.xy / u_pixelRatio - v_centerPx; // relative to center\n float c = cos(v_angle);\n float s = sin(v_angle);\n coordsPx = vec2(c * coordsPx.x - s * coordsPx.y, s * coordsPx.x + c * coordsPx.y);\n gl_FragColor = ${this.symbolColorExpression_};\n gl_FragColor.rgb *= gl_FragColor.a;\n if (u_hitDetection > 0) {\n if (gl_FragColor.a < 0.05) { discard; };\n gl_FragColor = v_hitColor;\n }\n}`;\n }\n\n /**\n * Generates a stroke vertex shader from the builder parameters\n * @return {string|null} The full shader as a string; null if no size or color specified\n */\n getStrokeVertexShader() {\n if (!this.hasStroke_) {\n return null;\n }\n\n return `${COMMON_HEADER}\n${this.uniforms_.map((uniform) => `uniform ${uniform.type} ${uniform.name};`).join('\\n')}\nattribute vec2 a_segmentStart;\nattribute vec2 a_segmentEnd;\nattribute vec2 a_localPosition;\nattribute float a_measureStart;\nattribute float a_measureEnd;\nattribute float a_angleTangentSum;\nattribute float a_distanceLow;\nattribute float a_distanceHigh;\nattribute vec2 a_joinAngles;\nattribute vec2 a_hitColor;\n\nvarying vec2 v_segmentStartPx;\nvarying vec2 v_segmentEndPx;\nvarying float v_angleStart;\nvarying float v_angleEnd;\nvarying float v_width;\nvarying vec4 v_hitColor;\nvarying float v_distancePx;\nvarying float v_measureStart;\nvarying float v_measureEnd;\n\n${this.attributes_\n .map(\n (attribute) => `attribute ${attribute.type} ${attribute.name};\nvarying ${attribute.varyingType} ${attribute.varyingName};`,\n )\n .join('\\n')}\n${this.vertexShaderFunctions_.join('\\n')}\nvec2 worldToPx(vec2 worldPos) {\n vec4 screenPos = u_projectionMatrix * vec4(worldPos, 0.0, 1.0);\n return (0.5 * screenPos.xy + 0.5) * u_viewportSizePx;\n}\n\nvec4 pxToScreen(vec2 pxPos) {\n vec2 screenPos = 2.0 * pxPos / u_viewportSizePx - 1.0;\n return vec4(screenPos, u_depth, 1.0);\n}\n\nbool isCap(float joinAngle) {\n return joinAngle < -0.1;\n}\n\nvec2 getJoinOffsetDirection(vec2 normalPx, float joinAngle) {\n float halfAngle = joinAngle / 2.0;\n float c = cos(halfAngle);\n float s = sin(halfAngle);\n vec2 angleBisectorNormal = vec2(s * normalPx.x + c * normalPx.y, -c * normalPx.x + s * normalPx.y);\n float length = 1.0 / s;\n return angleBisectorNormal * length;\n}\n\nvec2 getOffsetPoint(vec2 point, vec2 normal, float joinAngle, float offsetPx) {\n // if on a cap or the join angle is too high, offset the line along the segment normal\n if (cos(joinAngle) > 0.998 || isCap(joinAngle)) {\n return point - normal * offsetPx;\n }\n // offset is applied along the inverted normal (positive offset goes \"right\" relative to line direction)\n return point - getJoinOffsetDirection(normal, joinAngle) * offsetPx;\n}\n\nvoid main(void) {\n v_angleStart = a_joinAngles.x;\n v_angleEnd = a_joinAngles.y;\n float startEndRatio = a_localPosition.x * 0.5 + 0.5;\n currentLineMetric = mix(a_measureStart, a_measureEnd, startEndRatio);\n // we're reading the fractional part while keeping the sign (so -4.12 gives -0.12, 3.45 gives 0.45)\n\n float lineWidth = ${this.strokeWidthExpression_};\n float lineOffsetPx = ${this.strokeOffsetExpression_};\n\n // compute segment start/end in px with offset\n vec2 segmentStartPx = worldToPx(a_segmentStart);\n vec2 segmentEndPx = worldToPx(a_segmentEnd);\n vec2 tangentPx = normalize(segmentEndPx - segmentStartPx);\n vec2 normalPx = vec2(-tangentPx.y, tangentPx.x);\n segmentStartPx = getOffsetPoint(segmentStartPx, normalPx, v_angleStart, lineOffsetPx),\n segmentEndPx = getOffsetPoint(segmentEndPx, normalPx, v_angleEnd, lineOffsetPx);\n\n // compute current vertex position\n float normalDir = -1. * a_localPosition.y;\n float tangentDir = -1. * a_localPosition.x;\n float angle = mix(v_angleStart, v_angleEnd, startEndRatio);\n vec2 joinDirection;\n vec2 positionPx = mix(segmentStartPx, segmentEndPx, startEndRatio);\n // if angle is too high, do not make a proper join\n if (cos(angle) > ${LINESTRING_ANGLE_COSINE_CUTOFF} || isCap(angle)) {\n joinDirection = normalPx * normalDir - tangentPx * tangentDir;\n } else {\n joinDirection = getJoinOffsetDirection(normalPx * normalDir, angle);\n }\n positionPx = positionPx + joinDirection * (lineWidth * 0.5 + 1.); // adding 1 pixel for antialiasing\n gl_Position = pxToScreen(positionPx);\n\n v_segmentStartPx = segmentStartPx;\n v_segmentEndPx = segmentEndPx;\n v_width = lineWidth;\n v_hitColor = unpackColor(a_hitColor);\n\n v_distancePx = a_distanceLow / u_resolution - (lineOffsetPx * a_angleTangentSum);\n float distanceHighPx = a_distanceHigh / u_resolution;\n ${\n this.strokePatternLengthExpression_ !== null\n ? `v_distancePx = mod(v_distancePx, ${this.strokePatternLengthExpression_});\n distanceHighPx = mod(distanceHighPx, ${this.strokePatternLengthExpression_});\n `\n : ''\n }v_distancePx += distanceHighPx;\n\n v_measureStart = a_measureStart;\n v_measureEnd = a_measureEnd;\n${this.attributes_\n .map(\n (attribute) =>\n ` ${attribute.varyingName} = ${attribute.varyingExpression};`,\n )\n .join('\\n')}\n}`;\n }\n\n /**\n * Generates a stroke fragment shader from the builder parameters\n *\n * @return {string|null} The full shader as a string; null if no size or color specified\n */\n getStrokeFragmentShader() {\n if (!this.hasStroke_) {\n return null;\n }\n\n return `${COMMON_HEADER}\n${this.uniforms_.map((uniform) => `uniform ${uniform.type} ${uniform.name};`).join('\\n')}\nvarying vec2 v_segmentStartPx;\nvarying vec2 v_segmentEndPx;\nvarying float v_angleStart;\nvarying float v_angleEnd;\nvarying float v_width;\nvarying vec4 v_hitColor;\nvarying float v_distancePx;\nvarying float v_measureStart;\nvarying float v_measureEnd;\n${this.attributes_\n .map(\n (attribute) => `varying ${attribute.varyingType} ${attribute.varyingName};`,\n )\n .join('\\n')}\n${this.fragmentShaderFunctions_.join('\\n')}\n\nvec2 pxToWorld(vec2 pxPos) {\n vec2 screenPos = 2.0 * pxPos / u_viewportSizePx - 1.0;\n return (u_screenToWorldMatrix * vec4(screenPos, 0.0, 1.0)).xy;\n}\n\nbool isCap(float joinAngle) {\n return joinAngle < -0.1;\n}\n\nfloat segmentDistanceField(vec2 point, vec2 start, vec2 end, float width) {\n vec2 tangent = normalize(end - start);\n vec2 normal = vec2(-tangent.y, tangent.x);\n vec2 startToPoint = point - start;\n return abs(dot(startToPoint, normal)) - width * 0.5;\n}\n\nfloat buttCapDistanceField(vec2 point, vec2 start, vec2 end) {\n vec2 startToPoint = point - start;\n vec2 tangent = normalize(end - start);\n return dot(startToPoint, -tangent);\n}\n\nfloat squareCapDistanceField(vec2 point, vec2 start, vec2 end, float width) {\n return buttCapDistanceField(point, start, end) - width * 0.5;\n}\n\nfloat roundCapDistanceField(vec2 point, vec2 start, vec2 end, float width) {\n float onSegment = max(0., 1000. * dot(point - start, end - start)); // this is very high when inside the segment\n return length(point - start) - width * 0.5 - onSegment;\n}\n\nfloat roundJoinDistanceField(vec2 point, vec2 start, vec2 end, float width) {\n return roundCapDistanceField(point, start, end, width);\n}\n\nfloat bevelJoinField(vec2 point, vec2 start, vec2 end, float width, float joinAngle) {\n vec2 startToPoint = point - start;\n vec2 tangent = normalize(end - start);\n float c = cos(joinAngle * 0.5);\n float s = sin(joinAngle * 0.5);\n float direction = -sign(sin(joinAngle));\n vec2 bisector = vec2(c * tangent.x - s * tangent.y, s * tangent.x + c * tangent.y);\n float radius = width * 0.5 * s;\n return dot(startToPoint, bisector * direction) - radius;\n}\n\nfloat miterJoinDistanceField(vec2 point, vec2 start, vec2 end, float width, float joinAngle) {\n if (cos(joinAngle) > ${LINESTRING_ANGLE_COSINE_CUTOFF}) { // avoid risking a division by zero\n return bevelJoinField(point, start, end, width, joinAngle);\n }\n float miterLength = 1. / sin(joinAngle * 0.5);\n float miterLimit = ${this.strokeMiterLimitExpression_};\n if (miterLength > miterLimit) {\n return bevelJoinField(point, start, end, width, joinAngle);\n }\n return -1000.;\n}\n\nfloat capDistanceField(vec2 point, vec2 start, vec2 end, float width, float capType) {\n if (capType == ${stringToGlsl('butt')}) {\n return buttCapDistanceField(point, start, end);\n } else if (capType == ${stringToGlsl('square')}) {\n return squareCapDistanceField(point, start, end, width);\n }\n return roundCapDistanceField(point, start, end, width);\n}\n\nfloat joinDistanceField(vec2 point, vec2 start, vec2 end, float width, float joinAngle, float joinType) {\n if (joinType == ${stringToGlsl('bevel')}) {\n return bevelJoinField(point, start, end, width, joinAngle);\n } else if (joinType == ${stringToGlsl('miter')}) {\n return miterJoinDistanceField(point, start, end, width, joinAngle);\n }\n return roundJoinDistanceField(point, start, end, width);\n}\n\nfloat computeSegmentPointDistance(vec2 point, vec2 start, vec2 end, float width, float joinAngle, float capType, float joinType) {\n if (isCap(joinAngle)) {\n return capDistanceField(point, start, end, width, capType);\n }\n return joinDistanceField(point, start, end, width, joinAngle, joinType);\n}\n\nfloat distanceFromSegment(vec2 point, vec2 start, vec2 end) {\n vec2 tangent = end - start;\n vec2 startToPoint = point - start;\n // inspire by capsule fn in https://iquilezles.org/articles/distfunctions/\n float h = clamp(dot(startToPoint, tangent) / dot(tangent, tangent), 0.0, 1.0);\n return length(startToPoint - tangent * h);\n}\n\nvoid main(void) {\n${this.attributes_\n .map(\n (attribute) =>\n ` ${attribute.varyingType} ${attribute.name} = ${attribute.varyingName}; // assign to original attribute name`,\n )\n .join('\\n')}\n\n vec2 currentPointPx = gl_FragCoord.xy / u_pixelRatio;\n #ifdef GL_FRAGMENT_PRECISION_HIGH\n vec2 worldPos = pxToWorld(currentPointPx);\n if (\n abs(u_renderExtent[0] - u_renderExtent[2]) > 0.0 && (\n worldPos[0] < u_renderExtent[0] ||\n worldPos[1] < u_renderExtent[1] ||\n worldPos[0] > u_renderExtent[2] ||\n worldPos[1] > u_renderExtent[3]\n )\n ) {\n discard;\n }\n #endif\n\n float segmentLengthPx = length(v_segmentEndPx - v_segmentStartPx);\n segmentLengthPx = max(segmentLengthPx, 1.17549429e-38); // avoid divide by zero\n vec2 segmentTangent = (v_segmentEndPx - v_segmentStartPx) / segmentLengthPx;\n vec2 segmentNormal = vec2(-segmentTangent.y, segmentTangent.x);\n vec2 startToPointPx = currentPointPx - v_segmentStartPx;\n float lengthToPointPx = max(0., min(dot(segmentTangent, startToPointPx), segmentLengthPx));\n float currentLengthPx = lengthToPointPx + v_distancePx;\n float currentRadiusPx = distanceFromSegment(currentPointPx, v_segmentStartPx, v_segmentEndPx);\n float currentRadiusRatio = dot(segmentNormal, startToPointPx) * 2. / v_width;\n currentLineMetric = mix(v_measureStart, v_measureEnd, lengthToPointPx / segmentLengthPx);\n\n if (${this.discardExpression_}) { discard; }\n\n float capType = ${this.strokeCapExpression_};\n float joinType = ${this.strokeJoinExpression_};\n float segmentStartDistance = computeSegmentPointDistance(currentPointPx, v_segmentStartPx, v_segmentEndPx, v_width, v_angleStart, capType, joinType);\n float segmentEndDistance = computeSegmentPointDistance(currentPointPx, v_segmentEndPx, v_segmentStartPx, v_width, v_angleEnd, capType, joinType);\n float distanceField = max(\n segmentDistanceField(currentPointPx, v_segmentStartPx, v_segmentEndPx, v_width),\n max(segmentStartDistance, segmentEndDistance)\n );\n distanceField = max(distanceField, ${this.strokeDistanceFieldExpression_});\n\n vec4 color = ${this.strokeColorExpression_};\n color.a *= smoothstep(0.5, -0.5, distanceField);\n gl_FragColor = color;\n gl_FragColor.a *= u_globalAlpha;\n gl_FragColor.rgb *= gl_FragColor.a;\n if (u_hitDetection > 0) {\n if (gl_FragColor.a < 0.1) { discard; };\n gl_FragColor = v_hitColor;\n }\n}`;\n }\n\n /**\n * Generates a fill vertex shader from the builder parameters\n *\n * @return {string|null} The full shader as a string; null if no color specified\n */\n getFillVertexShader() {\n if (!this.hasFill_) {\n return null;\n }\n\n return `${COMMON_HEADER}\n${this.uniforms_.map((uniform) => `uniform ${uniform.type} ${uniform.name};`).join('\\n')}\nattribute vec2 a_position;\nattribute vec2 a_hitColor;\n\nvarying vec4 v_hitColor;\n\n${this.attributes_\n .map(\n (attribute) => `attribute ${attribute.type} ${attribute.name};\nvarying ${attribute.varyingType} ${attribute.varyingName};`,\n )\n .join('\\n')}\n${this.vertexShaderFunctions_.join('\\n')}\nvoid main(void) {\n gl_Position = u_projectionMatrix * vec4(a_position, u_depth, 1.0);\n v_hitColor = unpackColor(a_hitColor);\n${this.attributes_\n .map(\n (attribute) =>\n ` ${attribute.varyingName} = ${attribute.varyingExpression};`,\n )\n .join('\\n')}\n}`;\n }\n\n /**\n * Generates a fill fragment shader from the builder parameters\n * @return {string|null} The full shader as a string; null if no color specified\n */\n getFillFragmentShader() {\n if (!this.hasFill_) {\n return null;\n }\n\n return `${COMMON_HEADER}\n${this.uniforms_.map((uniform) => `uniform ${uniform.type} ${uniform.name};`).join('\\n')}\nvarying vec4 v_hitColor;\n${this.attributes_\n .map(\n (attribute) => `varying ${attribute.varyingType} ${attribute.varyingName};`,\n )\n .join('\\n')}\n${this.fragmentShaderFunctions_.join('\\n')}\nvec2 pxToWorld(vec2 pxPos) {\n vec2 screenPos = 2.0 * pxPos / u_viewportSizePx - 1.0;\n return (u_screenToWorldMatrix * vec4(screenPos, 0.0, 1.0)).xy;\n}\n\nvec2 worldToPx(vec2 worldPos) {\n vec4 screenPos = u_projectionMatrix * vec4(worldPos, 0.0, 1.0);\n return (0.5 * screenPos.xy + 0.5) * u_viewportSizePx;\n}\n\nvoid main(void) {\n${this.attributes_\n .map(\n (attribute) =>\n ` ${attribute.varyingType} ${attribute.name} = ${attribute.varyingName}; // assign to original attribute name`,\n )\n .join('\\n')}\n vec2 pxPos = gl_FragCoord.xy / u_pixelRatio;\n vec2 pxOrigin = worldToPx(u_patternOrigin);\n #ifdef GL_FRAGMENT_PRECISION_HIGH\n vec2 worldPos = pxToWorld(pxPos);\n if (\n abs(u_renderExtent[0] - u_renderExtent[2]) > 0.0 && (\n worldPos[0] < u_renderExtent[0] ||\n worldPos[1] < u_renderExtent[1] ||\n worldPos[0] > u_renderExtent[2] ||\n worldPos[1] > u_renderExtent[3]\n )\n ) {\n discard;\n }\n #endif\n if (${this.discardExpression_}) { discard; }\n gl_FragColor = ${this.fillColorExpression_};\n gl_FragColor.a *= u_globalAlpha;\n gl_FragColor.rgb *= gl_FragColor.a;\n if (u_hitDetection > 0) {\n if (gl_FragColor.a < 0.1) { discard; };\n gl_FragColor = v_hitColor;\n }\n}`;\n }\n}\n", "/**\n * @module ol/render/webgl/MixedGeometryBatch\n */\nimport {inflateEnds} from '../../geom/flat/orient.js';\nimport RenderFeature from '../../render/Feature.js';\nimport {getUid} from '../../util.js';\n\n/**\n * @typedef {import(\"../../Feature.js\").default} Feature\n */\n/**\n * @typedef {import(\"../../geom/Geometry.js\").Type} GeometryType\n */\n\n/**\n * @typedef {Object} GeometryBatchItem Object that holds a reference to a feature as well as the raw coordinates of its various geometries\n * @property {Feature|RenderFeature} feature Feature\n * @property {Array<Array<number>>} flatCoordss Array of flat coordinates arrays, one for each geometry related to the feature\n * @property {number} [verticesCount] Only defined for linestring and polygon batches\n * @property {number} [ringsCount] Only defined for polygon batches\n * @property {Array<Array<number>>} [ringsVerticesCounts] Array of vertices counts in each ring for each geometry; only defined for polygons batches\n * @property {number} [ref] The reference in the global batch (used for hit detection)\n */\n\n/**\n * @typedef {PointGeometryBatch|LineStringGeometryBatch|PolygonGeometryBatch} GeometryBatch\n */\n\n/**\n * @typedef {Object} PolygonGeometryBatch A geometry batch specific to polygons\n * @property {Object<string, GeometryBatchItem>} entries Dictionary of all entries in the batch with associated computed values.\n * One entry corresponds to one feature. Key is feature uid.\n * @property {number} geometriesCount Amount of geometries in the batch.\n * @property {number} verticesCount Amount of vertices from geometries in the batch.\n * @property {number} ringsCount How many outer and inner rings in this batch.\n */\n\n/**\n * @typedef {Object} LineStringGeometryBatch A geometry batch specific to lines\n * @property {Object<string, GeometryBatchItem>} entries Dictionary of all entries in the batch with associated computed values.\n * One entry corresponds to one feature. Key is feature uid.\n * @property {number} geometriesCount Amount of geometries in the batch.\n * @property {number} verticesCount Amount of vertices from geometries in the batch.\n */\n\n/**\n * @typedef {Object} PointGeometryBatch A geometry batch specific to points\n * @property {Object<string, GeometryBatchItem>} entries Dictionary of all entries in the batch with associated computed values.\n * One entry corresponds to one feature. Key is feature uid.\n * @property {number} geometriesCount Amount of geometries in the batch.\n */\n\n/**\n * @classdesc This class is used to group several geometries of various types together for faster rendering.\n * Three inner batches are maintained for polygons, lines and points. Each time a feature is added, changed or removed\n * from the batch, these inner batches are modified accordingly in order to keep them up-to-date.\n *\n * A feature can be present in several inner batches, for example a polygon geometry will be present in the polygon batch\n * and its linear rings will be present in the line batch. Multi geometries are also broken down into individual geometries\n * and added to the corresponding batches in a recursive manner.\n *\n * Corresponding {@link module:ol/render/webgl/BatchRenderer} instances are then used to generate the render instructions\n * and WebGL buffers (vertices and indices) for each inner batches; render instructions are stored on the inner batches,\n * alongside the transform used to convert world coords to screen coords at the time these instructions were generated.\n * The resulting WebGL buffers are stored on the batches as well.\n *\n * An important aspect of geometry batches is that there is no guarantee that render instructions and WebGL buffers\n * are synchronized, i.e. render instructions can describe a new state while WebGL buffers might not have been written yet.\n * This is why two world-to-screen transforms are stored on each batch: one for the render instructions and one for\n * the WebGL buffers.\n */\nclass MixedGeometryBatch {\n constructor() {\n /**\n * @private\n */\n this.globalCounter_ = 0;\n\n /**\n * Refs are used as keys for hit detection.\n * @type {Map<number, Feature|RenderFeature>}\n * @private\n */\n this.refToFeature_ = new Map();\n\n /**\n * Features are split in \"entries\", which are individual geometries. We use the following map to share a single ref for all those entries.\n * @type {Map<string, number>}\n * @private\n */\n this.uidToRef_ = new Map();\n\n /**\n * The precision in WebGL shaders is limited.\n * To keep the refs as small as possible we maintain an array of freed up references.\n * @type {Array<number>}\n * @private\n */\n this.freeGlobalRef_ = [];\n\n /**\n * @type {PolygonGeometryBatch}\n */\n this.polygonBatch = {\n entries: {},\n geometriesCount: 0,\n verticesCount: 0,\n ringsCount: 0,\n };\n\n /**\n * @type {PointGeometryBatch}\n */\n this.pointBatch = {\n entries: {},\n geometriesCount: 0,\n };\n\n /**\n * @type {LineStringGeometryBatch}\n */\n this.lineStringBatch = {\n entries: {},\n geometriesCount: 0,\n verticesCount: 0,\n };\n }\n\n /**\n * @param {Array<Feature|RenderFeature>} features Array of features to add to the batch\n * @param {import(\"../../proj.js\").TransformFunction} [projectionTransform] Projection transform.\n */\n addFeatures(features, projectionTransform) {\n for (let i = 0; i < features.length; i++) {\n this.addFeature(features[i], projectionTransform);\n }\n }\n\n /**\n * @param {Feature|RenderFeature} feature Feature to add to the batch\n * @param {import(\"../../proj.js\").TransformFunction} [projectionTransform] Projection transform.\n */\n addFeature(feature, projectionTransform) {\n let geometry = feature.getGeometry();\n if (!geometry) {\n return;\n }\n if (projectionTransform) {\n geometry = geometry.clone();\n geometry.applyTransform(projectionTransform);\n }\n this.addGeometry_(geometry, feature);\n }\n\n /**\n * @param {Feature|RenderFeature} feature Feature\n * @return {GeometryBatchItem|void} the cleared entry\n * @private\n */\n clearFeatureEntryInPointBatch_(feature) {\n const featureUid = getUid(feature);\n const entry = this.pointBatch.entries[featureUid];\n if (!entry) {\n return;\n }\n this.pointBatch.geometriesCount -= entry.flatCoordss.length;\n delete this.pointBatch.entries[featureUid];\n return entry;\n }\n\n /**\n * @param {Feature|RenderFeature} feature Feature\n * @return {GeometryBatchItem|void} the cleared entry\n * @private\n */\n clearFeatureEntryInLineStringBatch_(feature) {\n const featureUid = getUid(feature);\n const entry = this.lineStringBatch.entries[featureUid];\n if (!entry) {\n return;\n }\n this.lineStringBatch.verticesCount -= entry.verticesCount;\n this.lineStringBatch.geometriesCount -= entry.flatCoordss.length;\n delete this.lineStringBatch.entries[featureUid];\n return entry;\n }\n\n /**\n * @param {Feature|RenderFeature} feature Feature\n * @return {GeometryBatchItem|void} the cleared entry\n * @private\n */\n clearFeatureEntryInPolygonBatch_(feature) {\n const featureUid = getUid(feature);\n const entry = this.polygonBatch.entries[featureUid];\n if (!entry) {\n return;\n }\n this.polygonBatch.verticesCount -= entry.verticesCount;\n this.polygonBatch.ringsCount -= entry.ringsCount;\n this.polygonBatch.geometriesCount -= entry.flatCoordss.length;\n delete this.polygonBatch.entries[featureUid];\n return entry;\n }\n\n /**\n * @param {import(\"../../geom.js\").Geometry|RenderFeature} geometry Geometry\n * @param {Feature|RenderFeature} feature Feature\n * @private\n */\n addGeometry_(geometry, feature) {\n const type = geometry.getType();\n switch (type) {\n case 'GeometryCollection': {\n const geometries =\n /** @type {import(\"../../geom.js\").GeometryCollection} */ (\n geometry\n ).getGeometriesArray();\n for (const geometry of geometries) {\n this.addGeometry_(geometry, feature);\n }\n break;\n }\n case 'MultiPolygon': {\n const multiPolygonGeom =\n /** @type {import(\"../../geom.js\").MultiPolygon} */ (geometry);\n this.addCoordinates_(\n type,\n multiPolygonGeom.getFlatCoordinates(),\n multiPolygonGeom.getEndss(),\n feature,\n getUid(feature),\n multiPolygonGeom.getStride(),\n );\n break;\n }\n case 'MultiLineString': {\n const multiLineGeom =\n /** @type {import(\"../../geom.js\").MultiLineString|RenderFeature} */ (\n geometry\n );\n this.addCoordinates_(\n type,\n multiLineGeom.getFlatCoordinates(),\n multiLineGeom.getEnds(),\n feature,\n getUid(feature),\n multiLineGeom.getStride(),\n );\n break;\n }\n case 'MultiPoint': {\n const multiPointGeom =\n /** @type {import(\"../../geom.js\").MultiPoint|RenderFeature} */ (\n geometry\n );\n this.addCoordinates_(\n type,\n multiPointGeom.getFlatCoordinates(),\n null,\n feature,\n getUid(feature),\n multiPointGeom.getStride(),\n );\n break;\n }\n case 'Polygon': {\n const polygonGeom =\n /** @type {import(\"../../geom.js\").Polygon|RenderFeature} */ (\n geometry\n );\n this.addCoordinates_(\n type,\n polygonGeom.getFlatCoordinates(),\n polygonGeom.getEnds(),\n feature,\n getUid(feature),\n polygonGeom.getStride(),\n );\n break;\n }\n case 'Point': {\n const pointGeom = /** @type {import(\"../../geom.js\").Point} */ (\n geometry\n );\n this.addCoordinates_(\n type,\n pointGeom.getFlatCoordinates(),\n null,\n feature,\n getUid(feature),\n pointGeom.getStride(),\n );\n break;\n }\n case 'LineString':\n case 'LinearRing': {\n const lineGeom = /** @type {import(\"../../geom.js\").LineString} */ (\n geometry\n );\n\n const stride = lineGeom.getStride();\n\n this.addCoordinates_(\n type,\n lineGeom.getFlatCoordinates(),\n null,\n feature,\n getUid(feature),\n stride,\n lineGeom.getLayout?.(),\n );\n break;\n }\n default:\n // pass\n }\n }\n\n /**\n * @param {GeometryType} type Geometry type\n * @param {Array<number>} flatCoords Flat coordinates\n * @param {Array<number> | Array<Array<number>> | null} ends Coordinate ends\n * @param {Feature|RenderFeature} feature Feature\n * @param {string} featureUid Feature uid\n * @param {number} stride Stride\n * @param {import('../../geom/Geometry.js').GeometryLayout} [layout] Layout\n * @private\n */\n addCoordinates_(type, flatCoords, ends, feature, featureUid, stride, layout) {\n /** @type {number} */\n let verticesCount;\n switch (type) {\n case 'MultiPolygon': {\n const multiPolygonEndss = /** @type {Array<Array<number>>} */ (ends);\n for (let i = 0, ii = multiPolygonEndss.length; i < ii; i++) {\n let polygonEnds = multiPolygonEndss[i];\n const prevPolygonEnds = i > 0 ? multiPolygonEndss[i - 1] : null;\n const startIndex = prevPolygonEnds\n ? prevPolygonEnds[prevPolygonEnds.length - 1]\n : 0;\n const endIndex = polygonEnds[polygonEnds.length - 1];\n polygonEnds =\n startIndex > 0\n ? polygonEnds.map((end) => end - startIndex)\n : polygonEnds;\n this.addCoordinates_(\n 'Polygon',\n flatCoords.slice(startIndex, endIndex),\n polygonEnds,\n feature,\n featureUid,\n stride,\n layout,\n );\n }\n break;\n }\n case 'MultiLineString': {\n const multiLineEnds = /** @type {Array<number>} */ (ends);\n for (let i = 0, ii = multiLineEnds.length; i < ii; i++) {\n const startIndex = i > 0 ? multiLineEnds[i - 1] : 0;\n this.addCoordinates_(\n 'LineString',\n flatCoords.slice(startIndex, multiLineEnds[i]),\n null,\n feature,\n featureUid,\n stride,\n layout,\n );\n }\n break;\n }\n case 'MultiPoint':\n for (let i = 0, ii = flatCoords.length; i < ii; i += stride) {\n this.addCoordinates_(\n 'Point',\n flatCoords.slice(i, i + 2),\n null,\n feature,\n featureUid,\n null,\n null,\n );\n }\n break;\n case 'Polygon': {\n const polygonEnds = /** @type {Array<number>} */ (ends);\n if (feature instanceof RenderFeature) {\n const multiPolygonEnds = inflateEnds(flatCoords, polygonEnds);\n if (multiPolygonEnds.length > 1) {\n this.addCoordinates_(\n 'MultiPolygon',\n flatCoords,\n multiPolygonEnds,\n feature,\n featureUid,\n stride,\n layout,\n );\n return;\n }\n }\n if (!this.polygonBatch.entries[featureUid]) {\n this.polygonBatch.entries[featureUid] = this.addRefToEntry_(\n featureUid,\n {\n feature: feature,\n flatCoordss: [],\n verticesCount: 0,\n ringsCount: 0,\n ringsVerticesCounts: [],\n },\n );\n }\n verticesCount = flatCoords.length / stride;\n const ringsCount = ends.length;\n const ringsVerticesCount = ends.map((end, ind, arr) =>\n ind > 0 ? (end - arr[ind - 1]) / stride : end / stride,\n );\n this.polygonBatch.verticesCount += verticesCount;\n this.polygonBatch.ringsCount += ringsCount;\n this.polygonBatch.geometriesCount++;\n this.polygonBatch.entries[featureUid].flatCoordss.push(\n getFlatCoordinatesXY(flatCoords, stride),\n );\n this.polygonBatch.entries[featureUid].ringsVerticesCounts.push(\n ringsVerticesCount,\n );\n this.polygonBatch.entries[featureUid].verticesCount += verticesCount;\n this.polygonBatch.entries[featureUid].ringsCount += ringsCount;\n for (let i = 0, ii = polygonEnds.length; i < ii; i++) {\n const startIndex = i > 0 ? polygonEnds[i - 1] : 0;\n this.addCoordinates_(\n 'LinearRing',\n flatCoords.slice(startIndex, polygonEnds[i]),\n null,\n feature,\n featureUid,\n stride,\n layout,\n );\n }\n break;\n }\n case 'Point':\n if (!this.pointBatch.entries[featureUid]) {\n this.pointBatch.entries[featureUid] = this.addRefToEntry_(\n featureUid,\n {\n feature: feature,\n flatCoordss: [],\n },\n );\n }\n this.pointBatch.geometriesCount++;\n this.pointBatch.entries[featureUid].flatCoordss.push(flatCoords);\n break;\n case 'LineString':\n case 'LinearRing':\n if (!this.lineStringBatch.entries[featureUid]) {\n this.lineStringBatch.entries[featureUid] = this.addRefToEntry_(\n featureUid,\n {\n feature: feature,\n flatCoordss: [],\n verticesCount: 0,\n },\n );\n }\n verticesCount = flatCoords.length / stride;\n this.lineStringBatch.verticesCount += verticesCount;\n this.lineStringBatch.geometriesCount++;\n this.lineStringBatch.entries[featureUid].flatCoordss.push(\n getFlatCoordinatesXYM(flatCoords, stride, layout),\n );\n this.lineStringBatch.entries[featureUid].verticesCount += verticesCount;\n break;\n default:\n // pass\n }\n }\n\n /**\n * @param {string} featureUid Feature uid\n * @param {GeometryBatchItem} entry The entry to add\n * @return {GeometryBatchItem} the added entry\n * @private\n */\n addRefToEntry_(featureUid, entry) {\n const currentRef = this.uidToRef_.get(featureUid);\n\n // the ref starts at 1 to distinguish from white color (no feature)\n const ref =\n currentRef || this.freeGlobalRef_.pop() || ++this.globalCounter_;\n entry.ref = ref;\n if (!currentRef) {\n this.refToFeature_.set(ref, entry.feature);\n this.uidToRef_.set(featureUid, ref);\n }\n return entry;\n }\n\n /**\n * Return a ref to the pool of available refs.\n * @param {number} ref the ref to return\n * @param {string} featureUid the feature uid\n * @private\n */\n removeRef_(ref, featureUid) {\n if (!ref) {\n throw new Error('This feature has no ref: ' + featureUid);\n }\n this.refToFeature_.delete(ref);\n this.uidToRef_.delete(featureUid);\n this.freeGlobalRef_.push(ref);\n }\n\n /**\n * @param {Feature|RenderFeature} feature Feature\n * @param {import(\"../../proj.js\").TransformFunction} [projectionTransform] Projection transform.\n */\n changeFeature(feature, projectionTransform) {\n // the feature is not present in the batch; do not add it to avoid unexpected behaviors\n if (!this.uidToRef_.get(getUid(feature))) {\n return;\n }\n this.removeFeature(feature);\n let geometry = feature.getGeometry();\n if (!geometry) {\n return;\n }\n if (projectionTransform) {\n geometry = geometry.clone();\n geometry.applyTransform(projectionTransform);\n }\n this.addGeometry_(geometry, feature);\n }\n\n /**\n * @param {Feature|RenderFeature} feature Feature\n */\n removeFeature(feature) {\n let entry = this.clearFeatureEntryInPointBatch_(feature);\n entry = this.clearFeatureEntryInPolygonBatch_(feature) || entry;\n entry = this.clearFeatureEntryInLineStringBatch_(feature) || entry;\n if (entry) {\n this.removeRef_(entry.ref, getUid(entry.feature));\n }\n }\n\n clear() {\n this.polygonBatch.entries = {};\n this.polygonBatch.geometriesCount = 0;\n this.polygonBatch.verticesCount = 0;\n this.polygonBatch.ringsCount = 0;\n this.lineStringBatch.entries = {};\n this.lineStringBatch.geometriesCount = 0;\n this.lineStringBatch.verticesCount = 0;\n this.pointBatch.entries = {};\n this.pointBatch.geometriesCount = 0;\n this.globalCounter_ = 0;\n this.freeGlobalRef_ = [];\n this.refToFeature_.clear();\n this.uidToRef_.clear();\n }\n\n /**\n * Resolve the feature associated to a ref.\n * @param {number} ref Hit detected ref\n * @return {Feature|RenderFeature} feature\n */\n getFeatureFromRef(ref) {\n return this.refToFeature_.get(ref);\n }\n\n isEmpty() {\n return this.globalCounter_ === 0;\n }\n\n /**\n * Will return a new instance of this class that only contains the features\n * for which the provided callback returned true\n * @param {function((Feature|RenderFeature)): boolean} featureFilter Feature filter callback\n * @return {MixedGeometryBatch} Filtered geometry batch\n */\n filter(featureFilter) {\n const filtered = new MixedGeometryBatch();\n filtered.globalCounter_ = this.globalCounter_;\n filtered.uidToRef_ = this.uidToRef_;\n filtered.refToFeature_ = this.refToFeature_;\n let empty = true;\n for (const feature of this.refToFeature_.values()) {\n if (featureFilter(feature)) {\n filtered.addFeature(feature);\n empty = false;\n }\n }\n // no feature was added at all; simply return an empty batch for consistency downstream\n if (empty) {\n return new MixedGeometryBatch();\n }\n return filtered;\n }\n}\n\n/**\n * @param {Array<number>} flatCoords Flat coords\n * @param {number} stride Stride\n * @return {Array<number>} Flat coords with only XY components\n */\nfunction getFlatCoordinatesXY(flatCoords, stride) {\n if (stride === 2) {\n return flatCoords;\n }\n return flatCoords.filter((v, i) => i % stride < 2);\n}\n\n/**\n * @param {Array<number>} flatCoords Flat coords\n * @param {number} stride Stride\n * @param {string} layout Layout\n * @return {Array<number>} Flat coords with only XY components\n */\nfunction getFlatCoordinatesXYM(flatCoords, stride, layout) {\n if (stride === 3 && layout === 'XYM') {\n return flatCoords;\n }\n // this is XYZM layout\n if (stride === 4) {\n return flatCoords.filter((v, i) => i % stride !== 2);\n }\n // this is XYZ layout\n if (stride === 3) {\n return flatCoords.map((v, i) => (i % stride !== 2 ? v : 0));\n }\n // this is XY layout\n return new Array(flatCoords.length * 1.5)\n .fill(0)\n .map((v, i) => (i % 3 === 2 ? 0 : flatCoords[Math.round(i / 1.5)]));\n}\n\nexport default MixedGeometryBatch;\n", "\n export function create() {\n const source = \"function t(t,n,x=2){const o=n&&n.length,i=o?n[0]*x:t.length;let f=e(t,0,i,x,!0);const l=[];if(!f||f.next===f.prev)return l;let c,y,h;if(o&&(f=function(t,n,r,x){const o=[];for(let r=0,i=n.length;r<i;r++){const f=e(t,n[r]*x,r<i-1?n[r+1]*x:t.length,x,!1);f===f.next&&(f.steiner=!0),o.push(a(f))}o.sort(u);for(let t=0;t<o.length;t++)r=s(o[t],r);return r}(t,n,f,x)),t.length>80*x){c=t[0],y=t[1];let e=c,n=y;for(let r=x;r<i;r+=x){const x=t[r],o=t[r+1];x<c&&(c=x),o<y&&(y=o),x>e&&(e=x),o>n&&(n=o)}h=Math.max(e-c,n-y),h=0!==h?32767/h:0}return r(f,l,x,c,y,h,0),l}function e(t,e,n,r,x){let o;if(x===function(t,e,n,r){let x=0;for(let o=e,i=n-r;o<n;o+=r)x+=(t[i]-t[o])*(t[o+1]+t[i+1]),i=o;return x}(t,e,n,r)>0)for(let x=e;x<n;x+=r)o=d(x/r|0,t[x],t[x+1],o);else for(let x=n-r;x>=e;x-=r)o=d(x/r|0,t[x],t[x+1],o);return o&&b(o,o.next)&&(w(o),o=o.next),o}function n(t,e){if(!t)return t;e||(e=t);let n,r=t;do{if(n=!1,r.steiner||!b(r,r.next)&&0!==v(r.prev,r,r.next))r=r.next;else{if(w(r),r=e=r.prev,r===r.next)break;n=!0}}while(n||r!==e);return e}function r(t,e,u,s,l,a,y){if(!t)return;!y&&a&&function(t,e,n,r){let x=t;do{0===x.z&&(x.z=c(x.x,x.y,e,n,r)),x.prevZ=x.prev,x.nextZ=x.next,x=x.next}while(x!==t);x.prevZ.nextZ=null,x.prevZ=null,function(t){let e,n=1;do{let r,x=t;t=null;let o=null;for(e=0;x;){e++;let i=x,f=0;for(let t=0;t<n&&(f++,i=i.nextZ,i);t++);let u=n;for(;f>0||u>0&&i;)0!==f&&(0===u||!i||x.z<=i.z)?(r=x,x=x.nextZ,f--):(r=i,i=i.nextZ,u--),o?o.nextZ=r:t=r,r.prevZ=o,o=r;x=i}o.nextZ=null,n*=2}while(e>1)}(x)}(t,s,l,a);let h=t;for(;t.prev!==t.next;){const c=t.prev,p=t.next;if(a?o(t,s,l,a):x(t))e.push(c.i,t.i,p.i),w(t),t=p.next,h=p.next;else if((t=p)===h){y?1===y?r(t=i(n(t),e),e,u,s,l,a,2):2===y&&f(t,e,u,s,l,a):r(n(t),e,u,s,l,a,1);break}}}function x(t){const e=t.prev,n=t,r=t.next;if(v(e,n,r)>=0)return!1;const x=e.x,o=n.x,i=r.x,f=e.y,u=n.y,s=r.y,l=Math.min(x,o,i),c=Math.min(f,u,s),a=Math.max(x,o,i),y=Math.max(f,u,s);let p=r.next;for(;p!==e;){if(p.x>=l&&p.x<=a&&p.y>=c&&p.y<=y&&h(x,f,o,u,i,s,p.x,p.y)&&v(p.prev,p,p.next)>=0)return!1;p=p.next}return!0}function o(t,e,n,r){const x=t.prev,o=t,i=t.next;if(v(x,o,i)>=0)return!1;const f=x.x,u=o.x,s=i.x,l=x.y,a=o.y,y=i.y,p=Math.min(f,u,s),b=Math.min(l,a,y),M=Math.max(f,u,s),m=Math.max(l,a,y),A=c(p,b,e,n,r),g=c(M,m,e,n,r);let Z=t.prevZ,d=t.nextZ;for(;Z&&Z.z>=A&&d&&d.z<=g;){if(Z.x>=p&&Z.x<=M&&Z.y>=b&&Z.y<=m&&Z!==x&&Z!==i&&h(f,l,u,a,s,y,Z.x,Z.y)&&v(Z.prev,Z,Z.next)>=0)return!1;if(Z=Z.prevZ,d.x>=p&&d.x<=M&&d.y>=b&&d.y<=m&&d!==x&&d!==i&&h(f,l,u,a,s,y,d.x,d.y)&&v(d.prev,d,d.next)>=0)return!1;d=d.nextZ}for(;Z&&Z.z>=A;){if(Z.x>=p&&Z.x<=M&&Z.y>=b&&Z.y<=m&&Z!==x&&Z!==i&&h(f,l,u,a,s,y,Z.x,Z.y)&&v(Z.prev,Z,Z.next)>=0)return!1;Z=Z.prevZ}for(;d&&d.z<=g;){if(d.x>=p&&d.x<=M&&d.y>=b&&d.y<=m&&d!==x&&d!==i&&h(f,l,u,a,s,y,d.x,d.y)&&v(d.prev,d,d.next)>=0)return!1;d=d.nextZ}return!0}function i(t,e){let r=t;do{const n=r.prev,x=r.next.next;!b(n,x)&&M(n,r,r.next,x)&&g(n,x)&&g(x,n)&&(e.push(n.i,r.i,x.i),w(r),w(r.next),r=t=x),r=r.next}while(r!==t);return n(r)}function f(t,e,x,o,i,f){let u=t;do{let t=u.next.next;for(;t!==u.prev;){if(u.i!==t.i&&p(u,t)){let s=Z(u,t);return u=n(u,u.next),s=n(s,s.next),r(u,e,x,o,i,f,0),void r(s,e,x,o,i,f,0)}t=t.next}u=u.next}while(u!==t)}function u(t,e){let n=t.x-e.x;if(0===n&&(n=t.y-e.y,0===n)){n=(t.next.y-t.y)/(t.next.x-t.x)-(e.next.y-e.y)/(e.next.x-e.x)}return n}function s(t,e){const r=function(t,e){let n=e;const r=t.x,x=t.y;let o,i=-1/0;if(b(t,n))return n;do{if(b(t,n.next))return n.next;if(x<=n.y&&x>=n.next.y&&n.next.y!==n.y){const t=n.x+(x-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(t<=r&&t>i&&(i=t,o=n.x<n.next.x?n:n.next,t===r))return o}n=n.next}while(n!==e);if(!o)return null;const f=o,u=o.x,s=o.y;let c=1/0;n=o;do{if(r>=n.x&&n.x>=u&&r!==n.x&&y(x<s?r:i,x,u,s,x<s?i:r,x,n.x,n.y)){const e=Math.abs(x-n.y)/(r-n.x);g(n,t)&&(e<c||e===c&&(n.x>o.x||n.x===o.x&&l(o,n)))&&(o=n,c=e)}n=n.next}while(n!==f);return o}(t,e);if(!r)return e;const x=Z(r,t);return n(x,x.next),n(r,r.next)}function l(t,e){return v(t.prev,t,e.prev)<0&&v(e.next,t,t.next)<0}function c(t,e,n,r,x){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=(t-n)*x|0)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=(e-r)*x|0)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function a(t){let e=t,n=t;do{(e.x<n.x||e.x===n.x&&e.y<n.y)&&(n=e),e=e.next}while(e!==t);return n}function y(t,e,n,r,x,o,i,f){return(x-i)*(e-f)>=(t-i)*(o-f)&&(t-i)*(r-f)>=(n-i)*(e-f)&&(n-i)*(o-f)>=(x-i)*(r-f)}function h(t,e,n,r,x,o,i,f){return!(t===i&&e===f)&&y(t,e,n,r,x,o,i,f)}function p(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){let n=t;do{if(n.i!==t.i&&n.next.i!==t.i&&n.i!==e.i&&n.next.i!==e.i&&M(n,n.next,t,e))return!0;n=n.next}while(n!==t);return!1}(t,e)&&(g(t,e)&&g(e,t)&&function(t,e){let n=t,r=!1;const x=(t.x+e.x)/2,o=(t.y+e.y)/2;do{n.y>o!=n.next.y>o&&n.next.y!==n.y&&x<(n.next.x-n.x)*(o-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next}while(n!==t);return r}(t,e)&&(v(t.prev,t,e.prev)||v(t,e.prev,e))||b(t,e)&&v(t.prev,t,t.next)>0&&v(e.prev,e,e.next)>0)}function v(t,e,n){return(e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y)}function b(t,e){return t.x===e.x&&t.y===e.y}function M(t,e,n,r){const x=A(v(t,e,n)),o=A(v(t,e,r)),i=A(v(n,r,t)),f=A(v(n,r,e));return x!==o&&i!==f||(!(0!==x||!m(t,n,e))||(!(0!==o||!m(t,r,e))||(!(0!==i||!m(n,t,r))||!(0!==f||!m(n,e,r)))))}function m(t,e,n){return e.x<=Math.max(t.x,n.x)&&e.x>=Math.min(t.x,n.x)&&e.y<=Math.max(t.y,n.y)&&e.y>=Math.min(t.y,n.y)}function A(t){return t>0?1:t<0?-1:0}function g(t,e){return v(t.prev,t,t.next)<0?v(t,e,t.next)>=0&&v(t,t.prev,e)>=0:v(t,e,t.prev)<0||v(t,t.next,e)<0}function Z(t,e){const n=F(t.i,t.x,t.y),r=F(e.i,e.x,e.y),x=t.next,o=e.prev;return t.next=e,e.prev=t,n.next=x,x.prev=n,r.next=n,n.prev=r,o.next=r,r.prev=o,r}function d(t,e,n,r){const x=F(t,e,n);return r?(x.next=r.next,x.prev=r,r.next.prev=x,r.next=x):(x.prev=x,x.next=x),x}function w(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function F(t,e,n){return{i:t,x:e,y:n,prev:null,next:null,z:0,prevZ:null,nextZ:null,steiner:!1}}function E(t,e,n){const r=Math.sqrt((e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1])),x=[(e[0]-t[0])/r,(e[1]-t[1])/r],o=[-x[1],x[0]],i=Math.sqrt((n[0]-t[0])*(n[0]-t[0])+(n[1]-t[1])*(n[1]-t[1])),f=[(n[0]-t[0])/i,(n[1]-t[1])/i];let u=0===r||0===i?0:Math.acos((s=f[0]*x[0]+f[1]*x[1],l=-1,c=1,Math.min(Math.max(s,l),c)));var s,l,c;u=Math.max(u,1e-5);return f[0]*o[0]+f[1]*o[1]>0?u:2*Math.PI-u}function I(t,e){const n=e[0],r=e[1];return e[0]=t[0]*n+t[2]*r+t[4],e[1]=t[1]*n+t[3]*r+t[5],e}function z(t,e){const n=(r=e)[0]*r[3]-r[1]*r[2];var r;!function(t,e){if(!t)throw new Error(e)}(0!==n,\\\"Transformation matrix cannot be inverted\\\");const x=e[0],o=e[1],i=e[2],f=e[3],u=e[4],s=e[5];return t[0]=f/n,t[1]=-o/n,t[2]=-i/n,t[3]=x/n,t[4]=(i*s-f*u)/n,t[5]=-(x*s-o*u)/n,t}new Array(6);const B=[],P={vertexAttributesPosition:0,instanceAttributesPosition:0,indicesPosition:0};function N(t,e,n,r,x){const o=t[e++],i=t[e++],f=B;f.length=r;for(let n=0;n<f.length;n++)f[n]=t[e+n];let u=x?x.instanceAttributesPosition:0;return n[u++]=o,n[u++]=i,f.length&&(n.set(f,u),u+=f.length),P.instanceAttributesPosition=u,P}function R(t,e,n,r,x,o,i,f,u,s){const l=[t[e],t[e+1]],c=[t[n],t[n+1]],a=t[e+2],y=t[n+2],h=I(f,[...l]),p=I(f,[...c]);let v=-1,b=-1,M=s;const m=null!==x;if(null!==r){v=E(h,p,I(f,[...[t[r],t[r+1]]])),Math.cos(v)<=.985&&(M+=Math.tan((v-Math.PI)/2))}if(m){b=E(p,h,I(f,[...[t[x],t[x+1]]])),Math.cos(b)<=.985&&(M+=Math.tan((Math.PI-b)/2))}const A=Math.pow(2,24),g=u%A,Z=Math.floor(u/A)*A;return o.push(l[0],l[1],a,c[0],c[1],y,v,b,g,Z,s),o.push(...i),{length:u+Math.sqrt((p[0]-h[0])*(p[0]-h[0])+(p[1]-h[1])*(p[1]-h[1])),angle:M}}function S(e,n,r,x,o){const i=2+o;let f=n;const u=e.slice(f,f+o);f+=o;const s=e[f++];let l=0;const c=new Array(s-1);for(let t=0;t<s;t++)l+=e[f++],t<s-1&&(c[t]=l);const a=e.slice(f,f+2*l),y=t(a,c,2);for(let t=0;t<y.length;t++)x.push(y[t]+r.length/i);for(let t=0;t<a.length;t+=2)r.push(a[t],a[t+1],...u);return f+2*l}const T=\\\"GENERATE_POLYGON_BUFFERS\\\",_=\\\"GENERATE_POINT_BUFFERS\\\",O=\\\"GENERATE_LINE_STRING_BUFFERS\\\",U=self;U.onmessage=t=>{const e=t.data;switch(e.type){case _:{const t=2,n=2,r=e.customAttributesSize,x=n+r,o=new Float32Array(e.renderInstructions),i=o.length/x*(t+r),f=Uint32Array.from([0,1,3,1,2,3]),u=Float32Array.from([-1,-1,1,-1,1,1,-1,1]),s=new Float32Array(i);let l;for(let t=0;t<o.length;t+=x)l=N(o,t,s,r,l);const c=Object.assign({indicesBuffer:f.buffer,vertexAttributesBuffer:u.buffer,instanceAttributesBuffer:s.buffer,renderInstructions:o.buffer},e);U.postMessage(c,[u.buffer,s.buffer,f.buffer,o.buffer]);break}case O:{const t=[],n=e.customAttributesSize,r=3,x=new Float32Array(e.renderInstructions);let o=0;const i=[1,0,0,1,0,0];let f,u;for(z(i,e.renderInstructionsTransform);o<x.length;){u=Array.from(x.slice(o,o+n)),o+=n,f=x[o++];const e=o,s=o+(f-1)*r,l=x[e]===x[s]&&x[e+1]===x[s+1];let c=0,a=0;for(let n=0;n<f-1;n++){let y=null;n>0?y=o+(n-1)*r:l&&(y=s-r);let h=null;n<f-2?h=o+(n+2)*r:l&&(h=e+r);const p=R(x,o+n*r,o+(n+1)*r,y,h,t,u,i,c,a);c=p.length,a=p.angle}o+=f*r}const s=Uint32Array.from([0,1,3,1,2,3]),l=Float32Array.from([-1,-1,1,-1,1,1,-1,1]),c=Float32Array.from(t),a=Object.assign({indicesBuffer:s.buffer,vertexAttributesBuffer:l.buffer,instanceAttributesBuffer:c.buffer,renderInstructions:x.buffer},e);U.postMessage(a,[l.buffer,c.buffer,s.buffer,x.buffer]);break}case T:{const t=[],n=[],r=e.customAttributesSize,x=new Float32Array(e.renderInstructions);let o=0;for(;o<x.length;)o=S(x,o,t,n,r);const i=Uint32Array.from(n),f=Float32Array.from(t),u=Float32Array.from([]),s=Object.assign({indicesBuffer:i.buffer,vertexAttributesBuffer:f.buffer,instanceAttributesBuffer:u.buffer,renderInstructions:x.buffer},e);U.postMessage(s,[f.buffer,u.buffer,i.buffer,x.buffer]);break}}};\";\n return new Worker(typeof Blob === 'undefined'\n ? 'data:application/javascript;base64,' + Buffer.from(source, 'binary').toString('base64')\n : URL.createObjectURL(new Blob([source], {type: 'application/javascript'})));\n }\n \n", "/**\n * @module ol/render/webgl/constants\n */\n\n/**\n * @enum {string}\n */\nexport const WebGLWorkerMessageType = {\n GENERATE_POLYGON_BUFFERS: 'GENERATE_POLYGON_BUFFERS',\n GENERATE_POINT_BUFFERS: 'GENERATE_POINT_BUFFERS',\n GENERATE_LINE_STRING_BUFFERS: 'GENERATE_LINE_STRING_BUFFERS',\n};\n\n/**\n * @typedef {Object} WebGLWorkerGenerateBuffersMessage\n * This message will trigger the generation of a vertex and an index buffer based on the given render instructions.\n * When the buffers are generated, the worked will send a message of the same type to the main thread, with\n * the generated buffers in it.\n * Note that any addition properties present in the message *will* be sent back to the main thread.\n * @property {number} id Message id; will be used both in request and response as a means of identification\n * @property {WebGLWorkerMessageType} type Message type\n * @property {ArrayBufferLike} renderInstructions render instructions raw binary buffer.\n * @property {number} [customAttributesSize] Amount of hit detection + custom attributes count in the render instructions.\n * @property {ArrayBuffer} [indicesBuffer] Indices array raw binary buffer (sent by the worker).\n * @property {ArrayBuffer} [vertexAttributesBuffer] Vertex attributes array raw binary buffer (sent by the worker).\n * @property {ArrayBuffer} [instanceAttributesBuffer] Instance attributes array raw binary buffer (sent by the worker).\n * @property {import(\"../../transform\").Transform} [renderInstructionsTransform] Transformation matrix used to project the instructions coordinates\n */\n", "/**\n * Utilities for encoding/decoding values to be used in shaders\n * @module ol/render/webgl/encodeUtil\n */\n\n/**\n * Generates a color array based on a numerical id, and pack it just like the `packColor` function of 'ol/render/webgl/compileUtil.js'.\n * Note: the range for each component is 0 to 1 with 256 steps\n * @param {number} id Id\n * @param {Array<number>} [array] Reusable array\n * @return {Array<number>} Packed color array with two components\n */\nexport function colorEncodeIdAndPack(id, array) {\n array = array || [];\n const radix = 256;\n const divide = radix - 1;\n const r = Math.floor(id / radix / radix / radix) / divide;\n const g = (Math.floor(id / radix / radix) % radix) / divide;\n const b = (Math.floor(id / radix) % radix) / divide;\n const a = (id % radix) / divide;\n array[0] = r * 256 * 255 + g * 255;\n array[1] = b * 256 * 255 + a * 255;\n return array;\n}\n\n/**\n * Reads an id from a color-encoded array\n * Note: the expected range for each component is 0 to 1 with 256 steps.\n * @param {Array<number>} color Color array containing the encoded id; color components are in the range 0 to 1\n * @return {number} Decoded id\n */\nexport function colorDecodeId(color) {\n let id = 0;\n const radix = 256;\n const mult = radix - 1;\n id += Math.round(color[0] * radix * radix * radix * mult);\n id += Math.round(color[1] * radix * radix * mult);\n id += Math.round(color[2] * radix * mult);\n id += Math.round(color[3] * mult);\n return id;\n}\n", "/**\n * @module ol/render/webgl/renderinstructions\n */\nimport {UNDEFINED_PROP_VALUE} from '../../expr/gpu.js';\nimport {transform2D} from '../../geom/flat/transform.js';\nimport {apply as applyTransform} from '../../transform.js';\n\n/**\n * @param {Float32Array} renderInstructions Render instructions\n * @param {import('./VectorStyleRenderer.js').AttributeDefinitions} customAttributes Custom attributes\n * @param {import(\"./MixedGeometryBatch.js\").GeometryBatchItem} batchEntry Batch item\n * @param {number} currentIndex Current index\n * @return {number} The amount of values pushed\n */\nfunction pushCustomAttributesInRenderInstructions(\n renderInstructions,\n customAttributes,\n batchEntry,\n currentIndex,\n) {\n let shift = 0;\n for (const key in customAttributes) {\n const attr = customAttributes[key];\n const value = attr.callback.call(batchEntry, batchEntry.feature);\n let first = value?.[0] ?? value;\n if (first === UNDEFINED_PROP_VALUE) {\n console.warn('The \"has\" operator might return false positives.'); // eslint-disable-line no-console\n }\n if (first === undefined) {\n first = UNDEFINED_PROP_VALUE;\n } else if (first === null) {\n first = 0;\n }\n renderInstructions[currentIndex + shift++] = first;\n if (!attr.size || attr.size === 1) {\n continue;\n }\n renderInstructions[currentIndex + shift++] = value[1];\n if (attr.size < 3) {\n continue;\n }\n renderInstructions[currentIndex + shift++] = value[2];\n if (attr.size < 4) {\n continue;\n }\n renderInstructions[currentIndex + shift++] = value[3];\n }\n return shift;\n}\n\n/**\n * @param {import('./VectorStyleRenderer.js').AttributeDefinitions} customAttributes Custom attributes\n * @return {number} Cumulated size of all attributes\n */\nexport function getCustomAttributesSize(customAttributes) {\n return Object.keys(customAttributes).reduce(\n (prev, curr) => prev + (customAttributes[curr].size || 1),\n 0,\n );\n}\n\n/**\n * Render instructions for lines are structured like so:\n * [ x0, y0, customAttr0, ... , xN, yN, customAttrN ]\n * @param {import(\"./MixedGeometryBatch.js\").PointGeometryBatch} batch Point geometry batch\n * @param {Float32Array} renderInstructions Render instructions\n * @param {import('./VectorStyleRenderer.js').AttributeDefinitions} customAttributes Custom attributes\n * @param {import(\"../../transform.js\").Transform} transform Transform to apply to coordinates\n * @return {Float32Array} Generated render instructions\n */\nexport function generatePointRenderInstructions(\n batch,\n renderInstructions,\n customAttributes,\n transform,\n) {\n // here we anticipate the amount of render instructions for points:\n // 2 instructions per vertex for position (x and y)\n // + 1 instruction per vertex per custom attributes\n const totalInstructionsCount =\n (2 + getCustomAttributesSize(customAttributes)) * batch.geometriesCount;\n if (\n !renderInstructions ||\n renderInstructions.length !== totalInstructionsCount\n ) {\n renderInstructions = new Float32Array(totalInstructionsCount);\n }\n\n // loop on features to fill the render instructions\n const tmpCoords = [];\n let renderIndex = 0;\n for (const featureUid in batch.entries) {\n const batchEntry = batch.entries[featureUid];\n for (let i = 0, ii = batchEntry.flatCoordss.length; i < ii; i++) {\n tmpCoords[0] = batchEntry.flatCoordss[i][0];\n tmpCoords[1] = batchEntry.flatCoordss[i][1];\n applyTransform(transform, tmpCoords);\n\n renderInstructions[renderIndex++] = tmpCoords[0];\n renderInstructions[renderIndex++] = tmpCoords[1];\n renderIndex += pushCustomAttributesInRenderInstructions(\n renderInstructions,\n customAttributes,\n batchEntry,\n renderIndex,\n );\n }\n }\n return renderInstructions;\n}\n\n/**\n * Render instructions for lines are structured like so:\n * [ customAttr0, ... , customAttrN, numberOfVertices0, x0, y0, ... , xN, yN, numberOfVertices1, ... ]\n * @param {import(\"./MixedGeometryBatch.js\").LineStringGeometryBatch} batch Line String geometry batch\n * @param {Float32Array} renderInstructions Render instructions\n * @param {import('./VectorStyleRenderer.js').AttributeDefinitions} customAttributes Custom attributes\n * @param {import(\"../../transform.js\").Transform} transform Transform to apply to coordinates\n * @return {Float32Array} Generated render instructions\n */\nexport function generateLineStringRenderInstructions(\n batch,\n renderInstructions,\n customAttributes,\n transform,\n) {\n // here we anticipate the amount of render instructions for lines:\n // 3 instructions per vertex for position (x, y and m)\n // + 1 instruction per line per custom attributes\n // + 1 instruction per line (for vertices count)\n const totalInstructionsCount =\n 3 * batch.verticesCount +\n (1 + getCustomAttributesSize(customAttributes)) * batch.geometriesCount;\n if (\n !renderInstructions ||\n renderInstructions.length !== totalInstructionsCount\n ) {\n renderInstructions = new Float32Array(totalInstructionsCount);\n }\n\n // loop on features to fill the render instructions\n const flatCoords = [];\n let renderIndex = 0;\n for (const featureUid in batch.entries) {\n const batchEntry = batch.entries[featureUid];\n for (let i = 0, ii = batchEntry.flatCoordss.length; i < ii; i++) {\n flatCoords.length = batchEntry.flatCoordss[i].length;\n transform2D(\n batchEntry.flatCoordss[i],\n 0,\n flatCoords.length,\n 3,\n transform,\n flatCoords,\n 3,\n );\n renderIndex += pushCustomAttributesInRenderInstructions(\n renderInstructions,\n customAttributes,\n batchEntry,\n renderIndex,\n );\n\n // vertices count\n renderInstructions[renderIndex++] = flatCoords.length / 3;\n\n // looping on points for positions\n for (let j = 0, jj = flatCoords.length; j < jj; j += 3) {\n renderInstructions[renderIndex++] = flatCoords[j];\n renderInstructions[renderIndex++] = flatCoords[j + 1];\n renderInstructions[renderIndex++] = flatCoords[j + 2];\n }\n }\n }\n return renderInstructions;\n}\n\n/**\n * Render instructions for polygons are structured like so:\n * [ customAttr0, ..., customAttrN, numberOfRings, numberOfVerticesInRing0, ..., numberOfVerticesInRingN, x0, y0, ..., xN, yN, numberOfRings,... ]\n * @param {import(\"./MixedGeometryBatch.js\").PolygonGeometryBatch} batch Polygon geometry batch\n * @param {Float32Array} renderInstructions Render instructions\n * @param {import('./VectorStyleRenderer.js').AttributeDefinitions} customAttributes Custom attributes\n * @param {import(\"../../transform.js\").Transform} transform Transform to apply to coordinates\n * @return {Float32Array} Generated render instructions\n */\nexport function generatePolygonRenderInstructions(\n batch,\n renderInstructions,\n customAttributes,\n transform,\n) {\n // here we anticipate the amount of render instructions for polygons:\n // 2 instructions per vertex for position (x and y)\n // + 1 instruction per polygon per custom attributes\n // + 1 instruction per polygon (for vertices count in polygon)\n // + 1 instruction per ring (for vertices count in ring)\n const totalInstructionsCount =\n 2 * batch.verticesCount +\n (1 + getCustomAttributesSize(customAttributes)) * batch.geometriesCount +\n batch.ringsCount;\n if (\n !renderInstructions ||\n renderInstructions.length !== totalInstructionsCount\n ) {\n renderInstructions = new Float32Array(totalInstructionsCount);\n }\n\n // loop on features to fill the render instructions\n const flatCoords = [];\n let renderIndex = 0;\n for (const featureUid in batch.entries) {\n const batchEntry = batch.entries[featureUid];\n for (let i = 0, ii = batchEntry.flatCoordss.length; i < ii; i++) {\n flatCoords.length = batchEntry.flatCoordss[i].length;\n transform2D(\n batchEntry.flatCoordss[i],\n 0,\n flatCoords.length,\n 2,\n transform,\n flatCoords,\n );\n renderIndex += pushCustomAttributesInRenderInstructions(\n renderInstructions,\n customAttributes,\n batchEntry,\n renderIndex,\n );\n\n // ring count\n renderInstructions[renderIndex++] =\n batchEntry.ringsVerticesCounts[i].length;\n\n // vertices count in each ring\n for (\n let j = 0, jj = batchEntry.ringsVerticesCounts[i].length;\n j < jj;\n j++\n ) {\n renderInstructions[renderIndex++] =\n batchEntry.ringsVerticesCounts[i][j];\n }\n\n // looping on points for positions\n for (let j = 0, jj = flatCoords.length; j < jj; j += 2) {\n renderInstructions[renderIndex++] = flatCoords[j];\n renderInstructions[renderIndex++] = flatCoords[j + 1];\n }\n }\n }\n return renderInstructions;\n}\n", "/**\n * Utilities for parsing flat styles for WebGL renderers\n * @module ol/render/webgl/style\n */\nimport {assert} from '../../asserts.js';\nimport {\n BooleanType,\n ColorType,\n NumberArrayType,\n NumberType,\n SizeType,\n StringType,\n computeGeometryType,\n} from '../../expr/expression.js';\nimport {\n FEATURE_ID_PROPERTY_NAME,\n GEOMETRY_TYPE_PROPERTY_NAME,\n getStringNumberEquivalent,\n newCompilationContext,\n stringToGlsl,\n} from '../../expr/gpu.js';\nimport {ShaderBuilder} from './ShaderBuilder.js';\nimport {\n applyContextToBuilder,\n expressionToGlsl,\n generateAttributesFromContext,\n generateUniformsFromContext,\n getGlslSizeFromType,\n getGlslTypeFromType,\n} from './compileUtil.js';\n\n/**\n * see https://stackoverflow.com/questions/7616461/generate-a-hash-from-string-in-javascript\n * @param {Object|string} input The hash input, either an object or string\n * @return {string} Hash (if the object cannot be serialized, it is based on `getUid`)\n */\nexport function computeHash(input) {\n const hash = JSON.stringify(input)\n .split('')\n .reduce((prev, curr) => (prev << 5) - prev + curr.charCodeAt(0), 0);\n return (hash >>> 0).toString();\n}\n\n/**\n * @param {import(\"../../style/flat.js\").FlatStyle} style Style\n * @param {ShaderBuilder} builder Shader builder\n * @param {import(\"../../expr/gpu.js\").CompilationContext} vertContext Vertex shader compilation context\n * @param {'shape-'|'circle-'|'icon-'} prefix Properties prefix\n */\nfunction parseCommonSymbolProperties(style, builder, vertContext, prefix) {\n if (`${prefix}radius` in style && prefix !== 'icon-') {\n let radius = expressionToGlsl(\n vertContext,\n style[`${prefix}radius`],\n NumberType,\n );\n if (`${prefix}radius2` in style) {\n const radius2 = expressionToGlsl(\n vertContext,\n style[`${prefix}radius2`],\n NumberType,\n );\n radius = `max(${radius}, ${radius2})`;\n }\n if (`${prefix}stroke-width` in style) {\n radius = `(${radius} + ${expressionToGlsl(\n vertContext,\n style[`${prefix}stroke-width`],\n NumberType,\n )} * 0.5)`;\n }\n builder.setSymbolSizeExpression(`vec2(${radius} * 2. + 0.5)`); // adding some padding for antialiasing\n }\n if (`${prefix}scale` in style) {\n const scale = expressionToGlsl(\n vertContext,\n style[`${prefix}scale`],\n SizeType,\n );\n builder.setSymbolSizeExpression(\n `${builder.getSymbolSizeExpression()} * ${scale}`,\n );\n }\n if (`${prefix}displacement` in style) {\n builder.setSymbolOffsetExpression(\n expressionToGlsl(\n vertContext,\n style[`${prefix}displacement`],\n NumberArrayType,\n ),\n );\n }\n if (`${prefix}rotation` in style) {\n builder.setSymbolRotationExpression(\n expressionToGlsl(vertContext, style[`${prefix}rotation`], NumberType),\n );\n }\n if (`${prefix}rotate-with-view` in style) {\n builder.setSymbolRotateWithView(!!style[`${prefix}rotate-with-view`]);\n }\n}\n\n/**\n * @param {string} distanceField The distance field expression\n * @param {string|null} fillColor The fill color expression; null if no fill\n * @param {string|null} strokeColor The stroke color expression; null if no stroke\n * @param {string|null} strokeWidth The stroke width expression; null if no stroke\n * @param {string|null} opacity The opacity expression; null if no stroke\n * @return {string} The final color expression, based on the distance field and given params\n */\nfunction getColorFromDistanceField(\n distanceField,\n fillColor,\n strokeColor,\n strokeWidth,\n opacity,\n) {\n let color = 'vec4(0.)';\n if (fillColor !== null) {\n color = fillColor;\n }\n if (strokeColor !== null && strokeWidth !== null) {\n const strokeFillRatio = `smoothstep(-${strokeWidth} + 0.63, -${strokeWidth} - 0.58, ${distanceField})`;\n color = `mix(${strokeColor}, ${color}, ${strokeFillRatio})`;\n }\n const shapeOpacity = `(1.0 - smoothstep(-0.63, 0.58, ${distanceField}))`;\n let result = `${color} * vec4(1.0, 1.0, 1.0, ${shapeOpacity})`;\n if (opacity !== null) {\n result = `${result} * vec4(1.0, 1.0, 1.0, ${opacity})`;\n }\n return result;\n}\n\n/**\n * This will parse an image property provided by `<prefix>-src`\n * The image size expression in GLSL will be returned\n * @param {import(\"../../style/flat.js\").FlatStyle} style Style\n * @param {ShaderBuilder} builder Shader builder\n * @param {Object<string,import(\"../../webgl/Helper\").UniformValue>} uniforms Uniforms\n * @param {'icon-'|'fill-pattern-'|'stroke-pattern-'} prefix Property prefix\n * @param {string} textureId A identifier that will be used in the generated uniforms: `sample2d u_texture<id>` and `vec2 u_texture<id>_size`\n * @return {string} The image size expression\n */\nfunction parseImageProperties(style, builder, uniforms, prefix, textureId) {\n const image = new Image();\n image.crossOrigin =\n style[`${prefix}cross-origin`] === undefined\n ? 'anonymous'\n : style[`${prefix}cross-origin`];\n assert(\n typeof style[`${prefix}src`] === 'string',\n `WebGL layers do not support expressions for the ${prefix}src style property`,\n );\n image.src = /** @type {string} */ (style[`${prefix}src`]);\n\n // the size is provided asynchronously using a uniform\n uniforms[`u_texture${textureId}_size`] = () => {\n return image.complete ? [image.width, image.height] : [0, 0];\n };\n builder.addUniform(`u_texture${textureId}_size`, 'vec2');\n const size = `u_texture${textureId}_size`;\n\n uniforms[`u_texture${textureId}`] = image;\n builder.addUniform(`u_texture${textureId}`, 'sampler2D');\n return size;\n}\n\n/**\n * This will parse an image's offset properties provided by `<prefix>-offset`, `<prefix>-offset-origin` and `<prefix>-size`\n * @param {import(\"../../style/flat.js\").FlatStyle} style Style\n * @param {'icon-'|'fill-pattern-'|'stroke-pattern-'} prefix Property prefix\n * @param {import(\"../../expr/gpu.js\").CompilationContext} context Shader compilation context (vertex or fragment)\n * @param {string} imageSize Pixel size of the full image as a GLSL expression\n * @param {string} sampleSize Pixel size of the sample in the image as a GLSL expression\n * @return {string} The offset expression\n */\nfunction parseImageOffsetProperties(\n style,\n prefix,\n context,\n imageSize,\n sampleSize,\n) {\n let offsetExpression = expressionToGlsl(\n context,\n style[`${prefix}offset`],\n SizeType,\n );\n if (`${prefix}offset-origin` in style) {\n switch (style[`${prefix}offset-origin`]) {\n case 'top-right':\n offsetExpression = `vec2(${imageSize}.x, 0.) + ${sampleSize} * vec2(-1., 0.) + ${offsetExpression} * vec2(-1., 1.)`;\n break;\n case 'bottom-left':\n offsetExpression = `vec2(0., ${imageSize}.y) + ${sampleSize} * vec2(0., -1.) + ${offsetExpression} * vec2(1., -1.)`;\n break;\n case 'bottom-right':\n offsetExpression = `${imageSize} - ${sampleSize} - ${offsetExpression}`;\n break;\n default: // pass\n }\n }\n return offsetExpression;\n}\n\n/**\n * @param {import(\"../../style/flat.js\").FlatStyle} style Style\n * @param {ShaderBuilder} builder Shader builder\n * @param {Object<string,import(\"../../webgl/Helper\").UniformValue>} uniforms Uniforms\n * @param {import(\"../../expr/gpu.js\").CompilationContext} context Shader compilation context\n */\nfunction parseCircleProperties(style, builder, uniforms, context) {\n // this function takes in screen coordinates in pixels and returns the signed distance field\n // (0 on the boundary, negative inside the circle, positive outside, values in pixels)\n context.functions['circleDistanceField'] =\n `float circleDistanceField(vec2 point, float radius) {\n return length(point) - radius;\n}`;\n\n parseCommonSymbolProperties(style, builder, context, 'circle-');\n\n // OPACITY\n let opacity = null;\n if ('circle-opacity' in style) {\n opacity = expressionToGlsl(context, style['circle-opacity'], NumberType);\n }\n\n // SCALE\n let currentPoint = 'coordsPx';\n if ('circle-scale' in style) {\n const scale = expressionToGlsl(context, style['circle-scale'], SizeType);\n currentPoint = `coordsPx / ${scale}`;\n }\n\n // FILL COLOR\n let fillColor = null;\n if ('circle-fill-color' in style) {\n fillColor = expressionToGlsl(\n context,\n style['circle-fill-color'],\n ColorType,\n );\n }\n\n // STROKE COLOR\n let strokeColor = null;\n if ('circle-stroke-color' in style) {\n strokeColor = expressionToGlsl(\n context,\n style['circle-stroke-color'],\n ColorType,\n );\n }\n\n // RADIUS\n let radius = expressionToGlsl(context, style['circle-radius'], NumberType);\n\n // STROKE WIDTH\n let strokeWidth = null;\n if ('circle-stroke-width' in style) {\n strokeWidth = expressionToGlsl(\n context,\n style['circle-stroke-width'],\n NumberType,\n );\n radius = `(${radius} + ${strokeWidth} * 0.5)`;\n }\n\n // FINAL COLOR\n const distanceField = `circleDistanceField(${currentPoint}, ${radius})`;\n const colorExpression = getColorFromDistanceField(\n distanceField,\n fillColor,\n strokeColor,\n strokeWidth,\n opacity,\n );\n builder.setSymbolColorExpression(colorExpression);\n}\n\n/**\n * @param {import(\"../../style/flat.js\").FlatStyle} style Style\n * @param {ShaderBuilder} builder Shader builder\n * @param {Object<string,import(\"../../webgl/Helper\").UniformValue>} uniforms Uniforms\n * @param {import(\"../../expr/gpu.js\").CompilationContext} context Shader compilation context\n */\nfunction parseShapeProperties(style, builder, uniforms, context) {\n context.functions['round'] = `float round(float v) {\n return sign(v) * floor(abs(v) + 0.5);\n}`;\n\n // these functions take in screen coordinates in pixels and returns the signed distance field\n // (0 on the boundary, negative inside the polygon, positive outside, values in pixels)\n // inspired by https://github.com/zranger1/PixelblazePatterns/blob/master/Toolkit/sdf2d.md#n-sided-regular-polygon\n context.functions['starDistanceField'] =\n `float starDistanceField(vec2 point, float numPoints, float radius, float radius2, float angle) {\n float startAngle = -PI * 0.5 + angle; // tip starts upwards and rotates clockwise with angle\n float c = cos(startAngle);\n float s = sin(startAngle);\n vec2 pointRotated = vec2(c * point.x - s * point.y, s * point.x + c * point.y);\n float alpha = TWO_PI / numPoints; // the angle of one sector\n float beta = atan(pointRotated.y, pointRotated.x);\n float gamma = round(beta / alpha) * alpha; // angle in sector\n c = cos(-gamma);\n s = sin(-gamma);\n vec2 inSector = vec2(c * pointRotated.x - s * pointRotated.y, abs(s * pointRotated.x + c * pointRotated.y));\n vec2 tipToPoint = inSector + vec2(-radius, 0.);\n vec2 edgeNormal = vec2(radius2 * sin(alpha * 0.5), -radius2 * cos(alpha * 0.5) + radius);\n return dot(normalize(edgeNormal), tipToPoint);\n}`;\n context.functions['regularDistanceField'] =\n `float regularDistanceField(vec2 point, float numPoints, float radius, float angle) {\n float startAngle = -PI * 0.5 + angle; // tip starts upwards and rotates clockwise with angle\n float c = cos(startAngle);\n float s = sin(startAngle);\n vec2 pointRotated = vec2(c * point.x - s * point.y, s * point.x + c * point.y);\n float alpha = TWO_PI / numPoints; // the angle of one sector\n float radiusIn = radius * cos(PI / numPoints);\n float beta = atan(pointRotated.y, pointRotated.x);\n float gamma = round((beta - alpha * 0.5) / alpha) * alpha + alpha * 0.5; // angle in sector from mid\n c = cos(-gamma);\n s = sin(-gamma);\n vec2 inSector = vec2(c * pointRotated.x - s * pointRotated.y, abs(s * pointRotated.x + c * pointRotated.y));\n return inSector.x - radiusIn;\n}`;\n\n parseCommonSymbolProperties(style, builder, context, 'shape-');\n\n // OPACITY\n let opacity = null;\n if ('shape-opacity' in style) {\n opacity = expressionToGlsl(context, style['shape-opacity'], NumberType);\n }\n\n // SCALE\n let currentPoint = 'coordsPx';\n if ('shape-scale' in style) {\n const scale = expressionToGlsl(context, style['shape-scale'], SizeType);\n currentPoint = `coordsPx / ${scale}`;\n }\n\n // FILL COLOR\n let fillColor = null;\n if ('shape-fill-color' in style) {\n fillColor = expressionToGlsl(context, style['shape-fill-color'], ColorType);\n }\n\n // STROKE COLOR\n let strokeColor = null;\n if ('shape-stroke-color' in style) {\n strokeColor = expressionToGlsl(\n context,\n style['shape-stroke-color'],\n ColorType,\n );\n }\n\n // STROKE WIDTH\n let strokeWidth = null;\n if ('shape-stroke-width' in style) {\n strokeWidth = expressionToGlsl(\n context,\n style['shape-stroke-width'],\n NumberType,\n );\n }\n\n // SHAPE TYPE\n const numPoints = expressionToGlsl(\n context,\n style['shape-points'],\n NumberType,\n );\n let angle = '0.';\n if ('shape-angle' in style) {\n angle = expressionToGlsl(context, style['shape-angle'], NumberType);\n }\n let shapeField;\n let radius = expressionToGlsl(context, style['shape-radius'], NumberType);\n if (strokeWidth !== null) {\n radius = `${radius} + ${strokeWidth} * 0.5`;\n }\n if ('shape-radius2' in style) {\n let radius2 = expressionToGlsl(context, style['shape-radius2'], NumberType);\n if (strokeWidth !== null) {\n radius2 = `${radius2} + ${strokeWidth} * 0.5`;\n }\n shapeField = `starDistanceField(${currentPoint}, ${numPoints}, ${radius}, ${radius2}, ${angle})`;\n } else {\n shapeField = `regularDistanceField(${currentPoint}, ${numPoints}, ${radius}, ${angle})`;\n }\n\n // FINAL COLOR\n const colorExpression = getColorFromDistanceField(\n shapeField,\n fillColor,\n strokeColor,\n strokeWidth,\n opacity,\n );\n builder.setSymbolColorExpression(colorExpression);\n}\n\n/**\n * @param {import(\"../../style/flat.js\").FlatStyle} style Style\n * @param {ShaderBuilder} builder Shader builder\n * @param {Object<string,import(\"../../webgl/Helper\").UniformValue>} uniforms Uniforms\n * @param {import(\"../../expr/gpu.js\").CompilationContext} context Shader compilation context\n */\nfunction parseIconProperties(style, builder, uniforms, context) {\n // COLOR\n let color = 'vec4(1.0)';\n if ('icon-color' in style) {\n color = expressionToGlsl(context, style['icon-color'], ColorType);\n }\n\n // OPACITY\n if ('icon-opacity' in style) {\n color = `${color} * vec4(1.0, 1.0, 1.0, ${expressionToGlsl(\n context,\n style['icon-opacity'],\n NumberType,\n )})`;\n }\n\n // IMAGE & SIZE\n const textureId = computeHash(style['icon-src']);\n const sizeExpression = parseImageProperties(\n style,\n builder,\n uniforms,\n 'icon-',\n textureId,\n );\n builder\n .setSymbolColorExpression(\n `${color} * texture2D(u_texture${textureId}, v_texCoord)`,\n )\n .setSymbolSizeExpression(sizeExpression);\n\n // override size if width/height were specified\n if ('icon-width' in style && 'icon-height' in style) {\n builder.setSymbolSizeExpression(\n `vec2(${expressionToGlsl(\n context,\n style['icon-width'],\n NumberType,\n )}, ${expressionToGlsl(context, style['icon-height'], NumberType)})`,\n );\n }\n\n // tex coord\n if ('icon-offset' in style && 'icon-size' in style) {\n const sampleSize = expressionToGlsl(\n context,\n style['icon-size'],\n NumberArrayType,\n );\n const fullsize = builder.getSymbolSizeExpression();\n builder.setSymbolSizeExpression(sampleSize);\n const offset = parseImageOffsetProperties(\n style,\n 'icon-',\n context,\n 'v_quadSizePx',\n sampleSize,\n );\n builder.setTextureCoordinateExpression(\n `(vec4((${offset}).xyxy) + vec4(0., 0., ${sampleSize})) / (${fullsize}).xyxy`,\n );\n }\n\n parseCommonSymbolProperties(style, builder, context, 'icon-');\n\n if ('icon-anchor' in style) {\n const anchor = expressionToGlsl(\n context,\n style['icon-anchor'],\n NumberArrayType,\n );\n let scale = `1.0`;\n if (`icon-scale` in style) {\n scale = expressionToGlsl(context, style[`icon-scale`], SizeType);\n }\n let shiftPx;\n if (\n style['icon-anchor-x-units'] === 'pixels' &&\n style['icon-anchor-y-units'] === 'pixels'\n ) {\n shiftPx = `${anchor} * ${scale}`;\n } else if (style['icon-anchor-x-units'] === 'pixels') {\n shiftPx = `${anchor} * vec2(vec2(${scale}).x, v_quadSizePx.y)`;\n } else if (style['icon-anchor-y-units'] === 'pixels') {\n shiftPx = `${anchor} * vec2(v_quadSizePx.x, vec2(${scale}).x)`;\n } else {\n shiftPx = `${anchor} * v_quadSizePx`;\n }\n // default origin is top-left\n let offsetPx = `v_quadSizePx * vec2(0.5, -0.5) + ${shiftPx} * vec2(-1., 1.)`;\n if ('icon-anchor-origin' in style) {\n switch (style['icon-anchor-origin']) {\n case 'top-right':\n offsetPx = `v_quadSizePx * -0.5 + ${shiftPx}`;\n break;\n case 'bottom-left':\n offsetPx = `v_quadSizePx * 0.5 - ${shiftPx}`;\n break;\n case 'bottom-right':\n offsetPx = `v_quadSizePx * vec2(-0.5, 0.5) + ${shiftPx} * vec2(1., -1.)`;\n break;\n default: // pass\n }\n }\n builder.setSymbolOffsetExpression(\n `${builder.getSymbolOffsetExpression()} + ${offsetPx}`,\n );\n }\n}\n\n/**\n * @param {import(\"../../style/flat.js\").FlatStyle} style Style\n * @param {ShaderBuilder} builder Shader Builder\n * @param {Object<string,import(\"../../webgl/Helper\").UniformValue>} uniforms Uniforms\n * @param {import(\"../../expr/gpu.js\").CompilationContext} context Shader compilation context\n */\nfunction parseStrokeProperties(style, builder, uniforms, context) {\n if ('stroke-color' in style) {\n builder.setStrokeColorExpression(\n expressionToGlsl(context, style['stroke-color'], ColorType),\n );\n }\n if ('stroke-pattern-src' in style) {\n const textureId = computeHash(style['stroke-pattern-src']);\n const sizeExpression = parseImageProperties(\n style,\n builder,\n uniforms,\n 'stroke-pattern-',\n textureId,\n );\n let sampleSizeExpression = sizeExpression;\n let offsetExpression = 'vec2(0.)';\n if ('stroke-pattern-offset' in style && 'stroke-pattern-size' in style) {\n sampleSizeExpression = expressionToGlsl(\n context,\n style[`stroke-pattern-size`],\n NumberArrayType,\n );\n offsetExpression = parseImageOffsetProperties(\n style,\n 'stroke-pattern-',\n context,\n sizeExpression,\n sampleSizeExpression,\n );\n }\n let spacingExpression = '0.';\n if ('stroke-pattern-spacing' in style) {\n spacingExpression = expressionToGlsl(\n context,\n style['stroke-pattern-spacing'],\n NumberType,\n );\n }\n let startOffsetExpression = '0.';\n if ('stroke-pattern-start-offset' in style) {\n startOffsetExpression = expressionToGlsl(\n context,\n style['stroke-pattern-start-offset'],\n NumberType,\n );\n }\n context.functions['sampleStrokePattern'] =\n `vec4 sampleStrokePattern(sampler2D texture, vec2 textureSize, vec2 textureOffset, vec2 sampleSize, float spacingPx, float startOffsetPx, float currentLengthPx, float currentRadiusRatio, float lineWidth) {\n float currentLengthScaled = (currentLengthPx - startOffsetPx) * sampleSize.y / lineWidth;\n float spacingScaled = spacingPx * sampleSize.y / lineWidth;\n float uCoordPx = mod(currentLengthScaled, (sampleSize.x + spacingScaled));\n float isInsideOfPattern = step(uCoordPx, sampleSize.x);\n float vCoordPx = (-currentRadiusRatio * 0.5 + 0.5) * sampleSize.y;\n // make sure that we're not sampling too close to the borders to avoid interpolation with outside pixels\n uCoordPx = clamp(uCoordPx, 0.5, sampleSize.x - 0.5);\n vCoordPx = clamp(vCoordPx, 0.5, sampleSize.y - 0.5);\n vec2 texCoord = (vec2(uCoordPx, vCoordPx) + textureOffset) / textureSize;\n return texture2D(texture, texCoord) * vec4(1.0, 1.0, 1.0, isInsideOfPattern);\n}`;\n const textureName = `u_texture${textureId}`;\n let tintExpression = '1.';\n if ('stroke-color' in style) {\n tintExpression = builder.getStrokeColorExpression();\n }\n builder.setStrokeColorExpression(\n `${tintExpression} * sampleStrokePattern(${textureName}, ${sizeExpression}, ${offsetExpression}, ${sampleSizeExpression}, ${spacingExpression}, ${startOffsetExpression}, currentLengthPx, currentRadiusRatio, v_width)`,\n );\n\n context.functions['computeStrokePatternLength'] =\n `float computeStrokePatternLength(vec2 sampleSize, float spacingPx, float lineWidth) {\n float patternLengthPx = sampleSize.x / sampleSize.y * lineWidth;\n return patternLengthPx + spacingPx;\n}`;\n\n // apply a stroke pattern length to avoid visual artifacts\n builder.setStrokePatternLengthExpression(\n `computeStrokePatternLength(${sampleSizeExpression}, ${spacingExpression}, v_width)`,\n );\n }\n\n if ('stroke-width' in style) {\n builder.setStrokeWidthExpression(\n expressionToGlsl(context, style['stroke-width'], NumberType),\n );\n }\n\n if ('stroke-offset' in style) {\n builder.setStrokeOffsetExpression(\n expressionToGlsl(context, style['stroke-offset'], NumberType),\n );\n }\n\n if ('stroke-line-cap' in style) {\n builder.setStrokeCapExpression(\n expressionToGlsl(context, style['stroke-line-cap'], StringType),\n );\n }\n\n if ('stroke-line-join' in style) {\n builder.setStrokeJoinExpression(\n expressionToGlsl(context, style['stroke-line-join'], StringType),\n );\n }\n\n if ('stroke-miter-limit' in style) {\n builder.setStrokeMiterLimitExpression(\n expressionToGlsl(context, style['stroke-miter-limit'], NumberType),\n );\n }\n\n if ('stroke-line-dash' in style) {\n context.functions['getSingleDashDistance'] =\n `float getSingleDashDistance(float distance, float radius, float dashOffset, float dashLength, float dashLengthTotal, float capType, float lineWidth) {\n float localDistance = mod(distance, dashLengthTotal);\n float distanceSegment = abs(localDistance - dashOffset - dashLength * 0.5) - dashLength * 0.5;\n distanceSegment = min(distanceSegment, dashLengthTotal - localDistance);\n if (capType == ${stringToGlsl('square')}) {\n distanceSegment -= lineWidth * 0.5;\n } else if (capType == ${stringToGlsl('round')}) {\n distanceSegment = min(distanceSegment, sqrt(distanceSegment * distanceSegment + radius * radius) - lineWidth * 0.5);\n }\n return distanceSegment;\n}`;\n\n let dashPattern = style['stroke-line-dash'].map((v) =>\n expressionToGlsl(context, v, NumberType),\n );\n // if pattern has odd length, concatenate it with itself to be even\n if (dashPattern.length % 2 === 1) {\n dashPattern = [...dashPattern, ...dashPattern];\n }\n\n let offsetExpression = '0.';\n if ('stroke-line-dash-offset' in style) {\n offsetExpression = expressionToGlsl(\n context,\n style['stroke-line-dash-offset'],\n NumberType,\n );\n }\n\n // define a function for this dash specifically\n const uniqueDashKey = computeHash(style['stroke-line-dash']);\n const dashFunctionName = `dashDistanceField_${uniqueDashKey}`;\n\n const dashLengthsParamsDef = dashPattern\n .map((v, i) => `float dashLength${i}`)\n .join(', ');\n const totalLengthDef = dashPattern\n .map((v, i) => `dashLength${i}`)\n .join(' + ');\n let currentDashOffset = '0.';\n let distanceExpression = `getSingleDashDistance(distance, radius, ${currentDashOffset}, dashLength0, totalDashLength, capType, lineWidth)`;\n for (let i = 2; i < dashPattern.length; i += 2) {\n currentDashOffset = `${currentDashOffset} + dashLength${\n i - 2\n } + dashLength${i - 1}`;\n distanceExpression = `min(${distanceExpression}, getSingleDashDistance(distance, radius, ${currentDashOffset}, dashLength${i}, totalDashLength, capType, lineWidth))`;\n }\n\n context.functions[dashFunctionName] =\n `float ${dashFunctionName}(float distance, float radius, float capType, float lineWidth, ${dashLengthsParamsDef}) {\n float totalDashLength = ${totalLengthDef};\n return ${distanceExpression};\n}`;\n const dashLengthsCalls = dashPattern.map((v, i) => `${v}`).join(', ');\n builder.setStrokeDistanceFieldExpression(\n `${dashFunctionName}(currentLengthPx + ${offsetExpression}, currentRadiusPx, capType, v_width, ${dashLengthsCalls})`,\n );\n\n // apply a stroke pattern length to avoid visual artifacts\n let patternLength = dashPattern.join(' + ');\n if (builder.getStrokePatternLengthExpression()) {\n context.functions['combinePatternLengths'] =\n `float combinePatternLengths(float patternLength1, float patternLength2) {\n return patternLength1 * patternLength2;\n}`;\n patternLength = `combinePatternLengths(${builder.getStrokePatternLengthExpression()}, ${patternLength})`;\n }\n builder.setStrokePatternLengthExpression(patternLength);\n }\n}\n\n/**\n * @param {import(\"../../style/flat.js\").FlatStyle} style Style\n * @param {ShaderBuilder} builder Shader Builder\n * @param {Object<string,import(\"../../webgl/Helper\").UniformValue>} uniforms Uniforms\n * @param {import(\"../../expr/gpu.js\").CompilationContext} context Shader compilation context\n */\nfunction parseFillProperties(style, builder, uniforms, context) {\n if ('fill-color' in style) {\n builder.setFillColorExpression(\n expressionToGlsl(context, style['fill-color'], ColorType),\n );\n }\n if ('fill-pattern-src' in style) {\n const textureId = computeHash(style['fill-pattern-src']);\n const sizeExpression = parseImageProperties(\n style,\n builder,\n uniforms,\n 'fill-pattern-',\n textureId,\n );\n let sampleSizeExpression = sizeExpression;\n let offsetExpression = 'vec2(0.)';\n if ('fill-pattern-offset' in style && 'fill-pattern-size' in style) {\n sampleSizeExpression = expressionToGlsl(\n context,\n style[`fill-pattern-size`],\n NumberArrayType,\n );\n offsetExpression = parseImageOffsetProperties(\n style,\n 'fill-pattern-',\n context,\n sizeExpression,\n sampleSizeExpression,\n );\n }\n context.functions['sampleFillPattern'] =\n `vec4 sampleFillPattern(sampler2D texture, vec2 textureSize, vec2 textureOffset, vec2 sampleSize, vec2 pxOrigin, vec2 pxPosition) {\n float scaleRatio = pow(2., mod(u_zoom + 0.5, 1.) - 0.5);\n vec2 pxRelativePos = pxPosition - pxOrigin;\n // rotate the relative position from origin by the current view rotation\n pxRelativePos = vec2(pxRelativePos.x * cos(u_rotation) - pxRelativePos.y * sin(u_rotation), pxRelativePos.x * sin(u_rotation) + pxRelativePos.y * cos(u_rotation));\n // sample position is computed according to the sample offset & size\n vec2 samplePos = mod(pxRelativePos / scaleRatio, sampleSize);\n // also make sure that we're not sampling too close to the borders to avoid interpolation with outside pixels\n samplePos = clamp(samplePos, vec2(0.5), sampleSize - vec2(0.5));\n samplePos.y = sampleSize.y - samplePos.y; // invert y axis so that images appear upright\n return texture2D(texture, (samplePos + textureOffset) / textureSize);\n}`;\n const textureName = `u_texture${textureId}`;\n let tintExpression = '1.';\n if ('fill-color' in style) {\n tintExpression = builder.getFillColorExpression();\n }\n builder.setFillColorExpression(\n `${tintExpression} * sampleFillPattern(${textureName}, ${sizeExpression}, ${offsetExpression}, ${sampleSizeExpression}, pxOrigin, pxPos)`,\n );\n }\n}\n\n/**\n * @typedef {Object} StyleParseResult\n * @property {ShaderBuilder} builder Shader builder pre-configured according to a given style\n * @property {import(\"./VectorStyleRenderer.js\").UniformDefinitions} uniforms Uniform definitions\n * @property {import(\"./VectorStyleRenderer.js\").AttributeDefinitions} attributes Attribute definitions\n */\n\n/**\n * Parses a {@link import(\"../../style/flat.js\").FlatStyle} object and returns a {@link ShaderBuilder}\n * object that has been configured according to the given style, as well as `attributes` and `uniforms`\n * arrays to be fed to the `WebGLPointsRenderer` class.\n *\n * Also returns `uniforms` and `attributes` properties as expected by the\n * {@link module:ol/renderer/webgl/PointsLayer~WebGLPointsLayerRenderer}.\n *\n * @param {import(\"../../style/flat.js\").FlatStyle} style Flat style.\n * @param {import('../../style/flat.js').StyleVariables} [variables] Style variables.\n * @param {import(\"../../expr/expression.js\").EncodedExpression} [filter] Filter (if any)\n * @return {StyleParseResult} Result containing shader params, attributes and uniforms.\n */\nexport function parseLiteralStyle(style, variables, filter) {\n const context = newCompilationContext();\n\n const builder = new ShaderBuilder();\n\n /** @type {Object<string,import(\"../../webgl/Helper\").UniformValue>} */\n const uniforms = {};\n\n if ('icon-src' in style) {\n parseIconProperties(style, builder, uniforms, context);\n } else if ('shape-points' in style) {\n parseShapeProperties(style, builder, uniforms, context);\n } else if ('circle-radius' in style) {\n parseCircleProperties(style, builder, uniforms, context);\n }\n parseStrokeProperties(style, builder, uniforms, context);\n parseFillProperties(style, builder, uniforms, context);\n\n // note that the style filter may have already been applied earlier when building the rendering instructions\n // this is still needed in case a filter cannot be evaluated statically beforehand (e.g. depending on time)\n if (filter) {\n const parsedFilter = expressionToGlsl(context, filter, BooleanType);\n builder.setFragmentDiscardExpression(`!${parsedFilter}`);\n }\n\n /**\n * @type {import('./VectorStyleRenderer.js').AttributeDefinitions}\n */\n const attributes = {};\n\n // Define attributes for special inputs\n function defineSpecialInput(contextPropName, glslPropName, type, callback) {\n if (!context[contextPropName]) {\n return;\n }\n const glslType = getGlslTypeFromType(type);\n const attrSize = getGlslSizeFromType(type);\n builder.addAttribute(`a_${glslPropName}`, glslType);\n\n attributes[glslPropName] = {\n size: attrSize,\n callback,\n };\n }\n defineSpecialInput(\n 'geometryType',\n GEOMETRY_TYPE_PROPERTY_NAME,\n StringType,\n (feature) =>\n getStringNumberEquivalent(computeGeometryType(feature.getGeometry())),\n );\n defineSpecialInput(\n 'featureId',\n FEATURE_ID_PROPERTY_NAME,\n StringType | NumberType,\n (feature) => {\n const id = feature.getId() ?? null;\n return typeof id === 'string' ? getStringNumberEquivalent(id) : id;\n },\n );\n\n applyContextToBuilder(builder, context);\n\n return {\n builder,\n attributes: {...attributes, ...generateAttributesFromContext(context)},\n uniforms: {\n ...uniforms,\n ...generateUniformsFromContext(context, variables),\n },\n };\n}\n", "/**\n * @module ol/render/webgl/VectorStyleRenderer\n */\nimport {\n create as createTransform,\n makeInverse as makeInverseTransform,\n} from '../../transform.js';\nimport WebGLArrayBuffer from '../../webgl/Buffer.js';\nimport {AttributeType} from '../../webgl/Helper.js';\nimport {ARRAY_BUFFER, DYNAMIC_DRAW, ELEMENT_ARRAY_BUFFER} from '../../webgl.js';\nimport {create as createWebGLWorker} from '../../worker/webgl.js';\nimport {WebGLWorkerMessageType} from './constants.js';\nimport {colorEncodeIdAndPack} from './encodeUtil.js';\nimport {\n generateLineStringRenderInstructions,\n generatePointRenderInstructions,\n generatePolygonRenderInstructions,\n getCustomAttributesSize,\n} from './renderinstructions.js';\nimport {parseLiteralStyle} from './style.js';\n\nconst tmpColor = [];\n/** @type {Worker|undefined} */\nlet WEBGL_WORKER;\nfunction getWebGLWorker() {\n if (!WEBGL_WORKER) {\n WEBGL_WORKER = createWebGLWorker();\n }\n return WEBGL_WORKER;\n}\nlet workerMessageCounter = 0;\n\n/**\n * Names of attributes made available to the vertex shader.\n * Please note: changing these *will* break custom shaders!\n * @enum {string}\n */\nexport const Attributes = {\n POSITION: 'a_position',\n LOCAL_POSITION: 'a_localPosition',\n SEGMENT_START: 'a_segmentStart',\n SEGMENT_END: 'a_segmentEnd',\n MEASURE_START: 'a_measureStart',\n MEASURE_END: 'a_measureEnd',\n ANGLE_TANGENT_SUM: 'a_angleTangentSum',\n JOIN_ANGLES: 'a_joinAngles',\n DISTANCE_LOW: 'a_distanceLow',\n DISTANCE_HIGH: 'a_distanceHigh',\n};\n\n/**\n * @typedef {Object} AttributeDefinition A description of a custom attribute to be passed on to the GPU, with a value different\n * for each feature.\n * @property {number} [size] Amount of numerical values composing the attribute, either 1, 2, 3 or 4; in case size is > 1, the return value\n * of the callback should be an array; if unspecified, assumed to be a single float value\n * @property {function(this:import(\"./MixedGeometryBatch.js\").GeometryBatchItem, import(\"../../Feature\").FeatureLike):number|Array<number>} callback This callback computes the numerical value of the\n * attribute for a given feature.\n */\n\n/**\n * @typedef {Object<string, AttributeDefinition>} AttributeDefinitions\n * @typedef {Object<string, import(\"../../webgl/Helper\").UniformValue>} UniformDefinitions\n */\n\n/**\n * @typedef {Array<WebGLArrayBuffer>} WebGLArrayBufferSet Buffers organized like so: [indicesBuffer, vertexAttributesBuffer, instanceAttributesBuffer]\n */\n\n/**\n * @typedef {Object} WebGLBuffers\n * @property {WebGLArrayBufferSet} polygonBuffers Array containing indices and vertices buffers for polygons\n * @property {WebGLArrayBufferSet} lineStringBuffers Array containing indices and vertices buffers for line strings\n * @property {WebGLArrayBufferSet} pointBuffers Array containing indices and vertices buffers for points\n * @property {import(\"../../transform.js\").Transform} invertVerticesTransform Inverse of the transform applied when generating buffers\n */\n\n/**\n * @typedef {Object} RenderInstructions\n * @property {Float32Array|null} polygonInstructions Polygon instructions; null if nothing to render\n * @property {Float32Array|null} lineStringInstructions LineString instructions; null if nothing to render\n * @property {Float32Array|null} pointInstructions Point instructions; null if nothing to render\n */\n\n/**\n * @typedef {Object} ShaderProgram An object containing both shaders (vertex and fragment)\n * @property {string} vertex Vertex shader source\n * @property {string} fragment Fragment shader source\n */\n\n/**\n * @typedef {import('./style.js').StyleParseResult} StyleShaders\n */\n\n/**\n * @typedef {import('../../style/flat.js').FlatStyleLike} FlatStyleLike\n */\n/**\n * @typedef {import('../../style/flat.js').FlatStyle} FlatStyle\n */\n/**\n * @typedef {import('../../style/flat.js').Rule} FlatStyleRule\n */\n\n/**\n * @typedef {Object} SubRenderPass\n * @property {string} vertexShader Vertex shader\n * @property {string} fragmentShader Fragment shader\n * @property {Array<import('../../webgl/Helper.js').AttributeDescription>} attributesDesc Attributes description, defined for each primitive vertex\n * @property {Array<import('../../webgl/Helper.js').AttributeDescription>} instancedAttributesDesc Attributes description, defined once per primitive\n * @property {number} instancePrimitiveVertexCount Number of vertices per instance primitive in this render pass\n * @property {WebGLProgram} [program] Program; this has to be recreated if the helper is lost/changed\n */\n\n/**\n * @typedef {Object} RenderPass\n * @property {SubRenderPass} [fillRenderPass] Fill render pass; undefined if no fill in pass\n * @property {SubRenderPass} [strokeRenderPass] Stroke render pass; undefined if no stroke in pass\n * @property {SubRenderPass} [symbolRenderPass] Symbol render pass; undefined if no symbol in pass\n */\n\n/**\n * @classdesc This class is responsible for:\n * 1. generating WebGL buffers according to a provided style, using a MixedGeometryBatch as input\n * 2. rendering geometries contained in said buffers\n *\n * A VectorStyleRenderer instance can be created either from a literal style or from shaders.\n * The shaders should not be provided explicitly but instead as a preconfigured ShaderBuilder instance.\n *\n * The `generateBuffers` method returns a promise resolving to WebGL buffers that are intended to be rendered by the\n * same renderer.\n */\nclass VectorStyleRenderer {\n /**\n * @param {FlatStyleLike|StyleShaders|Array<StyleShaders>} styles Vector styles expressed as flat styles, flat style rules or style shaders\n * @param {import('../../style/flat.js').StyleVariables} variables Style variables\n * @param {import('../../webgl/Helper.js').default} helper Helper\n * @param {boolean} [enableHitDetection] Whether to enable the hit detection (needs compatible shader)\n */\n constructor(styles, variables, helper, enableHitDetection) {\n /**\n * @private\n * @type {import('../../webgl/Helper.js').default}\n */\n this.helper_;\n\n /**\n * @private\n */\n this.hitDetectionEnabled_ = !!enableHitDetection;\n\n /**\n * @type {Array<StyleShaders>}\n * @private\n */\n this.styleShaders = convertStyleToShaders(styles, variables);\n\n /**\n * @type {AttributeDefinitions}\n * @private\n */\n this.customAttributes_ = {};\n\n /**\n @type {UniformDefinitions}\n * @private\n */\n this.uniforms_ = {};\n\n // add hit detection attribute if enabled\n if (this.hitDetectionEnabled_) {\n this.customAttributes_['hitColor'] = {\n callback() {\n return colorEncodeIdAndPack(this.ref, tmpColor);\n },\n size: 2,\n };\n }\n\n // add attributes & uniforms coming from all shaders\n for (const styleShader of this.styleShaders) {\n for (const attributeName in styleShader.attributes) {\n if (attributeName in this.customAttributes_) {\n // already defined: skip\n continue;\n }\n this.customAttributes_[attributeName] =\n styleShader.attributes[attributeName];\n }\n for (const uniformName in styleShader.uniforms) {\n if (uniformName in this.uniforms_) {\n // already defined: skip\n continue;\n }\n this.uniforms_[uniformName] = styleShader.uniforms[uniformName];\n }\n }\n\n // create a render pass for each shader\n /**\n * @type {Array<RenderPass>}\n * @private\n */\n this.renderPasses_ = this.styleShaders.map((styleShader) => {\n /** @type {RenderPass} */\n const renderPass = {};\n\n const customAttributesDesc = Object.entries(this.customAttributes_).map(\n ([name, value]) => {\n const isUsed = name in styleShader.attributes || name === 'hitColor';\n return {\n name: isUsed ? `a_${name}` : null, // giving a null name means this is only used for \"spacing\" in between attributes\n size: value.size || 1,\n type: AttributeType.FLOAT,\n };\n },\n );\n\n // set up each subpass\n if (styleShader.builder.getFillVertexShader()) {\n renderPass.fillRenderPass = {\n vertexShader: styleShader.builder.getFillVertexShader(),\n fragmentShader: styleShader.builder.getFillFragmentShader(),\n attributesDesc: [\n {\n name: Attributes.POSITION,\n size: 2,\n type: AttributeType.FLOAT,\n },\n ...customAttributesDesc,\n ],\n instancedAttributesDesc: [], // no instanced rendering for polygons\n instancePrimitiveVertexCount: 3,\n };\n }\n if (styleShader.builder.getStrokeVertexShader()) {\n renderPass.strokeRenderPass = {\n vertexShader: styleShader.builder.getStrokeVertexShader(),\n fragmentShader: styleShader.builder.getStrokeFragmentShader(),\n attributesDesc: [\n {\n name: Attributes.LOCAL_POSITION,\n size: 2,\n type: AttributeType.FLOAT,\n },\n ],\n instancedAttributesDesc: [\n {\n name: Attributes.SEGMENT_START,\n size: 2,\n type: AttributeType.FLOAT,\n },\n {\n name: Attributes.MEASURE_START,\n size: 1,\n type: AttributeType.FLOAT,\n },\n {\n name: Attributes.SEGMENT_END,\n size: 2,\n type: AttributeType.FLOAT,\n },\n {\n name: Attributes.MEASURE_END,\n size: 1,\n type: AttributeType.FLOAT,\n },\n {\n name: Attributes.JOIN_ANGLES,\n size: 2,\n type: AttributeType.FLOAT,\n },\n {\n name: Attributes.DISTANCE_LOW,\n size: 1,\n type: AttributeType.FLOAT,\n },\n {\n name: Attributes.DISTANCE_HIGH,\n size: 1,\n type: AttributeType.FLOAT,\n },\n {\n name: Attributes.ANGLE_TANGENT_SUM,\n size: 1,\n type: AttributeType.FLOAT,\n },\n ...customAttributesDesc,\n ],\n instancePrimitiveVertexCount: 6,\n };\n }\n if (styleShader.builder.getSymbolVertexShader()) {\n renderPass.symbolRenderPass = {\n vertexShader: styleShader.builder.getSymbolVertexShader(),\n fragmentShader: styleShader.builder.getSymbolFragmentShader(),\n attributesDesc: [\n {\n name: Attributes.LOCAL_POSITION,\n size: 2,\n type: AttributeType.FLOAT,\n },\n ],\n instancedAttributesDesc: [\n {\n name: Attributes.POSITION,\n size: 2,\n type: AttributeType.FLOAT,\n },\n ...customAttributesDesc,\n ],\n instancePrimitiveVertexCount: 6,\n };\n }\n return renderPass;\n });\n\n this.hasFill_ = this.renderPasses_.some((pass) => pass.fillRenderPass);\n this.hasStroke_ = this.renderPasses_.some((pass) => pass.strokeRenderPass);\n this.hasSymbol_ = this.renderPasses_.some((pass) => pass.symbolRenderPass);\n\n // this will initialize render passes with the given helper\n this.setHelper(helper);\n }\n\n /**\n * @param {import('./MixedGeometryBatch.js').default} geometryBatch Geometry batch\n * @param {import(\"../../transform.js\").Transform} transform Transform to apply to coordinates\n * @return {Promise<WebGLBuffers|null>} A promise resolving to WebGL buffers; returns null if buffers are empty\n */\n async generateBuffers(geometryBatch, transform) {\n if (geometryBatch.isEmpty()) {\n return null;\n }\n const renderInstructions = this.generateRenderInstructions_(\n geometryBatch,\n transform,\n );\n const [polygonBuffers, lineStringBuffers, pointBuffers] = await Promise.all(\n [\n this.generateBuffersForType_(\n renderInstructions.polygonInstructions,\n 'Polygon',\n transform,\n ),\n this.generateBuffersForType_(\n renderInstructions.lineStringInstructions,\n 'LineString',\n transform,\n ),\n this.generateBuffersForType_(\n renderInstructions.pointInstructions,\n 'Point',\n transform,\n ),\n ],\n );\n // also return the inverse of the transform that was applied when generating buffers\n const invertVerticesTransform = makeInverseTransform(\n createTransform(),\n transform,\n );\n return {\n polygonBuffers: polygonBuffers,\n lineStringBuffers: lineStringBuffers,\n pointBuffers: pointBuffers,\n invertVerticesTransform: invertVerticesTransform,\n };\n }\n\n /**\n * @param {import('./MixedGeometryBatch.js').default} geometryBatch Geometry batch\n * @param {import(\"../../transform.js\").Transform} transform Transform to apply to coordinates\n * @return {RenderInstructions} Render instructions\n * @private\n */\n generateRenderInstructions_(geometryBatch, transform) {\n const polygonInstructions = this.hasFill_\n ? generatePolygonRenderInstructions(\n geometryBatch.polygonBatch,\n new Float32Array(0),\n this.customAttributes_,\n transform,\n )\n : null;\n const lineStringInstructions = this.hasStroke_\n ? generateLineStringRenderInstructions(\n geometryBatch.lineStringBatch,\n new Float32Array(0),\n this.customAttributes_,\n transform,\n )\n : null;\n const pointInstructions = this.hasSymbol_\n ? generatePointRenderInstructions(\n geometryBatch.pointBatch,\n new Float32Array(0),\n this.customAttributes_,\n transform,\n )\n : null;\n\n return {\n polygonInstructions,\n lineStringInstructions,\n pointInstructions,\n };\n }\n\n /**\n * @param {Float32Array|null} renderInstructions Render instructions\n * @param {import(\"../../geom/Geometry.js\").Type} geometryType Geometry type\n * @param {import(\"../../transform.js\").Transform} transform Transform to apply to coordinates\n * @return {Promise<WebGLArrayBufferSet>|null} Indices buffer and vertices buffer; null if nothing to render\n * @private\n */\n generateBuffersForType_(renderInstructions, geometryType, transform) {\n if (renderInstructions === null) {\n return null;\n }\n\n const messageId = workerMessageCounter++;\n let messageType;\n switch (geometryType) {\n case 'Polygon':\n messageType = WebGLWorkerMessageType.GENERATE_POLYGON_BUFFERS;\n break;\n case 'LineString':\n messageType = WebGLWorkerMessageType.GENERATE_LINE_STRING_BUFFERS;\n break;\n case 'Point':\n messageType = WebGLWorkerMessageType.GENERATE_POINT_BUFFERS;\n break;\n default:\n // pass\n }\n\n /** @type {import('./constants.js').WebGLWorkerGenerateBuffersMessage} */\n const message = {\n id: messageId,\n type: messageType,\n renderInstructions: renderInstructions.buffer,\n renderInstructionsTransform: transform,\n customAttributesSize: getCustomAttributesSize(this.customAttributes_),\n };\n const WEBGL_WORKER = getWebGLWorker();\n WEBGL_WORKER.postMessage(message, [renderInstructions.buffer]);\n\n // leave ownership of render instructions\n renderInstructions = null;\n\n return new Promise((resolve) => {\n /**\n * @param {{data: import('./constants.js').WebGLWorkerGenerateBuffersMessage}} event Event.\n */\n const handleMessage = (event) => {\n const received = event.data;\n\n // this is not the response to our request: skip\n if (received.id !== messageId) {\n return;\n }\n\n // we've received our response: stop listening\n WEBGL_WORKER.removeEventListener('message', handleMessage);\n\n // the helper has disposed in the meantime; the promise will not be resolved\n if (!this.helper_.getGL()) {\n return;\n }\n\n // copy & flush received buffers to GPU\n const indicesBuffer = new WebGLArrayBuffer(\n ELEMENT_ARRAY_BUFFER,\n DYNAMIC_DRAW,\n ).fromArrayBuffer(received.indicesBuffer);\n const vertexAttributesBuffer = new WebGLArrayBuffer(\n ARRAY_BUFFER,\n DYNAMIC_DRAW,\n ).fromArrayBuffer(received.vertexAttributesBuffer);\n const instanceAttributesBuffer = new WebGLArrayBuffer(\n ARRAY_BUFFER,\n DYNAMIC_DRAW,\n ).fromArrayBuffer(received.instanceAttributesBuffer);\n this.helper_.flushBufferData(indicesBuffer);\n this.helper_.flushBufferData(vertexAttributesBuffer);\n this.helper_.flushBufferData(instanceAttributesBuffer);\n\n resolve([\n indicesBuffer,\n vertexAttributesBuffer,\n instanceAttributesBuffer,\n ]);\n };\n\n WEBGL_WORKER.addEventListener('message', handleMessage);\n });\n }\n\n /**\n * Render the geometries in the given buffers.\n * @param {WebGLBuffers} buffers WebGL Buffers to draw\n * @param {import(\"../../Map.js\").FrameState} frameState Frame state\n * @param {function(): void} preRenderCallback This callback will be called right before drawing, and can be used to set uniforms\n */\n render(buffers, frameState, preRenderCallback) {\n for (const renderPass of this.renderPasses_) {\n renderPass.fillRenderPass &&\n this.renderInternal_(\n buffers.polygonBuffers[0],\n buffers.polygonBuffers[1],\n buffers.polygonBuffers[2],\n renderPass.fillRenderPass,\n frameState,\n preRenderCallback,\n );\n renderPass.strokeRenderPass &&\n this.renderInternal_(\n buffers.lineStringBuffers[0],\n buffers.lineStringBuffers[1],\n buffers.lineStringBuffers[2],\n renderPass.strokeRenderPass,\n frameState,\n preRenderCallback,\n );\n renderPass.symbolRenderPass &&\n this.renderInternal_(\n buffers.pointBuffers[0],\n buffers.pointBuffers[1],\n buffers.pointBuffers[2],\n renderPass.symbolRenderPass,\n frameState,\n preRenderCallback,\n );\n }\n }\n\n /**\n * @param {WebGLArrayBuffer} indicesBuffer Indices buffer\n * @param {WebGLArrayBuffer} vertexAttributesBuffer Vertex attributes buffer\n * @param {WebGLArrayBuffer} instanceAttributesBuffer Instance attributes buffer\n * @param {SubRenderPass} subRenderPass Render pass (program, attributes, etc.) specific to one geometry type\n * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n * @param {function(): void} preRenderCallback This callback will be called right before drawing, and can be used to set uniforms\n * @private\n */\n renderInternal_(\n indicesBuffer,\n vertexAttributesBuffer,\n instanceAttributesBuffer,\n subRenderPass,\n frameState,\n preRenderCallback,\n ) {\n const renderCount = indicesBuffer.getSize();\n if (renderCount === 0) {\n return;\n }\n\n const usesInstancedRendering = subRenderPass.instancedAttributesDesc.length;\n\n this.helper_.useProgram(subRenderPass.program, frameState);\n this.helper_.bindBuffer(vertexAttributesBuffer);\n this.helper_.bindBuffer(indicesBuffer);\n this.helper_.enableAttributes(subRenderPass.attributesDesc);\n this.helper_.bindBuffer(instanceAttributesBuffer);\n this.helper_.enableAttributesInstanced(\n subRenderPass.instancedAttributesDesc,\n );\n\n preRenderCallback();\n\n if (usesInstancedRendering) {\n const instanceAttributesStride =\n subRenderPass.instancedAttributesDesc.reduce(\n (prev, curr) => prev + (curr.size || 1),\n 0,\n );\n const instanceCount =\n instanceAttributesBuffer.getSize() / instanceAttributesStride;\n\n this.helper_.drawElementsInstanced(0, renderCount, instanceCount);\n } else {\n this.helper_.drawElements(0, renderCount);\n }\n }\n\n /**\n * @param {import('../../webgl/Helper.js').default} helper Helper\n * @param {WebGLBuffers} buffers WebGL Buffers to reload if any\n */\n setHelper(helper, buffers = null) {\n this.helper_ = helper;\n\n for (const renderPass of this.renderPasses_) {\n if (renderPass.fillRenderPass) {\n renderPass.fillRenderPass.program = this.helper_.getProgram(\n renderPass.fillRenderPass.fragmentShader,\n renderPass.fillRenderPass.vertexShader,\n );\n }\n if (renderPass.strokeRenderPass) {\n renderPass.strokeRenderPass.program = this.helper_.getProgram(\n renderPass.strokeRenderPass.fragmentShader,\n renderPass.strokeRenderPass.vertexShader,\n );\n }\n if (renderPass.symbolRenderPass) {\n renderPass.symbolRenderPass.program = this.helper_.getProgram(\n renderPass.symbolRenderPass.fragmentShader,\n renderPass.symbolRenderPass.vertexShader,\n );\n }\n }\n this.helper_.addUniforms(this.uniforms_);\n\n if (buffers) {\n if (buffers.polygonBuffers) {\n this.helper_.flushBufferData(buffers.polygonBuffers[0]);\n this.helper_.flushBufferData(buffers.polygonBuffers[1]);\n this.helper_.flushBufferData(buffers.polygonBuffers[2]);\n }\n if (buffers.lineStringBuffers) {\n this.helper_.flushBufferData(buffers.lineStringBuffers[0]);\n this.helper_.flushBufferData(buffers.lineStringBuffers[1]);\n this.helper_.flushBufferData(buffers.lineStringBuffers[2]);\n }\n if (buffers.pointBuffers) {\n this.helper_.flushBufferData(buffers.pointBuffers[0]);\n this.helper_.flushBufferData(buffers.pointBuffers[1]);\n this.helper_.flushBufferData(buffers.pointBuffers[2]);\n }\n }\n }\n}\n\nexport default VectorStyleRenderer;\n\n/**\n * Breaks down a vector style into an array of prebuilt shader builders with attributes and uniforms\n * @param {FlatStyleLike|StyleShaders|Array<StyleShaders>} style Vector style\n * @param {import('../../style/flat.js').StyleVariables} variables Style variables\n * @return {Array<StyleShaders>} Array of style shaders\n */\nexport function convertStyleToShaders(style, variables) {\n // possible cases:\n // - single shader\n // - multiple shaders\n // - single style\n // - multiple styles\n // - multiple rules\n const asArray = Array.isArray(style) ? style : [style];\n\n // if array of rules: break rules into separate styles, compute \"else\" filters\n if ('style' in asArray[0]) {\n /** @type {Array<StyleShaders>} */\n const shaders = [];\n const rules = /** @type {Array<FlatStyleRule>} */ (asArray);\n const previousFilters = [];\n for (const rule of rules) {\n /** @type {Array<FlatStyle>} */\n const ruleStyles = Array.isArray(rule.style) ? rule.style : [rule.style];\n /** @type {import(\"../../expr/expression.js\").EncodedExpression} */\n let currentFilter = rule.filter;\n if (rule.else && previousFilters.length) {\n currentFilter = [\n 'all',\n ...previousFilters.map((filter) => ['!', filter]),\n ];\n if (rule.filter) {\n currentFilter.push(rule.filter);\n }\n if (currentFilter.length < 3) {\n currentFilter = currentFilter[1];\n }\n }\n if (rule.filter) {\n previousFilters.push(rule.filter);\n }\n // parse each style and convert to shader\n const styleShaders = ruleStyles.map((style) =>\n parseLiteralStyle(style, variables, currentFilter),\n );\n shaders.push(...styleShaders);\n }\n return shaders;\n }\n\n // if array of shaders: return as is\n if ('builder' in asArray[0]) {\n return /** @type {Array<StyleShaders>} */ (asArray);\n }\n\n // array of flat styles: simply convert to shaders\n return /** @type {Array<FlatStyle>} */ (asArray).map((style) =>\n parseLiteralStyle(style, variables, null),\n );\n}\n", "/**\n * A wrapper class to simplify rendering to a texture instead of the final canvas\n * @module ol/webgl/RenderTarget\n */\nimport {equals} from '../array.js';\n\n// for pixel color reading\nconst tmpArray4 = new Uint8Array(4);\n\n/**\n * @classdesc\n * This class is a wrapper around the association of both a `WebGLTexture` and a `WebGLFramebuffer` instances,\n * simplifying initialization and binding for rendering.\n */\nclass WebGLRenderTarget {\n /**\n * @param {import(\"./Helper.js\").default} helper WebGL helper; mandatory.\n * @param {Array<number>} [size] Expected size of the render target texture; note: this can be changed later on.\n */\n constructor(helper, size) {\n /**\n * @private\n * @type {import(\"./Helper.js\").default}\n */\n this.helper_ = helper;\n const gl = helper.getGL();\n\n /**\n * @private\n * @type {WebGLTexture}\n */\n this.texture_ = gl.createTexture();\n\n /**\n * @private\n * @type {WebGLFramebuffer}\n */\n this.framebuffer_ = gl.createFramebuffer();\n\n /**\n * @private\n * @type {WebGLRenderbuffer}\n */\n this.depthbuffer_ = gl.createRenderbuffer();\n\n /**\n * @type {Array<number>}\n * @private\n */\n this.size_ = size || [1, 1];\n\n /**\n * @type {Uint8Array}\n * @private\n */\n this.data_ = new Uint8Array(0);\n\n /**\n * @type {boolean}\n * @private\n */\n this.dataCacheDirty_ = true;\n\n this.updateSize_();\n }\n\n /**\n * Changes the size of the render target texture. Note: will do nothing if the size\n * is already the same.\n * @param {Array<number>} size Expected size of the render target texture\n */\n setSize(size) {\n if (equals(size, this.size_)) {\n return;\n }\n this.size_[0] = size[0];\n this.size_[1] = size[1];\n this.updateSize_();\n }\n\n /**\n * Returns the size of the render target texture\n * @return {Array<number>} Size of the render target texture\n */\n getSize() {\n return this.size_;\n }\n\n /**\n * This will cause following calls to `#readAll` or `#readPixel` to download the content of the\n * render target into memory, which is an expensive operation.\n * This content will be kept in cache but should be cleared after each new render.\n */\n clearCachedData() {\n this.dataCacheDirty_ = true;\n }\n\n /**\n * Returns the full content of the frame buffer as a series of r, g, b, a components\n * in the 0-255 range (unsigned byte).\n * @return {Uint8Array} Integer array of color values\n */\n readAll() {\n if (this.dataCacheDirty_) {\n const size = this.size_;\n const gl = this.helper_.getGL();\n\n gl.bindFramebuffer(gl.FRAMEBUFFER, this.framebuffer_);\n gl.readPixels(\n 0,\n 0,\n size[0],\n size[1],\n gl.RGBA,\n gl.UNSIGNED_BYTE,\n this.data_,\n );\n this.dataCacheDirty_ = false;\n }\n return this.data_;\n }\n\n /**\n * Reads one pixel of the frame buffer as an array of r, g, b, a components\n * in the 0-255 range (unsigned byte).\n * If x and/or y are outside of existing data, an array filled with 0 is returned.\n * @param {number} x Pixel coordinate\n * @param {number} y Pixel coordinate\n * @return {Uint8Array} Integer array with one color value (4 components)\n */\n readPixel(x, y) {\n if (x < 0 || y < 0 || x > this.size_[0] || y >= this.size_[1]) {\n tmpArray4[0] = 0;\n tmpArray4[1] = 0;\n tmpArray4[2] = 0;\n tmpArray4[3] = 0;\n return tmpArray4;\n }\n\n this.readAll();\n const index =\n Math.floor(x) + (this.size_[1] - Math.floor(y) - 1) * this.size_[0];\n tmpArray4[0] = this.data_[index * 4];\n tmpArray4[1] = this.data_[index * 4 + 1];\n tmpArray4[2] = this.data_[index * 4 + 2];\n tmpArray4[3] = this.data_[index * 4 + 3];\n return tmpArray4;\n }\n\n /**\n * @return {WebGLTexture} Texture to render to\n */\n getTexture() {\n return this.texture_;\n }\n\n /**\n * @return {WebGLFramebuffer} Frame buffer of the render target\n */\n getFramebuffer() {\n return this.framebuffer_;\n }\n\n /**\n * @return {WebGLRenderbuffer} Depth buffer of the render target\n */\n getDepthbuffer() {\n return this.depthbuffer_;\n }\n\n /**\n * @private\n */\n updateSize_() {\n const size = this.size_;\n const gl = this.helper_.getGL();\n\n this.texture_ = this.helper_.createTexture(size, null, this.texture_);\n\n gl.bindFramebuffer(gl.FRAMEBUFFER, this.framebuffer_);\n gl.viewport(0, 0, size[0], size[1]);\n gl.framebufferTexture2D(\n gl.FRAMEBUFFER,\n gl.COLOR_ATTACHMENT0,\n gl.TEXTURE_2D,\n this.texture_,\n 0,\n );\n\n gl.bindRenderbuffer(gl.RENDERBUFFER, this.depthbuffer_);\n gl.renderbufferStorage(\n gl.RENDERBUFFER,\n gl.DEPTH_COMPONENT16,\n size[0],\n size[1],\n );\n gl.framebufferRenderbuffer(\n gl.FRAMEBUFFER,\n gl.DEPTH_ATTACHMENT,\n gl.RENDERBUFFER,\n this.depthbuffer_,\n );\n\n this.data_ = new Uint8Array(size[0] * size[1] * 4);\n }\n}\n\nexport default WebGLRenderTarget;\n", "import {getWidth} from '../../extent.js';\n\n/**\n * Compute world params\n * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n * @param {any} layer The layer\n * @return {Array<number>} The world start, end and width.\n */\nexport function getWorldParameters(frameState, layer) {\n const projection = frameState.viewState.projection;\n\n const vectorSource = layer.getSource();\n const multiWorld = vectorSource.getWrapX() && projection.canWrapX();\n const projectionExtent = projection.getExtent();\n\n const extent = frameState.extent;\n const worldWidth = multiWorld ? getWidth(projectionExtent) : null;\n const endWorld = multiWorld\n ? Math.ceil((extent[2] - projectionExtent[2]) / worldWidth) + 1\n : 1;\n\n const startWorld = multiWorld\n ? Math.floor((extent[0] - projectionExtent[0]) / worldWidth)\n : 0;\n\n return [startWorld, endWorld, worldWidth];\n}\n", "/**\n * @module ol/renderer/webgl/VectorLayer\n */\nimport ViewHint from '../../ViewHint.js';\nimport {assert} from '../../asserts.js';\nimport {listen, unlistenByKey} from '../../events.js';\nimport {buffer, createEmpty, equals} from '../../extent.js';\nimport BaseVector from '../../layer/BaseVector.js';\nimport {\n getTransformFromProjections,\n getUserProjection,\n toUserExtent,\n toUserResolution,\n} from '../../proj.js';\nimport MixedGeometryBatch from '../../render/webgl/MixedGeometryBatch.js';\nimport VectorStyleRenderer from '../../render/webgl/VectorStyleRenderer.js';\nimport {colorDecodeId} from '../../render/webgl/encodeUtil.js';\nimport VectorEventType from '../../source/VectorEventType.js';\nimport {\n apply as applyTransform,\n create as createTransform,\n makeInverse as makeInverseTransform,\n multiply as multiplyTransform,\n setFromArray as setFromTransform,\n translate as translateTransform,\n} from '../../transform.js';\nimport {\n create as createMat4,\n fromTransform as mat4FromTransform,\n} from '../../vec/mat4.js';\nimport {DefaultUniform} from '../../webgl/Helper.js';\nimport WebGLRenderTarget from '../../webgl/RenderTarget.js';\nimport WebGLLayerRenderer from './Layer.js';\nimport {getWorldParameters} from './worldUtil.js';\n\nexport const Uniforms = {\n ...DefaultUniform,\n RENDER_EXTENT: 'u_renderExtent', // intersection of layer, source, and view extent\n PATTERN_ORIGIN: 'u_patternOrigin',\n GLOBAL_ALPHA: 'u_globalAlpha',\n};\n\n/**\n * @typedef {import('../../render/webgl/VectorStyleRenderer.js').StyleShaders} StyleShaders\n */\n/**\n * @typedef {import('../../style/flat.js').FlatStyleLike | Array<StyleShaders> | StyleShaders} LayerStyle\n */\n\n/**\n * @typedef {Object} Options\n * @property {string} [className='ol-layer'] A CSS class name to set to the canvas element.\n * @property {LayerStyle} style Flat vector style; also accepts shaders\n * @property {Object<string, number|Array<number>|string|boolean>} variables Style variables\n * @property {boolean} [disableHitDetection=false] Setting this to true will provide a slight performance boost, but will\n * prevent all hit detection on the layer.\n * @property {Array<import(\"./Layer\").PostProcessesOptions>} [postProcesses] Post-processes definitions\n */\n\n/**\n * @classdesc\n * Experimental WebGL vector renderer. Supports polygons, lines and points:\n * Polygons are broken down into triangles\n * Lines are rendered as strips of quads\n * Points are rendered as quads\n *\n * You need to provide vertex and fragment shaders as well as custom attributes for each type of geometry. All shaders\n * can access the uniforms in the {@link module:ol/webgl/Helper~DefaultUniform} enum.\n * The vertex shaders can access the following attributes depending on the geometry type:\n * For polygons: {@link module:ol/render/webgl/PolygonBatchRenderer~Attributes}\n * For line strings: {@link module:ol/render/webgl/LineStringBatchRenderer~Attributes}\n * For points: {@link module:ol/render/webgl/PointBatchRenderer~Attributes}\n *\n * Please note that the fragment shaders output should have premultiplied alpha, otherwise visual anomalies may occur.\n *\n * Note: this uses {@link module:ol/webgl/Helper~WebGLHelper} internally.\n */\nclass WebGLVectorLayerRenderer extends WebGLLayerRenderer {\n /**\n * @param {import(\"../../layer/Layer.js\").default} layer Layer.\n * @param {Options} options Options.\n */\n constructor(layer, options) {\n const uniforms = {\n [Uniforms.RENDER_EXTENT]: [0, 0, 0, 0],\n [Uniforms.PATTERN_ORIGIN]: [0, 0],\n [Uniforms.GLOBAL_ALPHA]: 1,\n };\n\n super(layer, {\n uniforms: uniforms,\n postProcesses: options.postProcesses,\n });\n\n /**\n * @type {boolean}\n * @private\n */\n this.hitDetectionEnabled_ = !options.disableHitDetection;\n\n /**\n * @type {WebGLRenderTarget}\n * @private\n */\n this.hitRenderTarget_;\n\n /**\n * @private\n */\n this.sourceRevision_ = -1;\n\n /**\n * @private\n */\n this.previousExtent_ = createEmpty();\n\n /**\n * This transform is updated on every frame and is the composition of:\n * - invert of the world->screen transform that was used when rebuilding buffers (see `this.renderTransform_`)\n * - current world->screen transform\n * @type {import(\"../../transform.js\").Transform}\n * @private\n */\n this.currentTransform_ = createTransform();\n\n /**\n * @private\n */\n this.tmpCoords_ = [0, 0];\n /**\n * @private\n */\n this.tmpTransform_ = createTransform();\n /**\n * @private\n */\n this.tmpMat4_ = createMat4();\n\n /**\n * @type {import(\"../../transform.js\").Transform}\n * @private\n */\n this.currentFrameStateTransform_ = createTransform();\n\n /**\n * @type {import('../../style/flat.js').StyleVariables}\n * @private\n */\n this.styleVariables_ = {};\n\n /**\n * @type {LayerStyle}\n * @private\n */\n this.style_ = [];\n\n /**\n * @type {VectorStyleRenderer}\n * @public\n */\n this.styleRenderer_ = null;\n\n /**\n * @type {import('../../render/webgl/VectorStyleRenderer.js').WebGLBuffers}\n * @private\n */\n this.buffers_ = null;\n\n this.applyOptions_(options);\n\n /**\n * @private\n */\n this.batch_ = new MixedGeometryBatch();\n\n /**\n * @private\n * @type {boolean}\n */\n this.initialFeaturesAdded_ = false;\n\n /**\n * @private\n * @type {Array<import(\"../../events.js\").EventsKey|null>}\n */\n this.sourceListenKeys_ = null;\n }\n\n /**\n * @private\n * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n */\n addInitialFeatures_(frameState) {\n const source = this.getLayer().getSource();\n const userProjection = getUserProjection();\n let projectionTransform;\n if (userProjection) {\n projectionTransform = getTransformFromProjections(\n userProjection,\n frameState.viewState.projection,\n );\n }\n this.batch_.addFeatures(source.getFeatures(), projectionTransform);\n this.sourceListenKeys_ = [\n listen(\n source,\n VectorEventType.ADDFEATURE,\n this.handleSourceFeatureAdded_.bind(this, projectionTransform),\n ),\n listen(\n source,\n VectorEventType.CHANGEFEATURE,\n this.handleSourceFeatureChanged_.bind(this, projectionTransform),\n this,\n ),\n listen(\n source,\n VectorEventType.REMOVEFEATURE,\n this.handleSourceFeatureDelete_,\n this,\n ),\n listen(\n source,\n VectorEventType.CLEAR,\n this.handleSourceFeatureClear_,\n this,\n ),\n ];\n }\n\n /**\n * @param {Options} options Options.\n * @private\n */\n applyOptions_(options) {\n this.styleVariables_ = options.variables;\n this.style_ = options.style;\n }\n\n /**\n * @private\n */\n createRenderers_() {\n this.buffers_ = null;\n this.styleRenderer_ = new VectorStyleRenderer(\n this.style_,\n this.styleVariables_,\n this.helper,\n this.hitDetectionEnabled_,\n );\n }\n\n /**\n * @override\n */\n reset(options) {\n this.applyOptions_(options);\n if (this.helper) {\n this.createRenderers_();\n }\n super.reset(options);\n }\n\n /**\n * @override\n */\n afterHelperCreated() {\n if (this.styleRenderer_) {\n // To reuse buffers\n this.styleRenderer_.setHelper(this.helper, this.buffers_);\n } else {\n this.createRenderers_();\n }\n\n if (this.hitDetectionEnabled_) {\n this.hitRenderTarget_ = new WebGLRenderTarget(this.helper);\n }\n }\n\n /**\n * @param {import(\"../../proj.js\").TransformFunction} projectionTransform Transform function.\n * @param {import(\"../../source/Vector.js\").VectorSourceEvent} event Event.\n * @private\n */\n handleSourceFeatureAdded_(projectionTransform, event) {\n const feature = event.feature;\n this.batch_.addFeature(feature, projectionTransform);\n }\n\n /**\n * @param {import(\"../../proj.js\").TransformFunction} projectionTransform Transform function.\n * @param {import(\"../../source/Vector.js\").VectorSourceEvent} event Event.\n * @private\n */\n handleSourceFeatureChanged_(projectionTransform, event) {\n const feature = event.feature;\n this.batch_.changeFeature(feature, projectionTransform);\n }\n\n /**\n * @param {import(\"../../source/Vector.js\").VectorSourceEvent} event Event.\n * @private\n */\n handleSourceFeatureDelete_(event) {\n const feature = event.feature;\n this.batch_.removeFeature(feature);\n }\n\n /**\n * @private\n */\n handleSourceFeatureClear_() {\n this.batch_.clear();\n }\n\n /**\n * @param {import(\"../../transform.js\").Transform} batchInvertTransform Inverse of the transformation in which geometries are expressed\n * @private\n */\n applyUniforms_(batchInvertTransform) {\n // world to screen matrix\n setFromTransform(this.tmpTransform_, this.currentFrameStateTransform_);\n multiplyTransform(this.tmpTransform_, batchInvertTransform);\n this.helper.setUniformMatrixValue(\n Uniforms.PROJECTION_MATRIX,\n mat4FromTransform(this.tmpMat4_, this.tmpTransform_),\n );\n\n // screen to world matrix\n makeInverseTransform(this.tmpTransform_, this.tmpTransform_);\n this.helper.setUniformMatrixValue(\n Uniforms.SCREEN_TO_WORLD_MATRIX,\n mat4FromTransform(this.tmpMat4_, this.tmpTransform_),\n );\n\n // pattern origin should always be [0, 0] in world coordinates\n this.tmpCoords_[0] = 0;\n this.tmpCoords_[1] = 0;\n makeInverseTransform(this.tmpTransform_, batchInvertTransform);\n applyTransform(this.tmpTransform_, this.tmpCoords_);\n this.helper.setUniformFloatVec2(Uniforms.PATTERN_ORIGIN, this.tmpCoords_);\n }\n\n /**\n * Render the layer.\n * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n * @return {HTMLElement} The rendered element.\n * @override\n */\n renderFrame(frameState) {\n const gl = this.helper.getGL();\n this.preRender(gl, frameState);\n\n const [startWorld, endWorld, worldWidth] = getWorldParameters(\n frameState,\n this.getLayer(),\n );\n\n // draw the normal canvas\n this.helper.prepareDraw(frameState);\n this.renderWorlds(frameState, false, startWorld, endWorld, worldWidth);\n this.helper.finalizeDraw(\n frameState,\n this.dispatchPreComposeEvent,\n this.dispatchPostComposeEvent,\n );\n\n const canvas = this.helper.getCanvas();\n\n if (this.hitDetectionEnabled_) {\n this.renderWorlds(frameState, true, startWorld, endWorld, worldWidth);\n this.hitRenderTarget_.clearCachedData();\n }\n\n this.postRender(gl, frameState);\n\n return canvas;\n }\n\n /**\n * Determine whether renderFrame should be called.\n * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n * @return {boolean} Layer is ready to be rendered.\n * @override\n */\n prepareFrameInternal(frameState) {\n if (!this.initialFeaturesAdded_) {\n this.addInitialFeatures_(frameState);\n this.initialFeaturesAdded_ = true;\n }\n\n const layer = this.getLayer();\n const vectorSource = layer.getSource();\n const viewState = frameState.viewState;\n const viewNotMoving =\n !frameState.viewHints[ViewHint.ANIMATING] &&\n !frameState.viewHints[ViewHint.INTERACTING];\n const extentChanged = !equals(this.previousExtent_, frameState.extent);\n const sourceChanged = this.sourceRevision_ < vectorSource.getRevision();\n\n if (sourceChanged) {\n this.sourceRevision_ = vectorSource.getRevision();\n }\n\n if (viewNotMoving && (extentChanged || sourceChanged)) {\n const projection = viewState.projection;\n const resolution = viewState.resolution;\n\n const renderBuffer =\n layer instanceof BaseVector ? layer.getRenderBuffer() : 0;\n const extent = buffer(frameState.extent, renderBuffer * resolution);\n\n const userProjection = getUserProjection();\n if (userProjection) {\n vectorSource.loadFeatures(\n toUserExtent(extent, userProjection),\n toUserResolution(resolution, projection),\n userProjection,\n );\n } else {\n vectorSource.loadFeatures(extent, resolution, projection);\n }\n\n this.ready = false;\n\n const transform = this.helper.makeProjectionTransform(\n frameState,\n createTransform(),\n );\n\n this.styleRenderer_\n .generateBuffers(this.batch_, transform)\n .then((buffers) => {\n if (this.buffers_) {\n this.disposeBuffers(this.buffers_);\n }\n this.buffers_ = buffers;\n this.ready = true;\n this.getLayer().changed();\n });\n\n this.previousExtent_ = frameState.extent.slice();\n }\n\n return true;\n }\n\n /**\n * Render the world, either to the main framebuffer or to the hit framebuffer\n * @param {import(\"../../Map.js\").FrameState} frameState current frame state\n * @param {boolean} forHitDetection whether the rendering is for hit detection\n * @param {number} startWorld the world to render in the first iteration\n * @param {number} endWorld the last world to render\n * @param {number} worldWidth the width of the worlds being rendered\n */\n renderWorlds(frameState, forHitDetection, startWorld, endWorld, worldWidth) {\n let world = startWorld;\n\n if (forHitDetection) {\n this.hitRenderTarget_.setSize([\n Math.floor(frameState.size[0] / 2),\n Math.floor(frameState.size[1] / 2),\n ]);\n this.helper.prepareDrawToRenderTarget(\n frameState,\n this.hitRenderTarget_,\n true,\n );\n }\n\n do {\n this.helper.makeProjectionTransform(\n frameState,\n this.currentFrameStateTransform_,\n );\n translateTransform(\n this.currentFrameStateTransform_,\n world * worldWidth,\n 0,\n );\n if (!this.buffers_) {\n continue;\n }\n this.styleRenderer_.render(this.buffers_, frameState, () => {\n this.applyUniforms_(this.buffers_.invertVerticesTransform);\n this.helper.applyHitDetectionUniform(forHitDetection);\n });\n } while (++world < endWorld);\n }\n\n /**\n * @param {import(\"../../coordinate.js\").Coordinate} coordinate Coordinate.\n * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n * @param {number} hitTolerance Hit tolerance in pixels.\n * @param {import(\"../vector.js\").FeatureCallback<T>} callback Feature callback.\n * @param {Array<import(\"../Map.js\").HitMatch<T>>} matches The hit detected matches with tolerance.\n * @return {T|undefined} Callback result.\n * @template T\n * @override\n */\n forEachFeatureAtCoordinate(\n coordinate,\n frameState,\n hitTolerance,\n callback,\n matches,\n ) {\n assert(\n this.hitDetectionEnabled_,\n '`forEachFeatureAtCoordinate` cannot be used on a WebGL layer if the hit detection logic has been disabled using the `disableHitDetection: true` option.',\n );\n if (!this.styleRenderer_ || !this.hitDetectionEnabled_) {\n return undefined;\n }\n\n const pixel = applyTransform(\n frameState.coordinateToPixelTransform,\n coordinate.slice(),\n );\n\n const data = this.hitRenderTarget_.readPixel(pixel[0] / 2, pixel[1] / 2);\n const color = [data[0] / 255, data[1] / 255, data[2] / 255, data[3] / 255];\n const ref = colorDecodeId(color);\n const feature = this.batch_.getFeatureFromRef(ref);\n if (feature) {\n return callback(feature, this.getLayer(), null);\n }\n return undefined;\n }\n\n /**\n * Will release a set of Webgl buffers\n * @param {import('../../render/webgl/VectorStyleRenderer.js').WebGLBuffers} buffers Buffers\n */\n disposeBuffers(buffers) {\n /**\n * @param {Array<import('../../webgl/Buffer.js').default>} typeBuffers Buffers\n */\n const disposeBuffersOfType = (typeBuffers) => {\n for (const buffer of typeBuffers) {\n if (buffer) {\n this.helper.deleteBuffer(buffer);\n }\n }\n };\n if (buffers.pointBuffers) {\n disposeBuffersOfType(buffers.pointBuffers);\n }\n if (buffers.lineStringBuffers) {\n disposeBuffersOfType(buffers.lineStringBuffers);\n }\n if (buffers.polygonBuffers) {\n disposeBuffersOfType(buffers.polygonBuffers);\n }\n }\n\n /**\n * Clean up.\n * @override\n */\n disposeInternal() {\n if (this.buffers_) {\n this.disposeBuffers(this.buffers_);\n }\n if (this.sourceListenKeys_) {\n this.sourceListenKeys_.forEach(function (key) {\n unlistenByKey(key);\n });\n this.sourceListenKeys_ = null;\n }\n super.disposeInternal();\n }\n\n renderDeclutter() {}\n}\n\nexport default WebGLVectorLayerRenderer;\n", "/**\n * @module ol/layer/Heatmap\n */\nimport {createCanvasContext2D} from '../dom.js';\nimport {BooleanType, NumberType} from '../expr/expression.js';\nimport {newCompilationContext} from '../expr/gpu.js';\nimport {clamp} from '../math.js';\nimport {ShaderBuilder} from '../render/webgl/ShaderBuilder.js';\nimport {\n applyContextToBuilder,\n expressionToGlsl,\n generateAttributesFromContext,\n generateUniformsFromContext,\n} from '../render/webgl/compileUtil.js';\nimport WebGLVectorLayerRenderer from '../renderer/webgl/VectorLayer.js';\nimport BaseVector from './BaseVector.js';\n\n/**\n * @typedef {'change:blur'|'change:radius'|'change:gradient'} HeatmapEventTypes\n */\n\n/***\n * @template Return\n * @typedef {import(\"../Observable\").OnSignature<import(\"../Observable\").EventTypes, import(\"../events/Event.js\").default, Return> &\n * import(\"../Observable\").OnSignature<import(\"./Base\").BaseLayerObjectEventTypes|\n * import(\"./Layer.js\").LayerEventType|HeatmapEventTypes, import(\"../Object\").ObjectEvent, Return> &\n * import(\"../Observable\").OnSignature<import(\"../render/EventType\").LayerRenderEventTypes, import(\"../render/Event\").default, Return> &\n * import(\"../Observable\").CombinedOnSignature<import(\"../Observable\").EventTypes|import(\"./Base\").BaseLayerObjectEventTypes|\n * import(\"./Layer.js\").LayerEventType|HeatmapEventTypes|import(\"../render/EventType\").LayerRenderEventTypes, Return>} HeatmapOnSignature\n */\n\n/**\n * @typedef {import(\"../style/flat.js\").NumberExpression|string|function(import(\"../Feature.js\").default):number} WeightExpression\n */\n\n/**\n * @template {import(\"../Feature.js\").FeatureLike} [FeatureType=import(\"../Feature.js\").default]\n * @template {import(\"../source/Vector.js\").default<FeatureType>} [VectorSourceType=import(\"../source/Vector.js\").default<FeatureType>]\n * @typedef {Object} Options\n * @property {string} [className='ol-layer'] A CSS class name to set to the layer element.\n * @property {number} [opacity=1] Opacity (0, 1).\n * @property {boolean} [visible=true] Visibility.\n * @property {import(\"../extent.js\").Extent} [extent] The bounding extent for layer rendering. The layer will not be\n * rendered outside of this extent.\n * @property {number} [zIndex] The z-index for layer rendering. At rendering time, the layers\n * will be ordered, first by Z-index and then by position. When `undefined`, a `zIndex` of 0 is assumed\n * for layers that are added to the map's `layers` collection, or `Infinity` when the layer's `setMap()`\n * method was used.\n * @property {number} [minResolution] The minimum resolution (inclusive) at which this layer will be\n * visible.\n * @property {number} [maxResolution] The maximum resolution (exclusive) below which this layer will\n * be visible.\n * @property {number} [minZoom] The minimum view zoom level (exclusive) above which this layer will be\n * visible.\n * @property {number} [maxZoom] The maximum view zoom level (inclusive) at which this layer will\n * be visible.\n * @property {Array<string>} [gradient=['#00f', '#0ff', '#0f0', '#ff0', '#f00']] The color gradient\n * of the heatmap, specified as an array of CSS color strings.\n * @property {import(\"../style/flat.js\").NumberExpression} [radius=8] Radius size in pixels. Note that for LineStrings,\n * the width of the line will be double the radius.\n * @property {import(\"../style/flat.js\").NumberExpression} [blur=15] Blur size in pixels. This is added to the `radius`\n * parameter above to create the final size of the blur effect.\n * @property {WeightExpression} [weight='weight'] The feature\n * attribute to use for the weight. This also supports expressions returning a number or a function that returns a weight from a feature. Weight values\n * should range from 0 to 1 (and values outside will be clamped to that range).\n * @property {import(\"../style/flat.js\").BooleanExpression} [filter] Optional filter expression.\n * @property {Object<string, number|Array<number>|string|boolean>} [variables] Variables used in expressions (optional)\n * @property {VectorSourceType} [source] Point source.\n * @property {Object<string, *>} [properties] Arbitrary observable properties. Can be accessed with `#get()` and `#set()`.\n */\n\n/**\n * @enum {string}\n * @private\n */\nconst Property = {\n BLUR: 'blur',\n GRADIENT: 'gradient',\n RADIUS: 'radius',\n};\n\n/**\n * @const\n * @type {Array<string>}\n */\nconst DEFAULT_GRADIENT = ['#00f', '#0ff', '#0f0', '#ff0', '#f00'];\n\n/**\n * @classdesc\n * Layer for rendering vector data as a heatmap.\n * Note that any property set in the options is set as a {@link module:ol/Object~BaseObject}\n * property on the layer object; for example, setting `title: 'My Title'` in the\n * options means that `title` is observable, and has get/set accessors.\n *\n * @fires import(\"../render/Event.js\").RenderEvent#prerender\n * @fires import(\"../render/Event.js\").RenderEvent#postrender\n * @template {import(\"../Feature.js\").FeatureLike} [FeatureType=import(\"../Feature.js\").default]\n * @template {import(\"../source/Vector.js\").default<FeatureType>} [VectorSourceType=import(\"../source/Vector.js\").default<FeatureType>]\n * @extends {BaseVector<FeatureType, VectorSourceType, WebGLVectorLayerRenderer>}\n * @api\n */\nclass Heatmap extends BaseVector {\n /**\n * @param {Options<FeatureType, VectorSourceType>} [options] Options.\n */\n constructor(options) {\n options = options ? options : {};\n\n const baseOptions = Object.assign({}, options);\n\n delete baseOptions.gradient;\n delete baseOptions.radius;\n delete baseOptions.blur;\n delete baseOptions.weight;\n super(baseOptions);\n\n /***\n * @type {HeatmapOnSignature<import(\"../events\").EventsKey>}\n */\n this.on;\n\n /***\n * @type {HeatmapOnSignature<import(\"../events\").EventsKey>}\n */\n this.once;\n\n /***\n * @type {HeatmapOnSignature<void>}\n */\n this.un;\n\n this.filter_ = options.filter ?? true;\n\n /**\n * @type {import('../style/flat.js').StyleVariables}\n * @private\n */\n this.styleVariables_ = options.variables || {};\n\n /**\n * @private\n * @type {HTMLCanvasElement|OffscreenCanvas}\n */\n this.gradient_ = null;\n\n this.addChangeListener(Property.GRADIENT, this.handleGradientChanged_);\n\n this.setGradient(options.gradient ? options.gradient : DEFAULT_GRADIENT);\n\n this.setBlur(options.blur !== undefined ? options.blur : 15);\n\n this.setRadius(options.radius !== undefined ? options.radius : 8);\n\n const weight = options.weight ? options.weight : 'weight';\n\n /**\n * @private\n */\n this.weight_ = weight;\n\n // For performance reasons, don't sort the features before rendering.\n // The render order is not relevant for a heatmap representation.\n this.setRenderOrder(null);\n }\n\n /**\n * Return the blur size in pixels.\n * @return {import(\"../style/flat.js\").NumberExpression} Blur size in pixels.\n * @api\n * @observable\n */\n getBlur() {\n return /** @type {import(\"../style/flat.js\").NumberExpression} */ (\n this.get(Property.BLUR)\n );\n }\n\n /**\n * Return the gradient colors as array of strings.\n * @return {Array<string>} Colors.\n * @api\n * @observable\n */\n getGradient() {\n return /** @type {Array<string>} */ (this.get(Property.GRADIENT));\n }\n\n /**\n * Return the size of the radius in pixels.\n * @return {import(\"../style/flat.js\").NumberExpression} Radius size in pixel.\n * @api\n * @observable\n */\n getRadius() {\n return /** @type {import(\"../style/flat.js\").NumberExpression} */ (\n this.get(Property.RADIUS)\n );\n }\n\n /**\n * @private\n */\n handleGradientChanged_() {\n this.gradient_ = createGradient(this.getGradient());\n }\n\n /**\n * Set the blur size in pixels.\n * @param {import(\"../style/flat.js\").NumberExpression} blur Blur size in pixels (supports expressions).\n * @api\n * @observable\n */\n setBlur(blur) {\n const previousValue = this.get(Property.BLUR);\n this.set(Property.BLUR, blur);\n // if the value stays numerical, simply refresh the layer\n if (typeof blur === 'number' && typeof previousValue === 'number') {\n this.changed();\n return;\n }\n this.clearRenderer();\n }\n\n /**\n * Set the gradient colors as array of strings.\n * @param {Array<string>} colors Gradient.\n * @api\n * @observable\n */\n setGradient(colors) {\n this.set(Property.GRADIENT, colors);\n }\n\n /**\n * Set the size of the radius in pixels.\n * @param {import(\"../style/flat.js\").NumberExpression} radius Radius size in pixel (supports expressions).\n * @api\n * @observable\n */\n setRadius(radius) {\n const previousValue = this.get(Property.RADIUS);\n this.set(Property.RADIUS, radius);\n // if the value stays numerical, simply refresh the layer\n if (typeof radius === 'number' && typeof previousValue === 'number') {\n this.changed();\n return;\n }\n this.clearRenderer();\n }\n\n /**\n * Set the filter expression\n * @param {import(\"../style/flat.js\").BooleanExpression} filter Filter expression\n * @api\n */\n setFilter(filter) {\n this.filter_ = filter;\n this.changed();\n this.clearRenderer();\n }\n\n /**\n * Set the weight expression\n * @param {WeightExpression} weight Weight expression\n * @api\n */\n setWeight(weight) {\n this.weight_ = weight;\n this.changed();\n this.clearRenderer();\n }\n\n /**\n * @override\n */\n createRenderer() {\n const builder = new ShaderBuilder();\n\n const context = newCompilationContext();\n const filterCompiled = expressionToGlsl(context, this.filter_, BooleanType);\n let radiusCompiled = expressionToGlsl(\n context,\n this.getRadius(),\n NumberType,\n );\n let blurCompiled = expressionToGlsl(context, this.getBlur(), NumberType);\n\n /** @type {import('../render/webgl/VectorStyleRenderer.js').UniformDefinitions} */\n const blurRadiusUniforms = {};\n if (typeof this.getBlur() === 'number') {\n blurCompiled = 'a_blur';\n blurRadiusUniforms['a_blur'] = () => this.getBlur();\n builder.addUniform('a_blur', 'float');\n }\n if (typeof this.getRadius() === 'number') {\n radiusCompiled = 'a_radius';\n blurRadiusUniforms['a_radius'] = () => this.getRadius();\n builder.addUniform('a_radius', 'float');\n }\n\n /** @type {import('../render/webgl/VectorStyleRenderer.js').AttributeDefinitions} */\n const weightAttribute = {};\n let weightExpression = null;\n if (\n typeof this.weight_ === 'string' ||\n typeof this.weight_ === 'function'\n ) {\n const weightFunction =\n typeof this.weight_ === 'string'\n ? (feature) => feature.get(this.weight_)\n : this.weight_;\n weightAttribute['prop_weight'] = {\n size: 1,\n callback: (feature) => {\n const weightValue = weightFunction(feature);\n return weightValue !== undefined ? clamp(weightValue, 0, 1) : 1;\n },\n };\n weightExpression = 'a_prop_weight';\n builder.addAttribute('a_prop_weight', 'float');\n } else {\n const clampedWeight = ['clamp', this.weight_, 0, 1];\n weightExpression = expressionToGlsl(context, clampedWeight, NumberType);\n }\n\n builder\n .addFragmentShaderFunction(\n `float getBlurSlope() {\n float blur = max(1., ${blurCompiled});\n float radius = ${radiusCompiled};\n return radius / blur;\n}`,\n )\n .setSymbolSizeExpression(`vec2(${radiusCompiled} + ${blurCompiled}) * 2.`)\n .setSymbolColorExpression(\n `vec4(smoothstep(0., 1., (1. - length(coordsPx * 2. / v_quadSizePx)) * getBlurSlope()) * ${weightExpression})`,\n )\n .setStrokeColorExpression(\n `vec4(smoothstep(0., 1., (1. - length(currentRadiusPx * 2. / v_width)) * getBlurSlope()) * ${weightExpression})`,\n )\n .setStrokeWidthExpression(`(${radiusCompiled} + ${blurCompiled}) * 2.`)\n .setFillColorExpression(`vec4(${weightExpression})`)\n .setFragmentDiscardExpression(`!${filterCompiled}`);\n\n applyContextToBuilder(builder, context);\n const attributes = generateAttributesFromContext(context);\n const uniforms = generateUniformsFromContext(context, this.styleVariables_);\n\n return new WebGLVectorLayerRenderer(this, {\n className: this.getClassName(),\n variables: this.styleVariables_,\n style: {\n builder,\n attributes: {\n ...attributes,\n ...weightAttribute,\n },\n uniforms: {\n ...uniforms,\n ...blurRadiusUniforms,\n },\n },\n disableHitDetection: false,\n postProcesses: [\n {\n fragmentShader: `\n precision mediump float;\n\n uniform sampler2D u_image;\n uniform sampler2D u_gradientTexture;\n uniform float u_opacity;\n\n varying vec2 v_texCoord;\n\n void main() {\n vec4 color = texture2D(u_image, v_texCoord);\n gl_FragColor.a = color.a * u_opacity;\n gl_FragColor.rgb = texture2D(u_gradientTexture, vec2(0.5, color.a)).rgb;\n gl_FragColor.rgb *= gl_FragColor.a;\n }`,\n uniforms: {\n u_gradientTexture: () => this.gradient_,\n u_opacity: () => this.getOpacity(),\n },\n },\n ],\n });\n }\n\n /**\n * Update any variables used by the layer style and trigger a re-render.\n * @param {import('../style/flat.js').StyleVariables} variables Variables to update.\n */\n updateStyleVariables(variables) {\n Object.assign(this.styleVariables_, variables);\n this.changed();\n }\n\n /**\n * @override\n */\n renderDeclutter() {}\n}\n\n/**\n * @param {Array<string>} colors A list of colored.\n * @return {HTMLCanvasElement|OffscreenCanvas} canvas with gradient texture.\n */\nfunction createGradient(colors) {\n const width = 1;\n const height = 256;\n const context = createCanvasContext2D(width, height);\n\n const gradient = context.createLinearGradient(0, 0, width, height);\n const step = 1 / (colors.length - 1);\n for (let i = 0, ii = colors.length; i < ii; ++i) {\n gradient.addColorStop(i * step, colors[i]);\n }\n\n context.fillStyle = gradient;\n context.fillRect(0, 0, width, height);\n\n return context.canvas;\n}\n\nexport default Heatmap;\n", "/** Vanilla JS geographic inputs\n * color, size, width, font, symboles, dash, arrow, pattern\n */\nimport ol_Object from 'ol/Object.js'\n\n/** Abstract base class; normally only used for creating subclasses and not instantiated in apps. \n * @constructor\n * @extends {ol_Object}\n * @param {*} options\n * @param {Element} [options.input] input element, if none create one\n * @param {string} [options.type] input type, if no input\n * @param {number} [options.min] input min, if no input\n * @param {number} [options.max] input max, if no input\n * @param {number} [options.step] input step, if no input\n * @param {string|number} [options.val] input value\n * @param {boolean} [options.checked] check input\n * @param {boolean} [options.hidden] the input is display:none\n * @param {boolean} [options.disabled] disable input\n * @param {Element} [options.parent] parent element, if no input\n */\nvar ol_ext_input_Base = class olextinputBase extends ol_Object {\n constructor(options) {\n options = options || {};\n super();\n\n var input = this.input = options.input;\n if (!input) {\n input = this.input = document.createElement('input');\n if (options.type) {\n input.setAttribute('type', options.type);\n }\n if (options.min !== undefined) {\n input.setAttribute('min', options.min);\n }\n if (options.max !== undefined) {\n input.setAttribute('max', options.max);\n }\n if (options.step !== undefined) {\n input.setAttribute('step', options.step);\n }\n if (options.parent) {\n options.parent.appendChild(input);\n }\n }\n if (options.disabled) {\n input.disabled = true;\n }\n if (options.checked !== undefined) {\n input.checked = !!options.checked;\n }\n if (options.val !== undefined) {\n input.value = options.val;\n }\n if (options.hidden) { \n input.classList.add('ol-input-hidden');\n }\n input.addEventListener('focus', function () {\n if (this.element)\n this.element.classList.add('ol-focus');\n }.bind(this));\n var tout;\n input.addEventListener('focusout', function () {\n if (this.element) {\n if (tout)\n clearTimeout(tout);\n tout = setTimeout(function () {\n this.element.classList.remove('ol-focus');\n }.bind(this), 0);\n }\n }.bind(this));\n }\n /** Listen to drag event\n * @param {Element} elt\n * @param {function} cback when draggin on the element\n * @private\n */\n _listenDrag(elt, cback) {\n var handle = function (e) {\n this.moving = true;\n this.element.classList.add('ol-moving');\n var listen = function (e) {\n if (e.type === 'pointerup') {\n document.removeEventListener('pointermove', listen);\n document.removeEventListener('pointerup', listen);\n document.removeEventListener('pointercancel', listen);\n setTimeout(function () {\n this.moving = false;\n this.element.classList.remove('ol-moving');\n }.bind(this));\n }\n if (e.target === elt)\n cback(e);\n e.stopPropagation();\n e.preventDefault();\n }.bind(this);\n document.addEventListener('pointermove', listen, false);\n document.addEventListener('pointerup', listen, false);\n document.addEventListener('pointercancel', listen, false);\n e.stopPropagation();\n e.preventDefault();\n }.bind(this);\n elt.addEventListener('mousedown', handle, false);\n elt.addEventListener('touchstart', handle, false);\n }\n /** Set the current value\n */\n setValue(v) {\n if (v !== undefined)\n this.input.value = v;\n this.input.dispatchEvent(new Event('change'));\n }\n /** Get the current getValue\n * @returns {string}\n */\n getValue() {\n return this.input.value;\n }\n /** Get the input element\n * @returns {Element}\n */\n getInputElement() {\n return this.input;\n }\n}\n\nexport default ol_ext_input_Base\n", "import ol_ext_input_Base from './Base.js'\n\n/** Checkbox input\n * @constructor\n * @extends {ol_ext_input_Base}\n * @fires check\n * @param {*} options\n * @param {string} [options.className]\n * @param {Element|string} [options.html] label content\n * @param {string} [options.after] label garnish (placed after)\n * @param {Element} [options.input] input element, if non create one\n * @param {Element} [options.parent] parent element, if create an input\n * @param {boolean} [options.autoClose=true]\n * @param {boolean} [options.visible=false] display the input\n */\nvar ol_ext_input_Checkbox = class olextinputCheckbox extends ol_ext_input_Base {\n constructor(options) {\n options = options || {};\n\n super(options);\n\n var label = this.element = document.createElement('label');\n if (options.html instanceof Element)\n label.appendChild(options.html);\n else if (options.html !== undefined)\n label.innerHTML = options.html;\n label.className = ('ol-ext-check ol-ext-checkbox ' + (options.className || '')).trim();\n\n if (this.input.parentNode)\n this.input.parentNode.insertBefore(label, this.input);\n label.appendChild(this.input);\n label.appendChild(document.createElement('span'));\n if (options.after) {\n label.appendChild(document.createTextNode(options.after));\n }\n\n // Handle change\n this.input.addEventListener('change', function () {\n this.dispatchEvent({ type: 'check', checked: this.input.checked, value: this.input.value });\n }.bind(this));\n\n }\n isChecked() {\n return this.input.checked;\n }\n}\n\nexport default ol_ext_input_Checkbox\n", "import ol_ext_input_Checkbox from './Checkbox.js'\n\n/** Switch input\n * @constructor\n * @extends {ol_ext_input_Checkbox}\n * @fires check\n * @param {*} options\n * @param {string} [options.className]\n * @param {Element} [options.input] input element, if non create one\n * @param {Element} [options.parent] parent element, if create an input\n */\nvar ol_ext_input_Switch = class olextinputSwitch extends ol_ext_input_Checkbox {\n constructor(options) {\n options = options || {};\n\n super(options);\n\n this.element.className = ('ol-ext-toggle-switch ' + (options.className || '')).trim();\n }\n};\n \nexport default ol_ext_input_Switch\n", "import ol_ext_input_Checkbox from './Checkbox.js'\n\n/** Switch input\n * @constructor\n * @extends {ol_ext_input_Checkbox}\n * @fires check\n * @param {*} options\n * @param {string} [options.className]\n * @param {Element} [options.input] input element, if non create one\n * @param {Element} [options.parent] parent element, if create an input\n */\nvar ol_ext_input_Radio = class olextinputRadio extends ol_ext_input_Checkbox {\n constructor(options) {\n options = options || {};\n\n super(options);\n\n this.element.className = ('ol-ext-check ol-ext-radio ' + (options.className || '')).trim();\n }\n}\n \nexport default ol_ext_input_Radio\n", "/** Vanilla JS helper to manipulate DOM without jQuery\n * @see https://github.com/nefe/You-Dont-Need-jQuery\n * @see https://plainjs.com/javascript/\n * @see http://youmightnotneedjquery.com/\n */\nimport ol_Map from 'ol/Map.js'\nimport ol_ext_input_Checkbox from './input/Checkbox.js'\nimport ol_ext_input_Switch from './input/Switch.js'\nimport ol_ext_input_Radio from './input/Radio.js'\n\n/** @namespace ol.ext.element */\nvar ol_ext_element = {};\n\n/**\n * Create an element\n * @param {string} tagName The element tag, use 'TEXT' to create a text node\n * @param {*} options\n * @param {string} options.className className The element class name \n * @param {Element} options.parent Parent to append the element as child\n * @param {Element|string} [options.html] Content of the element (if text is not set)\n * @param {string} [options.text] Text content (if html is not set)\n * @param {Element|string} [options.options] when tagName = SELECT a list of options as key:value to add to the select\n * @param {string} options.* Any other attribut to add to the element\n */\nol_ext_element.create = function (tagName, options) {\n options = options || {};\n var elt;\n // Create text node\n if (tagName === 'TEXT') {\n elt = document.createTextNode(options.html||'');\n if (options.parent) options.parent.appendChild(elt);\n } else {\n // Other element\n elt = document.createElement(tagName.toLowerCase());\n if (/button/i.test(tagName)) elt.setAttribute('type', 'button');\n for (var attr in options) {\n switch (attr) {\n case 'className': {\n if (options.className && options.className.trim) elt.setAttribute('class', options.className.trim());\n break;\n }\n case 'text': {\n elt.innerText = options.text;\n break;\n }\n case 'html': {\n if (options.html instanceof Element) elt.appendChild(options.html)\n else if (options.html!==undefined) elt.innerHTML = options.html;\n break;\n }\n case 'parent': {\n if (options.parent) options.parent.appendChild(elt);\n break;\n }\n case 'options': {\n if (/select/i.test(tagName)) {\n for (var i in options.options) {\n ol_ext_element.create('OPTION', {\n html: i,\n value: options.options[i],\n parent: elt \n })\n }\n }\n break;\n }\n case 'style': {\n ol_ext_element.setStyle(elt, options.style);\n break;\n }\n case 'change':\n case 'click': {\n ol_ext_element.addListener(elt, attr, options[attr]);\n break;\n }\n case 'on': {\n for (var e in options.on) {\n ol_ext_element.addListener(elt, e, options.on[e]);\n }\n break;\n }\n case 'checked': {\n elt.checked = !!options.checked;\n break;\n }\n default: {\n elt.setAttribute(attr, options[attr]);\n break;\n }\n }\n }\n }\n return elt;\n};\n\n/** Create a toggle switch input\n * @param {*} options\n * @param {string|Element} options.html\n * @param {string|Element} options.after\n * @param {boolean} options.checked\n * @param {*} [options.on] a list of actions\n * @param {function} [options.click]\n * @param {function} [options.change]\n * @param {Element} options.parent\n */\nol_ext_element.createSwitch = function (options) {\n var input = ol_ext_element.create('INPUT', {\n type: 'checkbox',\n on: options.on,\n click: options.click,\n change: options.change,\n parent: options.parent\n });\n var opt = Object.assign ({ input: input }, options || {});\n new ol_ext_input_Switch(opt);\n return input;\n};\n\n/** Create a toggle switch input\n * @param {*} options\n * @param {string|Element} options.html\n * @param {string|Element} options.after\n * @param {string} [options.name] input name\n * @param {string} [options.type=checkbox] input type: radio or checkbox\n * @param {string} options.value input value\n * @param {*} [options.on] a list of actions\n * @param {function} [options.click]\n * @param {function} [options.change]\n * @param {Element} options.parent\n */\nol_ext_element.createCheck = function (options) {\n var input = ol_ext_element.create('INPUT', {\n name: options.name,\n type: (options.type==='radio' ? 'radio' : 'checkbox'),\n on: options.on,\n parent: options.parent\n });\n var opt = Object.assign ({ input: input }, options || {});\n if (options.type === 'radio') {\n new ol_ext_input_Radio(opt);\n } else {\n new ol_ext_input_Checkbox(opt);\n }\n return input;\n};\n\n/** Set inner html or append a child element to an element\n * @param {Element} element\n * @param {Element|string} html Content of the element\n */\nol_ext_element.setHTML = function(element, html) {\n if (html instanceof Element) element.appendChild(html)\n else if (html!==undefined) element.innerHTML = html;\n};\n\n/** Append text into an elemnt\n * @param {Element} element\n * @param {string} text text content\n */\nol_ext_element.appendText = function(element, text) {\n element.appendChild(document.createTextNode(text||''));\n};\n\n/**\n * Add a set of event listener to an element\n * @param {Element} element\n * @param {string|Array<string>} eventType\n * @param {function} fn\n */\nol_ext_element.addListener = function (element, eventType, fn, useCapture ) {\n if (typeof eventType === 'string') eventType = eventType.split(' ');\n eventType.forEach(function(e) {\n element.addEventListener(e, fn, useCapture);\n });\n};\n\n/**\n * Add a set of event listener to an element\n * @param {Element} element\n * @param {string|Array<string>} eventType\n * @param {function} fn\n */\nol_ext_element.removeListener = function (element, eventType, fn) {\n if (typeof eventType === 'string') eventType = eventType.split(' ');\n eventType.forEach(function(e) {\n element.removeEventListener(e, fn);\n });\n};\n\n/**\n * Show an element\n * @param {Element} element\n */\nol_ext_element.show = function (element) {\n element.style.display = '';\n};\n\n/**\n * Hide an element\n * @param {Element} element\n */\nol_ext_element.hide = function (element) {\n element.style.display = 'none';\n};\n\n/**\n * Test if an element is hihdden\n * @param {Element} element\n * @return {boolean}\n */\nol_ext_element.hidden = function (element) {\n return ol_ext_element.getStyle(element, 'display') === 'none';\n};\n\n/**\n * Toggle an element\n * @param {Element} element\n */\nol_ext_element.toggle = function (element) {\n element.style.display = (element.style.display==='none' ? '' : 'none');\n};\n\n/** Set style of an element\n * @param {DOMElement} el the element\n * @param {*} st list of style\n */\nol_ext_element.setStyle = function(el, st) {\n for (var s in st) {\n switch (s) {\n case 'top':\n case 'left':\n case 'bottom':\n case 'right':\n case 'minWidth':\n case 'maxWidth':\n case 'width':\n case 'height': {\n if (typeof(st[s]) === 'number') {\n el.style[s] = st[s]+'px';\n } else {\n el.style[s] = st[s];\n }\n break;\n }\n default: {\n el.style[s] = st[s];\n }\n }\n }\n};\n\n/**\n * Get style propertie of an element\n * @param {DOMElement} el the element\n * @param {string} styleProp Propertie name\n * @return {*} style value\n */\nol_ext_element.getStyle = function(el, styleProp) {\n var value, defaultView = (el.ownerDocument || document).defaultView;\n // W3C standard way:\n if (defaultView && defaultView.getComputedStyle) {\n // sanitize property name to css notation\n // (hypen separated words eg. font-Size)\n styleProp = styleProp.replace(/([A-Z])/g, \"-$1\").toLowerCase();\n value = defaultView.getComputedStyle(el, null).getPropertyValue(styleProp);\n } else if (el.currentStyle) { // IE\n // sanitize property name to camelCase\n styleProp = styleProp.replace(/-(\\w)/g, function(str, letter) {\n return letter.toUpperCase();\n });\n value = el.currentStyle[styleProp];\n // convert other units to pixels on IE\n if (/^\\d+(em|pt|%|ex)?$/i.test(value)) { \n return (function(value) {\n var oldLeft = el.style.left, oldRsLeft = el.runtimeStyle.left;\n el.runtimeStyle.left = el.currentStyle.left;\n el.style.left = value || 0;\n value = el.style.pixelLeft + \"px\";\n el.style.left = oldLeft;\n el.runtimeStyle.left = oldRsLeft;\n return value;\n })(value);\n }\n }\n if (/px$/.test(value)) return parseInt(value);\n return value;\n};\n\n/** Get outerHeight of an elemen\n * @param {DOMElement} elt\n * @return {number}\n */\nol_ext_element.outerHeight = function(elt) {\n return elt.offsetHeight + ol_ext_element.getStyle(elt, 'marginBottom')\n};\n\n/** Get outerWidth of an elemen\n * @param {DOMElement} elt\n * @return {number}\n */\nol_ext_element.outerWidth = function(elt) {\n return elt.offsetWidth + ol_ext_element.getStyle(elt, 'marginLeft')\n};\n\n/** Get element offset rect\n * @param {DOMElement} elt\n * @return {*} \n */\nol_ext_element.offsetRect = function(elt) {\n var rect = elt.getBoundingClientRect();\n return {\n top: rect.top + (window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0),\n left: rect.left + (window.pageXOffset || document.documentElement.scrollLeft || document.body.scrollLeft || 0),\n height: rect.height || (rect.bottom - rect.top),\n width: rect.width || (rect.right - rect.left)\n }\n};\n\n/** Get element offset \n * @param {ELement} elt\n * @returns {Object} top/left offset\n */\nol_ext_element.getFixedOffset = function(elt) {\n var offset = {\n left:0,\n top:0\n };\n var getOffset = function(parent) {\n if (!parent) return offset;\n // Check position when transform\n if (ol_ext_element.getStyle(parent, 'position') === 'absolute'\n && ol_ext_element.getStyle(parent, 'transform') !== \"none\") {\n var r = parent.getBoundingClientRect();\n offset.left += r.left; \n offset.top += r.top; \n return offset;\n }\n return getOffset(parent.offsetParent)\n }\n return getOffset(elt.offsetParent)\n};\n\n/** Get element offset rect\n * @param {DOMElement} elt\n * @param {boolean} fixed get fixed position\n * @return {Object} \n */\nol_ext_element.positionRect = function(elt, fixed) {\n var gleft = 0;\n var gtop = 0;\n\n var getRect = function( parent ) {\n if (parent) {\n gleft += parent.offsetLeft;\n gtop += parent.offsetTop;\n return getRect(parent.offsetParent);\n } else {\n var r = {\n top: elt.offsetTop + gtop,\n left: elt.offsetLeft + gleft\n };\n if (fixed) {\n r.top -= (window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0);\n r.left -= (window.pageXOffset || document.documentElement.scrollLeft || document.body.scrollLeft || 0);\n }\n r.bottom = r.top + elt.offsetHeight;\n r.right = r.top + elt.offsetWidth;\n return r;\n }\n }; \n return getRect(elt.offsetParent);\n}\n\n/** Make a div scrollable without scrollbar.\n * On touch devices the default behavior is preserved\n * @param {DOMElement} elt\n * @param {*} options\n * @param {function} [options.onmove] a function that takes a boolean indicating that the div is scrolling\n * @param {boolean} [options.vertical=false] \n * @param {boolean} [options.animate=true] add kinetic to scroll\n * @param {boolean} [options.mousewheel=false] enable mousewheel to scroll\n * @param {boolean} [options.minibar=false] add a mini scrollbar to the parent element (only vertical scrolling)\n * @returns {Object} an object with a refresh function\n */\nol_ext_element.scrollDiv = function(elt, options) {\n options = options || {};\n var pos = false;\n var speed = 0;\n var d, dt = 0;\n\n var onmove = (typeof(options.onmove) === 'function' ? options.onmove : function(){});\n //var page = options.vertical ? 'pageY' : 'pageX';\n var page = options.vertical ? 'screenY' : 'screenX';\n var scroll = options.vertical ? 'scrollTop' : 'scrollLeft';\n var moving = false;\n // Factor scale content / container\n var scale, isbar;\n\n // Update the minibar\n var updateCounter = 0;\n var updateMinibar = function() {\n if (scrollbar) {\n updateCounter++;\n setTimeout(updateMinibarDelay);\n }\n }\n var updateMinibarDelay = function() {\n if (scrollbar) {\n updateCounter--;\n // Prevent multi call\n if (updateCounter) return;\n // Container height\n var pheight = elt.clientHeight;\n // Content height\n var height = elt.scrollHeight;\n // Set scrollbar value\n scale = pheight / height;\n scrollbar.style.height = scale * 100 + '%';\n scrollbar.style.top = (elt.scrollTop / height * 100) + '%';\n scrollContainer.style.height = pheight + 'px';\n // No scroll\n if (pheight > height - .5) scrollContainer.classList.add('ol-100pc');\n else scrollContainer.classList.remove('ol-100pc');\n }\n }\n \n // Handle pointer down\n var onPointerDown = function(e) {\n // Prevent scroll\n if (e.target.classList.contains('ol-noscroll')) return;\n // Start scrolling\n moving = false;\n pos = e[page];\n dt = new Date();\n elt.classList.add('ol-move');\n // Prevent elt dragging\n e.preventDefault();\n // Listen scroll\n window.addEventListener('pointermove', onPointerMove);\n ol_ext_element.addListener(window, ['pointerup','pointercancel'], onPointerUp);\n }\n\n // Register scroll\n var onPointerMove = function(e) {\n if (pos !== false) {\n var delta = (isbar ? -1/scale : 1) * (pos - e[page]);\n moving = moving || Math.round(delta)\n elt[scroll] += delta;\n d = new Date();\n if (d-dt) {\n speed = (speed + delta / (d - dt))/2;\n }\n pos = e[page];\n dt = d;\n // Tell we are moving\n if (delta) onmove(true);\n } else {\n moving = true;\n }\n };\n \n // Animate scroll\n var animate = function(to) {\n var step = (to>0) ? Math.min(100, to/2) : Math.max(-100, to/2);\n to -= step;\n elt[scroll] += step;\n if (-1 < to && to < 1) {\n if (moving) setTimeout(function() { elt.classList.remove('ol-move'); });\n else elt.classList.remove('ol-move');\n moving = false;\n onmove(false);\n } else {\n setTimeout(function() {\n animate(to);\n }, 40);\n }\n }\n \n // Initialize scroll container for minibar\n var scrollContainer, scrollbar;\n if (options.vertical && options.minibar) {\n var init = function(b) {\n // only once\n elt.removeEventListener('pointermove', init);\n elt.parentNode.classList.add('ol-miniscroll');\n scrollbar = ol_ext_element.create('DIV');\n scrollContainer = ol_ext_element.create('DIV', {\n className: 'ol-scroll',\n html: scrollbar\n });\n elt.parentNode.insertBefore(scrollContainer, elt);\n // Move scrollbar\n scrollbar.addEventListener('pointerdown', function(e) {\n isbar = true;\n onPointerDown(e)\n });\n // Handle mousewheel\n if (options.mousewheel) {\n ol_ext_element.addListener(scrollContainer, \n ['mousewheel', 'DOMMouseScroll', 'onmousewheel'], \n function(e) { onMouseWheel(e) }\n );\n ol_ext_element.addListener(scrollbar, \n ['mousewheel', 'DOMMouseScroll', 'onmousewheel'], \n function(e) { onMouseWheel(e) }\n );\n }\n // Update on enter\n elt.parentNode.addEventListener('pointerenter', updateMinibar);\n // Update on resize\n window.addEventListener('resize', updateMinibar);\n // Update\n if (b!==false) updateMinibar();\n };\n // Allready inserted in the DOM\n if (elt.parentNode) init(false);\n // or wait when ready\n else elt.addEventListener('pointermove', init);\n // Update on scroll\n elt.addEventListener('scroll', function() {\n updateMinibar();\n });\n }\n\n // Enable scroll\n elt.style['touch-action'] = 'none';\n elt.style['overflow'] = 'hidden';\n elt.classList.add('ol-scrolldiv');\n \n // Start scrolling\n ol_ext_element.addListener(elt, ['pointerdown'], function(e) {\n isbar = false;\n onPointerDown(e)\n });\n\n // Prevet click when moving...\n elt.addEventListener('click', function(e) {\n if (elt.classList.contains('ol-move')) {\n e.preventDefault();\n e.stopPropagation();\n }\n }, true);\n\n // Stop scrolling\n var onPointerUp = function(e) {\n dt = new Date() - dt;\n if (dt>100 || isbar) {\n // User stop: no speed\n speed = 0;\n } else if (dt>0) {\n // Calculate new speed\n speed = ((speed||0) + (pos - e[page]) / dt) / 2;\n }\n animate(options.animate===false ? 0 : speed*200);\n pos = false;\n speed = 0;\n dt = 0;\n // Add class to handle click (on iframe / double-click)\n if (!elt.classList.contains('ol-move')) {\n elt.classList.add('ol-hasClick')\n setTimeout(function() { elt.classList.remove('ol-hasClick'); }, 500);\n } else {\n elt.classList.remove('ol-hasClick');\n }\n isbar = false;\n window.removeEventListener('pointermove', onPointerMove)\n ol_ext_element.removeListener(window, ['pointerup','pointercancel'], onPointerUp);\n };\n\n // Handle mousewheel\n var onMouseWheel = function(e) {\n var delta = Math.max(-1, Math.min(1, (e.wheelDelta || -e.detail)));\n elt.classList.add('ol-move');\n elt[scroll] -= delta*30;\n elt.classList.remove('ol-move');\n return false;\n }\n if (options.mousewheel) { // && !elt.classList.contains('ol-touch')) {\n ol_ext_element.addListener(elt, \n ['mousewheel', 'DOMMouseScroll', 'onmousewheel'], \n onMouseWheel\n );\n }\n\n return { \n refresh: updateMinibar\n }\n};\n\n/** Dispatch an event to an Element \n * @param {string} eventName\n * @param {Element} element\n */\nol_ext_element.dispatchEvent = function (eventName, element) {\n var event;\n try {\n event = new CustomEvent(eventName);\n } catch(e) {\n // Try customevent on IE\n event = document.createEvent(\"CustomEvent\");\n event.initCustomEvent(eventName, true, true, {});\n }\n element.dispatchEvent(event);\n};\n\n/** Set cursor\n * @param {Element|ol/Map} elt\n * @param {string} cursor\n */\nol_ext_element.setCursor = function(elt, cursor) {\n if (elt instanceof ol_Map) elt = elt.getTargetElement()\n // prevent flashing on mobile device\n if (!('ontouchstart' in window) && elt instanceof Element) {\n elt.style.cursor = cursor;\n }\n}\n\nexport default ol_ext_element\n", "/*\tCopyright (c) 2015 Jean-Marc VIGLINO, \n released under the CeCILL-B license (French BSD license)\n (http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.txt).\n*/\nimport {unByKey as ol_Observable_unByKey} from 'ol/Observable.js'\nimport ol_control_Control from 'ol/control/Control.js'\nimport ol_layer_Tile from 'ol/layer/Tile.js'\nimport ol_layer_Vector from 'ol/layer/Vector.js'\nimport ol_layer_VectorTile from 'ol/layer/VectorTile.js'\n// ol < 6 compatibility VectorImage is not defined\n// import ol_layer_VectorImage from 'ol/layer/VectorImage.js'\nimport ol_layer_Image from 'ol/layer/Image.js'\nimport ol_layer_Heatmap from 'ol/layer/Heatmap.js'\nimport {intersects as ol_extent_intersects} from 'ol/extent.js'\n\nimport ol_ext_element from '../util/element.js'\n\n/** Layer Switcher Control.\n * @fires select\n * @fires drawlist\n * @fires toggle\n * @fires reorder-start\n * @fires reorder-end\n * @fires layer:visible\n * @fires layer:opacity\n * @fires layer:keydown\n * \n * @constructor\n * @extends {ol_control_Control}\n * @param {Object=} options\n * @param {boolean} options.selection enable layer selection when click on the title\n * @param {function} options.displayInLayerSwitcher function that takes a layer and return a boolean if the layer is displayed in the switcher, default test the displayInLayerSwitcher layer attribute\n * @param {boolean} options.show_progress show a progress bar on tile layers, default false\n * @param {boolean} options.mouseover show the panel on mouseover, default false\n * @param {boolean} options.reordering allow layer reordering, default true\n * @param {boolean} options.trash add a trash button to delete the layer, default false\n * @param {function} options.oninfo callback on click on info button, if none no info button is shown DEPRECATED: use on(info) instead\n * @param {boolean} options.extent add an extent button to zoom to the extent of the layer\n * @param {function} options.onextent callback when click on extent, default fits view to extent\n * @param {number} options.drawDelay delay in ms to redraw the layer (usefull to prevent flickering when manipulating the layers)\n * @param {boolean} options.collapsed collapse the layerswitcher at beginning, default true\n * @param {ol.layer.Group} options.layerGroup a layer group to display in the switcher, default display all layers of the map\n * @param {boolean} options.noScroll prevent handle scrolling, default false\n * @param {boolean} options.counter layer counter, default false\n * @param {function} options.onchangeCheck optional callback on click on checkbox, you can call this method for doing operations after check/uncheck a layer\n *\n * Layers attributes that control the switcher\n *\t- allwaysOnTop {boolean} true to force layer stay on top of the others while reordering, default false\n *\t- displayInLayerSwitcher {boolean} display the layer in switcher, default true\n *\t- noSwitcherDelete {boolean} to prevent layer deletion (w. trash option = true), default false\n */\nvar ol_control_LayerSwitcher = class olcontrolLayerSwitcher extends ol_control_Control {\n constructor(options) {\n options = options || {}\n var element = ol_ext_element.create('DIV', {\n className: options.switcherClass || 'ol-layerswitcher'\n })\n super({\n element: element,\n target: options.target\n })\n \n var self = this\n this.dcount = 0\n this.show_progress = options.show_progress\n this.oninfo = (typeof (options.oninfo) == 'function' ? options.oninfo : null)\n this.onextent = (typeof (options.onextent) == 'function' ? options.onextent : null)\n this.hasextent = options.extent || options.onextent\n this.hastrash = options.trash\n this.reordering = (options.reordering !== false)\n this._layers = []\n this._layerGroup = (options.layerGroup && options.layerGroup.getLayers) ? options.layerGroup : null\n this.onchangeCheck = (typeof (options.onchangeCheck) == \"function\" ? options.onchangeCheck : null)\n\n // displayInLayerSwitcher\n if (typeof (options.displayInLayerSwitcher) === 'function') {\n this.displayInLayerSwitcher = options.displayInLayerSwitcher\n }\n\n // Insert in the map\n if (!options.target) {\n element.classList.add('ol-unselectable')\n element.classList.add('ol-control')\n element.classList.add(options.collapsed !== false ? 'ol-collapsed' : 'ol-forceopen')\n if (options.counter) element.classList.add('ol-counter')\n\n this.counter = ol_ext_element.create('SPAN', {\n class: 'ol-counter',\n text: 0,\n parent: element\n });\n this.button = ol_ext_element.create('BUTTON', {\n type: 'button',\n parent: element\n })\n this.button.addEventListener('touchstart', function (e) {\n element.classList.toggle('ol-forceopen')\n element.classList.add('ol-collapsed')\n self.dispatchEvent({ type: 'toggle', collapsed: element.classList.contains('ol-collapsed') })\n e.preventDefault()\n self.overflow()\n })\n this.button.addEventListener('click', function () {\n element.classList.toggle('ol-forceopen')\n element.classList.add('ol-collapsed')\n self.dispatchEvent({ type: 'toggle', collapsed: !element.classList.contains('ol-forceopen') })\n self.overflow()\n })\n\n if (options.mouseover) {\n element.addEventListener('mouseleave', function () {\n element.classList.add(\"ol-collapsed\")\n self.dispatchEvent({ type: 'toggle', collapsed: true })\n })\n element.addEventListener('mouseover', function () {\n element.classList.remove(\"ol-collapsed\")\n self.dispatchEvent({ type: 'toggle', collapsed: false })\n })\n }\n\n if (options.minibar)\n options.noScroll = true\n if (!options.noScroll) {\n this.topv = ol_ext_element.create('DIV', {\n className: 'ol-switchertopdiv',\n parent: element,\n click: function () {\n self.overflow(\"+50%\")\n }\n })\n\n this.botv = ol_ext_element.create('DIV', {\n className: 'ol-switcherbottomdiv',\n parent: element,\n click: function () {\n self.overflow(\"-50%\")\n }\n })\n }\n this._noScroll = options.noScroll\n }\n\n this.panel_ = ol_ext_element.create('UL', {\n className: 'panel',\n })\n this.panelContainer_ = ol_ext_element.create('DIV', {\n className: 'panel-container',\n html: this.panel_,\n parent: element\n })\n // Handle mousewheel\n if (!options.target && !options.noScroll) {\n ol_ext_element.addListener(this.panel_, 'mousewheel DOMMouseScroll onmousewheel', function (e) {\n if (self.overflow(Math.max(-1, Math.min(1, (e.wheelDelta || -e.detail))))) {\n e.stopPropagation()\n e.preventDefault()\n }\n })\n }\n\n this.header_ = ol_ext_element.create('LI', {\n className: 'ol-header',\n parent: this.panel_\n })\n\n this.set('drawDelay', options.drawDelay || 0)\n this.set('selection', options.selection)\n\n if (options.minibar) {\n // Wait init complete (for child classes)\n setTimeout(function () {\n var mbar = ol_ext_element.scrollDiv(this.panelContainer_, {\n mousewheel: true,\n vertical: true,\n minibar: true\n })\n this.on(['drawlist', 'toggle'], function () {\n mbar.refresh()\n })\n }.bind(this))\n }\n }\n /** Test if a layer should be displayed in the switcher\n * @param {ol.layer} layer\n * @return {boolean} true if the layer is displayed\n */\n displayInLayerSwitcher(layer) {\n return (layer.get('displayInLayerSwitcher') !== false)\n }\n /**\n * Set the map instance the control is associated with.\n * @param {_ol_Map_} map The map instance.\n */\n setMap(map) {\n super.setMap(map)\n this.drawPanel()\n\n if (this._listener) {\n for (var i in this._listener){\n ol_Observable_unByKey(this._listener[i])\n }\n }\n this._listener = null\n\n // Get change (new layer added or removed)\n if (map) {\n this._listener = {\n moveend: map.on('moveend', this.viewChange.bind(this)),\n size: map.on('change:size', this.overflow.bind(this))\n }\n // Listen to a layer group\n if (this._layerGroup) {\n this._listener.change = this._layerGroup.getLayers().on('change:length', this.drawPanel.bind(this))\n } else {\n //Listen to all layers\n this._listener.change = map.getLayerGroup().getLayers().on('change:length', this.drawPanel.bind(this))\n }\n }\n }\n /** Show control\n */\n show() {\n this.element.classList.add('ol-forceopen')\n this.overflow()\n this.dispatchEvent({ type: 'toggle', collapsed: false })\n }\n /** Hide control\n */\n hide() {\n this.element.classList.remove('ol-forceopen')\n this.overflow()\n this.dispatchEvent({ type: 'toggle', collapsed: true })\n }\n /** Toggle control\n */\n toggle() {\n this.element.classList.toggle(\"ol-forceopen\")\n this.overflow()\n this.dispatchEvent({ type: 'toggle', collapsed: !this.isOpen() })\n }\n /** Is control open\n * @return {boolean}\n */\n isOpen() {\n return this.element.classList.contains(\"ol-forceopen\")\n }\n /** Add a custom header\n * @param {Element|string} html content html\n */\n setHeader(html) {\n ol_ext_element.setHTML(this.header_, html)\n }\n /** Calculate overflow and add scrolls\n * @param {Number} dir scroll direction -1|0|1|'+50%'|'-50%'\n * @private\n */\n overflow(dir) {\n if (this.button && !this._noScroll) {\n // Nothing to show\n if (ol_ext_element.hidden(this.panel_)) {\n ol_ext_element.setStyle(this.element, { height: 'auto' })\n return\n }\n // Calculate offset\n var h = ol_ext_element.outerHeight(this.element)\n var hp = ol_ext_element.outerHeight(this.panel_)\n var dh = this.button.offsetTop + ol_ext_element.outerHeight(this.button)\n //var dh = this.button.position().top + this.button.outerHeight(true);\n var top = this.panel_.offsetTop - dh\n if (hp > h - dh) {\n // Bug IE: need to have an height defined\n ol_ext_element.setStyle(this.element, { height: '100%' })\n var li = this.panel_.querySelectorAll('li.ol-visible .li-content')[0]\n var lh = li ? 2 * ol_ext_element.getStyle(li, 'height') : 0\n switch (dir) {\n case 1: top += lh; break\n case -1: top -= lh; break\n case \"+50%\": top += Math.round(h / 2); break\n case \"-50%\": top -= Math.round(h / 2); break\n default: break\n }\n // Scroll div\n if (top + hp <= h - 3 * dh / 2) {\n top = h - 3 * dh / 2 - hp\n ol_ext_element.hide(this.botv)\n } else {\n ol_ext_element.show(this.botv)\n }\n if (top >= 0) {\n top = 0\n ol_ext_element.hide(this.topv)\n } else {\n ol_ext_element.show(this.topv)\n }\n // Scroll ?\n ol_ext_element.setStyle(this.panel_, { top: top + \"px\" })\n return true\n } else {\n ol_ext_element.setStyle(this.element, { height: \"auto\" })\n ol_ext_element.setStyle(this.panel_, { top: 0 })\n ol_ext_element.hide(this.botv)\n ol_ext_element.hide(this.topv)\n return false\n }\n }\n else\n return false\n }\n /** Set the layer associated with a li\n * @param {Element} li\n * @param {ol.layer} layer\n * @private\n */\n _setLayerForLI(li, layer) {\n var listeners = []\n if (layer.getLayers) {\n listeners.push(layer.getLayers().on('change:length', this.drawPanel.bind(this)))\n }\n if (li) {\n // Handle opacity change\n listeners.push(layer.on('change:opacity', (function () {\n this.setLayerOpacity(layer, li)\n }).bind(this)))\n // Handle visibility chage\n listeners.push(layer.on('change:visible', (function () {\n this.setLayerVisibility(layer, li)\n }).bind(this)))\n }\n // Other properties\n listeners.push(layer.on('propertychange', (function (e) {\n if (e.key === 'displayInLayerSwitcher'\n || e.key === 'openInLayerSwitcher'\n || e.key === 'title'\n || e.key === 'name') {\n this.drawPanel(e)\n }\n }).bind(this)))\n this._layers.push({ li: li, layer: layer, listeners: listeners })\n }\n /** Set opacity for a layer\n * @param {ol.layer.Layer} layer\n * @param {Element} li the list element\n * @private\n */\n setLayerOpacity(layer, li) {\n var i = li.querySelector('.layerswitcher-opacity-cursor')\n if (i){\n i.style.left = (layer.getOpacity() * 100) + \"%\"\n }\n this.dispatchEvent({ type: 'layer:opacity', layer: layer })\n }\n /** Set visibility for a layer\n * @param {ol.layer.Layer} layer\n * @param {Element} li the list element\n * @api\n */\n setLayerVisibility(layer, li) {\n var i = li.querySelector('.ol-visibility')\n if (i) {\n i.checked = layer.getVisible()\n }\n if (layer.getVisible()){\n li.classList.add('ol-visible')\n } else{\n li.classList.remove('ol-visible')\n }\n this.dispatchEvent({ type: 'layer:visible', layer: layer })\n }\n /** Clear layers associated with li\n * @private\n */\n _clearLayerForLI() {\n this._layers.forEach(function (li) {\n li.listeners.forEach(function (l) {\n ol_Observable_unByKey(l)\n })\n })\n this._layers = []\n }\n /** Get the layer associated with a li\n * @param {Element} li\n * @return {ol.layer}\n * @private\n */\n _getLayerForLI(li) {\n for (var i = 0, l; l = this._layers[i]; i++) {\n if (l.li === li) {\n return l.layer\n }\n }\n return null\n }\n /**\n * On view change hide layer depending on resolution / extent\n * @private\n */\n viewChange() {\n this.panel_.querySelectorAll('li').forEach(function (li) {\n var l = this._getLayerForLI(li)\n if (l) {\n if (this.testLayerVisibility(l)) {\n li.classList.remove('ol-layer-hidden')\n } else {\n li.classList.add('ol-layer-hidden')\n }\n }\n }.bind(this))\n }\n /** Get control panel\n * @api\n */\n getPanel() {\n return this.panelContainer_\n }\n /** Draw the panel control (prevent multiple draw due to layers manipulation on the map with a delay function)\n * @api\n */\n drawPanel() {\n if (!this.getMap())\n return\n var self = this\n // Multiple event simultaneously / draw once => put drawing in the event queue\n this.dcount++\n setTimeout(function () { self.drawPanel_() }, this.get('drawDelay') || 0)\n }\n /** Delayed draw panel control\n * @private\n */\n drawPanel_() {\n if (--this.dcount || this.dragging_) {\n return\n }\n var scrollTop = this.panelContainer_.scrollTop\n\n // Remove existing layers\n this._clearLayerForLI()\n this.panel_.querySelectorAll('li').forEach(function (li) {\n if (!li.classList.contains('ol-header')) li.remove()\n }.bind(this))\n // Draw list\n if (this._layerGroup) {\n this.drawList(this.panel_, this._layerGroup.getLayers())\n } else if (this.getMap()) {\n this.drawList(this.panel_, this.getMap().getLayers())\n }\n // Reset scrolltop\n this.panelContainer_.scrollTop = scrollTop\n // Counter\n if (this.counter) {\n this.counter.innerHTML = this.panel_.parentNode.querySelectorAll('ul.panel > li:not(.ol-header)').length;\n }\n }\n /** Change layer visibility according to the baselayer option\n * @param {ol.layer}\n * @param {Array<ol.layer>} related layers\n * @private\n */\n switchLayerVisibility(l, layers) {\n if (!l.get('baseLayer')) {\n l.setVisible(!l.getVisible())\n } else {\n if (!l.getVisible()) {\n l.setVisible(true)\n }\n layers.forEach(function (li) {\n if (l !== li && li.get('baseLayer') && li.getVisible()) {\n li.setVisible(false)\n }\n })\n }\n }\n /** Check if layer is on the map (depending on resolution / zoom and extent)\n * @param {ol.layer}\n * @return {boolean}\n * @private\n */\n testLayerVisibility(layer) {\n if (!this.getMap())\n return true\n var res = this.getMap().getView().getResolution()\n var zoom = this.getMap().getView().getZoom()\n // Calculate visibility on resolution or zoom\n if (layer.getMaxResolution() <= res || layer.getMinResolution() >= res) {\n return false\n } else if (layer.getMinZoom && (layer.getMinZoom() >= zoom || layer.getMaxZoom() < zoom)) {\n return false\n } else {\n // Check extent\n var ex0 = layer.getExtent()\n if (ex0) {\n var ex = this.getMap().getView().calculateExtent(this.getMap().getSize())\n return ol_extent_intersects(ex, ex0)\n }\n return true\n }\n }\n /** Start ordering the list\n *\t@param {event} e drag event\n *\t@private\n */\n dragOrdering_(e) {\n e.stopPropagation()\n e.preventDefault()\n // Get params\n var self = this\n var elt = e.currentTarget.parentNode.parentNode\n var start = true\n var panel = this.panel_\n var pageY\n var pageY0 = e.pageY\n || (e.touches && e.touches.length && e.touches[0].pageY)\n || (e.changedTouches && e.changedTouches.length && e.changedTouches[0].pageY)\n var target, dragElt\n var layer, group\n elt.parentNode.classList.add('drag')\n\n // Stop ordering\n function stop() {\n if (target) {\n // Get drag on parent\n var drop = layer\n var isSelected = self.getSelection() === drop\n if (drop && target) {\n var collection\n if (group) {\n collection = group.getLayers()\n } else {\n collection = self._layerGroup ? self._layerGroup.getLayers() : self.getMap().getLayers()\n }\n var layers = collection.getArray()\n // Switch layers\n for (var i = 0; i < layers.length; i++) {\n if (layers[i] == drop) {\n collection.removeAt(i)\n break\n }\n }\n for (var j = 0; j < layers.length; j++) {\n if (layers[j] === target) {\n if (i > j) {\n collection.insertAt(j, drop)\n } else {\n collection.insertAt(j + 1, drop)\n }\n break\n }\n }\n }\n if (isSelected) self.selectLayer(drop)\n\n self.dispatchEvent({ type: \"reorder-end\", layer: drop, group: group })\n }\n\n elt.parentNode.querySelectorAll('li').forEach(function (li) {\n li.classList.remove('dropover')\n li.classList.remove('dropover-after')\n li.classList.remove('dropover-before')\n })\n elt.classList.remove(\"drag\")\n elt.parentNode.classList.remove(\"drag\")\n self.element.classList.remove('drag')\n if (dragElt)\n dragElt.remove()\n\n ol_ext_element.removeListener(document, 'mousemove touchmove', move)\n ol_ext_element.removeListener(document, 'mouseup touchend touchcancel', stop)\n }\n\n // Ordering\n function move(e) {\n // First drag (more than 2 px) => show drag element (ghost)\n pageY = e.pageY\n || (e.touches && e.touches.length && e.touches[0].pageY)\n || (e.changedTouches && e.changedTouches.length && e.changedTouches[0].pageY)\n if (start && Math.abs(pageY0 - pageY) > 2) {\n start = false\n elt.classList.add(\"drag\")\n layer = self._getLayerForLI(elt)\n target = false\n group = self._getLayerForLI(elt.parentNode.parentNode)\n // Ghost div\n dragElt = ol_ext_element.create('LI', {\n className: 'ol-dragover',\n html: elt.innerHTML,\n style: {\n position: \"absolute\",\n \"z-index\": 10000,\n left: elt.offsetLeft,\n opacity: 0.5,\n width: ol_ext_element.outerWidth(elt),\n height: ol_ext_element.getStyle(elt, 'height'),\n },\n parent: panel\n })\n self.element.classList.add('drag')\n self.dispatchEvent({ type: \"reorder-start\", layer: layer, group: group })\n }\n // Start a new drag sequence\n if (!start) {\n e.preventDefault()\n e.stopPropagation()\n\n // Ghost div\n ol_ext_element.setStyle(dragElt, { top: pageY - ol_ext_element.offsetRect(panel).top + panel.scrollTop + 5 })\n\n var li\n if (!e.touches) {\n li = e.target\n \n // Get the HTML node within web component on click drag\n if(e.target.shadowRoot){\n li = e.composedPath()[0]\n }\n } else {\n li = document.elementFromPoint(e.touches[0].clientX, e.touches[0].clientY);\n \n //Get actual HTML node within web component on touch drag\n while(li.shadowRoot){\n li = li.shadowRoot.elementFromPoint(e.touches[0].clientX, e.touches[0].clientY)\n }\n }\n if (li.classList.contains(\"ol-switcherbottomdiv\")) {\n self.overflow(-1)\n } else if (li.classList.contains(\"ol-switchertopdiv\")) {\n self.overflow(1)\n }\n // Get associated li\n while (li && li.tagName !== 'LI') {\n li = li.parentNode\n }\n if (!li || !li.classList.contains('dropover')) {\n elt.parentNode.querySelectorAll('li').forEach(function (li) {\n li.classList.remove('dropover')\n li.classList.remove('dropover-after')\n li.classList.remove('dropover-before')\n })\n }\n if (li && li.parentNode.classList.contains('drag') && li !== elt) {\n target = self._getLayerForLI(li)\n // Don't mix layer level\n if (target && !target.get('allwaysOnTop') == !layer.get('allwaysOnTop')) {\n li.classList.add(\"dropover\")\n li.classList.add((elt.offsetTop < li.offsetTop) ? 'dropover-after' : 'dropover-before')\n } else {\n target = false\n }\n ol_ext_element.show(dragElt)\n } else {\n target = false\n if (li === elt)\n ol_ext_element.hide(dragElt)\n else\n ol_ext_element.show(dragElt)\n }\n\n if (!target)\n dragElt.classList.add(\"forbidden\")\n else\n dragElt.classList.remove(\"forbidden\")\n }\n }\n\n // Start ordering\n ol_ext_element.addListener(document, 'mousemove touchmove', move)\n ol_ext_element.addListener(document, 'mouseup touchend touchcancel', stop)\n }\n /** Change opacity on drag\n *\t@param {event} e drag event\n *\t@private\n */\n dragOpacity_(e) {\n e.stopPropagation()\n e.preventDefault()\n var self = this\n // Register start params\n var elt = e.target\n var layer = this._getLayerForLI(elt.parentNode.parentNode.parentNode)\n if (!layer)\n return\n var x = e.pageX\n || (e.touches && e.touches.length && e.touches[0].pageX)\n || (e.changedTouches && e.changedTouches.length && e.changedTouches[0].pageX)\n var start = ol_ext_element.getStyle(elt, 'left') - x\n self.dragging_ = true\n\n // stop dragging\n function stop() {\n ol_ext_element.removeListener(document, \"mouseup touchend touchcancel\", stop)\n ol_ext_element.removeListener(document, \"mousemove touchmove\", move)\n self.dragging_ = false\n }\n // On draggin\n function move(e) {\n var x = e.pageX\n || (e.touches && e.touches.length && e.touches[0].pageX)\n || (e.changedTouches && e.changedTouches.length && e.changedTouches[0].pageX)\n var delta = (start + x) / ol_ext_element.getStyle(elt.parentNode, 'width')\n var opacity = Math.max(0, Math.min(1, delta))\n ol_ext_element.setStyle(elt, { left: (opacity * 100) + \"%\" })\n elt.parentNode.nextElementSibling.innerHTML = Math.round(opacity * 100)\n layer.setOpacity(opacity)\n }\n // Register move\n ol_ext_element.addListener(document, \"mouseup touchend touchcancel\", stop)\n ol_ext_element.addListener(document, \"mousemove touchmove\", move)\n }\n /** Render a list of layer\n * @param {Elemen} element to render\n * @layers {Array{ol.layer}} list of layer to show\n * @api stable\n * @private\n */\n drawList(ul, collection) {\n var self = this\n var layers = collection.getArray()\n\n // Change layer visibility\n var setVisibility = function (e) {\n e.stopPropagation()\n e.preventDefault()\n var l = self._getLayerForLI(this.parentNode.parentNode)\n self.switchLayerVisibility(l, collection)\n if (self.get('selection') && l.getVisible()) {\n self.selectLayer(l)\n }\n if (self.onchangeCheck) {\n self.onchangeCheck(l)\n }\n }\n // Info button click\n function onInfo(e) {\n e.stopPropagation()\n e.preventDefault()\n var l = self._getLayerForLI(this.parentNode.parentNode)\n self.oninfo(l)\n self.dispatchEvent({ type: \"info\", layer: l })\n }\n // Zoom to extent button\n function zoomExtent(e) {\n e.stopPropagation()\n e.preventDefault()\n var l = self._getLayerForLI(this.parentNode.parentNode)\n if (self.onextent) {\n self.onextent(l)\n } else {\n self.getMap().getView().fit(l.getExtent(), self.getMap().getSize())\n }\n self.dispatchEvent({ type: \"extent\", layer: l })\n }\n // Remove a layer on trash click\n function removeLayer(e) {\n e.stopPropagation()\n e.preventDefault()\n var li = this.parentNode.parentNode.parentNode.parentNode\n var layer, group = self._getLayerForLI(li)\n // Remove the layer from a group or from a map\n if (group) {\n layer = self._getLayerForLI(this.parentNode.parentNode)\n group.getLayers().remove(layer)\n if (group.getLayers().getLength() == 0 && !group.get('noSwitcherDelete')) {\n removeLayer.call(li.querySelectorAll('.layerTrash')[0], e)\n }\n } else {\n li = this.parentNode.parentNode\n self.getMap().removeLayer(self._getLayerForLI(li))\n }\n }\n\n // Create a list for a layer\n function createLi(layer) {\n if (!this.displayInLayerSwitcher(layer)) {\n this._setLayerForLI(null, layer)\n return\n }\n\n var li = ol_ext_element.create('LI', {\n className: (layer.getVisible() ? \"ol-visible \" : \" \") + (layer.get('baseLayer') ? \"baselayer\" : \"\"),\n parent: ul\n })\n this._setLayerForLI(li, layer)\n if (this._selectedLayer === layer) {\n li.classList.add('ol-layer-select')\n }\n\n var layer_buttons = ol_ext_element.create('DIV', {\n className: 'ol-layerswitcher-buttons',\n parent: li\n })\n\n // Content div\n var d = ol_ext_element.create('DIV', {\n className: 'li-content',\n parent: li\n })\n\n // Visibility\n var input = ol_ext_element.create('INPUT', {\n type: layer.get('baseLayer') ? 'radio' : 'checkbox',\n className: 'ol-visibility',\n checked: layer.getVisible(),\n click: function(e) {\n setVisibility.bind(this)(e)\n setTimeout(function() { e.target.checked = layer.getVisible(); });\n },\n on: {\n // Set opacity on keydown\n keydown: function(e) {\n switch (e.key) {\n // Change opacity on arrow\n case 'ArrowLeft':\n case 'ArrowRight': {\n e.preventDefault();\n e.stopPropagation();\n var delta = (e.key==='ArrowLeft' ? -0.1 : 0.1);\n var opacity = Math.min(1, Math.max(0, layer.getOpacity() + delta))\n layer.setOpacity(opacity)\n break;\n }\n // Select on enter\n case 'Enter': {\n if (self.get('selection')) {\n e.preventDefault();\n e.stopPropagation();\n self.selectLayer(layer)\n }\n break;\n }\n // Expend \n case '-': \n case '+': {\n if (layer.getLayers) {\n this._focus = layer;\n layer.set(\"openInLayerSwitcher\", !layer.get(\"openInLayerSwitcher\"))\n }\n }\n // Move up dans down\n // fallthrough\n case 'ArrowUp':\n case 'ArrowDown': {\n if (e.ctrlKey && this.reordering) {\n e.preventDefault();\n e.stopPropagation();\n var pos = collection.getArray().indexOf(layer);\n if (pos > -1) {\n if (e.key === 'ArrowDown') {\n if (pos > 0) {\n collection.remove(layer);\n collection.insertAt(pos-1, layer)\n self._focus = layer\n self.dispatchEvent({ type: \"reorder-end\", layer: layer })\n }\n } else {\n if (pos < collection.getLength()-1) {\n collection.remove(layer);\n collection.insertAt(pos+1, layer)\n self._focus = layer\n self.dispatchEvent({ type: \"reorder-end\", layer: layer })\n }\n }\n }\n }\n break;\n }\n default: {\n var group = this._getLayerForLI(ul.parentNode)\n this.dispatchEvent({ type: 'layer:keydown', key: e.key, group: group, li: li, layer: layer, originalEvent: e })\n }\n }\n }.bind(this)\n },\n parent: d\n })\n // Focus on element\n if (layer === self._focus) {\n input.focus();\n self.overflow()\n }\n // Label\n var label = ol_ext_element.create('LABEL', {\n title: layer.get('title') || layer.get('name'),\n click: setVisibility,\n style: {\n userSelect: 'none'\n },\n parent: d\n })\n label.addEventListener('selectstart', function () { return false })\n ol_ext_element.create('SPAN', {\n html: layer.get('title') || layer.get('name'),\n click: function (e) {\n if (this.get('selection')) {\n e.stopPropagation()\n this.selectLayer(layer)\n }\n }.bind(this),\n parent: label\n })\n \n // up/down\n if (this.reordering) {\n if ((i < layers.length - 1 && (layer.get(\"allwaysOnTop\") || !layers[i + 1].get(\"allwaysOnTop\")))\n || (i > 0 && (!layer.get(\"allwaysOnTop\") || layers[i - 1].get(\"allwaysOnTop\")))) {\n ol_ext_element.create('DIV', {\n className: 'layerup ol-noscroll',\n title: this.tip.up,\n on: { 'mousedown touchstart': function (e) { self.dragOrdering_(e) } },\n parent: layer_buttons\n })\n }\n }\n\n // Show/hide sub layers\n if (layer.getLayers) {\n var nb = 0\n layer.getLayers().forEach(function (l) {\n if (self.displayInLayerSwitcher(l))\n nb++\n })\n if (nb) {\n ol_ext_element.create('DIV', {\n className: layer.get(\"openInLayerSwitcher\") ? \"collapse-layers\" : \"expend-layers\",\n title: this.tip.plus,\n click: function () {\n var l = self._getLayerForLI(this.parentNode.parentNode)\n l.set(\"openInLayerSwitcher\", !l.get(\"openInLayerSwitcher\"))\n },\n parent: layer_buttons\n })\n }\n }\n\n // Info button\n if (this.oninfo) {\n ol_ext_element.create('DIV', {\n className: 'layerInfo',\n title: this.tip.info,\n click: onInfo,\n parent: layer_buttons\n })\n }\n // Layer remove\n if (this.hastrash && !layer.get(\"noSwitcherDelete\")) {\n ol_ext_element.create('DIV', {\n className: 'layerTrash',\n title: this.tip.trash,\n click: removeLayer,\n parent: layer_buttons\n })\n }\n // Layer extent\n if (this.hasextent && layers[i].getExtent()) {\n var ex = layers[i].getExtent()\n if (ex.length == 4 && ex[0] < ex[2] && ex[1] < ex[3]) {\n ol_ext_element.create('DIV', {\n className: 'layerExtent',\n title: this.tip.extent,\n click: zoomExtent,\n parent: layer_buttons\n })\n }\n }\n\n // Progress\n if (this.show_progress && layer instanceof ol_layer_Tile) {\n var p = ol_ext_element.create('DIV', {\n className: 'layerswitcher-progress',\n parent: d\n })\n this.setprogress_(layer)\n layer.layerswitcher_progress = ol_ext_element.create('DIV', { parent: p })\n }\n\n // Opacity\n var opacity = ol_ext_element.create('DIV', {\n className: 'layerswitcher-opacity',\n // Click on the opacity line\n click: function (e) {\n if (e.target !== this)\n return\n e.stopPropagation()\n e.preventDefault()\n var op = Math.max(0, Math.min(1, e.offsetX / ol_ext_element.getStyle(this, 'width')))\n self._getLayerForLI(this.parentNode.parentNode).setOpacity(op)\n this.parentNode.querySelectorAll('.layerswitcher-opacity-label')[0].innerHTML = Math.round(op * 100)\n },\n parent: d\n })\n // Start dragging\n ol_ext_element.create('DIV', {\n className: 'layerswitcher-opacity-cursor ol-noscroll',\n style: { left: (layer.getOpacity() * 100) + \"%\" },\n on: {\n 'mousedown touchstart': function (e) { self.dragOpacity_(e) }\n },\n parent: opacity\n })\n // Percent\n ol_ext_element.create('DIV', {\n className: 'layerswitcher-opacity-label',\n html: Math.round(layer.getOpacity() * 100),\n parent: d\n })\n\n // Layer group\n if (layer.getLayers) {\n li.classList.add('ol-layer-group')\n if (layer.get(\"openInLayerSwitcher\") === true) {\n var ul2 = ol_ext_element.create('UL', {\n parent: li\n })\n this.drawList(ul2, layer.getLayers())\n }\n }\n li.classList.add(this.getLayerClass(layer))\n\n // Dispatch a dralist event to allow customisation\n this.dispatchEvent({ type: 'drawlist', layer: layer, li: li })\n }\n\n // Add the layer list\n for (var i = layers.length - 1; i >= 0; i--) {\n createLi.call(this, layers[i])\n }\n\n this.viewChange()\n\n if (ul === this.panel_) {\n this.overflow('')\n // Remove focus\n this._focus = null;\n }\n\n }\n /** Select a layer\n * @param {ol.layer.Layer} layer\n * @returns {string} the layer classname\n * @api\n */\n getLayerClass(layer) {\n if (!layer)\n return 'none'\n if (layer.getLayers)\n return 'ol-layer-group'\n if (layer instanceof ol_layer_Vector)\n return 'ol-layer-vector'\n if (layer instanceof ol_layer_VectorTile)\n return 'ol-layer-vectortile'\n if (layer instanceof ol_layer_Tile)\n return 'ol-layer-tile'\n if (layer instanceof ol_layer_Image)\n return 'ol-layer-image'\n if (layer instanceof ol_layer_Heatmap)\n return 'ol-layer-heatmap'\n /* ol < 6 compatibility VectorImage is not defined */\n // if (layer instanceof ol_layer_VectorImage) return 'ol-layer-vectorimage';\n if (layer.getFeatures)\n return 'ol-layer-vectorimage'\n /* */\n return 'unknown'\n }\n /** Select a layer\n * @param {ol.layer.Layer} layer\n * @api\n */\n selectLayer(layer, silent) {\n if (!layer) {\n if (!this.getMap())\n return\n layer = this.getMap().getLayers().item(this.getMap().getLayers().getLength() - 1)\n }\n this._selectedLayer = layer\n // Has focus ?\n if (this.element.querySelector('input.ol-visibility:focus')) {\n this._focus = layer;\n }\n // Draw\n this.drawPanel()\n if (!silent) {\n this.dispatchEvent({ type: 'select', layer: layer })\n }\n }\n /** Get selected layer\n * @returns {ol.layer.Layer}\n */\n getSelection() {\n return this._selectedLayer\n }\n /** Handle progress bar for a layer\n *\t@private\n */\n setprogress_(layer) {\n if (!layer.layerswitcher_progress) {\n var loaded = 0\n var loading = 0\n var draw = function () {\n if (loading === loaded) {\n loading = loaded = 0\n ol_ext_element.setStyle(layer.layerswitcher_progress, { width: 0 }) // layer.layerswitcher_progress.width(0);\n } else {\n ol_ext_element.setStyle(layer.layerswitcher_progress, { width: (loaded / loading * 100).toFixed(1) + '%' }) // layer.layerswitcher_progress.css('width', (loaded / loading * 100).toFixed(1) + '%');\n }\n }\n layer.getSource().on('tileloadstart', function () {\n loading++\n draw()\n })\n layer.getSource().on('tileloadend', function () {\n loaded++\n draw()\n })\n layer.getSource().on('tileloaderror', function () {\n loaded++\n draw()\n })\n }\n }\n}\n\n/** List of tips for internationalization purposes\n*/\nol_control_LayerSwitcher.prototype.tip = {\n up: \"up/down\",\n down: \"down\",\n info: \"informations...\",\n extent: \"zoom to extent\",\n trash: \"remove layer\",\n plus: \"expand/shrink\"\n};\n\nexport default ol_control_LayerSwitcher\n", "/**\n * @module ol/control/MousePosition\n */\n\nimport {wrapX} from '../coordinate.js';\nimport {listen} from '../events.js';\nimport EventType from '../pointer/EventType.js';\nimport {\n get as getProjection,\n getTransformFromProjections,\n getUserProjection,\n identityTransform,\n} from '../proj.js';\nimport Control from './Control.js';\n\n/**\n * @type {string}\n */\nconst PROJECTION = 'projection';\n\n/**\n * @type {string}\n */\nconst COORDINATE_FORMAT = 'coordinateFormat';\n\n/***\n * @template Return\n * @typedef {import(\"../Observable\").OnSignature<import(\"../Observable\").EventTypes, import(\"../events/Event.js\").default, Return> &\n * import(\"../Observable\").OnSignature<import(\"../ObjectEventType\").Types|\n * 'change:coordinateFormat'|'change:projection', import(\"../Object\").ObjectEvent, Return> &\n * import(\"../Observable\").CombinedOnSignature<import(\"../Observable\").EventTypes|import(\"../ObjectEventType\").Types|\n * 'change:coordinateFormat'|'change:projection', Return>} MousePositionOnSignature\n */\n\n/**\n * @typedef {Object} Options\n * @property {string} [className='ol-mouse-position'] CSS class name.\n * @property {import(\"../coordinate.js\").CoordinateFormat} [coordinateFormat] Coordinate format.\n * @property {import(\"../proj.js\").ProjectionLike} [projection] Projection. Default is the view projection.\n * @property {function(import(\"../MapEvent.js\").default):void} [render] Function called when the\n * control should be re-rendered. This is called in a `requestAnimationFrame`\n * callback.\n * @property {HTMLElement|string} [target] Specify a target if you want the\n * control to be rendered outside of the map's viewport.\n * @property {string} [placeholder] Markup to show when the mouse position is not\n * available (e.g. when the pointer leaves the map viewport). By default, a non-breaking space is rendered\n * initially and the last position is retained when the mouse leaves the viewport.\n * When a string is provided (e.g. `'no position'` or `''` for an empty string) it is used as a\n * placeholder.\n * @property {boolean} [wrapX=true] Wrap the world horizontally on the projection's antimeridian, if it\n * is a global projection.\n */\n\n/**\n * @classdesc\n * A control to show the 2D coordinates of the mouse cursor. By default, these\n * are in the view projection, but can be in any supported projection.\n * By default the control is shown in the top right corner of the map, but this\n * can be changed by using the css selector `.ol-mouse-position`.\n *\n * On touch devices, which usually do not have a mouse cursor, the coordinates\n * of the currently touched position are shown.\n *\n * @api\n */\nclass MousePosition extends Control {\n /**\n * @param {Options} [options] Mouse position options.\n */\n constructor(options) {\n options = options ? options : {};\n\n const element = document.createElement('div');\n element.className =\n options.className !== undefined ? options.className : 'ol-mouse-position';\n\n super({\n element: element,\n render: options.render,\n target: options.target,\n });\n\n /***\n * @type {MousePositionOnSignature<import(\"../events\").EventsKey>}\n */\n this.on;\n\n /***\n * @type {MousePositionOnSignature<import(\"../events\").EventsKey>}\n */\n this.once;\n\n /***\n * @type {MousePositionOnSignature<void>}\n */\n this.un;\n\n this.addChangeListener(PROJECTION, this.handleProjectionChanged_);\n\n if (options.coordinateFormat) {\n this.setCoordinateFormat(options.coordinateFormat);\n }\n if (options.projection) {\n this.setProjection(options.projection);\n }\n\n /**\n * @private\n * @type {boolean}\n */\n this.renderOnMouseOut_ = options.placeholder !== undefined;\n\n /**\n * @private\n * @type {string}\n */\n this.placeholder_ = this.renderOnMouseOut_ ? options.placeholder : '&#160;';\n\n /**\n * @private\n * @type {string}\n */\n this.renderedHTML_ = element.innerHTML;\n\n /**\n * @private\n * @type {?import(\"../proj/Projection.js\").default}\n */\n this.mapProjection_ = null;\n\n /**\n * @private\n * @type {?import(\"../proj.js\").TransformFunction}\n */\n this.transform_ = null;\n\n /**\n * @private\n * @type {boolean}\n */\n this.wrapX_ = options.wrapX === false ? false : true;\n }\n\n /**\n * @private\n */\n handleProjectionChanged_() {\n this.transform_ = null;\n }\n\n /**\n * Return the coordinate format type used to render the current position or\n * undefined.\n * @return {import(\"../coordinate.js\").CoordinateFormat|undefined} The format to render the current\n * position in.\n * @observable\n * @api\n */\n getCoordinateFormat() {\n return /** @type {import(\"../coordinate.js\").CoordinateFormat|undefined} */ (\n this.get(COORDINATE_FORMAT)\n );\n }\n\n /**\n * Return the projection that is used to report the mouse position.\n * @return {import(\"../proj/Projection.js\").default|undefined} The projection to report mouse\n * position in.\n * @observable\n * @api\n */\n getProjection() {\n return /** @type {import(\"../proj/Projection.js\").default|undefined} */ (\n this.get(PROJECTION)\n );\n }\n\n /**\n * @param {MouseEvent} event Browser event.\n * @protected\n */\n handleMouseMove(event) {\n const map = this.getMap();\n this.updateHTML_(map.getEventPixel(event));\n }\n\n /**\n * @param {Event} event Browser event.\n * @protected\n */\n handleMouseOut(event) {\n this.updateHTML_(null);\n }\n\n /**\n * Remove the control from its current map and attach it to the new map.\n * Pass `null` to just remove the control from the current map.\n * Subclasses may set up event handlers to get notified about changes to\n * the map here.\n * @param {import(\"../Map.js\").default|null} map Map.\n * @api\n * @override\n */\n setMap(map) {\n super.setMap(map);\n if (map) {\n const viewport = map.getViewport();\n this.listenerKeys.push(\n listen(viewport, EventType.POINTERMOVE, this.handleMouseMove, this),\n );\n if (this.renderOnMouseOut_) {\n this.listenerKeys.push(\n listen(viewport, EventType.POINTEROUT, this.handleMouseOut, this),\n );\n }\n this.updateHTML_(null);\n }\n }\n\n /**\n * Set the coordinate format type used to render the current position.\n * @param {import(\"../coordinate.js\").CoordinateFormat} format The format to render the current\n * position in.\n * @observable\n * @api\n */\n setCoordinateFormat(format) {\n this.set(COORDINATE_FORMAT, format);\n }\n\n /**\n * Set the projection that is used to report the mouse position.\n * @param {import(\"../proj.js\").ProjectionLike} projection The projection to report mouse\n * position in.\n * @observable\n * @api\n */\n setProjection(projection) {\n this.set(PROJECTION, getProjection(projection));\n }\n\n /**\n * @param {?import(\"../pixel.js\").Pixel} pixel Pixel.\n * @private\n */\n updateHTML_(pixel) {\n let html = this.placeholder_;\n if (pixel && this.mapProjection_) {\n if (!this.transform_) {\n const projection = this.getProjection();\n if (projection) {\n this.transform_ = getTransformFromProjections(\n this.mapProjection_,\n projection,\n );\n } else {\n this.transform_ = identityTransform;\n }\n }\n const map = this.getMap();\n const coordinate = map.getCoordinateFromPixelInternal(pixel);\n if (coordinate) {\n const userProjection = getUserProjection();\n if (userProjection) {\n this.transform_ = getTransformFromProjections(\n this.mapProjection_,\n userProjection,\n );\n }\n this.transform_(coordinate, coordinate);\n if (this.wrapX_) {\n const projection =\n userProjection || this.getProjection() || this.mapProjection_;\n wrapX(coordinate, projection);\n }\n const coordinateFormat = this.getCoordinateFormat();\n if (coordinateFormat) {\n html = coordinateFormat(coordinate);\n } else {\n html = coordinate.toString();\n }\n }\n }\n if (!this.renderedHTML_ || html !== this.renderedHTML_) {\n this.element.innerHTML = html;\n this.renderedHTML_ = html;\n }\n }\n\n /**\n * Update the projection. Rendering of the coordinates is done in\n * `handleMouseMove` and `handleMouseUp`.\n * @param {import(\"../MapEvent.js\").default} mapEvent Map event.\n * @override\n */\n render(mapEvent) {\n const frameState = mapEvent.frameState;\n if (!frameState) {\n this.mapProjection_ = null;\n } else {\n if (this.mapProjection_ != frameState.viewState.projection) {\n this.mapProjection_ = frameState.viewState.projection;\n this.transform_ = null;\n }\n }\n }\n}\n\nexport default MousePosition;\n", "import View from 'ol/View.js'\nimport { Projection } from 'ol/proj'\nimport type TileLayer from 'ol/layer/Tile.js'\nimport OLMap from 'ol/Map.js'\nimport Tile from 'ol/layer/Tile.js'\nimport OverviewMap from 'ol/control/OverviewMap.js'\nimport FullScreen from 'ol/control/FullScreen.js'\nimport type TileSource from 'ol/source/Tile'\nimport LayerSwitcher from 'ol-ext/control/LayerSwitcher'\nimport MousePosition from 'ol/control/MousePosition.js'\nimport { format as formatCoordinate } from 'ol/coordinate.js'\nimport type { WSImageLayers } from '#plots/wsiviewer/viewModel/WSImageLayers.ts'\nimport type Layer from 'ol/layer/Layer'\nimport type Settings from '../Settings'\nimport type { SessionWSImage } from '#plots/wsiviewer/viewModel/SessionWSImage.ts'\nimport { addProjection } from 'ol/proj'\n\nexport class MapRenderer {\n\tprivate wSImageLayers: WSImageLayers | undefined\n\n\tprivate viewerClickListener:\n\t\t| ((coordinateX: number, coordinateY: number, sessionWSImage: SessionWSImage, map: OLMap) => void)\n\t\t| undefined\n\n\tprivate sessionWSImage: SessionWSImage | undefined\n\n\t// Allow construction without state so the same instance can be reused.\n\tconstructor() {}\n\n\tpublic setState(\n\t\twSImageLayers: WSImageLayers,\n\t\tviewerClickListener: {\n\t\t\t(coordinateX: number, coordinateY: number, sessionWSImage: SessionWSImage, map: OLMap): void\n\t\t},\n\t\tsessionWSImage: SessionWSImage\n\t) {\n\t\tthis.wSImageLayers = wSImageLayers\n\t\tthis.viewerClickListener = viewerClickListener\n\t\tthis.sessionWSImage = sessionWSImage\n\t}\n\n\tpublic render(holder: any, settings: Settings): OLMap {\n\t\tif (!this.wSImageLayers || !this.viewerClickListener || !this.sessionWSImage) {\n\t\t\tthrow new Error('MapRenderer: missing state (wSImageLayers, viewerClickListener, sessionWSImage, or settings)')\n\t\t}\n\n\t\tholder.select('div[id=\"wsi-viewer\"]').remove()\n\n\t\tholder\n\t\t\t.append('div')\n\t\t\t.attr('id', 'wsi-viewer')\n\t\t\t.style('width', settings.imageWidth)\n\t\t\t.style('height', settings.imageHeight)\n\n\t\tconst activeImage: TileLayer = this.wSImageLayers.wsimage\n\n\t\tconst extent = activeImage?.getSource()?.getTileGrid()?.getExtent()\n\n\t\tconst mpp = this.wSImageLayers.mpp\n\n\t\t// compute numeric microns-per-pixel (handle number or number[])\n\t\tconst mmpNumeric = Array.isArray(mpp) ? mpp[0] : mpp\n\t\t// convert microns -> meters for metersPerUnit (fallback to 1 micron if missing)\n\t\tconst metersPerUnit = (mmpNumeric || 1) * 1e-6\n\n\t\t// Add metersPerUnit so controls that rely on real-world units work correctly\n\t\tconst projection = new Projection({\n\t\t\tcode: 'ZoomifyProjection',\n\t\t\tunits: 'pixels',\n\t\t\textent: extent,\n\t\t\tmetersPerUnit: metersPerUnit,\n\t\t\tgetPointResolution: function (resolution) {\n\t\t\t\treturn resolution\n\t\t\t}\n\t\t})\n\n\t\taddProjection(projection)\n\n\t\tconst layers: Array<Layer> = [activeImage]\n\t\tif (this.wSImageLayers.overlays) {\n\t\t\tfor (const overlay of this.wSImageLayers.overlays) {\n\t\t\t\tlayers.push(overlay)\n\t\t\t}\n\t\t}\n\n\t\tconst map = new OLMap({\n\t\t\tlayers: layers,\n\t\t\ttarget: 'wsi-viewer',\n\t\t\tview: new View({\n\t\t\t\tprojection: projection,\n\t\t\t\tresolutions: activeImage.getSource()?.getTileGrid()?.getResolutions(),\n\t\t\t\tconstrainOnlyCenter: true,\n\t\t\t\tcenter: extent || [0, 0]\n\t\t\t})\n\t\t})\n\n\t\tconst hasOverlay = this.wSImageLayers.overlays != null\n\n\t\tthis.addControls(map, activeImage, hasOverlay, settings)\n\n\t\treturn map\n\t}\n\n\tprivate addControls(map: OLMap, activeImage: TileLayer, hasOverlay: boolean, settings: Settings) {\n\t\tif (hasOverlay) {\n\t\t\tmap.addControl(\n\t\t\t\tnew LayerSwitcher({\n\t\t\t\t\tcollapsed: true,\n\t\t\t\t\tmouseover: true\n\t\t\t\t})\n\t\t\t)\n\n\t\t\t// Display the mouse position in the upper right corner\n\t\t\t// Uncomment import statements above to use\n\t\t\tconst coordinateFormat = function (coordinate) {\n\t\t\t\tcoordinate = [coordinate[0], -coordinate[1]]\n\t\t\t\treturn formatCoordinate(coordinate, '{x}, {y}', 0)\n\t\t\t}\n\t\t\tconst mousePositionControl = new MousePosition({\n\t\t\t\tcoordinateFormat: coordinateFormat,\n\t\t\t\t// Use the map view projection so coordinates are reported using the same metersPerUnit\n\t\t\t\tprojection: map.getView().getProjection(),\n\t\t\t\tclassName: 'ol-mouse-position',\n\t\t\t\tplaceholder: '&nbsp;'\n\t\t\t})\n\n\t\t\tmap.addControl(mousePositionControl)\n\n\t\t\tmap.on('singleclick', event => {\n\t\t\t\tconst coordinate = event.coordinate\n\t\t\t\tconst tileSize = settings.tileSize\n\t\t\t\t// Compute upper-left corner of the tile containing the clicked point\n\t\t\t\tconst tileX = Math.floor(coordinate[0] / tileSize) * tileSize\n\t\t\t\tconst tileY = Math.floor(-coordinate[1] / tileSize) * tileSize\n\n\t\t\t\t// Call the listener with upper-left corner\n\t\t\t\t// this.viewerClickListener is defined by setState / constructor\n\t\t\t\tthis.viewerClickListener!(tileX, tileY, this.sessionWSImage!, map)\n\t\t\t})\n\t\t}\n\n\t\tconst fullscreen = new FullScreen()\n\t\tmap.addControl(fullscreen)\n\n\t\tconst overviewMapControl = new OverviewMap({\n\t\t\tclassName: 'ol-overviewmap ol-custom-overviewmap',\n\t\t\tlayers: [\n\t\t\t\tnew Tile({\n\t\t\t\t\tsource: activeImage.getSource() as TileSource\n\t\t\t\t})\n\t\t\t]\n\t\t})\n\n\t\tmap.addControl(overviewMapControl)\n\t}\n}\n", "import { table2col } from '#dom'\n\nexport class MetadataRenderer {\n\t//TODO: Need an example for testing\n\trenderMetadata(holder: any, imageViewData: any) {\n\t\tif (!imageViewData.metadata) return\n\t\tholder.select('div[id=\"metadata\"]').remove()\n\t\tconst holderDiv = holder.append('div').attr('id', 'metadata')\n\n\t\tconst table = table2col({ holder: holderDiv })\n\n\t\t// Create table rows for each key-value pair\n\t\tObject.entries(JSON.parse(imageViewData.metadata)).forEach(([key, value]) => {\n\t\t\tconst [c1, c2] = table.addRow()\n\t\t\tc1.html(key)\n\t\t\tc2.html(value)\n\t\t})\n\t}\n}\n", "import { ColorScale, getMaxLabelWidth, renderTable } from '#dom'\nimport type { ImageViewData } from '#plots/wsiviewer/viewModel/ImageViewData.ts'\n\nexport class LegendRenderer {\n\trender(holder: any, imageViewData: ImageViewData) {\n\t\tif (!imageViewData.classesTable) return\n\n\t\tconst legendHolder = holder\n\t\t\t.append('div')\n\t\t\t.attr('id', 'legend-wrapper')\n\t\t\t.style('display', 'inline-block')\n\t\t\t.style('padding', '20px')\n\t\t\t.style('vertical-align', 'top')\n\n\t\trenderTable({\n\t\t\tcolumns: imageViewData.classesTable.columns,\n\t\t\trows: imageViewData.classesTable.rows,\n\t\t\tdiv: legendHolder\n\t\t\t\t.append('div')\n\t\t\t\t.attr('id', 'annotations-legend')\n\t\t\t\t.style('display', 'inline-block')\n\t\t\t\t.style('vertical-align', 'top'),\n\t\t\tshowLines: false\n\t\t})\n\n\t\trenderTable({\n\t\t\tcolumns: [\n\t\t\t\t{ label: 'Action', align: 'left' },\n\t\t\t\t{ label: 'Keyboard Map', align: 'center' }\n\t\t\t],\n\t\t\trows: [\n\t\t\t\t[{ value: 'Export Annotations' }, { value: 'X' }],\n\t\t\t\t[{ value: 'Retrain Model' }, { value: 'R' }],\n\t\t\t\t[{ value: 'Flag Annotation' }, { value: 'F' }],\n\t\t\t\t[{ value: 'Skip Annotation' }, { value: 'S' }],\n\t\t\t\t[{ value: 'Back 1 Selection' }, { value: ',' }],\n\t\t\t\t[{ value: 'Forward 1 Selection' }, { value: '.' }],\n\t\t\t\t[{ value: 'Delete Selection' }, { value: 'Backspace' }],\n\t\t\t\t[{ value: 'Confirm Prediction' }, { value: 'Enter' }]\n\t\t\t],\n\t\t\tdiv: legendHolder\n\t\t\t\t.append('div')\n\t\t\t\t.attr('id', 'annotations-shortcuts')\n\t\t\t\t.style('display', 'inline-block')\n\t\t\t\t.style('vertical-align', 'top'),\n\t\t\tshowLines: false\n\t\t})\n\t\tif (!imageViewData.uncertainty) return\n\n\t\tconst svgHolder = legendHolder.append('div').attr('id', 'uncertainty-legend').style('margin-top', '20px')\n\t\tconst width = 200\n\t\tconst height = 50\n\t\tconst svg = svgHolder\n\t\t\t.append('svg')\n\t\t\t.style('width', width * 1.5)\n\t\t\t.style('height', height)\n\t\tconst title = 'Uncertainty'\n\t\tconst titleLth = getMaxLabelWidth(svg as any, [title], 1)\n\t\tsvg\n\t\t\t.append('text')\n\t\t\t.attr('x', (width - titleLth) / 2) //Center the title\n\t\t\t.attr('y', 15)\n\t\t\t.style('opacity', 0.8)\n\t\t\t.text(title)\n\n\t\t//Assumes the ranges are equal intervals.\n\t\tconst upperBound = Math.log(imageViewData.uncertainty.length)\n\t\tconst domain = imageViewData.uncertainty.map((_, i) => {\n\t\t\treturn upperBound * (i / (imageViewData.uncertainty!.length - 1))\n\t\t})\n\n\t\tnew ColorScale({\n\t\t\tholder: svg,\n\t\t\tdomain,\n\t\t\tcolors: imageViewData.uncertainty.map(u => u.color),\n\t\t\tposition: '25, 25',\n\t\t\tticks: 10,\n\t\t\tbarwidth: width,\n\t\t\tlabels: {\n\t\t\t\tleft: imageViewData.uncertainty[0].label,\n\t\t\t\tright: imageViewData.uncertainty[imageViewData.uncertainty.length - 1].label\n\t\t\t}\n\t\t})\n\t}\n}\n", "import type { WSIViewerInteractions } from '#plots/wsiviewer/interactions/WSIViewerInteractions.ts'\n\nexport class ModelTrainerRenderer {\n\tprivate wsiinteractions: WSIViewerInteractions\n\n\tconstructor(wsiinteractions: WSIViewerInteractions) {\n\t\tthis.wsiinteractions = wsiinteractions\n\t}\n\n\trender(holder, projectId: string, genome: string, dslabel: string) {\n\t\t//TODO: Add logic to check if there is an annotation to retrain the model\n\t\t//Or look for a treshhold of annotations\n\t\t//Maybe use a buffer??\n\t\tholder\n\t\t\t.append('div')\n\t\t\t.style('margin', '20px 0 0 0')\n\t\t\t.append('button')\n\t\t\t.attr('type', 'submit')\n\t\t\t.style('font-size', '1.25em')\n\t\t\t.style('padding', '10px 25px')\n\t\t\t.style('border-radius', '20px')\n\t\t\t.style('border', '1px solid black')\n\t\t\t.style('background-color', 'transparent')\n\t\t\t.style('margin', '0 10px')\n\t\t\t.text('Retrain Model')\n\t\t\t.on('click', async () => {\n\t\t\t\tthis.wsiinteractions.toggleLoadingDiv(true)\n\t\t\t\tawait this.wsiinteractions.onRetrainModelClicked(genome, dslabel, projectId)\n\n\t\t\t\t//temp implementation to call route\n\t\t\t\t//Spinner will be removed when main() is called\n\t\t\t})\n\t}\n}\n", "import type { TileSelection } from '@sjcrh/proteinpaint-types'\nimport type Settings from '../Settings'\nimport { SessionWSImage } from '../viewModel/SessionWSImage'\n\nexport class SkipFlagCheckRenderer {\n\trender(\n\t\tholder: any,\n\t\twsiApp: any,\n\t\tflagChecked: boolean,\n\t\tskipChecked: boolean,\n\t\tsessionWSImage: SessionWSImage,\n\t\tsettings: Settings\n\t) {\n\t\tfunction calculateNewIndex(currentIndex: number, newSettings: Settings) {\n\t\t\tconst oldTileSelections: TileSelection[] = SessionWSImage.getTileSelections(sessionWSImage, settings) || []\n\t\t\tconst currentID = oldTileSelections[currentIndex]?.id\n\t\t\tconst newTileSelections: TileSelection[] = SessionWSImage.getTileSelections(sessionWSImage, newSettings) || []\n\t\t\tconst newIndex = newTileSelections.findIndex(tileSelection => tileSelection.id === currentID)\n\t\t\treturn newIndex != -1 ? newIndex : 0\n\t\t}\n\n\t\tconst skipFlagFieldSet = holder.append('div').append('fieldset').attr('id', 'SFField')\n\t\tconst flagCheck = skipFlagFieldSet\n\t\t\t.append('input')\n\t\t\t.attr('type', 'checkbox')\n\t\t\t.attr('id', 'flaganno')\n\t\t\t.attr('name', 'skipflag')\n\t\t\t.attr('value', 'flagging')\n\t\t\t.property('checked', flagChecked)\n\t\tskipFlagFieldSet.append('label').text('Show Only Flagged').attr('for', 'flaganno')\n\t\tconst skipCheck = skipFlagFieldSet\n\t\t\t.append('input')\n\t\t\t.attr('type', 'checkbox')\n\t\t\t.attr('id', 'skipanno')\n\t\t\t.attr('name', 'skipflag')\n\t\t\t.attr('value', 'notskipping')\n\t\t\t.property('checked', skipChecked)\n\t\tskipFlagFieldSet.append('label').text('Show Skipped').attr('for', 'skipanno')\n\t\tif (settings.renderOnlyFlagged) {\n\t\t\tflagCheck.property('checked', true)\n\t\t} else if (settings.renderSkipped) {\n\t\t\tskipCheck.property('checked', true)\n\t\t}\n\t\t// Adding listener that will uncheck each other, even though I'm using a checkbox\n\t\t// These options aren't compatible but radio buttons cant be completely unselected\n\t\tflagCheck.on('change', (event: Event) => {\n\t\t\tconst target = event.target as HTMLInputElement\n\t\t\tlet newSettings: Settings = {\n\t\t\t\t...settings,\n\t\t\t\trenderWSIViewer: false,\n\t\t\t\trenderAnnotationTable: true,\n\t\t\t\tchangeTrigger: Date.now()\n\t\t\t}\n\t\t\tconst skipCheckBool = target.checked ? false : settings.renderSkipped\n\t\t\tskipCheck.property('checked', skipCheckBool)\n\t\t\tnewSettings = {\n\t\t\t\t...newSettings,\n\t\t\t\trenderOnlyFlagged: target.checked,\n\t\t\t\trenderSkipped: skipCheckBool\n\t\t\t}\n\t\t\tnewSettings = { ...newSettings, activeAnnotation: calculateNewIndex(settings.activeAnnotation, newSettings) }\n\t\t\twsiApp.app.dispatch({\n\t\t\t\ttype: 'plot_edit',\n\t\t\t\tid: wsiApp.id,\n\t\t\t\tconfig: {\n\t\t\t\t\tsettings: newSettings\n\t\t\t\t}\n\t\t\t})\n\t\t})\n\n\t\tskipCheck.on('change', (event: Event) => {\n\t\t\tconst target = event.target as HTMLInputElement\n\t\t\tlet newSettings: Settings = {\n\t\t\t\t...settings,\n\t\t\t\trenderWSIViewer: false,\n\t\t\t\trenderAnnotationTable: true,\n\t\t\t\tchangeTrigger: Date.now()\n\t\t\t}\n\t\t\tconst flagCheckBool = target.checked ? false : settings.renderOnlyFlagged\n\t\t\tflagCheck.property('checked', flagCheckBool)\n\t\t\tnewSettings = {\n\t\t\t\t...newSettings,\n\t\t\t\trenderOnlyFlagged: flagCheckBool,\n\t\t\t\trenderSkipped: target.checked\n\t\t\t}\n\t\t\tnewSettings = { ...newSettings, activeAnnotation: calculateNewIndex(settings.activeAnnotation, newSettings) }\n\t\t\twsiApp.app.dispatch({\n\t\t\t\ttype: 'plot_edit',\n\t\t\t\tid: wsiApp.id,\n\t\t\t\tconfig: {\n\t\t\t\t\tsettings: newSettings\n\t\t\t\t}\n\t\t\t})\n\t\t})\n\t}\n}\n", "import { getCompInit, type RxComponent } from '#rx'\nimport { PlotBase } from '../PlotBase'\nimport 'ol/ol.css'\nimport type TileLayer from 'ol/layer/Tile.js'\nimport { WSIViewerInteractions } from '#plots/wsiviewer/interactions/WSIViewerInteractions.ts'\nimport type Settings from '#plots/wsiviewer/Settings.ts'\nimport wsiViewerDefaults from '#plots/wsiviewer/defaults.ts'\nimport 'ol-ext/dist/ol-ext.css'\nimport { WSIAnnotationsRenderer } from '#plots/wsiviewer/view/WSIAnnotationsRenderer.ts'\nimport { ViewModelProvider } from '#plots/wsiviewer/viewModel/ViewModelProvider.ts'\nimport { ThumbnailRenderer } from '#plots/wsiviewer/view/ThumbnailRenderer.ts'\nimport { MapRenderer } from '#plots/wsiviewer/view/MapRenderer.ts'\nimport { MetadataRenderer } from '#plots/wsiviewer/view/MetadataRenderer.ts'\nimport { LegendRenderer } from '#plots/wsiviewer/view/LegendRenderer.ts'\nimport { ModelTrainerRenderer } from './view/ModelTrainerRenderer'\nimport { SkipFlagCheckRenderer } from './view/SkipFlagCheckRenderer'\nimport type OLMap from 'ol/Map'\nimport type { ImageViewData } from '#plots/wsiviewer/viewModel/ImageViewData.ts'\nimport type { ViewModel } from '#plots/wsiviewer/viewModel/ViewModel.ts'\nimport { sayerror } from '#dom'\nimport { DownloadCSVButtonRenderer } from '#plots/wsiviewer/view/DownloadCSVButtonRenderer.ts'\n\nclass WSIViewer extends PlotBase implements RxComponent {\n\tstatic type = 'WSIViewer'\n\t// following attributes are required by rx\n\ttype: string\n\n\tprivate wsiViewerInteractions: WSIViewerInteractions\n\n\tprivate thumbnailsContainer: any\n\tprivate viewModelProvider = new ViewModelProvider()\n\n\tprivate thumbnailRenderer = new ThumbnailRenderer()\n\tprivate metadataRenderer = new MetadataRenderer()\n\tprivate legendRenderer = new LegendRenderer()\n\tprivate map: OLMap | undefined = undefined\n\tprivate annotationTable: any\n\n\t// New: persistent MapRenderer instance reused across main() calls\n\tprivate mapRenderer: MapRenderer | undefined\n\tprivate skipFlagRenderer = new SkipFlagCheckRenderer()\n\n\tconstructor(opts: any, api) {\n\t\tsuper(opts, api)\n\n\t\tthis.type = WSIViewer.type\n\t\tthis.opts = opts\n\t\tthis.wsiViewerInteractions = new WSIViewerInteractions(this, opts)\n\t\tthis.dom = {\n\t\t\tholder: opts.holder,\n\t\t\tloadingDiv: opts.holder\n\t\t\t\t.append('div')\n\t\t\t\t.attr('class', 'wsiViewer-progress')\n\t\t\t\t.style('position', 'absolute')\n\t\t\t\t.style('top', '0')\n\t\t\t\t.style('left', '0')\n\t\t\t\t.style('width', '100%')\n\t\t\t\t.style('height', '100%')\n\t\t\t\t.style('background-color', 'rgba(255, 255, 255, 0.95)')\n\t\t\t\t.style('text-align', 'center')\n\t\t\t\t.style('display', 'none'),\n\t\t\terrorDiv: opts.holder.append('div').attr('class', 'wsiViewer-error').style('margin-left', '10px'),\n\t\t\tmapHolder: opts.holder.append('div').attr('id', 'wsiviewer-mapHolder'),\n\t\t\tannotationsHolder: opts.holder\n\t\t\t\t.append('div')\n\t\t\t\t.attr('id', 'annotations-table-wrapper')\n\t\t\t\t.style('padding', '20px')\n\t\t\t\t.style('display', 'inline-block'),\n\t\t\tlegendHolder: opts.holder\n\t\t\t\t.append('div')\n\t\t\t\t.attr('id', 'sjpp-legendHolder')\n\t\t\t\t.style('display', 'inline-block')\n\t\t\t\t.style('vertical-align', 'top')\n\t\t}\n\t}\n\n\tasync init(): Promise<void> {\n\t\tconst state = this.app.getState()\n\t\tif (this.opts.header) {\n\t\t\t//If sandbox is present, add sample id and data type to the header\n\t\t\tthis.opts.header.html(\n\t\t\t\t`${state.sample_id} <span style=\"font-size:.8em\">${state.termdbConfig.queries.WSImages.type} images</span>`\n\t\t\t)\n\t\t}\n\t}\n\n\tasync main(): Promise<void> {\n\t\tconst state = structuredClone(this.state)\n\t\tconst settings = state.plots.find(p => p.id === this.id).settings as Settings\n\t\tconst holder = this.opts.holder\n\t\tif (settings.loggedOut) {\n\t\t\tholder.selectAll('*').remove()\n\t\t\tsayerror(holder, 'You have been logged out by an admin or inactivity.')\n\t\t\treturn\n\t\t}\n\t\t// TODO verify if state.vocab.genome is needed?\n\t\tconst genome = state.genome || state.vocab.genome\n\t\tconst dslabel = state.dslabel || state.vocab.dslabel\n\t\tconst sample_id = state.sample_id\n\t\tconst aiProjectID = state.aiProjectID\n\t\tconst aiWSIMageFiles = state.aiWSIMageFiles as Array<string>\n\t\tconst viewModel: ViewModel = await this.viewModelProvider.provide(\n\t\t\tgenome,\n\t\t\tdslabel,\n\t\t\tsample_id,\n\t\t\tsettings,\n\t\t\taiProjectID,\n\t\t\taiWSIMageFiles\n\t\t)\n\t\tconst wsimages = viewModel.sampleWSImages\n\n\t\tconst wsimageLayers = viewModel.wsimageLayers\n\t\tconst wsimageLayersLoadError = viewModel.wsimageLayersLoadError\n\t\tthis.wsiViewerInteractions.toggleSpinner(settings.isSavingAnnotation)\n\n\t\tif (wsimages.length === 0) {\n\t\t\tsayerror(this.dom.errorDiv, 'No WSI images found.')\n\t\t\tthis.wsiViewerInteractions.toggleLoadingDiv(false)\n\t\t\treturn\n\t\t}\n\n\t\tif (wsimageLayersLoadError) {\n\t\t\tsayerror(this.dom.errorDiv, wsimageLayersLoadError)\n\t\t\tthis.wsiViewerInteractions.toggleLoadingDiv(false)\n\t\t\treturn\n\t\t}\n\n\t\tconst activeLayerData = wsimageLayers[settings.displayedImageIndex]\n\t\tif (!activeLayerData) {\n\t\t\tsayerror(this.dom.errorDiv, `Layer for image index ${settings.displayedImageIndex} is not loaded.`)\n\t\t\tthis.wsiViewerInteractions.toggleLoadingDiv(false)\n\t\t\treturn\n\t\t}\n\n\t\tconst activeImage: TileLayer = activeLayerData.wsimage\n\t\tconst activeImageExtent = activeImage?.getSource()?.getTileGrid()?.getExtent()\n\n\t\tconst imageViewData: ImageViewData = viewModel.getImageViewData(settings.displayedImageIndex, settings)\n\n\t\t// set MapRenderer state here: ensure the persistent renderer receives current state\n\t\tif (!this.mapRenderer) {\n\t\t\tthis.mapRenderer = new MapRenderer()\n\t\t}\n\t\tif (!settings.isSavingAnnotation) this.wsiViewerInteractions.toggleSpinner(false)\n\n\t\tthis.mapRenderer.setState(\n\t\t\tactiveLayerData,\n\t\t\tthis.wsiViewerInteractions.viewerClickListener,\n\t\t\tviewModel.sampleWSImages[settings.displayedImageIndex]\n\t\t)\n\t\tif (settings.renderWSIViewer) {\n\t\t\tthis.wsiViewerInteractions.toggleLoadingDiv(settings.renderAnnotationTable)\n\t\t\tif (settings.isChangingImages) this.wsiViewerInteractions.toggleSpinner(true)\n\t\t\tif (this.thumbnailsContainer != undefined) {\n\t\t\t\tthis.thumbnailsContainer.remove()\n\t\t\t\tthis.thumbnailsContainer = undefined\n\t\t\t}\n\n\t\t\tconst numTotalFiles = aiWSIMageFiles?.length || wsimages.length\n\n\t\t\tthis.thumbnailsContainer = this.thumbnailRenderer.render(\n\t\t\t\tthis.dom.mapHolder,\n\t\t\t\tthis.thumbnailsContainer,\n\t\t\t\twsimageLayers.map(layer => (layer ? layer.wsimage : null)),\n\t\t\t\tsettings,\n\t\t\t\tthis.wsiViewerInteractions,\n\t\t\t\tnumTotalFiles\n\t\t\t)\n\n\t\t\t// Not actually resetting image, just saving in settings that thumbnail is done rendering\n\t\t\t// so spinner isn't rendering next call\n\t\t\tthis.wsiViewerInteractions.toggleThumbnails(0, true)\n\t\t\tif (!settings.isSavingAnnotation) this.wsiViewerInteractions.toggleSpinner(false)\n\n\t\t\t// Use the reused mapRenderer instance to render/update the map\n\t\t\tthis.map = this.mapRenderer.render(this.dom.mapHolder, settings)\n\n\t\t\tif (activeImageExtent && this.map) {\n\t\t\t\tthis.map.getView().fit(activeImageExtent)\n\t\t\t}\n\t\t}\n\t\tthis.metadataRenderer.renderMetadata(this.dom.holder, imageViewData)\n\n\t\tif (settings.renderAnnotationTable && this.map) {\n\t\t\tconst modelTrainerRenderer = new ModelTrainerRenderer(this.wsiViewerInteractions)\n\t\t\tconst downloadCSVButtonRenderer = new DownloadCSVButtonRenderer()\n\t\t\tconst wsiAnnotationsRenderer = new WSIAnnotationsRenderer(this, settings, this.wsiViewerInteractions)\n\t\t\tthis.annotationTable = wsiAnnotationsRenderer.render(this.dom.annotationsHolder, imageViewData)\n\t\t\tthis.dom.legendHolder.selectAll('*').remove()\n\t\t\tmodelTrainerRenderer.render(this.dom.legendHolder, aiProjectID, genome, dslabel)\n\t\t\tdownloadCSVButtonRenderer.render(this.dom.legendHolder, viewModel.sampleWSImages[settings.displayedImageIndex])\n\t\t\tthis.legendRenderer.render(this.dom.legendHolder, imageViewData)\n\t\t\tthis.dom.mapHolder.select('#SFField').remove()\n\t\t\tthis.skipFlagRenderer.render(\n\t\t\t\tthis.dom.mapHolder,\n\t\t\t\tthis,\n\t\t\t\tsettings.renderOnlyFlagged,\n\t\t\t\tsettings.renderSkipped,\n\t\t\t\tviewModel.sampleWSImages[settings.displayedImageIndex],\n\t\t\t\tsettings\n\t\t\t)\n\t\t\tconst initialZoomInCoordinate = viewModel.getInitialZoomInCoordinate(settings)\n\t\t\tif (initialZoomInCoordinate != undefined) {\n\t\t\t\tthis.wsiViewerInteractions.zoomInEffectListener(\n\t\t\t\t\tactiveImageExtent,\n\t\t\t\t\tinitialZoomInCoordinate,\n\t\t\t\t\tthis.map,\n\t\t\t\t\timageViewData.activePatchColor!\n\t\t\t\t)\n\t\t\t\tthis.wsiViewerInteractions.setKeyDownListener(\n\t\t\t\t\tholder,\n\t\t\t\t\tviewModel.sampleWSImages[settings.displayedImageIndex],\n\t\t\t\t\tthis.map,\n\t\t\t\t\taiProjectID,\n\t\t\t\t\timageViewData.shortcuts,\n\t\t\t\t\tdownloadCSVButtonRenderer\n\t\t\t\t)\n\t\t\t}\n\t\t}\n\t\tthis.wsiViewerInteractions.toggleLoadingDiv(false)\n\t\t// Selection objects you want to add cursor style go here because the spinner changes all to default\n\t\tif (!settings.isSavingAnnotation) {\n\t\t\tconst pointersToAdd = [\n\t\t\t\tthis.thumbnailsContainer?.selectAll('div').selectAll('*'),\n\t\t\t\tthis.dom.annotationsHolder.selectAll('*'),\n\t\t\t\tthis.dom.legendHolder.selectAll('*')\n\t\t\t]\n\t\t\tpointersToAdd.forEach(container => {\n\t\t\t\tif (container) {\n\t\t\t\t\tcontainer?.style('cursor', 'pointer')\n\t\t\t\t}\n\t\t\t})\n\t\t}\n\t}\n}\n\nexport default WSIViewer\n\nexport const wsiViewer = getCompInit(WSIViewer)\n\nexport const componentInit = wsiViewer\n\nexport async function getPlotConfig(opts: any) {\n\treturn {\n\t\tchartType: 'WSIViewer',\n\t\tsubfolder: 'wsiviewer',\n\t\textension: 'ts',\n\t\thidePlotFilter: true, //Disable the filter in the sandbox header\n\t\tsettings: wsiViewerDefaults(opts.overrides)\n\t}\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AU,GAAG;AAAA,QACxC,KAAK,IAAI,aAAa,UAAU,GAAG;AAAA,MACpC;AACA,oBAAc,QAAQ,eAAa;AAClC,YAAI,WAAW;AACd,qBAAW,MAAM,UAAU,SAAS;AAAA,QACrC;AAAA,MACD,CAAC;AAAA,IACF;AAAA,EACD;AACD;AAEA,IAAO,oBAAQ;AAER,IAAM,YAAY,YAAY,SAAS;AAEvC,IAAM,gBAAgB;AAE7B,eAAsB,cAAc,MAAW;AAC9C,SAAO;AAAA,IACN,WAAW;AAAA,IACX,WAAW;AAAA,IACX,WAAW;AAAA,IACX,gBAAgB;AAAA;AAAA,IAChB,UAAU,kBAAkB,KAAK,SAAS;AAAA,EAC3C;AACD;",
6
- "names": ["Vector_default", "fileBase", "filename", "tileSelections", "sessionsTileSelection", "selectedIdx", "equals", "equals", "styles", "tile", "Layer_default", "create", "buffer", "format", "create", "options", "buffer", "format", "Layer_default", "EventType_default", "Uniforms", "Uniforms", "geometry", "Feature_default", "create", "scale", "create", "Attributes", "styles", "WEBGL_WORKER", "asArray", "style", "Uniforms", "Layer_default", "create", "equals", "buffer", "Property", "listen", "e", "value", "scale", "e", "li", "x", "opacity", "EventType_default", "format"]
7
- }